Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

gremlin

a compiler to discover non-trivial optimizations

Gremlin searches for small integer programs that match a function’s inputs and outputs. It evolves candidates, tests them against examples, and saves the best program as Gremlin source. Candidates can also be evaluated on CUDA, checked with Z3, or compiled through LLVM.

Install Rust 1.90.0 and a system linker, then build:

Terminal window
cargo build --release --locked -p gremlin-cli

Run a program or search for one:

Terminal window
target/release/gremlin run examples/affine.gremlin --args 0x0000000000000005
target/release/gremlin synthesize --config tests/fixtures/composed_u64.toml

Search results go into runs/: generated source, a JSON report, and a resumable checkpoint. Gremlin source looks like Rust but is a separate language. Functions accept up to four integer arguments and return one integer.

The default build runs on CPU. Binary targets require Linux x86-64 and Bubblewrap; CUDA, Z3, and LLVM are optional. See the usage guide for configuration, dependencies, CPU limits, and resuming a search.