Class MarkovSeffVisitor

java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
org.palladiosimulator.reliability.solver.pcm2markov.MarkovSeffVisitor

public class MarkovSeffVisitor extends org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
This class represents a visitor for an RDSEFF within a PCM instance. The visitor is used in the transformation from PCM with solved dependencies into a Markov Chain Model for reliability prediction.
  • Field Summary

    Fields inherited from class org.palladiosimulator.pcm.seff.util.SeffSwitch

    copyright, modelPackage
  • Constructor Summary

    Constructors
    Constructor
    Description
    MarkovSeffVisitor(MarkovTransformationSource transformationState, org.palladiosimulator.solver.transformations.ContextWrapper wrapper, List<String> prefixes, MarkovEvaluationType evaluationType, boolean simplifiedStateHandling, boolean optimize, boolean recordTraces)
    The constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    caseAbstractInternalControlFlowAction(org.palladiosimulator.pcm.seff.AbstractInternalControlFlowAction controlFlowAction)
    Handles RecoveryActions.
    caseAcquireAction(org.palladiosimulator.pcm.seff.AcquireAction acquireAction)
    An Acquire Action returns a trivial Markov Chain.
    caseBranchAction(org.palladiosimulator.pcm.seff.BranchAction branchAction)
    For a BranchAction, first the Markov Chain of each of the transition behaviours is built.
    caseCollectionIteratorAction(org.palladiosimulator.pcm.seff.CollectionIteratorAction collectionIteratorAction)
    A collection iterator action is handled the same way as an ordinary loop.
    caseExternalCallAction(org.palladiosimulator.pcm.seff.ExternalCallAction externalCallAction)
    Handles an ExternalCallAction.
    caseForkAction(org.palladiosimulator.pcm.seff.ForkAction forkAction)
    Handles fork actions.
    caseInternalAction(org.palladiosimulator.pcm.seff.InternalAction internalAction)
    An InternalAction is an actual possible point of failure, either because a software failure might happen, or because a required physical resource may be currently unavailable.
    caseLoopAction(org.palladiosimulator.pcm.seff.LoopAction loopAction)
    For a LoopAction, first the Markov Chain of the body behaviour is built.
    caseReleaseAction(org.palladiosimulator.pcm.seff.ReleaseAction releaseAction)
    A Release Action returns a trivial Markov Chain.
    caseResourceDemandingBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour)
    Evaluates a resource demanding behaviour by considering all actions in the behaviour.
    caseResourceDemandingSEFF(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF seff)
    Evaluates a resource demanding SEFF.
    caseSetVariableAction(org.palladiosimulator.pcm.seff.SetVariableAction setVariableAction)
    A SetVariableAction returns a trivial Markov Chain.
    caseStartAction(org.palladiosimulator.pcm.seff.StartAction startAction)
    A StartAction returns a trivial Markov Chain.
    caseStopAction(org.palladiosimulator.pcm.seff.StopAction stopAction)
    A StopAction returns a trivial Markov Chain.

    Methods inherited from class org.palladiosimulator.pcm.seff.util.SeffSwitch

    caseAbstractAction, caseAbstractBranchTransition, caseAbstractLoopAction, caseCallAction, caseCallReturnAction, caseEmitEventAction, caseEntity, caseFailureHandlingEntity, caseForkedBehaviour, caseGuardedBranchTransition, caseIdentifier, caseInternalCallAction, caseNamedElement, casePCMBaseClass, casePCMClass, caseProbabilisticBranchTransition, caseResourceDemandingInternalBehaviour, caseServiceEffectSpecification, caseSynchronisationPoint, defaultCase, doSwitch, isSwitchFor

    Methods inherited from class org.eclipse.emf.ecore.util.Switch

    doSwitch, doSwitch

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • MarkovSeffVisitor

      public MarkovSeffVisitor(MarkovTransformationSource transformationState, org.palladiosimulator.solver.transformations.ContextWrapper wrapper, List<String> prefixes, MarkovEvaluationType evaluationType, boolean simplifiedStateHandling, boolean optimize, boolean recordTraces)
      The constructor.
      Parameters:
      transformationState - the Markov transformation state
      wrapper - the ContextWrapper provides easy access to the decorations of the solved PCM instance
      prefixes - the list of prefixes for state names
      evaluationType - the degree of differentiation between failure types
      simplifiedStateHandling - controls the handling of physical resource states
      optimize - controls if Markov Chain reduction is performed during transformation
      recordTraces - controls if traces shall be recorded during transformation
  • Method Details

    • caseAbstractInternalControlFlowAction

      public MarkovChain caseAbstractInternalControlFlowAction(org.palladiosimulator.pcm.seff.AbstractInternalControlFlowAction controlFlowAction)
      Handles RecoveryActions. This is a workaround using the case for AbstractInternalControlFlowActions, because RecoveryActions are not directly contained in the SEFF package, and thus there is no case for them. First, for each RecoveryActionBehaviour a specific Markov chain is built. Then, specific chains are appended to each other according to the specification of handled failure types.
      Overrides:
      caseAbstractInternalControlFlowAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      controlFlowAction - the control flow action
      Returns:
      the resulting Markov Chain.
    • caseAcquireAction

      public MarkovChain caseAcquireAction(org.palladiosimulator.pcm.seff.AcquireAction acquireAction)
      An Acquire Action returns a trivial Markov Chain.
      Overrides:
      caseAcquireAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      acquireAction - the acquire action
      Returns:
      the resulting Markov Chain.
    • caseBranchAction

      public MarkovChain caseBranchAction(org.palladiosimulator.pcm.seff.BranchAction branchAction)
      For a BranchAction, first the Markov Chain of each of the transition behaviours is built. The results are then inserted into a new Markov Chain that has one State for each of the possible branches.
      Overrides:
      caseBranchAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      branchAction - the BranchAction
      Returns:
      the resulting Markov Chain
    • caseCollectionIteratorAction

      public MarkovChain caseCollectionIteratorAction(org.palladiosimulator.pcm.seff.CollectionIteratorAction collectionIteratorAction)
      A collection iterator action is handled the same way as an ordinary loop.
      Overrides:
      caseCollectionIteratorAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      collectionIteratorAction - the CollectionIteratoraction
      Returns:
      the resulting Markov Chain
    • caseExternalCallAction

      public MarkovChain caseExternalCallAction(org.palladiosimulator.pcm.seff.ExternalCallAction externalCallAction)
      Handles an ExternalCallAction. Generates a Markov Chain of the executing behavior. The Markov Chain is generated by MarkovSeffVisitor.createExternalCallActionChain. If an retry count is set in the internal action, the chain is repeatedly appended to the main chains failure state.
      Overrides:
      caseExternalCallAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      externalCallAction - the ExternalCallAction
      Returns:
      the resulting Markov Chain.
    • caseForkAction

      public MarkovChain caseForkAction(org.palladiosimulator.pcm.seff.ForkAction forkAction)
      Handles fork actions. All forked behaviours are handled sequentially.
      Overrides:
      caseForkAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
    • caseInternalAction

      public MarkovChain caseInternalAction(org.palladiosimulator.pcm.seff.InternalAction internalAction)
      An InternalAction is an actual possible point of failure, either because a software failure might happen, or because a required physical resource may be currently unavailable. A Markov chain is returned that reflects all possible outcomes and their probabilities.
      Overrides:
      caseInternalAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      internalAction - the InternalAction
      Returns:
      the resulting Markov Chain
    • caseLoopAction

      public MarkovChain caseLoopAction(org.palladiosimulator.pcm.seff.LoopAction loopAction)
      For a LoopAction, first the Markov Chain of the body behaviour is built. The result is then inserted into a new Markov Chain that has one State for each of the possible iteration counts of the loop.
      Overrides:
      caseLoopAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      loopAction - the LoopAction
      Returns:
      the resulting Markov Chain
    • caseReleaseAction

      public MarkovChain caseReleaseAction(org.palladiosimulator.pcm.seff.ReleaseAction releaseAction)
      A Release Action returns a trivial Markov Chain.
      Overrides:
      caseReleaseAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      releaseAction - the release action
      Returns:
      the resulting Markov Chain.
    • caseResourceDemandingBehaviour

      public MarkovChain caseResourceDemandingBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour)
      Evaluates a resource demanding behaviour by considering all actions in the behaviour. Returns a corresponding Markov chain.
      Overrides:
      caseResourceDemandingBehaviour in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      behaviour - the ResourceDemandingBehaviour
      Returns:
      the resulting Markov Chain
    • caseResourceDemandingSEFF

      public MarkovChain caseResourceDemandingSEFF(org.palladiosimulator.pcm.seff.ResourceDemandingSEFF seff)
      Evaluates a resource demanding SEFF. In addition to the behavioural evaluation, also the availability of the executing resource container is checked. Returns a corresponding Markov chain.
      Overrides:
      caseResourceDemandingSEFF in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      seff - the ResourceDemandingSEFF
      Returns:
      the resulting Markov Chain
    • caseSetVariableAction

      public MarkovChain caseSetVariableAction(org.palladiosimulator.pcm.seff.SetVariableAction setVariableAction)
      A SetVariableAction returns a trivial Markov Chain.
      Overrides:
      caseSetVariableAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      setVariableAction - the SetVariableAction
      Returns:
      the resulting Markov Chain
    • caseStartAction

      public MarkovChain caseStartAction(org.palladiosimulator.pcm.seff.StartAction startAction)
      A StartAction returns a trivial Markov Chain.
      Overrides:
      caseStartAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      startAction - the StartAction
      Returns:
      the resulting trivial Markov Chain
    • caseStopAction

      public MarkovChain caseStopAction(org.palladiosimulator.pcm.seff.StopAction stopAction)
      A StopAction returns a trivial Markov Chain.
      Overrides:
      caseStopAction in class org.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
      Parameters:
      stopAction - the StopAction
      Returns:
      the resulting trivial Markov Chain