A framework for erased syntax and bidirectional typing

by   Thiago Felicissimo, et al.

We introduce CompLF, a logical framework allowing for the definition of computational type theories – that is, those whose definitional equality is purely generated by rewrite rules. Its main goal is to capture the usual presentation of type theories in a faithful way. Whereas other frameworks impose a fully-annotated presentation of syntax, quite different from the ones used in practice, our proposal allows the definition of dependent type theories with their usual non-annotated syntaxes. This is achieved by the introduction of erased arguments, which correspond to premises of typing rules that are not recorded in the syntax. If on the one hand erased arguments allow us to capture the usual syntax of type theories, they can easily break decidability of type checking, as one might need to guess the erased information. We address this by proposing a bidirectional typing algorithm for CompLF. When comparing it with other algorithms in the literature, its main novelty is that it is not designed for a specific theory, but is instead generic and can be instantiated with various type theories. Moreover, it features a modular proof of completeness, in which one can fine-tune the subset of terms for which it is complete by varying the amount of annotations in the syntax. In particular, we can capture in a single framework the two main approaches for bidirectional typing, in which one reduces the amount of annotations to the minimal by restricting completeness only to normal forms, or in which one trades minimality of annotations in exchange for full completeness. Finally, CompLF is designed to be not only a theoretical tool but also a practical one: it has been implemented in a prototype that is openly available on GitHub.


page 1

page 2

page 3

page 4


An extensible equality checking algorithm for dependent type theories

We present a general and user-extensible equality checking algorithm tha...

A general definition of dependent type theories

We define a general class of dependent type theories, encompassing Marti...

Context, Judgement, Deduction

We introduce judgemental theories and their calculi as a general framewo...

Philosophical Smoke Signals: Theory and Practice in Information Systems Design

Although the gulf between the theory and practice in Information Systems...

Interacting Safely with an Unsafe Environment

We give a presentation of Pure type systems where contexts need not be w...

A Type Checker for a Logical Framework with Union and Intersection Types

We present the syntax, semantics, and typing rules of Bull, a prototype ...

A Bi-Directional Refinement Algorithm for the Calculus of (Co)Inductive Constructions

The paper describes the refinement algorithm for the Calculus of (Co)Ind...

Please sign up or login with your details

Forgot password? Click here to reset