Interface GraphOfRuleDependencies
public interface GraphOfRuleDependencies
Graph view of dependencies between rules.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Method Summary
Modifier and TypeMethodDescriptionbooleanexistUnifier(Rule src, Rule dest) Returns true, if there exists an unifier from src to dest, false otherwise.getRules()Returns all rules contained in this graph.Returns the graph of strongly connected components of this dependency graph.getSubGraph(Iterable<Rule> ruleSet) Creates and return an induced SubGraph of the current one.getTriggeredRules(Rule src) Returns all rules that can be triggered by the specified one.Set<org.apache.commons.lang3.tuple.Pair<Rule, Substitution>> Returns all pair of rule and unifier that can be triggered by the specfied rule.getUnifiers(Rule src, Rule dest) Returns a set of Substitution representing the set of unifiers from src to dest.booleanPerforms cycle detection on theGraphOfRuleDependencies.
-
Method Details
-
existUnifier
-
getUnifiers
Returns a set of Substitution representing the set of unifiers from src to dest.- Parameters:
src- the source ruledest- the destination rule- Returns:
- a set of Substitution representing the set of unifiers from src to dest.
-
getTriggeredRules
-
getTriggeredRulesWithUnifiers
Set<org.apache.commons.lang3.tuple.Pair<Rule, Substitution>> getTriggeredRulesWithUnifiers(Rule src) Returns all pair of rule and unifier that can be triggered by the specfied rule.- Parameters:
src- the source rule- Returns:
- all pair of rule and unifier that can be triggered by the specfied rule.
-
hasCircuit
boolean hasCircuit()Performs cycle detection on theGraphOfRuleDependencies.- Returns:
- true iff the graph contains at least one cycle.
-
getSubGraph
Creates and return an induced SubGraph of the current one.- Parameters:
ruleSet- the rules to keep in the induced subgraph- Returns:
- the induced subgraph by specified rules.
-
getRules
Returns all rules contained in this graph.- Returns:
- all rules containing in this
GraphOfRuleDependencies.
-
getStronglyConnectedComponentsGraph
StronglyConnectedComponentsGraph<Rule> getStronglyConnectedComponentsGraph()Returns the graph of strongly connected components of this dependency graph.- Returns:
- the graph of strongly connected components of this graph.
-