The objective of this project is to understand John Tromp's 2012 IOCCC entry.
- 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 (Winebarger2003's L machine)
- Add "collapse marker" optimization (Winebarger2003's C machine)
- Add "eager dereferncing" optimization (Winebarger2003's S machine)
- Refactor and understand the following programs:
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