Skip to main content
×
Home
    • Aa
    • Aa

Non-parametric parametricity

  • GEORG NEIS (a1), DEREK DREYER (a1) and ANDREAS ROSSBERG (a1)
Abstract
Abstract

Type abstraction and intensional type analysis are features seemingly at odds—type abstraction is intended to guarantee parametricity and representation independence, while type analysis is inherently non-parametric. Recently, however, several researchers have proposed and implemented “dynamic type generation” as a way to reconcile these features. The idea is that, when one defines an abstract type, one should also be able to generate at runtime a fresh type name, which may be used as a dynamic representative of the abstract type for purposes of type analysis. The question remains: in a language with non-parametric polymorphism, does dynamic type generation provide us with the same kinds of abstraction guarantees that we get from parametric polymorphism?

Our goal is to provide a rigorous answer to this question. We define a step-indexed Kripke logical relation for a language with both non-parametric polymorphism (in the form of type-safe cast) and dynamic type generation. Our logical relation enables us to establish parametricity and representation independence results, even in a non-parametric setting, by attaching arbitrary relational interpretations to dynamically generated type names. In addition, we explore how programs that are provably equivalent in a more traditional parametric logical relation may be “wrapped” systematically to produce terms that are related by our non-parametric relation, and vice versa. This leads us to develop a “polarized” variant of our logical relation, which enables us to distinguish formally between positive and negative notions of parametricity.

Copyright
Linked references
Hide All

This list contains references from the content that can be linked to their source. For a full set of references and notes please see the PDF or HTML where available.

A. W. Appel & D. McAllester (2001) An indexed model of recursive types for foundational proof-carrying code. ACM Trans. Program. Lang. Syst. 23 (5), 657683.

L. Birkedal & R. W. Harper (1999) Constructing interpretations of recursive types in an operational setting. Inf. Comput. 155, 363.

D. Grossman , G. Morrisett & S. Zdancewic (2000) Syntactic type abstraction. ACM Trans. Program. Lang. Syst. 22 (6), 10371080.

R. Harper & J. C. Mitchell (1999) Parametricity and variants of Girard's J operator. Inf. Process. Lett. 70 (1), 15.

J. C. Mitchell & G. D. Plotkin (1988) Abstract types have existential type. ACM Trans. Program. Lang. Syst. 10 (3), 470502.

E. Sumii & B. C. Pierce (2003) Logical relations for encryption. J. Comput. Secur. 11 (4), 521554.

E. Sumii & B. C. Pierce (2007a). A bisimulation for dynamic sealing. Theor. Comput. Sci. 375 (1–3), 161192.

E. Sumii & B. C. Pierce (2007b) A bisimulation for type abstraction and recursion. J. ACM 54 (5), 143.

Recommend this journal

Email your librarian or administrator to recommend adding this journal to your organisation's collection.

Journal of Functional Programming
  • ISSN: 0956-7968
  • EISSN: 1469-7653
  • URL: /core/journals/journal-of-functional-programming
Please enter your name
Please enter a valid email address
Who would you like to send this to? *
×

Metrics

Full text views

Total number of HTML views: 0
Total number of PDF views: 12 *
Loading metrics...

Abstract views

Total abstract views: 81 *
Loading metrics...

* Views captured on Cambridge Core between September 2016 - 19th September 2017. This data will be updated every 24 hours.