-
Recollection: an Alternative Restoration Technique for Constraint Programming Systems
Authors:
Yong Lin,
Martin Henz
Abstract:
Search is a key service within constraint programming systems, and it demands the restoration of previously accessed states during the exploration of a search tree. Restoration proceeds either bottom-up within the tree to roll back previously performed operations using a trail, or top-down to redo them, starting from a previously stored state and using suitable information stored along the way. In…
▽ More
Search is a key service within constraint programming systems, and it demands the restoration of previously accessed states during the exploration of a search tree. Restoration proceeds either bottom-up within the tree to roll back previously performed operations using a trail, or top-down to redo them, starting from a previously stored state and using suitable information stored along the way. In this paper, we elucidate existing restoration techniques using a pair of abstract methods and employ them to present a new technique that we call recollection. The proposed technique stores the variables that were affected by constraint propagation during fix points reasoning steps, and it conducts neither operation roll-back nor recomputation, while consuming much less memory than storing previous visited states. We implemented this idea as a prototype within the Gecode solver. An empirical evaluation reveals that constraint problems with expensive propagation and frequent failures can benefit from recollection with respect to runtime at the expense of a marginal increase in memory consumption, comparing with the most competitive variant of recomputation.
△ Less
Submitted 4 February, 2016; v1 submitted 27 January, 2016;
originally announced January 2016.
-
Programmable Restoration Granularity in Constraint Programming
Authors:
Yong Lin,
Martin Henz
Abstract:
In most constraint programming systems, a limited number of search engines is offered while the programming of user-customized search algorithms requires low-level efforts, which complicates the deployment of such algorithms. To alleviate this limitation, concepts such as computation spaces have been developed. Computation spaces provide a coarse-grained restoration mechanism, because they store a…
▽ More
In most constraint programming systems, a limited number of search engines is offered while the programming of user-customized search algorithms requires low-level efforts, which complicates the deployment of such algorithms. To alleviate this limitation, concepts such as computation spaces have been developed. Computation spaces provide a coarse-grained restoration mechanism, because they store all information contained in a search tree node. Other granularities are possible, and in this paper we make the case for dynamically adapting the restoration granularity during search. In order to elucidate programmable restoration granularity, we present restoration as an aspect of a constraint programming system, using the model of aspect-oriented programming. A proof-of-concept implementation using Gecode shows promising results.
△ Less
Submitted 4 February, 2016; v1 submitted 25 January, 2016;
originally announced January 2016.
-
Logic programming in the context of multiparadigm programming: the Oz experience
Authors:
Peter Van Roy,
Per Brand,
Denys Duchier,
Seif Haridi,
Martin Henz,
Christian Schulte
Abstract:
Oz is a multiparadigm language that supports logic programming as one of its major paradigms. A multiparadigm language is designed to support different programming paradigms (logic, functional, constraint, object-oriented, sequential, concurrent, etc.) with equal ease. This article has two goals: to give a tutorial of logic programming in Oz and to show how logic programming fits naturally into…
▽ More
Oz is a multiparadigm language that supports logic programming as one of its major paradigms. A multiparadigm language is designed to support different programming paradigms (logic, functional, constraint, object-oriented, sequential, concurrent, etc.) with equal ease. This article has two goals: to give a tutorial of logic programming in Oz and to show how logic programming fits naturally into the wider context of multiparadigm programming. Our experience shows that there are two classes of problems, which we call algorithmic and search problems, for which logic programming can help formulate practical solutions. Algorithmic problems have known efficient algorithms. Search problems do not have known efficient algorithms but can be solved with search. The Oz support for logic programming targets these two problem classes specifically, using the concepts needed for each. This is in contrast to the Prolog approach, which targets both classes with one set of concepts, which results in less than optimal support for each class. To explain the essential difference between algorithmic and search programs, we define the Oz execution model. This model subsumes both concurrent logic programming (committed-choice-style) and search-based logic programming (Prolog-style). Instead of Horn clause syntax, Oz has a simple, fully compositional, higher-order syntax that accommodates the abilities of the language. We conclude with lessons learned from this work, a brief history of Oz, and many entry points into the Oz literature.
△ Less
Submitted 20 August, 2002;
originally announced August 2002.