arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1905.01469cs.PL
收藏

指称语义实验

An experiment with denotational semantics

Blikle Andrzej

摘要:

本文介绍了如何按“逆序”,即从表示到语法,系统地设计一门程序设计语言。这种结构是在一个代数框架中开发的,该框架由三个多排序代数组成:表示法,抽象语法和具体语法。这些代数是以这样一种方式构造的,即从具体语法到指称存在唯一的同态,这构成了语言的指称语义。除了它的代数框架,该模型是集合论的,即指称域只是集合,而不是斯科特的自反域。该方法说明了一个虚拟语言Lingua的逐层开发:一个应用层,一个命令层(递归过程)和一个SQL层,其中Lingua被视为一个API(应用程序编程接口)的SQL引擎。后者也被赋予了指称语义。该语言配备了强大的打字机制,涵盖了基本类型(数字,布尔等),列表、数组、记录及其任意组合,以及类似SQL的类型:行、表和数据库。类型模型包括SQL完整性约束。

英文摘要:

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. 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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑