Content deleted Content added
Art LaPella (talk | contribs) m →References: Spelling, see the book cover at Amazon, http://www.amazon.com/Programming-Constraints-Introduction-Kimbal-Marriott/dp/0262133415 |
m Disambiguating links to Deadlock (link changed to Deadlock (computer science)) using DisamAssist. |
||
(14 intermediate revisions by 12 users not shown) | |||
Line 1:
'''Concurrent constraint logic programming''' is a version of [[constraint logic programming]] aimed primarily at programming [[concurrent process]]es rather than (or in addition to) solving [[constraint satisfaction problem]]s. Goals in constraint logic programming are evaluated concurrently; a concurrent process is therefore programmed as the evaluation of a goal by the [[Interpreter (computing)|interpreter]].
[[syntax (logic)|Syntactically]], concurrent
[[Constraint handling rules]] can be seen as a form of concurrent constraint logic programming,<ref>Frühwirth, Thom. "[https://www.sciencedirect.com/science/article/pii/S0743106698100055 Theory and practice of constraint handling rules]." [[The Journal of Logic Programming]] 37.1-3 (1998): 95-138.</ref> but are used for programming a constraint simplifier or solver rather than concurrent processes.
==Description==
Line 16:
clause: contrary to the non-concurrent version, the other clauses will never be tried. These two different ways for handling multiple choices are often called "don't know nondeterminism" and "don't care nondeterminism".
When rewriting a literal in the goal, the only considered clauses are those whose guard is entailed by the union of the constraint store and the equation of the literal with the clause head. The guards provide a way for telling which clauses are not to be considered at all. This is particularly important given the commitment to a single clause of concurrent constraint logic programming: once a clause has been chosen, this choice will be never reconsidered. Without guards, the interpreter could choose a "wrong" clause to rewrite a literal, while other "good" clauses exist. In non-concurrent programming, this is less important, as the interpreter always tries all possibilities. In concurrent programming, the interpreter commits to a single possibility without trying the other ones.
A second effect of the difference between the non-concurrent and the concurrent version is that concurrent constraint logic programming is specifically designed to allow processes to run without terminating. Non-terminating processes are common in general in concurrent processing; the concurrent version of constraint logic programming implements them by not using the condition of failure: if no clause is applicable for rewriting a goal, the process evaluating this goal stops instead of making the whole evaluation fail like in non-concurrent constraint logic programming. As a result, the process evaluating a goal may be stopped because no clause is available to proceed, but at the same time the other processes keep running.
Synchronization among processes that are solving different goals is achieved via the use of guards. If a goal cannot be rewritten because all clauses that could be used have a guard that is not entailed by the constraint store, the process solving this goal is blocked until the other processes add the constraints that are necessary to entail the guard of at least one of the applicable clauses. This synchronization is subject to [[Deadlock (computer science)|deadlock]]s: if all goals are blocked, no new constraints will be added and therefore no goal will ever be unblocked.
A third effect of the difference between concurrent and non-concurrent logic programming is in the way a goal is equated to the head of a fresh variant of a clause. Operationally, this is done by checking whether the variables in the head can be equated to terms in such a way the head is equal to the goal. This rule differs from the corresponding rule for constraint logic programming in that it only allows adding constraints in the form variable=term, where the variable is one of the head. This limitation can be seen as a form of directionality, in that the goal and the clause head are treated differently.
Line 30:
==History==
The study of concurrent constraint logic programming started at the end of the 1980s, when some of the principles of [[concurrent logic programming]] were integrated into constraint logic programming by [[Michael J. Maher]]. The theoretical properties of concurrent constraint logic programming were later studied by various authors,
==See also==
Line 36:
* [[Curry (programming language)|Curry]], a logic functional programming language, which allows programming concurrent systems [http://www.informatik.uni-kiel.de/~curry/examples/#residuation].
* [[ToonTalk]]
* [[Janus (concurrent constraint programming language)|Janus]]
* [[Alice (programming language)|Alice]]
== References ==
{{reflist}}
==Bibliography==
*{{cite book
Line 48 ⟶ 51:
| year=1998
| publisher=MIT Press
}} {{ISBN
*{{cite book
| first=Thom
| last=
|author2=Slim Abdennadher
| title=Essentials of constraint programming
| year=2003
| publisher=Springer
}} {{ISBN
*{{cite journal
| first=Joxan
Line 62 ⟶ 65:
|author2=Michael J. Maher
| title=Constraint logic programming: a survey
| journal=Journal of
| volume=19/20
| pages=503–581
| year=1994
| doi=10.1016/0743-1066(94)90033-7
| doi-access=free
}}
[[Category:Constraint programming]]▼
▲[[Category:Constraint logic programming]]
[[Category:Programming paradigms]]
[[Category:Concurrent computing]]
|