We demonstrate how to model the following common programming constructs in terms of an applicative order language similar to LISP: Simple Recursion, Iteration, Compound Statements and Expressions, GO TO and Assignment, Continuation-Passing, Escape Expressions, Fluid Variables, Call by Name, Call by Need, and Call by Reference. The models require only (possibly self-referent) lambda application, conditionals, and (rarely) assignment. No complex data structures such as stacks are used. The models are transparent, involving only local syntactic transformations. This paper is partly tutorial in intent, gathering all the models together for purposes of context.
Cited By
- Downen P, Maurer L, Ariola Z and Peyton Jones S (2016). Sequent calculus as a compiler intermediate language, ACM SIGPLAN Notices, 51:9, (74-88), Online publication date: 5-Dec-2016.
- Downen P, Maurer L, Ariola Z and Peyton Jones S Sequent calculus as a compiler intermediate language Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming, (74-88)
- Kerneis G, Shepherd C and Hajnoczi S QEMU/CPC Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation, (83-94)
- Herzeel C and Costanza P Dynamic parallelization of recursive code Proceedings of the ACM international conference on Object oriented programming systems languages and applications, (377-396)
- Herzeel C and Costanza P (2010). Dynamic parallelization of recursive code, ACM SIGPLAN Notices, 45:10, (377-396), Online publication date: 17-Oct-2010.
- Danvy O From reduction-based to reduction-free normalization Proceedings of the 6th international conference on Advanced functional programming, (66-164)
- Siskind J and Pearlmutter B (2007). First-class nonstandard interpretations by opening closures, ACM SIGPLAN Notices, 42:1, (71-76), Online publication date: 17-Jan-2007.
- Siskind J and Pearlmutter B First-class nonstandard interpretations by opening closures Proceedings of the 34th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (71-76)
- Shivers O The anatomy of a loop Proceedings of the tenth ACM SIGPLAN international conference on Functional programming, (2-14)
- Shivers O (2019). The anatomy of a loop, ACM SIGPLAN Notices, 40:9, (2-14), Online publication date: 12-Sep-2005.
- Kranz D, Kelsey R, Rees J, Hudak P, Philbin J and Adams N (2004). Orbit, ACM SIGPLAN Notices, 39:4, (175-191), Online publication date: 1-Apr-2004.
- Danvy O A rational deconstruction of landin's SECD machine Proceedings of the 16th international conference on Implementation and Application of Functional Languages, (52-71)
- Costanza P (2003). Dynamically scoped functions as the essence of AOP, ACM SIGPLAN Notices, 38:8, (29-36), Online publication date: 1-Aug-2003.
- Quan D, Huynh D, Karger D and Miller R User interface continuations Proceedings of the 16th annual ACM symposium on User interface software and technology, (145-148)
- Manolescu D Workflow enactment with continuation and future objects Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, (40-51)
- Manolescu D (2019). Workflow enactment with continuation and future objects, ACM SIGPLAN Notices, 37:11, (40-51), Online publication date: 17-Nov-2002.
- Clinger W Proper tail recursion and space efficiency Proceedings of the ACM SIGPLAN 1998 conference on Programming language design and implementation, (174-185)
- Clinger W (1998). Proper tail recursion and space efficiency, ACM SIGPLAN Notices, 33:5, (174-185), Online publication date: 1-May-1998.
- Odersky M and Wadler P Pizza into Java Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (146-159)
- Steele G and Gabriel R The evolution of Lisp History of programming languages---II, (233-330)
- Wadler P The essence of functional programming Proceedings of the 19th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (1-14)
- Teodosiu D (1991). HARE, ACM SIGPLAN Notices, 26:1, (109-120), Online publication date: 1-Jan-1991.
- Danvy O and Filinski A Abstracting control Proceedings of the 1990 ACM conference on LISP and functional programming, (151-160)
- Steele G Making asynchronous parallelism safe for the world Proceedings of the 17th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, (218-231)
- Adams N and Rees J Object-oriented programming in scheme Proceedings of the 1988 ACM conference on LISP and functional programming, (277-288)
- Ungar D and Smith R Self: The power of simplicity Conference proceedings on Object-oriented programming systems, languages and applications, (227-242)
- Ungar D and Smith R (2019). Self: The power of simplicity, ACM SIGPLAN Notices, 22:12, (227-242), Online publication date: 1-Dec-1987.
- Gelernter D, Jagannathan S and London T Environments as first class objects Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of programming languages, (98-110)
- Alberga C, Bosman-Clark C, Mikelsons M, Van Deusen M and Padget J Experience with an uncommon Lisp Proceedings of the 1986 ACM conference on LISP and functional programming, (39-53)
- Steenkiste P and Hennessy J LISP on a reduced-instruction-set-processor Proceedings of the 1986 ACM conference on LISP and functional programming, (192-201)
- Saint-James E Recursion is more efficient than iteration Proceedings of the 1984 ACM Symposium on LISP and functional programming, (228-234)
- Rivières J and Smith B The implementation of procedurally reflective languages Proceedings of the 1984 ACM Symposium on LISP and functional programming, (331-347)
- Brooks R, Gabriel R and Steele G S-1 Common Lisp implementation Proceedings of the 1982 ACM symposium on LISP and functional programming, (108-113)
- Brooks R, Gabriel R and Steele G An optimizing compiler for lexically scoped LISP Proceedings of the 1982 SIGPLAN symposium on Compiler construction, (261-275)
- Brooks R, Gabriel R and Steele G (2019). An optimizing compiler for lexically scoped LISP, ACM SIGPLAN Notices, 17:6, (261-275), Online publication date: 1-Jun-1982.
- Boley H (1980). A preliminary survey of artificial intelligence machines, ACM SIGART Bulletin:72, (21-28), Online publication date: 1-Jul-1980.
- Muchnick S and Pleban U A semantic comparison of LISP and SCHEME Proceedings of the 1980 ACM conference on LISP and functional programming, (56-64)
- McDermott D An efficient environment allocation scheme in an interpreter for a lexically-scoped LISP Proceedings of the 1980 ACM conference on LISP and functional programming, (154-162)
- Winograd T (1979). Beyond programming languages, Communications of the ACM, 22:7, (391-401), Online publication date: 1-Jul-1979.
- Steele G Debunking the “expensive procedure call” myth or, procedure call implementations considered harmful or, LAMBDA Proceedings of the 1977 annual conference, (153-162)
- Steele G Macaroni is better than spaghetti Proceedings of the 1977 symposium on Artificial intelligence and programming languages, (60-66)
- Steele G (2019). Macaroni is better than spaghetti, ACM SIGPLAN Notices, 12:8, (60-66), Online publication date: 1-Aug-1977.
- Steele G (2019). Macaroni is better than spaghetti, ACM SIGART Bulletin:64, (60-66), Online publication date: 1-Aug-1977.
Recommendations
Intrinsically-typed definitional interpreters for imperative languages
A definitional interpreter defines the semantics of an object language in terms of the (well-known) semantics of a host language, enabling understanding and validation of the semantics through execution. Combining a definitional interpreter with a ...