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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

If the AND-subtrees of the execution tree are executed in parallel, the<br />

resulting unification substitutions may sometimes be conflicting. This is<br />

often referred to as binding conflict. For example, in the following Logic<br />

Program<br />

1. F(X) ← A (X), B (X).<br />

2. A (1) ←<br />

3. B (2) ←<br />

the literals A(X) <strong>and</strong> B(X) in the body of the first clause are resolvable with<br />

the heads of the second <strong>and</strong> the third clauses concurrently. However, the<br />

binding variable X takes the value {1 / X, 2 / X}, which are conflicting. In an<br />

AND-parallelism, where the goals/sub-goal, that include shared variables are<br />

allowed to be resolved independently in parallel, is generally called<br />

Unrestricted AND-parallelism. Some sort of synchronization of shared<br />

variables <strong>and</strong> some method of filtering from the set of variable bindings are<br />

required for correctly answering the query in such systems. Since considerable<br />

runtime overhead is introduced for implementing such a scheme, ANDparallelism<br />

is allowed, only when variable bindings are conflict-free. Such<br />

AND-parallelism is referred to as restricted AND-parallelism [2]. For<br />

detection of the conflict freedom of the variable bindings, a program<br />

annotation is used to denote which goals/sub-goals produce or consume<br />

variable values.<br />

b) OR- Parallelism<br />

In a sequential PROLOG program, each literal in the body of a clause is<br />

unified in order with the head of other clauses during the resolution steps. For<br />

example, consider the following program:<br />

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

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

3. A(2) ← e, f, g.<br />

4. A (3) ← h, i.<br />

5. P (3) ← p, q.<br />

Here, to satisfy the goal, main, one attempts to unify the first sub-goal<br />

(principal functor) A (x) with A (1) <strong>and</strong> after setting X=1, one starts searching<br />

for P (1) in the head of other clauses but unfortunately fail to get so. The same<br />

process is then repeated for X=2, but unfortunately P(2) is not available in the<br />

head of some clauses. Finally, the goal main is satisfied by unifying A(X) <strong>and</strong><br />

P (X) with heads A(3) <strong>and</strong> P(3) of the last two clauses.

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

Saved successfully!

Ooh no, something went wrong!