Communications of the ACM
A Machine-Oriented Logic Based on the Resolution Principle
Journal of the ACM (JACM)
Essentials of Constraint Programming
Essentials of Constraint Programming
Essentials of Constraint Programming
Essentials of Constraint Programming
Theory and Practice of Logic Programming
Automatic Implication Checking for CHR Constraints
Electronic Notes in Theoretical Computer Science (ENTCS)
Parallelizing union-find in constraint handling rules using confluence analysis
ICLP'05 Proceedings of the 21st international conference on Logic Programming
From exponential to almost linear decomposability of finite or infinite trees
Proceedings of the 2009 ACM symposium on Applied Computing
Hi-index | 0.00 |
Prolog, which stands for PROgramming in LOGic, is the most widely used language in the logic programming paradigm. One of its main concepts is unification. It represents the mechanism of binding the contents of variables and can be seen as solving conjunctions of equations over finite or infinite trees. We present in this paper an idea of a first-order extension of Prolog's unification by giving a general algorithm for solving any first-order constraint in the theory T of finite or infinite trees, extended by a relation which allows to distinguish between finite and infinite trees. The algorithm is given in the form of 16 rewriting rules which transform any first-order formula φ into an equivalent disjunction ϕ of simple formulas in which the solutions of the free variables are expressed in a clear and explicit way. We end this paper describing a CHR implementation of our algorithm. CHR (Constraint Handling Rules) has originally been developed for writing constraint solvers, but the constraints here go much beyond implicitly quantified conjunctions of atomic constraints and are considered as arbitrary first-order formulas built on the signature of T. We discuss how we implement nested local constraint stores and what programming patterns and language features we found useful in the CHR implementation of our algorithm.