Interface RuleCompilation
- All Known Implementing Classes:
HierarchicalRuleCompilation, IDRuleCompilation, NoRuleCompilation
public interface RuleCompilation
A RuleCompilation is a structure that represents a compilation as defined in Melanie König's thesis.
- Author:
- ftornil
-
Method Summary
Modifier and TypeMethodDescriptionvoidThis method also removes the compiled rules from the given rulebase.Compiles the rule base and returns the compilation split.Returns every predicate compatible with the supplied one.default Set<Substitution> getHomomorphisms(Atom a, Atom b) Compute all the possible homomorphisms from a to bgetHomomorphisms(Atom a, Atom b, Substitution s) Compute all the possible homomorphisms from a to b with respect to sgetUnifications(Atom a, Atom b) Compute all the possible unifiers between a and bbooleanisCompatible(Predicate p, Predicate q) Two predicates are compatible iff there exists a condition c = (p, q, Ep, Lq)booleanisMoreSpecificThan(Atom a, Atom b) This method is not used for the moment.Set<org.apache.commons.lang3.tuple.Pair<Atom, Substitution>> The unfolding of an atomais a set A' such that for all a' in A', a' <= a.
-
Method Details
-
compile
This method also removes the compiled rules from the given rulebase.- Parameters:
rb- rulebase to compile
-
compileAndGet
Compiles the rule base and returns the compilation split.- Parameters:
rb- rulebase to compile- Returns:
- the compilation result and the partition of input rules
-
isMoreSpecificThan
-
unfold
The unfolding of an atomais a set A' such that for all a' in A', a' <= a. The atom is returned with a substitution representing the specialization from the unification with the compiled rule.- Parameters:
a- an atom- Returns:
- the unfolding of a with this compilation
-
isCompatible
-
getCompatiblePredicates
-
getHomomorphisms
Compute all the possible homomorphisms from a to b- Parameters:
a- an atomb- an atom- Returns:
- the set of substitutions from the terms of
ato the terms of b
-
getHomomorphisms
Compute all the possible homomorphisms from a to b with respect to s- Parameters:
a- an atomb- an atoms- a substitution- Returns:
- the set of substitutions from the terms of
ato the terms of b with respect to s
-
getUnifications
Compute all the possible unifiers between a and b- Parameters:
a- an atomb- an atom- Returns:
- the set of all partitions from the terms of b and a
-