摘要 |
PURPOSE:To decrease the execution time of a predicate logical program by distinguishing a predicate different in character from other predicates and executing the result by other device. CONSTITUTION:Suppose that an inquiry of ''like (Taro, X)'' to a Prolog program in the figure and the 3rd rule in the figure is executed. The 2nd processing unit makes execution of the predicate of ''like (Taro, X)'' at first. Then a predicate ''plant (flower, X)'' is executed and it is detected that a predicate ''plant (flower, X)'' is an external predicate. Then, the next predicate is ''color (X, red)'' and since this is a predicate of an external predicate name, the execution of ''plant (flower, X)'' and ''color (X, red)'' is requested to the 1st processing unit. When this processing unit executes the ''plant (flower, X)'', three results of ''(flower, chrysanthemum)'', ''(flower, tulip)'', ''(flower, morning glory)'' are obtained, and two parameter pairs of ''(flower, tulip)'' and ''(flower, morning glory)'' are obtained as the result of further verification and the result is sent to the 2nd processing unit.
|