|
ABSTRACT
We study the &lamda;ΠΣS≤ calculus, which contains singleton types S(M) classifying terms of base type provably equivalent to the term M. The system includes dependent types for pairs and functions (Σ and Π) and a subtyping relation induced by regarding singletons as subtypes of the base type. The decidability of type checking for this language is non-obvious, since to type check we must be able to determine equivalence of well-formed terms. But in the presence of singleton types, the provability of an equivalence judgment Γ ⊢ M1 &eqiv;M2 : A can depend both on the typing context Γ and on the particular type A at which M1 and M2 are compared.We show how to prove decidability of term equivalence, hence of type checking, in &lamda;ΠΣS≤ by exhibiting a type-directed algorithm for directly computing normal forms. The correctness of normalization is shown using an unusual variant of Kripke logical relations organized around sets; rather than defining a logical equivalence relation, we work directly with (subsets of) the corresponding equivalence classes.We then provide a more efficient algorithm for checking type equivalence without constructing normal forms. We also show that type checking, subtyping, and all other judgments of the system are decidable.The &lamda;ΠΣS≤ calculus models type constructors and kinds in the intermediate language used by the TILT compiler for Standard ML to implement the SML module system. The decidability of &lamda;ΠΣS≤ term equivalence allows us to show decidability of type checking for TILT's intermediate language. We also obtain a consistency result that allows us to prove type safety for the intermediate language. The algorithms derived here form the core of the type checker used for internal type checking in TILT.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
| |
2
|
Aspinall, D. 1997. Type systems for modular programs and specifications. Ph.D. dissertation, Department of Computer Science, University of Edinburgh.
|
| |
3
|
|
| |
4
|
|
 |
5
|
|
 |
6
|
|
| |
7
|
|
| |
8
|
|
| |
9
|
Coquand, T., Pollack, R., and Takeyama, M. 2003. A logical framework with dependently typed records. In Proceedings of the Typed Lambda Calculi and Applications (TLCA 2003). 105--119. (Available as LNCS 2701). Lecture Notes in Computer Science, vol. 2701, Springer-Verlag, New York.
|
| |
10
|
Courant, J. 2002. Strong normalization with singleton types. In Proceedings of the Second Workshop on Intersection Types and Related Systems (ITRS '02). ENTCS, vol. 70.
|
 |
11
|
|
| |
12
|
Crary, K. 2000. Sound and complete elimination of singleton kinds. Tech. Rep. CMU-CS-00-104, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA.
|
| |
13
|
Crary, K. 2005. Logical relations and a case study in equivalence checking. In Advanced Topics in Types and Programming Languages, B. C. Pierce, Ed. MIT Press, Cambridge, MA.
|
| |
14
|
|
| |
15
|
|
| |
16
|
Girard, J. 1972. Interprétation fonctionnelle et élimination des coupures de l'arithmétique d'ordre supérieur. Ph.D. dissertation, Université Paris 7.
|
| |
17
|
Goguen, H. 1994. A typed operational semantics for type theory. Ph.D. dissertation, Department of Computer Science, University of Edinburgh. (Available as Technical Report ECS-LFCS-94-304).
|
 |
18
|
|
 |
19
|
|
 |
20
|
|
 |
21
|
|
| |
22
|
Harper, R. and Pfenning, F. 1999. On equivalence and canonical forms in the LF type theory. In Proceedings of the Workshop on Logical Frameworks and Meta-Languages. Extended version available as Tech. Rep. CMU-CS-99-159.
|
| |
23
|
Hofmann, M. 1995. Extensional concepts in intensional type theory. Ph.D. dissertation, Edinburgh LFCS. (Available as Edinburgh LFCS Technical Report ECS-LFCS-95-327).
|
 |
24
|
Xavier Leroy, Manifest types, modules, and separate compilation, Proceedings of the 21st ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.109-122, January 16-19, 1994, Portland, Oregon, United States
[doi> 10.1145/174675.176926]
|
 |
25
|
|
| |
26
|
Lillibridge, M. 1997. Translucent Sums: A Foundation for Higher-Order Module Systems. Ph.D. dissertation, School of Computer Science, Carnegie Mellon University. (Available as Technical Report) CMU-CS-97-122.
|
| |
27
|
Martin-Löf, P. 1984. Intuitionistic Type Theory. Bibliopolis-Napoli.
|
 |
28
|
Yasuhiko Minamide , Greg Morrisett , Robert Harper, Typed closure conversion, Proceedings of the 23rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.271-283, January 21-24, 1996, St. Petersburg Beach, Florida, United States
[doi> 10.1145/237721.237791]
|
| |
29
|
|
| |
30
|
Petersen, L., Cheng, P., Harper, R., and Stone, C. 2000. Implementing the TILT internal language. Tech. Rep. CMU-CS-00-180, School of Computer Science, Carnegie Mellon University, Pittsburgh, PA.
|
| |
31
|
|
| |
32
|
|
 |
33
|
|
| |
34
|
|
| |
35
|
Stone, C. A. 2005. Type definitions. In Proceedings of the Advanced Topics in Types and Programming Languages, B. C. Pierce, Ed. MIT Press, Cambridge, MA.
|
 |
36
|
|
| |
37
|
Stone, C. A. and Harper, R. 2004. Extensional equivalence and singleton types. Tech. Rep. HMC-CS-04-100, Computer Science Department, Harvey Mudd College.
|
 |
38
|
D. Tarditi , G. Morrisett , P. Cheng , C. Stone , R. Harper , P. Lee, TIL: a type-directed optimizing compiler for ML, Proceedings of the ACM SIGPLAN 1996 conference on Programming language design and implementation, p.181-192, May 21-24, 1996, Philadelphia, Pennsylvania, United States
|
|