Skip to main content

Initiality for Typed Syntax and Semantics

  • Conference paper
Logic, Language, Information and Computation (WoLLIC 2012)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 7456))

Abstract

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.

We specify a language by a 2–signature, that is, a signature on two levels: the syntactic level specifies the types and terms of the language, and associates a type to each term. The semantic level specifies, through inequations, reduction rules on the terms of the language. To any given 2–signature we associate a category of models. We prove that this category has an initial object, which integrates the types and terms freely generated by the 2–signature, and the reduction relation on those terms generated by the given inequations. We call this object the (programming) language generated by the 2–signature.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Ahrens, B.: Modules over relative monads for syntax and semantics (2011), http://arxiv.org/abs/1107.5252 (to be published in Math. Struct. in Comp. Science)

  2. Ahrens, B.: Extended Initiality for Typed Abstract Syntax. Logical Methods in Computer Science 8(2), 1–35 (2012)

    MathSciNet  Google Scholar 

  3. Ahrens, B.: Initiality for Typed Syntax and Semantics. Ph.D. thesis, University of Nice Sophia Antipolis, France (2012), http://benedikt-ahrens.org

  4. Altenkirch, T., Chapman, J., Uustalu, T.: Monads Need Not Be Endofunctors. In: Ong, L. (ed.) FOSSACS 2010. LNCS, vol. 6014, pp. 297–311. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  5. Coq: The Coq Proof Assistant (2010), http://coq.inria.fr

  6. Fernández, M., Gabbay, M.J.: Nominal rewriting. Information and Computation 205(6), 917–965 (2007)

    Article  MathSciNet  MATH  Google Scholar 

  7. Fiore, M.P., Hur, C.-K.: Equational Systems and Free Constructions (Extended Abstract). In: Arge, L., Cachin, C., Jurdziński, T., Tarlecki, A. (eds.) ICALP 2007. LNCS, vol. 4596, pp. 607–618. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  8. Ghani, N., Lüth, C.: Rewriting via coinserters. Nord. J. Comput. 10(4), 290–312 (2003)

    MATH  Google Scholar 

  9. Hirschowitz, A., Maggesi, M.: Modules over Monads and Linearity. In: Leivant, D., de Queiroz, R. (eds.) WoLLIC 2007. LNCS, vol. 4576, pp. 218–237. Springer, Heidelberg (2007)

    Chapter  Google Scholar 

  10. Hirschowitz, A., Maggesi, M.: The algebraicity of the lambda-calculus. CoRR abs/0704.2900 (2007), http://arxiv.org/abs/0704.2900

  11. Hirschowitz, A., Maggesi, M.: Modules over monads and initial semantics. Inf. Comput. 208(5), 545–564 (2010)

    Article  MathSciNet  MATH  Google Scholar 

  12. Hur, C.K.: Categorical equational systems: algebraic models and equational reasoning. Ph.D. thesis, University of Cambridge, UK (2010)

    Google Scholar 

  13. Hyland, J.M.E., Ong, C.H.: On full abstraction for PCF. Information and Computation 163, 285–408 (2000)

    Article  MathSciNet  MATH  Google Scholar 

  14. Plotkin, G.D.: LCF considered as a programming language. Theoretical Computer Science 5(3), 223–255 (1977)

    Article  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ahrens, B. (2012). Initiality for Typed Syntax and Semantics. In: Ong, L., de Queiroz, R. (eds) Logic, Language, Information and Computation. WoLLIC 2012. Lecture Notes in Computer Science, vol 7456. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-32621-9_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-642-32621-9_10

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-32620-2

  • Online ISBN: 978-3-642-32621-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics