An Experiment with Denotational Semantics

被引:0
作者
Blikle A. [1 ]
机构
[1] Institute of Computer Science, Polish Academy of Sciences, ul. Jana Kazimierza 5, Warsaw
关键词
A denotational model of types; Abstract syntax; Concrete syntax; Many-sorted algebras; Set-theoretic denotational semantics; Three-valued predicate calculus;
D O I
10.1007/s42979-019-0013-0
中图分类号
学科分类号
摘要
The paper is devoted to showing how to systematically design a programming language in “reverse order”, i.e., from denotations to syntax. This construction is developed in an algebraic framework consisting of three many-sorted algebras: of denotations, of an abstract syntax and of a concrete syntax. These algebras are constructed in such a way that there is a unique homomorphism from concrete syntax to denotations, which constitutes the denotational semantics of the language. Besides its algebraic framework, the model is set-theoretic, i.e., the denotational domains are just sets, rather than Scott’s reflexive domains. The method is illustrated by a layer-by-layer development of a virtual language Lingua: an applicative layer, an imperative layer (with recursive procedures) and an SQL layer where Lingua is regarded as an API (Application Programming Interface) for an SQL engine. The latter is given a denotational semantics as well. Mathematically, the model is based on so-called naive denotational semantics (Blikle and Tarlecki in Information processing 83. Elsevier Science Publishers B.V., North-Holland, 1983), Many-sorted algebras (Goguen et al. in J ACM 24:68–95, 1977), equational grammars (Blikle in Inform Control 21:134–147, 1972), and a three-valued predicate calculus based on a three-valued proposition calculus of McCarthy (A basis for a mathematical theory of computation, North Holland, 1967). Three-valued predicates provide an adequate framework for error-handling mechanisms and also for the development of a Hoare-like logic with clean termination (Blikle in Acta Inform 16:199–217, 1981) for Lingua. That logic is used in Blikle and Chrząstowski-Wachtel (Complete Unambiguous, https://doi.org/10.13140/rg.2.2.27499.39201/3, 2019) for the development of correctness-preserving programs’ constructors. This issue is, however, not covered by the paper. The langue is equipped with a strong typing mechanism which covers basic types (numbers, Booleans, etc.), lists, arrays, record and their arbitrary combinations plus SQL-like types: rows, tables, and databases. The model of types includes SQL-integrity constraints. © 2019, The Author(s).
引用
收藏
相关论文
共 30 条
  • [1] Ahrent W., Beckert B., Bubel R., Hahnle R., Schmitt P.H., Ulbrich M., Deductive software verification—the key book
  • [2] from theory to practice. Lecture notes in computer science, 10001, (2016)
  • [3] Binsbergena L.T., Mosses P.D., Sculthorped C.N., Executable component-based semantics, J Logical Algebraic Methods Program., 103, pp. 184-212, (2019)
  • [4] Bjorner D., Jones B.C., The Vienna development method: the metalanguage, (1982)
  • [5] Bjorner D., Oest O.N., Towards a formal description of Ada. Lecture notes of computer science, 98, (1980)
  • [6] LXXXV, (1971)
  • [7] Blikle A., Equational languages, Inf Control, 21, 2, pp. 134-147, (1972)
  • [8] Toward mathematical structured programming, formal description of programming concepts, Proc. IFIP Working Conf. St. Andrews, N.B., Canada, 1977, pp. 183-2012, (1978)
  • [9] Blikle A., On correct program development, Proceedings of the 4Th International Conference on Software Engineering, München, September 17–19, 1979. IEEE Computer Society, pp. 164-173
  • [10] Blikle A., On the development of correct specified programs, IEEE Trans Soft Eng, SE-7, 5, pp. 519-527, (1981)