Expand description
§Superoptimizer written in Rust
This program stochastically generates assembly language programs that compute a given function. Strop provides mechanisms for generating programs, and mutating them in ways that stochastically approach the desired output.
Another way to describe strop, is that it randomly generates pretty good assembly programs.
So far, strop has had a focus on supporting architectures that are not well supported by mainstream compilers such as LLVM. These have included architectures common in low-end embedded, and hobbyist retrocomputing.
Modules§
- armv4t
- The
armv4t
module, the strop back-end for targeting the ARMv4T CPUs, including the ARM7TDMI. - dataflow
- This module contains miscellaneous conveniences for performing dataflow analysis on code sequences.
- m6502
- This is the back-end targeting the MOS 6502, a well-known 8-bit retro CPU.
- m6809
- This is the back-end targeting the Motorola 6809, another beloved 8-bit retro CPU.
- peephole
- This module implements a constraint which narrows the search space by ensuring that any sequence caught by a peephole optimization is skipped. This is especially useful for the BruteForce search algorithm.
- test
- Module containing miscellaneous functions for testing callables
- z80
- A back-end targeting the Z80, a well-known 8-bit retro CPU.
Structs§
- Brute
Force - Performs a brute force search over a given search space
U
- Sequence
Sequence<T>
is a straight-line sequence of things, such as machine instructions or other sequences.
Enums§
- Strop
Error - Enumerates reasons why executing a function may fail
Traits§
- Callable
- A trait for objects which may be called.
- Constrain
- A type implementing the Constraint trait can constrain the search space to, for example, leaf functions, or programs compatible with certain variants, or programs not liable to be modified by peephole optimization, etc. etc.
- Disassemble
- A trait for printing out the disassembly of an instruction, a subroutine, or anything else
- Encode
- Trait for things that can be converted to sequences (of bytes, words, etc)
- Goto
- Trait for starting a search from a particular point in the search space.
- Iterable
- A trait for anything that can be iterated across in an exhaustive manner. For example, the Bruteforce search uses this.
- Random
- A trait for things that can be searched through randomly. For example, the stochastic search uses this.