Encoding Intensional Type Analysis

  • Stephanie Weirich
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2028)

Abstract

Languages for intensional type analysis permit ad-hoc polymorphism, or run-time analysis of types. However, such languages require complex, specialized constructs to support this operation, which hinder optimization and complicate the meta-theory of these languages. In this paper, we observe that such specialized operators need not be intrinsic to the language, and in fact, their operation may be simulated through standard encodings of iteration in the polymorphic lambda calculus. Therefore, we may more easily add intensional analysis operators to complicated languages via translation, instead of language extension.

References

  1. 1.
    C. Böhm and A. Berarducci. Automatic synthesis of typed Λ-programs on term algebras. Theoretical Computer Science, 39:135–154, 1985.MATHCrossRefMathSciNetGoogle Scholar
  2. 2.
    Thierry Coquand. A new paradox in type theory. In Dag Prawitz, Brian Skyrms, and Dag Westerståhl, editors, Logic, methodology and philosophy of science IX: proceedings of the Ninth International Congress of Logic, Methodology, and Philosophy of Science, Uppsala, Sweden, August 7-14, 1991, Amsterdam, 1994. Elsevier.Google Scholar
  3. 3.
    Thierry Coquand and Christin Paulin. Inductively defined types. In P. Martin-Löf and G. Mints, editors, COLOG-88 International Conference on Computer Logic, volume 417 of Lecture Notes in Computer Science, pages 50–66, Tallinn, USSR, December 1988. Springer-Verlag.Google Scholar
  4. 4.
    Karl Crary and Stephanie Weirich. Flexible type analysis. In 1999 ACM International Conference on Functional Programming, pages 233–248, Paris, September 1999.Google Scholar
  5. 5.
    Karl Crary, Stephanie Weirich, and Greg Morrisett. Intensional polymorphism in type erasure semantics. In 1998 ACM International Conference on Functional Programming, volume 34 of ACM SIGPLAN Notices, pages 301–313, Baltimore, MD, September 1998. Extended Version is Cornell University Computer Science TR98-1721.CrossRefGoogle Scholar
  6. 6.
    Olivier Danvy. Type-directed partial evaluation. In Twenty-Third ACM Symposium on Principles of Programming Languages, January 1996.Google Scholar
  7. 7.
    Peter Dybjer. Inductive sets and families in Martin-Löf’s type theory and their set-theoretic semnatics. In Gerard Huet and Gordon Plotkin, editors, Logical Frameworks, pages 280–306. Prentice Hall, 1991.Google Scholar
  8. 8.
    Jean-Yves Girard. Interprétation fonctionelle et élimination des coupures de l’arithmétique d’ordre supérieur. PhD thesis, Université Paris VII, 1972.Google Scholar
  9. 9.
    Robert Harper and Greg Morrisett. Compiling polymorphism using intensional type analysis. In Twenty-Second ACM Symposium on Principles of Programming Languages, pages 130–141, San Francisco, January 1995.Google Scholar
  10. 10.
    A. J. C. Hurkens. A simplification of girard’s paradox. In Mariangiola Dezani-Ciancaglini and Gordon Plotkin, editors, Second International Conference on Typed Lambda Calculi and Applications, TLCA’ 95, volume 902 of Lecture Notes in Computer Science, Edinburgh, United Kingdom, April 1995. Springer-Verlag.Google Scholar
  11. 11.
    Lambert G. L. T. Meertens. Paramorphisms. Formal Aspects of Computing, 4(5):413–424, 1992.MATHCrossRefGoogle Scholar
  12. 12.
    E. Meijer, M.M. Fokkinga, and R. Paterson. Functional programming with bananas, lenses, envelopes and barbed wire. In FPCA91: Functional Programming Languages and Computer Architecture, volume 523 of Lecture Notes in Computer Science, pages 124–144. Springer-Verlag, 1991.Google Scholar
  13. 13.
    Paul Francis Mendler. Inductive Definition in Type Theory. PhD thesis, Department of Computer Science, Cornell University, Ithaca, New York, September 1987.Google Scholar
  14. 14.
    Robin Milner, Mads Tofte, Robert Harper, and David MacQueen. The Definition of Standard ML (Revised). The MIT Press, Cambridge, Massachusetts, 1997.Google Scholar
  15. 15.
    John C. Mitchell. Foundations for Programming Languages. The MIT Press, 1996.Google Scholar
  16. 16.
    C. Paulin-Mohring. Inductive definitions in the system Coq-rules and properties. In M. Bezem and J.-F. Groote, editors, Proceedings of the conference Typed Lambda Calculi and Applications, number 664 in Lecture Notes in Computer Science, 1993. LIP research report 92-49.CrossRefGoogle Scholar
  17. 17.
    Simon L. Peyton Jones and J. Hughes (editors). Report on the programming language Haskell 98, a non-strict purely functional language. Technical Report YALEU/DCS/RR-1106, Yale University, Department of Computer Science, February 1999. Available from http://www.haskell.org/definition/.
  18. 18.
    F. Pfenning and C. Paulin-Mohring. Inductively defined types in the Calculus of Constructions. In Proceedings of Mathematical Foundations of Programming Semantics, volume 442 of Lecture Notes in Computer Science. Springer-Verlag, 1990.Google Scholar
  19. 19.
    Gordon Plotkin and Martín Abadi. A logic for parametric polymorphism. In International Conference on Typed Lambda Calculi and Applications, pages 361–375, 1993.Google Scholar
  20. 20.
    John C. Reynolds. Polymorphism is not set-theoretic. In Proceedings of the International Symposium on Semantics of Data Types, volume 173 of Lecture Notes in Computer Science. Springer-Verlag, 1984.Google Scholar
  21. 21.
    Bratin Saha, Valery Trifonov, and Zhong Shao. Fully reflexive intensional type analysis in type erasure semantics. In Third Workshop on Types in Compilation, Montreal, September 2000.Google Scholar
  22. 22.
    Zdzisław Spławski and Paweł Urzyczyn. Type fixpoints: Iteration vs. recursion. In Fourth ACM International Conference on Functional Programming, pages 102–113, Paris, France, September 1999.Google Scholar
  23. 23.
    Valery Trifonov, Bratin Saha, and Zhong Shao. Fully reflexive intensional type analysis. In Fifth ACM International Conference on Functional Programming, pages 82–93, Montreal, September 2000. Extended version is YALEU/DCS/TR-1194.Google Scholar
  24. 24.
    Philip Wadler and Stephen Blott. How to make ad-hoc polymorphism less ad-hoc. In Sixteenth ACM Symposium on Principles of Programming Languages, pages 60–76. ACM, 1989.Google Scholar
  25. 25.
    Zhe Yang. Encoding types in ML-like languages. In 1998 ACM International Conference on Functional Programming, volume 34 of ACM SIGPLAN Notices, pages 289–300, Baltimore, MD, September 1998.CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Stephanie Weirich
    • 1
  1. 1.Department of Computer ScienceCornell University Ithaca

Personalised recommendations