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
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
intro concepts flavors transformations applications conclusions tool interoperability bilateral interchange format Bi-lateral model transformations Language A 0 Language B 0 Language A 1 Language B 1 Language A 2 Language B 2 Language A 3 Language B 3 • 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
intro concepts flavors transformations applications conclusions tool interoperability bilateral interchange format Model transformations via interchange format Language A 0 Language B 0 Language A 1 Language B 1 interchange format Language A 2 Language B 2 Language A 3 Language B 3 • 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
intro concepts flavors transformations applications conclusions concepts overview 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
intro concepts flavors transformations applications conclusions concepts overview interaction example Overview Compositional Interchange Format Modelica, gPROMS 2 CIF: Cosimulation 1 2 e t Muscod 2 • Concepts 1 2 3 a l u • Matlab/Simulink and . . . m i s o c • IPDAE system • Simulation 1 transform network simulation EtherCat real-time fieldbus • External interfaces: • Dynamic Co-simulation 1 Logic controller design optimization m Function calls 1 s f o r t r a n • SFC 6 , DC/FT 2 EtherCAT fieldbus Chi 2 • Refinement 2 : Supervisory Control Synthesis • CT/DE simulation And-Or superstates • Event 4 2 /State 3 4 based Stochastics transform UPPAAL 2 • CIF to CIF 1 2 e.g: CIF hybrid → CIF timed • Timed automata HW/SW codesign CIF AndOr → CIF flat verification • SystemC • Eclipse graphical editor 1 PHAVer 2 , Ariadne 3 Programmable Logic Controller • Hybrid automata • IEC 61131-3 PLCopen 2 verification Switched linear systems interchange format 6 Industrial applications 1. EU NoE HYCON2 • Twins 5 Printer paper path 2. EU FP7 Multiform control : Rose RT Statecharts 3. EU FP7 C4C Discrete-time PWA 6 • Darwin 4 MRI scanner 4. NL Darwin patient support control • Multi-Parametric toolbox • C4C 3 Control of distributed 5. EU ITEA2 Twins • Hybrid toolbox • Identification toolboxes printing processes 6. EU NoE HYCON Bert van Beek FMCO 2010 Graz Compositional Interchange Format 6/24
intro concepts flavors transformations applications conclusions concepts overview 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
intro concepts flavors transformations applications conclusions concepts overview interaction example Example: aerial vehicles and submarines (both unmanned) Communication range Aerial Vehicle Broadcast communication Command Center UV1 UV2 UV3 Area UV2 Area UV1 Area UV3 0 30 35 60 65 100 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
intro concepts flavors transformations applications conclusions overview 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
intro concepts flavors transformations applications conclusions overview modeling core refinement modeling extensions CIF for modeling Bert van Beek FMCO 2010 Graz Compositional Interchange Format 10/24
intro concepts flavors transformations applications conclusions overview modeling core refinement modeling extensions Core CIF for formal semantics An atomic interchange automaton is a tuple ( V , v 0 , flow , inv , tcp , E ) where • V : set of locations (vertices) • v 0 : 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
intro concepts flavors transformations applications conclusions overview 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 | U z ( α ) urgency operator z action or channel | D x : G ( α ) dynamic type operator G set of pairs of trajectories | ctrl x ( α ) 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
intro concepts flavors transformations applications conclusions overview 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
intro concepts flavors transformations applications conclusions overview 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
Recommend
More recommend