Interface GraphOfRuleDependencies


public interface GraphOfRuleDependencies
Graph view of dependencies between rules.
Author:
Clément Sipieter (INRIA) <clement@6pi.fr>
  • Method Details

    • existUnifier

      boolean existUnifier(Rule src, Rule dest)
      Returns true, if there exists an unifier from src to dest, false otherwise.
      Parameters:
      src - the source rule
      dest - the destination rule
      Returns:
      true iff there exists an unifier from src to dest.
    • getUnifiers

      Set<Substitution> getUnifiers(Rule src, Rule dest)
      Returns a set of Substitution representing the set of unifiers from src to dest.
      Parameters:
      src - the source rule
      dest - the destination rule
      Returns:
      a set of Substitution representing the set of unifiers from src to dest.
    • getTriggeredRules

      Set<Rule> getTriggeredRules(Rule src)
      Returns all rules that can be triggered by the specified one.
      Parameters:
      src - a Rule.
      Returns:
      all rules that can be triggered by the specified one.
    • 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 the GraphOfRuleDependencies.
      Returns:
      true iff the graph contains at least one cycle.
    • getSubGraph

      GraphOfRuleDependencies getSubGraph(Iterable<Rule> ruleSet)
      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

      Iterable<Rule> 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.