Skip to main content

The categorical abstract machine

  • Conference paper
  • First Online:

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 201))

Abstract

The Cartesian closed categories have been shown by several authors to provide the right framework of the model theory of λ-calculus. The second author developed this as a syntactic equivalence between two calculi, giving rise to a new kind of combinatory logic: the categorical combinatory logic, where computations can be done through simple rewrite rules, and, as usual with combinators, avoiding problems with variable name clashes. This paper goes further (though not requiring a previous knowledge of categorical combinatory logic) and describes a very simple machine where categorical terms can be considered as code acting on a graph of values. The only saving mechanism is a stack containing pointers on code or on the graph. Abstractions are handled using closures. The machine is called categorical abstract machine or CAM. The CAM is easier to grasp and prove than the SECD machine. The natural evaluation strategy in the CAM is call-by-value, but lazy evaluation can be easily incorporated. The paper discusses the implementation of a real functional programming language, ML, through the CAM. A basic acquaintance with λ-calculus is required.

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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. G. Berry, P.L. Curien, The Kernel of the Applicative Language CDS: Theory and Practice, Proc. French-US Seminar on the Applications of Algebra to Language Definition and Compilation, Fontainebleau (Juin 1982), Cambridge University Press (1984).

    Google Scholar 

  2. N.G. De Bruijn, Lambda-calculus Notation with Maeless Dummies, a Tool for Automatic Formula Manipulation, Indag Math. 34, 381–392 (1972).

    Google Scholar 

  3. L. Cardelli. ML under Unix, Polymorphism, Vol. I,3 (Dec. 1983).

    Google Scholar 

  4. L. Cardelli, Compiling a Functional Language, Proc. ACM Conf. on Lisp and Functional Programming, Austin (1984).

    Google Scholar 

  5. L. Cardelli, The Amber Machine, to appear.

    Google Scholar 

  6. P-L. Curien, Categorical Combinators, Sequential Algorithms and Functional Programming, to appear in Pitman Series in Theoretical Computer Science.

    Google Scholar 

  7. M. Gordon, R. Milner, C. Wadsworth, Edinburgh LCF, Springer Lect. Notes in Comput. Sci., Vol. 78, (1979).

    Google Scholar 

  8. The ML Handbook, Inria technical report, (dec 84).

    Google Scholar 

  9. P. Henderson, Functional Programming: Application and Implementation, Prentice Hall International (1980).

    Google Scholar 

  10. J.R.Hindley, B.Lercher, J.P. Seldin, Combinatory Logic, Cambridge University Press (1972).

    Google Scholar 

  11. M. Mauny, Thèse de Troisième Cycle, to appear.

    Google Scholar 

  12. R. Milner, A proposal for Standard ML, Proc. ACM Conf. on Lisp and Functional Programming, Austin (1984).

    Google Scholar 

  13. G.D. Plotkin, Call-by-name, Call-by-value and the λ-calculus, Theoret. Comput. Sci. 1, 125–159 (1975).

    Google Scholar 

  14. A. Suarez, Thèse de troisième cycle, to appear.

    Google Scholar 

  15. D.A. Turner, A New Implementation Technique for Applicative Languages, Software Practice and Experience, Vol.9, 31–49 (1979).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Jean-Pierre Jouannaud

Rights and permissions

Reprints and permissions

Copyright information

© 1985 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Cousineau, G., Curien, PL., Mauny, M. (1985). The categorical abstract machine. In: Jouannaud, JP. (eds) Functional Programming Languages and Computer Architecture. FPCA 1985. Lecture Notes in Computer Science, vol 201. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-15975-4_29

Download citation

  • DOI: https://doi.org/10.1007/3-540-15975-4_29

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-15975-9

  • Online ISBN: 978-3-540-39677-2

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics