Compiling with Non-Parametric Polymorphism.

Abstract

There is a middle ground between parametric and ad-hoc polymorphism in which a computation can depend upon a type parameter but is restricted to being defined at all types in an inductive fashion. We call such polymorphism non-parametric. We show how non-parametric polymorphism can be used to implement a variety of useful language mechanisms including overloading, unboxed data representations in the presence of ML-style polymorphism, and canonical representations of equivalent types. We show that, by using a second-order, explicitly typed language extended with non-parametric operations, these mechanisms can be implemented without having to tag data with type information at runime. Furthermore, this approach retains a 'phase distinction' and permits static type checking and separate compilation. Our aim is to provide a unifying language, translation, and proof framework in which a variety of non-parametric mechanisms can be expressed and verified. (AN)

Open PDF

Document Details

Document Type
Technical Report
Publication Date
Feb 01, 1994
Accession Number
ADA290316

Entities

People

  • Greg Morrisett
  • Robert Harper

Organizations

  • Carnegie Mellon University

Tags

DTIC Thesaurus Topics

  • Abstracts
  • Calculus
  • Compilers
  • Complex Numbers
  • Computations
  • Computer Science
  • Computers
  • Conversion
  • Elimination
  • Judgment
  • Language
  • New Jersey
  • Operating Systems
  • Semantics
  • Standards
  • Test And Evaluation
  • Translations

Readers

  • Computational Linguistics
  • Statistical inference.