Logic Programming

Concurrent Logic Programming (CP)

Multi-processor machines such as parallel and distributed computer systems provide benefits such as increased processing power. However, normal logic programming languages such as Prolog were designed to allow the programmer control over call selection and procedure selection only in a single processor computer system. Therefore a concurrent logic programming was necessary to allow parallelism so that parallel and distributed systems could also be used to benefit logic programming.

Parlog and Concurrent Prolog are examples of concurrent logic programming languages. Parlog was developed by K.L. Clark and S. Gregory in 1984 and Concurrent Prolog was developed by E. Shapiro in 1983. Parlog supports OR-parallelism and AND-parallelism whilst Concurrent Prolog only supports AND-parallelism.

Both concurrent logic programming languages support committed-choice indeterminacy which allow guards within procedures to be executed in parallel when more than one procedure is called. The guard is a part of the body of a procedure which is specified by the programmer. Only the procedure of the first guard which is solved is returned whilst the other procedures are ignored, meaning that the procedure returned to the call depends on the allocated system resource and not the programmer. Both Parlog and Concurrent Prolog also offer wide range of control mechanisms.