skip to main content
10.1145/317636.317787acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article
Free Access

A simple proof technique for certain parametricity results

Published:01 September 1999Publication History

ABSTRACT

Many properties of parametric, polymorphic functions can be determined simply by inspection of their types. Such results are usually proven using Reynolds's parametricity theorem. However, Reynolds's theorem can be difficult to show in some settings, particularly ones involving computational effects. I present an alternative technique for proving some parametricity results. This technique is considerably simpler and easily generalizes to effectful settings. It works by instantiating polymorphic functions with singleton types that fully specify the behavior of the functions. Using this technique, I show that callers' stacks are protected from corruption during function calls in Typed Assembly Language programs.

References

  1. 1.Luca Cardelli, Simone Martini, John C. Mitchell, and Andre Scedrov. An extension of system F with subtyping. In Theoretical Aspects of Computer Software 1991, volume 526 of Lecture Notes in Computer Science, pages 750-770, Sendai, Japan, 1991. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. 2.Andrew J. Kennedy. Relational parametricity and units of measure. In Twenty-Fourth A CM Symposium on Principles of Programming Languages, pages 442-455, Paris, January 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. 3.QingMing Ma. Parametricity as subtyping. In Nineteenth A CM Symposium on Principles of Programming Languages, pages 281-292, Albuquerque, New Mexico, January 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 4.QingMing Ma and John C. Reynolds. Types, abstraction, and parametric polymorphism, part 2. In Seventh Mathematical Foundations o/Programming Semantics, volume 598 of Lecture Notes in Computer Science, pages 1-40, Pittsburgh, Pennsylvania, March 1991. Sprlnger-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. 5.Greg Morrisett, Karl Crary, Neal Glew, and David Walker. Stack-based typed assembly language. In Second Workshop on Types in Compilation, voI- ume 1473 of Lecture Notes in Computer Science. Springer-Verlag, March 1998. Extended version published as CMU technical report CMU-CS-98- 178. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. 6.Greg Morrisett, David Walker, Karl Crary, and Neal Glew. From System F to typed assembly language. A CM Transactions on Programming Languages and Systems, 1999. To appear. An earlier version appeared in the 1998 Symposium on Principles of Programming Languages. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 7.Peter W. O'Hearn and Robert D. Tennent. Parametricity and local variables. Journal of the A CM, 42(3):658-709, May 1995. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. 8.Gordon Plotkin and Martin Abadi. A logic for parametric polymorphism. In International Conference on Typed Lambda Calculi and Applications, pages 361-375, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 9.Gordon Plotkin, Martin Abadi, and Luca Cardelli. Subtyping and parametricity. In Ninth IEEE Symposium on Logic in Computer Science, pages 310- 319, July 1994.Google ScholarGoogle ScholarCross RefCross Ref
  10. 10.John C. Reynolds. Types, abstraction and parametric polymorphism. In information Processing '83, pages 513-523. North-Holland, 1983. Proceedings of the IFIP 9th World Computer Congress.Google ScholarGoogle Scholar
  11. 11.Chistopher Strachey. Fundamental concepts in programming languages. Lecture Notes, International Summer School in Computer Programming, Copenhagen, August 1967.Google ScholarGoogle Scholar
  12. 12.Philip Wadler. Theorems for free! In Fourth Conference on Functional Programming Languages and Computer Architecture, London, September 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. 13.Andrew K. Wright and Matthias Felleisen. A syntactic approach to type soundness. Information and Computation, 115:38-94, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A simple proof technique for certain parametricity results

      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
        ICFP '99: Proceedings of the fourth ACM SIGPLAN international conference on Functional programming
        September 1999
        288 pages
        ISBN:1581131119
        DOI:10.1145/317636
        • Chairmen:
        • Didier Rémy,
        • Peter Lee

        Copyright © 1999 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 1 September 1999

        Permissions

        Request permissions about this article.

        Request Permissions

        Check for updates

        Qualifiers

        • Article

        Acceptance Rates

        ICFP '99 Paper Acceptance Rate25of81submissions,31%Overall Acceptance Rate333of1,064submissions,31%

        Upcoming Conference

        ICFP '24

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader