Updates on SCCharts Updates on SCCharts Christian Motika Steven Smyth SYNCHRON 2015 04. DEC 2015, Kiel 1
Reactive System Updates on SCCharts Safety-critical systems State based reactions Concurrency Synchronous Language SCCharts = SyncCharts Syntax + Sequential Constructive Semantics 1
Interface declaration Region ID Recall SCCharts Updates on SCCharts Root state Local declaration Transition trigger/effect Initial state Superstate Anonymous simple state Immediate transition Transition priority Termination Named simple state Final state Suspension Connector Count delay History transition Conditional termination Complex final state 3 1: y > -10 2: x <= 0 1: y > 0 Signal Initialization Entry/During /Exit actions Deferred transition Strong abort Pre operator Weak abort Core-SCCharts Small set of simple features ease Rich set of advanced SCCharts = SyncCharts down stream Syntax + Sequential Constructive Semantics compilation Extended- SCCharts features ease modeling 2
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics 3
ALDO Example Updates on SCCharts Interface Concurrency Local Variables Instantaneous Communication SCCharts = SyncCharts Syntax + Sequential Constructive Semantics Signals Preemption 4
Modeling ALDO Updates on SCCharts Textual View and Editing SCChart Graphical View [VL/HCC 13] Transition State SCCharts = SyncCharts Syntax + Sequential Constructive Semantics Abstract Model 5
Modeling ALDO Demo Updates on SCCha 6
Updates on SCCharts Reliable Compiler + Reliable Models + Praticability [SYNCHRON 14] Single-Pass Language-Driven Incremental Compilation (SLIC) [ISOLA 14] Interactive Model-Transformation-Based Compiler Intemediate Results: White-Box Compiler Modeled Diagram Textual Modeling Select Transformation Compiler (Intermediate) Transformed Diagram / Code SCCharts = SyncCharts Syntax + Sequential Constructive Semantics 7
KIELER Updates Compiler on SCCharts (2) Textual Modeling Modeled Diagram (Intermediate) Transformed Diagram / Code Compiler Select Transformation Single-Pass Language-Driven Incremental Compilation (SLIC) Original Model Intermediate Model Fully trans- Formed Model 8
SLIC Order Updates on SCCharts 9
SLIC Order Updates on SCCharts 9
SCCharts Updates Compilation on SCCharts for ALDO 10
Compiling ALDO (1) Updates on SCChar t(s Signal During Abort Initalization Entry Connector Extended Core Normalized SCG 11
Compiling Updates on ALDO SCCharts (2) expand signal 12
Compiling Updates on ALDO SCCharts (3) expand during action 13
Compiling Updates on ALDO SCCharts (4) expand abort 14
Compiling Updates on ALDO SCCharts (5) expand initialization 15
Compiling Updates on ALDO SCCharts (6) expand entry 16
Compiling Updates on ALDO SCCharts (7) expand connector 17
Compiling Updates on ALDO SCCharts (8) normalization 18
Compiling Updates on ALDO SCCharts (9) SCG transformation 19
Compiling ALDO Demo Updates on SCCha 20
Usage expands Feature produces Transformation not handles registers registers consists of Kieler Compiler (KiCo) 2.0 registers Processor EObject EObject EObject uses KiCo by calling EObject KiCo.compile(EObject, ID1, ID2) KiCo.UI Auto Selection Visual Feedback Feature Selection Select All / Expand All Auto Selection On/Off Different Views Compile Chains 21
Feature Usage (2) expands produces not handles Transformation registers registers consists of Kieler Compiler (KiCo) 2.0 registers Processor uses KiCo by calling EObject KiCo.compile(EObject, ID1, ID2) EObject EObject EObject KiCo.Server HTTP Protocol 1. Read request 2. Parse Model 3. Call KiCo.compile() 4. Serialize result 5. Send back result HTTP request / respond External Application Web Browser 22
Usage (3) Updates on SCCha 23
Usage Demo Updates on SCCha 24
Regression Tests Updates on SCCha 25
ABROINO: ABRO SCChart running on Arduino, Dec 2014 26
More Some more student projects 27
Proxy Prox States Application models often contained proxy states that accumulate equations and were left immediately Proxy state within the Railway project Proxy state within the Mindstorms project 28
Proxy Prox States Application models often contained proxy states that accumulate equations and were left immediately Would be really cool if we could express this in a dataflow way. However, we don t want to change the semantics of Core SCCharts! Add a new Extended SCCharts feature! Proxy state within the Mindstorms project 29
Interface declaration Region ID Recall SCCharts Updates on SCCharts Root state Local declaration Transition trigger/effect Initial state Superstate Anonymous simple state Immediate transition Transition priority Termination Named simple state Final state Suspension Connector Count delay History transition Conditional termination Complex final state 3 1: y > -10 2: x <= 0 1: y > 0 Signal Initialization Entry/During /Exit actions Deferred transition Strong abort Pre operator Weak abort Core-SCCharts Small set of simple features ease Rich set of advanced SCCharts = SyncCharts down stream Syntax + Sequential Constructive Semantics compilation Extended- SCCharts features ease modeling 30
Dataflow Prox Regions Add dataflow regions as Extended SCCharts feature Simple input/output example Simple equation example Node example 31
Dataflow Prox Regions Dataflow regions and control-flow regions co-exist Defining new node Containing an control-flow region Expanded control shows embedded sub-chart Or simply reference another SCChart 32
Dataflow Prox Regions Dataflow regions and control-flow regions co-exist Hybrid SCCharts example 33
Dataflow Transformation Prox Several approaches a possible to transform the extended feature Minimal example Transform single pass evaluation with concurrent regions Transform single pass evaluation with initial and final state Transform frequent evaluation Transform frequent evaluation Initialize-Update-Read protocol 34
SCCharts Model Railway Controller Project 2014 STATES: 1,628 modeled 135,000 expanded 35
(3) (before the crash) SCCharts Quadrocopter Project 2015 36
(4) (before the crash) SCCharts Lego Mindstorms Project 2014 37
CHARLES ANDRÉ. Semantics of SyncCharts, 2003. To Go Further GÉRARD BERRY. The Esterel v5 Language Primer, 2000. MOTIKA, C., SMYTH, S., AND VON HANXLEDEN, R. Compiling SCCharts A Case-Study on Interactive Model-Based Compilation. 6th International Symposium On Leveraging of Formal Methods, Verification (ISoLA 14), Corfu, Oct 2014. SCHNEIDER, C., SPÖNEMANN, M., AND VON HANXLEDEN, R. Just model! Putting automatic synthesis of node-link-diagrams into practice. In Proceedings of the IEEE Symposium on Visual Languages and Human- Centric Computing (VL/HCC 13) (San Jose, CA, USA, 15 19 Sept. 2013). UNI KIEL, REAL-TIME AND EMBEDDED SYSTEMS GROUP. KIELER & SCCharts webpage. http://www.informatik.uni-kiel.de/en/rtsys/kieler/. & http://www.sccharts.com. VON HANXLEDEN, R., LEE, E. A., MOTIKA, C., AND FUHRMANN, H. Multi-view modeling and pragmatics in 2020 position paper on designing complex cyber-physical systems. In Proceedings of the 17th International Monterey Workshop on Development, Operation and Management of Large-Scale Complex IT Systems, LNCS (Oxford, UK, Dec. 2012), vol. 7539. VON HANXLEDEN, R., DUDERSTADT, B., MOTIKA, C., SMYTH, S., MENDLER, M., AGUADO, J., MERCER, S., AND O BRIEN, O. Sequentially Constructive Concurrency A conservative extension of the synchronous model of computation. Proc. ACM SIGPLAN conference on Programming Language Design and Implementation (PLDI 14), Edinburgh, Jun 2014. 38
That s all Folks - Thank You! 39
Traditional vs. Interactive SLIC vs. Modeled Diagram Textual Modeling Select Transformation Compiler (Intermediate) Transformed Diagram / Code BAK 1
Traditional vs. Interactive SLIC BAK 2
SCCharts Modeling User Story 1. Edit SCT code 3. Inspect original + transformed SCChart 4. Adjust layout Textual Entry Visual Browsing Layout Control Interactive Compilation Control 2. Select transformations BAK 3
Mapping SCCharts to SCG BAK 4
KiCo Selection Algorithm BAK 5
Test File Creation (ESO) BAK 6
Model Railway Track Scheme BAK 7
SCCharts Meta Model BAK 8