Version 1 (modified by cotto, 11 years ago) |
---|
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.
Lorito's Ops
<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
Examples
References/See Also
Attachments
-
continuation-closure-passing.ps.gz
(33.9 KB) - added by jimmy
11 years ago.
implementing a CPS code generator for ML
-
stal-tic.pdf
(192.0 KB) - added by jimmy
11 years ago.
http://www.cs.cornell.edu/talc/papers/stal-tic.pdf