Class Analyser
java.lang.Object
fr.lirmm.graphik.integraal.rulesetanalyser.Analyser
Computes rule-set properties and combinations over analysed rule sets.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intCombination flag for BTS-based combinations.static final intCombination flag for FES-based combinations.static final intCombination flag for FUS-based combinations.static final intCombination flag meaning that no property is selected. -
Constructor Summary
ConstructorsConstructorDescriptionAnalyser()Creates an analyser with the default property hierarchy.Analyser(AnalyserRuleSet rules) Creates an analyser for the specified analysed rule set. -
Method Summary
Modifier and TypeMethodDescriptionint[]Computes the FES combination flags for the strongly connected components.int[]Computes the FUS combination flags for the strongly connected components.Evaluates all configured properties on the specified analysed rule set.Returns the current analysed rule set.booleanReturns whether the current rule set is known to be decidable.booleanisFES()Returns whether all strongly connected components can be combined as FES.booleanisFUS()Returns whether all strongly connected components can be combined as FUS.protected int[]Initializes the combination flags for each strongly connected component.Returns the property results for each individual rule.Returns the property results for the whole rule set.Returns the property results for each strongly connected component.voidReplaces the property hierarchy used by this analyser.voidsetProperties(Iterable<RuleSetProperty> pties) Replaces the property hierarchy from the given property collection.voidsetRuleSet(AnalyserRuleSet rules) Sets the analysed rule set.voidsetRuleSet(Iterable<Rule> rules) Sets the analysed rule set from a raw iterable of rules.
-
Field Details
-
COMBINE_NONE
public static final int COMBINE_NONECombination flag meaning that no property is selected.- See Also:
-
COMBINE_FES
public static final int COMBINE_FESCombination flag for FES-based combinations.- See Also:
-
COMBINE_FUS
public static final int COMBINE_FUSCombination flag for FUS-based combinations.- See Also:
-
COMBINE_BTS
public static final int COMBINE_BTSCombination flag for BTS-based combinations.- See Also:
-
-
Constructor Details
-
Analyser
public Analyser()Creates an analyser with the default property hierarchy. -
Analyser
Creates an analyser for the specified analysed rule set.- Parameters:
rules- the rule set to analyse
-
-
Method Details
-
setRuleSet
Sets the analysed rule set.- Parameters:
rules- the analysed rule set
-
setRuleSet
-
getRuleSet
Returns the current analysed rule set.- Returns:
- the analysed rule set
-
setProperties
Replaces the property hierarchy used by this analyser.- Parameters:
h- the property hierarchy to use
-
setProperties
Replaces the property hierarchy from the given property collection.- Parameters:
pties- the properties to organise into a hierarchy
-
isDecidable
public boolean isDecidable()Returns whether the current rule set is known to be decidable.- Returns:
- true only if some property ensures the rule set is decidable
-
isFES
public boolean isFES()Returns whether all strongly connected components can be combined as FES.- Returns:
- true if the analysed rule set is FES according to the combination step
-
isFUS
public boolean isFUS()Returns whether all strongly connected components can be combined as FUS.- Returns:
- true if the analysed rule set is FUS according to the combination step
-
ruleSetProperties
-
sccProperties
-
ruleProperties
-
combineFES
public int[] combineFES()Computes the FES combination flags for the strongly connected components.- Returns:
- the combination flags, or
nullif no combination is possible
-
combineFUS
public int[] combineFUS()Computes the FUS combination flags for the strongly connected components.- Returns:
- the combination flags, or
nullif no combination is possible
-
prepareCombine
protected int[] prepareCombine()Initializes the combination flags for each strongly connected component.- Returns:
- the initial combination flags
-
computeProperties
Evaluates all configured properties on the specified analysed rule set.- Parameters:
set- the analysed rule set to evaluate- Returns:
- the resulting property map
-