Wodel4diac: model mutation for IEC 61499 industrial automation
Wodel4diac extends Wodel — a domain-independent, language-independent tool for model mutation — so that it can mutate IEC 61499 models authored in Eclipse 4diac.
This makes it possible to systematically generate variants of function-block applications for purposes such as mutation testing, fault seeding, robustness analysis, and the automated generation of learning exercises for industrial-automation engineering.
Background
Wodel is a tool for mutating models conforming to arbitrary meta-models. A Wodel program specifies, in a high-level and metamodel-agnostic syntax, a set of mutation operators (create, remove, modify, retype, clone, select, …) to apply to a seed model. Wodel generates syntactically and (optionally) semantically valid mutants, computes metrics, and post-processes the results. It is built on the Eclipse Modeling Framework (EMF) and Xtext.
Eclipse 4diac is an open-source framework for distributed industrial automation and control based on the IEC 61499 standard. It comprises the 4diac IDE engineering environment and the FORTE runtime, and models control logic as networks of function blocks.
Wodel4diac bridges the two: it lets you express mutation operators over 4diac / IEC 61499 models and obtain a population of mutated function-block applications.
What Wodel4diac adds
On top of the standard Wodel ecosystem, Wodel4diac contributes:
wodel.fordiac— integration enabling Wodel to load, understand, and mutate 4diac / IEC 61499 models.wodel.postprocessor.fordiac— a post-processor that serialises generated mutants back into the 4diac project format so they can be opened in the 4diac IDE.wodel.ai.assistant— an experimental generative-AI assistant (see below).
Requirements
- Java 21
- Eclipse 4diac IDE 3.2.0 — the target platform whose models are mutated
- Xtext 2.37 and EMF — installed automatically as plugin dependencies via the update sites
- Optional, for semantic validation / model finding: a constraint backend used by eFinder (e.g. USE)
Installation
Option A — Install into Eclipse via the update site (recommended)
- In Eclipse (with the 4diac IDE features installed), open Help → Install New Software…
- Add the update site built from this repository (
wodel.updatesite):https://gomezabajo.github.io/Wodel4diac/update-site/ - Select the Wodel4diac features and complete the wizard.
- Restart Eclipse.
Option B — Build from source
git clone https://github.com/gomezabajo/Wodel4diac.git
cd Wodel4diac
Then import the plugin projects into an Eclipse 4diac 3.2.0 workspace (File → Import → Existing Projects into Workspace) and launch a runtime Eclipse instance with 4diac 3.2.0 installed.
Quick start
Real, runnable Wodel programs are included under wodeltest.extension.examples/mutator (ATL, Java, finite automata, and more). The grammar is defined in wodel.dsls.wodel.
- Create (or open) a Wodel project and add a
.mutatorprogram. - Point it at a seed 4diac model and the corresponding meta-model.
- Run it to generate mutants; the 4diac post-processor writes them out as 4diac projects.
The mutation language is standard Wodel. As a taste of the real syntax, here is an abridged excerpt from testFA1.mutator, which ships with the repository (it mutates finite automata; the same operators apply to 4diac / IEC 61499 models through the wodel.fordiac integration):
generate 10 mutants
in "data/out/"
from "data/model/"
metamodel "/[@**@]/data/model/DFAAutomaton.ecore"
with blocks {
dtr "Delete transition" {
remove one Transition
}
mfs "Set final state to non-final" {
modify one State where {isFinal = true} with {reverse(isFinal)}
}
rts "Set transition's target to a new final state" {
s = create State with {name = 'f', isFinal = true}
modify target tar from one Transition to s
}
}
Generated mutants appear in the output folder and can be opened directly in the 4diac IDE.
Project structure
Wodel4diac is a multi-bundle Eclipse project. The most relevant areas:
| Area | Modules |
|---|---|
| 4diac integration | wodel.fordiac, wodel.postprocessor.fordiac |
| AI assistant | wodel.ai.assistant |
| Wodel DSL & core | wodel.core, wodel.dsls.wodel*, wodel.run, wodel.registry*, wodel.extension, wodel.utils |
| Post-processing & output | wodel.postprocessor*, wodel.json |
| Validation & comparison | wodel.syntactic.*, wodel.semantic.*, wodel.emf.validation, wodel.emf.comparison |
| Metrics | wodel.metrics.*, wodel.footprints |
| Synthesis | wodel.synthesizer, wodel.seed.synthesis |
| ASPLE DSL | wodel.asple, wodel.dsls.asple* |
| Education layer | wodel.wodeledu, wodeledu.* (modeldraw, modeltext, mutatext, edutest) |
| Mutation testing | wodel.wodeltest |
| Bundled tooling | anatlyzer.* (ATL analysis), efinder.* (model finding), tinytools.* |
| Update sites | wodel.updatesite, efinder.updatesite |
AI assistant (experimental)
The wodel.ai.assistant module integrates an experimental generative-AI assistant to help users author and refine Wodel mutation programs. It is under active development and not yet considered stable.
Citing
If you use Wodel4diac or Wodel in academic work, please cite the relevant Wodel publication and, where applicable, the Wodel4diac work (WIP):
@inproceedings{GomezAbajo2016Wodel,
author = {G\'omez-Abajo, Pablo and Guerra, Esther and de Lara, Juan},
title = {Wodel: A Domain-Specific Language for Model Mutation},
booktitle = {Proceedings of the 31st Annual ACM Symposium on Applied Computing (SAC)},
pages = {1968--1973},
year = {2016},
doi = {10.1145/2851613.2851751}
}
Acknowledgements and third-party components
Wodel4diac builds upon and redistributes components from several projects, including:
Wodel and the Wodel ecosystem (Wodel-EDU, Wodel-Test).
anATLyzer — static analysis of ATL transformations (anatlyzer.*).
eFinder — model finding / constraint solving (efinder.*).
tinytools — supporting EMF utilities (tinytools.*).
We also acknowledge the developers of the frameworks used to implement Wodel:
Xtext supports the development of programming languages and domain-specific languages through a grammar-based approach.
Eclipse 4diac provides the IEC 61499 engineering environment (4diac IDE) and runtime (FORTE) targeted by this extension.
Developed in the context of work at the Universidad Autónoma de Madrid and the Universidad de Murcia.
License
Distributed under the Eclipse Public License 2.0 (EPL-2.0). See LICENSE for details. Redistributed third-party components remain under their respective licenses.
