Hostname: page-component-89b8bd64d-sd5qd Total loading time: 0 Render date: 2026-05-13T09:48:39.053Z Has data issue: false hasContentIssue false

A focused solution to the avoidance problem

Published online by Cambridge University Press:  06 August 2020

KARL CRARY*
Affiliation:
Carnegie Mellon University, Pittsburgh, PA, 15213, USA, (e-mail: crary@cs.cmu.edu)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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.

Information

Type
Research Article
Copyright
© The Author(s), 2020. Published by Cambridge University Press
Submit a response

Discussions

No Discussions have been published for this article.