Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1244002.1244016acmconferencesArticle/Chapter ViewAbstractPublication PagessacConference Proceedingsconference-collections
Article

Toward a first-order extension of Prolog's unification using CHR: a CHR first-order constraint solver over finite or infinite trees

Published: 11 March 2007 Publication History

Abstract

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.

References

[1]
Abdennadher, S. 1997. Operational Semantics and Confluence of Constraint Propagation Rules. In Proc of the third International Conference on Principles and Practice of Constraint Programming. LNCS 1330.
[2]
Benhamou, F., Colmerauer, A., Garetta, H., Pasero, R. and Van-caneghem, M. 1996. Le manuel de Prolog IV. PrologIA, Marseille, France.
[3]
Colmerauer, A. 1982. Prolog and infinite trees. In K. L. Clark and S-A. Tarnlund, editors, Logic Programming. Academic Press. pp. 231--251.
[4]
Colmerauer, A., Kanoui, H. and Van-caneghem, M. 1983. Prolog, Theoretical Basis and Current Developments. TSI 2(4):271--311.
[5]
Colmerauer, A. 1984. Equations and in equations on finite and infinite trees. Proceeding of the International conference on the fifth generation of computer systems, pp. 85--99.
[6]
Colmerauer, A. 1990. An introduction to Prolog III. Communication of the ACM, 33(7):68--90.
[7]
Colmerauer, A. and Dao, T. 2003. Expressiveness of full first-order formulas in the algebra of finite or infinite trees, Constraints, 8(3): 283--302.
[8]
Dao, T. 2000. Resolution de contraintes du premier ordre dans la theorie des arbres finis ou infinis. These d'informatique, Universite de la mediterranee, France.
[9]
Djelloul, K. 2006. Decomposable theories. Journal of Theory and practice of logic programming TPLP. (to appear)
[10]
Duck, G., Stuckey, P., Banda, M. and Holzbaur, C. 2004. The Refined Operational Semantics of Constraint Handling Rules. In Proc of the 20th International Conference on Logic Programming. LNCS 3132, pp. 105--119.
[11]
Fruehwirth, T. 1998. Theory and Practice of Constraint Handling Rules. Special Issue on Constraint Logic Programming. Journal of Logic Programming. 37(1--3): 95--138.
[12]
Fruehwirth, T. and Abdennadher, S. 2003. Essentials of Constraint Programming. Springer.
[13]
Fruehwirth, T. 2005. Parallelizing Union-Find in Constraint Handling Rules Using Confluence. In proc of the 21st International Conference of Logic Programming. LNCS, Vol 3668. pp: 113--127.
[14]
Maher M. Complete axiomatization of the algebra of finite, rational and infinite trees. Technical report, IBM, 1988.
[15]
Meister, M. and Fruehwirth, T. 2006. Complexity of the CHR Rational Tree Equation Solver. In Proc of the third Workshop on Constraint Handling Rules.
[16]
Robinson, J. A. 1965. A machine-oriented logic based on the resolution principle. JACM, 12(1):23--41.
[17]
Roussel, F. 1975. Prolog : Manuel de Reference et d'Utilisation, Groupe d'Intelligence Artificielle, Marseille-Luminy.
[18]
Van Weert, P., Sneyers, J., Schrijvers, T. and Demoen, B. 2006. Constraint Handling Rules with Negations as Absence. In Proc of the third Workshop on Constraint Handling Rules.
[19]
Schrijvers, T., Demoen, B., Duck, G., Stuckey, P. and Fruehwirth, T. 2006. Automatic implication checking for CHR constraints. In Proc of the 6th International Workshop on Rule-Based Programming. ENTC, vol 147, pp. 93--111.
[20]
Schrijvers, T. and Fruehwirth. CHR Website, www.cs.kuleuven.ac.be/dtai/projects/CHR/

Cited By

View all
  • (2009)From exponential to almost linear decomposability of finite or infinite treesProceedings of the 2009 ACM symposium on Applied Computing10.1145/1529282.1529478(897-902)Online publication date: 8-Mar-2009
  • (2009)As time goes by: Constraint Handling RulesTheory and Practice of Logic Programming10.1017/S147106840999012310:01(1-47)Online publication date: 22-Dec-2009

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SAC '07: Proceedings of the 2007 ACM symposium on Applied computing
March 2007
1688 pages
ISBN:1595934804
DOI:10.1145/1244002
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 March 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. CHR (Constraint Handling Rules)
  2. Prolog
  3. first-order constraints solving
  4. theory of finite or infinite trees
  5. unification

Qualifiers

  • Article

Conference

SAC07
Sponsor:

Acceptance Rates

Overall Acceptance Rate 1,650 of 6,669 submissions, 25%

Upcoming Conference

SAC '25
The 40th ACM/SIGAPP Symposium on Applied Computing
March 31 - April 4, 2025
Catania , Italy

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)0
  • Downloads (Last 6 weeks)0
Reflects downloads up to 28 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2009)From exponential to almost linear decomposability of finite or infinite treesProceedings of the 2009 ACM symposium on Applied Computing10.1145/1529282.1529478(897-902)Online publication date: 8-Mar-2009
  • (2009)As time goes by: Constraint Handling RulesTheory and Practice of Logic Programming10.1017/S147106840999012310:01(1-47)Online publication date: 22-Dec-2009

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media