This repository hosts the Autumn interpreter, built with C++. It compiles to libraries usable in WebAssembly (WASM
), C++
, Python
and Julia
.
Create a Conda environment using the following command:
conda env create --file environment.yml
To avoid the hassle in re-building, please try visiting the Release page. Download the corresponding version and use it according to the Wiki
Run julia and install CxxWrap
using Pkg
Pkg.add("CxxWrap")
Compile the C++ interpreter by running:
mkdir build && cd build
cmake .. -DCMAKE_PREFIX_PATH=$(julia -e 'using CxxWrap;print(joinpath(CxxWrap.prefix_path()), "/lib/cmake")')
make -j12
cd ..
If you’re using macOS with Apple Silicon, use cmake .. -DCMAKE_OSX_ARCHITECTURES=arm64
in place of cmake ..
to ensures that all files are compiled and linked for arm64 architecture.
Then, in the same folder, execute the following commands:
cp build/*.so .
python python_test_mpl.py tests/grow.sexp 2> stderr_python.txt
If you want to visualize preset of animation, first, install ffmpeq
# Mac
brew install ffmpeg
# Linux
apt install ffmpeg libffmpeg
In your julia project:
using Pkg;
Pkg.develop(path=joinpath(first(DEPOT_PATH), "packages", "AutumnInterpreter"))
Pkg.add("Plots") # This is for visualization
Pkg.add("PlotlyJS") # This is for visualization
Pkg.add("JSON3") # This is for visualization
Pkg.add("WebIO")
Pkg.add("Observables")
Pkg.add("JSExpr")
using AutumnInterpreter
Finally, try out these tests:
julia test.jl
julia test2.jl
The main purpose is to allow building Autumn agent in Julia. For interactive purpose, please use Python package.
sh install_scripts/setup_emscripten.sh
source ./emsdk/emsdk_env.sh
make web
cp interpreter_web.* ./flask_server/static/
BBQ Egg Gravity 3 Grow Magnets Paint Particles Sokoban II Waterplug Game of Life Gravity 4 Ice Mario Particle 1 Sand Sokoban Wind
We welcome and hope to receive contributions in the following modules:
python_test_mpl_ci.py
This is used for headless CI testing.python_test
is a faster interface under development, but is not working properly, usepython_test_mpl.py
instead.
@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},
issue_date = {January 2023},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {7},
number = {POPL},
url = {https://doi.org/10.1145/3571249},
doi = {10.1145/3571249},
journal = {Proc. ACM Program. Lang.},
month = jan,
articleno = {56},
numpages = {31},
keywords = {synthesis, reactive, causal, automata}
}
This project is licensed under the MIT License - see the LICENSE file for details.
We acknowledge the open-source projects and communities that made this interpreter possible:
- The parser is made possible thanks to Sexpresso - an S-Expression parser
Dat Nguyen, Archana Warrier, Yichao Liang, Cambridge Yang, Michelangelo Naim, Zenna Tarvares