Modules over relative monads for syntax and semantics
Benedikt Ahrens

TL;DR
This paper introduces a formal algebraic framework using relative monads and modules to define syntax and semantics of languages with variable binding, including reduction rules, and implements it in Coq for certified language generation.
Contribution
It develops a novel algebraic approach to language syntax and semantics via 2-signatures and relative monads, with formal proof in Coq.
Findings
Defines 2-signatures for syntax and reduction rules
Constructs initial models with substitution and reduction
Provides a Coq formalization for language generation
Abstract
We give an algebraic characterization of the syntax and semantics of a class of languages with variable binding. 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 we associate a category of "models" of . This category has an initial object, which integrates the terms freely generated by , and which is equipped with reductions according to the inequations given in . We call this initial object the language generated by . 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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
