Parametric polymorphism through run-time sealing or, theorems for low, low prices!

  • Authors:
  • Jacob Matthews;Amal Ahmed

  • Affiliations:
  • University of Chicago;Toyota Technological Institute at Chicago

  • Venue:
  • ESOP'08/ETAPS'08 Proceedings of the Theory and practice of software, 17th European conference on Programming languages and systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

We show how to extend System F's parametricity guarantee to a Matthews-Findler-style multi-language system that combines System F with an untyped language by use of dynamic sealing. While the use of sealing for this purpose has been suggested before, it has never been proven to preserve parametricity. In this paper we prove that it does using step-indexed logical relations. Using this result we show a scheme for implementing parametric higher-order contracts in an untyped setting which corresponds to a translation given by Sumii and Pierce. These contracts satisfy rich enough guarantees that we can extract analogues to Wadler's free theorems that rely on run-time enforcement of dynamic seals.