Copyright © I FAC Distributed Intel li gence
Systems, Yarna, Bulgaria, 1988
PARALLEL EXECUTION OF
INDEPENDENT SUB GOALS
C. Percebois*, I. Durand** and I. Fut6***
*Labomtoi1'e LSI, Universite Paul Sabatia, 118, route de Narbonne,
3]062 Toulouse Cedex, Fmnce
**Colllpuler Science Department, University of Maryland College Park, MD 20742 USA
***Computer Research Institute, Donati u 35--45, H-I015 Budapest, H ungary
Abstract . COALA (Actor - Oriented Computer for Logic and its Applica -
tions) is a multiprocessor architecture project. The aim of the pro-
ject is to exploit pa r allelism inherent in logic programs automatically,
i.e. without any programmer intervention.
First , the paper summarizes the work presented earlier : the defini-
tion of a parallel interpreting model. Extensions are then presented
which allow the model to take into account the execution of indepen-
dent subgoals. The last part of the paper comments dynamic measureQents
obtained from the different versions of the model .
Keywords. Logic Programming; OR - Parallelism, AND - Parallelism .
INTRODUCTION
Several execution models for parallel
inference processing have been proposed
such as data-flow models (IT085), AND - OR
process models (CON85) (KAS83) , reduction
models (ONA85). Models taking into account
AND-parallelism (KAS84) come up against
the problem of consistency among solutions .
Some approaches simplify the problem :
the programmer is in charge of controlling
the parallelism using annotations in
the source program (WES87) . Approaches in
whjch the programmer is not concerned
with the parallelism need complex synchroni-
zation mechanisms.
Some (TAY84) use the join operation of
relational algebra in order to find
a consistent set of bindings for variables
appearing jn several subgoals of the
same goal . In practice, this algorithm
may be proved inefficient . Others (CON85) ,
rely upon ordering algorithms to calculate
producers and consumers of variables
values. In these schemes, the structure
of the processes is hierarchical and
the relationships between the processes
lead to a complex management of the resolu-
tion . In others, goals which are determined
to be independent are run in parallel .
Otherwise, they are run sequentially.
Restricted AND-parallelism (DEG84) uses
this policy.
In our model (PER86) (PER87) , no modifi -
cation of the source program is needed .
Subgoals are executed in parallel only
if they are independent. Detection of
subgoals is done dynamically
at execution time .
THE PARALLEL INTERPRETER MODEL
Interpreting Logic Programs with the
connection graph .
R. Kowalski's connection graph (KOW79)
is the heart of our model. Given a set
of clauses, the associated connection
graph contains an arc for each pair of
matching literals on the opposite sides
of the arrow. The arc is labelled by
203
the matching substitution called "environ-
ment" of the arc. An arc is eq u ivalent to
a potential resolvent.
The clauses connected by an arc are called
"parent clauses " of the arc and the arcs
issued from the parent clauses called
"p arent arcs ". An arc is oriented from
the body of a clause called " origin clau-
se" to the head of a clause called " extre -
mity clause".
Example : assu me the following set of
clauses :
pI (U, U)< - pll(U) , p12(U)
p2(a,b) <- pll(a)<- p12(a)<-
p2(b,c) <- pll(b)< - p12(c)<-
and the goal <- pl(a,X) , p2(X,y) .
The initial connection graph is :
<- pl(a,X),
::" \ ::b
Y=b Y=c
0::)(U),
pll(a)< - c p12(a)<-
pll(b)<- p12(c) <-
Figure 1 : Initial connection graph.
In a sequential model (KOW79) , a resolution
step is the selection of an arc and the
generation of the associated resolvent.
The arc is deleted and the arcs connec-
ting the resolvent to the re st of the
graph are added.
For example , in Figure 1, if arc Al is
se l ected , the graph is transformed as
fo ll ows :