计算机科学 > 程序设计语言
[提交于 2025年10月3日]
标题:Beyond Cons: Purely Relational Data Structures
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要: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.
提交历史
来自:Rafaello Sanna[v1] 2025年10月3日 星期五 16:44:03 UTC