当前位置: X-MOL 学术J. Funct. Program. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
A focused solution to the avoidance problem
Journal of Functional Programming ( IF 1.1 ) Pub Date : 2020-08-06 , DOI: 10.1017/s0956796820000222
KARL CRARY

In ML-style module type theory, sealing often leads to situations in which type variables must leave scope, and this creates a need for signatures that avoid such variables. Unfortunately, in general, there is no best signature that avoids a variable, so modules do not always enjoy principal signatures. This observation is called the avoidance problem. In the past, the problem has been circumvented using a variety of devices for moving variables so they can remain in scope. These devices work, but have heretofore lacked a logical foundation. They have also lacked a presentation in which the dynamic semantics is given on the same phrases as the static semantics, which limits their applications. We can provide a best supersignature avoiding a variable by fiat, by adding an existential signature that is the least upper bound of its instances. This idea is old, but a workable metatheory has not previously been worked out. This work resolves the metatheoretic issues using ideas borrowed from focused logic. We show that the new theory results in a type discipline very similar to the aforementioned devices used in prior work. In passing, this gives a type-theoretic justification for the generative stamps used in the early days of the static semantics of ML modules. All the proofs are formalized in Coq.

中文翻译:

回避问题的集中解决方案

在 ML 风格的模块类型理论中,密封通常会导致类型变量必须离开作用域的情况,这就需要避免此类变量的签名。不幸的是,一般来说,没有避免变量的最佳签名,因此模块并不总是享有主体签名。这种观察被称为回避问题。过去,该问题已通过使用各种移动变量的设备来规避,以便它们可以保持在范围内。这些设备有效,但迄今为止缺乏逻辑基础。他们还缺乏动态语义在与静态语义相同的短语上给出的表示,这限制了它们的应用。我们可以通过添加一个作为其实例的最小上限的存在签名来提供一个最佳的超级签名,从而避免使用法定变量。这个想法很古老,但以前没有制定出可行的元理论。这项工作使用从集中逻辑中借来的想法解决了元理论问题。我们表明,新理论产生的类型学科与之前工作中使用的上述设备非常相似。顺便,这为 ML 模块的静态语义早期使用的生成标记提供了类型理论的证明。所有的证明都在 Coq 中形式化。
更新日期:2020-08-06
down
wechat
bug