SlideShare a Scribd company logo
1 of 12
Download to read offline
Wodel: A Domain-Specific
Language for Model Mutation
Universidad Autónoma de Madrid (Spain)
P. Gómez-Abajo , E. Guerra, J. de Lara
{Pablo.GomezA, Esther.Guerra, Juan.deLara}@uam.es
http://www.miso.es
modelling & software engineering
research group
SAC’2016, Pisa (Italy)
• A model mutation is a variation of a seed model by the application of
one or more mutation operators.
• Model mutation has many applications:
• Model transformation testing.
• Model-based software testing.
• Software product lines testing.
• Automated generation of exercises.
• Evolutionary algorithms.
• …
2
0
101
0
110
1
010
Seed model
Mutant models
Wodel
Seed model
...
if (a == true) then
...
...
if (a != true) then
...
Mutant model
What is a Model Mutation?
Motivation
• Existing frameworks for model mutation:
• are specific for a language (e.g., logic formula).
• or specific for a domain (e.g., testing).
• mutation operators are manually encoded.
• We propose the DSL Wodel for model mutation:
• high-level mutation primitives.
• independence from target language and domain.
• compiled into Java code.
• extensible through post-processors.
3
4
seed
models
Meta-
Model«conforms»
WODEL
program
domain-specific
artefacts/
applications
1
2
WODEL
engine
model
mutants
Post-
processing
4
«conforms»
3
Overview
Wodel: example
5
Automaton
name: String
State
Transition
*
name: String
isInitial: boolean
isFinal: boolean
src
tar symbol0..1
states* * transitions
inv1: self.states->one(s | s.isInitial)
inv2: self.states->exists(s | s.isFinal)
inv3: self.alphabet->forAll (a1, a2 |
a1.symbol = a2.symbol
implies a1 = a2)
alphabet
Symbol
symbol: String
generate 3 mutants in "out/" from "evenBinary.fa"
metamodel "http://fa.com"
with commands {
s0 = modify one State where {isFinal = true} with {reverse(isFinal)}
s1 = create State with {isFinal = true}
t0 = create Transition with {src = s0, tar = s1, symbol = one Symbol}
}
Wodel: mutation operators
6
// object/ref creation
create State
create reference tar in
one Transition
// objet/ref modification
modify one State
with {isFinal = true}
modify source src from
one Transition
modify target tar from
one Transition
// object/ref deletion
remove one State
remove reference tar in
one Transition
// composite mutation
[
s0 = create State
modify s0 with {name = 's0'}
]
Mutation
min: int=1
max: int=1
CreateObject
ObjectEmitter EClass
type
0..1
name: String[0..1]
ObjectSelection
Strategy
container 0..1
EReference
0..1refType
AttributeSet EAttribute
attributes
*
Attribute
Init
Attribute
Swap
{ordered}
Attribute
Copy
object 0..1
Modify
Information
object
0..1
attributes*attributes *
Attribute
Type
value
Composite
Mutation
*
ModifySource
Reference
…
ObjectSelection
Strategy
source
newSource
EReference
refType 0..1
7
Screenshot of the Wodel IDE
seed
models
DSL
meta-
model
postProc
WODEL
engine
editor (Xtext)
code gen (Xtend)
Java code
model
mutants
code completion, validator
WODEL
program
«conforms»
check
generate, compile, execute
Architecture of the environmentTool support
8
1....
2.// create transition
3.EClass transitionClass = (EClass)epackage.getEClassifier("Transition");
4.EObject transition = EcoreUtil.create(transitionClass);
5.
6.// search object automaton in model
7.EObject automaton = null;
8.for (TreeIterator<EObject> it = seed.getAllContents(); it.hasNext();) {
9. automaton = it.next();
10. if (automaton.eClass().getName().equals("Automaton")) {
11. // add transition to automaton
12. EStructuralFeature feature =
13. automaton.eClass().getEStructuralFeature("transitions");
14. ((List<EObject>)automaton.eGet(feature)).add(transition);
15. // set random state as source of the transition
16. feature = automaton.eClass().getEStructuralFeature("states");
17. List<EObject> states = (List<EObject>)automaton.eGet(feature);
18. EObject randomState = states.get(rand.nextInt(states.size()));
19. feature = transitionClass.getEStructuralFeature("src");
20. transition.eSet(feature, randomState);
21....
Java code generation
create Transition with {symbol = one Symbol}
Wodel-Edu: Model Mutation
for the Generation of Exercises
9
postProc
WODEL
engine
WODEL-
EDU
DSL eduTest
DSL
modelDraw
mutants
model
rendering
description
code gen
learning
environment
exercises
description
Architecture of the Wodel-Edu plug-in Generated application
• Wodel is a DSL for model mutation:
• high-level mutation primitives.
• domain-independent.
• support for composite mutations.
• non-repeated mutants, conformance checking.
• compiled into Java.
• extensible for different applications.
• Wodel-Edu: automated generation of exercises
via model mutation
10
Conclusions
• Extend Wodel with new mutation primitives and a
rule policy language
• Develop new plugins for Wodel (e.g., for model-
based testing, evolutionary computation…)
• Extend Wodel-Edu to support the generation of
more complex learning environments
11
Future Work
12
You can get the source code of this project on
GitHub:
http://gomezabajo.github.io/Wodel/
Short video demo:
https://youtu.be/GBfXH0Rf-fI
Thank you!!
Pablo.GomezA@uam.es

More Related Content

What's hot

"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,..."Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
Vladimir Ivanov
 
In search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingIn search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testing
Anna Khabibullina
 
Code Analysis and Refactoring with CDT
Code Analysis and Refactoring with CDTCode Analysis and Refactoring with CDT
Code Analysis and Refactoring with CDT
dschaefer
 

What's hot (20)

"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,..."Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
 
How to Profit from Static Analysis
How to Profit from Static AnalysisHow to Profit from Static Analysis
How to Profit from Static Analysis
 
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDTEclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
Eclipse Con 2015: Codan - a C/C++ Code Analysis Framework for CDT
 
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
TMPA-2015: The Application of Parameterized Hierarchy Templates for Automated...
 
MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system MUTANTS KILLER - PIT: state of the art of mutation testing system
MUTANTS KILLER - PIT: state of the art of mutation testing system
 
Model Driven Developing & Model Based Checking: Applying Together
Model Driven Developing & Model Based Checking: Applying TogetherModel Driven Developing & Model Based Checking: Applying Together
Model Driven Developing & Model Based Checking: Applying Together
 
Automatic Migration of Legacy Java Method Implementations to Interfaces
Automatic Migration of Legacy Java Method Implementations to InterfacesAutomatic Migration of Legacy Java Method Implementations to Interfaces
Automatic Migration of Legacy Java Method Implementations to Interfaces
 
Functional Java 8 - Introduction
Functional Java 8 - IntroductionFunctional Java 8 - Introduction
Functional Java 8 - Introduction
 
Mutation Testing
Mutation TestingMutation Testing
Mutation Testing
 
TMPA-2015: Towards a Usable Defect Prediction Tool: Crossbreeding Machine Lea...
TMPA-2015: Towards a Usable Defect Prediction Tool: Crossbreeding Machine Lea...TMPA-2015: Towards a Usable Defect Prediction Tool: Crossbreeding Machine Lea...
TMPA-2015: Towards a Usable Defect Prediction Tool: Crossbreeding Machine Lea...
 
In search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testingIn search of JavaScript code quality: unit testing
In search of JavaScript code quality: unit testing
 
Unit testing
Unit testingUnit testing
Unit testing
 
Mutation testing in Java
Mutation testing in JavaMutation testing in Java
Mutation testing in Java
 
MUTANTS KILLER (Revised) - PIT: state of the art of mutation testing system
MUTANTS KILLER (Revised) - PIT: state of the art of mutation testing system MUTANTS KILLER (Revised) - PIT: state of the art of mutation testing system
MUTANTS KILLER (Revised) - PIT: state of the art of mutation testing system
 
mtATL
mtATLmtATL
mtATL
 
Storage Class in C Progrmming
Storage Class in C Progrmming Storage Class in C Progrmming
Storage Class in C Progrmming
 
Stopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under TestStopping the Rot - Putting Legacy C++ Under Test
Stopping the Rot - Putting Legacy C++ Under Test
 
Tdd & unit test
Tdd & unit testTdd & unit test
Tdd & unit test
 
Applying TDD to Legacy Code
Applying TDD to Legacy CodeApplying TDD to Legacy Code
Applying TDD to Legacy Code
 
Code Analysis and Refactoring with CDT
Code Analysis and Refactoring with CDTCode Analysis and Refactoring with CDT
Code Analysis and Refactoring with CDT
 

Viewers also liked

Itinerari Les Santes - Aida, Sara, Sara y Sheila
Itinerari Les Santes - Aida, Sara, Sara y SheilaItinerari Les Santes - Aida, Sara, Sara y Sheila
Itinerari Les Santes - Aida, Sara, Sara y Sheila
smestref
 
Indiginox Company Presentation
Indiginox Company PresentationIndiginox Company Presentation
Indiginox Company Presentation
silentpenguin
 
Six and Co France institutional Presentation
Six and Co France institutional PresentationSix and Co France institutional Presentation
Six and Co France institutional Presentation
Salvatore Bruno
 
Negative communication effects in a lead contaminated mining area in southeas...
Negative communication effects in a lead contaminated mining area in southeas...Negative communication effects in a lead contaminated mining area in southeas...
Negative communication effects in a lead contaminated mining area in southeas...
dliverman
 

Viewers also liked (20)

Price Simulator
Price SimulatorPrice Simulator
Price Simulator
 
Price Simulator
Price SimulatorPrice Simulator
Price Simulator
 
HometownOhio
HometownOhioHometownOhio
HometownOhio
 
El Papa conduce
El Papa conduceEl Papa conduce
El Papa conduce
 
Itinerari Les Santes - Aida, Sara, Sara y Sheila
Itinerari Les Santes - Aida, Sara, Sara y SheilaItinerari Les Santes - Aida, Sara, Sara y Sheila
Itinerari Les Santes - Aida, Sara, Sara y Sheila
 
web sida 2
web sida 2web sida 2
web sida 2
 
La barriga de papá
La barriga de papáLa barriga de papá
La barriga de papá
 
Microsoft-word-2003-e-2007
Microsoft-word-2003-e-2007Microsoft-word-2003-e-2007
Microsoft-word-2003-e-2007
 
Communicating Environmental Geoscience- Liverman presentation, Vienna 2007
Communicating Environmental Geoscience- Liverman presentation, Vienna 2007Communicating Environmental Geoscience- Liverman presentation, Vienna 2007
Communicating Environmental Geoscience- Liverman presentation, Vienna 2007
 
211
211211
211
 
Sejarah Perkembangan Twitter
Sejarah Perkembangan Twitter  Sejarah Perkembangan Twitter
Sejarah Perkembangan Twitter
 
Jackie robinson
Jackie robinsonJackie robinson
Jackie robinson
 
Communicating Environmental Geoscience- Liverman presentation, Keyworth 2006
Communicating Environmental Geoscience- Liverman presentation, Keyworth 2006Communicating Environmental Geoscience- Liverman presentation, Keyworth 2006
Communicating Environmental Geoscience- Liverman presentation, Keyworth 2006
 
Seminario 8
Seminario 8Seminario 8
Seminario 8
 
23.05.12
23.05.1223.05.12
23.05.12
 
Doc1
Doc1Doc1
Doc1
 
Indiginox Company Presentation
Indiginox Company PresentationIndiginox Company Presentation
Indiginox Company Presentation
 
Six and Co France institutional Presentation
Six and Co France institutional PresentationSix and Co France institutional Presentation
Six and Co France institutional Presentation
 
Cradle of Humankind
Cradle of HumankindCradle of Humankind
Cradle of Humankind
 
Negative communication effects in a lead contaminated mining area in southeas...
Negative communication effects in a lead contaminated mining area in southeas...Negative communication effects in a lead contaminated mining area in southeas...
Negative communication effects in a lead contaminated mining area in southeas...
 

Similar to Wodel: A Domain-Specific Language for Model Mutation

Similar to Wodel: A Domain-Specific Language for Model Mutation (20)

Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...
Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...
Wodel: A DSL for Model Mutation; and Wodel-Edu: its Application to the Automa...
 
walkmod - JUG talk
walkmod - JUG talkwalkmod - JUG talk
walkmod - JUG talk
 
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
 
EGL Conference 2011 - EGL Open
EGL Conference 2011 - EGL OpenEGL Conference 2011 - EGL Open
EGL Conference 2011 - EGL Open
 
Search-Based Robustness Testing of Data Processing Systems
Search-Based Robustness Testing of Data Processing SystemsSearch-Based Robustness Testing of Data Processing Systems
Search-Based Robustness Testing of Data Processing Systems
 
Eclipse meets e4
Eclipse meets e4Eclipse meets e4
Eclipse meets e4
 
iOS (7) Workshop
iOS (7) WorkshopiOS (7) Workshop
iOS (7) Workshop
 
Machine Learning - Dataset Preparation
Machine Learning - Dataset PreparationMachine Learning - Dataset Preparation
Machine Learning - Dataset Preparation
 
Analyzing Changes in Software Systems From ChangeDistiller to FMDiff
Analyzing Changes in Software Systems From ChangeDistiller to FMDiffAnalyzing Changes in Software Systems From ChangeDistiller to FMDiff
Analyzing Changes in Software Systems From ChangeDistiller to FMDiff
 
Module Ninja .JS
Module Ninja .JSModule Ninja .JS
Module Ninja .JS
 
ITU - MDD - EMF
ITU - MDD - EMFITU - MDD - EMF
ITU - MDD - EMF
 
Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010Eclipse 40 - Eclipse Summit Europe 2010
Eclipse 40 - Eclipse Summit Europe 2010
 
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling FrameworkEclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
EclipseCon 2008: Fundamentals of the Eclipse Modeling Framework
 
The advantage of developing with TypeScript
The advantage of developing with TypeScript The advantage of developing with TypeScript
The advantage of developing with TypeScript
 
AngularConf2015
AngularConf2015AngularConf2015
AngularConf2015
 
Java core - Detailed Overview
Java  core - Detailed OverviewJava  core - Detailed Overview
Java core - Detailed Overview
 
Modern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.jsModern, Scalable, Ambitious apps with Ember.js
Modern, Scalable, Ambitious apps with Ember.js
 
Java
JavaJava
Java
 
TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!TypeScript . the JavaScript developer best friend!
TypeScript . the JavaScript developer best friend!
 
Developing a new Epsilon EMC driver
Developing a new Epsilon EMC driverDeveloping a new Epsilon EMC driver
Developing a new Epsilon EMC driver
 

More from Pablo Gómez Abajo

Automated engineering of domain-specific metamorphic testing environments
Automated engineering of domain-specific metamorphic testing environmentsAutomated engineering of domain-specific metamorphic testing environments
Automated engineering of domain-specific metamorphic testing environments
Pablo Gómez Abajo
 
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Pablo Gómez Abajo
 

More from Pablo Gómez Abajo (7)

Wodel-Edu: A tool for the generation and evaluation of diagram-based exercises
Wodel-Edu: A tool for the generation and evaluation of diagram-based exercisesWodel-Edu: A tool for the generation and evaluation of diagram-based exercises
Wodel-Edu: A tool for the generation and evaluation of diagram-based exercises
 
Automated engineering of domain-specific metamorphic testing environments
Automated engineering of domain-specific metamorphic testing environmentsAutomated engineering of domain-specific metamorphic testing environments
Automated engineering of domain-specific metamorphic testing environments
 
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
Wodel-Test: A Model-Based Framework for Language-Independent Mutation Testing...
 
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...
Wodel-Edu: An MDE Solution for the Generation and Evaluation of Diagram-based...
 
Programación de macros en Microsoft Excel VBA
Programación de macros en Microsoft Excel VBAProgramación de macros en Microsoft Excel VBA
Programación de macros en Microsoft Excel VBA
 
PhD defense presentation
PhD defense presentationPhD defense presentation
PhD defense presentation
 
Un framework para la generación automática de ejercicios mediante técnicas de...
Un framework para la generación automática de ejercicios mediante técnicas de...Un framework para la generación automática de ejercicios mediante técnicas de...
Un framework para la generación automática de ejercicios mediante técnicas de...
 

Recently uploaded

Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.
Silpa
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
Silpa
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
1301aanya
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
NazaninKarimi6
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.Reboulia: features, anatomy, morphology etc.
Reboulia: features, anatomy, morphology etc.
 
Clean In Place(CIP).pptx .
Clean In Place(CIP).pptx                 .Clean In Place(CIP).pptx                 .
Clean In Place(CIP).pptx .
 
Human genetics..........................pptx
Human genetics..........................pptxHuman genetics..........................pptx
Human genetics..........................pptx
 
Factory Acceptance Test( FAT).pptx .
Factory Acceptance Test( FAT).pptx       .Factory Acceptance Test( FAT).pptx       .
Factory Acceptance Test( FAT).pptx .
 
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.Molecular markers- RFLP, RAPD, AFLP, SNP etc.
Molecular markers- RFLP, RAPD, AFLP, SNP etc.
 
biology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGYbiology HL practice questions IB BIOLOGY
biology HL practice questions IB BIOLOGY
 
Cyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptxCyanide resistant respiration pathway.pptx
Cyanide resistant respiration pathway.pptx
 
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICEPATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
PATNA CALL GIRLS 8617370543 LOW PRICE ESCORT SERVICE
 
Grade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its FunctionsGrade 7 - Lesson 1 - Microscope and Its Functions
Grade 7 - Lesson 1 - Microscope and Its Functions
 
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptxPSYCHOSOCIAL NEEDS. in nursing II sem pptx
PSYCHOSOCIAL NEEDS. in nursing II sem pptx
 
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and SpectrometryFAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
FAIRSpectra - Enabling the FAIRification of Spectroscopy and Spectrometry
 
development of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virusdevelopment of diagnostic enzyme assay to detect leuser virus
development of diagnostic enzyme assay to detect leuser virus
 
Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.Proteomics: types, protein profiling steps etc.
Proteomics: types, protein profiling steps etc.
 
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body GBSN - Microbiology (Unit 3)Defense Mechanism of the body
GBSN - Microbiology (Unit 3)Defense Mechanism of the body
 
Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.Atp synthase , Atp synthase complex 1 to 4.
Atp synthase , Atp synthase complex 1 to 4.
 
Dr. E. Muralinath_ Blood indices_clinical aspects
Dr. E. Muralinath_ Blood indices_clinical  aspectsDr. E. Muralinath_ Blood indices_clinical  aspects
Dr. E. Muralinath_ Blood indices_clinical aspects
 
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRLGwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
Gwalior ❤CALL GIRL 84099*07087 ❤CALL GIRLS IN Gwalior ESCORT SERVICE❤CALL GIRL
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptxClimate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
Climate Change Impacts on Terrestrial and Aquatic Ecosystems.pptx
 
Site Acceptance Test .
Site Acceptance Test                    .Site Acceptance Test                    .
Site Acceptance Test .
 

Wodel: A Domain-Specific Language for Model Mutation

  • 1. Wodel: A Domain-Specific Language for Model Mutation Universidad Autónoma de Madrid (Spain) P. Gómez-Abajo , E. Guerra, J. de Lara {Pablo.GomezA, Esther.Guerra, Juan.deLara}@uam.es http://www.miso.es modelling & software engineering research group SAC’2016, Pisa (Italy)
  • 2. • A model mutation is a variation of a seed model by the application of one or more mutation operators. • Model mutation has many applications: • Model transformation testing. • Model-based software testing. • Software product lines testing. • Automated generation of exercises. • Evolutionary algorithms. • … 2 0 101 0 110 1 010 Seed model Mutant models Wodel Seed model ... if (a == true) then ... ... if (a != true) then ... Mutant model What is a Model Mutation?
  • 3. Motivation • Existing frameworks for model mutation: • are specific for a language (e.g., logic formula). • or specific for a domain (e.g., testing). • mutation operators are manually encoded. • We propose the DSL Wodel for model mutation: • high-level mutation primitives. • independence from target language and domain. • compiled into Java code. • extensible through post-processors. 3
  • 5. Wodel: example 5 Automaton name: String State Transition * name: String isInitial: boolean isFinal: boolean src tar symbol0..1 states* * transitions inv1: self.states->one(s | s.isInitial) inv2: self.states->exists(s | s.isFinal) inv3: self.alphabet->forAll (a1, a2 | a1.symbol = a2.symbol implies a1 = a2) alphabet Symbol symbol: String generate 3 mutants in "out/" from "evenBinary.fa" metamodel "http://fa.com" with commands { s0 = modify one State where {isFinal = true} with {reverse(isFinal)} s1 = create State with {isFinal = true} t0 = create Transition with {src = s0, tar = s1, symbol = one Symbol} }
  • 6. Wodel: mutation operators 6 // object/ref creation create State create reference tar in one Transition // objet/ref modification modify one State with {isFinal = true} modify source src from one Transition modify target tar from one Transition // object/ref deletion remove one State remove reference tar in one Transition // composite mutation [ s0 = create State modify s0 with {name = 's0'} ] Mutation min: int=1 max: int=1 CreateObject ObjectEmitter EClass type 0..1 name: String[0..1] ObjectSelection Strategy container 0..1 EReference 0..1refType AttributeSet EAttribute attributes * Attribute Init Attribute Swap {ordered} Attribute Copy object 0..1 Modify Information object 0..1 attributes*attributes * Attribute Type value Composite Mutation * ModifySource Reference … ObjectSelection Strategy source newSource EReference refType 0..1
  • 7. 7 Screenshot of the Wodel IDE seed models DSL meta- model postProc WODEL engine editor (Xtext) code gen (Xtend) Java code model mutants code completion, validator WODEL program «conforms» check generate, compile, execute Architecture of the environmentTool support
  • 8. 8 1.... 2.// create transition 3.EClass transitionClass = (EClass)epackage.getEClassifier("Transition"); 4.EObject transition = EcoreUtil.create(transitionClass); 5. 6.// search object automaton in model 7.EObject automaton = null; 8.for (TreeIterator<EObject> it = seed.getAllContents(); it.hasNext();) { 9. automaton = it.next(); 10. if (automaton.eClass().getName().equals("Automaton")) { 11. // add transition to automaton 12. EStructuralFeature feature = 13. automaton.eClass().getEStructuralFeature("transitions"); 14. ((List<EObject>)automaton.eGet(feature)).add(transition); 15. // set random state as source of the transition 16. feature = automaton.eClass().getEStructuralFeature("states"); 17. List<EObject> states = (List<EObject>)automaton.eGet(feature); 18. EObject randomState = states.get(rand.nextInt(states.size())); 19. feature = transitionClass.getEStructuralFeature("src"); 20. transition.eSet(feature, randomState); 21.... Java code generation create Transition with {symbol = one Symbol}
  • 9. Wodel-Edu: Model Mutation for the Generation of Exercises 9 postProc WODEL engine WODEL- EDU DSL eduTest DSL modelDraw mutants model rendering description code gen learning environment exercises description Architecture of the Wodel-Edu plug-in Generated application
  • 10. • Wodel is a DSL for model mutation: • high-level mutation primitives. • domain-independent. • support for composite mutations. • non-repeated mutants, conformance checking. • compiled into Java. • extensible for different applications. • Wodel-Edu: automated generation of exercises via model mutation 10 Conclusions
  • 11. • Extend Wodel with new mutation primitives and a rule policy language • Develop new plugins for Wodel (e.g., for model- based testing, evolutionary computation…) • Extend Wodel-Edu to support the generation of more complex learning environments 11 Future Work
  • 12. 12 You can get the source code of this project on GitHub: http://gomezabajo.github.io/Wodel/ Short video demo: https://youtu.be/GBfXH0Rf-fI Thank you!! Pablo.GomezA@uam.es