Abstract:
This paper presents a new method of partial deduction of Prologprograms. The method inputs a program-goal pair (
P0,
Q0) and outputs a resultant program-goal pair(
Pn,
Qn). The method guarantees termination, and keeps the computational equivalence of the program-goal pairs(
P0,
Q0) and(
Pn,
Qn).
Pn in solving
Qn is more efficient than
P0 in solving
Q0. We have implemented a partial evaluator based on the method. Three running examples of partial deduction are given, and the partially evaluated results are compared with those resulted from the partial deduction method put forth by Benkeimi. It shows that our partial Reduction method is better.