Analysis of SLG-WAM Evaluation of Definite Programs

SLG is a table-oriented resolution method that combines the deduc-tive database and logic programming paradigms. SLG is applicable to de-ductive databases since it terminates and has polynomial data complexity for programs with nite models. In terms of the logic programming (and non-monotonic) paradigms, SLG computes the well-founded model for non-stratiied programs, and has been extended to compute 3-valued stable model semantics. This paper presents performance analysis and comparisons of the SLG-WAM, the abstract machine for executing SLG that forms the basis of the XSB system 11]. Although the SLG-WAM handles modularly stratiied programs , in this paper, we look only at its performance on deenite programs. The results indicate that the overhead of the SLG-WAM compared to a similar WAM implementation is minimal for executing programs under SLD. Furthermore , results are presented to indicate tradeoos between SLD and SLG evaluation for a variety of programs. Perhaps surprisingly, SLG derivation is shown to be competitive with SLD derivation on numerous datalog programs, even when SLD terminates and contains no redundant subcomputations. Finally , performance comparisons indicate that the SLG-WAM is about an order of magnitude faster than current deductive database systems. These results call into question traditional arguments about top-down versus bottom-up evaluation eeciency, and may provide information of use in designing and implementing the next generation of logic programming and deductive database systems.