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

一个完全可预测的结果:无限结构的遍历研究

A Totally Predictable Outcome: An Investigation of Traversals of Infinite Structures

Gershom Bazerman

摘要:

具有可遍历类型类实例的函子可以被认为是允许遍历其元素的数据结构。这已经通过可遍历函子和有限容器(也称为多项式函子)之间的对应关系变得精确-建立在总的,必然终止的函数的上下文中。然而,Haskell语言是非严格的,允许函数不终止。长期以来,人们一直注意到遍历有时实际上可以在无限列表上操作,例如在分发Reader应用程序时。这种遍历的结果仍然是一个无限的结构,然而它仍然是生产性的-即连续的有限计算量产生终止或连续的结果。为了研究这一现象,我们利用了保护递归的工具,直接在Haskell中使用等式推理。

英文摘要:

Functors with an instance of the Traversable type class can be thought of as data structures which permit a traversal of their elements. This has been made precise by the correspondence between traversable functors and finitary containers (also known as polynomial functors) -- established in the context of total, necessarily terminating, functions. However, the Haskell language is non-strict and permits functions that do not terminate. It has long been observed that traversals can at times in fact operate over infinite lists, for example in distributing the Reader applicative. The result of such a traversal remains an infinite structure, however it nonetheless is productive -- i.e. successive amounts of finite computation yield either termination or successive results. To investigate this phenomenon, we draw on tools from guarded recursion, making use of equational reasoning directly in Haskell.

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

↑