Commit 654207af authored by Faezeh KHORRAM's avatar Faezeh KHORRAM 💬
Browse files

update mutation operators

parent b82f0262
......@@ -4,18 +4,12 @@
<semanticResources>generated/bpmnSpecificTypes.tdlan2</semanticResources>
<semanticResources>generated/testConfiguration.tdlan2</semanticResources>
<semanticResources>PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210519_225850/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210519_230811/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210519_230914/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>VerifyUserAccess_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210520_105559/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210609_164521/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210609_165811/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210610_101201/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210610_103845/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_095755/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_095807/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_095925/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_095944/VerifyUserAccess_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_101310/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_215346/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_215418/VerifyUserAccess_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_215454/VerifyUserAccess_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_215609/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_215944/PromoteEmployee_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_220029/VerifyUserAccess_Test.tdlan2</semanticResources>
<semanticResources>gemoc-gen/execution/execution-20210706_220241/VerifyUserAccess_Test.tdlan2</semanticResources>
</viewpoint:DAnalysis>
......@@ -5,22 +5,22 @@ metamodel "/org.imt.tdl.PSSMMutation/data/model/statemachines.ecore"
with blocks {
ccs "Creates a connected state" {
randomState = select one Vertex where {self not typed FinalState}
randomState = select one State
newState = create State with {name = random-string(1, 4), ^container = randomState->^container}
create Transition with {^source = randomState, ^target = newState}
}
ccfs "Creates a connected final state "{
randomState = select one Vertex where {self not typed FinalState}
randomState = select one State where {self not typed FinalState}
fs = create FinalState with {name = random-string(1, 4), ^container = randomState->^container}
create Transition with {^source = randomState, ^target = fs}
}
ctr "Creates a transition with random source and target states"{
randomState1 = select one Vertex where {self not typed FinalState}
randomState2 = select one Vertex where {self not typed Pseudostate}
randomState1 = select one State where {self not typed FinalState and self not typed Pseudostate}
randomState2 = select one State where {self not typed FinalState and self not typed Pseudostate}
create Transition with {name = random-string(1, 4), ^source = randomState1, ^target = randomState2}
}
ctr2 "Creates a transition with source but without target state"{
randomState = select one Vertex where {self not typed FinalState}
randomState = select one State where {self not typed FinalState}
create Transition with {name = random-string(1, 4), ^source = randomState}
}
rtr "Removes a transition"{
......@@ -34,30 +34,30 @@ with blocks {
}
}
rst "Removes a state and adjacent transitions"{
remove one Vertex
remove one State
remove all Transition where {^source = null}
remove all Transition where {^target = null}
}
cis "Changes the initial state to a different one"{
transition = select one Transition where {^source is typed Pseudostate}
initial1 = select transition->^source
initial1 = select one Pseudostate
initial2 = select one Pseudostate where {self <> initial1}
transition = select one Transition where {^source = initial1}
modify transition with {^source = initial2}
}
cfs "Changes the final state to a different one"{
transition = select one Transition where {^target is typed FinalState}
final1 = select transition->^target
final1 = select one FinalState
final2 = select one FinalState where {self <> final1}
transition = select one Transition where {^target = final1}
modify transition with {^target = final2}
}
cst "Changes the source state of a transition"{
transition = select one Transition
state = select one Vertex where {self not typed FinalState and self <> transition->^source}
state = select one State where {self <> transition->^source}
modify transition with {^source = state}
}
rts "Changes the target state of a transition"{
transition = select one Transition
state = select one Vertex where {self not typed Pseudostate and self <> transition->^target}
state = select one State where {self <> transition->^target}
modify transition with {^target = state}
}
sdt "Swaps the direction of a transition"{
......@@ -83,16 +83,16 @@ with blocks {
action = create Behavior with {name = random-string(1, 4)}
modify one Transition with {effect = action}
}
cat "Changes the action of a transition"{
transition = select one Transition where {effect <> null}
action = select one Behavior where {self <> transition->effect}
modify transition with {effect = action}
cat "Changes the action of a transition"{
action = select one Behavior
transition = select one Transition where {effect <> action}
modify transition with {effect = action}
}
cas "Creates an action and set it to a state"{
action = create Behavior with {name = random-string(1, 4)}
modify one State where {self not typed FinalState} with {entry = action}
modify one State where {self not typed FinalState and self not typed Pseudostate} with {entry = action}
}
rco "Removes a constraint"{
remove one Constraint
}
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment