Changes for page Examples (sct)

Last modified by Alexander Schulz-Rosengarten on 2023/09/11 16:17

From version 14.1
edited by Alexander Schulz-Rosengarten
on 2019/01/15 08:47
Change comment: There is no comment for this version
To version 11.1
edited by Alexander Schulz-Rosengarten
on 2014/08/13 11:21
Change comment: Activated SCCharts code highlighting

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Examples (sct)
1 +Examples
Parent
... ... @@ -1,1 +1,0 @@
1 -SCCharts (pre 1\.0)
Content
... ... @@ -1,14 +1,13 @@
1 -[[~[~[image:attach:SCCharts (pre 1.0)@download.png~]~]>>url:http://rtsys.informatik.uni-kiel.de/confluence/display/KIELER/SCCharts#SCCharts-Downloads||shape="rect"]] [[~[~[image:attach:SCCharts (pre 1.0)@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 (pre 1.0)@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...
5 +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.
6 6  
7 -(% class="wrapped" %)
8 8  |=(((
9 9  Example
10 10  )))|=(((
11 -\\
10 +
12 12  )))|=(((
13 13  SCChart  (Graphical)
14 14  )))|=(% colspan="1" %)(% colspan="1" %)
... ... @@ -17,175 +17,16 @@
17 17  )))
18 18  |(% colspan="1" %)(% colspan="1" %)
19 19  (((
20 -= ABO =
21 -)))|(% colspan="1" %)(% colspan="1" %)
22 -(((
23 -\\
24 -)))|(% colspan="1" %)(% colspan="1" %)
25 -(((
26 -(% class="content-wrapper" %)
27 -(((
28 -[[image:attach:abo.png]]
29 -)))
30 -)))|(% colspan="1" %)(% colspan="1" %)
31 -(((
32 -(% class="content-wrapper" %)
33 -(((
34 -{{code title="ABO.sct"}}
35 -@VHLayout
36 -scchart ABO {
37 - input output bool A;
38 - input output bool B;
39 - output bool O1;
40 - output bool O2;
41 - region:
42 -
43 - initial state Init
44 - --> WaitAB immediate with / O1 = false; O2 = false;
45 - state WaitAB {
46 - region HandleA:
47 - initial state WaitA
48 - --> DoneA immediate with A / B = true; O1 = true;
49 - final state DoneA;
50 - region HandleB:
51 - initial state WaitB
52 - --> DoneB with B / O1 = true;
53 - final state DoneB;
54 - }
55 - >-> GotAB with / O1 = false; O2 = true;
56 - state GotAB;
57 -}
58 -{{/code}}
59 -)))
60 -)))
61 -|(% colspan="1" %)(% colspan="1" %)
62 -(((
63 -= clock =
64 -
65 -(Referenced SCCharts Example)
66 -
67 -**To enable the referenced SCCharts feature,**
68 -
69 -**activate the Xtext nature for your project!**
70 -)))|(% colspan="1" %)(% colspan="1" %)
71 -(((
72 -\\
73 -)))|(% colspan="1" %)(% colspan="1" %)
74 -(((
75 -(% class="content-wrapper" %)
76 -(((
77 -[[image:attach:delay.png]]
78 -
79 -[[image:attach:emitter.png]]
80 -
81 -[[image:attach:clock2h.png]]
82 -)))
83 -)))|(% colspan="1" %)(% colspan="1" %)
84 -(((
85 -(% class="content-wrapper" %)
86 -(((
87 -{{code language="sct" title="shifter3.sct"}}
88 -scchart delay {
89 - input int ticksToWait;
90 - input bool clock;
91 - int counter = 0;
92 - initial state init
93 - --> done immediate with
94 - counter >= ticksToWait
95 - --> init with
96 - clock / counter = counter + 1;
97 - final state done;
98 -}
99 -{{/code}}
100 -
101 -{{code language="sct" title="shifter3.sct"}}
102 -scchart emitter {
103 - input bool clock;
104 - input bool delay;
105 - output bool emit = false;
106 - initial state wait
107 - references delay
108 - bind clock to clock,
109 - ticksToWait to delay
110 - >-> emit;
111 -
112 - state emit {
113 - entry / emit = true;
114 - exit / emit = false;
115 - }
116 - --> wait;
117 -}
118 -{{/code}}
119 -
120 -{{code language="sct" title="shifter3.sct"}}
121 -scchart clock {
122 - input bool msClock;
123 - output bool second;
124 - output bool minute;
125 - output bool hour;
126 - const int SEC = 1000;
127 - const int MIN = 60;
128 - const int HOUR = 60;
129 - region seconds:
130 - initial state seconds
131 - references emitter
132 - bind clock to msClock,
133 - metrum to SEC,
134 - emit to second
135 - >-> seconds;
136 -
137 - region minutes:
138 - initial state minutes
139 - references emitter
140 - bind clock to second,
141 - metrum to MIN,
142 - emit to minute
143 - >-> minutes;
144 -
145 - region hours:
146 - initial state hours
147 - references emitter
148 - bind clock to minute,
149 - metrum to HOUR,
150 - emit to hour
151 - >-> hours;
152 -}
153 -{{/code}}
154 -)))
155 -)))
156 -
157 -= SCCharts Evaluation Examples =
158 -
159 -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 (pre 1\.0)]] and [[known limitations>>doc:SCCharts (pre 1\.0)]]. 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.
160 -
161 -(% class="wrapped" %)
162 -|=(((
163 -Example
164 -)))|=(((
165 -\\
166 -)))|=(((
167 -SCChart  (Graphical)
168 -)))|=(% colspan="1" %)(% colspan="1" %)
169 -(((
170 -SCChart (Textual SCT)
171 -)))
172 -|(% colspan="1" %)(% colspan="1" %)
173 -(((
174 174  = shifter3 =
175 175  )))|(% colspan="1" %)(% colspan="1" %)
176 176  (((
177 -\\
22 +
178 178  )))|(% colspan="1" %)(% colspan="1" %)
179 179  (((
180 -(% class="content-wrapper" %)
181 -(((
182 182  [[image:attach:PLDI'14 Artifact on SCCharts@shifter3.png]]
183 -)))
184 184  )))|(% colspan="1" %)(% colspan="1" %)
185 185  (((
186 -(% class="content-wrapper" %)
187 -(((
188 -{{code language="sct" title="shifter3.sct"}}
28 +{{code title="shifter3.sct" language="sct"}}
189 189  scchart shifter3 {
190 190   input signal int I = 1;
191 191   signal int S0;
... ... @@ -203,21 +203,15 @@
203 203  }
204 204  {{/code}}
205 205  )))
206 -)))
207 207  |(((
208 208  = reincarnation =
209 209  )))|(((
210 -\\
49 +
211 211  )))|(((
212 -(% class="content-wrapper" %)
213 -(((
214 214  [[image:attach:PLDI'14 Artifact on SCCharts@reincarnation.png]]
215 -)))
216 216  )))|(% colspan="1" %)(% colspan="1" %)
217 217  (((
218 -(% class="content-wrapper" %)
219 -(((
220 -{{code language="sct" title="reincarnation.sct"}}
54 +{{code title="reincarnation.sct" language="sct"}}
221 221  scchart reincarnation {
222 222   input signal A;
223 223   output signal gotS;
... ... @@ -239,21 +239,15 @@
239 239  }
240 240  {{/code}}
241 241  )))
242 -)))
243 243  |(((
244 244  = cabin =
245 245  )))|(((
246 -\\
79 +
247 247  )))|(((
248 -(% class="content-wrapper" %)
249 -(((
250 250  [[image:attach:PLDI'14 Artifact on SCCharts@cabin.png]]
251 -)))
252 252  )))|(% colspan="1" %)(% colspan="1" %)
253 253  (((
254 -(% class="content-wrapper" %)
255 -(((
256 -{{code language="sct" title="cabin.sct"}}
84 +{{code title="cabin.sct" language="sct"}}
257 257  scchart Cabin {
258 258   input signal Stop;
259 259   input signal CabinStopped;
... ... @@ -293,21 +293,15 @@
293 293  }
294 294  {{/code}}
295 295  )))
296 -)))
297 297  |(((
298 298  = reactor control =
299 299  )))|(((
300 -\\
127 +
301 301  )))|(((
302 -(% class="content-wrapper" %)
303 -(((
304 304  [[image:attach:PLDI'14 Artifact on SCCharts@reactor-control.png]]
305 -)))
306 306  )))|(% colspan="1" %)(% colspan="1" %)
307 307  (((
308 -(% class="content-wrapper" %)
309 -(((
310 -{{code language="sct" title="reactor-control.sct"}}
132 +{{code title="reactor-control.sct" language="sct"}}
311 311  scchart Module_ReactorControl {
312 312   output signal PullOutRods;
313 313   output signal PushInRods;
... ... @@ -355,4 +355,3 @@
355 355  }
356 356  {{/code}}
357 357  )))
358 -)))
abo.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -70.8 KB
Content
clock2h.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -51.3 KB
Content
delay.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -31.9 KB
Content
emitter.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.XWikiGuest
Size
... ... @@ -1,1 +1,0 @@
1 -28.3 KB
Content
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9471341
1 +12288417
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9471341/Examples (sct)
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/12288417/Examples