<s>
Concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
is	O
a	O
version	O
of	O
constraint	B-Application
logic	I-Application
programming	I-Application
aimed	O
primarily	O
at	O
programming	O
concurrent	B-Operating_System
processes	O
rather	O
than	O
(	O
or	O
in	O
addition	O
to	O
)	O
solving	O
constraint	B-Application
satisfaction	I-Application
problems	I-Application
.	O
</s>
<s>
Goals	O
in	O
constraint	B-Application
logic	I-Application
programming	I-Application
are	O
evaluated	O
concurrently	O
;	O
a	O
concurrent	B-Architecture
process	I-Architecture
is	O
therefore	O
programmed	O
as	O
the	O
evaluation	O
of	O
a	O
goal	O
by	O
the	O
interpreter	B-Application
.	O
</s>
<s>
Syntactically	O
,	O
concurrent	B-Operating_System
constraints	O
logic	O
programs	O
are	O
similar	O
to	O
non-concurrent	O
programs	O
,	O
the	O
only	O
exception	O
being	O
that	O
clauses	O
include	O
guards	B-Language
,	O
which	O
are	O
constraints	O
that	O
may	O
block	O
the	O
applicability	O
of	O
the	O
clause	O
under	O
some	O
conditions	O
.	O
</s>
<s>
Semantically	O
,	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
differs	O
from	O
its	O
non-concurrent	O
versions	O
because	O
a	O
goal	O
evaluation	O
is	O
intended	O
to	O
realize	O
a	O
concurrent	B-Architecture
process	I-Architecture
rather	O
than	O
finding	O
a	O
solution	O
to	O
a	O
problem	O
.	O
</s>
<s>
Most	O
notably	O
,	O
this	O
difference	O
affects	O
how	O
the	O
interpreter	B-Application
behaves	O
when	O
more	O
than	O
one	O
clause	O
is	O
applicable	O
:	O
non-concurrent	O
constraint	O
logic	O
programming	O
recursively	O
tries	O
all	O
clauses	O
;	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
chooses	O
only	O
one	O
.	O
</s>
<s>
This	O
is	O
the	O
most	O
evident	O
effect	O
of	O
an	O
intended	O
directionality	O
of	O
the	O
interpreter	B-Application
,	O
which	O
never	O
revise	O
a	O
choice	O
it	O
has	O
previously	O
taken	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
used	O
for	O
programming	O
a	O
constraint	O
simplifier	O
or	O
solver	O
rather	O
than	O
concurrent	B-Operating_System
processes	O
.	O
</s>
<s>
In	O
constraint	B-Application
logic	I-Application
programming	I-Application
,	O
the	O
goals	O
in	O
the	O
current	O
goal	O
are	O
evaluated	O
sequentially	O
,	O
usually	O
proceeding	O
in	O
a	O
LIFO	B-Application
order	O
in	O
which	O
newer	O
goals	O
are	O
evaluated	O
first	O
.	O
</s>
<s>
The	O
concurrent	B-Operating_System
version	O
of	O
logic	O
programming	O
allows	O
for	O
evaluating	O
goals	O
in	O
parallel	B-Operating_System
:	O
every	O
goal	O
is	O
evaluated	O
by	O
a	O
process	O
,	O
and	O
processes	O
run	O
concurrently	O
.	O
</s>
<s>
Adding	O
a	O
constraint	O
to	O
the	O
store	O
is	O
done	O
like	O
in	O
regular	O
constraint	B-Application
logic	I-Application
programming	I-Application
.	O
</s>
<s>
Checking	O
entailment	O
of	O
a	O
constraint	O
is	O
done	O
via	O
guards	B-Language
to	O
clauses	O
.	O
</s>
<s>
Guards	B-Language
require	O
a	O
syntactic	O
extension	O
:	O
a	O
clause	O
of	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
is	O
written	O
as	O
H	O
:	O
-	O
G	O
|	O
B	O
where	O
G	O
is	O
a	O
constraint	O
called	O
the	O
guard	O
of	O
the	O
clause	O
.	O
</s>
<s>
The	O
main	O
difference	O
between	O
non-concurrent	O
and	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
is	O
that	O
the	O
first	O
is	O
aimed	O
at	O
search	O
,	O
while	O
the	O
second	O
is	O
aimed	O
at	O
implementing	O
concurrent	B-Operating_System
processes	O
.	O
</s>
<s>
The	O
first	O
semantical	O
difference	O
between	O
regular	O
and	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
is	O
about	O
the	O
condition	O
when	O
more	O
than	O
one	O
clause	O
can	O
be	O
used	O
for	O
proving	O
a	O
goal	O
.	O
</s>
<s>
On	O
the	O
other	O
hand	O
,	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
aims	O
at	O
programming	O
parallel	B-Operating_System
processes	O
.	O
</s>
<s>
In	O
general	O
concurrent	B-Architecture
programming	I-Architecture
,	O
if	O
a	O
process	O
makes	O
a	O
choice	O
,	O
this	O
choice	O
cannot	O
be	O
undone	O
.	O
</s>
<s>
The	O
concurrent	B-Operating_System
version	O
of	O
constraint	B-Application
logic	I-Application
programming	I-Application
implements	O
processes	O
by	O
allowing	O
them	O
to	O
take	O
choices	O
,	O
but	O
committing	O
to	O
them	O
once	O
they	O
have	O
been	O
taken	O
.	O
</s>
<s>
clause	O
:	O
contrary	O
to	O
the	O
non-concurrent	O
version	O
,	O
the	O
other	O
clauses	O
will	O
never	O
be	O
tried	O
.	O
</s>
<s>
The	O
guards	B-Language
provide	O
a	O
way	O
for	O
telling	O
which	O
clauses	O
are	O
not	O
to	O
be	O
considered	O
at	O
all	O
.	O
</s>
<s>
This	O
is	O
particularly	O
important	O
given	O
the	O
commitment	O
to	O
a	O
single	O
clause	O
of	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
:	O
once	O
a	O
clause	O
has	O
been	O
chosen	O
,	O
this	O
choice	O
will	O
be	O
never	O
reconsidered	O
.	O
</s>
<s>
Without	O
guards	B-Language
,	O
the	O
interpreter	B-Application
could	O
choose	O
a	O
"	O
wrong	O
"	O
clause	O
to	O
rewrite	O
a	O
literal	O
,	O
while	O
other	O
"	O
good	O
"	O
clauses	O
exist	O
.	O
</s>
<s>
In	O
non-concurrent	O
programming	O
,	O
this	O
is	O
less	O
important	O
,	O
as	O
the	O
interpreter	B-Application
always	O
tries	O
all	O
possibilities	O
.	O
</s>
<s>
In	O
concurrent	B-Architecture
programming	I-Architecture
,	O
the	O
interpreter	B-Application
commits	O
to	O
a	O
single	O
possibility	O
without	O
trying	O
the	O
other	O
ones	O
.	O
</s>
<s>
A	O
second	O
effect	O
of	O
the	O
difference	O
between	O
the	O
non-concurrent	O
and	O
the	O
concurrent	B-Operating_System
version	O
is	O
that	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
is	O
specifically	O
designed	O
to	O
allow	O
processes	O
to	O
run	O
without	O
terminating	O
.	O
</s>
<s>
Non-terminating	O
processes	O
are	O
common	O
in	O
general	O
in	O
concurrent	B-Operating_System
processing	O
;	O
the	O
concurrent	B-Operating_System
version	O
of	O
constraint	B-Application
logic	I-Application
programming	I-Application
implements	O
them	O
by	O
not	O
using	O
the	O
condition	O
of	O
failure	O
:	O
if	O
no	O
clause	O
is	O
applicable	O
for	O
rewriting	O
a	O
goal	O
,	O
the	O
process	O
evaluating	O
this	O
goal	O
stops	O
instead	O
of	O
making	O
the	O
whole	O
evaluation	O
fail	O
like	O
in	O
non-concurrent	O
constraint	B-Application
logic	I-Application
programming	I-Application
.	O
</s>
<s>
Synchronization	O
among	O
processes	O
that	O
are	O
solving	O
different	O
goals	O
is	O
achieved	O
via	O
the	O
use	O
of	O
guards	B-Language
.	O
</s>
<s>
This	O
synchronization	O
is	O
subject	O
to	O
deadlocks	B-Operating_System
:	O
if	O
all	O
goals	O
are	O
blocked	O
,	O
no	O
new	O
constraints	O
will	O
be	O
added	O
and	O
therefore	O
no	O
goal	O
will	O
ever	O
be	O
unblocked	O
.	O
</s>
<s>
A	O
third	O
effect	O
of	O
the	O
difference	O
between	O
concurrent	B-Operating_System
and	O
non-concurrent	O
logic	O
programming	O
is	O
in	O
the	O
way	O
a	O
goal	O
is	O
equated	O
to	O
the	O
head	O
of	O
a	O
fresh	O
variant	O
of	O
a	O
clause	O
.	O
</s>
<s>
This	O
rule	O
differs	O
from	O
the	O
corresponding	O
rule	O
for	O
constraint	B-Application
logic	I-Application
programming	I-Application
in	O
that	O
it	O
only	O
allows	O
adding	O
constraints	O
in	O
the	O
form	O
variable	O
=	O
term	O
,	O
where	O
the	O
variable	O
is	O
one	O
of	O
the	O
head	O
.	O
</s>
<s>
An	O
extension	O
to	O
the	O
syntax	O
and	O
semantics	O
of	O
concurrent	B-Application
logic	I-Application
programming	I-Application
is	O
the	O
atomic	O
tell	O
.	O
</s>
<s>
When	O
the	O
interpreter	B-Application
uses	O
a	O
clause	O
,	O
its	O
guard	O
is	O
added	O
to	O
the	O
constraint	O
store	O
.	O
</s>
<s>
Due	O
to	O
commitment	O
to	O
this	O
clause	O
,	O
the	O
interpreter	B-Application
does	O
not	O
backtrack	O
if	O
the	O
constraints	O
of	O
the	O
body	O
are	O
inconsistent	O
with	O
the	O
store	O
.	O
</s>
<s>
The	O
study	O
of	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
started	O
at	O
the	O
end	O
of	O
the	O
1980s	O
,	O
when	O
some	O
of	O
the	O
principles	O
of	O
concurrent	B-Application
logic	I-Application
programming	I-Application
were	O
integrated	O
into	O
constraint	B-Application
logic	I-Application
programming	I-Application
by	O
Michael	O
J	O
.	O
Maher	O
.	O
</s>
<s>
The	O
theoretical	O
properties	O
of	O
concurrent	B-Application
constraint	I-Application
logic	I-Application
programming	I-Application
were	O
later	O
studied	O
by	O
various	O
authors	O
,	O
including	O
.	O
</s>
