Collect and implement CPS transformation algorithms in OCaml, Rust, and MoonBit.
OCaml | Rust | MoonBit | |
---|---|---|---|
Naive | code | code | code |
Higher Order | code | code | code |
Nine Steps | code | × | × |
Properly Tail Recursive | code | × | × |
TODO... | × | × | × |
How to compile with continuations by Matt Might.
OCaml | Rust | MoonBit | |
---|---|---|---|
Naive | code | × | × |
Higher Order | code | × | × |
Hybrid | code | × | × |
Rich | code | × | × |
OCaml | Rust | MoonBit | |
---|---|---|---|
Untyped Naive | code | × | × |
Untyped Tail | code | × | × |
TODO... | × | × | × |
The essence of compiling with continuations by Cormac Flanagan, Amr Sabry, Bruce F. Duba, Matthias Felleisen.
also known as ANF (A-Normal Form)
OCaml | Rust | MoonBit | |
---|---|---|---|
Figure 9: A linear-time A-normalization algorithm | code | × | code |
↑↑↑ Syntax Partitioned Version | code | × | code |