Practical Subtyping for System F with Sized (Co-)Induction - Archive ouverte HAL Accéder directement au contenu
Pré-Publication, Document De Travail Année : 2017

Practical Subtyping for System F with Sized (Co-)Induction

Résumé

We present a rich type system with subtyping for an extension of System F. Our type constructors include sum and product types, universal and existential quantifiers, inductive and coinductive types. The latter two size annotations allowing the preservation of size invariants. For example it is possible to derive the termination of the quicksort by showing that partitioning a list does not increase its size. The system deals with complex programs involving mixed induction and coinduction, or even mixed (co-)induction and polymorphism (as for Scott-encoded datatypes). One of the key ideas is to completely separate the induction on sizes from the notion of recursive programs. We use the size change principle to check that the proof is well-founded, not that the program terminates. Termination is obtained by a strong normalization proof. Another key idea is the use symbolic witnesses to handle quantifiers of all sorts. To demonstrate the practicality of our system, we provide an implementation that accepts all the examples discussed in the paper and much more.
Fichier principal
Vignette du fichier
toplas2017_subtyping/lmcs_subtyping.pdf (606.94 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-01289760 , version 1 (24-03-2016)
hal-01289760 , version 2 (07-03-2017)
hal-01289760 , version 3 (10-07-2017)

Licence

Paternité - Pas d'utilisation commerciale - Pas de modification

Identifiants

Citer

Rodolphe Lepigre, Christophe Raffalli. Practical Subtyping for System F with Sized (Co-)Induction. 2017. ⟨hal-01289760v3⟩
240 Consultations
187 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More