Type-Based Termination with Sized Products
Type-Based Termination with Sized Products
复制标题
具有尺寸产品的基于类型的端接
DOI:
--
复制
发表时间:
2008
期刊:
影响因子:
--
通讯作者:
Colin Riba
中科院分区:
文献类型:
--
作者:
G. Barthe;B. Grégoire;Colin Riba
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 quicksort to 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 quicksort as a non-size increasing function. Moreover, our system accomodate stage addition with all positive inductive types.