一句话:提出以“静态到渐进嵌入完全抽象”作为渐进语言设计准则,并机器化验证 GTLC^μ 满足该性质。
渐进类型语言的设计质量如何评价?Siek 等人提出的 refined criteria 主要刻画语法与类型安全性质,却未说明静态语言中更丰富的语义推理原则(如 non-interference、parametricity)应如何在渐进化后保持。本文论证 Devriese 等人曾暗示的新准则:从静态语言到渐进语言的嵌入应当是完全抽象的(fully abstract),即所有源语言的等价关系都必须被保留,而非仅固定某个源类型解释。作者表明该准则能排除一些虽满足 refined criteria 却错误的渐进化方案,并报告一个机器化证明:STLC^μ(带等递归类型的简单类型 λ 演算)的自然渐进化 GTLC^μ 满足完全抽象性。这表明确保源语言保证的渐进语言设计可依此准则评估与指导。
What is a good gradual language? Siek et al. have previously proposed the refined criteria, a set of formal ideas that characterize a range of guarantees typically expected from a gradual language. While these go a long way, they are mostly focused on syntactic and type safety properties and fail to characterize how richer semantic properties and reasoning principles that hold in the static language, like non-interference or parametricity for instance, should be upheld in the gradualization. In this paper, we investigate and argue for a new criterion previously hinted at by Devriese et al.: the embedding from the static to the gradual language should be fully abstract. Rather than preserving an arbitrarily chosen interpretation of source language types, this criterion requires that all source language equivalences are preserved. We demonstrate that the criterion weeds out erroneous gradualizations that nevertheless satisfy the refined criteria. At the same time, we demonstrate that the criterion is realistic by reporting on a mechanized proof that the property holds for a standard example: GTLC µ , the natural gradualization of STLC µ , the simply typed lambda-calculus with equirecursive types. We argue thus that the criterion is useful for understanding, evaluating, and guiding the design of gradual languages, particularly those which are intended to preserve source language guarantees in a rich way.
@article{paperbot1200,
title = {Fully abstract from static to gradual},
author = {Koen Jacobs and Amin Timany and Dominique Devriese},
journal = {Proceedings of the ACM on Programming Languages},
volume = {5},
number = {POPL},
year = {2021},
doi = {10.1145/3434288}
}