skip to main content
10.1145/1111037.1111060acmconferencesArticle/Chapter ViewAbstractPublication PagespoplConference Proceedingsconference-collections
Article

A polymorphic modal type system for lisp-like multi-staged languages

Published:11 January 2006Publication History

ABSTRACT

This article presents a polymorphic modal type system and its principal type inference algorithm that conservatively extend ML by all of Lisp's staging constructs (the quasi-quotation system). The combination is meaningful because ML is a practical higher-order, impure, and typed language, while Lisp's quasi-quotation system has long evolved complying with the demands from multi-staged programming practices. Our type system supports open code, unrestricted operations on references, intentional variable-capturing substitution as well as capture-avoiding substitution, and lifting values into code, whose combination escaped all the previous systems.

References

  1. D. Ancona and E. Moggi. A fresh calculus for name management. In Proceedings of the International Conference on Generative Programming and Component Engineering, October 2004.Google ScholarGoogle ScholarCross RefCross Ref
  2. Cristiano Calcagno, Eugenio Moggi, and Tim Sheard. Closed types for a safe imperative MetaML. Journal of Functional Programming, 13(3), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Cristiano Calcagno, Eugenio Moggi, and Walid Taha. ML-like inference for classifiers. In Proceedings of the European Symposium on Programming 2004, pages 79--93. Springer, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  4. Chiyan Chen and Hongwei Xi. Meta-programming through typeful code representation. In Proceedings of the International Conference on Functional Programming (ICFP '02), pages 275--286. ACM, August 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Olivier Danvy. Type-directed partial evaluation. In Proceedings of the Symposium on Principles of Programming Languages, pages 242--257. ACM, Jan 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Rowan Davies. A temporal-logic approach to binding-time analysis. In Proceedings of the Symposium on Logic in Computer Science (LICS '96), pages 184--195. IEEE Computer Society Press, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Rowan Davies and Frank Pfenning. A modal analysis of staged computation. In Proceedings of the Symposium on Principles of Programming Languages (POPL '96), pages 258--270. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Rowan Davies and Frank Pfenning. A modal analysis of staged computation. Journal of the ACM, 48(3):555--604, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Dawson R. Engler. VCODE: A retargetable, extensible, very fast dynamic code generation system. In Proceedings of the Conference on Programming Language Design and Implementation, pages 160--170, New York, 1996. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Paul Graham. On Lisp: an advanced techniques for Common Lisp. Prentice Hall, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Robert Harper. A simplified account of polymorphic references. Information Processing Letters, 51:201--206, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Neil D. Jones, Carsten K. Gomard, and Peter Sestoft. Partial evaluation and automatic program generation. Prentice-Hall, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Ik-Soon Kim, Kwangkeun Yi, and Cristiano Calcagno. A polymorphic modal type system for Lisp-like multi-staged languages. Technical Report ROPAS-2005-26, (ropas.snu.ac.kr/lib/dock/KiYiCa2005.pdf), 2005.Google ScholarGoogle Scholar
  14. Eugene Kohlbecker, Daniel P. Friedman, Matthias Felleisen, and Bruce Duba. Hygienic macro expansion. In Proceedings of the 1986 ACM Conference on LISP and functional programming, pages 151--161. ACM, August 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. M. Leone and Peter Lee. Optimizing ML with run-time code generation. In Proceedings of the ACM SIGPLAN'96 Conference on Programming Language Design and Implementation, pages 137--148. ACM Press, June 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. H. Massalim. An Efficient Implementation of Functional Operating System Services. PhD thesis, Columbia University, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Aleksandar Nanevski. Meta-programming with names and necessity. In Proceedings of the International Conference on Functional Programming (ICFP '02), pages 206--217. ACM, October 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Aleksandar Nanevski and Frank Pfenning. Staged computation with names and necessity. to appear in Journal of Functional Programming. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Massimilian Poletto, Wilson C. Hsieh, Dawson R. Engler, and M. Frans Kasshoek. C and tcc:a language and compiler for dynamic code generation. ACM Transactions on Programming Languages and Systems, 21:324--369, March 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Didier Rémy. Syntactic theories and the algebra of record terms. Research Report 1869, Institut National de Recherche en Informatique et Automatisme, Rocquencourt, BP 105, 78 153 Le Chesnay Cedex, France, 1993.Google ScholarGoogle Scholar
  21. Didier Rémy. Type inference for records in a natural extension of ML. In Carl A. Gunter and John C. Mitchell, editors, Theoretical Aspects Of Object-Oriented Programming. Types, Semantics and Language Design. MIT Press, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Morten Rhiger. First-class open and closed code fragments. In Proceedings of the Sixth Symposium on Trends in Functional Programming, September 2005.Google ScholarGoogle Scholar
  23. Guy L. Steele. Common Lisp the Language, 2nd edition. Digital Press, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Walid Taha. Multi-Stage Programming: Its Theory and Applications. PhD thesis, Oregon Graduate Institute of Science and Technology, November 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Walid Taha and Michael Florentin Nielsen. Environment classifiers. In Proceedings of the Symposium on Principles of Programming Languages (POPL '03). ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. B. Wells. The essence of principal typings. In Proceedings of the 29th International Colloquium on Automata, Languages and Programming, pages 913--925. Springer-Verlag, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Andrew K. Wright. Simple imperative polymorphism. Lisp and Symbolic Computation, 8(4):343--355, Dec 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A polymorphic modal type system for lisp-like multi-staged languages

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!