Results 1 -
9 of
9
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 4 (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.
Dependent types and program equivalence
- In Proceedings of the 37th ACM SIGACT-SIGPLAN 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 1 (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 dependently-typed 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 beta-equivalence, to contextual equivalence, to some exotic equivalences.
Termination Casts: A Flexible Approach to Termination with General Recursion
"... This paper proposes a type-and-effect 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 type-form “Terminate ..."
Abstract
-
Cited by 1 (1 self)
- Add to MetaCart
This paper proposes a type-and-effect 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 type-form “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 meta-theory 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
DRAFT—Do not distribute Dependent Types and Program Equivalence
"... 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
- 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 dependently-typed 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—and, in this context, type safety implies partial correctness. 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 beta-equivalence, to contextual equivalence, to some exotic equivalences. [Copyright notice will appear here once ’preprint ’ option is removed.] 1.
reports/930 Termination Casts: A Flexible Approach to Termination with General Recursion (Technical Appendix)
"... This paper proposes a type-and-effect system called Teq ↓ , 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 type-form “Terminates ..."
Abstract
- Add to MetaCart
This paper proposes a type-and-effect system called Teq ↓ , 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 type-form “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 meta-theory of the system, we describe a translation from Teq ↓ to a logical theory of termination for general recursive, simply typed functions. Every typing judgment of Teq ↓ is translated to a theorem expressing the appropriate termination property of the computational part of the Teq ↓ term. 1
Equality, Quasi-Implicit 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 quasi-implicit products. 1
Universe Subtyping in Martin-Lö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 so-called 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
- 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 so-called 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 well-known 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
Practical aspects of evidence-based 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 term-level ..."
Abstract
- 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 term-level 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 zero-cost 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.

