The Compositional Interchange Format Concepts, Semantics and - - PowerPoint PPT Presentation

the compositional interchange format concepts semantics
SMART_READER_LITE
LIVE PREVIEW

The Compositional Interchange Format Concepts, Semantics and - - PowerPoint PPT Presentation

intro concepts flavors transformations applications conclusions The Compositional Interchange Format Concepts, Semantics and Applications Bert van Beek 1 December 2010 Bert van Beek FMCO 2010 Graz Compositional Interchange Format 1/24


slide-1
SLIDE 1

intro concepts flavors transformations applications conclusions

The Compositional Interchange Format Concepts, Semantics and Applications

Bert van Beek

1 December 2010

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 1/24

slide-2
SLIDE 2

intro concepts flavors transformations applications conclusions tool interoperability bilateral interchange format

Introduction

Background

  • For the development of high tech systems many different modeling

languages and tools are used Different models may exist of the same component, e.g. a logic controller:

  • a simulation model of the controller and controlled system for

performance analysis

  • a verification model to check properties of the controller using a

model checker

  • an implementation model for real-time control in the actual system

How to avoid recoding of models in different languages, which leads to errors, loss of time and is expensive?

  • model transformations
  • co-simulation

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 2/24

slide-3
SLIDE 3

intro concepts flavors transformations applications conclusions tool interoperability bilateral interchange format

Bi-lateral model transformations

Language A0 Language B0 Language A1 Language B1 Language A2 Language B2 Language A3 Language B3

  • May lead to many model to model transformations (m × n)
  • Developer of transformations must be familiar with many different

formalisms

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 3/24

slide-4
SLIDE 4

intro concepts flavors transformations applications conclusions tool interoperability bilateral interchange format

Model transformations via interchange format

Language A0 Language B0 Language A1 Language B1 Language A2 Language B2 Language A3 Language B3 interchange format

  • Only transformations to/from the interchange format (m + n)
  • Reduction of the implementation effort

Main requirements Compositional Interchange Format

  • Generic and sufficiently rich modeling formalism
  • Textual and graphical language and simulator for intuitive

understanding of CIF models

  • Conceptual language suited to model transformations
  • Formal semantics

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 4/24

slide-5
SLIDE 5

intro concepts flavors transformations applications conclusions concepts

  • verview

interaction example

CIF language concepts

  • Based on automata
  • Formal and compositional semantics allowing
  • property preserving model transformations
  • compositional verification
  • Differential algebraic equations (possibly discontinuous)
  • Large scale systems modeling by orthogonal combination of:
  • parameterized process definition and instantiation (reuse, hierarchy)
  • parallel composition
  • and-or superstates
  • Process interaction:
  • Point to point communication
  • Multi-process synchronization
  • One-to-many broadcast communication
  • Shared variables
  • Support for urgency:
  • urgent actions and channels
  • urgent locations

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 5/24

slide-6
SLIDE 6

intro concepts flavors transformations applications conclusions concepts

  • verview

interaction example

Overview Compositional Interchange Format

Modelica, gPROMS2 Muscod2

  • IPDAE system

simulation

  • Dynamic
  • ptimization

Chi2

  • CT/DE simulation

UPPAAL2

  • Timed automata

verification PHAVer2 , Ariadne3

  • Hybrid automata

verification

  • 1. EU NoE HYCON2
  • 2. EU FP7 Multiform
  • 3. EU FP7 C4C
  • 4. NL Darwin
  • 5. EU ITEA2 Twins
  • 6. EU NoE HYCON

CIF:

  • Concepts 1 2 3
  • Simulation 1
  • External interfaces:

Co-simulation 1 Function calls 1 EtherCAT fieldbus

  • Refinement 2 :

And-Or superstates Stochastics

  • CIF to CIF 1 2 e.g:

CIFhybrid → CIFtimed CIFAndOr → CIFflat

  • Eclipse graphical editor 1

Switched linear systems interchange format6 Discrete-time PWA6

  • Multi-Parametric toolbox
  • Hybrid toolbox
  • Identification toolboxes

Cosimulation 1 2

  • Matlab/Simulink and . . .

EtherCat real-time fieldbus Logic controller design

  • SFC 6 , DC/FT 2

Supervisory Control Synthesis

  • Event 4 2 /State 3 4 based

HW/SW codesign

  • SystemC

Programmable Logic Controller

  • IEC 61131-3 PLCopen 2

Industrial applications

  • Twins5 Printer paper path

control: Rose RT Statecharts

  • Darwin4 MRI scanner

patient support control

  • C4C3 Control of distributed

printing processes

transform c

  • s

i m u l a t e network t r a n s f

  • r

m transform Bert van Beek FMCO 2010 Graz Compositional Interchange Format 6/24

slide-7
SLIDE 7

intro concepts flavors transformations applications conclusions concepts

  • verview

interaction example

Process interaction

Communication and synchronization

  • Synchronization on shared action labels
  • Sending and receiving information possible by means of actions

(a!e, a?x, where a is an action, e an expression, x a variable) AND/OR synchronization

  • AND synchronization: shared actions synchronize (e.g. multiple

receivers receive the same message)

  • OR synchronization: one of the shared actions synchronizes (as in

channel communication in UPPAAL and Chi) Normal or broadcast synchronization

  • Normal: wait until synchronization/communication is possible
  • Broadcast: the ‘receivers’ that are not ready do not participate in

the synchronization/communication (broadcast as in UPPAAL)

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 7/24

slide-8
SLIDE 8

intro concepts flavors transformations applications conclusions concepts

  • verview

interaction example

Example: aerial vehicles and submarines (both unmanned)

UV3 UV2 UV1 Command Center 35 60 100 30 65 Area UV1 Area UV2 Area UV3 Aerial Vehicle Communication range Broadcast communication

Model of two aerial vehicles (only one shown) communicating with three submarines, by means of one shared action (frequency) a:

  • OR synchronization between send actions of aerial vehicles
  • Action a is non-synchronizing for each aerial vehicle automaton, but

synchronizing for the composition of the two automata

  • Action a is synchronizing for the three submarines. Action a is

declared as input (as in IO-automata) This gives the UPPAAL broadcast channel semantics

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 8/24

slide-9
SLIDE 9

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

Different flavors of CIF

For modeling

  • Textual syntax aware editor
  • Graphical editor

For definition of formal semantics

  • Mathematical specification of core CIF
  • Formal semantics defined using SOS (Structured Operational

Semantics) For model transformations

  • Ecore class diagrams in Eclipse

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 9/24

slide-10
SLIDE 10

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

CIF for modeling

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 10/24

slide-11
SLIDE 11

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

Core CIF for formal semantics

An atomic interchange automaton is a tuple (V , v0, flow, inv, tcp, E) where

  • V : set of locations (vertices)
  • v0: initial location
  • flow, inv, tcp: functions from location to flow predicate, invariant,

time-can-progress predicate, respectively

  • E: set of edges
  • An edge can have an basic action label ℓ, a send action h!e, or a

receive action h?x:

  • (v, g, ℓ, (W , r), v ′)
  • (v, g, h!e, (W , r), v ′)
  • (v, g, h?x, (W , r), v ′)

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 11/24

slide-12
SLIDE 12

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

Core CIF for formal semantics

α ::= αatom atomic interchange automaton | α α parallel composition operator | γa(α) synchronising action operator a action label | u ≫ α initialisation operator u predicate | |[V x = e :: α ]| variable scope operator x variable, e expression | |[A a :: α ]| action scope operator a action label | Uz(α) urgency operator z action or channel | Dx:G(α) dynamic type operator G set of pairs of trajectories | ctrlx(α) control variable operator x variable

  • Orthogonal set of operators: separate operator for each concept
  • Parallel composition restrictive for synchronizing behavior
  • Other operators restrictive for all behavior

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 12/24

slide-13
SLIDE 13

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

Compositionality

CIF has a formal compositional semantics (SOS):

  • The meaning of any CIF component is defined independently of its

environment

  • Bisimulation proven to be a congruence for all operators
  • E.g. if a hybrid CIF component αhybrid with local variables can be

simplified as an equivalent timed component αtimed, then αhybrid C is equivalent to αtimed C for all CIF components C

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 13/24

slide-14
SLIDE 14

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

And-Or superstate refinement in CIF

Any location of a automaton can be defined in terms of any other CIF components

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 14/24

slide-15
SLIDE 15

intro concepts flavors transformations applications conclusions

  • verview

modeling core refinement modeling extensions

CIF modeling extensions

CIF modeling extension extends core CIF with:

  • clocks that are added for compatibility with timed automata,
  • input and output variables that are added for compositional

reasoning / compatibility with IO automata and with languages such as Simulink

  • automaton definition and instantiation that facilitate re-use of

automata Semantics of modeling extensions of CIF formally defined by means of abstract grammars and functional transformations

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 15/24

slide-16
SLIDE 16

intro concepts flavors transformations applications conclusions model2model framework Ecore statements Ecore expressions DSL

Specification of transformations

transformations Cross-formalism formalism A formalism B Tb3 Tb1 Ta1 Ta2 Tb2

  • Bi-directional structure preserving transformations for the yellow

subsets of the languages

  • Model to model (M2M) transformation from source to target

language of this subset

  • Broaden the subsets by means of M2M transformations within each

language

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 16/24

slide-17
SLIDE 17

intro concepts flavors transformations applications conclusions model2model framework Ecore statements Ecore expressions DSL

Transformation framework

CIF conceptual language definition based on

  • Concepts and relations between concepts (class diagrams), e.g.
  • Concepts: automata, locations, edges
  • Relations: automaton contains locations and edges
  • Invariants over these concepts (OCL constraints), e.g.
  • Within an automaton, the names of locations should be different
  • The source and target location of an edge belong to the same

automaton as the edge itself

Transformation framework based on OMG standards

  • Class diagrams for conceptual definition of CIF
  • OCL: object constraint language
  • QVT: model to model (concepts) transformation language
  • M2T: model to text transformation language

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 17/24

slide-18
SLIDE 18

intro concepts flavors transformations applications conclusions model2model framework Ecore statements Ecore expressions DSL

CIF conceptual language definition: statements

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 18/24

slide-19
SLIDE 19

intro concepts flavors transformations applications conclusions model2model framework Ecore statements Ecore expressions DSL

CIF conceptual language definition: expressions

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 19/24

slide-20
SLIDE 20

intro concepts flavors transformations applications conclusions model2model framework Ecore statements Ecore expressions DSL

DSL transformation language

Modeling transformations using DSL transformation languages

  • Transformations specified at problem domain instead of coding at

implementation level

  • Structure in transformations (re-use / chaining / hierarchy)
  • Reducing implementation efforts
  • Robust for changes

Implementation

  • Tools currently implemented in the Eclipse Modeling Framework

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 20/24

slide-21
SLIDE 21

intro concepts flavors transformations applications conclusions printing control MRI patient support

Industrial applications of CIF

Paper path control and printing processes control using supervisory control synthesis

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 21/24

slide-22
SLIDE 22

intro concepts flavors transformations applications conclusions printing control MRI patient support

Industrial applications of CIF

Real-time control of a patient support system

Supervisory control synthesis using:

  • modular supervisory control
  • state-based supervisory control

Uncontrolled system: 6.3 billion states PICU:

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 22/24

slide-23
SLIDE 23

intro concepts flavors transformations applications conclusions CIF itself connections

Conclusions on CIF itself

CIF generic and rich language

  • Based on automata
  • Formal and compositional semantics
  • Differential algebraic equations
  • Large scale systems: parameterized processes, and-or superstates
  • Process interaction: point to point communication, multi-process

synchronization, broadcast, shared variables

  • Support for urgency

CIF tooling

  • Textual and graphical editor
  • Simulator
  • Real-time control via EtherCAT

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 23/24

slide-24
SLIDE 24

intro concepts flavors transformations applications conclusions CIF itself connections

Conclusions on connecting CIF to other languages

Transformation framework based on OMG standards

  • Class diagrams, OCL constraint language, QVT transformation

language

  • Specification of transformation at problem domain instead of coding

at implementation level

  • Implementation in Eclipse modeling framework

Connecting CIF via co-simulation

  • Matlab/Simulink for control system design

Connecting CIF via model transformation to tools for among others

  • Large scale DAE based hybrid system simulation and/or optimization
  • Verification of timed and hybrid systems
  • Supervisory control synthesis
  • Real-time control on PLCs or via FPGA (future work)

Bert van Beek FMCO 2010 Graz Compositional Interchange Format 24/24