Class FullFolderRewriter

java.lang.Object
com.semedy.reasoner.rewriter.FullFolderRewriter
All Implemented Interfaces:
Rewriter

public class FullFolderRewriter extends Object implements Rewriter
folds rules. For instance given two rules: p(?X,?Y) :- q(?X),s(?X),r(?X,?Y). r(?U) :- q(?U),t(?U),r(?U,?Y).
They can be replaced by the following rules:
u(?X,?Y) :- q(?X),r(?X,?Y). // outfolded rule p(?X,?Y) :- u(?X,?Y),s(?X). r(?U) :- u(?U,?Y),t(?U).
The first set of rules needs 4 joins to be evaluated, the
second set of rules needs 3 joins only to be evaluated
Author:
angele