Class GSPNReachability

java.lang.Object
org.oristool.models.gspn.reachability.GSPNReachability
All Implemented Interfaces:
Engine<PetriNet,Marking,DTMC<SPNState>>

public abstract class GSPNReachability extends Object implements Engine<PetriNet,Marking,DTMC<SPNState>>
Computes the graph of tangible markings reachable in a GSPN.

Immediate events are removed by solving absorption probabilities of immediate components that may include cycles.

  • Method Details

    • stopOn

      public abstract Supplier<StopCriterion> stopOn()
      Returns the supplier of local stop criterion instances used by this analysis. It can be used to avoid the expansion of some state classes, as if their states were absorbing.

      A stop criterion instance is generated for each run.

      By default, an always-false local stop criterion is used.

      Returns:
      the supplier of local stop criterion
    • monitor

      public abstract AnalysisMonitor monitor()
      Returns the monitor used by this analysis. It is used to stop the analysis early and to notify messages to the user.

      By default, an always-false, message-discarding monitor is used.

      Returns:
      the monitor used by this analysis
    • logger

      public abstract AnalysisLogger logger()
      Returns the logger used by this analysis. It is used to print progress information.

      By default, logs are discarded.

      Returns:
      the logger used by this analysis
    • builder

      public static GSPNReachability.Builder builder()
      Creates a builder for analysis configurations (with default values).
      Returns:
      a builder of TimedAnalysis instances.
    • compute

      public DTMC<SPNState> compute(PetriNet pn, Marking m)
      Runs this analysis on a given Petri net from an initial marking.
      Specified by:
      compute in interface Engine<PetriNet,Marking,DTMC<SPNState>>
      Parameters:
      pn - the input Petri net
      m - the initial marking
      Returns:
      a CTMC encoded as embedded DTMC where states have exit rates
      Throws:
      IllegalArgumentException - if the analysis is not applicable to the input Petri net
    • canAnalyze

      public boolean canAnalyze(PetriNet pn, ValidationMessageCollector c)
      Description copied from interface: Engine
      Checks if the analysis can be applied to the given model.

      Problems are collected in a ValidationMessageCollector.

      Specified by:
      canAnalyze in interface Engine<PetriNet,Marking,DTMC<SPNState>>
      Parameters:
      pn - input model (such as a Petri net)
      c - collector of error messages
      Returns:
      true if the analysis can be applied to the given model