Abstract
Abstract
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.
Publisher
Cambridge University Press (CUP)
Reference52 articles.
1. Crary, K. (2018, July) Strong sums in focused logic. In Thirty-Third IEEE Symposium on Logic in Computer Science, pp. 265–274.
2. Harper, R. & Stone, C. (2000) A type-theoretic interpretation of Standard ML. In Proof, Language and Interaction: Essays in Honour of Robin Milner. MIT. Extended version published as CMU Technical Report CMU-CS-97-147, pp. 341–387.
3. Harper, R. , Mitchell, J. C. & Moggi, E. (1990, January) Higher-order modules and the phase distinction. In Seventeenth ACM Symposium on Principles of Programming Languages, pp. 341–354.
4. Biswas, S. K. (1995) Higher-order functors with transparent signatures. In Twenty-Second ACM Symposium on Principles of Programming Languages, pp. 154–163.
5. A framework for defining logics;Harper;J. ACM,1993
Cited by
3 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献