Date post: | 06-May-2015 |
Category: |
Technology |
Upload: | dgianni |
View: | 290 times |
Download: | 1 times |
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)
Table of Contents
• Introduction
• Challenge
• Value Bindings Concept and Example
• Using Value Bindings for Models Composition
• Conclusion
ModelicaML Value Bindings for Automated Model Composition
Page 2
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
ModelicaML Value Bindings for Automated Model Composition
Page 3 03/05/2012
• vVDR (Virtual Verification of Designs against Requirements) is a method that enables a
model-based design verification against requirements
• vVDR is supported in ModelicaML
Introduction: vVDR Method
Formalize Requirements
Formalize Designs
Formalize Scenarios
Create Verification Models
Execute and Create Report
Analyze Results
ModelicaML Value Bindings for Automated Model Composition
Page 4 03/05/2012
RMM Requirement
Monitor Models
Scenario Models SM
Designs
Alternative Models DAM
VM Verification Models
AUTOMATED
Task Created Artifact
Goal: Enable on-demand
verification of designs
against requirements
using automated model
composition at any time
during development.
AUTOMATED
Actor
Reports
*
Focus of this
presentation
ModelicaML Value Bindings for Automated Model Composition
Page 5
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?
…
Create Verification Models
… RMM
1. Verification
Model VM DAM SM
2. Verification
Model VM …
…
Requirement Models Scenario Models Designs Alternative Models
DAM SM
DAM
DAM SM
SM
SM SM
SM RMM
1
RMM
RMM
RMM
RMM SM
RMM
RMM
RMM
RMM
… …
n. Verification
Model
*
ModelicaML Value Bindings for Automated Model Composition
Page 6
Solution Proposal: Value Bindings
• Value Binding enables the automation of
verification model composition
• Value Bindings include the definition of:
– Client (component that requires data from
other components)
– Provider (component that provides data for
other components)
– Mediator (mediates between clients and
providers)
• Depending on which mediators and
providers are in place we can:
• Determine which clients can be satisfied
• Find valid combinations and generate
verification models
• Generate binding code for client
components in verification models
c
p
M
Clients
Mediators
Providers
VM
Verification
Model
RMM
Requirement
Monitor
Models
SM
Scenario
Model
DAM
Design
Alternative
Model
M
c
c
p
c
p
c
p
ORM
Other
Required
Models
ModelicaML Value Bindings for Automated Model Composition
Page 7
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 in (from liquid source) Liquid out
ModelicaML Value Bindings for Automated Model Composition
Page 8
Example: Requirement Monitor Model ”The time to fill an empty tank shall be 300 sec. max.”
“status” is set by the violation monitor and
indicates the following:
0 = not evaluated
1 = evaluated and not violated
2 = violated
Clients to get input values from
design model providers
ModelicaML Value Bindings for Automated Model Composition
Page 9
Example: Design Alternative Model
Provider for
requirements
Clients to get
input values
from scenarios
ModelicaML Value Bindings for Automated Model Composition
Page 10
Example: Scenario Model “Filling and draining the tank”
Example scenario: Tank cleaning by filling and
draining the tank several times when the aircraft
is on ground.
Providers for design model clients
Action code:
mode := 1; // fill mode
preselectedLevel := 1;
pumpPowerFactor := 1;
ModelicaML Value Bindings for Automated Model Composition
Page 11
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)
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.
ModelicaML Value Bindings for Automated Model Composition
Page 12 03/05/2012
Verification Model Composition in ModelicaML: Finding Valid Combinations - Algorithm
ModelicaML Value Bindings for Automated Model Composition
Page 13 03/05/2012
?
Select Design Alternative
Select Scenario
?
Analyze (Next) Scenario
Analyze (Next) Requirement
Select Requirement
Y N
Y N
DAM
RMM
VM
SM
RMM
VM
SM
?
Create Combination
(i.e. Create Verification
Model)
else
More requirements
…
?
…
…
More scenarios
DAM
Clients of design
alternative satisfied
by providers from
scenario?
Requirement is referenced by scenario
and requirement clients satisfied by
providers from design alternative?
?
More req.
else
* Next scenario if no requirement
* Abort if no scenario
Combinations
else
ModelicaML Value Bindings for Automated Model Composition
Page 14
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):
Example: Binding code for the client tankIsEmpty of the requirement req_001_...:
tankIsEmpty = sm_spws_environment.spws.tank.level < 0.001
Design Model
Scenario Model
Requirement
Models
Verification Model
Binding
Provider from
design model
Client from requirement model
ModelicaML Value Bindings for Automated Model Composition
Page 15
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.
ModelicaML Value Bindings for Automated Model Composition
Page 16
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
Thank you for your attention!
Wladimir Schamai
EADS Innovation Works (Germany)
Peter Fritzson
Linköping University (Sweden)
ModelicaML Value Bindings for Automated Model Composition
Page 17
ADDITIONAL SLIDES
ModelicaML Value Bindings for Automated Model Composition
Page 18 03/05/2012
ModelicaML Value Bindings for Automated Model Composition
Page 19
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.
ModelicaML Value Bindings for Automated Model Composition
Page 20
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
ModelicaML Value Bindings for Automated Model Composition
Page 21
Example of Value Bindings in ModelicaML
With provider operation: “level < 0.001” in order to return a Boolean value.
ModelicaML Value Bindings for Automated Model Composition
Page 22
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.
ModelicaML Value Bindings for Automated Model Composition
Page 23
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.
ModelicaML Value Bindings for Automated Model Composition
Page 24
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