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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 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
Ahmed, A., Blume, M.: Typed closure conversion preserves observational equivalence. In: International Conference on Functional Programming, ICFP 2008, pp. 157–168. ACM (2008)
Ahmed, A., Dreyer, D., Rossberg, A.: State-dependent representation independence. In: Principles of Programming Languages, POPL 2009, pp. 340–353. ACM (2009)
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)
Birkedal, Lars, Møgelberg, R.E.: Categorical models for Abadi and Plotkin’s logic for parametricity. Math. Struct. Comput. Sci. 15, 709–772 (2005)
Coquand, T., Huet, G.: The Calculus of Constructions. Inf. Comput. 76, 95–120 (1988)
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)
Dunphy, B., Reddy, U.S.: Parametric limits. In: Logic in Computer Science, LICS 2004, pp. 242–251. IEEE Computer Society (2004)
Girard, J.-Y., Taylor, P., Lafont, Y.: Proofs and Types. Cambridge University Press, Cambridge (1989)
Hermida, C.: Fibrations, logical predicates and indeterminates. Ph.D. thesis, University of Edinburgh (1993)
Hermida, C.: Fibrational relational polymorphism (2006). http://maggie.cs.queensu.ca/chermida/papers/FibRelPoly.pdf
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)
Jacobs, B.: Categorical Logic and Type Theory. Number 141 in Studies in Logic and the Foundations of Mathematics. North Holland, Amsterdam (1999)
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
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)
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)
Reynolds, J.C.: Types, abstraction and parametric polymorphism. Inf. Process. 83, 513–523 (1983)
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)
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)
Tse, S., Zdancewic, S.: Translating dependency into parametricity. In: International Conference on Functional Programming, ICFP 2004, pp. 115–125. ACM (2004)
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)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights 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)