Abstract
We give an algebraic characterization of the syntax and semantics of a class of untyped functional programming languages.To this end, we introduce a notion of 2-signature: such a signature specifies not only the terms of a language, but also reduction rules on those terms. To any 2-signature (S, A) we associate a category of ‘models’. We then prove that this category has an initial object, which integrates the terms freely generated by S, and which is equipped with reductions according to the rules given in A. We call this initial object the programming language generated by (S, A). Models of a 2-signature are built from relative monads and modules over such monads. Through the use of monads, the models – and in particular, the initial model – come equipped with a substitution operation that is compatible with reduction in a suitable sense.The initiality theorem is formalized in the proof assistant Coq, yielding a machinery which, when fed with a 2-signature, provides the associated programming language with reduction relation and certified substitution.
Publisher
Cambridge University Press (CUP)
Subject
Computer Science Applications,Mathematics (miscellaneous)
Reference27 articles.
1. Nested datatypes
2. Zsidó J. (2010) Typed abstract syntax. Available at http://tel.archives-ouvertes.fr/tel-00535944/. Ph.D. thesis, University of Nice, France.
3. Coq (2010) The coq proof assistant. Available at: http://coq.inria.fr. URL: http://coq.inria.fr.
Cited by
8 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. The formal theory of relative monads;Journal of Pure and Applied Algebra;2024-09
2. C-system of a module over a Jf-relative monad;Journal of Pure and Applied Algebra;2023-06
3. Distributive Laws for Relative Monads;Applied Categorical Structures;2023-04
4. Modules over monads and operational semantics (expanded version);Logical Methods in Computer Science;2022-08-02
5. Implementing a category-theoretic framework for typed abstract syntax;Proceedings of the 11th ACM SIGPLAN International Conference on Certified Programs and Proofs;2022-01-11