Parametric polymorphism and operational equivalence

Studies of the mathematical properties of impredicative polymorphic types have for the most part focused on the polymorphic lambda calculus of Girard–Reynolds, which is a calculus of total polymorphic functions. This paper considers polymorphic types from a functional programming perspective, where the partialness arising from the presence of fixpoint recursion complicates the nature of potentially infinite (‘lazy’) data types. An approach to Reynolds' notion of relational parametricity is developed that works directly on the syntax of a programming language, using a novel closure operator to relate operational behaviour to parametricity properties of types. Working with an extension of Plotkin's PCF with ∀-types, lazy lists and existential types, we show by example how the resulting logical relation can be used to prove properties of polymorphic types up to operational equivalence.

[1]  J. Y. Girard,et al.  Interpretation fonctionelle et elimination des coupures dans l'aritmetique d'ordre superieur , 1972 .

[2]  John C. Reynolds,et al.  Towards a theory of type structure , 1974, Symposium on Programming.

[3]  G.D. Plotkin,et al.  LCF Considered as a Programming Language , 1977, Theor. Comput. Sci..

[4]  Robin Milner,et al.  Fully Abstract Models of Typed lambda-Calculi , 1977, Theor. Comput. Sci..

[5]  John C. Reynolds,et al.  Types, Abstraction and Parametric Polymorphism , 1983, IFIP Congress.

[6]  C. Pollard,et al.  Center for the Study of Language and Information , 2022 .

[7]  John C. Mitchell,et al.  Abstract types have existential types , 1985, POPL.

[8]  Corrado Böhm,et al.  Automatic Synthesis of Typed Lambda-Programs on Term Algebras , 1985, Theor. Comput. Sci..

[9]  Glynn Winskel,et al.  DI-Domains as a Model of Polymorphism , 1987, MFPS.

[10]  John C. Mitchell,et al.  Abstract types have existential type , 1988, TOPL.

[11]  Philip Wadler,et al.  Theorems for free! , 1989, FPCA.

[12]  J. Girard,et al.  Proofs and types , 1989 .

[13]  Glynn Winskel,et al.  Domain Theoretic Models of Polymorphism , 1989, Inf. Comput..

[14]  Samson Abramsky,et al.  The Lazy λ−Calculus , 1990 .

[15]  Andre Scedrov,et al.  Functorial Polymorphism , 1990, Theor. Comput. Sci..

[16]  Martín Abadi,et al.  A PER model of polymorphism and recursive types , 1990, [1990] Proceedings. Fifth Annual IEEE Symposium on Logic in Computer Science.

[17]  John C. Reynolds,et al.  Types, Abstractions, and Parametric Polymorphism, Part 2 , 1991, MFPS.

[18]  Carolyn L. Talcott,et al.  1 Equivalence in Functional Languages with E ectsIan , 2007 .

[19]  Ryu Hasegawa Parametricity of Extensionally Collapsed Term Models of Polymorphism and Their Categorical Properties , 1991, TACS.

[20]  Robert Hieb,et al.  The Revised Report on the Syntactic Theories of Sequential Control and State , 1992, Theor. Comput. Sci..

[21]  P. J. Freyd Applications of Categories in Computer Science: Remarks on algebraically compact categories , 1992 .

[22]  Martín Abadi,et al.  Formal parametric polymorphism , 1993, POPL '93.

[23]  John C. Reynolds,et al.  On Functors Expressible in the Polymorphic Typed Lambda Calculus , 1993, Inf. Comput..

[24]  Mark Lillibridge,et al.  Explicit polymorphism and CPS conversion , 1993, POPL '93.

[25]  J. B. Wells Typability and type checking in the second-order Λ-calculus are equivalent and undecidable (Preliminary Draft) , 1993 .

[26]  Martín Abadi,et al.  A Logic for Parametric Polymorphism , 1993, TLCA.

[27]  Dana S. Scott,et al.  A Type-Theoretical Alternative to ISWIM, CUCH, OWHY , 1993, Theor. Comput. Sci..

[28]  J. B. Wells,et al.  Typability and type checking in the second-order /spl lambda/-calculus are equivalent and undecidable , 1994, Proceedings Ninth Annual IEEE Symposium on Logic in Computer Science.

[29]  Ryu Hasegawa,et al.  Categorical data types in parametric polymorphism , 1994, Mathematical Structures in Computer Science.

[30]  Andrew D. Gordon Bisimilarity as a theory of functional programming , 1995, MFPS.

[31]  Andrew M. Pitts Reasoning about local variables with operationally-based logical relations , 1996, Proceedings 11th Annual IEEE Symposium on Logic in Computer Science.

[32]  Carolyn L. Talcott,et al.  From Operational Semantics to Domain Theory , 1996, Inf. Comput..

[33]  Robert Harper,et al.  A Type-Theoretic Account of Standard ML 1996 (Version 1). , 1996 .

[34]  John C. Mitchell,et al.  Foundations for programming languages , 1996, Foundation of computing series.

[35]  Andrew M. Pitts,et al.  Relational Properties of Domains , 1996, Inf. Comput..

[36]  Andrew Pitts,et al.  Semantics and Logics of Computation: Operationally-Based Theories of Program Equivalence , 1997 .

[37]  Lars Birkedal,et al.  Relational Interpretations of Recursive Types in an operational Setting (Summary) , 1997, TACS.

[38]  Roberto M. Amadio,et al.  Domains and lambda-calculi , 1998, Cambridge tracts in theoretical computer science.

[39]  Andrew M. Pitts Existential Types: Logical Relations and Operational Equivalence , 1998, ICALP.

[40]  Andrew D. Gordon Operational equivalences for untyped and polymorphic object calculi , 1999 .

[41]  MorrisettGreg,et al.  From system F to typed assembly language , 1999 .

[42]  Glynn Winskel,et al.  Relational Reasoning about Functions and Nondeterminism , 1999 .

[43]  I. Stark,et al.  Operational reasoning for functions with local state , 1999 .

[44]  Martín Abadi Top-top-closed Relations and Admissibility , 2000, Math. Struct. Comput. Sci..