arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1806.05230cs.LOcs.PL
收藏

嵌套数据类型的依赖类型文件夹

Dependently Typed Folds for Nested Data Types

Peng Fu, Peter Selinger

摘要:

我们提出了一种方法来开发折叠嵌套数据类型使用依赖类型。我们称这种折叠为$\textit{dependently typed folds}$,它们具有以下性质。(1)依赖类型的折叠是由良基递归定义的,它们可以用完全依赖类型的语言来定义。(2)依赖类型的折叠不依赖于映射,映射函数和许多终止函数可以使用依赖类型的折叠来定义。(3)嵌套数据类型的归纳原理来自于依赖类型折叠的定义,由依赖类型折叠定义的程序可以被形式化验证。(4)对于任何嵌套的数据类型,都存在依赖类型的折叠,并且它们可以专用于传统的$\textit{higher-order folds}$。使用各种各样的例子,我们展示了如何编程和理由依赖类型的褶皱。我们还展示了如何获得一般的依赖型褶皱,以及如何将它们专门化到相应的高阶褶皱。

英文摘要:

We present an approach to develop folds for nested data types using dependent types. We call such folds $\textit{dependently typed folds}$, they have the following properties. (1) Dependently typed folds are defined by well-founded recursion and they can be defined in a total dependently typed language. (2) Dependently typed folds do not depend on maps, map functions and many terminating functions can be defined using dependently typed folds. (3) The induction principles for nested data types follow from the definitions of dependently typed folds and the programs defined by dependently typed folds can be formally verified. (4) Dependently typed folds exist for any nested data types and they can be specialized to the traditional $\textit{higher-order folds}$. Using various of examples, we show how to program and reason about dependently typed folds. We also show how to obtain dependently typed folds in general and how to specialize them to the corresponding higher-order folds.

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

↑