English

Modules over relative monads for syntax and semantics

Logic in Computer Science 2019-02-20 v3 Programming Languages

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 SS we associate a category of "models" of SS. This category has an initial object, which integrates the terms freely generated by SS, and which is equipped with reductions according to the inequations given in SS. We call this initial object the language generated by SS. 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.

Keywords

Cite

@article{arxiv.1107.5252,
  title  = {Modules over relative monads for syntax and semantics},
  author = {Benedikt Ahrens},
  journal= {arXiv preprint arXiv:1107.5252},
  year   = {2019}
}

Comments

v2: - Abstract and Introduction completely rewritten - Addition of examples and remarks in Secs. 1 and 2 - Sec 3 now describes the implementation in proof assistant Coq of the main theorem v3: - final version for publication in MSCS

R2 v1 2026-06-21T18:42:29.725Z