Quality for Model-Based Design
This article describes how Infoscope monitors Model-Based Design and prevents latent bugs.
Model-Based Design or MBD is a methodology, which is used to design embedded software and therefore, is widely applied in sectors such as automotive and aerospace.
MBD increases the productivity of software development and gathers both software and hardware requirements. In this approach, the system will be modelled and then simulated to validate, that the specified system fulfils the requirements. Afterwards, the code will be generated, often to C or C++, and the software finally integrated. In terms of quality, MBD brings the product to a superior level by shifting left the bug detection in the SDLC and reduces the number of latent bugs as well.
Simulink® is a graphical programming environment for modelling and simulating dynamical systems, developed by The MathWorks. The model and simulation below illustrates the modelling of a Bouncing Ball [source: mathworks.com].
Bouncing Ball model / © The MathWorks, inc
Simulation of the model, © The MathWorks, inc
In this context, analysing the generated code is not relevant since it is the result of the modelling. However, evaluating the quality of the model is definitely pertinent.
Infoscope and Model-Based Design
Infoscope analyses models such as Simulink® and Stateflow® models and allows focusing on block modification, avoiding block complexity, applying best practices and improving code execution.
To do so, Infoscope calculates metrics regarding: nesting level, input, constant, assignment, calls, callers and the V(g), on which pass/fail thresholds can be defined. Infoscope also checks models against rules e.g. “use of undeclared variables”, “multiple function or type declaration definition” etc.
With Infoscope, users can benefit from the Highlights screen to identify complex, new or changed Function Blocks. They can leverage standard features too such as Action Plan, report creation and the dashboard as well as its role-based interface.
5/8 metrics are KO in this complex block
Infoscope Enterprise Edition analyses source code as well as models, which provides a complete overview of the software quality, and this, also for embedded systems. To get more information and read other articles, visit our web site: www.infoscope.com.