skip to main content
10.1145/1542476.1542509acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Typed self-representation

Published:15 June 2009Publication History

ABSTRACT

Self-representation -- the ability to represent programs in their own language -- has important applications in reflective languages and many other domains of programming language design. Although approaches to designing typed program representations for sublanguages of some base language have become quite popular recently, the question whether a fully metacircular typed self-representation is possible is still open. This paper makes a big step towards this aim by defining the Fω* calculus, an extension of the higher-order polymorphic lambda calculus Fω that allows typed self-representations. While the usability of these representations for metaprogramming is still limited, we believe that our approach makes a significant step towards a new generation of reflective languages that are both safe and efficient.

References

  1. T. Altenkirch and C. McBride. Generic programming within dependently typed programming. In Proceedings of the IFIP TC2/WG2.1 Working Conference on Generic Programming, pages 1--20. Kluwer, B.V., 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. B. Aydemir, A. Charguéraud, B.C. Pierce, R. Pollack, and S. Weirich. Engineering formal metatheory. In POPL '08, pages 3--15, New York, NY, USA, 2008. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. H.P. Barendregt. Lambda calculi with types. In Handbook of logic in computer science (vol. 2): background: computational structures, pages 117--309. Oxford University Press, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. S. Berardi. Towards a mathematical analysis of the Coquand-Huet calculus of constructions and the other systems in Barendregt's cube. Technical report, Department of Computer Science, Carnegie-Mellon University and Dipartimento Matematica, Universita di Torino, 1988.Google ScholarGoogle Scholar
  5. Y. Bertot and P. Castéran. Interactive Theorem Proving and Program Development, Coq'Art:The Calculus of Inductive Constructions. Springer-Verlag, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. C. Böhm and A. Berarducci. Automatic synthesis of typed lambda-programs on term algebras. Theor. Comput. Sci., 39:135--154, 1985.Google ScholarGoogle ScholarCross RefCross Ref
  7. J. Carette, O. Kiselyov, and C. Shan. Finally tagless, partially evaluated. In APLAS'07, extended version to appear in Journal of Functional Programming, pages 222--238. Springer LNCS 4807, 2007.Google ScholarGoogle Scholar
  8. T. Coquand. An analysis of Girard's paradox. In Symposium on Logic in Computer Science, pages 227--236. IEEE Computer Society Press, 1986.Google ScholarGoogle Scholar
  9. R. Davies and F. Pfenning. A modal analysis of staged computation. J. ACM, 48(3):555--604, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. N.G. de Bruijn. Lambda calculus notation with nameless dummies. a tool for automatic formula manipulation with application to the church-rosser theorem. Indagationes Mathematicae, 34:381--392, 1972.Google ScholarGoogle ScholarCross RefCross Ref
  11. L. Fegaras and T. Sheard. Revisiting catamorphisms over datatypes with embedded functions (or, programs from outer space). In POPL '96, pages 284--294. ACM, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. J.Y. Girard. Interprétation fonctionelle et élimination des coupures de l'arithmétique d'ordre supérieur. Thése de doctorat detat, Université de Paris VII, 1972.Google ScholarGoogle Scholar
  13. M. Hagiya. Meta-circular interpreter for a strongly typed language. J. Symb. Comput., 8(6):651--680, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. R. Harper and G. Morrisett. Compiling polymorphism using intensional type analysis. In POPL '95, pages 130--141. ACM, 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. R. Hinze, J. Jeuring, and A. Löh. Type-indexed data types. Sci. Comput. Program., 51(1--2):117--151, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Hofer, K. Ostermann, T. Rendel, and A. Moors. Polymorphic embedding of DSLs. In GPCE'08. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. K. Läufer and M. Odersky. Self-interpretation and reflection in a statically typed language. In Proc. OOPSLA Workshop on Reflection and Metalevel Architectures. ACM, Oct. 1993.Google ScholarGoogle Scholar
  18. J. McCarthy. Recursive functions of symbolic expressions and their computation by machine, part i. Commun. ACM, 3(4):184--195, 1960. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. A. Nanevski. Meta-programming with names and necessity. In ICFP, pages 206--217, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. F. Pfenning and C. Elliot. Higher-order abstract syntax. In PLDI '88, pages 199--208. ACM, 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. F. Pfenning and P. Lee. Metacircularity in the polymorphic lambda-calculus. Theoretical Computer Science, 89(1):137--159, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Pfenning and C. Paulin-Mohring. Inductively defined types in the calculus of constructions. In Proceedings of the 5th International Conference on Mathematical Foundations of Programming Semantics, pages 209--228. Springer-Verlag, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. M.B. Reinhold. Typechecking is undecidable when 'type' is a type. Technical report, Massachusetts Institute of Technology, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. J.C. Reynolds. Definitional interpreters for higher-order programming languages. In ACM '72: Proceedings of the ACM annual conference, pages 717--740. ACM, 1972. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. J.M. Siskind and B.A. Pearlmutter. First-class nonstandard interpretations by opening closures. In POPL '07, pages 71--76. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. B.C. Smith. Reflection and semantics in LISP. In POPL '84, pages 23--35. ACM, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. G.L. Steele. Growing a language. Higher-Order and Symbolic Computation, 12(3):221--236, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. W. Taha, Z. Benaissa, and T. Sheard. Multi-stage programming: Axiomatization and type-safety. In In 25th International Colloquium on Automata, Languages, and Programming, pages 918--929. Springer-Verlag, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. J. Terlouw. Een nadere bewijstheoretische analyse van GSTT's. Technical report, Department of Computer Science, Catholic University, Nijmegen, The Netherlands, 1989.Google ScholarGoogle Scholar
  30. G. Washburn and S. Weirich. Boxes go bananas: Encoding higher-order abstract syntax with parametric polymorphism*. J. Funct. Program., 18(1):87--140, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Typed self-representation

      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
      • Published in

        cover image ACM Conferences
        PLDI '09: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation
        June 2009
        492 pages
        ISBN:9781605583921
        DOI:10.1145/1542476
        • cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 6
          PLDI '09
          June 2009
          478 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1543135
          Issue’s Table of Contents

        Copyright © 2009 ACM

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 15 June 2009

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • research-article

        Acceptance Rates

        Overall Acceptance Rate406of2,067submissions,20%

      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!