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).
引用
收藏
相关论文
共 50 条
  • [21] From algebraic semantics to denotational semantics for Verilog
    Zhu, Huibiao
    He, Jifeng
    Bowen, Jonathan P.
    [J]. ICECCS 2006: 11TH IEEE INTERNATIONAL CONFERENCE ON ENGINEERING OF COMPLEX COMPUTER SYSTEMS, PROCEEDINGS, 2006, : 139 - +
  • [22] Denotational semantics of object specification
    Amílcar Sernadas
    Cristina Sernadas
    Carlos Caleiro
    [J]. Acta Informatica, 1998, 35 : 729 - 773
  • [23] DENOTATIONAL SEMANTICS OF QUERY LANGUAGES
    SUBIETA, K
    [J]. INFORMATION SYSTEMS, 1987, 12 (01) : 69 - 82
  • [24] ON INFINITE COMPUTATIONS IN DENOTATIONAL SEMANTICS
    DEBAKKER, JW
    MEYER, JJC
    ZUCKER, JI
    [J]. THEORETICAL COMPUTER SCIENCE, 1983, 26 (1-2) : 53 - 82
  • [25] A modular approach to denotational semantics
    Power, J
    Rosolini, G
    [J]. AUTOMATA, LANGUAGES AND PROGRAMMING, 1998, 1443 : 351 - 362
  • [26] OPERATIONAL AND DENOTATIONAL SEMANTICS OF PROLOG
    ARBAB, B
    BERRY, DM
    [J]. JOURNAL OF LOGIC PROGRAMMING, 1987, 4 (04): : 309 - 329
  • [27] Denotational semantics for timed testing
    Diaz, LFL
    Escrig, DD
    [J]. TRANSFORMATION-BASED REACTIVE SYSTEMS DEVELOPMENT, 1997, 1231 : 368 - 382
  • [28] A MODULAR APPROACH TO DENOTATIONAL SEMANTICS
    MOGGI, E
    [J]. LECTURE NOTES IN COMPUTER SCIENCE, 1991, 530 : 138 - 139
  • [29] Denotational semantics of hybrid automata
    Edalat, Abbas
    Pattinson, Dirk
    [J]. JOURNAL OF LOGIC AND ALGEBRAIC PROGRAMMING, 2007, 73 (1-2): : 3 - 21
  • [30] LOGICAL SEMANTICS AND DENOTATIONAL SEMANTICS OF PROLOG INTERPRETERS
    DELAHAYE, JP
    [J]. RAIRO-INFORMATIQUE THEORIQUE ET APPLICATIONS-THEORETICAL INFORMATICS AND APPLICATIONS, 1988, 22 (01): : 3 - 42