Class Analyser

java.lang.Object
fr.lirmm.graphik.integraal.rulesetanalyser.Analyser

public class Analyser extends Object
Computes rule-set properties and combinations over analysed rule sets.
  • Field Details

    • COMBINE_NONE

      public static final int COMBINE_NONE
      Combination flag meaning that no property is selected.
      See Also:
    • COMBINE_FES

      public static final int COMBINE_FES
      Combination flag for FES-based combinations.
      See Also:
    • COMBINE_FUS

      public static final int COMBINE_FUS
      Combination flag for FUS-based combinations.
      See Also:
    • COMBINE_BTS

      public static final int COMBINE_BTS
      Combination flag for BTS-based combinations.
      See Also:
  • Constructor Details

    • Analyser

      public Analyser()
      Creates an analyser with the default property hierarchy.
    • Analyser

      public Analyser(AnalyserRuleSet rules)
      Creates an analyser for the specified analysed rule set.
      Parameters:
      rules - the rule set to analyse
  • Method Details

    • setRuleSet

      public void setRuleSet(AnalyserRuleSet rules)
      Sets the analysed rule set.
      Parameters:
      rules - the analysed rule set
    • setRuleSet

      public void setRuleSet(Iterable<Rule> rules)
      Sets the analysed rule set from a raw iterable of rules.
      Parameters:
      rules - the rules to analyse
    • getRuleSet

      public AnalyserRuleSet getRuleSet()
      Returns the current analysed rule set.
      Returns:
      the analysed rule set
    • setProperties

      public void setProperties(RuleSetPropertyHierarchy h)
      Replaces the property hierarchy used by this analyser.
      Parameters:
      h - the property hierarchy to use
    • setProperties

      public void setProperties(Iterable<RuleSetProperty> pties)
      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

      public Map<String,Integer> ruleSetProperties()
      Returns the property results for the whole rule set.
      Returns:
      a map from property labels to evaluation results
    • sccProperties

      public List<Map<String,Integer>> sccProperties()
      Returns the property results for each strongly connected component.
      Returns:
      the SCC property results in traversal order
    • ruleProperties

      public List<Map<String,Integer>> ruleProperties()
      Returns the property results for each individual rule.
      Returns:
      the per-rule property results
    • combineFES

      public int[] combineFES()
      Computes the FES combination flags for the strongly connected components.
      Returns:
      the combination flags, or null if no combination is possible
    • combineFUS

      public int[] combineFUS()
      Computes the FUS combination flags for the strongly connected components.
      Returns:
      the combination flags, or null if no combination is possible
    • prepareCombine

      protected int[] prepareCombine()
      Initializes the combination flags for each strongly connected component.
      Returns:
      the initial combination flags
    • computeProperties

      protected Map<String,Integer> computeProperties(AnalyserRuleSet set)
      Evaluates all configured properties on the specified analysed rule set.
      Parameters:
      set - the analysed rule set to evaluate
      Returns:
      the resulting property map