Two main aspects of Partial Evaluation for Prolog programs are considered: treatment of cuts and control of recursion. The analysis about cut is exhaustive: we consider occurrences of cut within both conjunctions and disjunctions. We show which restrictions are necessary to safely deal with cut in Partial Evaluation and which transformations are allowed. We define a set of conditions for compile-time execution and remotion of cuts. The safety of these conditions is formally proved. Some interesting results about the impact of mode inference techniques within this framework are finally drawn. As for control issues, we address a new approach to the problem of detecting infinite derivation paths. It is based on a theoretical characterization of non-termination and provides a general technique whose effectiveness does not depend on the structure of program domains.
Michele Bugliesi, F. Russo