Commit 01b4e71b authored by Faezeh KHORRAM's avatar Faezeh KHORRAM 💬
Browse files

update wodel

parent 6724f390
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>xFSMMutation</name>
<name>org.imt.tdl.mutation.wodel</name>
<comment></comment>
<projects>
</projects>
......
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: xFSMMutation
Bundle-SymbolicName: xFSMMutation; singleton:=true
Bundle-SymbolicName: org.imt.tdl.mutation.wodel;singleton:=true
Bundle-Version: 1.0.0
Require-Bundle: org.eclipse.emf.ecore,
wodel.models;bundle-version="1.0.0",
......
data/model
data/out
xFSMMutation.mutator
Wodel-Test: Generation of a model-based software testing framework
\ No newline at end of file
<?xml version="1.0" encoding="ASCII"?>
<fsm:StateMachine xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:fsm="http://www.gemoc.org/ale/fsm" xmi:id="_27blwIHBEeuSqu2YMpMNhQ" name="BitShifting" initialState="_7mFXAIHBEeuSqu2YMpMNhQ">
<ownedStates xmi:id="_7mFXAIHBEeuSqu2YMpMNhQ" name="S0" outgoingTransitions="_AyJMMIHCEeuSqu2YMpMNhQ _GY2WAIHCEeuSqu2YMpMNhQ"/>
<ownedStates xmi:id="_8a8icIHBEeuSqu2YMpMNhQ" name="S1" outgoingTransitions="_K5AHcIHCEeuSqu2YMpMNhQ _N6xPUIHCEeuSqu2YMpMNhQ" incomingTransitions="_AyJMMIHCEeuSqu2YMpMNhQ _K5AHcIHCEeuSqu2YMpMNhQ _Qq2KQIHCEeuSqu2YMpMNhQ"/>
<ownedStates xmi:id="_9NojoIHBEeuSqu2YMpMNhQ" name="S2" outgoingTransitions="_IGh_0IHCEeuSqu2YMpMNhQ _Qq2KQIHCEeuSqu2YMpMNhQ" incomingTransitions="_GY2WAIHCEeuSqu2YMpMNhQ _IGh_0IHCEeuSqu2YMpMNhQ _N6xPUIHCEeuSqu2YMpMNhQ"/>
<ownedTransitions xmi:id="_AyJMMIHCEeuSqu2YMpMNhQ" name="S0-S1" source="_7mFXAIHBEeuSqu2YMpMNhQ" target="_8a8icIHBEeuSqu2YMpMNhQ" input="1" output="0"/>
<ownedTransitions xmi:id="_GY2WAIHCEeuSqu2YMpMNhQ" name="S0-S2" source="_7mFXAIHBEeuSqu2YMpMNhQ" target="_9NojoIHBEeuSqu2YMpMNhQ" input="0" output="0"/>
<ownedTransitions xmi:id="_IGh_0IHCEeuSqu2YMpMNhQ" name="S2-S2" source="_9NojoIHBEeuSqu2YMpMNhQ" target="_9NojoIHBEeuSqu2YMpMNhQ" input="0" output="0"/>
<ownedTransitions xmi:id="_K5AHcIHCEeuSqu2YMpMNhQ" name="S1-S1" source="_8a8icIHBEeuSqu2YMpMNhQ" target="_8a8icIHBEeuSqu2YMpMNhQ" input="1" output="1"/>
<ownedTransitions xmi:id="_N6xPUIHCEeuSqu2YMpMNhQ" name="S1-S2" source="_8a8icIHBEeuSqu2YMpMNhQ" target="_9NojoIHBEeuSqu2YMpMNhQ" input="0" output="1"/>
<ownedTransitions xmi:id="_Qq2KQIHCEeuSqu2YMpMNhQ" name="S2-S1" source="_9NojoIHBEeuSqu2YMpMNhQ" target="_8a8icIHBEeuSqu2YMpMNhQ" input="1" output="0"/>
</fsm:StateMachine>
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="fsm" nsURI="http://www.gemoc.org/ale/fsm" nsPrefix="fsm">
<eAnnotations source="http://www.eclipse.org/OCL/Import">
<details key="ecore" value="http://www.eclipse.org/emf/2002/Ecore"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="StateMachine" eSuperTypes="#//NamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedStates" upperBound="-1"
eType="#//State" containment="true" eOpposite="#//State/owningFSM"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="initialState" lowerBound="1"
eType="#//State"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="ownedTransitions" upperBound="-1"
eType="#//Transition" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="currentState" eType="#//State">
<eAnnotations source="dynamic"/>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="unprocessedString" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="dynamic"/>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="consumedString" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="dynamic"/>
</eStructuralFeatures>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="producedString" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
<eAnnotations source="dynamic"/>
</eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="State" eSuperTypes="#//NamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="owningFSM" lowerBound="1"
eType="#//StateMachine" eOpposite="#//StateMachine/ownedStates"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="outgoingTransitions" upperBound="-1"
eType="#//Transition" eOpposite="#//Transition/source"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="incomingTransitions" upperBound="-1"
eType="#//Transition" eOpposite="#//Transition/target"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="Transition" eSuperTypes="#//NamedElement">
<eStructuralFeatures xsi:type="ecore:EReference" name="source" lowerBound="1"
eType="#//State" eOpposite="#//State/outgoingTransitions"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
eType="#//State" eOpposite="#//State/incomingTransitions"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="input" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="output" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NamedElement" abstract="true">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
</ecore:EPackage>
<?xml version="1.0" encoding="ASCII"?>
<mutatorenvironment:MutatorEnvironment xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mutatorenvironment="http://mutatorenvironment/1.0">
<definition xsi:type="mutatorenvironment:Program" metamodel="/xFSMMutation/data/model/fsm.ecore" output="data/out/" num="2">
<source path="data/model/"/>
</definition>
<blocks name="dt">
<commands xsi:type="mutatorenvironment:RemoveObjectMutator">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
</object>
</commands>
</blocks>
<blocks name="mis">
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="sm">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//StateMachine"/>
</object>
</commands>
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="cis">
<container xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.1/@commands.0">
<refType href="/xFSMMutation/data/model/fsm.ecore#//StateMachine/initialState"/>
</container>
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//State"/>
</object>
</commands>
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="nis">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//State"/>
<expression>
<first xsi:type="mutatorenvironment:ReferenceEvaluation" operator="different">
<value xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.1/@commands.1"/>
</first>
</expression>
</object>
</commands>
<commands xsi:type="mutatorenvironment:ModifyInformationMutator">
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.1/@commands.0"/>
<references xsi:type="mutatorenvironment:ReferenceInit">
<reference href="/xFSMMutation/data/model/fsm.ecore#//StateMachine/initialState"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.1/@commands.2"/>
</references>
</commands>
</blocks>
<blocks name="mtio">
<commands xsi:type="mutatorenvironment:ModifyInformationMutator">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
</object>
<attributes xsi:type="mutatorenvironment:AttributeSwap">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/input"/>
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/output"/>
</attributes>
</commands>
</blocks>
<blocks name="mti">
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="t">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
</object>
</commands>
<commands xsi:type="mutatorenvironment:ModifyInformationMutator">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
<expression>
<first xsi:type="mutatorenvironment:ReferenceEvaluation" operator="different">
<value xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.3/@commands.0"/>
</first>
<operator/>
<second xsi:type="mutatorenvironment:ReferenceEvaluation">
<name href="/xFSMMutation/data/model/fsm.ecore#//Transition/source"/>
<value xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.3/@commands.0">
<refType href="/xFSMMutation/data/model/fsm.ecore#//Transition/source"/>
</value>
</second>
</expression>
</object>
<attributes xsi:type="mutatorenvironment:AttributeSwap">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/input"/>
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/input"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.3/@commands.0"/>
</attributes>
</commands>
</blocks>
<blocks name="cnt">
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="s1">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//State"/>
</object>
</commands>
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="s2">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//State"/>
<expression>
<first xsi:type="mutatorenvironment:ReferenceEvaluation" operator="different">
<value xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.4/@commands.0"/>
</first>
</expression>
</object>
</commands>
<commands xsi:type="mutatorenvironment:CreateObjectMutator">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
<attributes xsi:type="mutatorenvironment:AttributeScalar">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//NamedElement/name"/>
<value xsi:type="mutatorenvironment:RandomStringType" min="1" max="4"/>
</attributes>
<attributes xsi:type="mutatorenvironment:AttributeScalar">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/input"/>
<value xsi:type="mutatorenvironment:RandomStringType" min="1" max="4"/>
</attributes>
<attributes xsi:type="mutatorenvironment:AttributeScalar">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/output"/>
<value xsi:type="mutatorenvironment:RandomStringType" min="1" max="4"/>
</attributes>
<references xsi:type="mutatorenvironment:ReferenceInit">
<reference href="/xFSMMutation/data/model/fsm.ecore#//Transition/source"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.4/@commands.0"/>
</references>
<references xsi:type="mutatorenvironment:ReferenceInit">
<reference href="/xFSMMutation/data/model/fsm.ecore#//Transition/target"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.4/@commands.1"/>
</references>
</commands>
</blocks>
<blocks name="cet">
<commands xsi:type="mutatorenvironment:SelectObjectMutator" name="t">
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
</object>
</commands>
<commands xsi:type="mutatorenvironment:CreateObjectMutator">
<type href="/xFSMMutation/data/model/fsm.ecore#//Transition"/>
<attributes xsi:type="mutatorenvironment:AttributeScalar">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//NamedElement/name"/>
<value xsi:type="mutatorenvironment:RandomStringType" min="1" max="4"/>
</attributes>
<attributes xsi:type="mutatorenvironment:AttributeSwap">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/input"/>
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/input"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.5/@commands.0"/>
</attributes>
<attributes xsi:type="mutatorenvironment:AttributeSwap">
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/output"/>
<attribute href="/xFSMMutation/data/model/fsm.ecore#//Transition/output"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.5/@commands.0"/>
</attributes>
<references xsi:type="mutatorenvironment:ReferenceInit">
<reference href="/xFSMMutation/data/model/fsm.ecore#//Transition/source"/>
<object xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.5/@commands.0">
<refType href="/xFSMMutation/data/model/fsm.ecore#//Transition/source"/>
</object>
</references>
<references xsi:type="mutatorenvironment:ReferenceInit">
<reference href="/xFSMMutation/data/model/fsm.ecore#//Transition/target"/>
<object xsi:type="mutatorenvironment:RandomTypeSelection">
<type href="/xFSMMutation/data/model/fsm.ecore#//State"/>
<expression>
<first xsi:type="mutatorenvironment:ReferenceEvaluation" operator="different">
<value xsi:type="mutatorenvironment:SpecificObjectSelection" objSel="//@blocks.5/@commands.0">
<refType href="/xFSMMutation/data/model/fsm.ecore#//Transition/target"/>
</value>
</first>
</expression>
</object>
</references>
</commands>
</blocks>
</mutatorenvironment:MutatorEnvironment>
<?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.4"?><plugin> <extension point="wodel.wodeltest.MutTest"> <wodeltest class="mutator.wodeltest.xFSMMutation.WodelTest"> </wodeltest> </extension></plugin>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?><?eclipse version="3.4"?><plugin> <extension point="wodel.wodeltest.MutTest"> <wodeltest class="org.imt.tdl.mutation.wodel.WodelTest"> </wodeltest> </extension></plugin>
\ No newline at end of file
package mutator.wodeltest.xFSMMutation;
package org.imt.tdl.mutation.wodel;
import java.io.File;
import java.io.IOException;
......@@ -37,7 +37,7 @@ public class WodelTest implements IWodelTest {
@Override
public String getProjectName() {
return "xFSMMutation";
return "org.imt.tdl.mutation.wodel";
}
@Override
......
generate 2 mutants
in "data/out/"
from "data/model/"
metamodel "/xFSMMutation/data/model/fsm.ecore"
with blocks {
dt {
remove one Transition
}
mis {
sm = select one StateMachine
cis = select one State in sm->initialState
nis = select one State where {self <> cis}
modify sm with {initialState = nis}
}
mtio {
modify one Transition with {swap(input, output)}
}
mti {
t = select one Transition
modify one Transition where {self <> t and ^source = t->^source} with {swap(input, t.input)}
}
cnt {
s1 = select one State
s2 = select one State where {self <> s1}
create Transition with {name = random-string(1, 4), ^source = s1, ^target = s2, input = random-string(1, 4), output = random-string(1, 4)}
}
cet {
t = select one Transition
create Transition with {name = random-string(1,4), ^source = t->^source, ^target = one State where {self <> t->^target},
swap(input, t.input), swap(output, t.output)}
}
}
\ 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