具有大小(共)归纳的F系统的实用子类型
Practical Subtyping for System F with Sized (Co-)Induction
摘要:
我们提出了一个丰富的类型系统与子类型的系统F的扩展。我们的类型构造器包括和和产品类型,普遍和存在量词,归纳和共归纳类型。后两个尺寸标注允许保留尺寸不变式。例如,可以通过证明对列表进行分区不会增加其大小来推导快速排序的终止。该系统处理复杂的程序,包括混合归纳和共归纳,甚至混合(共)归纳和多态(如斯科特编码的数据库)。其中一个关键思想是将大小的归纳与递归程序的概念完全分开。我们使用大小变化原则来检查证明是否有充分的根据,而不是程序是否终止。终止是通过一个强有力的正规化证明。另一个关键思想是使用符号见证来处理各种量词。为了证明我们的系统的实用性,我们提供了一个实现,接受所有的例子中讨论的文件和更多。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。