<<

Constraint Programming



The Constraint Programming Working Group

ACMMIT SDCR Workshop

Version George

Oct

Introduction

A constraint can intuitively b e thought of as a restriction on a space of p ossibil

ities Mathematical constraints are precisely sp eciable relations among several

unknowns or variables each taking a value in a given domain Constraints

restrict the p ossible values that variables can take representing some partial

information ab out the variables of interest For instance The second side of a

sheet of a pap er must b e imaged milliseconds after the time at which the

rst side is imaged relates two variables without precisely sp ecifying the values

they must take One can think of such a constraint as standing for a p ossibly

innite set of values in this case the set fh i h i g

Constraints arise naturally in most areas of human endeavor They are the

natural medium of expression for formalizing regularities that underlie the com

putational and natural or designed physical worlds and their mathematical

abstractions with a rich tradition going back to the days of Euclidean geom

etry if not earlier For instance the three angles of a triangle sum to

degrees the four bases that make up DNA strands can only combine in partic

ular orders the sum of the currents owing into a no de must equal zero the

trusses supp orting a bridge can only carry a certain static and dynamic load

the pressure volume and temp erature of an enclosed gas must ob ey the gas

law Mary John and Susan must have dierent oces the relative p osition

of the scroller in the window scrollbar must reect the p osition of the current

text in the underlying do cument the derivative of a function is p ositive at zero

the function is monotone in its rst argument etc Indeed whole subelds of



Editors Pascal Van Hentenryck and Vijay Saraswat Contributing Authors Alan Born

ing Alex Bro dsky Philipp e Co dognet Rina Dechter Mehmet Dincbas Eugene Freuder

Manuel Hermenegildo Joxan Jaar Simon Kasif JeanLouis Lassez David McAllester Ken

McAlo on Alan Mackworth Ugo Montanari William Older JeanFrancois Puget Raghu Ra

makrishnan Francesca Rossi Gert Smolka Ralph Wachter

mathematics eg theory of Diophantine equations group theory and many

celebrated conjectures of mathematics eg Fermats Last Theorem deal with

whether certain constraints are satisable

Constraints naturally enjoy several interesting prop erties First as remarked

ab ove constraints may sp ecify partial information a constraint need not

uniquely sp ecify the value of its variables Second they are additive given

a constraint c say X Y Z another constraint c can b e added say

1 2

X Y Z The order of imp osition of constraints do es not matter all that

matters at the end is that the conjunction of constraints is in eect Third

constraints are rarely indep endent for instance once c and c are imp osed it

1 2

is the case that the constraint X Y Z is entailed Fourth they are non

directional typically a constraint on say three variables X Y Z can b e used

to infer a constraint on X given constraints on Y and Z or a constraint on Y

given constraints on X and Z and so on Fifth they are declarative typically

they sp ecify what relationship must hold without sp ecifying a computational

pro cedure to enforce that relationship Any computational system dealing with

constraints must fundamentally take these prop erties into account

Constraint programming CP is the study of computational systems based

on constraints It represents a harnessing of the centuries old notions of anal

ysis and inference in mathematical structures with several mo dern concerns

general languages for computational representation eciency of analysis and

implementation tolerance for useful alb eit incomplete tied p er

haps to weak metho ds such as search all in the service of design and

implementation of systems for programming mo deling and problemsolving in

dierent domains As discussed in the next section work in this area can b e

traced back to research in Articial Intelligence and Computer Graphics in the

sixties and seventies which fo cused on explicitly representing and manipulat

ing constraints in computational systems Only in the last decade however

has there emerged a growing realization that these ideas provide the basis for

a p owerful approach to programming mo deling and problem solving and that

dierent eorts to exploit these ideas can b e unied under a common conceptual

and practical framework

The basic essence of this framework is the into two

levels The rst level is that of very generally dened constraint systems

systems of inference with pieces of partial information based on such fundamen

tal op erations as constraint propagation entailment satisfaction normalization

and optimization In addition to the traditional constraint systems that have

already b een investigated over centuries such as over the real numbers inte

gers mo dulo p CP brings a fo cus on a wide variety of systems arising often

from application concerns ranging from unstructured nite domains to equa

tions over trees termunication to temp oral intervals Increasing attention

is b eing paid to discovering ecient techniques for p erforming these constraint

op erations across wide classes of such constraint system to discovering common

exploitable structure across constraint systems

Op erating around this level is the second level of programming language

which allows the user to sp ecify more information ab out which constraints

should b e generated how they should b e combined and pro cessed etc Perhaps

unique to CP are modeling languages that exploit logic based control constructs

eg constraint CLP or concurrent constraint program

ming CCP These languages interact with the rst level purely via the basic

constraint op erations This provides the user with a very expressive framework

parametric in the underlying constraint system for generating manipulating

and testing constraints while in the case of the logicbased languages pre

serving their declarative character This realization of unied frameworks has

simultaneously b een accompanied by the implementation of several general sys

tems which are nding widespread use in applications as diverse as mo deling

physical systems and controlling rob ots to scheduling container ships in harb ors

This central organizational idea has many ramications What emerges is a

general declarative framework p otentially more promising than either full rst

order logic which is expressive but undecidable in theory and usually inecient

in practice or restricted versions such as the Horn clause subset that underly

logic programming which are usually ecient in practice but not expressive

enough for many applications For what is fundamentally acknowledged is that

dierent computational techniques constraintsolving algorithms will b e use

ful in dierent computational contexts and a uniform scheme is provided for

integrating these techniques into a p owerful computational framework For the

theoretician metatheorems can b e proved and analysis techniques invented

once and for all that apply to an innite family of systems for the imple

menter dierent constructs backward chaining susp ension can

b e implemented once and for all for the user only one set of ideas needs to

b e understo o d though with rich alb eit disciplined variation via constraint

1

systems

Today CP is contributing exciting new research directions in a number of

distinct areas such as articial intelligence natural language understanding

scheduling planning conguration database sys

tems graphical interfaces hardware verication op erations research and com

binatorial optimization programming language design and implementation re

active systems symbolic computing algorithms and systems The eld is b eing

driven b oth by a need for internal organization and structure and by the de

mands of increasingly sophisticated realworld applications to which it is b eing

applied

1

From a metho dological p oint of view it is imp ortant to realize that not all researchers in

CP work across b oth of these levels Some prefer to exploit the unifying framework of con

straints while working purely within the rst level of constraint systems considering issues

around programming to b e orthogonal to their concerns Others exploit the unifying frame

work of constraints to develop programming language notions while not paying attention to

the prop erties of particular constraint systems Some fo cus on fruitfully exploiting the synergy

across the b oundary b etween the two levels

The state of the art in CP is rep orted in international conference on Prin

ciples and Practice of Constraint Programming PPCP and Practical

Applications of Constraint Technology PACT and in the recently established

constraints journal Work continues to b e rep orted in the conferences and

journals of related areas such as Articial Intelligence Logic Programming

Databases and Op erations Research Interested readers may nd related sur

veys in

The rest of this pap er is organized as follows First we develop some back

ground on the origin of constraint programming The state of the art in the

application of constraint ideas in various elds is then discussed Finally we

identify some key strategic directions for further development

The Origins of Constraint Programming

Some of the earliest ideas leading to CP may b e found in the Articial In

telligence AI area of dating back to the sixties and

seventies The pioneering works on networks of constraints were motivated

mainly by problems arising in the eld of picture processing In these

works constraints were explicitly represented as binary compatibility matrices

and the goal was to develop ecient p olynomial algorithms that could discover

incompatibilities by lo oking at just a few constraints This can greatly sp eed

up the subsequent phase in which one or all solutions are to b e found via back

tracking In picture pro cessing these algorithms sometimes eliminated most

infeasible picture interpretations for example those that were allowed by each

constraint alone but not by a conjunction of a small subset In some cases this

phase results in just one the only one alternative b eing left thus eliminating

backtracking completely The main algorithms developed in those years

were related to achieving variations of arc or pathconsistency see

Section The former nds and eliminates values from variables domains

which are incompatible with some constraint concerning that variable while

the latter eliminates pairs of values which are allowed according to a given con

straint c but not if one lo oks at a chain a path of constraints which start and

end at the same p oints as c In other words one can say that these algorithms

propagate the information given by one constraint to other constraints

In these systems there was still no notion of constraint programming rather

the problem was mo deled directly via sets of constraints which were solved

using an Mention must also b e made of the remarkably prescient

systems REFARF and ALICE Both provided simple but very useful

constraint languages for sp ecifying search problems and solved them used cus

tomized constraint solvers with embedded propagation and search techniques

However we will see later that many constraintbased computational frame

works counted on these algorithms and results to achieve simple and ecient

implementations

Early application areas for constraints were interactive graphics and cir

cuit modeling and diagnosis The rst of these systems was Ivan Sutherlands

Sketchpad developed in the early s Sketchpad was an interactive

graphics application that allowed the user to draw and manipulate constrained

geometric gures on the computers display It included the concepts of a con

straint as a declarative relation enforced by the computer of lo cal propagation

constraint solvers and of multiple co op erating solvers A subsequent similar

system ThingLab included a facility for compiling constraint satisfaction

plans allowing constraints to b e resatised rapidly for changing inputs EL

was an early constraintbased circuit analysis program The concepts de

veloped here led to a variety of other systems and languages including Steeles

constraint language p erhaps the rst explicit eort at designing a pro

gramming language based on constraints

The main step towards mo dern constraint programming was achieved when

it was noted that logic programming was just a particular kind of constraint

programming Logic programming is based on a declarative computational

paradigm where a program is a logic theory and each computation step solves

a system of term equations via the unication algorithm Its declarative nature

made it already close to the idea of constraints which indeed state what has

to b e satised but not how Moreover the use of a backtracking search to nd

the answer to a given query is also very similar to the standard backtracking

pro cedures usually used for solving constraint problems However what really

counted was the observation that term equations are just constraints of a sp ecial

type and that thus the unication algorithm is just a sp ecial kind of constraint

solving algorithm This has led to the denition of a general framework

called Constraint Logic Programming CLP which has all the features of

logic programming but is parametric with resp ect to the kind of constraints

used within the language Moreover it has also brought fundamental changes

in areas that were extensively based on equational term rewriting like Com

putational Logic since researchers in that area realized that they could switch

to a more p owerful and expressive paradigm by moving from term equalities to

constraints

Although the CLP scheme immediately gave rise to languages like CLPR

and III it to ok the practical exp erience of applicationoriented

research to link CLP to the propagation algorithms developed earlier in AI

The language CHIP realized that extensive use of early ideas on prop

agation was necessary at b oth the language and the implementation level to

make CLP languages useful for solving large combinatorial problems which is

usually the task in constraint solving Thus the language was equipp ed with

the p ossibility of dening a domain for each variable and propagation algo

rithms mainly achieving arcconsistency were used to reduce the search for a

solution Facilities for controlling the generation of constraints forward rules

conditionals annotations were provided though without a clear declarative

foundation This is even more so in recently developed languages such as ccfd

where constraint propagation metho ds can b e sp ecied in the language In

this way the underlying constraint solver can b e tailored to the users needs

achieving the socalled glassbox approach Section

But constraints in CLPlike languages showed their p ower not only to mo del

and solve combinatorial problems but also to prune the search during the com

putation and thus sp eed up the execution of a program This also was a fun

damental p oint since until then constraints were seen mostly as a knowledge

representation to ol rather than as a way to guide computations and prune un

interesting branches

Another step towards a more general notion of constraint programming came

from the area of concurrent logic programming Concurrent logic programming

had already shown that it provided a b eautiful elegant and p owerful notation

for concurrent programming based on the socalled pro cess reading of denite

2

clause programs However the eld was hamp ered in part by the lack of

a clear logical analysis of the synchronization mechanisms introduced into such

languages primarily via op erational notions Maher provided a breakthrough

with his analysis that entailment lay at the heart of the synchronization mecha

nisms On this basis Saraswat developed the simple but general concurrent

constraint CC programming framework which views computation as arising

from the activities of agents that communicate via a shared set of variables on

which they can either imp ose tell or test ask for the presence of some

constraints The decoupling of this notion of constraintbased computation

from denite clause programming made p ossible the introduction of techniques

of pro cess algebra for the further conceptual development of the framework in

cluding the introduction of indeterminacy etc On the one hand CC programs

without asks and with angelic nondeterminism can b e viewed as CLP pro

grams and CC programs with constraints restricted to term equations are just

concurrent logic programs On the other hand CC provides a general declarative

framework for concurrency encompassing and extending dataow languages

languages based on residuation and concurrent functional languages For

the CC paradigm was based on another fundamentally novel observation that

constraints can b e used not only to state and solve combinatorial problems but

also to sp ecify pro cess communication and synchronization in a general way

The denition of the CC framework also gave an imp ortant impulse to the de

velopment of new semantics for such languages which exploit the co existence

of constraints and concurrency in order to b e more informative and prove more

interesting prop erties Examples are the semantics based on traces and closure

op erators and those based on truly concurrent mo dels like Petri nets

Languages based directly up on the CC idea are Oz AKL and

partly CIAO However the CC framework has to b e seen more as a the

2

Another imp ortant thread feeding into the work on concurrency was the study of delay

primitives in languages such as PrologI I and MuNuProlog

oretical environment where new ideas and computational mo dels are dened

formally and their theoretical p ower understo o d rather than as a real lan

guage For example the languages ccfd discussed ab ove are based on the idea

of partial arcconsistency as closure op erators which arose from the study of

the CC semantics

The twolevel architecture of Constraint Programming is also suited for em

b edding constraints in more conventional languages as demonstrated by the

LP system which embeds a simplexbased solver into a Clike language and

ILOG Solver a successful commercial system that embeds many of the ideas

and avor of CLP but as a C class library for nite domain constraints

Among all the constraint languages that have b een implemented it is safe to

say that to day the ones that are most widely used are those based on the CLP

framework but not necessarily using a CLPlike syntax In fact these have

proven to b e successful in many application areas such as resource manage

ment and resource allo cation In particular on b enchmark Op erations Research

OR problems such as jobshop scheduling these techniques have led to great

improvements in p erformance

Constraint Programming Today

This section contains an overview of the developments in constraint program

ming in various subelds For each subeld we discuss the main contributions

the applications and the op en issues and directions The overlap of interests in

various subelds will thereby b e apparent we shall also attempt to emphasize

the particular fo cii of interest that each subeld brings to the table

Constraint Programming in Articial Intelligence

AI research has contributed to considerable progress in constraintbased reason

ing Powerful algorithms p erform orders of magnitude b etter than more naive

approaches on dicult combinatorial problems Considerable attention has b een

paid to tractability issues identifying easy classes of problems and generating

distributions of problem instances that are hard Insights into problem structure

have supp orted and connected these research avenues

Growing interest in applications has motivated increasing interest in rep

resentation issues For example attention is b eing paid to overconstrained

systems where preferences must b e expressed Mo deling is emerging as

a ma jor challenge automating the formulation of real problems in a suitable

form for ecient algorithmic pro cessing

The classic AI constraint paradigm is the constraint satisfaction problem

CSP It consists of a set of problem variables each asso ciated with a domain

of values and a set of constraints Each of the constraints is expressed as

a relation dened on some subset of variables denoting the consistent value

assignments that satisfy the constraint Often a problem is p osed as a constraint

network with variables corresp onding to no des and constraints corresp onding

to arcs connecting variables o ccurring in the same constraint

A solution is an assignment of a value to each variable such that all the

constraints are satised Typical tasks are to determine whether a solution

exists to nd one or all solutions to nd whether a partial instantiation can b e

extended to a full solution and to nd an optimal solution relative to a given cost

function Constraints can b e describ ed by explicitly presenting the consistent or

inconsistent value combinations or by mathematical expressions or computable

pro cedures that sp ecify these combinations Often restrictions are placed on

the paradigm eg nite discrete domains or binary constraints involving two

variables but increasingly realworld problems are pushing towards extensions

Algorithms In general the tasks p osed in the constraint satisfaction prob

lem paradigm are computationally intractable NPhard Over the last two

decades a great deal of theoretical and exp erimental research has b een fo cused

on developing algorithms for solving constraint satisfaction problems and on

identifying restricted sub classes that are tractable

Techniques for pro cessing constraints can b e classied roughly as inference

or search and these approaches interact Inference metho ds such as the path

and arcconsistency techniques describ ed b elow enforce various forms of lo cal

consistency that add inferred problem constraints which can prune away in

consistent values and build up partial solutions These metho ds are p erhaps

the distinguishing contribution of AI to constraint reasoning Search metho ds

divide into two broad classes those that traverse the space of partial solutions

or partial value assignments and those that explore the space of complete

value assignments to all the variables sto chastically

Consistency inference Consistencyenforcing or constraint propagation al

gorithms transform a given constraint network into an equiva

lent yet more explicit network by deducing new constraints to b e added onto

the network Intuitively a consistencyenforcing algorithm will make any par

tial solution of a small subnetwork extensible to some surrounding network

For example an arcconsistency algorithm Section ensures that any legal

value in the domain of a single variable has a legal match in the domain of

any other single variable Pathconsistency ensures that any consistent solu

tion to a twovariable subnetwork is extensible to any third variable and in

general iconsistency algorithms guarantee that any lo cally consistent instan

th

tiation of i variables is extensible to any i variable When a network of

n variables is nconsistent it is said to b e globally consistent meaning that a

solution can b e assembled in a backtrackfree manner in any variable ordering

Consistencyenforcing algorithms can b e used to prepro cess a problem to prune

subsequent search or they can b e applied during search By themselves these

algorithms are in essence approximation algorithms that frequently can decide

inconsistency

Systematic search The most common algorithm for p erforming systematic

search is backtracking Backtracking incrementally attempts to extend a partial

solution that sp ecies consistent values for some of the variables toward a com

plete solution by rep eatedly choosing a value for another variable consistent

with the values in the current partial solution When extension is imp ossible

the algorithm backs up to make alternative choices Improvements of back

tracking algorithms have fo cused on the two phases of the algorithm moving

forward lo okahead schemes and backtracking lo okback schemes

When moving forward to extend a partial solution some consistency infer

ence can b e carried out to prune the remaining problem space and help decide

which variable and value to choose next These metho ds which vary in

the strength of constraint inference propagation try to nd a cost eective

balance b etween pruning and overhead

Lo okback schemes are invoked when the algorithm encounters a dead end

These schemes p erform two functions One decide how far to backtrack by an

alyzing the reasons for the dead end a pro cess often referred to as backjumping

Two record the reasons for the dead end in the form of new constraints

so that the same conicts will not arise again Terms used to describ e this idea

are constraint recording and nogood learning

The order in which variables are instantiated search order can have an

enormous eect on the cost of nding a solution An algorithm must choose in

which order to pro cess variables values and constraints Often some form of

the fail rst principle which chooses the most constrained variable rst is

employed in an attempt to prune large p ortions of the search space by failing

high up in the backtrack search tree eg

Sto chastic search In the last few years greedy lo cal search strategies have

b een reintroduced into the satisability and constraint satisfaction literature

These algorithms incrementally alter inconsistent value assignments to all the

variables They use a repair or hill climbing metaphor to move towards

more and more complete solutions To avoid getting stuck at lo cal max

ima they are equipp ed with various heuristics for randomizing the search or

for dynamically changing the guiding criterion function by constraint weighting

While these metho ds can often b e sp ectacularly successful their sto chastic na

ture generally voids the guarantee of completeness provided by the systematic

metho ds and thus in particular prevents a pro of of unsatisability or optimal

ity Analyzing the p ower of these metho ds and understanding how to integrate

them into a general CP framework are challenging research topics

Structuredriven algorithms Problem structure can b e characterized and

exploited at the micro level the structure of the constraints and the

level the structure of the constraint network

Many structuredriven techniques emerged from the top ological characteri

zation of tractable problems describ ed in the next section Various graphbased

techniques whose complexities are tied to graph parameters were identied

Even when the macro structure of the original problem do es not have a char

acterized tractable structure eg a tree structure we may still take advantage

of tractability results For example treeclustering transforms a problem into

a treestructured metaproblem whose variables are subproblems of the original

problem and the cycle cutset metho d extracts a treestructured subproblem

from the original problem The micro structure can b e exploited by for ex

ample developing sp ecic consistency enforcing algorithms for sp ecic classes

of constraints or removing values that are redundant b ecause they participate

in the same solutions eg see Section

Structuredriven algorithms such as variable elimination clustering and con

ditioning can b e applied across many areas of reasoning such as satisability so

lution of linear inequalities b elief assessment and b elief maximization in Bayes

networks combinatorial optimization and planning under uncertainity

Tractability The identication of p olynomially recognizable restrictions that

are sucient to ensure tractability is imp ortant from b oth the theoretical and

the practical p oints of view and has b een extensively studied over the last

two decades Most tractable classes were recognized by realizing that enforc

ing lowlevel consistency in p olynomial time guarantees global consistency or

backtrackfree search eg

The basic network structure that supp orts tractability is a generalized tree

structure This has b een observed rep eatedly from dierent p ersp ectives in

constraint theory complexity theory and database theory In particular

enforcing arc consistency in a network having a tree structure ensures global

consistency along some ordering

Tractable classes characterized at the micro level have exploited ideas such

as tight domains and tight constraints rowconvex networks implicational con

straints and maxordered constraints These classes justify the intuition that

problems having large domains and higher arity constraints are generally harder

The investigation of classes of constraints that ensure tractability in whichever

way they are combined has related tractability to algebraic closure prop erties

of the constraints

Finally sp ecial classes of constraints asso ciated with temp oral reasoning

have received much attention in the last decade Tractable classses include

subsets of Allens qualitative interval algebra as well as quantitative binary

linear inequalities over the reals of the form X Y a The fo cus in the

AI community in contrast to OR is on handling new types of queries and on

combining such constraints with qualitative constraints

Generating hard instances Another theme that has received great interest

recently is lo cating the really hard problems It turns out that when

problems are generated randomly most of them are very easy Consequently

sp ecial care is needed in selecting the random generator if nontrivial problems

are to b e pro duced It has recently b een demonstrated that most random gen

erators have a phase transition from easy to hard where hard distributions are

lo cated wherever only few solutions exist

Applications The algorithms describ ed ab ove serve as generalpurp ose infer

ence engines for accomplishing tasks mo deled as constraint satisfaction prob

lems Many tasks are naturally so mo deled

Reasoning tasks including default reasoning ab duction causal reasoning

diagnostic reasoning temp oral reasoning spatial reasoning

Cognitive tasks including machine vision natural language pro cessing

planning

Task domains including scheduling resource allo cation conguration de

sign

Constraint Programming in Databases

The imp ortance of constraints in the context of databases has b een recognized

for a long time For instance in SQL the current standard for SQL simple

arithmetic constraints can b e used in dening queries and assertions which

are a form of integrity constraint that is conditions that must b e satised

by a database instance The use of arithmetic constraints for semantic query

optimization and optimization of SQL queries involving constraints has b een

extensively investigated

The area of constraint databases CDBs in which constraints are integrated

as a basic datatype has emerged recently prompted by the seminal work of

Constraint databases naturally extend relational deductive or ob jectoriented

databases by making feasible the use of constraints to represent p ossibly innite

but nitely representable complex data This has turned out to b e natural

for many application domains since constraints p ossess great mo deling p ower

Constraints serve as a highly uniform data type for conceptual representation

of heterogeneous data including spatial and temp oral b ehavior complex design

requirements and partial and incomplete information

For example arithmetic constraints over real variables within a subset of rst

order logic can describ e a wide variety of data including or D geographic

maps geometric mo deling ob jects for CADCAM elds of vision of sensors D

for time tra jectories of ob jects moving in D space based on the move

ments equations translation of dierent systems of co ordinates op erations re

search type mo dels such as manufacturing patterns describing interconnections

b etween quantities of manufactured pro ducts and resource materials

The notion of constraint data relies on a simple and fundamental duality a

constraint formula in free variables x x is interpreted as a set of tuples

1 n

a a over the scheme x x that satisfy Conversely a nitely

1 n 1 n

representable relation over the scheme x x can b e viewed as a constraint

1 n

For example a constraint w z with variables ranging

over reals is interpreted as the set fw z j w z g

and describ es say the rectangle shap e of a desk given in its lo cal system of

co ordinates w z Users can intuitively think of a constraint as an ob ject

in space ie space of p oints or as a symbolic expression interchangeably

dep ending on the application and context of its use We will use a generic name

constraint object in the context of databases

A constraint ob ject is usually represented by a collection of atomic con

straints such as real p olynomial linear or dense order and their logical com

binations Constraint ob jects are manipulated by means of a constraint cal

culusalgebra involving logical op erations such as quantication conjunction

disjunction negation and implication If we only use linear constraint over reals

within rstorder logic we can express any linear transformation such as rota

tion translation and stretch check convexity discreteness and b oundedness

compute convex hull augment ob jects change co ordinate systems etc

Thus constraint ob jects can b e manipulated by a very expressive and general

purp ose language as opp osed to using separate custom op erators for each sp e

cic type of transformations as done typically in extensible or spatial database

systems For many useful constraint domains query languages manipulat

ing constraint ob jects are highly optimizable in terms of indexing and ltering

eg and constraint algebra algorithms and

eg Examples of implemented constraint databases are

While the use of constraints as data is a central feature in constraint databases

an imp ortant contribution of the eld is the technology that has b een devel

op ed with regard to the use of constraints for optimizing evaluation of database

queries The idea of storing constraints as tuples in the database socalled

magic template tuples and using this information to prune the search during

database query evaluation was rst prop osed in The idea was rened in

to allow constraint propagation without actually storing constraints in

the database for the case of nonrecursive SQL queries by careful rep ositioning

of the constraints in a query This prompted a series of work on the rep osi

tioning of constraints in recursive and nonrecursive database queries for the

purp ose of optimization such as pushing constraint selections in or

nding redundant parts of evaluation trees using query constraints in

The promise of the emerging constraint database work is that it will provide

a uniform framework for the declarative and ecient querying of symbolically

represented data Developing custom to ols for sp ecic applications usually re

quires considerable programming eort and yields pro ducts that are not easy

to change and may not p erform overall optimizations that interleave database

mathematical programming and computational geometry manipulation tech

niques Existing DBMS do not handle constraints as stored data and CLP

implementation techniques need to b e developed to deal with large amounts of

p ersistent data

The work considered p olynomial equality constraints as rules taking

advantage of their adirectionality prop osed a framework for integrating

abstract constraints into database query languages by providing a number of

design principles and studied mostly in terms of expressiveness and complex

ity a number of sp ecic instances A restricted form of linear constraints called

linear repeating points was used to mo del innite sequences of time p oints eg

More recent works on deductive databases eg considered manip

ulation and rep ositioning of constraints for optimizing Algorithms

for constraint algebra op erators such as constraint joins and generic global

optimization were studied in The work prop osed an ecient data

structure for secondary storage suitable for indexing constraints that achieves

not only the optimal space and time complexity as priority search trees but

also full clustering The work prop osed an approach to achieve the optimal

quality of constraint and spatial ltering A number of works consider sp ecial

constraint domains integer order constraints set constraints dense

order constraints Linear constraints over reals have drawn sp ecial attention

The use of constraints in spatial database queries was addressed

in The work used constraints to describ e incomplete information

Constraint aggregation was studied in

Constraint Programming in User Interfaces

Constraint programming has a long history of use in graphics and user interfaces

b eginning with Sketchpad system Common applications of constraints in

user interface construction include layout and other kinds of geometric con

straints maintaining consistency b etween application data and a view on that

data keeping multiple views consistent animation and providing semantic feed

back

Supp orting interactive user interfaces places a number of demands on con

straint satisfaction algorithms that may not arise in other application areas The

algorithms must b e fast in a typical interactive application the constraints

must b e resatised each time the screen is refreshed while moving some part

State and state change are also fundamental in these applications as geometric

ob jects are moved on the screen windows are reshap ed and so forth We typ

ically also require the algorithm to provide sp ecic values for variables rather

than symbolic solutions since the graphical elements must b e shown in some

lo cation

Two classes of algorithms in common use for User Interface UI applications

are oneway constraint algorithms and multiway lo cal propagation algorithms

In a oneway algorithm each constraint has a distinguished output variable

which the solver can set to satisfy that constraint the other variables are only

referenced by the constraint For example if c is the output variable in the

constraint a b c the solver can up date c to satisfy the constraint if a or

b changes A multiway lo cal propagation constraint includes a collection of

metho ds for satisfying that constraint For example the a b c constraint

would have three metho ds a c b b c a and c a b which can

b e used to nd a value for a b or c that will satisfy the constraint Examples

of user interface to olkits using oneway constraints include Amulet and

its predecessor Garnet Examples of multiway lo cal propagation algorithms

include DeltaBlue SkyBlue and QuickPlan These multiway

algorithms all also supp ort constraint hierarchies which allow for b oth

required and preferential constraints Constraint hierarchies are useful in such

common User Interface UI tasks as sp ecifying which parts of a gure we would

prefer to leave xed while moving some other part

Some algorithms allow for cycles of constraints eg simultaneous equations

and inequalities neither of which is supp orted by traditional lo cal propagation

algorithms Examples include QOCA which solves simultaneous linear

equation and inequality constraints while optimizing a quadratic expression

Bramble and Juno which use numerical solvers Indigo an interval

propagation algorithm for inequality constraints and DETAIL and Ultravi

olet b oth of which are hybrid algorithms supp orting b oth lo cal propagation

and cycle solvers

Constraint Programming in Op erations Research

Op erations Research is a vast eld represented by departments in ma jor univer

sities and industrial settings around the world The eld of OR has signicant

overlap with AI branchandbound search b eing a classic example tabu search

and simulated annealing b eing somewhat more recent examples CP is a much

smaller but emergent discipline which is situated at the conuence of Computer

Science CS AI and OR

A principal area of intersection of CP with OR is the eld of NPHard com

binatorial problems What most distinguishes OR approaches to these problems

is the consistent use of continuous metho ds based on linear programming With

this very successful metho d known as mixed integer programming an appli

cation is mo deled as a system of linear constraints on real and integer variables

To assist in the solution pro cess the mo del is enhanced with constraints known

as cuts that tighten the linear relaxation of the mo del This is often critical

in limiting the amount of search that is required to nd a solution Generat

ing the right cuts for a given application is a demanding craft which exploits

the mathematical structure of the problem The problem solving pro cess also

requires a linear programming andor mixed integer programming library

On the other hand in CP the emphasis has b een less on the mathematical

structure of the particular application and more on higher level mo deling and

solution metho ds and to ols and the integration of ideas from many dierent

constraint systems This has led to languages based on nite domain solvers

and linear programming solvers phase transition analysis of problem diculty

algorithmic advances etc It has also led to the expansion of the OR arsenal with

constraint solving libraries other than linear and mixed integer programming

libraries

A classic shared interest of CP and OR is In fact

in terms of languages the interaction b etween CP and OR go es back at least

to The formulation of a mixed integer program is quintessentially declara

tive Moreover the algebraic mo deling languages of OR such as GAMS AMPL

AIMMS provide an example of a very pure form of declarative programming

system This is in evolution and might well b e converg

ing with developments in the CP world as declarative programming systems

b ecome more op en to integrating other paradigms A case in p oint is the LP

language Linear Programming and Logic Programming which is designed

to encapsulate a part of the practice of OR namely mixed integer programming

and extensions

Work in OR on discrete optimization has also contributed to developments

in CP Indeed some of the recent success in CP on scheduling problems can

trace back to on the Job Shop Problem Conversely the CP work has

led to new algorithms for these and related applications and to the creation of

software to ols to facilitate exploitation of these techniques

As computational sciences such as OR develop more complex metho ds to deal

with more challenging applications a role to b e played by CP is to furnish soft

ware to ols and concepts to organize the construction of these systems To this

eort CP brings some new ideas and facility with program and language design

which will help bring OR technology to a much larger audience CP systems are

b eing used commercially in many application areas where they bring comp eti

tive advantage to users over traditional approaches in terms that often include

application development ease quality of solution and sp eed at obtaining this

solution Such applications are typically in the areas of scheduling disjunctive

constraints task intervals resource control cumulative b ottlenecks trans

p ortation cycle constraints lab elling heuristics p ersonnel rostering sequence

constraints workforce scheduling constraint co op eration circuit verication

Bo olean constraints electromechanical systems constraints and nite state

machines safety and fairness prop erties Some of these applications are de

scrib ed in the pro ceedings of the conferences on Practical Applications of Con

straint Technology PACT

Constraint Programming in Concurrency

As noted in Section the use of constraints as a convenient mechanisms for

pro cess communication and synchronization in a concurrent environment led

to the development of the CC paradigm where pro cesses interact by p osting

and asking constraints over a shared set of variables This very general and

elegant computational paradigm received a lot of b oth theoretical and imple

mentational attention since its conception in In fact the literature shows

many semantics eorts that try to adapt either the interleaving models of pro

cess description algebras to CC or the truly concurrent ones of Petri nets

and event structures Other theoretical eorts fo cus on the p ossibility

of analyzing CClike programs at compiletime and thus derive prop erties to b e

used at runtime This holds for example for the works on abstract interpreta

tion which execute CC programs on an abstract constraint domain with

the hop e to derive some useful knowledge for program simplication for those

on suspension analysis whose aim is to understand the conditions under

which CC program deadlo ck and for those on relating CC and CLP languages

which try to parallelize CLP programs using CCbased techniques or to

sequentialize CC programs via an analysis of their inherent concurrency

Languages like AKL Oz and CIAO are essentially based on the

CC ideas although they add many features mainly b ecause of application needs

and of eciency reasons For example AKL employs a mo del of computation

based on the socalled Andorra principles which basically leads to executing

all deterministic steps rst Oz is a lexically scop ed language with rstclass

pro cedures state and encapsulated search CIAO is an extensible constraint

language supp orting CCstyle concurrency and synchronization primitives in

combination with standard CLP programming as well as several control rules

Constraint Programming in Rob otics and Control The

ory

A ma jor challenge facing the constraint research community is to develop use

ful theoretical and practical to ols for the constraintbased design of embedded

intelligent systems An archetypal example of an application in this class is the

design of controllers for sensorybased rob ots

If we examine this problem we see that many of the to ols developed to date in

the CSP and CP paradigms are not adequate for the task despite the sup ercial

attraction of the constraintbased approach

The fundamental diculty is that for the most part the CSP and CP

paradigms presume an oline mo del of computation But intelligent systems

embedded as controllers in real physical systems must b e designed in an online

mo del Moreover the online mo del must b e based on various time structures

continuous discrete and eventbased The requisite online computations or

transductions are to b e p erformed over various type structures including con

tinuous and discrete domains These hybrid systems require new mo dels of

computation constraint satisfaction and constraint programming For exam

ple Zhang and Mackworth dened constraint satisfaction as a dynamic

system pro cess that approaches asymptotically the solution set of the given

p ossibly timevarying constraints Under this view constraint programming

is the creation of a dynamic system with the required prop erty Many rob ots

can b e designed as online constraintsatisfying devices A rob ot in

this restricted scheme can b e veried more easily Moreover given a constraint

based sp ecication and a mo del of the plant and the environment automatic

synthesis of a correct constraintsatisfying controller b ecomes feasible as shown

for a simple ballchasing rob ot in

Another approach has b een developed recently in for mo deling timed

reactive systems Reactive systems are those that react continuously with their

environment at a rate controlled by the environment Execution in a reactive

system pro ceeds in bursts of activity In each phase the environment stimu

lates the system with an input obtains a resp onse in b ounded time and may

then b e inactive with resp ect to the system for an arbitrary p erio d of time

b efore initiating the next burst Examples of reactive systems are controllers

and signalpro cessing systems The Timed concurrent constraint programming

TCC framework extends CCP by adopting the synchrony hypothesis of lan

guages such as Esterel Program control constructs are determinate primitives

that resp ond instantaneously to input signals At any instant the presence and

the absence of signals can b e detected This is accomplished by augmenting

CCP with two constructs rst hence A requires that the program A b e ex

ecuted at every time instant from the next time onwards Next a construct

if c else A is added which requires A to b e triggered if the constraint c is not

enforced now or through quiescence This nonmonotonic control construct

is motivated by Reiters Default Logic and provides a very p owerful and sim

ple way to formalize the elab orate synchrony constructs of languages such as

ESTEREL and LUSTRE The same ideas have b een used to extend CCP to

continuous time by introducing the notion of autonomous activity constraints

of the form ddtX k which allow a variable to vary continuously with

real time indep endent of stimulus from the environment and changing the

underlying mo del of time from the integers to the reals The resulting frame

work is quite simple mathematically and a very p owerful basis for comp ositional

mo deling

The mo deling and design of rob otics systems and embedded control systems

presents a serious challenge and opp ortunity for constraintbased theories of

computation

Constraint Systems and Programming Tools

Despite the youth of the eld a go o d number of to ols for developing constraint

programs have b ecome available and a substantial set of techniques has b een

developed to supp ort the ecient implementation of such programs

Constraint Domains and Solving Techniques

A relatively small number of constraint systems with their asso ciated solution

techniques have b een used as a basis for several concrete implementations The

four most imp ortant domains other than rational trees are Bo olean constraints

Finite Domains real intervals and linear constraints other examples include lists

and nite sets

Bo olean constraints are either treated by a sp ecialized constraint solver as

in CHIP or Prolog I I I or seen as a sp ecialized case of nite domain constraints

In the latter a Bo olean is considered as an integer b etween false and

true as in CLPBNR Prolog IV clpFD or ILOG Solver There has also

b een work on constraint solving over more general Bo olean algebras

Finite domain constraints are constraints on integer valued variables These

constraints are useful in many application areas They are usually solved by

combining propagation techniques such as arcconsistency with backtracking

search Each variable is asso ciated with a nite set of p ossible values p ossi

ble starting time for an activity p ossible comp onent for an assembly p ossible

coworkers for a team member and so on This set is called the domain of a

variable Inconsistent values are removed from the domain of variables during

propagation and then search tries to assign a value to each variable

The propagation phase is built on a very simple idea remove inconsistent

values from the domain of the variables For instance assume that x y and

z are three variables with integer values in the closed interval with the

constraint y z We can see that the value of y will b e at least Since the

constraint states that z must b e greater than y z is no longer p ossible

For that reason is removed from the domain of z which b ecomes

Similarly the domain of y b ecomes The domain of x remains unchanged

since no constraints involve x at this p oint Lets assume now that we add

another constraint say x y z Now the minimal p ossible value for y is

and the minimal p ossible value for z is so x has to b e at least The domain

of x is then reduced to Furthermore as the maximal p ossible value for

x is and the minimal value of y is z which is equal to x y must b e at

most Similarly y which is equal to x z must b e smaller than

Real interval constraints are the analog of nite domains when reals are

considered instead of integers As it is imp ossible to explicitly represent the set

of reals that a variable can take the domain of a real variable is an interval whose

b ounds are oating p oint numbers The techniques for removing inconsistent

values are either similar to nite domain techniques eg in CLPBNR Prolog

IV and ILOG Solver or they are based on mathematical techniques such as au

tomatic dierentiation and Taylor series as in Newton and Helios Real interval

constraints usually include trigonometric and other non linear constraints

Linear constraints are constraints p osted on real variables which have a

sp ecial form they only involve weighted sums of variables no pro duct or more

complex expressions For such constraints very ecient constraint solvers have

b een implemented using the Simplex algorithm as a starting p oint Some linear

constraint solvers use innite precision rational numbers some other use oat

ing p oint computations The former is more accurate while the latter is more

ecient Interior p oint metho ds have b een introduced in linear programming

libraries but have not impacted constraint programming more generally

Global constraints The removal of inconsistent values can b e tricky for

more complex constraints An imp ortant line of work aims to dene go o d prop

agation algorithm for more complex constraints This is sometime referred to

as global constraints In this context scheduling constraints alldierent a set

of variables takes on values that are all dierent and cardinality constraints

the number of constraints within a set that must b e satised is required to

b e within given lower and upp er b ounds and spatial constraints have b een

studied in detail in the literature The use of global constraints is often the key

for a successful application For instance in scheduling some constraints can

b e used to state that a given resource has a nite capacity which limits the

number of tasks that can require the resource at any time The propagation

of such a constraint requires sophisticated algorithm adapted from Op erations

Research

UserDened Constraints One of the lessons learned so far from the ap

plication of CP to ols in practice is that domain sp ecic constraints are often

needed In other words the user of these systems often needs to extend the

constraint system with some constraints that are sp ecic to the application in

hand Several prop osal have b een made for making it p ossible for the user to

add domain sp ecic constraints to the system and to tailor the underlying con

straint solver or program a new sp ecic solver to these sp ecic constraints

This is called the glassbox approach in contrast with the original CLP idea of

the constraint solver as a black b ox

Building on progress in the area of Concurrent Constraint Programming

some languages provide constructs for dening the propagation of a constraint

within the language examples are ccfd and clpfd Some others

prop ose to view a constraint as a Bo olean expression The Bo olean variable is

true if the constraint is necessarily true entailed by the other constraints The

Bo olean variable is false if the negation of the constraint is entailed by the other

constraints This enables the combination of constraints with logical op erators

or not and as well as some more complex constructs such as cardinality used

for example in CLPBNR Prolog IV and ILOG Solver A related approach

is to dene constraints using a rewrite system as in the Constraint Handling

Rules solution The promise of such a sp ecialpurp ose language for dening

constraint systems is that prop erties of a constraintsolver such as termination

and conuence can b e tackled indep endently of a particular constraint system

Yet another approach is to provide ho oks in the parameter passing mech

anism of the language eg within unication for CLP systems through at

tributed variables or metaterms This approach is used extensively in

i e

the implementation of constraint solvers in systems such as ECL PS SIC

Stus and CIAO A last approach is motivated by the need for adding

supp ort for global constraints In that case the denition of the constraint is

done in an imp erative language and linked with the CP system using an ob ject

oriented proto col used in CHARME ILOG Solver Oz CHIP This approach

was called the No Box approach of Puget and Leconte and p otentially yields

the most ecient implementations although implying a higher programming

load

Constraint Programming Tools

The constraint systems discussed ab ove have b een integrated into dierent pro

gramming languages ranging from subsets of rst order logic to imp erative

languages such as C or even sp ecialized languages One of the most p opu

lar approaches is to use Horn clauses as a basis as in Prolog and then extend

this with one or more constraint systems in addition to unication over Her

brand terms This Constraint Logic Programming approach has led to many

imp ortant to ols including CLPR linear constraints Prolog III Bo oleans

linear constraints and lists CHIP Bo oleans linear constraints nite domains

i e

clpfd nite domains Bo oleans ECL PS nite domains linear constraints

CAL GDCC etc

Another p opular approach is to embed CLP techniques in a dierent host

language leading to another set of to ols which includes the following for each

of them we indicate b oth the underlying programming language together with

the constraint domains supp orted

CHARME sp ecialized language with Clike syntax and nite domains

LP Cbased language with linear constraints

ILOG Solver C library with Bo oleans nite domains real intervals

and linear constraints

HELIOS sp ecialized mo deling language with real intervals

Finally a number of systems oer a concurrent language as the underlying

programming comp onent concurrent constraint languages

AKL nondeterministic concurrent constraint language with nite do

mains Supp orts b oth CC and CLP programming styles Supp orts parallel

execution

Oz sp ecialized concurrent multiparadigm language ob ject oriented higher

order functional search with nite domains Supp ort for distributed ex

ecution

CIAO extensible concurrent constraint logic language with linear con

straints Supp orts CCstyle programming within CLP parallel and dis

tributed execution several control rules functions

In addition to these and other relatively generalpurp ose to ols also to ols

which are sp ecically tailored to certain problem classes have b een prop osed

For example ILOG Schedule is a to ol built using ILOG Solver functionality and

is sp ecically tailored to solving scheduling problems while oering a simple

graphical user interface

Debugging and visualization to ols

The development of industrial applications using early CP systems has p ointed

out the need for studying CP sp ecic debugging techniques b eyond those tra

ditionally used for imp erative or logic programming systems on which they are

based Applying traditional metho ds which include standard program tracing

as well as declarative debugging approaches often suce for developing

correct programs but understanding the p erformance of CP programs often

requires additional to ols Prop osed solutions include b oth compiletime and

runtime techniques A compiletime technique which has received some atten

tion is the static generation andor checking of assertions Such assertions can

b e seen as a generalization of type systems in which relatively general precondi

tions and p ostconditions expressed as constraints can b e declared for pro cedures

Assertions can b e provided by the user andor checked by the compiler when

p ossible via global analysis Alternatively they can b e generated by the com

piler and the user can insp ect them for errors In b oth cases global analysis

techniques and systems similar to those used by the compiler for optimization

purp oses discussed later in this section can b e used for these purp oses eg

as well as p erhaps other pro of techniques previously used in logic pro

gramming eg based on induction assertion A runtime technique which is

currently receiving much attention is the use of visualization b oth of the search

space and of the constraint store at dierent p oints of execution

Constraint Programming Language Implementation

Techniques

Compilers and abstract machines The programming comp onent that CP

oers as an essential addition to the constraint solving capabilities is imple

mented in an ecient way in most current CP programming systems via com

pilation In the case of library systems built on top of conventional program

ming languages such as for example ILOG built on top of C the com

pilation of the control comp onent is provided by the host language compiler

In the case of systems which oer a programming language the programming

comp onent is as mentioned b efore very often oered by a logic programming

based language Compilation is then generally based at least conceptually on

a translation to an abstract machine instruction set eg The

target abstract machines used are most often generalization of the Warren Ab

stract Machine which has proven extremely successful in the context of logic

programming The WAM approach essentially provides a view of the compila

tion of these languages as a generalization of the standard techniques used in

conventional languages allowing most of the conventional optimizations

Global Analysis As a result of the compilationbased approach the p erfor

mance of current systems is quite acceptable when running co de where general

purp ose constraint solving is p erformed On the other hand this approach alone

cannot always provide p erformance in the control comp onent that is comp eti

tive with other languages In particular their p erformance often do es not reach

that of traditional logic programming systems in symbolic applications and is

generally far from that of traditional imp erative programming languages in non

constraint related numerical applications The most generally accepted solution

to this has b een to develop advanced compilation technology capable of detect

ing the cases where limited or no constraint solving is involved and compiling

those cases in the most ecient way Some signicant progress has already b een

made in practical global analysis and optimization of constraint logic program

ming systems Results on the p ossible sp eedups obtainable with global analysis

information have b een studied eg practical frameworks for global

analysis developed eg and some CP systems have b een rep orted which

p erform global analysis based optimization Such global analysis has

also b een applied to concurrent CP systems where one of the most imp ortant

ob jectives is to reduce susp ension and resumption of goals and synchroniza

tion overhead Finally recent progress in incremental global

analysis eg has the p otential to solve most remaining problems related

to supp orting large programs and the use of global analysis in the interactive

program development environment that is common in constraint programming

systems However the application of extensive optimization in commercial or

widely used public domain systems still remains a goal to b e achieved Also

much research remains to b e done in nding accurate abstraction techniques for

standard constraint systems

Parallelization A program optimization which has shown signicant sp eedups

in the context of logic programs is automatic parallelization Exploita

tion of parallelism in the search orparallelism is comparatively easy and has

b een shown to provide sp eedups in several industrial applications containing

extensive search On the other hand comparatively little work has

b een devoted so far to exploiting parallelism within a given path of the search

andparallelism and in the solver itself Although traditional concepts of in

dep endence used in imp erative programming eg the Bernstein conditions

or even those of logic programming do not apply in the context of CP

notions of indep endence appropriate for concurrent CP have b een recently

prop osed Based on this parallelizing compilers as well as andparallel

abstract machines for CP languages have recently b ecome available and initial

p erformance results are encouraging

Promising Directions

Constraint programming has by now shown that constraints can b e used not only

to represent knowledge but also as a way to guide search prune useless branches

lter queries and describ e pro cess communication and synchronization With

this is mind we may identify several directions for research that are promising

for systems programming environments mo dels and application packages

More realistic constraint systems and languages We need to develop

more automatic and systematic ways to acquire and mo del domainsp ecic and

problemsp ecic knowledge developing a richer paradigm to cop e with the prop

erties and uncertainties of realworld information Of course representation and

reasoning are always two sides of the same coin As we consider new classes of

constraints we must also consider new metho ds to compute with them au

tomating the mo deling pro cess will itself require capturing some very sophisti

cated reasoning skills Moreover b etter theoretical and empirical understanding

is needed of the relationship b etween realworld problem parameters and search

metho ds An imp ortant issue is that of overconstrained constraint problems

since most reallife problems are indeed overconstrained Thus either the

constraint domain or the language itself should b e exible enough to b e able

to deal with such situations and solve them in some satisfactory way For exam

ple the constraints and constraint solving algorithms could take into account

the presence of preferences of some sort andor the language could

allow for userguided constraint retraction and intelligible explanations

for failure This of course would bring the constraint satisfaction and program

ming tasks closer to the issues present in optimization problems since in the

presence of preferences one has to decide the b est way to choose andor retract

constraints Thus sp ecial attention has to b e paid to the interrelation b etween

AI and OR techniques for such tasks In particular we must take advantage

of the co existence in the constraint satisfaction world of dierent metho ds

eg systematic and sto chastic search and dierent disciplines eg articial

intelligence and op erations research

Ecient mo deling Constraint satisfaction knowledge can b e represented

very declaratively without regard to how it is to b e used However mo deling

a sp ecic problem is not a trivial task esp ecially since how it is mo deled can

dramatically aect how well our algorithms p erform We need to automate the

pro cess of moving from problem descriptions natural to the problem domain to

problem descriptions designed for ecient solution A variety of problemsolving

techniques are now available to us but synthesizing appropriate algorithms for

sp ecic tasks should b e automated In addition robust constraint compu

tation must cop e with change in the world and in mo dels and with noise eg

in data and uncertainity eg in parameter values

Towards constraintbased distributed systems Another challenge for

constraint programming systems is related to the role of such systems in network

wide programming This type of programming is likely to b e of growing imp or

tance given the fact that the recent wider diusion of the Internet and the

p opularity of the World Wide Web WWW proto cols are eectively provid

ing a new platform that is standard and ubiquitous and allows a new class of

highly sophisticated distributed applications Features of constraints like the

ability of describing intra and interprocess communication and synchroniza

tion are more and more imp ortant in practical applications which consist of

distributed environments where b oth lo cal problem solving and global synchro

nization and co ordination is needed This is added to the fact that many CP

systems already oer many other characteristics that make them well suited

in this context These include dynamic memory management well b ehaved

structure and p ointer manipulation robustness dynamic compilation to archi

tecture indep endent bytecode dynamic databases search facilities grammars

co de motion and sophisticated metaprogramming A number of distributed

concurrent constraint systems are currently b eing worked on application de

velopment libraries are b eing oered and network and WWW applications are

b eing rep orted It app ears that CP is a promising foundation for most as

p ects of the next generation of distributed systems where all the advantages of

constraints may co exist and thus lead to simple elegant and practically usable

environments

Another interesting related application domain is D graphics and Virtual

Reality Many interactions b etween ob jects eg attachments minimal dis

tances noncollision etc or general integrity rules such as energy conservation

laws can b e considered as constraints and implemented eciently as such This

generalizes in an obvious way D geometrical constraints Basically constraints

can b e used to enforce hidden relations b etween ob jects and thus make sure

that the simulated virtual world do es not depart to o much from our real one

Towards faster more ecient systems While the p erformance and com

puting resource economy of current CP systems has proved to b e adequate in sig

nicant industrial applications comp eting very favorably with other techniques

and approaches it app ears that there still remain many avenues for improve

ment which would make the technology even more comp etitive It is exp ected

that improving execution sp eed and reducing further resource consumption can

improve the acceptance of the approach for general purp ose programming as well

as encouraging the inclusion of constraint programming techniques constructs

and libraries in conventional languages Interesting techniques to b e further ex

plored include advanced compilation based on global analysis and automatic

program and solver parallelization In fact parallelization is b ecoming more and

more interesting since multiprocessing hardware is starting to b e in many cases

the default installation platform for example for departmental servers where

multiprocessors using fast inexp ensive otheshelf pro cessors are often replac

ing mainframes at a fraction of their cost Also multiprocessor workstations

are not unusual any more It app ears likely that this trend towards increased

use of parallelism will continue as multiprocessor architectures are b etter un

dersto o d interconnection network p erformance increases with new technologies

sp ecially if the promise of optical interconnect is nally delivered and feature

size diminishes allowing placement of several pro cessors on the same chip

Constraint databases Many challenges in constraint databases are yet to

b e addressed Sp ecic directions of work include constraint mo deling canonical

forms and algebras data mo dels and query languages indexing and approximation

based ltering constraint algebra algorithms and global optimization systems

and case studies In addition robust widely available implementations of these

ideas need to b e developed

User interfaces In user interface applications there is a constant need for

new constraint satisfaction algorithms that can handle a wider range of con

straints that arise in such applications and algorithms and data structures

with improved space and time eciency

The development of b etter p erformance debugging techniques and more

useful visualization paradigms for several constraint domains and solving al

gorithms also oers an interesting research direction Currently at least one

Europ ean pro ject has started working on the development of b oth assertion

based and visualization based debugging techniques for CLP systems

Among the issues that should b e addressed are ways of describing the desired

constraints at a higher level of abstraction closer to the domain of interest

studying the mo dels users have of constraint systems and as needed evolving

those systems to allow for clearer and more easily understo o d user mo dels

Acknowledgments We gratefully acknowledge very valuable and timely com

ments from Thomas Fruhwirth John Ho oker Michael Maher Catuscia Palamidessi

Peter Revesz Mark Wallace Peter van Beek and Roland Yap Particular thanks

to Vineet Gupta for invaluable lastminute assistance

References

F Afrati S Cosmadakis S Grumbach and G Kup er Linear versus

p olynomial constraints in database query languages In A Borning edi

tor Proceedings of the International Workshop on Principles and Practice

of Constraint Programming volume of LNCS pages Orcas

Island WA Springer Verlag

Hassan AitKaci and Andreas Podelski Towards a meaning of LIFE

Journal of Logic Programming

J Allen Maintaining knowledge ab out temp oral intervals Communica

tions of the ACM

I Balbin DB Kemp K Meenakshi and K Ramamohanarao Propa

gating constraints in recursive deductive databases In Proceedings of the

North American Conference on Logic Programming

E Best FS De Bo er and C Palamidessi Concurrent constraint pro

gramming with information removal In First Conference on Concurrent

Constraint Programming Venice

S Bistarelli U Montanari and F Rossi Constraint Solving over Semir

ings In Proceedings of the International Joint Conference on Articial

Intel ligence Morgan Kaufman

FS De Bo er and C Palamidessi A fully abstract mo del for concurrent

constraint programming In Proceedings of the CAAP SpringerVerlag

A Borning The programming language asp ects of ThingLab a constraint

oriented simulation lab oratory ACM Transaction on Programming Lan

guages and Systems

A Borning R Anderson and B FreemanBenson Indigo A lo cal prop

agation algorithm for inequality constraints In Proceedings of the ACM

SIGGRAPH Symposium on User Interface Software and Technology Seat

tle November

A Borning and B FreemanBenson The OTI constraint solver A con

straint library for constructing interactive graphical user interfaces In

U Montanari and F Rossi editors Proceedings of the International Con

ference on Principles and Practice of Constraint Programming volume

pages Cassis France SpringerVerlag

A Borning B FreemanBenson and M Wilson Constraint hierarchies

Lisp and Symbolic Computation September

A Bro dsky J Jaar and MJ Maher Toward practical constraint

databases In Proceedings of the International Conference on Very Large

Data Bases Dublin

A Bro dsky C Lassez JL Lassez and M J Maher Separability of

p olyhedra for optimal ltering of spatial and constraint data In Proceed

ings of the ACM Symposium on Principles of Database Systems ACM

Press

F Bueno M Jose Garcia de la Banda M Hermenegildo U Montanari

and F Rossi From eventual to atomic and lo cally atomic CC programs

A concurrent semantics In Proceedings of the International Conference

on Algebraic and Logic Programming

F Bueno M Jose Garcia de la Banda M Hermenegildo F Rossi and

U Montanari Towards true concurrency semantics based transformation

b etween CLP and CC In A Borning editor Proceedings of the Interna

tional Workshop on Principles and Practice of Constraint Programming

volume of LNCS Orcas Island WA SpringerVerlag

JH Byon and P Revesz Disco A constraint database system with

sets In CONTESSA Workshop on Constraint Databases and Applications

September

J Carlier and E Pinson An algorithm for solving the job shop problem

Management Science

J Chassin and P Co dognet Parallel Logic Programming Systems Com

puting Surveys September

P Cheeseman B Kanefsky and W Taylor Where the really hard prob

lems are In Proceedings of the International Joint Conference on Articial

Iintel ligence pages

M Co dish M Falaschi and K Marriott Susp ension analysis for concur

rent logic programs ACM Transactions on Programming Languages and

Systems

M Co dish M Falaschi K Marriott and W Winsb orough Ecient

analysis of concurrent constraint logic programs In Proceedings of the In

ternational Col loquium on Automata Languages and Programming Lund

Sweden July

C Co dognet P Co dognet and M Corsini Abstract interpretation for

concurrent logic languages In Proceedings of the North American Con

ference on Logic Programming MIT Press

P Co dognet and D Diaz Compiling constraints in clpfd Journal of

Logic Programming

P Co dognet and F Rossi NMCC Programming Constraint Enforcement

and Retraction in CC Programming In Proceedings of the International

Conference on Logic Programming

A Colmerauer An introduction to PrologIII Communication of the

ACM

R Dechter Enhancement schemes for constraint pro cessing Backjump

ing learning and cutset decomp osition Articial Intel ligence

R Dechter Constraint networks Encyclopedia of Articial Intel ligence

pages

R Dechter I Meiri and J Pearl Temporal constraint networks Articial

Intel ligence

R Dechter and J Pearl Networkbased heuristics for constraint satisfac

tion problems Articial Intel ligence

R Dechter and P van Beek From lo cal to global relational consistency

In U Montanari and F Rossi editors Proceeding of the International

Conference on Constraint Programming volume Cassis France

SpringerVerlag A full version to app ear in Theoretical

M Dincbas P Van Hentenryck H Simonis A Aggoun T Graf and

F Berthier The constraint logic programming language CHIP In Pro

ceedings of the International Conference on Fifth Generation Computer

Systems Tokyo Japan

Europ ean Computer Research Center Eclipse Users Guide

Moreno Falaschi Maurizio Gabbrielli Kim Marriott and Catuscia

Palamidessi Comp ositional analysis for concurrent constraint program

ming In Proceedings of the Annual IEEE Symposium on Logic in Com

puter Science pages IEEE Computer So ciety Press

R Fikes A Heuristic Program for Solving Problems Stated as Non

deterministic Procedures PhD thesis Carnegie Mellon University

E C Freuder Synthesizing constraint expressions Communications of

the ACM

E C Freuder A sucient condition for backtrackfree search Journal of

the ACM

E C Freuder Exploiting structure in constraint satisfaction problems

In B Mayoh E Tyugu and J Penjam editors Constraint Programming

NATO ASI series pages SpringerVerlag

E C Freuder editor Principles and Practice of Constraint Programming

CP number in LNCS SpringerVerlag

T Fruhwirth Constraint handling rules In A Podelski editor Constraint

Programming Basics and Trends number in LNCS pages

SpringerVerlag

T Fruhwirth A Herold V K ucheno T Le Provost and P Lim Con

straint logic programming an informal introduction In Logic Program

ming in Action number in LNCS pages SpringerVerlag

M Garca de la Banda F Bueno and M Hermenegildo Towards in

dep endent AndParallelism in CLP In Proceedings of the International

Symposium on Programming Language Implementation and Logic Pro

gramming LNCS Springer Verlag September

M Garca de la Banda M Hermenegildo M Bruyno oghe V Dumortier

G Janssens and W Simo ens Global Analysis of Constraint Logic Pro

grams In ACM Transactions on Programming Languages and Systems

ACM To app ear

M Garca de la Banda M Hermenegildo and K Marriott Indep endence

in Constraint Logic Programs In Proceedings of the International Logic

Programming Symposium pages MIT Press Cambridge MA

Octob er

M Garca de la Banda K Marriott and P Stuckey Ecient Analysis of

Constraint Logic Programs with Dynamic Scheduling In Proceedings of

the International Logic Programming Symposium Portland OR Decem

b er MIT Press Cambridge MA

J Gaschnig Performance measurement and analysis of search algorithms

Technical Rep ort CMUCS Carnegie Mellon University Pitts

burgh Pa

M Gleicher Practical issues in programming constraints In V A

Saraswat and P Van Hentenryck editors Principles and Practice of Con

straint Programming The Newport Papers pages MIT Press

D Q Goldin and PC Kanellakis Constraint query algebras Constraints

K Govindara jan B Jayaraman and S Mantha Optimization and Re

laxation in Constraint Logic Languages In Proceedings of the ACM Sym

posium on Principles of Programming Languages

R GrossBrunschwiler Implementation of Constraint Database system

using a compiletime rewrite aproach PhD thesis ETH

S Grumbach and J Su Denseorder constraint databases In Proceedings

of the ACM Symposium on Principles of Database Systems

S Grumbach J Su and C Tollu Linear constraint databases In Pro

ceedings of the LCC To appear in LNCS SpringerVerlag volume

V Gupta R Jagadeesan and V A Saraswat Truly concurrent constraint

programming In U Montanari and V Sassone editors CONCUR

Concurrency Theory volume of LNCS

V Gupta R Jagadeesan and V A Saraswat Computing with continu

ous change Science of Computer Programming To app ear

V Gupta R Jagadeesan V A Saraswat and D G Bobrow Program

ming in hybrid constraint languages In Antsaklis Kohn Nero de and

Sastry editors Hybrid Systems II volume of LNCS Springer Verlag

November

MR Hansen BS Hansen P Lucas and P van Emde Boas Integrat

ing relational databases and constraint languages Computer Languages

M Haralick and J Elliot Increasing treesearch eciency for constraint

satisfaction problems Articial Intel ligence

S Haridi and S Janson Kernel Andorra Prolog and its Computational

Mo del In Proceedings of the International Conference on Logic Program

ming MIT Press

R Helm T Huynh C Lassez and K Marriott A linear constraint

technology for interactive graphic systems In Graphics Interface

pages

P Van Hentenryck Constraint Satisfaction in Logic Programming MIT

Press

P Van Hentenryck Parallel Constraint Satisfaction in Logic Program

ming In International Conference on Logic Programming pages

Lisb on Portugal June MIT Press

P Van Hentenryck Constraint logic programming Know ledge Engineer

ing Review

P Van Hentenryck V A Saraswat and Y Deville Constraint pro cessing

in ccfd In A Podelski editor Constraint Programming Basics and

Trends Springer Verlag LNCS

M Hermenegildo K Marriott G Puebla and P Stuckey Incremental

Analysis of Logic Programs In International Conference on Logic Pro

gramming pages MIT Press June

M Hermenegildo and the CLIP group Some Metho dological Issues in

the Design of CIAO A Generic Parallel Concurrent Constraint System

In Principles and Practice of Constraint Programming LNCS pages

SpringerVerlag May

A Heydon and G Nelson The Juno constraintbased drawing editor

Technical Rep ort a DEC Systems Research Center Palo Alto CA

C Holzbaur Metastructures vs Attributed Variables in the Context

of Extensible Unication In International Symposium on Programming

Language Implementation and Logic Programming volume of LNCS

pages Springer Verlag August

H Hosob e S Matsuoka and A Yonezawa Generalized lo cal propagation

A framework for solving constraint hierarchies In E C Freuder editor

Proceedings of the International Conference on Principles and Practice of

Constraint Programming volume Boston SpringerVerlag

J Jaar and JL Lassez Constraint logic programming In Proceedings

of the of the ACM Symposium on Principles of Programming Languages

ACM

J Jaar and MJ Maher Constraint Logic Programming A Survey

Journal of Logic Programming

J Jaar S Michaylov P Stuckey and R Yap An abstract machine for

CLPR In Proceedings of the ACM SIGPLAN Conference on Program

ming Language Design and Implementation pages San Fran

cisco June

J Jaar S Michaylov P Stuckey and R Yap The CLPR Language

and System ACM Transactions on Programming Languages and Systems

M Jamp el E Freuder and M Maher editors OverConstrained Systems

number in LNCS SpringerVerlag

P Jeavons D Cohen and M Gyssens A test for tractability In E C

Freuder editor Principles and Practice of Constraint Programming num

b er in LNCS pages SpringerVerlag Boston MA

JP Jouannaud editor Proceedings of the st Conference on Constraints

in Computational Logic CCL number in LNCS SpringerVerlag

F Kabanza JM Stevenne and P Wolper Handling innite temp oral

data In Proceedings of the ACM Symposium on Principles of Database

Systems

P Kanellakis G Kup er and P Revesz Constraint query languages

Journal of Computer and System Sciences pages

P Kanellakis S Ramaswamy DE Vengro and JS Vitter Indexing

for data mo dels with constraints and classes In Symposium on Principles

of Database Systems

AD Kelly A Macdonald K Marriott PJ Stuckey and RHC Yap

Eectiveness of optimizing compilation for clpr In Proceedings of the

Joint International Conference and Symposium on Logic Programming

pages MIT Press

G Kondrak and P van Beek A theoretical evaluation of selected back

tracking algorithms In Proceedings of the International Joint Conference

on Articial Iintel ligence pages Montreal

G M Kup er Aggregation in constraint databases In Proceedings of the

Workshop on Principles and Practice of Constraint Programming

JL Lassez MJ Maher and K Marriott Foundations of Deductive

Databases and Logic Programming chapter Unication Revisited Morgan

Kaufmann Publishers Inc

JL Lauriere A language and a program for stating and solving combi

natorial problems Articial Intel ligence

A Levy IS Mumick and Y Sagiv Query optimization by predicate

movearound In Proceedings of the VLDB Conference

A Levy and Y Sagiv Constraints and redundancy in datalog In Pro

ceedings of the ACM Symposium on Principles of Database Systems

LiangLiang Li Mike Reeve Kees Schuerman Andre Veron Jacques Bel

lone Claudine Pradelless Zissis Palaskas Takis Stamatop oulos Dominic

Clark S Doursenot Chris Rawlings Jack Shirazi and Guissepp e Sardu

APPLAUSE Applications using the ElipSys parallel CLP system In

Proceedings of the International Conference on Logic Programming pages

A K Mackworth Constraint satisfaction Encyclopedia of Articial In

tel ligence pages

A K Mackworth and E C Freuder The complexity of some p olyno

mial network consistency algorithms for constraint satisfaction problems

Articial Intel ligence

A K Mackworth and E C Freuder The complexity of constraint satis

faction revisited Articial Intel ligence

AK Mackworth Consistency in networks of relations Articial Intel li

gence

M J Maher Logic semantics for a class of committedchoice programs In

Proceedings of the International Conference on Logic Programming MIT

Press

K Marriott M Garca de la Banda and M Hermenegildo Analyz

ing Logic Programs with Dynamic Scheduling In Proceedings of the

ACM Symposium on Principles of Programming Languages pages

ACM January

K Marriott and P Stuckey The Rs of Optimizing Constraint Logic

Programs Renement Removal and Reordering In Proceedings of the

ACM Symposium on Principles of Programming Languages ACM

K McAlo on and C Tretko Logic mo deling and programming Annals

of To app ear

M Meier Grace User Manual Available at

httpwwwecrcdeeclipsehtmlgracegracehtml

S Minton Automatically Conguring Constraint Satisfaction Programs

A Case Study Constraints

S Minton M Johnston A Philips and P Laird Minimizing conicts

a heuristic repair metho d for constraint satisfaction and scheduling prob

lems Articial Intel ligence

U Montanari Networks of constraints Fundamental prop erties and ap

plication to picture pro cessing Information Science Also Tech

nical Rep ort Carnegie Mellon University

U Montanari and F Rossi A concurrent semantics for concurrent con

straint programming via contextual nets In V A Saraswat and P Van

Hentenryck editors Principles and Practice of Constraint Programming

The Newport Papers MIT Press

U Montanari and F Rossi editors Principles and Practice of Constraint

Programming number in LNCS SpringerVerlag

IS Mumick SJ Finkelstein H Pirahesh and R Ramakrishnan Magic

conditions In Proceedings of the ACM Symposium on Principles of

Database Systems pages

B Myers The Amulet User Interface Development Environment In

CHI Conference Companion Human Factors in Computing Systems

Vancouver BC April ACM SIGCHI

G Nemhauser and P Wolsey Integer and Combinatorial Optimization

J Wiley and Sons

U Neumerkel Extensible Unication by Metastructures In Proceeding

of the META workshop

D K Pai Least constraint A framework for the control of complex

mechanical systems In Proceedings of the American Control Conference

pages Boston MA June

J Paredaens J Van den Bussche and D Van Gucht Towards a theory

of spatial database queries In Proceedings of the ACM Symposium on

Principles of Database Systems

R Ramakrishnan Magic Templates A sp ellbinding approach to logic

programs In Proceedings of the International Conference on Logic Pro

gramming

P Z Revesz A closedform evaluation for datalog queries with integer

gaporder constraints Theoretical Computer Science August

P Z Revesz Datalog queries of set constraint databases In Proceedings

of the International Conference on Database Theory

F Rossi and U Montanari Concurrent semantics for concurrent con

straint programming In B Mayoh E Tyugu and J Penjam editors

Constraint Programming NATO ASI Series SpringerVerlag

M Sannella The SkyBlue constraint solver and its applications In V A

Saraswat and P Van Hentenryck editors Principles and Practice of Con

straint Programming The Newport Papers pages MIT Press

M Sannella J Maloney B FreemanBenson and A Borning Multi

way versus oneway constraints in user interfaces Exp erience with the

DeltaBlue algorithm SoftwarePractice and Experience

May

V A Saraswat Concurrent Constraint Programming MIT Press

ACM Do ctoral Dissertation Award and Logic Programming Series

V A Saraswat R Jagadeesan and V Gupta Timed Default Concurrent

Constraint Programming Journal of Symbolic Computation To app ear

Extended abstract app eared in Pro ceedings of the ACM Symp osium on

Principles of Programming Languages San Francisco January

V A Saraswat M Rinard and P Panangaden Semantic foundations

of concurrent constraint programming In Proceedings of the ACM Sym

posium on Principles of Programming Languages Orlando FL January

ACM

E Shapiro Algorithmic Program Debugging ACM Distiguished Disser

tation MIT Press

E Shapiro The family of concurrent logic programming languages ACM

Computing Survey

G Smolka The Oz programming mo del In Jan van Leeuwen editor

Computer Science Today number in LNCS pages Springer

Verlag Berlin

D Srivastava Subsumption and indexing in constraint query languages

with linear arithmetic constraints Annals of Mathematics and Articial

Intel ligence to appear

D Srivastava and R Ramakrishnan Pushing constraint selections In

Proceedings of the ACM Symposium on Principles of Database Systems

pages

D Srivastava R Ramakrishnan and P Revesz Constraint ob jects In

Proceedings of the International Workshop on the Principles and Practice

of Constraint Programming Orcas Island WA May

R M Stallman and G J Sussman Forward reasoning and dep endency

directed backtracking in a system for computeraided circuit analysis Ar

ticial Intel ligence

G L Steele The denition and implementation of a computer program

ming language based on Constraints PhD thesis MIT

I Sutherland Sketchpad a manmachine graphical communication sys

tem In Proceedings of the IFIP Spring Joint Computer Conference

P Tarau A Davison K De Bosschere and M Hermenegildo editors

Proceedings of the st Workshop on Logic Programming Tools for INTER

NET Applications JICSLP Bonn

E Tsang Foundations of Constraint Satisfaction Academic Press Lon

don

L Vandeurzen M Gyssens and D Van Gucht On the desirability and

limitations of linear spatial query languages In M J Egenhofer and J R

Herring editors Proceedings of the Symposium on Advances in Spatial

Databases volume of LNCS pages Springer Verlag

D L Waltz Understanding line drawings of scenes with shadows In

P Winston editor The Psychology of Computer Vision McGrawHill

E Zaanella Domain indep endent ask approximations in CCP In

U Montanari and F Rossi editors Proceedings of the International Con

ference on Principles and Practice of Constraint Programming number

in LNCS Cassis France SpringerVerlag

B Vander Zanden An incremental algorithm for satisfying hierarchies

of multiway dataow constraints ACM Transactions on Programming

Languages and Systems January

Y Zhang and A K Mackworth Sp ecication and verication of

constraintbased dynamic systems In A Borning editor Principles and

Practice of Constraint Programming number in LNCS pages

SpringerVerlag

Y Zhang and A K Mackworth Constraint programming in constraint

nets In V A Saraswat and P Van Hentenryck editor Principles and

Practice of Constraint Programming The Newport Papers pages

The MIT Press Cambridge MA

Y Zhang and A K Mackworth Synthesis of hybrid constraintbased

controllers In P Antsaklis W Kohn A Nero de and S Sastry editors

Hybrid Systems II number in LNCS pages Springer Verlag