This page will describe how the minimal set of ops provided by Lorito can be used to build up complex control flow via continuation-passing style (CPS). An understanding of basic CS concepts and Perl is assumed.
<basic description of how Lorito's ops work>
<include subset of ops sufficient for the example>
How Continuation-Passing Style Works in HLLs
<include introductory explanation (no stack, what "return" means in a CPS context, thinking inside-out)>
<use Perl to show normal and CPS-based fibonacci code>
<generalize on how to turn anything into CPS>
<explain how it works for exceptions, functions, coroutines, tail-calls, etc>
How to do CPS with only Low-Level Ops
(33.9 KB) - added by jimmy
3 years ago.
implementing a CPS code generator for ML
- stal-tic.pdf (192.0 KB) - added by jimmy 3 years ago.