arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2107.10545cs.PL
收藏

编程语言中的基础构造

Fundamental Constructs in Programming Languages

Peter D. Mosses

AI总结:

本文介绍 PLanCompS 的 funcons 基础构造,说明如何通过组合式翻译精确、模块化地规定编程语言行为,并关联单子语义与动作语义。

摘要:

当一种新的编程语言出现时,需要规定其程序的语法和预期行为。通过将每个语言构造组合式地翻译为基础构造(funcons),可以简洁地规定其行为。与参考手册中常见的非形式化解释不同,这种到 funcons 的翻译形式化规定可以精确且完整。它们也易于编写和阅读,并在语言演进时易于更新。PLanCompS 项目已经开发了大量 funcons 集合。每个 funcon 都使用一种模块化的结构化操作语义变体独立定义。这些定义可在线获取,并附有用于从中生成 funcon 解释器的工具。本文介绍 funcons 并说明其动机。文中举例说明语言构造到 funcons 的翻译以及 funcon 的定义。本文还将 funcons 与先前一些语言规定框架中使用的记法联系起来,包括 monadic semantics(单子语义)和 action semantics(动作语义)。

英文摘要:

When a new programming language appears, the syntax and intended behaviour of its programs need to be specified. The behaviour of each language construct can be concisely specified by translating it to fundamental constructs (funcons), compositionally. In contrast to the informal explanations commonly found in reference manuals, such formal specifications of translations to funcons can be precise and complete. They are also easy to write and read, and to update when the language evolves. The PLanCompS project has developed a large collection of funcons. Each funcon is defined independently, using a modular variant of structural operational semantics. The definitions are available online, along with tools for generating funcon interpreters from them. This paper introduces and motivates funcons. It illustrates translation of language constructs to funcons, and funcon definition. It also relates funcons to the notation used in some previous language specification frameworks, including monadic semantics and action semantics.

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

↑