论文标题
抽象逐渐键入前进:精确和空间效率(技术报告)
Abstracting Gradual Typing Moving Forward: Precise and Space-Efficient (Technical Report)
论文作者
论文摘要
抽象渐进式键入(AGT)是设计逐渐使用的语言的系统方法。使用AGT开发的语言会自动满足Siek等人确定的渐进语言的正式语义标准。 [2015]。尽管如此,香草Agt语义仍然可以存在重要的缺点。首先,逐渐的语言的运行时检查应保留基础静态和动态语言固有的空间效率保证。相反,AGT的默认操作语义断开了适当的尾巴调用。其次,逐渐的语言的运行时检查应强制静态类型学科预期的基于基本模块化类型的基本类型的不变性。相反,AGT的默认操作语义可能无法以令人惊讶的方式执行一些不变性。我们在Garcia等人的$ \ text {gtfl} _ \ Lessim $语言中演示了这一点。 [2016]。 本文通过完善AGT动态检查的理论立即解决了这两个问题。 Garcia等。 [2016]观察到AGT涉及两种静态类型的抽象:一种用于静态语义,另一种用于动态语义。我们将后者作为对亚型本身的抽象解释,而渐进类型仍然抽象的静态类型。然后,我们展示了前进完整度[Giacobazzi和Quintarelli 2001]是支持空间有效执行和可靠的运行时类型执法的关键。
Abstracting Gradual Typing (AGT) is a systematic approach to designing gradually-typed languages. Languages developed using AGT automatically satisfy the formal semantic criteria for gradual languages identified by Siek et al. [2015]. Nonetheless, vanilla AGT semantics can still have important shortcomings. First, a gradual language's runtime checks should preserve the space-efficiency guarantees inherent to the underlying static and dynamic languages. To the contrary, the default operational semantics of AGT break proper tail calls. Second, a gradual language's runtime checks should enforce basic modular type-based invariants expected from the static type discipline. To the contrary, the default operational semantics of AGT may fail to enforce some invariants in surprising ways. We demonstrate this in the $\text{GTFL}_\lesssim$ language of Garcia et al. [2016]. This paper addresses both problems at once by refining the theory underlying AGT's dynamic checks. Garcia et al. [2016] observe that AGT involves two abstractions of static types: one for the static semantics and one for the dynamic semantics. We recast the latter as an abstract interpretation of subtyping itself, while gradual types still abstract static types. Then we show how forward-completeness [Giacobazzi and Quintarelli 2001] is key to supporting both space-efficient execution and reliable runtime type enforcement.