The categorical abstract machine [chapter]

G. Cousineau, P-L. Curien, M. Mauny
1985 Lecture Notes in Computer Science  
The Cartesian closed categories have been shown by several authors to provide the right framework of the model theory of h-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
more » ... ge 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 essential actions are LISP's "cons", "car" and "cd?, as well as "rplacd" to implement recursion). The only saving mechanism is a stack containing pointers on code or on the graph. Abstractions are handled in the very same way as in P. Landin's SECD machine, using closures. The machine is called categorical abstract machine or CAM. The CAM is easier to grasp and prove than the SECD machine. The paper discusses the implementation of a real functional programming language, ML, through the CAM. A basic acquaintance with A-calculus is required.
doi:10.1007/3-540-15975-4_29 fatcat:icnjiwex2bd6rckqejwo47jjbm