Initiality for Typed Syntax and Semantics

We give an algebraic characterization of the syntax and semantics of a class of simply–typed languages, such as the language PCF: we characterize simply–typed binding syntax equipped with reduction rules via a universal property, namely as the initial object of some category. For this purpose, we employ techniques developed in two previous works: in [2], we model syntactic translations between languages over different sets of types as initial morphisms in a category of models. In [1], we characterize untyped syntax with reduction rules as initial object in a category of models. In the present work, we show that those techniques are modular enough to be combined: we thus characterize simply–typed syntax with reduction rules as initial object in a category. The universal property yields an operator which allows to specify translations — that are semantically faithful by construction — between languages over possibly different sets of types.

[1]  Andrew M. Pitts,et al.  A new approach to abstract syntax involving binders , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[2]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[3]  Varmo Vene,et al.  CATEGORICAL PROGRAMMING WITH INDUCTIVE AND COINDUCTIVE TYPES , 2000 .

[4]  Chung-Kil Hur,et al.  Strongly Typed Term Representations in Coq , 2011, Journal of Automated Reasoning.

[5]  André Hirschowitz,et al.  Nested Abstract Syntax in Coq , 2010, Journal of Automated Reasoning.

[6]  Chung-Kil Hur Categorical equational systems : algebraic models and equational reasoning , 2010 .

[7]  M. Hofmann Extensional concepts in intensional type theory , 1995 .

[8]  Amy P. Felty,et al.  Logic Colloquium 2006: Higher-order abstract syntax in type theory , 2009 .

[9]  Martin Hofmann,et al.  Nominal Renaming Sets , 2008, LPAR.

[10]  Christoph Lüth,et al.  Rewriting Via Coinserters , 2003, Nord. J. Comput..

[11]  Lawrence C. Paulson,et al.  Isabelle: The Next Seven Hundred Theorem Provers , 1988, CADE.

[12]  A. Church An Unsolvable Problem of Elementary Number Theory , 1936 .

[13]  Richard S. Bird,et al.  Nested Datatypes , 1998, MPC.

[14]  Marino Miculan,et al.  A framework for typed HOAS and semantics , 2003, PPDP '03.

[15]  J. Girard,et al.  Proofs and types , 1989 .

[16]  André Hirschowitz,et al.  Modules over Monads and Linearity , 2006, WoLLIC.

[17]  Marcelo P. Fiore,et al.  Semantic analysis of normalisation by evaluation for typed lambda calculus , 2002, PPDP '02.

[18]  Adam Chlipala An Introduction to Programming and Proving with Dependent Types in Coq , 2010, J. Formaliz. Reason..

[19]  Joseph A. Goguen,et al.  Initial Algebra Semantics and Continuous Algebras , 1977, J. ACM.

[20]  Gordon D. Plotkin,et al.  Abstract syntax and variable binding , 1999, Proceedings. 14th Symposium on Logic in Computer Science (Cat. No. PR00158).

[21]  Chung-Kil Hur,et al.  Second-Order Equational Logic (Extended Abstract) , 2010, CSL.

[22]  Gérard P. Huet,et al.  Constructive category theory , 2000, Proof, Language, and Interaction.

[23]  Carlos Simpson Explaining Gabriel–Zisman Localization to the Computer , 2006, Journal of Automated Reasoning.

[24]  Thorsten Altenkirch,et al.  Monadic Presentations of Lambda Terms Using Generalized Inductive Types , 1999, CSL.

[25]  Matthieu Sozeau,et al.  First-Class Type Classes , 2008, TPHOLs.

[26]  André Hirschowitz,et al.  Initial Semantics for Strengthened Signatures , 2012, FICS.

[27]  Benedikt Ahrens,et al.  Extended Initiality for Typed Abstract Syntax , 2011, Log. Methods Comput. Sci..

[28]  Henk Barendregt,et al.  Introduction to Lambda Calculus , 1984 .

[29]  Assia Mahboubi,et al.  Packaging Mathematical Structures , 2009, TPHOLs.

[30]  Maribel Fernández,et al.  Nominal rewriting , 2007, Inf. Comput..

[31]  Chung-Kil Hur,et al.  Equational Systems and Free Constructions (Extended Abstract) , 2007, ICALP.

[32]  Wesley Phoa Adequacy for untyped translations of typed lambda -calculi , 1993, [1993] Proceedings Eighth Annual IEEE Symposium on Logic in Computer Science.

[33]  Radha Jagadeesan,et al.  Full Abstraction for PCF , 1994, Inf. Comput..

[34]  Richard S. Bird,et al.  de Bruijn notation as a nested datatype , 1999, Journal of Functional Programming.

[35]  G. Birkhoff,et al.  On the Structure of Abstract Algebras , 1935 .

[36]  Jon G. Riecke,et al.  Fully abstract translations between functional languages , 1991, POPL '91.

[37]  Flemming Nielson,et al.  Efficient CSL Model Checking Using Stratification , 2011, 1104.4983.

[38]  Bas Spitters,et al.  Type classes for mathematics in type theory† , 2011, Mathematical Structures in Computer Science.

[39]  Benedikt Ahrens,et al.  Initial Semantics for higher-order typed syntax in Coq , 2011, J. Formaliz. Reason..

[40]  Rance Cleaveland,et al.  Implementing mathematics with the Nuprl proof development system , 1986 .

[41]  Benjamin C. Pierce,et al.  Mechanized Metatheory for the Masses: The PoplMark Challenge , 2005, TPHOLs.

[42]  Tom Ridge,et al.  Ott: effective tool support for the working semanticist , 2007, ICFP '07.

[43]  André Hirschowitz,et al.  The algebraicity of the lambda-calculus , 2007, ArXiv.

[44]  Greg O'Keefe Towards a Readable Formalisation of Category Theory , 2004, Electron. Notes Theor. Comput. Sci..

[45]  André Hirschowitz,et al.  Modules over monads and initial semantics , 2010, Inf. Comput..