Modell-zu-Metamodell-Transformationen zur Entwicklung von komponentenbasierten Systemen

Christian Buckl, Gerd Kainz, Stephan Sommer, Alois C. Knoll

Introduction

Developing distributed embedded systems, such as sensor and actuator networks, requires managing significant hardware heterogeneity. Developers must navigate a landscape of diverse microcontrollers, communication protocols, and sensors while adhering to strict resource constraints. While standard Model-Driven Development (MDD) tools automate the generation of middleware (glue code), they often encounter a "metamodel bottleneck."

This bottleneck occurs because adding new hardware types typically requires manual modifications to the tool's core metamodel. Such changes demand deep internal knowledge of the tool and lead to bloated, inflexible metamodels. This paper proposes a multi-phase MDD approach using Model-to-Metamodel (M2MM) transformations to streamline the creation of component-based embedded systems by allowing objects in one phase to become classes in the next.

The M2MM Approach

Unlike standard Model-to-Model (M2M) transformations that operate within the same level of abstraction, M2MM transformations "promote" elements across the modeling hierarchy. This process is structured into three distinct phases that mirror the real-world supply chain of embedded systems:

  1. Phase 1 (Run-time Experts): Experts define generic Capability Types (e.g., "Communication") and Capabilities (e.g., "Ethernet"). This establishes the base vocabulary for the entire system.
  2. Phase 2 (Component Producers): An M2MM transformation promotes the models from Phase 1 into classes within a new metamodel. Hardware producers use this metamodel to describe Concrete Components (e.g., a specific Intel Ethernet Card), fixing specific values like MAC addresses or restricting supported speed ranges.
  3. Phase 3 (Application Developers): A second M2MM transformation turns these specific components into classes for the final application metamodel. Application developers then assemble their systems by selecting these pre-configured building blocks.
The four-layer modeling architecture (M0-M3) used to define the relationships between instances, models, and metamodels.

By utilizing the Eclipse Modeling Framework (EMF) and its reflective API, the system can dynamically generate these metamodels, ensuring that the tool evolves alongside the available hardware without manual "hacking" of the core code.

Key Insights: Objects as Classes

The core innovation of this approach is the formalization of "promotion." In traditional systems, a hardware component is merely a data entry (an object). In this M2MM framework, that component acts as a template or "class" for the application developer. This creates a strongly typed system where the metamodel itself reflects available hardware, preventing configuration errors—such as connecting incompatible sensors and controllers—at the modeling level rather than at runtime.

Evaluation: Model Railway Control

The approach was evaluated using the eSOA project, a framework for distributed sensor/actuator systems. The primary test case involved a Model Railway Control System operating on a heterogeneous network including Linux-based PCs, wireless sensor nodes (TinyOS), and Atmel 8-bit microcontrollers.

The Model Railway Control System used as a real-world test case for the M2MM approach.

Results and Future Work

The M2MM approach demonstrated several key benefits:

  • Improved Extensibility: New hardware support no longer requires manual changes to the tool's core metamodel.
  • Reduced Complexity: M2M transformations are used to "collapse" specific components back into base types before code generation, keeping the generator logic simple.
  • Modular Code Generation: The process allows for separate generation of generic middleware and component-specific drivers.

Future work will focus on automating the generation of the M2MM transformation logic itself and improving tool support for frequently changing metamodels. Additionally, the authors plan to implement encapsulation features to protect the intellectual property of component producers within the shared modeling environment.

Summary updated

BibTeX
@inproceedings{buckl2010modell,
  author = {Christian Buckl and Gerd Kainz and Stephan Sommer and Alois C. Knoll},
  title = {{Modell-zu-Metamodell-Transformationen zur Entwicklung von komponentenbasierten Systemen}},
  booktitle = {MBEES},
  year = {2010},
}
Figure