C++ implementation of the Autumn DSL interpreter. Builds to a native binary, a Python extension module (mara-autumn-cpp wheel via pybind11), a WebAssembly bundle, and a Julia binding.
Pre-built wheels and the WASM bundle are published per release at BasisResearch/Autumn.cpp/releases. To install the wheel:
pip install mara-autumn-cpp
# or, from a downloaded wheel:
pip install ./mara_autumn_cpp-*.whlAfter install, the extension is importable as MARA.autumn_cpp.interpreter_module (the package layout matches the MARA monorepo's expectations, but the wheel does not depend on MARA itself).
- A C++20 compiler (clang or gcc)
- CMake ≥ 3.18
- Python ≥ 3.12 with development headers (use
uvto manage Python — see below) - For the WASM target: Emscripten (a helper script is included)
This builds just the native CLI + the C++ unit test — no Python toolchain needed. To also build the pybind11 Python extension, drop -DAUTUMN_BUILD_PYTHON_MODULE=OFF (it defaults to ON).
# Configure
cmake -B build -S . -DCMAKE_BUILD_TYPE=Release -DAUTUMN_BUILD_PYTHON_MODULE=OFF
# Build
cmake --build build -j
# Run the test suite
ctest --test-dir build --output-on-failureThis produces:
| Artifact | Path |
|---|---|
| Native CLI interpreter | build/interpreter |
| Static C++ library | build/libAutumnLib.a |
| Token-type unit test | build/TokenTypeTest |
Python extension module (when AUTUMN_BUILD_PYTHON_MODULE=ON) |
build/interpreter_module*.so |
uv build
# wheel lands in dist/For multi-platform release wheels (manylinux x86_64/aarch64, macOS x86_64/arm64), the CI uses cibuildwheel — see .github/workflows/build.yml.
sh install_scripts/setup_emscripten.sh
source ./emsdk/emsdk_env.sh
# Use the emscripten cmake wrapper to configure
emcmake cmake -B build-wasm -S . -DCMAKE_BUILD_TYPE=Release
# Once configured, build the project like you normally would
cmake --build build-wasm -jOutputs build-wasm/interpreter_web.js and build-wasm/interpreter_web.wasm.
julia -e 'using Pkg; Pkg.add("CxxWrap")'
cmake -B build -S . -DCMAKE_PREFIX_PATH=$(julia -e 'using CxxWrap; print(joinpath(CxxWrap.prefix_path(), "lib/cmake"))')
cmake --build build -jIf the Julia toolchain is detected at configure time, an AutumnInterpreter package is staged into Julia's depot.
After building (no wheel install required), a smoke-test runner:
PYTHONPATH=build .venv/bin/python python_test_mpl_ci.py tests/grow.sexpFor an interactive matplotlib viewer (accepts step, click x y, left/right/up/down, q on stdin):
.venv/bin/pip install matplotlib # or: pip install -e '.[viz]'
PYTHONPATH=build .venv/bin/python python_test_mpl.py tests/grow.sexpAdditional matplotlib viewers (drag-and-drop / multiple-choice / animation modes) live in extras/.
./build/interpreter tests/grow.sexpusing Pkg
Pkg.develop(path=joinpath(first(DEPOT_PATH), "packages", "AutumnInterpreter"))
using AutumnInterpreterSee test.jl and test2.jl for example sessions.
src/ — interpreter sources
include/ — public headers (Expr, Stmt, Interpreter, Interner, …)
tools/ — entry points: native CLI, pybind11 bindings,
Julia bindings, WASM bindings, AST generator
autumnstdlib/ — Autumn standard library (stdlib.sexp)
tests/ — Autumn programs (.sexp) used as smoke / regression inputs
test_suites/ — C++ unit tests (registered with ctest)
extras/ — alternative matplotlib viewers
python_pkg/ — Python package layout used by `cmake --install`
.github/workflows/ — CI: wheel matrix + WASM build + tagged release
@article{das2023autumn,
author = {Das, Ria and Tenenbaum, Joshua B. and Solar-Lezama, Armando and Tavares, Zenna},
title = {Combining Functional and Automata Synthesis to Discover Causal Reactive Programs},
year = {2023},
publisher = {Association for Computing Machinery},
journal = {Proc. ACM Program. Lang.},
volume = {7},
number = {POPL},
articleno = {56},
numpages = {31},
doi = {10.1145/3571249},
keywords = {synthesis, reactive, causal, automata}
}The s-expression parser is built on Sexpresso.
MIT — see LICENSE.
Dat Nguyen, Archana Warrier, Yichao Liang, Cambridge Yang, Michelangelo Naim, Yiyun Liu, Zenna Tavares.
