Presentation at the 2nd International Workshop on Model-driven Approaches for Simulation Engineering
(held within the SCS/IEEE Symposium on Theory of Modeling and Simulation part of SpringSim 2012)
Please see: http://www.sel.uniroma2.it/mod4sim12/ for further details
Driving Behavioral Change for Information Management through Data-Driven Gree...
ModelicaML Value Bindings for Automated Model Composition
1. ModelicaML Value Bindings for Automated
Model Composition
Wladimir Schamai (EADS Innovation Works, Germany)
Philipp Helle (EADS Innovation Works, Germany)
Peter Fritzson (Linköping University, Sweden)
Chris Paredis (Georgia Institute of Technology, USA)
2. ModelicaML Value Bindings for Automated Model Composition
Table of Contents
• Introduction
• Challenge
• Value Bindings Concept and Example
• Using Value Bindings for Models Composition
• Conclusion
Page 2
3. ModelicaML Value Bindings for Automated Model Composition
Introduction: ModelicaML
• ModelicaML integrates a subset of
the UML and the Modelica language
in order to leverage standardized
graphical notations of UML for
system modeling and the simulation
power of Modelica
• ModelicaML enables engineers to
describe
• System requirements
• System design (structure and
behavior)
• Usage-, test scenarios
• vVDR (Virtual Verification of Designs against Requirements) is a method that enables a
model-based design verification against requirements
• vVDR is supported in ModelicaML
Page 3 03/05/2012
4. ModelicaML Value Bindings for Automated Model Composition
Introduction: vVDR Method
Actor Task Created Artifact
Formalize RMM
Requirement
Requirements Monitor Models
Designs
Formalize Designs DAM
Alternative Models
Formalize SM Scenario Models
Scenarios
Goal: Enable on-demand
*
Create Verification VM Verification Models verification of designs
AUTOMATED
Models
against requirements
using automated model
AUTOMATED Execute and Reports composition at any time
Create Report during development.
Focus of this
Analyze Results
presentation
Page 4 03/05/2012
5. ModelicaML Value Bindings for Automated Model Composition
Challenge
We want to verify different design alternatives against sets of requirements using
different scenarios. Questions:
1) How to find valid combinations of design alternatives, scenarios and requirements in
order to enable an automated composition of verification models?
2) Having found a valid combination: How to bind all components correctly?
Designs Alternative Models Scenario Models Requirement Models
…
DAM RMM RMM
SM SM 1 RMM
DAM RMM RMM
SM SM RMM
DAM RMM
SM RMM
SM RMM
*
Create Verification
SM
Models
1. Verification
VM
… Model
DAM SM RMM
2. Verification
Model
VM … … …
n. Verification …
Model
Page 5
6. ModelicaML Value Bindings for Automated Model Composition
Solution Proposal: Value Bindings
• Value Binding enables the automation of
c Clients
verification model composition M Mediators
p Providers
• Value Bindings include the definition of:
– Client (component that requires data from
other components) Requirement Design
Monitor Alternative
– Provider (component that provides data for Models Model
other components) DAM
– Mediator (mediates between clients and RMM c c
providers) M p
VM
c
p c
p
• Depending on which mediators and SM Verification
ORM Model
providers are in place we can:
Scenario Other
• Determine which clients can be satisfied Model Required
• Find valid combinations and generate Models
verification models
• Generate binding code for client
Page 6
components in verification models
7. ModelicaML Value Bindings for Automated Model Composition
Example: Design Alternative Model
Simplified Aircraft Potable Water System
- Overhead tank system that
can be filled using a liquid
source from bottom with the
aircraft on ground.
- Controller monitors the
level of liquid and controls
the valves according to its
mode (e.g. “fill”-, “drain”-,
“pre-selected value fill”-
mode).
Liquid out Liquid in (from liquid source)
Page 7
8. ModelicaML Value Bindings for Automated Model Composition
Example: Requirement Monitor Model
”The time to fill an empty tank shall be 300 sec. max.”
Clients to get input values from
design model providers
“status” is set by the violation monitor and
indicates the following:
0 = not evaluated
1 = evaluated and not violated
2 = violated
Page 8
9. ModelicaML Value Bindings for Automated Model Composition
Example: Design Alternative Model
Provider for
requirements
Clients to get
input values
from scenarios
Page 9
10. ModelicaML Value Bindings for Automated Model Composition
Example: Scenario Model “Filling and draining the tank”
Providers for design model clients
Action code:
mode := 1; // fill mode
preselectedLevel := 1;
pumpPowerFactor := 1;
Example scenario: Tank cleaning by filling and
draining the tank several times when the aircraft
is on ground.
Page 10
11. ModelicaML Value Bindings for Automated Model Composition
Example: Mapping Scenarios to Requirements
Engineer (e.g. tester) has to define which scenarios are appropriate to verify which
requirements?
• One scenario can be used to verify multiple requirements (to increase requirements
coverage and confidence in verification results)
• Each requirement should be referenced by at least one scenario
These relations
are defined
manually (could
be automated in
the future)
Page 11
12. ModelicaML Value Bindings for Automated Model Composition
Verification Model Composition in ModelicaML:
Finding Valid Combinations - Goal
• Value Bindings are used to determine valid combinations as follows:
– Select a design alternative
• Find combinations consisting of
– 1 scenario that can stimulate this design model and
– n requirements that are implemented in the design, and can be verified
using this scenario.
• Each combination is used to generate one verification model.
Page 12 03/05/2012
13. ModelicaML Value Bindings for Automated Model Composition
Verification Model Composition in ModelicaML:
Finding Valid Combinations - Algorithm
Combinations
DAM DAM
Select Design Alternative
* Abort if no scenario
Analyze (Next) Scenario
More scenarios
N Y
? ? Select Scenario SM SM
…
else
* Next scenario if no requirement
Clients of design
alternative satisfied Analyze (Next) Requirement
by providers from
scenario? More req.
N Y
else
? ? Select Requirement RMM RMM …
More requirements
?
Requirement is referenced by scenario else
and requirement clients satisfied by
providers from design alternative?
Create Combination VM VM …
(i.e. Create Verification
Model)
Page 13 03/05/2012
14. ModelicaML Value Bindings for Automated Model Composition
Automatic Binding Code Generation in ModelicaML
Value Bindings are used to automatically generate binding code for all clients in the
verification model (i.e. a combination of design model, scenario and a set of requirements):
Verification Model
Provider from
Design Model design model
Scenario Model Binding
Requirement
Models
Client from requirement model
Example: Binding code for the client tankIsEmpty of the requirement req_001_...:
tankIsEmpty = sm_spws_environment.spws.tank.level < 0.001
Page 14
15. ModelicaML Value Bindings for Automated Model Composition
Simulation and Report Generation in ModelicaML
Verification models are simulated.
The generated Verification
Report is a prepared summary of:
• Configuration, bindings
• Violations of requirements
• etc.
Page 15
16. ModelicaML Value Bindings for Automated Model Composition
Conclusion
• The ModelicaML Value Bindings approach enables automated model composition, which
is used in ModelicaML for automatic generate verification models
• Bindings do not modify client or provider models (important when libraries are used)
• Using binding definitions we can find valid combinations and generate verification
models
• The binding code can be generated for all client components automatically
• The generated verification models become artifacts that are created automatically on-
demand and do not need to be maintained
Page 16
17. ModelicaML Value Bindings for Automated Model Composition
Thank you for your attention!
Wladimir Schamai
EADS Innovation Works (Germany)
wladimir.schamai@eads.net
Peter Fritzson
Linköping University (Sweden)
petfr@ida.liu.se
Page 17
19. ModelicaML Value Bindings for Automated Model Composition
vVDR Method Steps Explanation
1. Formalize Requirements: This step explains how select and formalize requirements for
the design verification purpose.
2. Formalize Designs (Select or Create Design Model to be Verified against
Requirements ): This step clarifies what properties a system design model needs to have
for being suitable for this method.
3. Formalize (Verification) Scenarios: This step describes what the properties of a
verification scenario are.
4. Create Verification Models: This step explains what a verification model consists of.
5. Execute Verification Models and Create Report: This step imposes requirements on
the simulation output.
6. Analyze Results: This step provides guidance for analyzing possible causes of
inconsistencies found in the simulation results.
Page 19
20. ModelicaML Value Bindings for Automated Model Composition
Verification Artifacts Traceability in ModelicaML
The same algorithm for finding valid combination is used to infer the traceability between
requirements, scenarios and design alternatives:
• Requirements view shows which requirements are implemented and can be tested using
which scenarios
• Scenarios view shows scenarios that are appropriate for a design alternative and all
requirements can be verified using this scenario
• For each combination a verification model can be generated on-demand
Page 20
21. ModelicaML Value Bindings for Automated Model Composition
Example of Value Bindings in ModelicaML
With provider operation: “level < 0.001” in order to return a Boolean value.
Page 21
22. ModelicaML Value Bindings for Automated Model Composition
Binding Operations in ModelicaML : Client Operation
• Used when a sub-component client shall be referenced explicitly
• When a value manipulation or type conversion is required
• For overwriting of binding definitions. Any upper binding definition in the components
tree overwrites lower level bindings.
Page 22
23. ModelicaML Value Bindings for Automated Model Composition
Binding Operations in ModelicaML : Mediator Operation
• Built-in functions for taking the minimum or
the maximum value, sum values, build a
product, or to use the logic operators such as
AND, OR, or XOR.
• These functions are only used if multiple
providers are anticipated for this mediator.
• In contrast, the function getSingleProvider()
is used to ensure that there must be only one
provider for this mediator.
Page 23
24. ModelicaML Value Bindings for Automated Model Composition
Binding Operations in ModelicaML : Provider Operation
• Used for type conversion,
• e.g., if client requires a different type compared to the provider type
• Or when the actual provider is a sub-component, e.g.:
• Requirement: When the system is not used (e.g. is not being filled, drained or is not supplying water
to clients) all valves shall be fully closed.
Provider
Provider Operation
with references to
sub-components
Page 24