Continuation-passing, closure-passing style
By A. Appel, Trevor Jim. 1989
We implemented a continuation-passing style (CPS) code generator for ML. Our CPS language is represented as an ML datatype in which all functions are named and most kinds of ill-formed expressions are impossible. We separate the code generation into phases that rewrite this representation into ever-simpler forms. Closures are represented explicitly as records, so that closure strategies can be communicated from one phase to another. No stack is used. Our benchmark data shows that the new method is an improvement over our previous, abstract-machine based code generator.
Subfields: Program Analysis & Verification
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Program Analysis & Verification
Citations in the corpus
- Design and Implementation of Probabilistic Programming Language Anglican (2016, methodology): “this distribution can be obtained by running the query under one of Anglican’s inference algorithms. Internally, an Anglican query is represented by a computation in continuation passing style (CPS) (Appel and Jim 1989), and inference algorithms exploit the CPS structure of the code to intercept pro”