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

02/25/2020
by   Luigi Liquori, et al.
0

We present the syntax, semantics, and typing rules of Bull, a prototype theorem prover based on the Delta-Framework, i.e. a fully-typed lambda-calculus decorated with union and intersection types, as described in previous papers by the authors. Bull also implements a subtyping algorithm for the Type Theory Xi of Barbanera-Dezani-de'Liguoro. Bull has a command-line interface where the user can declare axioms, terms, and perform computations and some basic terminal-style features like error pretty-printing, subexpressions highlighting, and file loading. Moreover, it can typecheck a proof or normalize it. These terms can be incomplete, therefore the typechecking algorithm uses unification to try to construct the missing subterms. Bull uses the syntax of Berardi's Pure Type Systems to improve the compactness and the modularity of the kernel. Abstract and concrete syntax are mostly aligned and similar to the concrete syntax of Coq. Bull uses a higher-order unification algorithm for terms, while typechecking and partial type inference are done by a bidirectional refinement algorithm, similar to the one found in Matita and Beluga. The refinement can be split into two parts: the essence refinement and the typing refinement. Binders are implemented using commonly-used de Bruijn indices. We have defined a concrete language syntax that will allow the user to write Delta-terms. We have defined the reduction rules and an evaluator. We have implemented from scratch a refiner which does partial typechecking and type reconstruction. We have experimented Bull with classical examples of the intersection and union literature, such as the ones formalized by Pfenning with his Refinement Types in LF. We hope that this research vein could be useful to experiment, in a proof theoretical setting, forms of polymorphism alternatives to Girard's parametric one.

READ FULL TEXT

page 8

page 9

page 21

page 23

page 24

page 25

page 26

page 27

research
02/22/2012

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

The paper describes the refinement algorithm for the Calculus of (Co)Ind...
research
10/24/2019

A Weakly Initial Algebra for Higher-Order Abstract Syntax in Cedille

Cedille is a relatively recent tool based on a Curry-style pure type the...
research
03/26/2018

The Delta-calculus: syntax and types

We present the Delta-calculus, an explicitly typed lambda-calculus with ...
research
10/15/2020

Refinement Types: A Tutorial

Refinement types enrich a language's type system with logical predicates...
research
07/17/2023

A framework for erased syntax and bidirectional typing

We introduce CompLF, a logical framework allowing for the definition of ...
research
02/04/2020

Intersection Type Distributors

Building on previous works, we present a general method to define proof ...
research
05/04/2019

An experiment with denotational semantics

The paper is devoted to showing how to systematically design a programmi...

Please sign up or login with your details

Forgot password? Click here to reset