<s>
The	O
techniques	O
used	O
in	O
constraint	B-Application
satisfaction	I-Application
depend	O
on	O
the	O
kind	O
of	O
constraints	O
being	O
considered	O
.	O
</s>
<s>
Often	O
used	O
are	O
constraints	O
on	O
a	O
finite	O
domain	O
,	O
to	O
the	O
point	O
that	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
are	O
typically	O
identified	O
with	O
problems	O
based	O
on	O
constraints	O
on	O
a	O
finite	O
domain	O
.	O
</s>
<s>
Such	O
problems	O
are	O
usually	O
solved	O
via	O
search	B-Application
,	O
in	O
particular	O
a	O
form	O
of	O
backtracking	B-Algorithm
or	O
local	B-Algorithm
search	I-Algorithm
.	O
</s>
<s>
Constraint	B-Application
propagation	I-Application
are	O
other	O
methods	O
used	O
on	O
such	O
problems	O
;	O
most	O
of	O
them	O
are	O
incomplete	O
in	O
general	O
,	O
that	O
is	O
,	O
they	O
may	O
solve	O
the	O
problem	O
or	O
prove	O
it	O
unsatisfiable	O
,	O
but	O
not	O
always	O
.	O
</s>
<s>
Constraint	B-Application
propagation	I-Application
methods	O
are	O
also	O
used	O
in	O
conjunction	O
with	O
search	B-Application
to	O
make	O
a	O
given	O
problem	O
simpler	O
to	O
solve	O
.	O
</s>
<s>
Other	O
considered	O
kinds	O
of	O
constraints	O
are	O
on	O
real	O
or	O
rational	O
numbers	O
;	O
solving	O
problems	O
on	O
these	O
constraints	O
is	O
done	O
via	O
variable	O
elimination	O
or	O
the	O
simplex	B-Algorithm
algorithm	I-Algorithm
.	O
</s>
<s>
Constraint	B-Application
satisfaction	I-Application
as	O
a	O
general	O
problem	O
originated	O
in	O
the	O
field	O
of	O
artificial	B-Application
intelligence	I-Application
in	O
the	O
1970s	O
(	O
see	O
for	O
example	O
)	O
.	O
</s>
<s>
However	O
,	O
when	O
the	O
constraints	O
are	O
expressed	O
as	O
multivariate	O
linear	O
equations	O
defining	O
(	O
in	O
)	O
equalities	O
,	O
the	O
field	O
goes	O
back	O
to	O
Joseph	O
Fourier	O
in	O
the	O
19th	O
century	O
:	O
George	O
Dantzig	O
's	O
invention	O
of	O
the	O
Simplex	B-Algorithm
Algorithm	I-Algorithm
for	O
Linear	B-Algorithm
Programming	I-Algorithm
(	O
a	O
special	O
case	O
of	O
mathematical	O
optimization	O
)	O
in	O
1946	O
has	O
allowed	O
determining	O
feasible	O
solutions	O
to	O
problems	O
containing	O
hundreds	O
of	O
variables	O
.	O
</s>
<s>
The	O
first	O
languages	O
devised	O
expressly	O
with	O
intrinsic	O
support	O
for	O
constraint	B-Application
programming	I-Application
was	O
Prolog	B-Language
.	O
</s>
<s>
Since	O
then	O
,	O
constraint-programming	O
libraries	O
have	O
become	O
available	O
in	O
other	O
languages	O
,	O
such	O
as	O
C++	B-Language
or	O
Java	B-Language
(	O
e.g.	O
,	O
Choco	O
for	O
Java	B-Language
)	O
.	O
</s>
<s>
As	O
originally	O
defined	O
in	O
artificial	B-Application
intelligence	I-Application
,	O
constraints	O
enumerate	O
the	O
possible	O
values	O
a	O
set	O
of	O
variables	O
may	O
take	O
in	O
a	O
given	O
world	O
.	O
</s>
<s>
A	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
on	O
such	O
domain	O
contains	O
a	O
set	O
of	O
variables	O
whose	O
values	O
can	O
only	O
be	O
taken	O
from	O
the	O
domain	O
,	O
and	O
a	O
set	O
of	O
constraints	O
,	O
each	O
constraint	B-Application
specifying	O
the	O
allowed	O
values	O
for	O
a	O
group	O
of	O
variables	O
.	O
</s>
<s>
In	O
practice	O
,	O
constraints	O
are	O
often	O
expressed	O
in	O
compact	O
form	O
,	O
rather	O
than	O
enumerating	O
all	O
the	O
values	O
of	O
the	O
variables	O
that	O
would	O
satisfy	O
the	O
constraint	B-Application
.	O
</s>
<s>
Problems	O
that	O
can	O
be	O
expressed	O
as	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
are	O
the	O
eight	O
queens	O
puzzle	O
,	O
the	O
Sudoku	O
solving	O
problem	O
and	O
many	O
other	O
logic	O
puzzles	O
,	O
the	O
Boolean	B-Algorithm
satisfiability	I-Algorithm
problem	I-Algorithm
,	O
scheduling	B-Application
problems	O
,	O
bounded-error	O
estimation	O
problems	O
and	O
various	O
problems	O
on	O
graphs	O
such	O
as	O
the	O
graph	O
coloring	O
problem	O
.	O
</s>
<s>
While	O
usually	O
not	O
included	O
in	O
the	O
above	O
definition	O
of	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
,	O
arithmetic	O
equations	O
and	O
inequalities	O
bound	O
the	O
values	O
of	O
the	O
variables	O
they	O
contain	O
and	O
can	O
therefore	O
be	O
considered	O
a	O
form	O
of	O
constraints	O
.	O
</s>
<s>
Arithmetic	O
equations	O
and	O
inequalities	O
are	O
often	O
not	O
considered	O
within	O
the	O
definition	O
of	O
a	O
"	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
"	O
,	O
which	O
is	O
limited	O
to	O
finite	O
domains	O
.	O
</s>
<s>
They	O
are	O
however	O
used	O
often	O
in	O
constraint	B-Application
programming	I-Application
.	O
</s>
<s>
It	O
can	O
be	O
shown	O
that	O
the	O
arithmetic	O
inequalities	O
or	O
equations	O
present	O
in	O
some	O
types	O
of	O
finite	O
logic	O
puzzles	O
such	O
as	O
Futoshiki	O
or	O
Kakuro	O
(	O
also	O
known	O
as	O
Cross	O
Sums	O
)	O
can	O
be	O
dealt	O
with	O
as	O
non-arithmetic	O
constraints	O
(	O
see	O
Pattern-Based	O
Constraint	B-Application
Satisfaction	I-Application
and	O
Logic	O
Puzzles	O
)	O
.	O
</s>
<s>
Constraint	B-Application
satisfaction	I-Application
problems	I-Application
on	O
finite	O
domains	O
are	O
typically	O
solved	O
using	O
a	O
form	O
of	O
search	B-Application
.	O
</s>
<s>
The	O
most	O
used	O
techniques	O
are	O
variants	O
of	O
backtracking	B-Algorithm
,	O
constraint	B-Application
propagation	I-Application
,	O
and	O
local	B-Algorithm
search	I-Algorithm
.	O
</s>
<s>
Variable	O
elimination	O
and	O
the	O
simplex	B-Algorithm
algorithm	I-Algorithm
are	O
used	O
for	O
solving	O
linear	O
and	O
polynomial	O
equations	O
and	O
inequalities	O
,	O
and	O
problems	O
containing	O
variables	O
with	O
infinite	O
domain	O
.	O
</s>
<s>
Solving	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
on	O
a	O
finite	O
domain	O
is	O
an	O
NP	O
complete	O
problem	O
with	O
respect	O
to	O
the	O
domain	O
size	O
.	O
</s>
<s>
Research	O
has	O
shown	O
a	O
number	O
of	O
tractable	O
subcases	O
,	O
some	O
limiting	O
the	O
allowed	O
constraint	B-Application
relations	O
,	O
some	O
requiring	O
the	O
scopes	O
of	O
constraints	O
to	O
form	O
a	O
tree	O
,	O
possibly	O
in	O
a	O
reformulated	O
version	O
of	O
the	O
problem	O
.	O
</s>
<s>
Research	O
has	O
also	O
established	O
relationship	O
of	O
the	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
with	O
problems	O
in	O
other	O
areas	O
such	O
as	O
finite	O
model	O
theory	O
.	O
</s>
<s>
Constraint	B-Application
programming	I-Application
is	O
the	O
use	O
of	O
constraints	O
as	O
a	O
programming	O
language	O
to	O
encode	O
and	O
solve	O
problems	O
.	O
</s>
<s>
Constraint	B-Application
programming	I-Application
originated	O
from	O
a	O
formalization	O
of	O
equalities	O
of	O
terms	O
in	O
Prolog	B-Language
II	I-Language
,	O
leading	O
to	O
a	O
general	O
framework	O
for	O
embedding	O
constraints	O
into	O
a	O
logic	B-Language
programming	I-Language
language	I-Language
.	O
</s>
<s>
The	O
most	O
common	O
host	O
languages	O
are	O
Prolog	B-Language
,	O
C++	B-Language
,	O
and	O
Java	B-Language
,	O
but	O
other	O
languages	O
have	O
been	O
used	O
as	O
well	O
.	O
</s>
<s>
A	O
constraint	B-Application
logic	B-Language
program	I-Language
is	O
a	O
logic	B-Language
program	I-Language
that	O
contains	O
constraints	O
in	O
the	O
bodies	O
of	O
clauses	O
.	O
</s>
<s>
As	O
an	O
example	O
,	O
the	O
clause	O
A(X )	O
:-X>0	O
,	O
B(X )	O
is	O
a	O
clause	O
containing	O
the	O
constraint	B-Application
X>0	O
in	O
the	O
body	O
.	O
</s>
<s>
The	O
constraints	O
in	O
the	O
goal	O
and	O
in	O
the	O
clauses	O
used	O
to	O
prove	O
the	O
goal	O
are	O
accumulated	O
into	O
a	O
set	O
called	O
constraint	B-Application
store	I-Application
.	O
</s>
<s>
Equations	O
of	O
terms	O
,	O
as	O
used	O
in	O
logic	B-Language
programming	I-Language
,	O
are	O
considered	O
a	O
particular	O
form	O
of	O
constraints	O
which	O
can	O
be	O
simplified	O
using	O
unification	B-Algorithm
.	O
</s>
<s>
As	O
a	O
result	O
,	O
the	O
constraint	B-Application
store	I-Application
can	O
be	O
considered	O
an	O
extension	O
of	O
the	O
concept	O
of	O
substitution	O
that	O
is	O
used	O
in	O
regular	O
logic	B-Language
programming	I-Language
.	O
</s>
<s>
The	O
most	O
common	O
kinds	O
of	O
constraints	O
used	O
in	O
constraint	B-Application
logic	I-Application
programming	I-Application
are	O
constraints	O
over	O
integers/rational/real	O
numbers	O
and	O
constraints	O
over	O
finite	O
domains	O
.	O
</s>
<s>
Concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
languages	O
have	O
also	O
been	O
developed	O
.	O
</s>
<s>
Constraint	B-Application
handling	I-Application
rules	I-Application
can	O
be	O
seen	O
as	O
a	O
form	O
of	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
,	O
but	O
are	O
also	O
sometimes	O
used	O
within	O
a	O
non-concurrent	O
constraint	O
logic	O
programming	O
language	O
.	O
</s>
<s>
Constraint	B-Application
satisfaction	I-Application
toolkits	O
are	O
software	B-Library
libraries	I-Library
for	O
imperative	B-Application
programming	I-Application
languages	I-Application
that	O
are	O
used	O
to	O
encode	O
and	O
solve	O
a	O
constraint	B-Application
satisfaction	I-Application
problem	I-Application
.	O
</s>
<s>
Cassowary	B-Application
constraint	I-Application
solver	I-Application
,	O
an	O
open	B-License
source	I-License
project	O
for	O
constraint	B-Application
satisfaction	I-Application
(	O
accessible	O
from	O
C	O
,	O
Java	B-Language
,	O
Python	O
and	O
other	O
languages	O
)	O
.	O
</s>
<s>
Gecode	B-Application
,	O
an	O
open	B-License
source	I-License
portable	O
toolkit	O
written	O
in	O
C++	B-Language
developed	O
as	O
a	O
production-quality	O
and	O
highly	O
efficient	O
implementation	O
of	O
a	O
complete	O
theoretical	O
background	O
.	O
</s>
<s>
Gelisp	O
,	O
an	O
open	B-License
source	I-License
portable	O
wrapper	O
of	O
Gecode	B-Application
to	O
Lisp	B-Language
.	O
</s>
<s>
IBM	O
ILOG	O
:	O
C++	B-Language
,	O
,	O
Java	B-Language
,	O
.NET	O
libraries	O
(	O
proprietary	O
,	O
)	O
.	O
</s>
<s>
JaCoP	B-Application
,	O
an	O
open	B-License
source	I-License
Java	B-Language
constraint	B-Application
solver	I-Application
.	O
</s>
<s>
OptaPlanner	B-Application
,	O
another	O
open	B-License
source	I-License
Java	B-Language
constraint	B-Application
solver	I-Application
.	O
</s>
<s>
Koalog	O
,	O
a	O
commercial	O
Java-based	O
constraint	B-Application
solver	I-Application
.	O
</s>
<s>
logilab-constraint	O
,	O
an	O
open	B-License
source	I-License
constraint	B-Application
solver	I-Application
written	O
in	O
pure	O
Python	O
with	O
constraint	B-Application
propagation	I-Application
algorithms	O
.	O
</s>
<s>
Minion	B-Application
,	O
an	O
open-source	B-License
constraint	B-Application
solver	I-Application
written	O
in	O
C++	B-Language
,	O
with	O
a	O
small	O
language	O
for	O
the	O
purpose	O
of	O
specifying	O
models/problems	O
.	O
</s>
<s>
ZDC	O
,	O
an	O
open	B-License
source	I-License
program	O
developed	O
in	O
the	O
Computer-Aided	O
Constraint	B-Application
Satisfaction	I-Application
Project	O
for	O
modelling	O
and	O
solving	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
.	O
</s>
<s>
Constraint	B-Application
toolkits	O
are	O
a	O
way	O
for	O
embedding	O
constraints	O
into	O
an	O
imperative	B-Application
programming	I-Application
language	I-Application
.	O
</s>
<s>
An	O
approach	O
in	O
which	O
constraints	O
are	O
integrated	O
into	O
an	O
imperative	B-Application
programming	I-Application
language	I-Application
is	O
taken	O
in	O
the	O
Kaleidoscope	B-Application
programming	I-Application
language	I-Application
.	O
</s>
<s>
Constraints	O
have	O
also	O
been	O
embedded	O
into	O
functional	B-Language
programming	I-Language
languages	I-Language
.	O
</s>
