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
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
ConstructorDescriptionMarkovSeffVisitor
(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 TypeMethodDescriptioncaseAbstractInternalControlFlowAction
(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
-
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 statewrapper
- the ContextWrapper provides easy access to the decorations of the solved PCM instanceprefixes
- the list of prefixes for state namesevaluationType
- the degree of differentiation between failure typessimplifiedStateHandling
- controls the handling of physical resource statesoptimize
- controls if Markov Chain reduction is performed during transformationrecordTraces
- 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 classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
controlFlowAction
- the control flow action- Returns:
- the resulting Markov Chain.
-
caseAcquireAction
An Acquire Action returns a trivial Markov Chain.- Overrides:
caseAcquireAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
acquireAction
- the acquire action- Returns:
- the resulting Markov Chain.
-
caseBranchAction
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 classorg.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 classorg.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 byMarkovSeffVisitor.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 classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
externalCallAction
- the ExternalCallAction- Returns:
- the resulting Markov Chain.
-
caseForkAction
Handles fork actions. All forked behaviours are handled sequentially.- Overrides:
caseForkAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
-
caseInternalAction
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 classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
internalAction
- the InternalAction- Returns:
- the resulting Markov Chain
-
caseLoopAction
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 classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
loopAction
- the LoopAction- Returns:
- the resulting Markov Chain
-
caseReleaseAction
A Release Action returns a trivial Markov Chain.- Overrides:
caseReleaseAction
in classorg.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 classorg.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 classorg.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 classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
setVariableAction
- the SetVariableAction- Returns:
- the resulting Markov Chain
-
caseStartAction
A StartAction returns a trivial Markov Chain.- Overrides:
caseStartAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
startAction
- the StartAction- Returns:
- the resulting trivial Markov Chain
-
caseStopAction
A StopAction returns a trivial Markov Chain.- Overrides:
caseStopAction
in classorg.palladiosimulator.pcm.seff.util.SeffSwitch<MarkovChain>
- Parameters:
stopAction
- the StopAction- Returns:
- the resulting trivial Markov Chain
-