21 research outputs found
Continuation Prolog: A new intermediary language for WAM and BinWAM code generation
We present a new intermediary language suitable for program transformations that fills the gap between Prolog source level and lower representations like binary Prolog or WAM-code. With the help of Continuation Prolog transformations on the level of continuations can be expressed that are unavailable in the usual settings of WAM-code generation
Copying Overlapping Terms
In this paper we discuss techniques to copy overlapping terms. Starting fro
A Transformation Based on the Equality between Terms
We present a new transformation of Prolog programs preserving operational equivalence. Our transformation --- EBC (equality based continuation) transformation --- relies on the introduction of equations between terms. These equations are used to introduce alternative and more e#- cient representations of terms. When applied to binary Prolog programs, EBC is able to perform the following optimizations by mere source to source transformations: removal of existential variables in programs using di#erence lists and accumulators, reduction of the number of occurchecks, interprocedural register allocation when executed on the WAM, linearization of recursions, optimization of continuation-like user data structures
Termination slicing in logic programs
Abstract. In this paper we present a slicing approach for termination analysis of logic programs. The notion of a failure-slice is introduced which is an executable reduced part of the program. Each failure-slice represents a necessary termination condition for the program. The minimal subset of failure-slices that constitutes a sufficient termination condition is approximated by a combination of static and dynamic techniques. A global analysis using finite domain constraints is combined with the actual execution of some failure-slices. In this manner accurate explanations are derived automatically.