TY - JOUR
T1 - Efficient goal directed bottom-up evaluation of logic programs
AU - Codish, Michael
N1 - Funding Information:
Bottom-up evaluation of logic programs has been proposed for a variety of application areas as an alternative to Prolog's top-down evaluation strategy. Bottom-up computing lies also at the heart of deductive databases. The basic bottom-up scheme involves a query-program transformation termed Magic-sets \[2\]( and by now a class of algorithms: Generalized Magic-sets \[4\], Magic Templates \[20\],A lexander Templates \[24\]).U sing this technique, a program-query pair is transformed into a magic program whose bottom-up fixed point evaluation is devised to simulate top-down This work was supported by a grant from the Israel Science Foundation. * Tel.: +972-7-646-1654; fax: +972-7-647-2909; e-mail: [email protected].
PY - 1999/1/1
Y1 - 1999/1/1
N2 - This paper introduces a new strategy for the efficient goal directed bottom-up evaluation of logic programs. Instead of combining a standard bottom-up evaluation strategy with a Magic-set transformation, the evaluation strategy is specialized for the application to Magic-set programs which are characterized by clause bodies with a high degree of overlapping. The approach is similar to other techniques which avoid re-computation by maintaining and reusing partial solutions to clause bodies. However, the overhead is considerably reduced as these are maintained implicitly by the underlying Prolog implementation. The technique is presented as a simple meta-interpreter for goal directed bottom-up evaluation. No Magic-set transformation is involved as the dependencies between calls and answers are expressed directly within the interpreter. The proposed technique has been implemented and shown to provide substantial speed-ups in applications of semantic based program analysis based on bottom-up evaluation.
AB - This paper introduces a new strategy for the efficient goal directed bottom-up evaluation of logic programs. Instead of combining a standard bottom-up evaluation strategy with a Magic-set transformation, the evaluation strategy is specialized for the application to Magic-set programs which are characterized by clause bodies with a high degree of overlapping. The approach is similar to other techniques which avoid re-computation by maintaining and reusing partial solutions to clause bodies. However, the overhead is considerably reduced as these are maintained implicitly by the underlying Prolog implementation. The technique is presented as a simple meta-interpreter for goal directed bottom-up evaluation. No Magic-set transformation is involved as the dependencies between calls and answers are expressed directly within the interpreter. The proposed technique has been implemented and shown to provide substantial speed-ups in applications of semantic based program analysis based on bottom-up evaluation.
KW - Bottom-up evaluation
KW - Magic sets
UR - http://www.scopus.com/inward/record.url?scp=0033101766&partnerID=8YFLogxK
U2 - 10.1016/S0743-1066(98)10024-9
DO - 10.1016/S0743-1066(98)10024-9
M3 - Article
AN - SCOPUS:0033101766
SN - 0743-1066
VL - 38
SP - 355
EP - 370
JO - Journal of Logic Programming
JF - Journal of Logic Programming
IS - 3
ER -