Awesome
The objective of this project is to understand John Tromp's 2012 IOCCC entry.
Done
- Refactor and understand the interpreter from https://tromp.github.io/cl/uni.c
- Replace manual reference counting with shared_ptr
- Add call-by-need optimization (<cite>Winebarger2003's L machine</cite>)
- Add "collapse marker" optimization (<cite>Winebarger2003's C machine</cite>)
- Add "eager dereferncing" optimization (<cite>Winebarger2003's S machine</cite>)
- Refactor and understand the following programs:
Todo
Usage
uni is an interpreter for binary lambda calculus based on the Krivine machine. It reads from standard input a program description followed by input for the program, and output the result to the standard output.
It supports the following options:
- -B: byte mode (default)
- -b: binary mode
- -o: enable all optmizations
- -l: enable call-by-need optimization
- -c: enable "collapse marker" optimization
- -s: enable "eager dereferncing" optimization