Type-Based Termination with Sized Products

  • Authors:
  • Gilles Barthe;Benjamin Grégoire;Colin Riba

  • Affiliations:
  • IMDEA Software, Madrid, Spain;INRIA Sophia-Antipolis, France;INRIA Sophia-Antipolis, France

  • Venue:
  • CSL '08 Proceedings of the 22nd international workshop on Computer Science Logic
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Type-based termination is a semantically intuitive method that ensures termination of recursive definitions by tracking the size of datatype elements, and by checking that recursive calls operate on smaller arguments. However, many systems using type-based termination rely on a semantical anomaly to guarantee strong normalization; namely, they impose that non-recursive elements of a datatype, e.g. the empty list, have size 1 instead of 0. This semantical anomaly also prevents functions such as quicksortto be given a precise typing.The main contribution of this paper is a type system that remedies this anomaly, and still ensures termination. In addition, our type system features prenex stage polymorphism, a weakening of existential quantification over stages, and is precise enough to type quicksortas a non-size increasing function. Moreover, our system accomodate stage addition with all positive inductive types.