Toward a first-order extension of Prolog's unification using CHR - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2007

Toward a first-order extension of Prolog's unification using CHR

Résumé

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 D 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.
Fichier principal
Vignette du fichier
sac07.pdf (187.36 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)
Loading...

Dates et versions

hal-00202316 , version 1 (05-01-2008)

Identifiants

  • HAL Id : hal-00202316 , version 1

Citer

Khalil Djelloul, Thi-Bich-Hanh Dao, Thom Fruehwirth. Toward a first-order extension of Prolog's unification using CHR. ACM symposium on applied computing, 2007, North Korea. pp.ACM 2007, ISBN 1-59593-480-4. ⟨hal-00202316⟩
90 Consultations
219 Téléchargements

Partager

Gmail Facebook X LinkedIn More