Der folgende Artikel ist derzeit nur auf Englisch verfügbar.
Do You Want to Assess Your Model's Architecture?
Ensuring a well-structured model architecture is essential for developing safe and reliable software. In this article, we explore how the MES Model Examiner® (MXAM) enhances model architecture, simplifies complexity management, and ultimately improves software quality.
ISO 26262-Compliant Analyses and Visualization of Model Architecture
A sound model architecture is a vital prerequisite for safe software that is generated from these models. MXAM helps you analyze the architecture of Simulink, Stateflow, Embedded Coder, and TargetLink models. The analysis provides you all relevant software metrics to realistically evaluate the architecture, complexity, and size of your models. MXAM’s fast and precise structure and complexity analysis gives you complete transparency of your models and helps to improve the generated code.
How MXAM Can Reduce Model Complexity and Improve Generated Code

1. Fast Structural Overview
MXAM offers a fast and clear visualization of model structure including subsystem and state chart hierarchies, interface design, as well as objective figures and metrics of the analyzed systems’ properties. MXAM evaluates model complexity on the basis of well-established software metrics and provides detailed information about the number and types of elements used in the model.


2. Realistic Measurement of Model Size
“How big is my model?“ is a question that can be answered easily and objectively with MXAM's "global complexity" metrics. To calculate global complexity, all elements of the analyzed module are taken into account, including the contents of nested subsystems. As the global complexity also reflects the complexity of the implementation it also provides a reliable measure for test and review effort.


3. Analysis Down to the Last Detail
The local distribution of the implemented functionality in the model is evaluated with the help of the „local complexity“. MXAM computes this local complexity of subsystems in Simulink, Stateflow, and TargetLink models based on halstead metric volume.
A ratings scale allows complexity hotspots to be identified quickly, i.e., model parts with too high complexity due to unbalanced functionality. As a result of their complexity, these hotspots are empirically more difficult to test and are more prone to errors. Refactoring is often recommended, which can be prioritized using a combination of model metrics available in MXAM.
Evaluating whether a subsystem is especially apt for further partitioning can be done with the help of the "incoherence metric". This metric assesses to which extent a given Simulink subsystem is related to exactly one task, or whether multiple independent tasks are implemented. Refactoring through appropriate partitioning will be easier if the subsystems is less coherent.

4. Effective Search for Clones Among Subsystems
MXAM detects clones and evaluates the internal dependencies of subsystems, helping you to find complex, error-prone model parts and keep model complexity low. This provides you valuable support to meet the essential requirements of ISO 26262 regarding the design of the software architecture. Cloned parts will be found by MXAM even with layout and parameter changes. Thus, frequently reused functions can be safely identified and and centralized through reusable components like referenced models or library subsystems. In this way, model and code size is kept in check.
Your Benefits of Using MXAM to Improve Model Architecture
Transparency
- Identifies complex model parts (hotspots)
- Finds duplicated subsystems
Simplification
- Visualizes model structure
- Evaluates structural complexity
Metrics
- Calculates all relevant well-established software metrics on model level
- Calculates model-specific metrics
Compliance
- Ensures compliance with safety standards such as ISO 26262/IEC 61508 (Architectural Design Principles Part 6 Chapter 7)
- Ensures compliance with the quality standard ASPICE (Evaluate software detailed design, Base Practice SWE.3.BP4)
PS: For those of you who know us already for longer: Model metrics and complexity analysis were the main functions of MES' former tool MXRAY. The functionality of MXRAY has been completely integrated into MXAM from MXAM v.6 on. MXRAY therefore is no longer available as a standalone tool.