Interface Rule
- All Superinterfaces:
Comparable<Rule>
- All Known Subinterfaces:
NegativeConstraint
- All Known Implementing Classes:
AbstractRule, ConjunctiveQueryRuleAdapter, DefaultNegativeConstraint, DefaultRule
This interface represents an existential rule. An existential rule is a positive rule of the form B -> H,
where B and H are conjunctions of atoms; it is interpreted as the formula ∀X(∃Y B[X,Y] -> ∃Z H[X,Z]), or equivalently
∀X∀Y(B[X,Y] -> ∃Z H[X,Z]), where X are the variables shared by B and H, Y are the variables that occur only in B and Z
the ones that occur only in H. Note that Z are existentially quantified.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Method Summary
Modifier and TypeMethodDescriptionvoidAppends this object representation to the provided builder.getBody()Get the body (the hypothesis) of this rule.Get all constants of this rule.Compute and return the set of existential variables of this rule.Compute and return the set of frontier variables of this rule.getHead()Get the head (the conclusion) of this rule.getLabel()Get the label (the name) of this rule.Get all literals of this rule.getTerms()Get all terms of this rule.Deprecated.Get all variables of this rule.voidSet the label (the name) of this rule.Methods inherited from interface Comparable
compareTo
-
Method Details
-
getLabel
-
setLabel
Set the label (the name) of this rule.- Parameters:
label- the new rule label
-
getBody
InMemoryAtomSet getBody()Get the body (the hypothesis) of this rule.- Returns:
- the body of this rule.
-
getHead
InMemoryAtomSet getHead()Get the head (the conclusion) of this rule.- Returns:
- the head of this rule.
-
getFrontier
-
getExistentials
-
getTerms
Deprecated.Get terms by Type.- Parameters:
type- the term type to collect- Returns:
- a Set of all Term of the specified type related to this Rule.
-
getVariables
-
getConstants
-
getLiterals
-
getTerms
-
appendTo
Appends this object representation to the provided builder.- Parameters:
sb- the target builder
-