## Erasure and Polymorphism in Pure Type Systems

Citations: | 1 - 0 self |

### BibTeX

@MISC{Linger_erasureand,

author = {Nathan Mishra Linger and Tim Sheard},

title = {Erasure and Polymorphism in Pure Type Systems},

year = {}

}

### OpenURL

### Abstract

Abstract. We introduce Erasure Pure Type Systems, an extension to Pure Type Systems with an erasure semantics centered around a type constructor ∀ indicating parametric polymorphism. The erasure phase is guided by lightweight program annotations. The typing rules guarantee that well-typed programs obey a phase distinction between erasable (compile-time) and non-erasable (run-time) terms. The erasability of an expression depends only on how its value is used in the rest of the program. Despite this simple observation, most languages treat erasability as an intrinsic property of expressions, leading to code duplication problems. Our approach overcomes this deficiency by treating erasability extrinsically. Because the execution model of EPTS generalizes the familiar notions of type erasure and parametric polymorphism, we believe functional programmers will find it quite natural to program in such a setting. 1

### Citations

1093 | Proof-carrying code
- Necula
- 1997
(Show Context)
Citation Context ...ved ever more expressive type systems. The drive towards increased expressiveness inevitably leads to dependent types, a proven technology for verifying strong correctness properties of real programs =-=[15,9, 5,8]-=-. For this reason, researchers have long sought practical ways to include dependent types in programming languages. Heavy use of the expressive power of dependent types involves the embedding of proof... |

518 | Lambda calculi with types
- Barendregt
- 1992
(Show Context)
Citation Context ...cation problem. We have one type A and therefore functions over A can be written once. Pure Type Systems (PTS) are a well-known family of typed λ-calculi that encompass a wide variety of type systems =-=[4]-=-. Most dependently typed languages have a PTS at their core. Therefore PTS is a good setting for studying features of dependently types languages. Section 2 briefly reviews the basics of PTS. 3 Some w... |

329 | Theorems for free
- Wadler
- 1989
(Show Context)
Citation Context ...f parametric polymorphism centered around a ∀ type constructor. Parametricity is a property of such languages enabling one to derive “free theorems” about polymorphic terms basedssolely on their type =-=[21]-=-. We conjecture that the ∀-types of EPTS satisfy parametricity properties similar to those of System F. Many studies of parametricity for System F are based on denotational semantics. It seems impossi... |

289 | Dependent types in practical programming
- Xi, Pfenning
- 1999
(Show Context)
Citation Context ... whereby types and program values may not depend on each other computationally. Singleton types are then used to simulate dependently typed programming. Examples of this approach include Dependent ML =-=[22]-=-, Ωmega [20,19], Applied Type Systems [7], and Haskell with generalized algebraic datatypes [16]. Singleton types are type families T:I → Type for which each type index i:I uniquely determines the one... |

226 | Formal certification of a compiler back-end or: programming a compiler with a proof assistant
- Leroy
- 2006
(Show Context)
Citation Context ...ved ever more expressive type systems. The drive towards increased expressiveness inevitably leads to dependent types, a proven technology for verifying strong correctness properties of real programs =-=[15,9, 5,8]-=-. For this reason, researchers have long sought practical ways to include dependent types in programming languages. Heavy use of the expressive power of dependent types involves the embedding of proof... |

216 | Cayenne–a language with dependent types
- Augustsson
- 1998
(Show Context)
Citation Context ...guages in this category start with full dependent types. An erasure phase then strips out parts of the program that are irrelevant to its run-time execution. Examples of this approach include Cayenne =-=[3]-=-, Coq [1], and Epigram [12,6]. In Cayenne and Coq, the erasability of a subterm depends on its type. All types, subterms of type Type, are erased in Cayenne and Epigram 3 . Coq’s program extraction me... |

157 | Simple unification-based type inference for GADTs
- Jones, Vytiniotis, et al.
- 2006
(Show Context)
Citation Context ...are then used to simulate dependently typed programming. Examples of this approach include Dependent ML [22], Ωmega [20,19], Applied Type Systems [7], and Haskell with generalized algebraic datatypes =-=[16]-=-. Singleton types are type families T:I → Type for which each type index i:I uniquely determines the one value of type T i. For example, the declarations datakind Nat↑ : kind where Zero↑ : Nat↑ Succ↑ ... |

153 |
The view from the left
- McBride, McKinna
(Show Context)
Citation Context ...art with full dependent types. An erasure phase then strips out parts of the program that are irrelevant to its run-time execution. Examples of this approach include Cayenne [3], Coq [1], and Epigram =-=[12,6]-=-. In Cayenne and Coq, the erasability of a subterm depends on its type. All types, subterms of type Type, are erased in Cayenne and Epigram 3 . Coq’s program extraction mechanism supports erasure of p... |

124 | A logic for parametric polymorphism
- Plotkin, Abadi
- 1993
(Show Context)
Citation Context ...ased on denotational semantics. It seems impossible to develop a semantic model for an arbitrary EPTS. We think a proof-theoretic approach is necessary, somehow generalizing existing work on System F =-=[18,2, 11]-=-. 9 Conclusions Languages combining dependent types with erasure semantics sometimes require users to maintain more than one copy of a datatype in order to ensure erasure of some of its values but not... |

108 |
Computation and Reasoning, A Type Theory for Computer Science
- Luo
- 1994
(Show Context)
Citation Context ...hat ∀-Intro and ∀-Elim are not syntax-directed.scalculus is modeled after Miquel’s Implicit Calculus of Constructions (ICC) [14, 13], a Curry-style variant of Luo’s Extended Calculus of Constructions =-=[10]-=-. ICC has a rich notion of subtype that nicely identifies Church encodings with various levels of type refinement. IPTS is both more and less general than ICC. It is more general because IPTS is defin... |

83 | Combining Programming with Theorem Proving
- Chen, Xi
- 2005
(Show Context)
Citation Context ...depend on each other computationally. Singleton types are then used to simulate dependently typed programming. Examples of this approach include Dependent ML [22], Ωmega [20,19], Applied Type Systems =-=[7]-=-, and Haskell with generalized algebraic datatypes [16]. Singleton types are type families T:I → Type for which each type index i:I uniquely determines the one value of type T i. For example, the decl... |

69 | Languages of the future
- Sheard
- 2004
(Show Context)
Citation Context ...es and program values may not depend on each other computationally. Singleton types are then used to simulate dependently typed programming. Examples of this approach include Dependent ML [22], Ωmega =-=[20,19]-=-, Applied Type Systems [7], and Haskell with generalized algebraic datatypes [16]. Singleton types are type families T:I → Type for which each type index i:I uniquely determines the one value of type ... |

62 | Formal verification of a C compiler front-end
- Blazy, Dargaye, et al.
- 2006
(Show Context)
Citation Context ...ved ever more expressive type systems. The drive towards increased expressiveness inevitably leads to dependent types, a proven technology for verifying strong correctness properties of real programs =-=[15,9, 5,8]-=-. For this reason, researchers have long sought practical ways to include dependent types in programming languages. Heavy use of the expressive power of dependent types involves the embedding of proof... |

43 |
proof irrelevance in modal type theory
- Intensionality
- 2001
(Show Context)
Citation Context ...e program, all free occurrences of x in M must appear either inside a type annotation or inside an @ c argument. The typing rules enforce this invariant using the following technique, due to Pfenning =-=[17]-=-. Each λ c -bound variable x is marked with c when it is added to the typing context. This mark is then locally switched off (reset) whenever we check a type annotation or @ c argument. We then requir... |

28 | Practical Implementation of a Dependently Typed Functional Programming Language
- Brady
- 2005
(Show Context)
Citation Context ...art with full dependent types. An erasure phase then strips out parts of the program that are irrelevant to its run-time execution. Examples of this approach include Cayenne [3], Coq [1], and Epigram =-=[12,6]-=-. In Cayenne and Coq, the erasability of a subterm depends on its type. All types, subterms of type Type, are erased in Cayenne and Epigram 3 . Coq’s program extraction mechanism supports erasure of p... |

27 | Outline of a proof theory of parametricity
- Mairson
- 1991
(Show Context)
Citation Context ...ased on denotational semantics. It seems impossible to develop a semantic model for an arbitrary EPTS. We think a proof-theoretic approach is necessary, somehow generalizing existing work on System F =-=[18,2, 11]-=-. 9 Conclusions Languages combining dependent types with erasure semantics sometimes require users to maintain more than one copy of a datatype in order to ensure erasure of some of its values but not... |

20 |
The Implicit Calculus of Constructions
- Miquel
- 2001
(Show Context)
Citation Context ...her PTS variant called Implicit Pure Type Systems (IPTS), that serves as the target language of the erasure phase. This language is very closely related to Miquel’s Implicit Calculus of Constructions =-=[13]-=-. Section 5 introduces our erasure translation from EPTS to IPTS. This operation is the basis for the erasure semantics of EPTS (Section 6). We prove that erasure exhibits properties one would expect:... |

19 |
Le Calcul des Constructions Implicite: Syntaxe et Sémantique. Theèses de Doctorat, Université
- Miquel
- 2001
(Show Context)
Citation Context ... ⊢ M : ∀x:A. B Γ ⊢ N : A Γ ⊢ M : B[N/x] Fig.3. Typing rules for IPTS. Note that ∀-Intro and ∀-Elim are not syntax-directed.scalculus is modeled after Miquel’s Implicit Calculus of Constructions (ICC) =-=[14, 13]-=-, a Curry-style variant of Luo’s Extended Calculus of Constructions [10]. ICC has a rich notion of subtype that nicely identifies Church encodings with various levels of type refinement. IPTS is both ... |

13 | Foundational typed assembly language with certified garbage collection
- Lin, McCreight, et al.
- 2007
(Show Context)
Citation Context |

4 |
and Emir Paˇsalić. Meta-programming with built-in type equality
- Sheard
- 2004
(Show Context)
Citation Context ...es and program values may not depend on each other computationally. Singleton types are then used to simulate dependently typed programming. Examples of this approach include Dependent ML [22], Ωmega =-=[20,19]-=-, Applied Type Systems [7], and Haskell with generalized algebraic datatypes [16]. Singleton types are type families T:I → Type for which each type index i:I uniquely determines the one value of type ... |