Skip to main content

Parametric Polymorphism — Universally

  • Conference paper
  • First Online:
Logic, Language, Information, and Computation (WoLLIC 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9160))

Abstract

In the 1980s, John Reynolds postulated that a parametrically polymorphic function is an ad-hoc polymorphic function satisfying a uniformity principle. This allowed him to prove that his set-theoretic semantics has a relational lifting which satisfies the Identity Extension Lemma and the Abstraction Theorem. However, his definition (and subsequent variants) have only been given for specific models. In contrast, we give a model-independent axiomatic treatment by characterising Reynolds’ definition via a universal property, and show that the above results follow from this universal property in the axiomatic setting.

This work was partially supported by SICSA, and EPSRC grant EP/K023837/1.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 34.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 44.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    The category \(\mathsf {Rel}\) has as objects relations and as morphisms functions which preserve relatedness. This category will be introduced in detail in Sect. 2.

References

  1. Ahmed, A., Blume, M.: Typed closure conversion preserves observational equivalence. In: International Conference on Functional Programming, ICFP 2008, pp. 157–168. ACM (2008)

    Google Scholar 

  2. Ahmed, A., Dreyer, D., Rossberg, A.: State-dependent representation independence. In: Principles of Programming Languages, POPL 2009, pp. 340–353. ACM (2009)

    Google Scholar 

  3. Bezem, M., Coquand, T., Huber, S.: A model of type theory in cubical sets. In: Matthes, R., Schubert, A. (eds.) Types for Proofs and Programs (TYPES 2013). Leibniz International Proceedings in Informatics, vol. 26, pp. 107–128. Schloss Dagstuhl-Leibniz-Zentrum für Informatik, Germany (2014)

    Google Scholar 

  4. Birkedal, Lars, Møgelberg, R.E.: Categorical models for Abadi and Plotkin’s logic for parametricity. Math. Struct. Comput. Sci. 15, 709–772 (2005)

    Article  MATH  Google Scholar 

  5. Coquand, T., Huet, G.: The Calculus of Constructions. Inf. Comput. 76, 95–120 (1988)

    Article  MathSciNet  MATH  Google Scholar 

  6. Dreyer, D., Neis, G., Birkedal, L.: The impact of higher-order state and control effects on local relational reasoning. J. Funct. Program. 22(4–5), 477–528 (2012)

    Article  MathSciNet  MATH  Google Scholar 

  7. Dunphy, B., Reddy, U.S.: Parametric limits. In: Logic in Computer Science, LICS 2004, pp. 242–251. IEEE Computer Society (2004)

    Google Scholar 

  8. Girard, J.-Y., Taylor, P., Lafont, Y.: Proofs and Types. Cambridge University Press, Cambridge (1989)

    MATH  Google Scholar 

  9. Hermida, C.: Fibrations, logical predicates and indeterminates. Ph.D. thesis, University of Edinburgh (1993)

    Google Scholar 

  10. Hermida, C.: Fibrational relational polymorphism (2006). http://maggie.cs.queensu.ca/chermida/papers/FibRelPoly.pdf

  11. Hur, C.-K., Dreyer, D.: A Kripke logical relation between ML and assembly. In: Principles of Programming Languages, POPL 2011, pp. 133–146. ACM (2011)

    Google Scholar 

  12. Jacobs, B.: Categorical Logic and Type Theory. Number 141 in Studies in Logic and the Foundations of Mathematics. North Holland, Amsterdam (1999)

    MATH  Google Scholar 

  13. Johann, P., Ghani, N., Forsberg, F.N., Orsanigo, F., Revell, T.: Bifibrational functorial semantics of parametric polymorphism. Draft (2015). https://personal.cis.strath.ac.uk/federico.orsanigo/bifibParam.pdf

  14. Ma, Q.M., Reynolds, J.C.: Types, abstractions, and parametric polymorphism, part 2. In: Brookes, S., Main, M., Melton, A., Mislove, M., Schmidt, D. (eds.) Mathematical Foundations of Programming Semantics. LNCS, vol. 568, pp. 1–40. Springer, Berlin (1992)

    Chapter  Google Scholar 

  15. Pitts, A.M.: Polymorphism is set theoretic, constructively. In: Pitt, D.H., Poigné, A., Rydeheard, D.E. (eds.) Category Theory and Computer Science. LNCS, vol. 283, pp. 12–39. Springer, Berlin (1987)

    Chapter  Google Scholar 

  16. Reynolds, J.C.: Types, abstraction and parametric polymorphism. Inf. Process. 83, 513–523 (1983)

    Google Scholar 

  17. Reynolds, J.C.: Polymorphism is not set-theoretic. In: Kahn, G., MacQueen, D.B., Plotkin, G. (eds.) Semantics of Data Types. LNCS, vol. 173, pp. 145–156. Springer, Berlin (1984)

    Chapter  Google Scholar 

  18. Strachey, C.: Fundamental concepts in programming languages. Lecture Notes, International Summer School in Computer Programming, Copenhagen (1967). Published in Higher Order Symbolic Computation, 13(1–2), 11–49. Kluwer Academic Publishers (2000)

    Google Scholar 

  19. Tse, S., Zdancewic, S.: Translating dependency into parametricity. In: International Conference on Functional Programming, ICFP 2004, pp. 115–125. ACM (2004)

    Google Scholar 

  20. Wadler, P.: Theorems for free! In: Proceedings of the Fourth International Conference on Functional Programming Languages and Computer Architecture, FPCA 1989, pp. 347–359 (1989)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Federico Orsanigo .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Ghani, N., Forsberg, F.N., Orsanigo, F. (2015). Parametric Polymorphism — Universally. In: de Paiva, V., de Queiroz, R., Moss, L., Leivant, D., de Oliveira, A. (eds) Logic, Language, Information, and Computation. WoLLIC 2015. Lecture Notes in Computer Science(), vol 9160. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-662-47709-0_7

Download citation

  • DOI: https://doi.org/10.1007/978-3-662-47709-0_7

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-662-47708-3

  • Online ISBN: 978-3-662-47709-0

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics