arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2411.12822cs.PL
收藏

使用合成受卫域论的渐近类型指称语义(扩展版)

Denotational Semantics of Gradual Typing using Synthetic Guarded Domain Theory (Extended Version)

Eric Giovannini, Tingting Ding, Max S. New

AI总结:

本文提出一种基于受卫域论的渐近类型指称语义,结合步进索引逻辑关系的通用性与指称语义的模块化,在简单 lambda 演算上证明了 beta-eta 等式有效性与渐近性定理,并在 Guarded Cubical Agda 中完成核心定理机械化,为渐近类型程序语义提供可重用的数学基础。

摘要:

渐近类型编程语言允许安全地混合静态和动态类型编程风格,为元理论家带来了严峻挑战。即使是最简单的可靠渐近类型语言也至少包含递归和错误,而现实中的语言还包含内存位置的运行时分配和动态类型标签。此外,渐近类型语言所期望的元理论性质变得越来越复杂:基于类型的等式推理的有效性,以及被称为渐近性的关系性质。许多近期工作致力于验证这些性质,但由此产生的数学推导高度重复且繁琐,很少有可重用的定理能在不同推导中保留。在这项工作中,我们提出了一种使用受卫域论开发的渐近类型新指称语义。受卫域论结合了用于建模高级编程特性的步进索引逻辑关系的通用性,以及指称语义的模块化和可重用性。我们通过对简单渐近类型 lambda 演算进行建模,证明了 beta-eta 等式的有效性和该指称模型的渐近性定理,从而展示了该方法的可行性。该模型应为渐近类型程序语义的可重用数学理论提供基础。最后,我们已在 Guarded Cubical Agda(Agda 的一个近期扩展,支持我们所使用的受卫递归构造)中将我们推导的大部分核心定理进行了机械化。

英文摘要:

Gradually typed programming languages, which allow for soundly mixing static and dynamically typed programming styles, present a strong challenge for metatheorists. Even the simplest sound gradually typed languages feature at least recursion and errors, with realistic languages featuring furthermore runtime allocation of memory locations and dynamic type tags. Further, the desired metatheoretic properties of gradually typed languages have become increasingly sophisticated: validity of type-based equational reasoning as well as the relational property known as graduality. Many recent works have tackled verifying these properties, but the resulting mathematical developments are highly repetitive and tedious, with few reusable theorems persisting across different developments. In this work, we present a new denotational semantics for gradual typing developed using guarded domain theory. Guarded domain theory combines the generality of step-indexed logical relations for modeling advanced programming features with the modularity and reusability of denotational semantics. We demonstrate the feasibility of this approach with a model of a simple gradually typed lambda calculus and prove the validity of beta-eta equality and the graduality theorem for the denotational model. This model should provide the basis for a reusable mathematical theory of gradually typed program semantics. Finally, we have mechanized most of the core theorems of our development in Guarded Cubical Agda, a recent extension of Agda with support for the guarded recursive constructions we use.

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

↑