首页    期刊浏览 2025年07月05日 星期六
登录注册

文章基本信息

  • 标题:Initiality for Typed Syntax and Semantics
  • 本地全文:下载
  • 作者:Benedikt Ahrens
  • 期刊名称:Journal of Formalized Reasoning
  • 印刷版ISSN:1972-5787
  • 出版年度:2015
  • 卷号:8
  • 期号:2
  • 页码:1-155
  • DOI:10.6092/issn.1972-5787/4712
  • 语种:English
  • 出版社:Alma Mater Studiorum - University of Bologna
  • 摘要:In this thesis we give an algebraic characterization of the syntax and semantics of simply–typed languages. More precisely, we characterize simply–typed binding syntax equipped with reduction rules via a universal property, namely as the initial object of some category. We specify a language by a 2–signature (Σ, A), that is, a signature on two levels: the syntactic level Σ specifies the sorts and terms of the language, and associates a sort to each term. The semantic level A specifies, through inequations, reduction rules on the terms of the language. To any given 2–signature (Σ, A) we associate a category of “models” of (Σ, A). We prove that this category has an initial object, which integrates the terms freely generated by Σ and the reduction relation — on those terms — generated by A. We call this object the programming language generated by (Σ, A). Initiality provides an iteration principle which allows to specify translations on the syntax, possibly to a language over different sorts. Furthermore, translations specified via the iteration principle are by construction type–safe and faithful with respect to reduction. To illustrate our results, we consider two examples extensively: firstly, we specify a double negation translation from classical to intuitionistic propositional logic via the category–theoretic iteration principle. Secondly, we specify a translation from PCF to the untyped lambda calculus which is faithful with respect to reduction in the source and target languages. In a second part, we formalize some of our initiality theorems in the proof assistant Coq. The implementation yields a machinery which, when given a 2–signature, returns an implementation of its associated abstract syntax together with certified substitution operation, iteration operator and a reduction relation generated by the specified reduction rules.
  • 其他摘要:In this thesis we give an algebraic characterization of the syntax and semantics of simply–typed languages. More precisely, we characterize simply–typed binding syntax equipped with reduction rules via a universal property, namely as the initial object of some category. We specify a language by a 2–signature (Σ, A), that is, a signature on two levels: the syntactic level Σ specifies the sorts and terms of the language, and associates a sort to each term. The semantic level A specifies, through inequations, reduction rules on the terms of the language. To any given 2–signature (Σ, A) we associate a category of “models” of (Σ, A). We prove that this category has an initial object, which integrates the terms freely generated by Σ and the reduction relation — on those terms — generated by A. We call this object the programming language generated by (Σ, A). Initiality provides an iteration principle which allows to specify translations on the syntax, possibly to a language over different sorts. Furthermore, translations specified via the iteration principle are by construction type–safe and faithful with respect to reduction. To illustrate our results, we consider two examples extensively: firstly, we specify a double negation translation from classical to intuitionistic propositional logic via the category–theoretic iteration principle. Secondly, we specify a translation from PCF to the untyped lambda calculus which is faithful with respect to reduction in the source and target languages. In a second part, we formalize some of our initiality theorems in the proof assistant Coq. The implementation yields a machinery which, when given a 2–signature, returns an implementation of its associated abstract syntax together with certified substitution operation, iteration operator and a reduction relation generated by the specified reduction rules.
  • 关键词:relative monads;Coq;initial semantics
国家哲学社会科学文献中心版权所有