摘要 |
PURPOSE:To quickly execute a program by performing intelligent back track up to a select branch where the value of a variable causing a failure is changed when the equalizing operation fails in the execution of a nondeterministic program. CONSTITUTION:Rules of PROLOG are stored in a data base 1, and goals are stored in a goal stack part 3. Values to be substituted into variables of goals are stored in a local stack part 4, and information of positions and times of an AND-OR tree where and when values of variables are substituted is stored in a WHEN part 5. A control part 2 searches a rule which can be equalized to one literal of the current goal, and the body of the rule is substituted with the literal. If this rule cannot be found, the control part 2 checks the value of the variable which causes the failure, and the control part 2 controls back track up to the node of the AND-OR tree, where said value is substituted, in accordance with information in the WHEN part 5. Thus, execution of the select branch which distinctly leads to a failure is omitted to quickly execute the program.
|