Abstract
Singleton kinds provide an elegant device for expressing type equality information resulting from modern module languages, but they can complicate the metatheory of languages in which they appear. I present a translation from a language with singleton kinds to one without, and prove this translation to be sound and complete. This translation is useful for type-preserving compilers generating typed target languages. The proof of soundness and completeness is done by normalizing type equivalence derivations using Stone and Harper's type equivalence decision procedure.
- Aspinall, D. 1994. Subtyping with singleton types. In Proceedings of the 8th International Workshop on Computer Science Logic (Kazimierz, Poland). Lecture Notes in Computer Science, vol. 933. Springer Verlag. 1--15. Google ScholarDigital Library
- Crary, K. and Weirich, S. 1999. Flexible type analysis. In Proceedings of the ACM International Conference on Functional Programming (Paris). 233--248. Google ScholarDigital Library
- Crary, K., Weirich, S., and Morrisett, G. 2002. Intensional polymorphism in type-erasure semantics. J. Function. Programm. 12, 6 (Nov.), 567--600. Google ScholarDigital Library
- Dreyer, D., Crary, K., and Harper, R. 2003. A type system for higher-order modules. In Proceedings of the 30th ACM Symposium on Principles of Programming Languages (New Orleans, LA). 236--249. Google ScholarDigital Library
- Harper, R. and Lillibridge, M. 1994. A type-theoretic approach to higher-order modules with sharing. In Proceedings of the 21st ACM Symposium on Principles of Programming Languages (Portland, OR). 123--137. Google ScholarDigital Library
- Harper, R., Mitchell, J. C., and Moggi, E. 1990. Higher-Order modules and the phase distinction. In Proceedings of the 17th ACM Symposium on Principles of Programming Languages (San Francisco). 341--354. Google ScholarDigital Library
- Harper, R. and Morrisett, G. 1995. Compiling polymorphism using intensional type analysis. In Proceedings of the 22nd ACM Symposium on Principles of Programming Languages (San Francisco). 130--141. Google ScholarDigital Library
- Harper, R. and Stone, C. 2000. A type-theoretic interpretation of standard ML. In Proof, Language and Interaction: Essays in Honour of Robin Milner. MIT Press, Cambridge, MA. Extended version published as CMU Tech. Rep. CMU-CS-97-147. Google ScholarDigital Library
- Leroy, X. 1994. Manifest types, modules and separate compilation. In Proceedings of the 21st ACM Symposium on Principles of Programming Languages (Portland, OR). 109--122. Google ScholarDigital Library
- Leroy, X. 1995. Applicative functors and fully transparent higher-order modules. In Proceedings of the 22nd ACM Symposium on Principles of Programming Languages (San Francisco). Google ScholarDigital Library
- Leroy, X. 2000. A modular module system. J. Function. Programm. 10, 3. Google ScholarDigital Library
- Lillibridge, M. 1997. Translucent sums: A foundation for higher-order module systems. Ph.D. thesis, School of Computer Science, Carnegie Mellon University, Pittsburgh, Pennsylvania.Google Scholar
- Martin-Löf, P. 1975. An intuitionistic theory of types: Predicative part. In Proceedings of the Logic Colloquium, 1973. Studies in Logic and the Foundations of Mathematics, vol. 80. North-Holland, Amsterdam. 73--118.Google ScholarCross Ref
- Minamide, Y., Morrisett, G., and Harper, R. 1996. Typed closure conversion. In Proceedings of the 23rd ACM Symposium on Principles of Programming Languages (St. Petersburg, FL). 271--283. Google ScholarDigital Library
- Morrisett, G., Crary, K., Glew, N., and Walker, D. 2002. Stack-Based typed assembly language. J. Function. Programm. 12, 1 (Jan.), 43--88. Google ScholarDigital Library
- Morrisett, G., Walker, D., Crary, K., and Glew, N. 1999. From System F to typed assembly language. ACM Trans. Program. Lang. Syst. 21, 3 (May), 527--568. Google ScholarDigital Library
- Shao, Z. 1998. Typed cross-module compilation. In Proceedings of the ACM International Conference on Functional Programming (Baltimore, MD). 141--152. Google ScholarDigital Library
- Shao, Z. 1999. Transparent modules with fully syntactic signatures. In Proceedings of the ACM International Conference on Functional Programming (Paris). 220--232. Google ScholarDigital Library
- Shao, Z., League, C., and Monnier, S. 1998. Implementing typed intermediate languages. In Proceedings of the ACM International Conference on Functional Programming (Baltimore, MD). 313--323. Google ScholarDigital Library
- Shao, Z., Saha, B., Trifonov, V., and Papaspyrou, N. 2002. A type system for certified binaries. In Proceedings of the 29th ACM Symposium on Principles of Programming Languages (Portland, OR). 217--232. Google ScholarDigital Library
- Smith, F., Walker, D., and Morrisett, G. 2000. Alias types. In European Symposium on Programming (Berlin).Google Scholar
- Stone, C. and Harper, R. 2004. Personal communciation.Google Scholar
- Stone, C. A. and Harper, R. 2000. Deciding type equivalence in a language with singleton kinds. In Proceedings of the 27th ACM Symposium on Principles of Programming Languages (Boston, MA). Extended version published as CMU Tech. Rep. CMU-CS-99-155. Google ScholarDigital Library
- Walker, D., Crary, K., and Morrisett, G. 2000. Typed memory management via static capabilities. ACM Trans. Program. Lang. Syst. 22, 4 (July). Google ScholarDigital Library
Index Terms
- Sound and complete elimination of singleton kinds
Recommendations
Extensional equivalence and singleton types
We study the λΠΣ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 ...
Sound and Complete Elimination of Singleton Kinds
TIC '00: Selected papers from the Third International Workshop on Types in CompilationSingleton kinds provide an elegant device for expressing type equality information resulting from modern module languages, but they can complicate the metatheory of languages in which they appear. I present a translation from a language with singleton ...
Dynamic Translucency with Abstraction Kinds and Higher-Order Coercions
When a module language is combined with forms of non-parametric type analysis, abstract types require an opaque dynamic representation in order to maintain abstraction safety. As an idealisation of such a module language, we present a foundational ...
Comments