Class Analyzer<M,E extends Event>

java.lang.Object
org.oristool.analyzer.Analyzer<M,E>
Type Parameters:
M - type of the model
E - type of the events

public final class Analyzer<M,E extends Event> extends Object
General state-space expansion algorithm.


   create succession (null, s0)        // and notify
   post-process succession (null, s0)  // and notify
   add succession (null, s0) to queue  // and notify

   while not queue.isEmpty() and not globalStop():

     (parent, i) = queue.remove()      // and notify
     preprocess succession (parent, i) // and notify
     isNewChild = G.add((parent, i))   // and notify

     if isNewChild and not localStop((parent, i)):
       for j in postprocessed non-null successors of i
       // (notified creation and postprocessing)

         queue.add((i,j))              // and notify
         if globalStop():
           break

   while not queue.isEmpty()           // ended because of global stop
     (parent, i) = queue.remove()      // and notify
     pre-process (parent, i)           // and notify
     G.add((parent, i))                // and notify
 
  • Constructor Details

    • Analyzer

      public Analyzer(AnalyzerComponentsFactory<M,E> componentsFactory, M model, State initialState)
      Creates an analyzer that will use the objects provided by the given factory to analyze a model from some initial state.
      Parameters:
      componentsFactory - factory of objects used during the analysis
      model - input model
      initialState - initial state of the model
  • Method Details

    • addObserver

      public void addObserver(AnalyzerObserver observer)
    • removeObserver

      public void removeObserver(AnalyzerObserver observer)
    • analyze

      public SuccessionGraph analyze()
      Starts the analysis.
      Returns:
      the graph resulting from the enumeration