Changes for page Examples (sct)
on 2016/04/18 15:24
on 2014/08/13 11:21
Summary
-
Page properties (2 modified, 0 added, 0 removed)
-
Objects (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki.s sm1 +XWiki.als - Content
-
... ... @@ -1,148 +1,7 @@ 1 -[[~[~[image:attach:SCCharts@download.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/SCCharts#SCCharts-Downloads||shape="rect"]] [[~[~[image:attach:SCCharts@onlinecompiler.png~]~]>>url:http://www.sccharts.com||shape="rect"]] (% class="confluence-link" %)[[image:attach:Command Line Compiler@commandlinecompiler2.png]][[doc:Command Line Compiler]](%%) [[image:attach:SCCharts@quickstart.png]][[doc:Quick Start Guide (pre 0\.13)]]1 +[[~[~[image:attach:SCCharts@download.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/SCCharts#SCCharts-Downloads||shape="rect"]] [[~[~[image:attach:SCCharts@onlinecompiler.png~]~]>>url:http://www.sccharts.com||shape="rect"]] (% class="confluence-link" %)[[image:attach:Command Line Compiler@commandlinecompiler2.png]][[doc:Command Line Compiler]](%%) [[image:attach:SCCharts@quickstart.png]][[doc:Quick Start Guide]] 2 2 3 3 = SCCharts Examples = 4 4 5 -A few SCCharts examples... 6 - 7 -|=((( 8 -Example 9 -)))|=((( 10 - 11 -)))|=((( 12 -SCChart (Graphical) 13 -)))|=(% colspan="1" %)(% colspan="1" %) 14 -((( 15 -SCChart (Textual SCT) 16 -))) 17 -|(% colspan="1" %)(% colspan="1" %) 18 -((( 19 -= ABO = 20 -)))|(% colspan="1" %)(% colspan="1" %) 21 -((( 22 - 23 -)))|(% colspan="1" %)(% colspan="1" %) 24 -((( 25 -[[image:attach:abo.png]] 26 -)))|(% colspan="1" %)(% colspan="1" %) 27 -((( 28 -{{code title="ABO.sct"}} 29 -@VHLayout 30 -scchart ABO { 31 - input output bool A; 32 - input output bool B; 33 - output bool O1; 34 - output bool O2; 35 - region: 36 - 37 - initial state Init 38 - --> WaitAB immediate with / O1 = false; O2 = false; 39 - state WaitAB { 40 - region HandleA: 41 - initial state WaitA 42 - --> DoneA immediate with A / B = true; O1 = true; 43 - final state DoneA; 44 - region HandleB: 45 - initial state WaitB 46 - --> DoneB with B / O1 = true; 47 - final state DoneB; 48 - } 49 - >-> GotAB with / O1 = false; O2 = true; 50 - state GotAB; 51 -} 52 -{{/code}} 53 -))) 54 -|(% colspan="1" %)(% colspan="1" %) 55 -((( 56 -= clock = 57 - 58 -(Referenced SCCharts Example) 59 - 60 -**To enable the referenced SCCharts feature,** 61 - 62 -**activate the Xtext nature for your project!** 63 -)))|(% colspan="1" %)(% colspan="1" %) 64 -((( 65 - 66 -)))|(% colspan="1" %)(% colspan="1" %) 67 -((( 68 -[[image:attach:delay.png]] 69 - 70 -[[image:attach:emitter.png]] 71 - 72 -[[image:attach:clock2h.png]] 73 -)))|(% colspan="1" %)(% colspan="1" %) 74 -((( 75 -{{code language="sct" title="shifter3.sct"}} 76 -scchart delay { 77 - input int ticksToWait; 78 - input bool clock; 79 - int counter = 0; 80 - initial state init 81 - --> done immediate with 82 - counter >= ticksToWait 83 - --> init with 84 - clock / counter = counter + 1; 85 - final state done; 86 -} 87 -{{/code}} 88 - 89 -{{code language="sct" title="shifter3.sct"}} 90 -scchart emitter { 91 - input bool clock; 92 - input bool delay; 93 - output bool emit = false; 94 - initial state wait 95 - references delay 96 - bind clock to clock, 97 - ticksToWait to delay 98 - >-> emit; 99 - 100 - state emit { 101 - entry / emit = true; 102 - exit / emit = false; 103 - } 104 - --> wait; 105 -} 106 -{{/code}} 107 - 108 -{{code language="sct" title="shifter3.sct"}} 109 -scchart clock { 110 - input bool msClock; 111 - output bool second; 112 - output bool minute; 113 - output bool hour; 114 - const int SEC = 1000; 115 - const int MIN = 60; 116 - const int HOUR = 60; 117 - region seconds: 118 - initial state seconds 119 - references emitter 120 - bind clock to msClock, 121 - metrum to SEC, 122 - emit to second 123 - >-> seconds; 124 - 125 - region minutes: 126 - initial state minutes 127 - references emitter 128 - bind clock to second, 129 - metrum to MIN, 130 - emit to minute 131 - >-> minutes; 132 - 133 - region hours: 134 - initial state hours 135 - references emitter 136 - bind clock to minute, 137 - metrum to HOUR, 138 - emit to hour 139 - >-> hours; 140 -} 141 -{{/code}} 142 -))) 143 - 144 -= SCCharts Evaluation Examples = 145 - 146 146 In the following, you find some examples used for evaluation. Be advised that there currently is no tool integrated evaluation possible. Please refer to the SCCharts superpage for the [[project status>>doc:SCCharts]] and [[known limitations>>doc:SCCharts]]. You may use our [[online compiler>>doc:Online Compiler]] or the [[command line compiler >>doc:Command Line Compiler]]to play around with the following SCCharts. On the right side you'll find the textual SCChart (SCT) description, on the left side you see the equivalent synthesized SCChart diagram for it. You can use our [[online SCChart synthesis>>doc:Command Line Rendering]] for rendering SCCharts diagrams from textual SCCharts descriptions. 147 147 148 148 |=((( ... ... @@ -166,7 +166,7 @@ 166 166 [[image:attach:PLDI'14 Artifact on SCCharts@shifter3.png]] 167 167 )))|(% colspan="1" %)(% colspan="1" %) 168 168 ((( 169 -{{code language="sct" title="shifter3.sct"}}28 +{{code title="shifter3.sct" language="sct"}} 170 170 scchart shifter3 { 171 171 input signal int I = 1; 172 172 signal int S0; ... ... @@ -192,7 +192,7 @@ 192 192 [[image:attach:PLDI'14 Artifact on SCCharts@reincarnation.png]] 193 193 )))|(% colspan="1" %)(% colspan="1" %) 194 194 ((( 195 -{{code language="sct" title="reincarnation.sct"}}54 +{{code title="reincarnation.sct" language="sct"}} 196 196 scchart reincarnation { 197 197 input signal A; 198 198 output signal gotS; ... ... @@ -222,7 +222,7 @@ 222 222 [[image:attach:PLDI'14 Artifact on SCCharts@cabin.png]] 223 223 )))|(% colspan="1" %)(% colspan="1" %) 224 224 ((( 225 -{{code language="sct" title="cabin.sct"}}84 +{{code title="cabin.sct" language="sct"}} 226 226 scchart Cabin { 227 227 input signal Stop; 228 228 input signal CabinStopped; ... ... @@ -270,7 +270,7 @@ 270 270 [[image:attach:PLDI'14 Artifact on SCCharts@reactor-control.png]] 271 271 )))|(% colspan="1" %)(% colspan="1" %) 272 272 ((( 273 -{{code language="sct" title="reactor-control.sct"}}132 +{{code title="reactor-control.sct" language="sct"}} 274 274 scchart Module_ReactorControl { 275 275 output signal PullOutRods; 276 276 output signal PushInRods;
- Confluence.Code.ConfluencePageClass[0]
-
- Id
-
... ... @@ -1,1 +1,1 @@ 1 - 527237921 +12288417 - URL
-
... ... @@ -1,1 +1,1 @@ 1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/ 52723792/Examples1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/12288417/Examples