skip to main content
10.1145/178243.178488acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
Article
Free access

Backtracking without trailing in CLP (RLin)

Published: 01 June 1994 Publication History

Abstract

Constraint logic programming (CLP) is a generalization of logic programming where unification is replaced by constraint solving as the basic operation of the language. The combination of constraint solving and nondeterminism (approximated by backtracking) makes these languages appealing for a variety of combinatorial search problems. Existing CLP languages support backtracking by generalizing traditional Prolog implementations: modifications to the constraint system are trailed and restored on backtracking. Although simple and efficient, trailing may be very demanding in memory space, since the constraint system may potentially be saved at each choice point. This paper proposes a fundamentally new implementation scheme for backtracking in CLP languages over linear (rational or real) arithmetic. The new scheme, called semantic backtracking, does not use trailing but rather exploits the semantics of the constraints to undo the effect of newly added constraints. Semantic backtracking reduces the space complexity by an order of magnitude compared to implementations based on trailing and makes space complexity essentially independent of the number of choice points. In addition, semantic backtracking introduces negligible space and time overhead on deterministic programs. The price for this improvement is an increase in backtracking time, although constraint-solving time may actually decrease. The scheme has been implemented as part of a complete CLP system CLP(RLin) and compared analytically and experimentally with an optimized trailing implementation. Experimental results indicate that semantic backtracking produces significant reduction in memory space, while keeping the time overhead reasonably small.

References

[1]
A. Aggoun and N. Beldiceanu. An Overview of the CHIP compiler. In Eighth International Conference on Logic Programming (ICLP-91), Paris (France), June 1991.
[2]
A. Colmerauer. An Introduction to Prolog III. CACM, 28(4):412-418, 1990.
[3]
G.B. Dantzig. Linear Programming and Extensions. Princeton University Press, 1963.
[4]
M. Dincbas, P. Van Hentenryck, H. Simonis, _~. Aggoun, T. Gr~f, and F. Berthier. The Constraint Logic Programming Language CHIP. In FGCS-88, Tokyo, Japan, Dec. 1988.
[5]
J. Jaffar and J-L. Lassez. Constraint Logic Programming. In POPL-87, Munich, Jan. 1987.
[6]
J. Jaffar, S. Michaylov, P. Stuckey, and R. Yap. An Abstract Machine for CLP(~). In PLDI'92, San Francisco, CA, June 1992.
[7]
J. Jaffar, S. Michaylov, P.J. Stuckey, and R. Yap. The CLP(~) Language and System. A CM Transactions on Programming Languages, 14(3):339-395, 1992.
[8]
P. Stuckey. Incremental Linear Constraint Solving and Detection of Implicit Equalities. ORSA Journal of Computing, 3:269-274, 1991.
[9]
P. Van Hentenryck. Constraint Satisfaction in Logic Programming. The MIT Press, 1989.
[10]
P. Van Hentenryck and T. Graf. Standard Forms for Rational Linear Arithmetics in Constraint Logic Programming. Annals of Mathematics and Artificial Intelligence, 5(2-4), 1992.
[11]
D.H.D Warren. An Abstract Prolog Instruction Set. Technical Report 309, SRI, October 1983.

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '94: Proceedings of the ACM SIGPLAN 1994 conference on Programming language design and implementation
August 1994
360 pages
ISBN:089791662X
DOI:10.1145/178243
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: 01 June 1994

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Article

Conference

PLDI94
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)93
  • Downloads (Last 6 weeks)24
Reflects downloads up to 21 Jan 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media