PROLOG程序部分演绎的一种新方法

    A New Method of Partial Deduction of Prolog Programs

    • 摘要: 提出一个新的基于程序变换的Prolog程序部分演绎的方法.该方法以程序-目标对(P0,Q0)为输入,经过一系列程序变换后终止,输出结果程序-目标对(Pn,Qn),该方法保证结果程序一目标对(Pn,Qn)和输入程序-目标对(P0,Q0)计算等价,并且程序Pn解目标Qn比程序P0.解目标Q0效率更高.本文提出的方法已经实现.文中给出了3个部分演绎实例,并且与Benkreimi中提出的Prolog程序部分演绎的方法的结果进行了比较,说明我们的部分演绎方法更优.

       

      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.

       

    /

    返回文章
    返回