Wodel: a domain-specific language for model mutation
Wodel is a Domain-Specific Language for the specification and generation of model mutants.
Wodel is domain-independent, as it can be used to generate mutants of models conforming to arbitrary meta-models.
Wodel provides nine mutation primitives for object creation and deletion, reference redirection, attribute modification, cloning, and retyping (change the type of an object to one of its siblings types), among others.
The engine verifies that each generated mutant is a valid model (i.e., it conforms to the domain meta-model and satisfies its integrity constraints).
Enhanced mutation features
Wodel includes a mechanism to identify and avoid the generation of duplicated mutants. By default, mutant equivalence is syntactic, but users can provide their own equivalence criteria (e.g., behavioural) through extension points.
The execution of a Wodel program generates a registry of the applied mutations and the objects affected by them.
The IDE provides several metrics that can help in assessing whether a set of mutations is complete or has been correctly implemented.
Also to facilitate the testing of Wodel programs, the IDE permits the automatic synthesis of seed models.
It's development environment is extensible, permitting the incorporation of post-processors for different applications.
To get started, you can access a Wodel tutorial here.
Current Wodel extensions
This repository contains two Wodel extensions: The first consisting in the automated generation of exercises for particular domains (automata, class diagrams, electronic circuits, etc.). We call this extension Wodel-Edu.
This is a sample of a Wodel program that mutates a transition target of a Finite Automaton model:
generate 2 mutants
in "data/out/"
from "data/model/"
metamodel "http://dfaAutomaton/1.0"
with commands {
modify target tar from one Transition to other State
}
The second extensions consists in the automated generation of mutation testing tools for modelling and programming languages, that we
call Wodel-Test.
Wodel usage
You can specify when mutants are going to be generated inside a Wodel program with the blocks directive.
Also, you can mutate mutant models generated in a previous block, instead of mutating the seed models.
Furthermore, you can specify OCL constraints that will apply to generated mutants:
generate mutants
in "data/out/"
from "data/model/exercise1.model"
metamodel "http://dfaAutomaton/1.0"
with blocks {
first {
modify target tar from one Transition to other State [3]
} [2]
second from first repeat=no {
modify one State with { name = random-string(4,6)}
} [3]
}
constraints {
context State connected:: "isInitial or Set{self}->
closure(s | Transition.allInstances()->
select(t | t.tar=s)->collect(src))->exists(s | s.isInitial)"
}
Video demos
This is a short video demo of the Wodel framework:
Video demo of the Wodel tool mutation operator footprints:
Video demo of the Wodel tool seed model synthesis:
Related Publications
- Pablo Gómez-Abajo, Andrés Rico-Fernández, Esther Guerra, Juan de Lara: Wodel-Edu: An MDE solution for the generation and evaluation of diagram-based exercises. In ACM/IEEE 24th International Conference on Model Driven Engineering Languages and Systems (MoDELS), Tokyo, 2021. Virtual. Best tool demo award.
- Robert M. Hierons, Maciej Gazda, Pablo Gómez-Abajo, Raluca Lefticaru, Mercedes G. Merayo: Mutation Testing for RoboChart. Software Engineering for Robotics (Springer). pp.:3:1-16. 2021.
- Pablo Gómez-Abajo, Esther Guerra, Juan de Lara: Wodel-Test: A model-based framework for language-independent mutation testing. Software and Systems Modeling (Springer), Vol 20 (June). pp.:767–793. 2021.
- Pablo Gómez-Abajo, Esther Guerra, Juan de Lara: Systematic engineering of mutation operators. Journal of Object Technology, Vol 19 (October). pp.:3:1-16. 2020.
- Pablo Gómez-Abajo: A domain-specific language for model mutation. Thesis document. Doctor of Philosophy (PhD) in Computer Science and Engineering, 2020. Universidad Autónoma de Madrid. Excellent cum laude.
- Pablo Gómez-Abajo, Esther Guerra, Juan de Lara, Mercedes G. Merayo: Seed model synthesis for testing model-based mutation operators. In International Conference on Advanced Information Systems Engineering (CAiSE Forum), Grenoble. Virtual. Lecture Notes in Business Information Processing (Springer), Vol 386 (August). pp.:64-76. 2020.
- Pablo Gómez-Abajo, Esther Guerra, Juan de Lara, Mercedes G. Merayo: A tool for domain-independent model mutation. Science of Computer Programming (Elsevier), Vol 163 (October). pp.:85-92. 2018.
- Pablo Gómez-Abajo, Esther Guerra, Juan de Lara: A domain-specific language for model mutation and its application to the automated generation of exercises, Computer Languages, Systems and Structures (Elsevier), Vol 49 (September). pp.:152-173. 2017.
- Pablo Gómez-Abajo: A DSL for model mutation and its applications to different domains. Doctoral Symposium at the International Conference of Model-Driven Engineering Languages and Systems 2016 (MoDELS), Saint-Malo. 2016.
- Pablo Gómez-Abajo: A framework for the automated generation of exercises via model mutation. Final master's thesis. Master's Program (MSc) in ICT Research and Innovation, 2016. Universidad Autónoma de Madrid. Special mention.
- Pablo Gómez-Abajo, Esther Guerra, Juan de Lara: Wodel: a domain-specific language for model mutation. ACM Symposium on Applied Computing 2016 (SAC), pp.:1968-1973, Pisa. 2016.
Acknowledgements
This work has been funded by the Spanish Ministry of Science (RTI2018-095255-B-I00, project "MASSIVE") and the R&D programme of Madrid (P2018/TCS-4314, project "FORTE").