Lexa is a programming language supporting lexically scoped effect handlers. These effect handlers are a powerful means to express and manage complex control flow. They allow for strong local-reasoning principles, too.
This repository contains an implementation of Lexa. The compiler translates high-level, modular algebraic effects to low-level, swift stack switching. The design and implementation of the Lexa compiler are described in the following paper:
Cong Ma, Zhaoyi Ge, Edward Lee, Yizhou Zhang.
Lexical Effect Handlers, Directly.
Proceedings of the ACM on Programming Languages (PACMPL), Volume 8, Issue OOPSLA2, October 2024.
docker run -it hflsmax/lexa-lang:OOPSLA24
nix develop in the repository root. This could take up to an hour, or a few seconds if you allow Nix to use the pre-built cache.dune build to build the compiler.To run the Lexa compiler, use the following commands:
./lexa <source_file>
./a.out
See ./casestudies and ./test for exmaple Lexa programs.
cd scripts; python ./plots.py --tick-plot --plot-only ./final_plotting_runtimes2.csv. The plot will be saved in ./scaling_plots/two_scaling_plot.pdf. To plot using fresh data, run python ./plots.py --tick-plot.cd scripts; python bench.py. The result will be saved in ./runtimes.csv.cd scripts; python ./plots.py --plot-only ./final_plotting_runtimes.csv. The plot will be saved in ./scaling_plots/scaling_plot.pdf. To plot using fresh data, run python ./plots.py.cd src/formalized_translation; racket artifact.rkt.Please reach out to Cong Ma (cong.ma@uwaterloo.ca) for any questions. We welcome contributions to the project.
OCaml
37.5%
Python
13.6%
C
13.1%
Koka
12.3%
Jupyter Notebook
6.2%
Racket
4.8%
C++
4.2%
Nix
3.4%
Makefile
3.3%
JavaScript
1.0%
Lexa is a programming language supporting lexically scoped effect handlers. These effect handlers are a powerful means to express and manage complex control flow. They allow for strong local-reasoning principles, too.
This repository contains an implementation of Lexa. The compiler translates high-level, modular algebraic effects to low-level, swift stack switching. The design and implementation of the Lexa compiler are described in the following paper:
Cong Ma, Zhaoyi Ge, Edward Lee, Yizhou Zhang.
Lexical Effect Handlers, Directly.
Proceedings of the ACM on Programming Languages (PACMPL), Volume 8, Issue OOPSLA2, October 2024.
docker run -it hflsmax/lexa-lang:OOPSLA24
nix develop in the repository root. This could take up to an hour, or a few seconds if you allow Nix to use the pre-built cache.dune build to build the compiler.To run the Lexa compiler, use the following commands:
./lexa <source_file>
./a.out
See ./casestudies and ./test for exmaple Lexa programs.
cd scripts; python ./plots.py --tick-plot --plot-only ./final_plotting_runtimes2.csv. The plot will be saved in ./scaling_plots/two_scaling_plot.pdf. To plot using fresh data, run python ./plots.py --tick-plot.cd scripts; python bench.py. The result will be saved in ./runtimes.csv.cd scripts; python ./plots.py --plot-only ./final_plotting_runtimes.csv. The plot will be saved in ./scaling_plots/scaling_plot.pdf. To plot using fresh data, run python ./plots.py.cd src/formalized_translation; racket artifact.rkt.Please reach out to Cong Ma (cong.ma@uwaterloo.ca) for any questions. We welcome contributions to the project.
OCaml
37.5%
Python
13.6%
C
13.1%
Koka
12.3%
Jupyter Notebook
6.2%
Racket
4.8%
C++
4.2%
Nix
3.4%
Makefile
3.3%
JavaScript
1.0%