arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2510.03170cs.PL
收藏

超越缺点:纯关系数据结构

Beyond Cons: Purely Relational Data Structures

Harvard University(哈佛大学);University of Alabama at Birmingham(阿拉巴马大学伯明翰分校)

Rafaello Sanna, William E. Byrd, Nada Amin

AI总结:

本研究提出miniKanren的扩展{Kanren},新增集合与关联表相关的完备约束集,支持声明式惰性描述集合,提升了抽象数据操作程序的表达力与运行表现,并介绍了其设计实现与示例用法。

摘要:

我们提出{Kanren}(读作set-Kanren),这是miniKanren的扩展,带有用于推理集合和关联表的约束。{Kanren}包含一等集合对象、功能完备的集合论约束族(包括成员关系、并集和不相交性),以及用于推理带遮蔽和作用域查找的关联表的新约束。这些新增功能使程序员能够以声明式和惰性的方式描述集合,无需依赖结构编码和对表示空间的急切搜索。其结果是,通过支持基于内容的集合相等性、实现有限失败,操作抽象数据的程序(尤其是解释器)的表达能力和运行行为得到了提升。我们描述了{Kanren}在支持约束的miniKanren系统中的设计与实现,并通过代表性示例说明其用法。

英文摘要:

We present {Kanren} (read: set-Kanren), an extension to miniKanren with constraints for reasoning about sets and association lists. {Kanren} includes first-class set objects, a functionally complete family of set-theoretic constraints (including membership, union, and disjointedness), and new constraints for reasoning about association lists with shadowing and scoped lookup. These additions allow programmers to describe collections declaratively and lazily, without relying on structural encodings and eager search over representation spaces. The result is improved expressiveness and operational behavior in programs that manipulate abstract data -- particularly interpreters -- by supporting set equality based on contents, enabling finite failure. We describe the design and implementation of {Kanren} in a constraint-enabled miniKanren system and illustrate its use in representative examples.

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

↑