Pre-Process Rules
Note: 3 kinds of relations in rules:
- IDBs, EDBs, comparators like = and <
Massage rules to obey 2 further constraints:
1. The head has no constants.
- Change p(X, "a" ) <= expr(X).
- To p(X,Y) <= expr(X), Y= "a".
- where Y is a new variable not used elsewhere in the rule.
2. The head has no repeats.
- Change p(X,X) <= expr(X).
- To p(X,Y) <= expr(X), Y=X.
- where Y is a new variable not used elsewhere in the rule.