Information Technology Reference
In-Depth Information
A :- B 1 ,B 2 ,…,B n
where the head is a positive literal; the body is composed of zero, one or more
literals.
Definition 2.4 A definite program is a collection of definite clauses.
Definition 2.5 A definite goal is a clause of the form
? :- B 1 ,B 2 ,…,B n
where the head is empty.
Let P and G be a program and a goal respectively, then the solving process for
the corresponding logic program is to seek a SLD resolution for P∪{G}. Two
rules should be decided for the resolution process: one is the computation rule on
how to select the sub-goal; the other is the search strategy on how to go through
the program. Theoretically, any search strategy used in artificial intelligence can
be adopted. However, in practice, strategies should be selected according to their
efficiency. Following is the standard SLD resolution process.
(1) Sub-goals are selected with a “left then right” strategy;
(2) The program is gone through with a strategy based on the depth-first search
and the backtracking method;
(3) Clauses of the program P are selected with the same priority of their
appearance in the program;
(4) The occur-check is omitted from the unification algorithm.
There are some characteristics for such a resolution process.
1. There exists simple and efficient method for the realization of depth-first
search strategy.
The depth-first search strategy can be realized with just a goal stack. A goal stack
for the SLD tree consists of branches which are going through. Correspondingly,
the searching process is composed of the pop and push operators on the stack. In
the case that the sub-goal on the top of the stack is unified with the head of some
Search WWH ::




Custom Search