| Modifier and Type | Method and Description |
|---|---|
Rule |
Rule.addConclusion(Type type)
Add a conclusion of the specified Type to the Rule.
|
Rule |
Rule.addHypothesis(Type type)
Add a hypothesis of the specified Type to the Rule.
|
Rule |
RuleType.addRule(Pattern lhs,
Pattern rhs)
Add a new Rule, given Patterns for the Left Hand Side and Right Hand Side.
|
Rule |
Concept.asRule()
Return as a Rule if the Concept is a Rule Instance.
|
Rule |
Rule.setExpectation(boolean expectation)
Set the expectation of this Rule to be true or false.
|
Rule |
Rule.setMaterialise(boolean materialise)
Sets whether the Rule should be materialised.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<Rule> |
Type.getRulesOfConclusion()
Return the collection of Rules for which this Type serves as a conclusion.
|
Collection<Rule> |
Type.getRulesOfHypothesis()
Return the collection of Rules for which this Type serves as a hypothesis.
|
Collection<Rule> |
RuleType.instances() |
| Modifier and Type | Method and Description |
|---|---|
static Set<Rule> |
Reasoner.getRules(GraknGraph graph) |
| Modifier and Type | Method and Description |
|---|---|
static Rule |
Utility.createPropertyChainRule(RelationType relation,
String fromRoleName,
String toRoleName,
LinkedHashMap<RelationType,javafx.util.Pair<String,String>> chain,
GraknGraph graph) |
static Rule |
Utility.createReflexiveRule(RelationType relType,
GraknGraph graph)
create reflexive rule R(from: X, to: X) :- R(from: X,to: Y)
|
static Rule |
Utility.createSubPropertyRule(RelationType parent,
RelationType child,
Map<String,String> roleMappings,
GraknGraph graph)
creates rule parent :- child
|
static Rule |
Utility.createTransitiveRule(RelationType relType,
String fromRoleName,
String toRoleName,
GraknGraph graph)
create transitive rule R(from: X, to: Y) :- R(from: X,to: Z), R(from: Z, to: Y)
|
| Modifier and Type | Method and Description |
|---|---|
Set<Rule> |
Atom.getApplicableRules() |
| Modifier and Type | Method and Description |
|---|---|
void |
AtomicQuery.resolveViaRule(Rule rl,
Set<AtomicQuery> subGoals,
QueryCache cache,
boolean materialise) |
void |
AtomicMatchQuery.resolveViaRule(Rule rl,
Set<AtomicQuery> subGoals,
QueryCache cache,
boolean materialise) |
| Constructor and Description |
|---|
InferenceRule(Rule rule,
GraknGraph graph) |
Copyright © 2016 Grakn Labs Ltd. All rights reserved.