Similar to the Binary Lambda Calculus backend in #118, this backend also uses LambdaVM to implement the virtual machine. This is done as follows:
LambdaVM is compiled to a SKI combinator calculus term using the contents of LambdaVM's repo.
The differences in the I/O encoding is absorbed by adding an encoder-decoder layer.
LambdaVM expects I/O to be encoded as a list of bits as explained in #118. On the other hand, the Lazy K interpreter encodes them as Church Numerals, and also encodes EOF as an infinite list of 256s. The encoder-decoder layer translates these differences when receiving and returning I/O to and from the Lazy K interpreter.
The Interpreter
This backend uses @irori's Lazy K interpreter. It automatically clones and compiles it in tools/runlazy.sh.
Tests
I've confirmed that running the test make lazy takes about 3 minutes on my machine.
Some tests that take a lot of time are left out from make lazy. Omitted tests are included in make test-lazy-full. I expect make test-lazy-full to run successfully for the following reasons:
All of the programs included in make lazy runs successfully.
The Lazy K backend and the BLC backend in #118 are both based on LambdaVM. Since The BLC backend runs make test-blc-full successfully, I expect the same holds for the Lazy K backend as well.
This pull request adds a backend for Lazy K.
Similar to the Binary Lambda Calculus backend in #118, this backend also uses LambdaVM to implement the virtual machine. This is done as follows:
EOF
as an infinite list of256
s. The encoder-decoder layer translates these differences when receiving and returning I/O to and from the Lazy K interpreter.The Interpreter
This backend uses @irori's Lazy K interpreter. It automatically clones and compiles it in tools/runlazy.sh.
Tests
I've confirmed that running the test
make lazy
takes about 3 minutes on my machine.Some tests that take a lot of time are left out from
make lazy
. Omitted tests are included inmake test-lazy-full
. I expectmake test-lazy-full
to run successfully for the following reasons:make lazy
runs successfully.make test-blc-full
successfully, I expect the same holds for the Lazy K backend as well.