chrKanren: Constraint Handling Rules in a Relational Language

πŸ“… 2026-07-23
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
This work addresses the challenge of efficiently integrating Constraint Handling Rules (CHR) into the purely relational logic programming language miniKanren to support sophisticated constraint solving. We present the first seamless embedding of CHR into miniKanren, enabling tight coordination between constraint propagation and relational search while preserving the logical completeness of both mechanisms. The resulting system, chrKanren, significantly extends miniKanren’s expressiveness and demonstrates practical utility through applications in user-defined data structure semantics unification and the synthesis of MYTH-style relational interpreters, thereby validating the effectiveness and applicability of our approach.
πŸ“ Abstract
We present chrKanren, a dialect of the purely relational constraint logic programming language miniKanren which includes support for Constraint Handling Rules (CHR), a language for writing rule-based programs such as constraint solvers. We show how to integrate CHR's constraint propagation mechanism into the language of miniKanren search streams such that both processes remain complete. We also use chrKanren to illustrate novel applications of constraints in miniKanren, such as semantic unification of user-defined data structures and type-and-example-directed synthesis for relational interpreters in the style of MYTH.
Problem

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

Constraint Handling Rules
miniKanren
relational programming
constraint propagation
logic programming
Innovation

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

Constraint Handling Rules
miniKanren
relational programming
constraint propagation
program synthesis
πŸ”Ž Similar Papers