SlideShare una empresa de Scribd logo
1 de 12
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

"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
 

La actualidad más candente (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
 

Destacado

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
 

Destacado (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 a Wodel: A Domain-Specific Language for Model Mutation

Similar a 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
 

Más de 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
 

Más de 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...
 

Último

Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Sérgio Sacani
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Sérgio Sacani
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
PirithiRaju
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
Areesha Ahmad
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
Lokesh Kothari
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
AlMamun560346
 

Último (20)

Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 bAsymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
Asymmetry in the atmosphere of the ultra-hot Jupiter WASP-76 b
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls AgencyHire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
Hire 💕 9907093804 Hooghly Call Girls Service Call Girls Agency
 
Botany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdfBotany 4th semester series (krishna).pdf
Botany 4th semester series (krishna).pdf
 
GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)GBSN - Microbiology (Unit 2)
GBSN - Microbiology (Unit 2)
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICESAMASTIPUR CALL GIRL 7857803690  LOW PRICE  ESCORT SERVICE
SAMASTIPUR CALL GIRL 7857803690 LOW PRICE ESCORT SERVICE
 
Chemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdfChemistry 4th semester series (krishna).pdf
Chemistry 4th semester series (krishna).pdf
 
Forensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdfForensic Biology & Its biological significance.pdf
Forensic Biology & Its biological significance.pdf
 
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43bNightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
Nightside clouds and disequilibrium chemistry on the hot Jupiter WASP-43b
 
Pests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdfPests of mustard_Identification_Management_Dr.UPR.pdf
Pests of mustard_Identification_Management_Dr.UPR.pdf
 
Isotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on IoIsotopic evidence of long-lived volcanism on Io
Isotopic evidence of long-lived volcanism on Io
 
Bacterial Identification and Classifications
Bacterial Identification and ClassificationsBacterial Identification and Classifications
Bacterial Identification and Classifications
 
Botany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questionsBotany krishna series 2nd semester Only Mcq type questions
Botany krishna series 2nd semester Only Mcq type questions
 
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
GUIDELINES ON SIMILAR BIOLOGICS Regulatory Requirements for Marketing Authori...
 
Seismic Method Estimate velocity from seismic data.pptx
Seismic Method Estimate velocity from seismic  data.pptxSeismic Method Estimate velocity from seismic  data.pptx
Seismic Method Estimate velocity from seismic data.pptx
 
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
All-domain Anomaly Resolution Office U.S. Department of Defense (U) Case: “Eg...
 
GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)GBSN - Biochemistry (Unit 1)
GBSN - Biochemistry (Unit 1)
 
Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)Recombinant DNA technology (Immunological screening)
Recombinant DNA technology (Immunological screening)
 

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