Academia.eduAcademia.edu

A Denotational Engineering of Programming Languages

2019, ArXiv

Abstract

The book is devoted to two research areas: (1) Designing programming languages along with their denotational models. A denotational model of a language consists of two many-sorted algebras - an algebra of syntax and an algebra of denotations - and a (unique) homomorphism from syntax to denotations called the semantics of the language. (2) Designing sound program-constructors for languages with denotational models. In our approach programs syntactically contain their total-correctness specifications. A program is said to be correct if it is correct wrt its specification. A program-constructor is sound if given correct component-programs yields a correct resulting program. Both methods are illustrated on an example-language Lingua.

Key takeaways

  • 4 the algebra of numbers will be called the algebra of denotations (of meanings) for both our algebras of numeric expressions and the homomorphism D2 will be called the denotational homomorphism (the semantics) of the algebra of abstract syntax.
  • Let Cdt (constructor of denotations of type expressions) denote a constructor that from constructors of types and transfers creates constructors of denotations.
  • Since the new algebra is homomorphic to the former and the corresponding homomorphism Co does not glue too much, the existence of a (unique) denotational semantics that maps new syntax into denotations follows from Theorem 2.13-1.
  • 4.3), Lingua-2 emerges from Lingua-1 by adding new carrier and new constructors to the algebras of denotations and syntax.
  • The signature of the algebra of denotations of Lingua-SQL is an extension of the signature of Lingua (Sec.7.8.1.1) by new constructors.