### On Generalised Coinduction and Probabilistic Specification Formats: Distributive Laws in Coalgebraic Modelling

, 2004

"... ..."

### Validation of Stochastic Systems (VOSS,VOSS2).Reconciling Nondeterministic and Probabilistic Choices

"... ..."

### geboren te Jiangsu, Chinapromotor: prof.dr. W.J. FokkinkFormal Verification of Distributed Systems

"... ..."

### Composing Constraint Solvers

"... The subject of this thesis can be categorized as the implementation of constraint
solvers. In this chapter we put constraint solving, and the programming style
that it enables into context. We motivate our work, give an outline of the thesis,
and summarize the scientific contributions.
1.1 Context ..."

Abstract
- Add to MetaCart

The subject of this thesis can be categorized as the implementation of constraint
solvers. In this chapter we put constraint solving, and the programming style
that it enables into context. We motivate our work, give an outline of the thesis,
and summarize the scientific contributions.
1.1 Context
Constraint programming falls in the category of declarative programming
styles, where essentially a program describes what must be computed, as opposed
to imperative programming, where a program describes how the output
must be computed. A constraint “program” is called a constraint satisfaction
problem (CSP), and consists of the following elements.
• a set of variables, each with a set of allowed values, and
• a set of constraints, where every constraint applies to a subset of the variables,
and restricts somehow the values that these variables may assume.
Writing a CSP to represent a combinatorial problem that occurs in practice is
called modeling. The purpose of constraint solving is to generate solutions
to CSPs. These are assignments of values to variables that satisfy all constraints.
We will also consider a modification of constraint satisfaction problems where
the goal is to generate an optimal solution, according to some objective function.
The combination of a CSP and an objective function is called a constrained
optimization problem (COP). Programs, procedures, and algorithms for constraint
solving are called constraint solvers. For a tutorial, and textbooks on
constraint programming, the reader is referred to [Smi95, Apt03, Dec03]. The
subject of this thesis is the implementation of constraint solvers.
Because of the very general nature of a CSP, constraint programming subsumes
several other forms of modeling, such as linear programming. For some
1
2 Chapter 1. Introduction
specific forms of CSPs and COPs there exist very efficient solving methods, such
as the simplex algorithm for linear programs. In this thesis we deal with general
methods for constraint solving that are applied only when no efficient, problemspecific
methods are available.
In particular, we deal with methods that are based on an exhaustive exploration
of all possible assignments of values to variables. This excludes so-called
local search methods, which start from an initial assignment, and try to improve
it according to some notion of quality by iteratively making small (local)
modifications. Local search methods naturally apply to COPs, but they can also
be applied to CSPs by minimizing the number of violated constraints. Local
search methods typically find good solutions quickly, but are not guaranteed to
find the optimum, and therefore they cannot determine whether a solution to a
CSP exists or not.
In contrast, the exhaustive methods that we consider in this thesis are guaranteed
to find a solution if it exists, but in general they have a time complexity
that is exponential in the size of the problem. Although computations with an
exponential time complexity are considered to be intractable, this characterizes
only the worst-case behavior, and despite their potentially intractable nature,
such methods are successfully applied in practice. Examples of such applications
are the generation of test patterns for digital circuits (see, e.g., [VHSD92]),
the analysis of nonlinear functions [HMD97], and scheduling problems [BLPN01],
such as sports tournament scheduling [Hen01].
1.2 Motivation
Constraint solving is based on a collection of largely independent techniques,
that fall into two categories: search methods, and techniques for reducing the
search space. In the context of constraint solving, techniques in the latter category
are usually called constraint propagation techniques, and the approach
to constraint solving that is considered in this thesis is known as branch-and-propagate search. To a large extent, constraint programming consists of determining
the combination of techniques that make a given CSP solvable. Many of
these techniques have successfully been used in specific domains to build practical
constraint programming tools, but in general it is not possible to combine them
without reprogramming or re-engineering the tools, and a major challenge in this
field is how to achieve a combination of various existing methods and techniques
within a single framework. We will refer to realizing such combinations as solver
composition.
Recently, it was demonstrated that many constraint propagation algorithms
proposed in the literature are actually instances of a generic iteration algorithm
[Apt99, Gen02]. In this scheme, a constraint solver consists of a scheduler combined
with the functions that are to be scheduled. If certain conditions are met,
different schedulers will lead to the same result, and the schedulers can be configured
to exploit several properties of the functions. Moreover, distributed versions
of the generic iteration algorithm exist [MR99, Mon00a], and distributed constraint
propagation can be realized simply by substituting a sequential scheduler
by a distributed scheduler.
Our goal is to exploit the conceptual simplicity of this scheme, and to complement
it with facilities for search to form an integrated framework for constraint
solving. The central theme of this thesis is an exploration of the possibilities and
limitations of such a framework. We have taken a practical approach, which has
led to the development of OpenSolver, a highly configurable constraint solving
engine that supports a wide range of relevant solver configurations. A major design
goal was that OpenSolver can be used as a software component, to form the
core of a solver, and to participate in several solver cooperation schemes. As a
result, composing constraint solvers around OpenSolver involves various methods
of software composition. We give an account of the design and implementation of
OpenSolver, and of the experiments that were performed to verify the efficiency
of the resulting constraint solvers.