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:
Authors and contributors
The Wodel research project was started by the miso research group in September 2013. In its initial stage, its main developer was Víctor López Rivero. Since March 2015, the project has been carried out by Pablo Gómez-Abajo, under the supervision of Esther Guerra and Juan de Lara, and, additionally, during his PhD. studies, of Mercedes G. Merayo.
At this point, we would like to thank the developers of the following frameworks, which we have used in order to develop Wodel:
- Xtext: Xtext tailors the development of programming languages and domain-specific languages. With Xtext you define your language using a powerful grammar language.
- Sirius: Sirius allows you to easily create your own graphical modeling workbench by leveraging the Eclipse Modeling technologies, including EMF and GMF.
- Epsilon: Epsilon is a family of Java-based scripting languages for automating common model-based software engineering tasks, such as code generation, model-to-model transformation and model validation, that work out of the box with EMF (including Xtext and Sirius), UML (including Cameo/MagicDraw), Simulink, XML and other types of models.
- OCL Tools: Eclipse OCL is an implementation of the Object Constraint Language (OCL) OMG standard for EMF-based models.
- Acceleo: Acceleo is a template-based technology including authoring tools to create custom code generators. It allows you to automatically produce any kind of source code from any data source available in EMF format.
- MoDisco: Eclipse MoDisco provides an extensible framework to elaborate on model-driven solutions supporting software reverse engineering and modernization use cases such as technical migration, software improvement, documentation generation, quality insurance, etc.
- ATL: ATL (ATL Transformation Language) is a model transformation language and toolkit. In the field of Model-Driven Engineering (MDE), ATL provides ways to produce a set of target models from a set of source models.
- AnATLyzer: AnATLyzer is a powerful static analyser for ATL. It is available as an Eclipse plug-in which extends the ATL IDE with features to enhance developer productivity.
- emfjson: The emf-json project is actually an umbrella of projects that aim to provide support for the JSON format, and associated technologies, to the Eclipse Modeling Framework. It is an alternative to the default XML serialization format (XMI) used by default by the Eclipse Modeling Framework.
Related Publications
- Gómez-Abajo, P., Pérez-Soler, S., Cañizares, P. C., Guerra, E., de Lara, J., 2024. Mutation testing for task-oriented chatbots. In ACM 28th International Conference on Evaluation and Assessment in Software Engineering (EASE). Salerno.
- Gómez-Abajo, P., Guerra, E., de Lara, J., 2023. Automated generation and correction of diagram-based exercises for Moodle. In Computer Applications in Engineering Education (Wiley).
- Gómez-Abajo, P., Guerra, E., de Lara, J., 2023. Wodel-Edu: A tool for the generation and evaluation of diagram-based exercises. In Science of Computer Programming (Elsevier).
- Khorram, F., Bousse, E., Mottu, J. M., Sunyé, G., Gómez-Abajo, P., C. Cañizares, P., Guerra, E., de Lara, J., 2022. Automatic test amplification for executable models. In ACM/IEEE 25th International Conference on Model Driven Engineering Languages and Systems (MoDELS), Montreal.
- Gómez-Abajo, P., Rico-Fernández, A., Guerra, E., de Lara, J., 2021. 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, Virtual. Best tool demo award.
- Hierons, R. M., Gazda, M., Gómez-Abajo, P., Lefticaru, R., Merayo, M. G., 2021. Mutation Testing for RoboChart. In Software Engineering for Robotics (Springer). pp.:3:1-16.
- Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M. G., 2021. Wodel-Test: A model-based framework for language-independent mutation testing. In Software and Systems Modeling (Springer), Vol 20 (June). pp.:767–793.
- Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M. G., 2020. Systematic engineering of mutation operators. In Journal of Object Technology, Vol 19 (October). pp.:3:1-16.
- Gómez-Abajo, P., 2020. A domain-specific language for model mutation. Thesis document. Doctor of Philosophy (PhD) in Computer Science and Engineering, Universidad Autónoma de Madrid. Excellent cum laude.
- Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M. G., 2020. 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.
- Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M. G., 2019. Mutation testing for DSLs (tool demo). In ACM SIGPLAN International Workshop on Domain-Specific Modeling (DSM 2019), Athens.
- Gómez-Abajo, P., Guerra, E., de Lara, J., Merayo, M. G., 2018. A tool for domain-independent model mutation. In Science of Computer Programming (Elsevier), Vol 163 (October). pp.:85-92.
- Gómez-Abajo, P., Guerra, E., de Lara, J., 2017. A domain-specific language for model mutation and its application to the automated generation of exercises. In Computer Languages, Systems and Structures (Elsevier), Vol 49 (September). pp.:152-173.
- Gómez-Abajo, P. , 2016. A DSL for model mutation and its applications to different domains. In Doctoral Symposium at the International Conference of Model-Driven Engineering Languages and Systems 2016 (MoDELS), Saint-Malo.
- Gómez-Abajo, P. , 2016. A framework for the automated generation of exercises via model mutation. Final master's thesis. Master's Program (MSc) in ICT Research and Innovation, Universidad Autónoma de Madrid. Special mention.
- Gómez-Abajo, P., Guerra, E., de Lara, J., 2016. Wodel: a domain-specific language for model mutation. In ACM Symposium on Applied Computing 2016 (SAC), pp.:1968-1973, Pisa.
Acknowledgements
This work has been funded by:
- PID2021-122270OB-I00, project "FINESSE". The Spanish Ministry of Science. 2022-2025.
- TED2021-129381B-C21, project "SATORI-UAM". The Spanish State Research Agency. 2022-2024.
- Marie Skłodowska Curie grant agreement n° 813884, project "Lowcomote". European Union. 2019-2023.
- P2018/TCS-4314, project "FORTE". R&D program of the Madrid Region. 2019-2023.
- RTI2018-095255-B-I00, project "MASSIVE". The Spanish Ministry of Science. 2019-2022.
- TIN2014-52129-R, project "Flexor". The Spanish Ministry of Economy. 2015-2018.
- S2013/ICE-3006, project "SICOMORo". R&D program of the Madrid Region. 2014-2018.
- TIN2011-24139, project "Go-Lite". The Spanish Ministry of Economy. 2012-2015.