Beyond Cons: Purely Relational Data Structures

📅 2025-10-03
📈 Citations: 0
Influential: 0
📄 PDF

career value

123K/year
🤖 AI Summary
This paper addresses miniKanren’s limited native support for sets and association lists—critical for modeling abstract data, particularly interpreters. We propose a constraint-enhanced extension that introduces first-class set objects and a functionally complete set-theoretic constraint language (e.g., membership, union, disjointness), alongside shadow-aware association list constraints. This enables content-based set equality checking and finite-failure semantics, eliminating structural encoding and eager search in favor of declarative, lazy operations. To our knowledge, this is the first approach in relational programming to provide semantic set modeling and scope-sensitive lookup inference. Experimental evaluation demonstrates substantial improvements in expressiveness, reasoning precision, and execution efficiency for programs manipulating abstract data—especially interpreters—compared to baseline miniKanren systems.

Technology Category

Application Category

📝 Abstract
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.
Problem

Research questions and friction points this paper is trying to address.

Extends miniKanren with set and association list constraints
Enables declarative reasoning about collections without structural encodings
Improves expressiveness for programs manipulating abstract data structures
Innovation

Methods, ideas, or system contributions that make the work stand out.

Extends miniKanren with set-theoretic constraints
Introduces first-class set objects and membership constraints
Enables declarative collection handling via lazy evaluation
🔎 Similar Papers
No similar papers found.