Class AnalyserRuleSet
java.lang.Object
fr.lirmm.graphik.integraal.rulesetanalyser.util.AnalyserRuleSet
- All Implemented Interfaces:
ImmutableRuleSet, Iterable<Rule>
Immutable rule set wrapper enriched with analysis-oriented graph structures.
- Author:
- Clément Sipieter (INRIA) <clement@6pi.fr>
-
Constructor Summary
ConstructorsConstructorDescriptionAnalyserRuleSet(Rule rule) Builds an analyser rule set containing a single rule.AnalyserRuleSet(fr.lirmm.graphik.integraal.core.grd.DefaultGraphOfRuleDependencies grd) Builds an analyser rule set from an already computed graph of rule dependencies.AnalyserRuleSet(CloseableIterator<Rule> rules) Builds an analyser rule set from a closeable iterator of rules.AnalyserRuleSet(CloseableIterator<Rule> rules, fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker... checkers) Builds an analyser rule set from a closeable iterator and dependency checkers.AnalyserRuleSet(Iterable<Rule> rules) Builds an analyser rule set from the specified rules.AnalyserRuleSet(Iterable<Rule> rules, fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker checker) Builds an analyser rule set from the specified rules and dependency checker.AnalyserRuleSet(Iterator<Rule> rules) Builds an analyser rule set from the specified rule iterator.AnalyserRuleSet(Iterator<Rule> rules, RulesCompilation compilation) Builds an analyser rule set from the specified iterator and compilation.AnalyserRuleSet(Iterator<Rule> rules, fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker... checkers) Builds an analyser rule set from the specified rule iterator and dependency checkers. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDependencyChecker(fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker checker) Adds a dependency checker to this analyser rule set.voidRemoves all dependency checkers from this analyser rule set.booleanReturns whether the specified rule is present in this set.voidenableUnifiers(boolean wu) Enables or disables unifier-based computations.fr.lirmm.graphik.integraal.rulesetanalyser.graph.AffectedPositionSetReturns the affected-position set associated with this rule set.fr.lirmm.graphik.integraal.core.grd.DefaultGraphOfRuleDependenciesReturns the graph of rule dependencies for this rule set.fr.lirmm.graphik.integraal.rulesetanalyser.graph.GraphPositionDependenciesReturns the graph of position dependencies.fr.lirmm.graphik.integraal.rulesetanalyser.graph.JointlyAffectedPositionSetReturns the jointly affected-position set associated with this rule set.fr.lirmm.graphik.integraal.rulesetanalyser.graph.MarkedVariableSetReturns the marked-variable set associated with this rule set.getSCC()Returns the strongly connected components as analyser rule sets.Returns the strongly connected components graph of the rule-dependency graph.getSubRuleSetAnalyser(Iterable<Rule> rules) Extracts a sub-rule-set analyser for the specified rules.booleanisEmpty()Returns whether this set contains no rule.iterator()voidremoveDependencyChecker(fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker checker) Removes a dependency checker from this analyser rule set.voidsetGraphOfRuleDependencies(fr.lirmm.graphik.integraal.core.grd.DefaultGraphOfRuleDependencies grd) Replaces the graph of rule dependencies associated with this rule set.intsize()Returns the number of rules contained in this set.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
AnalyserRuleSet
Builds an analyser rule set containing a single rule.- Parameters:
rule- the rule to analyse
-
AnalyserRuleSet
-
AnalyserRuleSet
-
AnalyserRuleSet
-
AnalyserRuleSet
-
AnalyserRuleSet
Builds an analyser rule set from the specified iterator and compilation.- Parameters:
rules- the rules to analysecompilation- the rule compilation to use
-
AnalyserRuleSet
Builds an analyser rule set from a closeable iterator of rules.- Parameters:
rules- the rules to analyse- Throws:
RuleSetException- if the iterator fails
-
AnalyserRuleSet
public AnalyserRuleSet(CloseableIterator<Rule> rules, fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker... checkers) throws RuleSetException Builds an analyser rule set from a closeable iterator and dependency checkers.- Parameters:
rules- the rules to analysecheckers- the dependency checkers to apply- Throws:
RuleSetException- if the iterator fails
-
AnalyserRuleSet
public AnalyserRuleSet(fr.lirmm.graphik.integraal.core.grd.DefaultGraphOfRuleDependencies grd) Builds an analyser rule set from an already computed graph of rule dependencies.- Parameters:
grd- the graph of rule dependencies to wrap
-
-
Method Details
-
addDependencyChecker
public void addDependencyChecker(fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker checker) Adds a dependency checker to this analyser rule set.- Parameters:
checker- the checker to add
-
removeDependencyChecker
public void removeDependencyChecker(fr.lirmm.graphik.integraal.api.core.unifier.DependencyChecker checker) Removes a dependency checker from this analyser rule set.- Parameters:
checker- the checker to remove
-
clearDependencyChecker
public void clearDependencyChecker()Removes all dependency checkers from this analyser rule set. -
enableUnifiers
public void enableUnifiers(boolean wu) Enables or disables unifier-based computations.- Parameters:
wu-trueto enable unifiers,falseotherwise
-
getGraphOfRuleDependencies
public fr.lirmm.graphik.integraal.core.grd.DefaultGraphOfRuleDependencies getGraphOfRuleDependencies()Returns the graph of rule dependencies for this rule set.- Returns:
- the graph of rule dependencies
-
setGraphOfRuleDependencies
public void setGraphOfRuleDependencies(fr.lirmm.graphik.integraal.core.grd.DefaultGraphOfRuleDependencies grd) Replaces the graph of rule dependencies associated with this rule set.- Parameters:
grd- the graph of rule dependencies
-
getAffectedPositionSet
public fr.lirmm.graphik.integraal.rulesetanalyser.graph.AffectedPositionSet getAffectedPositionSet()Returns the affected-position set associated with this rule set.- Returns:
- the affected-position set
-
getJointlyAffectedPositionSet
public fr.lirmm.graphik.integraal.rulesetanalyser.graph.JointlyAffectedPositionSet getJointlyAffectedPositionSet()Returns the jointly affected-position set associated with this rule set.- Returns:
- the jointly affected-position set
-
getGraphPositionDependencies
public fr.lirmm.graphik.integraal.rulesetanalyser.graph.GraphPositionDependencies getGraphPositionDependencies()Returns the graph of position dependencies.- Returns:
- the graph of position dependencies
-
getMarkedVariableSet
public fr.lirmm.graphik.integraal.rulesetanalyser.graph.MarkedVariableSet getMarkedVariableSet()Returns the marked-variable set associated with this rule set.- Returns:
- the marked-variable set
-
getStronglyConnectedComponentsGraph
Returns the strongly connected components graph of the rule-dependency graph.- Returns:
- the SCC graph
-
getSubRuleSetAnalyser
Extracts a sub-rule-set analyser for the specified rules.- Parameters:
rules- the rules forming the sub-rule-set- Returns:
- an analyser for the induced subgraph
-
getSCC
Returns the strongly connected components as analyser rule sets.- Returns:
- the SCC analyser rule sets
-
contains
Description copied from interface:ImmutableRuleSetReturns whether the specified rule is present in this set.- Specified by:
containsin interfaceImmutableRuleSet- Parameters:
rule- the rule to search for- Returns:
- true if the rule is present
-
iterator
-
size
public int size()Description copied from interface:ImmutableRuleSetReturns the number of rules contained in this set.- Specified by:
sizein interfaceImmutableRuleSet- Returns:
- the number of rules contained in this set.
-
isEmpty
public boolean isEmpty()Description copied from interface:ImmutableRuleSetReturns whether this set contains no rule.- Specified by:
isEmptyin interfaceImmutableRuleSet- Returns:
- true if this set is empty
-