Abstract
Dynamic binding, which has always been associated with Lisp, is still semantically obscure to many. Although largely replaced by lexical scoping, not only does dynamic binding remain an interesting and expressive programming technique in specialised circumstances, but also it is a key notion in semantics. This paper presents a syntactic theory that enables the programmer to perform equational reasoning on programs using dynamic binding. The theory is proved to be sound and complete with respect to derivations allowed on programs in “dynamic-environment passing style”. From this theory, we derive a sequential evaluation function in a context-rewriting system. Then, we exhibit the power and usefulness of dynamic binding in two different ways. First, we prove that dynamic binding adds expressiveness to a purely functional language. Second, we show that dynamic binding is an essential notion in semantics that can be used to define the semantics of exceptions. Afterwards, we further refine the evaluation function into the popular implementation strategy called deep binding. Finally, following the saying that deep binding is suitable for parallel evaluation, we present the parallel evaluation function of a future-based functional language extended with constructs for dynamic binding.
This research was supported in part by EPSRC grant GR/K30773.
Chapter PDF
Keywords
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.
References
John Allen. Anatomy of Lisp. Mc Graw Hill, 1979.
Henry Baker. Shallow binding in lisp 1.5. Comm. of the ACM, 21(7):565–569, 1978.
Henk P. Barendregt. The Lambda Calculus: Its Syntax and Semantics, volume 103 of Studies in Logic and the Foundations of Mathematics. North-Holland, 1984.
Robert Cartwright. Lambda: the Ultimate Combinator. In V. Lifschitz, editor, Artificial Intelligence and Mathematical Theory of Computation: Papers in Honor of John McCarthy, pages 27–46. Academic Press, 1991.
Olivier Danvy and Andrzej Filinski. Abstracting Control. In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pages 151–160, June 1990.
Bruce F. Duba, Matthias Felleisen, and Daniel P. Friedman. Dynamic Identifiers Can Be Neat. Technical Report 220, Indiana University, Computer Science Department, 1987.
Marc Feeley. An Efficient and General Implementation of Futures on Large Scale Shared-Memory Multiprocessors. PhD thesis, Brandeis University, 1993.
Matthias Felleisen. On the Expressive Power of Programming Languages. In Proc. European Symposium on Programming, in LNCS 432, pages 134–151. Springer-Verlag, 1990.
Matthias Felleisen and Daniel P. Friedman. A Reduction Semantics for Imperative Higher-Order Languages. In Parallel Architecture and Languages Europe, in LNCS 259, pages 206–223, 1987.
Matthias Felleisen and Daniel P. Friedman. A Syntactic Theory of Sequential State. Theoretical Computer Science, 69:243–287, 1989.
Matthias Felleisen, Daniel P. Friedman, Eugene E. Kohlbecker, and Bruce Duba. A Syntactic Theory of Sequential Control. Theoretical Computer Science, 52(3):205–237, 1987.
Matthias Felleisen and Robert Hieb. The Revised Report on the Syntactic Theories of Sequential Control and State. Theoretical Computer Science, 2(4):235–271, 1992.
Andrzej Filinski. Controlling Effects. PhD thesis, School of Computer Science. Carnegie Mellon University, May 1996.
Cormac Flanagan and Matthias Felleisen. The Semantics of Future and Its Use in Program Optimization. In Proceedings of the Twenty Second Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, January 1995.
Michael J.C. Gordon. Operational Reasoning and Denotational Semantics. In Proving and Improving Programs, Colloques IRIA, pages 83–98, Arc et Senans, July 1975.
Michael J.C. Gordon. Towards a Semantic Theory of Dynamic Binding. Technical Report STAN-CS-75-507, Stanford University, August 1975.
Robert H. Halstead, Jr. New Ideas in Parallel Lisp: Language Design, Implementation. In Parallel Lisp: Languages and Systems, in LNCS 441, pages 2–57. Springer-Verlag, 1990.
Chris Hanson. MIT Scheme Reference Manual. Massachusetts Inst. of Tech., Jan. 1991.
Christopher Haynes and Daniel P. Friedman. Embedding Continuations in Procedural Objects. ACM Transactions on Programming Languages and Systems, 9(4):582–598, 1987.
Robert Hieb and R. Kent Dybvig. Continuations and Concurrency. In Second ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming, pages 128–136, 1990.
Paul Hudak, Simon Peyton Jones, and Philip Wadler (editors). Report on the Programming Language Haskell. 1991.
Donald E. Knuth. The TEXbook. Addison-Wesley, 1994.
Robert Krawitz, Bil Lewis, Dan LaLiberte, Richard M. Stallman, and Chris Welt. GNU Emacs Lisp Reference Manual, 2.4 edition.
John McCarthy. Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I. Communications of the ACM, 3(4):184–195, 1960.
John McCarthy. History of Lisp. In ACM SIGPLAN History of Programming Languages Conference, ACM Monograph Series, pages 173–196, June 1978.
Robin Milner, Mads Tofte, and Robert Harper. The Definition of Standard ML. MIT Press, 1990.
Eric Mohr, David A. Kranz, and Robert H. Halstead. Lazy Task Creation: a Technique for Increasing the Granularity of Parallel Programs. In Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pages 185–197, June 1990.
David A. Moon. Maclisp reference manual. Technical report, MIT Project Mac, April 1974.
Luc Moreau. Sound Evaluation of Parallel Functional Programs with First-Class Continuations. PhD thesis, University of Liège, Liège, Belgium, June 1994.
Luc Moreau. The Semantics of Scheme with Future. In In ACM SIGPLAN International Conference on Functional Programming (ICFP'96), pages 146–156, May 1996.
Luc Moreau and Christian Queinnec. Partial Continuations as the Difference of Continuations. A Duumvirate of Control Operators. In International Conference on Programming Language Implementation and Logic Programming (PLILP'94), in LNCS 844, pages 182–197, Madrid, Spain, September 1994. Springer-Verlag.
Joel Moses. The function of function in lisp or why the funarg problem should be called the environment problem. Project MAC AI-199, M.I.T., June 1970.
Randy B. Osborne. Speculative Computation in Multilisp. In Parallel Lisp: Languages and Systems, in LNCS 441, pages 103–137. Springer-Verlag, 1990.
Julian Padget and Grep Nuyens (Editors). The Eulisp Definition, June 1991.
Gordon D. Plotkin. Call-by-Name, Call-by-Value and the λ-Calculus. Theoretical Computer Science, pages 125–159, 1975.
Christian Queinnec. Lisp in Small Pieces. Cambridge University Press, 1996. ISBN 0 521 56247 3.
Christian Queinnec and David De Roure. Design of a Concurrent and Distributed Language. In Parallel Symbolic Computing: Languages, Systems and Applications, in LNCS 748, pages 234–259, Boston, Massachussetts, October 1992. Springer-Verlag.
Christian Queinnec and Bernard Serpette. A Dynamic Extent Control Operator for Partial Continuations. In Proceedings of the Eighteenth Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pages 174–184, 1991.
Jonathan Rees and William Clinger, editors. Revised 4 Report on the Algorithmic Language Scheme. Lisp Pointers, 4(3):1–55, July-September 1991.
Amr Sabry. The Formal Relationship between Direct and Continuation-Passing Style Optimizing Compilers: a Synthesis of Two Paradigms. PhD thesis, Rice University, 1994.
Amr Sabry and Matthias Felleisen. Reasoning about Programs in Continuation-Passing Style. Lisp and Symbolic and Computation, 6(3/4):289–360, November 1993.
Dorai Sitaram and Matthias Felleisen. Control Delimiters and Their Hierarchies Lisp and Symbolic Computation, 3(1):67–99, 1990.
Guy Lewis Steele, Jr. Common Lisp. The Language. Digital Press, second edition, 1990.
Carolyn Talcott. Rum: an Intensional Theory of Function and Control Abstractions. In Proc. 1987 Workshop on Foundations of Logic and Functional Programming, in LNCS 306 pages 3–44. Springer-Verlag, 1988.
Larry Wall, Tom Christiansen, and Randal L. Schwartz. Programming Perl. O'Reilly & Associates, Inc., second edition edition, 1996.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1997 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Moreau, L. (1997). A syntactic theory of dynamic binding. In: Bidoit, M., Dauchet, M. (eds) TAPSOFT '97: Theory and Practice of Software Development. CAAP 1997. Lecture Notes in Computer Science, vol 1214. Springer, Berlin, Heidelberg. https://doi.org/10.1007/BFb0030637
Download citation
DOI: https://doi.org/10.1007/BFb0030637
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-62781-4
Online ISBN: 978-3-540-68517-3
eBook Packages: Springer Book Archive