We present a transformation system that supports the goal-directed computation of the well-founded semantics of normal logic programs using any strategy from set-oriented bottom-up to single-answer top-down or any combination in this range by just rearranging the order of elementary transformations. The well-known problems of the magic set transformation in the context of the well-founded semantics are avoided while still not being tied to a top-down tuple-at-a-time strategy. Most bottom-up methods based on the alternating fixpoing approach and also the well-founded model computation used in smodels are subsumed. However, the extended version of the transformation approach presented in this paper is not restricted to range-restricted or ground programs. It even extends the search strategies possible within the SLG approach by allowing the activation of more than one body literal at a time. This leads to more efficient computations for some programs and enables even the parallel evaluation of several body literals in applications where it is appropriate.
展开▼