06.03.2013 Views

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

Artificial Intelligence and Soft Computing: Behavioral ... - Arteimi.info

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

similarity with pipelining. Here, Test(N) <strong>and</strong> Print(N) could be like one<br />

process, <strong>and</strong> Int(N) is another process. The former waits for the latter for data<br />

streams. There lies the similarity with pipelining.<br />

d) Unification Parallelism<br />

In a sequential PROLOG program, if a predicate in the body of a clause<br />

contains a number of arguments, then during unification of that predicate with<br />

the head of another clause, each argument is matched one by one. However,<br />

with adequate resources, it is possible to match the multiple arguments of the<br />

predicate concurrently with the corresponding positioned terms in a head<br />

clause. The parallelism of matching of variables of a predicate with<br />

appropriate arguments of other predicates is generally referred to as<br />

Unification Parallelism. As an example, consider the following logic<br />

program.<br />

1. main ← A (X,Y), ...<br />

2. A (f (b, c), g (d)) ←<br />

Here, the instantiation of X = f (b, c) <strong>and</strong> Y = g(d) should be done<br />

concurrently in a PROLOG machine that supports Parallel Unification.<br />

22.5 Parallel Architecture for<br />

Logic Programming<br />

It is clear from our discussion in the last section that 4 different types of<br />

parallelisms may co-exist in a logic program. Petri nets, which we have<br />

introduced in chapter 8, can be employed to represent these parallelisms by a<br />

structural approach. This section begins with an n-tuple definition of a Petri<br />

net. Next, the scope of parallelism in logic programs by Petri net models will<br />

be introduced. The principles of forward <strong>and</strong> backward firing of a Petri net<br />

will then be outlined. An algorithm for concurrent resolution of multiple<br />

clauses will be constructed subsequently with the Petri net models. Finally a<br />

schematic logic architecture of the system will be developed from the<br />

algorithm mentioned above. An analysis of the time estimate will then be<br />

covered to compare the relative performance of the architecture with respect<br />

to SLD-resolution, the fundamental tool for a PROLOG compiler.<br />

22.5.1 The Extended Petri Net Model<br />

An Extended Petri Net (EPN) [1], which we could use for reasoning under<br />

FOL, is an n-tuple, given by

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!