Results 1  10
of
13
Irrelevance in Type Theory with a Heterogeneous Equality Judgement
"... Abstract. Dependently typed programs contain an excessive amount of static terms which are necessary to please the type checker but irrelevant for computation. To obtain reasonable performance of not only the compiled program but also the type checker such static terms need to be erased as early as ..."
Abstract

Cited by 7 (1 self)
 Add to MetaCart
Abstract. Dependently typed programs contain an excessive amount of static terms which are necessary to please the type checker but irrelevant for computation. To obtain reasonable performance of not only the compiled program but also the type checker such static terms need to be erased as early as possible, preferably immediately after type checking. To this end, Pfenning’s type theory with irrelevant quantification, that models a distinction between static and dynamic code, is extended to universes and large eliminations. Novel is a heterogeneously typed implementation of equality which allows the smooth construction of a universal Kripke model that proves normalization, consistency and decidability.
Equality proofs and deferred type errors: a compiler pearl
 In ICFP
, 2012
"... The Glasgow Haskell Compiler is an optimizing compiler that expresses and manipulates firstclass equality proofs in its intermediate language. We describe a simple, elegant technique that exploits these equality proofs to support deferred type errors. The technique requires us to treat equality pro ..."
Abstract

Cited by 5 (0 self)
 Add to MetaCart
The Glasgow Haskell Compiler is an optimizing compiler that expresses and manipulates firstclass equality proofs in its intermediate language. We describe a simple, elegant technique that exploits these equality proofs to support deferred type errors. The technique requires us to treat equality proofs as possiblydivergent terms; we show how to do so without losing either soundness or the zerooverhead cost model that the programmer expects.
Dependent types and program equivalence
 In Proceedings of the 37th ACM SIGACTSIGPLAN Symposium on Principles of Programming Languages (POPL). ACM
, 2009
"... The definition of type equivalence is one of the most important design issues for any typed language. In dependentlytyped languages, because terms appear in types, this definition must rely on a definition of term equivalence. In that case, decidability of type checking requires decidability for the ..."
Abstract

Cited by 3 (1 self)
 Add to MetaCart
The definition of type equivalence is one of the most important design issues for any typed language. In dependentlytyped languages, because terms appear in types, this definition must rely on a definition of term equivalence. In that case, decidability of type checking requires decidability for the term equivalence relation. Almost all dependentlytyped languages require this relation to be decidable. Some, such as Coq, Epigram or Agda, do so by employing analyses to force all programs to terminate. Conversely, others, such as DML, ATS, Ωmega, or Haskell, allow nonterminating computation, but do not allow those terms to appear in types. Instead, they identify a terminating index language and use singleton types to connect indices to computation. In both cases, decidable type checking comes at a cost, in terms of complexity and expressiveness. Conversely, the benefits to be gained by decidable type checking are modest. Termination analyses allow dependently typed programs to verify total correctness properties. However, decidable type checking is not a prerequisite for type safety. Furthermore, decidability does not imply tractability. A decidable approximation of program equivalence may not be useful in practice. Therefore, we take a different approach: instead of a fixed notion for term equivalence, we parameterize our type system with an abstract relation that is not necessarily decidable. We then design a novel set of typing rules that require only weak properties of this abstract relation in the proof of the preservation and progress lemmas. This design provides flexibility: we compare valid instantiations of term equivalence which range from betaequivalence, to contextual equivalence, to some exotic equivalences.
Practical aspects of evidencebased compilation in System FC
"... System FC is an explicitly typed language that serves as the target language for Haskell source programs. System FC is based on System F with the addition of erasable but explicit type equality proof witnesses. This paper improves FC in two directions: The first contribution is extending termlevel ..."
Abstract

Cited by 2 (0 self)
 Add to MetaCart
System FC is an explicitly typed language that serves as the target language for Haskell source programs. System FC is based on System F with the addition of erasable but explicit type equality proof witnesses. This paper improves FC in two directions: The first contribution is extending termlevel functions with the ability to return equality proof witnesses, which allows the smooth integration of equality superclasses and indexed constraint synonyms, features currently absent from Haskell. We show how to ensure soundness and satisfy the zerocost requirement for equality witnesses using a familiar mechanism, already present in GHC: that of unlifted types. Our second contribution is an equality proof simplification algorithm, which greatly reduces the size of the target System FC terms.
Termination Casts: A Flexible Approach to Termination with General Recursion
"... This paper proposes a typeandeffect system called T eq ↓ , which distinguishes terminating terms and total functions from possibly diverging terms and partial functions, for a lambda calculus with general recursion and equality types. The central idea is to include a primitive typeform “Terminate ..."
Abstract

Cited by 2 (2 self)
 Add to MetaCart
This paper proposes a typeandeffect system called T eq ↓ , which distinguishes terminating terms and total functions from possibly diverging terms and partial functions, for a lambda calculus with general recursion and equality types. The central idea is to include a primitive typeform “Terminates t”, expressing that term t is terminating; and then allow terms t to be coerced from possibly diverging to total, using a proof of Terminates t. We call such coercions termination casts, and show how to implement terminating recursion using them. For the metatheory of the system, we describe a translation from T eq ↓ to a logical theory of termination for general recursive, simply typed functions. Every typing judgment of T eq ↓ is translated to a theorem expressing the appropriate termination property of the computational part of the T eq ↓ term. 1
Universe Subtyping in MartinLöf Type Theory Internship Report
"... The pragmatic goal of this internship was to establish the theoretical soundness of a particular feature of the Agda proof assistant, the socalled universe polymorphism. This is part of a series of work by my supervisor Andreas Abel [ACD07] aiming to provide a coherent metatheory for the different ..."
Abstract

Cited by 1 (0 self)
 Add to MetaCart
The pragmatic goal of this internship was to establish the theoretical soundness of a particular feature of the Agda proof assistant, the socalled universe polymorphism. This is part of a series of work by my supervisor Andreas Abel [ACD07] aiming to provide a coherent metatheory for the different features implemented or desired in this proof assistant. More precisely, we first considered universe cumulativity, a wellknown feature for universe hierarchy, then universe polymorphism, which is a less explored area, and finally attempted to add irrelevance to the type system, to ease universe levels manipulations. All those notions will be introduced in more detail in the first section. I will highlight the main goals and constraints of the desired theory, in comparison to related works. I will also have to discuss some of the technical choices and issues we have faced; those technical decisions have large consequences – often unforeseen – on the technical development and its structure. The second section will describe the formal type system – or type systems, as we will consider variants – used throughout the report. To this declarative type
Equality, QuasiImplicit Products, and Large Eliminations
"... This paper presents a type theory with a form of equality reflection: provable equalities can be used to coerce the type of a term. Coercions and other annotations, including implicit arguments, are dropped during reduction of terms. We develop the metatheory for an undecidable version of the system ..."
Abstract
 Add to MetaCart
This paper presents a type theory with a form of equality reflection: provable equalities can be used to coerce the type of a term. Coercions and other annotations, including implicit arguments, are dropped during reduction of terms. We develop the metatheory for an undecidable version of the system with unannotated terms. We then devise a decidable system with annotated terms, justified in terms of the unannotated system. Finally, we show how the approach can be extended to account for large eliminations, using what we call quasiimplicit products. 1
Type Systems for Dummies
"... We extend Pure Type Systems with a function turning each term M of type A into a dummy ∣M ∣ of the same type ( ∣ ⋅ ∣ is not an identity, in that M ≠ ∣M∣). Intuitively, a dummy represents an unknown, canonical object of the given type: dummies are opaque (cannot be internally inspected), and irrele ..."
Abstract
 Add to MetaCart
We extend Pure Type Systems with a function turning each term M of type A into a dummy ∣M ∣ of the same type ( ∣ ⋅ ∣ is not an identity, in that M ≠ ∣M∣). Intuitively, a dummy represents an unknown, canonical object of the given type: dummies are opaque (cannot be internally inspected), and irrelevant in the sense that dummies of a same type are convertible to each other. This latter condition makes convertibility in PTS with dummies (DPTS) stronger than usual, hence raising not trivial consistency issues. DPTS offer an alternative approach to (proof) irrelevance, tagging irrelevant information at the level of terms and not of types, and avoiding the annoying syntactical duplication of products, abstractions and applications into an explicit and an implicit version, typical of systems like ICC ∗. Categories and Subject Descriptors F.4.1 [Mathematical Logic
System Fi A HigherOrder Polymorphic λCalculus with Erasable TermIndices
"... Abstract. We introduce a foundational lambda calculus, System Fi, for studying programming languages with termindexed datatypes – higherkinded datatypes whose indices range over data such as natural numbers or lists. System Fi is an extension of System Fω that introduces the minimal features needed ..."
Abstract
 Add to MetaCart
Abstract. We introduce a foundational lambda calculus, System Fi, for studying programming languages with termindexed datatypes – higherkinded datatypes whose indices range over data such as natural numbers or lists. System Fi is an extension of System Fω that introduces the minimal features needed to support termindexing. We show that System Fi provides a theory for analysing programs with termindexed types and also argue that it constitutes a basis for the design of logicallysound lightweight dependent programming languages. We establish erasure properties of Fitypes that capture the idea that termindices are discardable in that they are irrelevant for computation. Index erasure projects typing in System Fi to typing in System Fω. So,SystemFi inherits strong normalization and logical consistency from System Fω.