Upload
others
View
3
Download
0
Embed Size (px)
Citation preview
Updates on SCCharts
Christian Motika, Steven Smyth SYNCHRON '15
Updates on SCCharts
SYNCHRON 2015
04. DEC 2015, Kiel
SCCharts KIELER Compiler Usage & Tests Applications
Christian Motika Steven Smyth
1
Updates on SCCharts
1 Christian Motika, Steven Smyth SYNCHRON '15
Reactive System
• Safety-critical systems • State based reactions • Concurrency Synchronous Language
SCCharts KIELER Compiler Usage & Tests Applications
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
Updates on SCCharts
2 Christian Motika, Steven Smyth SYNCHRON '15
Recall SCCharts SCCharts KIELER Compiler Usage & Tests Applications
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
Interface declaration
Final state
Connector
Initial state
Root state
Named simple state
Transition trigger/effect
Region ID
Transition priority
Conditional termination
Anonymous simple state
Entry/During/Exit actions
Termination
Superstate
Signal
Immediate transition
Strong abort
Local declaration
Weak abort
Deferred transition
Count delay
Pre operator
Initialization
Complex final state
Core-SCCharts Small set of simple features ease down stream compilation
Extended-SCCharts Rich set of advanced features ease modeling
Suspension
1: y > -10
3 History transition
2: x <= 0
1: y > 0
3 Christian Motika, Steven Smyth SYNCHRON '15
SCCharts KIELER Compiler Usage & Tests Applications
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
Updates on SCCharts
4 Christian Motika, Steven Smyth SYNCHRON '15
ALDO Example SCCharts KIELER Compiler Usage & Tests Applications
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
• Interface • Local Variables • Signals
• Concurrency • Instantaneous Communication • Preemption
Updates on SCCharts
5 Christian Motika, Steven Smyth SYNCHRON '15
Modeling ALDO SCCharts KIELER Compiler Usage & Tests Applications
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
SCChart
State Transition
Textual View and Editing
Graphical View
[VL/HCC’13]
Abstract Model
Updates on SCCha
6 Christian Motika, Steven Smyth SYNCHRON '15
Modeling ALDO SCCharts KIELER Compiler Usage & Tests Applications
Demo
Updates on SCCharts
7 Christian Motika, Steven Smyth SYNCHRON '15
KIELER Compiler SCCharts KIELER Compiler Usage & Tests Applications
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
Compiler Textual
Modeling
Modeled Diagram
(Intermediate) Transformed
Diagram / Code Select
Transformation
• 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
Compiler
Textual Modeling
Modeled Diagram
(Intermediate) Transformed
Diagram / Code
Select Transformation
Original Model
Intermediate Model
Fully trans- Formed Model
Single-Pass Language-Driven Incremental Compilation (SLIC)
Updates on SCCharts
8 Christian Motika, Steven Smyth SYNCHRON '15
KIELER Compiler (2) SCCharts KIELER Compiler Usage & Tests Applications
Updates on SCCharts
9 Christian Motika, Steven Smyth SYNCHRON '15
SLIC Order SCCharts KIELER Compiler Usage & Tests Applications
Updates on SCCharts
9 Christian Motika, Steven Smyth SYNCHRON '15
SLIC Order SCCharts KIELER Compiler Usage & Tests Applications
Updates on SCCharts
10 Christian Motika, Steven Smyth SYNCHRON '15
SCCharts Compilation SCCharts KIELER Compiler Usage & Tests Applications
for ALDO
Updates on SCChar t(s
11 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (1) SCCharts KIELER Compiler Usage & Tests Applications
Extended Core Normalized
Signal During Abort Initalization Entry Connector
SCG
Updates on SCCharts
12 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (2) SCCharts KIELER Compiler Usage & Tests Applications
expand signal
Updates on SCCharts
13 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (3) SCCharts KIELER Compiler Usage & Tests Applications
expand during action
Updates on SCCharts
14 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (4) SCCharts KIELER Compiler Usage & Tests Applications
expand abort
Updates on SCCharts
15 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (5) SCCharts KIELER Compiler Usage & Tests Applications
expand initialization
Updates on SCCharts
16 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (6) SCCharts KIELER Compiler Usage & Tests Applications
expand entry
Updates on SCCharts
17 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (7) SCCharts KIELER Compiler Usage & Tests Applications
expand connector
Updates on SCCharts
18 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (8) SCCharts KIELER Compiler Usage & Tests Applications
normalization
Updates on SCCharts
19 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO (9) SCCharts KIELER Compiler Usage & Tests Applications
SCG transformation
Updates on SCCha
20 Christian Motika, Steven Smyth SYNCHRON '15
Compiling ALDO SCCharts KIELER Compiler Usage & Tests Applications
Demo
21 Christian Motika, Steven Smyth SYNCHRON '15
Usage SCCharts KIELER Compiler Usage & Tests Applications
KiCo.UI
Kieler Compiler (KiCo) 2.0
EObject EObject EObject
Processor
Transformation
uses KiCo by
calling
EObject KiCo.compile(EObject, ID1, ID2)
registers
consists of
Feature
registers
registers
expands
produces
not handles
Feature Selection
Auto Selection Visual Feedback
Compile Chains
Auto Selection On/Off
Different Views
Select All / Expand All
22 Christian Motika, Steven Smyth SYNCHRON '15
Usage (2) SCCharts KIELER Compiler Usage & Tests Applications
EObject KiCo.compile(EObject, ID1, ID2)
Kieler Compiler (KiCo) 2.0
EObject EObject EObject
Processor
Transformation
uses KiCo by
calling
registers
consists of
Feature
registers
registers
expands
produces
not handles
KiCo.Server 1. Read request 2. Parse Model 3. Call KiCo.compile()
4. Serialize result 5. Send back result
External Application
Web Browser
HTTP request / respond
HTTP Protocol
Updates on SCCha
23 Christian Motika, Steven Smyth SYNCHRON '15
Usage (3) SCCharts KIELER Compiler Usage & Tests Applications
Updates on SCCha
24 Christian Motika, Steven Smyth SYNCHRON '15
Usage Demo SCCharts KIELER Compiler Usage & Tests Applications
Updates on SCCha
25 Christian Motika, Steven Smyth SYNCHRON '15
Regression Tests SCCharts KIELER Compiler Usage & Tests Applications
26 Christian Motika, Steven Smyth SYNCHRON '15
Applications SCCharts KIELER Compiler Usage & Tests Applications
ABROINO: ABRO SCChart running on Arduino, Dec 2014
27 Christian Motika, Steven Smyth SYNCHRON '15
More Applications… SCCharts KIELER Compiler Usage & Tests Applications
Some more student projects…
Prox
28 Christian Motika, Steven Smyth SYNCHRON '15
Proxy States
Proxy state within the Railway project
Proxy state within the Mindstorms project
Application models often contained proxy states that • accumulate equations • and were left immediately
SCCharts KIELER Compiler Usage & Tests Applications
Prox
29 Christian Motika, Steven Smyth SYNCHRON '15
Proxy States
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!
Application models often contained proxy states that • accumulate equations • and were left immediately
Proxy state within the Mindstorms project
SCCharts KIELER Compiler Usage & Tests Applications
Updates on SCCharts
30 Christian Motika, Steven Smyth SYNCHRON '15
Recall SCCharts
SCCharts = SyncCharts Syntax + Sequential Constructive Semantics
Interface declaration
Final state
Connector
Initial state
Root state
Named simple state
Transition trigger/effect
Region ID
Transition priority
Conditional termination
Anonymous simple state
Entry/During/Exit actions
Termination
Superstate
Signal
Immediate transition
Strong abort
Local declaration
Weak abort
Deferred transition
Count delay
Pre operator
Initialization
Complex final state
Core-SCCharts Small set of simple features ease down stream compilation
Extended-SCCharts Rich set of advanced features ease modeling
Suspension
1: y > -10
3 History transition
2: x <= 0
1: y > 0
SCCharts KIELER Compiler Usage & Tests Applications
Prox
31 Christian Motika, Steven Smyth SYNCHRON '15
Dataflow Regions Add dataflow regions as Extended SCCharts feature
Simple equation example
Simple input/output example
Node example
SCCharts KIELER Compiler Usage & Tests Applications
Prox
32 Christian Motika, Steven Smyth SYNCHRON '15
Dataflow 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
SCCharts KIELER Compiler Usage & Tests Applications
Prox
33 Christian Motika, Steven Smyth SYNCHRON '15
Dataflow Regions Dataflow regions and control-flow regions co-exist
Hybrid SCCharts example
SCCharts KIELER Compiler Usage & Tests Applications
Prox
34 Christian Motika, Steven Smyth SYNCHRON '15
Dataflow Transformation Several approaches a possible to transform the extended feature
Transform single pass evaluation with initial and final state
Transform frequent evaluation
Initialize-Update-Read protocol
Minimal example Transform single pass evaluation with concurrent regions
Transform frequent evaluation
SCCharts KIELER Compiler Usage & Tests Applications
35 Christian Motika, Steven Smyth SYNCHRON '15
Applications SCCharts KIELER Compiler Usage & Tests Applications
STATES: • 1,628 modeled • 135,000 expanded
SCCharts Model Railway Controller Project 2014
36 Christian Motika, Steven Smyth SYNCHRON '15
Applications (3) SCCharts KIELER Compiler Usage & Tests Applications
SCCharts Quadrocopter Project 2015
(before the crash)
37 Christian Motika, Steven Smyth SYNCHRON '15
Applications (4) SCCharts KIELER Compiler Usage & Tests Applications
(before the crash)
SCCharts Lego Mindstorms® Project 2014
38 Christian Motika, Steven Smyth SYNCHRON '15
To Go Further SCCharts KIELER Compiler Usage & Tests Applications
CHARLES ANDRÉ. Semantics of SyncCharts, 2003.
GÉRARD BERRY. The Esterel v5 Language Primer, 2000.
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.
MOTIKA, C., SMYTH, S., AND VON HANXLEDEN, R. Compiling SCCharts – A Case-Study on Interactive Model-Based Compilation. 6th International Symposium On Leveraging Applications of Formal Methods, Verification (ISoLA’14), Corfu, Oct 2014.
39 Christian Motika, Steven Smyth SYNCHRON '15
That’s all Folks - Thank You! SCCharts KIELER Compiler Usage & Tests Applications
BAK 1 Christian Motika, Steven Smyth SYNCHRON '15
Traditional vs. Interactive SLIC SCCharts KIELER Compiler Usage & Tests Applications
Compiler Textual
Modeling
Modeled Diagram
(Intermediate) Transformed
Diagram / Code Select
Transformation
vs.
BAK 2 Christian Motika, Steven Smyth SYNCHRON '15
Traditional vs. Interactive SLIC SCCharts KIELER Compiler Usage & Tests Applications
BAK 3 Christian Motika, Steven Smyth SYNCHRON '15
SCCharts Modeling User Story SCCharts KIELER Compiler Usage & Tests Applications
1. Edit SCT code
2. Select transformations
4. Adjust layout 3. Inspect original + transformed SCChart
Textual Entry Visual Browsing Layout Control
Interactive Compilation Control
BAK 4 Christian Motika, Steven Smyth SYNCHRON '15
Mapping SCCharts to SCG SCCharts KIELER Compiler Usage & Tests Applications
BAK 5 Christian Motika, Steven Smyth SYNCHRON '15
KiCo Selection Algorithm SCCharts KIELER Compiler Usage & Tests Applications
BAK 6 Christian Motika, Steven Smyth SYNCHRON '15
Test File Creation (ESO) SCCharts KIELER Compiler Usage & Tests Applications
BAK 7 Christian Motika, Steven Smyth SYNCHRON '15
Model Railway Track Scheme SCCharts KIELER Compiler Usage & Tests Applications
BAK 8 Christian Motika, Steven Smyth SYNCHRON '15
SCCharts Meta Model SCCharts KIELER Compiler Usage & Tests Applications