arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1205.2492cs.LOcs.PL
收藏

提炼归纳类型

Refining Inductive Types

Robert Atkey, Patricia Johann, Neil Ghani

摘要:

依赖类型的程序设计语言允许在类型系统中表达数据的复杂属性。在依赖类型编程中特别有用的是索引类型,它通过计算上有用的信息来细化数据。例如,N索引类型的向量通过它们的长度来细化列表。其他数据类型也可以用类似的方式进行细化,但是程序员必须根据特定的目的进行细化,开发人员必须预测库中要包含哪些细化,并且实现必须经常存储有关数据及其细化的冗余信息。在本文中,我们将展示如何一般地推导归纳类型的细化归纳特征,并认为这些特征可以减轻一些与特设细化相关的上述困难。我们的特征也确保了标准的编程技术和推理归纳类型适用于细化,细化本身可以进一步细化。

英文摘要:

Dependently typed programming languages allow sophisticated properties of data to be expressed within the type system. Of particular use in dependently typed programming are indexed types that refine data by computationally useful information. For example, the N-indexed type of vectors refines lists by their lengths. Other data types may be refined in similar ways, but programmers must produce purpose-specific refinements on an ad hoc basis, developers must anticipate which refinements to include in libraries, and implementations must often store redundant information about data and their refinements. In this paper we show how to generically derive inductive characterisations of refinements of inductive types, and argue that these characterisations can alleviate some of the aforementioned difficulties associated with ad hoc refinements. Our characterisations also ensure that standard techniques for programming with and reasoning about inductive types are applicable to refinements, and that refinements can themselves be further refined.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑