| | |
Summary: Non-Leftmost Unfolding in Partial Evaluation of
Logic Programs with Impure Predicates
Elvira Albert1
, Germ´an Puebla2
, and John Gallagher3
1
School of Computer Science, Complutense U. of Madrid, elvira@sip.ucm.es
2
School of Computer Science, Technical U. of Madrid, german@fi.upm.es
3
Department of Computer Science, University of Roskilde, jpg@ruc.dk
Abstract. Partial evaluation of logic programs which contain impure
predicates poses non-trivial challenges. Impure predicates include those
which produce side-effects, raise errors (or exceptions), and those whose
truth value varies according to the degree of instantiation of arguments4
.
In particular, non-leftmost unfolding steps can produce incorrect results
since the independence of the computation rule no longer holds in the
presence of impure predicates. Existing proposals allow non-leftmost un-
folding steps, but at the cost of accuracy: bindings and failure are not
|