An implementation of the stochastic superoptimization algorithm [STOKE](docs/asplos13.pdf) for the Sharp LR35902 (also known as GB-Z80).
An implementation of the stochastic superoptimization algorithm [STOKE](./docs/asplos13.pdf) for the Sharp LR35902 (also known as GB-Z80).
## Setup
@ -12,8 +12,8 @@ $ poetry install
## Usage
Input programs are specified as a list of CPU instructions. For a list of instructions available to the processor, take a look at [insn.py](/gbso/cpu/insn.py) or a [standard reference](https://gbdev.io/pandocs/CPU_Instruction_Set.html).
Input programs are specified as a list of CPU instructions. For a list of instructions available to the processor, take a look at [insn.py](./gbso/cpu/insn.py) or a [standard reference](https://gbdev.io/pandocs/CPU_Instruction_Set.html).
Once you have the program specified, call `gbso.optimize.optimize` on the program. A superoptimized, behaviorally equivalent program will be returned. Additional parameters are available to the optimization function to control search.
For a comprehensive example, see [ex.py](/ex.py).
For a comprehensive example, see [ex.py](./ex.py).