Abstract
We consider a bottom-up query-evaluation scheme in which facts of relations are allowed to have nonground terms. The magic-sets query- rewriting technique is generalized to allow arguments of predicates to be treated as bound even though the rules do not provide ground bindings for those arguments. In particular, we regard as “bound” any argument containing a function symbol or a variable that appears more than once in the argument list. Generalized “magic” predicates are thus defined to compute the set of all goals reached in a top-down exploration of the rules, starting from a given query goal; these goals are not facts of constants as in previous versions of the magic-sets algorithm. The magic predicates are then used to restrict a bottom-up evaluation of the rules so that there are no redundant actions; that is, every step of the bottom-up computation must be performed by any algorithm that uses the same sideways information-passing strategy (sips). The price paid, compared to previous versions of Magic Sets, is that we must store relations with nonground facts, and we must perform unifications, rather than equijoins, when evaluating the rules bottom-up. The method is applicable to general Horn-clause logic programs.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.