Skip to main content
Log in

Call-by-push-value: Decomposing call-by-value and call-by-name

  • Published:
Higher-Order and Symbolic Computation

Abstract

We present the call-by-push-value (CBPV) calculus, which decomposes the typed call-by-value (CBV) and typed call-by-name (CBN) paradigms into fine-grain primitives. On the operational side, we give big-step semantics and a stack machine for CBPV, which leads to a straightforward push/pop reading of CBPV programs. On the denotational side, we model CBPV using cpos and, more generally, using algebras for a strong monad. For storage, we present an O’Hearn-style “behaviour semantics’’ that does not use a monad.

We present the translations from CBN and CBV to CBPV. All these translations straightforwardly preserve denotational semantics. We also study their operational properties: simulation and full abstraction.

We give an equational theory for CBPV, and show it equivalent to a categorical semantics using monads and algebras. We use this theory to formally compare CBPV to Filinski’s variant of the monadic metalanguage, as well as to Marz’s language SFPL, both of which have essentially the same type structure as CBPV. We also discuss less formally the differences between the CBPV and monadic frameworks.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abramsky, S.: The lazy λ-Calculus. In Research Topics in Functional Programming. Addison Wesley, pp. 65–117 (1990)

  2. Barendregt, H.: The Lambda-Calculus: Its Syntax and Semantics. North-Holland, Amsterdam (1980)

    Google Scholar 

  3. Benton, N., Hughes, J., Moggi, E.: Monads and effects. In: Barthe, G., Dybjer, P., Pinto, L., Saraiva, J. (eds.), Advanced Lectures From International Summer School on Applied Semantics (APPSEM), Caminha, Portugal, vol. 2395 of Lecture Notes in Computer Science, pp. 42–122 (2000)

  4. Benton, N., Kennedy, A.: Monads, effects and transformations. In: Gordon, A., Pitts, A. (eds.), Proceedings, Higher-Order Operational Techniques in Semantics (HOOTS ’99), vol. 26 of ENTCS, Paris, France, pp. 3–20 (1999)

  5. Benton, N., Wadler, P.: Linear logic, monads and the lambda calculus. In: Proceedings, 11th Annual IEEE Symposium on Logic in Computer Science, New Brunswick, New Jersey, IEEE Computer Society Press, pp. 420–431 (1996)

  6. Felleisen, M., Friedman, D.: Control operators, the SECD-machine, and the λ-calculus. In: Wirsing, M. (ed.), Formal Description of Programming Concepts III, North-Holland, pp. 193–217 (1986)

  7. Filinski, A.: Controlling Effects. PhD thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania (1996)

  8. Führmann, C.: Direct models for the computational λ-calculus. In: Brookes, S., Jung, A., Mislove, M., Scedrov, A. (eds.), In: Proceedings of the 15th Conference in Mathematical Foundations of Programming Semantics, New Orleans, vol. 20 of ENTCS, pp. 147–172 (1999).

  9. Hatcliff, J.: The Structure of Continuation-Passing Styles. PhD thesis, Kansas State University, (1994)

  10. Hatcliff, J., Danvy, O.: Thunks and the λ-calculus. Journal of Functional Programming, 7(3), 303–319 (1997)

    Article  MATH  MathSciNet  Google Scholar 

  11. Howard, B.: Inductive, coinductive, and pointed types. In: Proceedings of the ACM SIGPLAN International Conference on Functional Programming (ICFP ’96), vol. 31, no. 6 of ACM SIGPLAN Notices, pp. 102–109. ACM, (1996)

  12. Jeffrey, A.: A fully abstract semantics for a higher-order functional language with nondeterministic computation. Theoretical Computer Science, 228(1–2), 105–150 (1999)

    Article  MATH  MathSciNet  Google Scholar 

  13. Krivine, J.-L.: Un interpréteur de λ-calcul. Unpublished, (1985)

  14. Laird, J.: A Semantic Analysis of Control. PhD thesis, University of Edinburgh (1998)

  15. Laurent, O.: Polarized proof-nets: proof-nets for LC (extended abstract). In: Girard, J.-Y. (ed.), Typed Lambda Calculi and Applications ’99, L’Aquila, Italy, vol. 1581 of Lecture Notes in Computer Science, pp. 213–227. Springer (1999)

  16. Levy, P.B.: λ-calculus and cartesian closed categories. Essay for Part III of the Mathematical Tripos, Cambridge University (1996)

  17. Levy, P.B.: Call-by-push-value: a subsuming paradigm (extended abstract). In: Girard, J.-Y (ed.), In: Proceedings, Typed Lambda-Calculi and Applications, L’Aquila, Italy, vol. 1581 of LNCS, pp. 228–242. Springer (1999)

  18. Levy, P.B.: Possible world semantics for general storage in call-by-value. In: Bradfield, J. (ed.), In: Proceedings, 16th Annual Conference of the European Assocation for Computer Science Logic (CSL), vol. 2471 of LNCS, pp. 232–246. Springer (2002)

  19. Levy, P.B.: Adjunction models for call-by-push-value with stacks. In: Blute, R., Selinger, P. (eds.), In: Proceedings, 9th Conference on Category Theory and Computer Science, Ottawa, 2002, vol. 69 of Electronic Notes in Theoretical Computer Science (2003)

  20. Levy, P.B.: Call-By-Push-Value. A Functional/Imperative Synthesis. Semantic Structures in Computation. Springer (2004)

  21. Levy, P.B.: Adjunction models for call-by-push-value with stacks. Theory and Applications of Categories, 14, 75–110 (2005)

    MATH  MathSciNet  Google Scholar 

  22. Levy, P.B.: Jumbo λ-calculus. In: Proceedings, 33rd International Colloquium on Automata, Languages and Programming, vol. 4052 of LNCS pp. 444–455. Springer (2006)

  23. Marz, M.: A fully abstract model for sequential computation. Technical Report CSR-98-6, University of Birmingham, School of Computer Science (1998)

  24. Marz, M.: A Fully Abstract Model for Sequential Computation. PhD thesis, Technische Universität Darmstadt, published by Logos-Verlag, Berlin (2000)

  25. Moggi, E.: Computational lambda-calculus and monads. In: Proceedings, 4th Annual Symposium on Logic in Computer Science, Pacific Grove, California, pp. 14–23. IEEE (1989)

  26. Moggi, E.: Notions of computation and monads. Information and Computation 93, 55–92 (1991)

    Article  MATH  MathSciNet  Google Scholar 

  27. O’Hearn, P.W.: Opaque types in algol-like languages. Manuscript (1993)

  28. Ong, C.H.L.: The Lazy Lambda Calculus: An Investigation into the Foundations of Functional Programming. PhD thesis, Imperial College of Science and Technology (1988)

  29. Plotkin, G.D.: Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science 1(1), 125–159 (1975)

    Article  MATH  MathSciNet  Google Scholar 

  30. Plotkin, G.D.: LCF considered as a programming language. Theoretical Computer Science 5, 223–255 (1977)

    Article  MathSciNet  Google Scholar 

  31. Pitts, A.M., Stark, I.D.B.: Operational reasoning for functions with local state. In: Gordon, A.D., Pitts, A.M. (eds.), Higher Order Operational Techniques in Semantics, Publications of the Newton Institute, pp. 227–273. Cambridge University Press (1998)

  32. Selinger, P.: Control categories and duality: On the categorical semantics of the λμ-calculus. Mathematical Structures in Computer Science 11(2), 207–260 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  33. Streicher, Th., Reus, B.: Classical logic, continuation semantics and abstract machines. Journal of Functional Programming 8(6), 543–572 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  34. Tait, W.W.: Intensional interpretation of functionals of finite type I. Journal of Symbolic Logic 32(2), 198–212 (1967)

    Article  MATH  MathSciNet  Google Scholar 

  35. Winskel, G.: Formal Semantics of Programming Languages. MIT Press (1993)

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Paul Blain Levy.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Levy, P.B. Call-by-push-value: Decomposing call-by-value and call-by-name. Higher-Order Symb Comput 19, 377–414 (2006). https://doi.org/10.1007/s10990-006-0480-6

Download citation

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-006-0480-6

Keywords

Navigation