Changes for page Examples (sct)

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

From version 10.1
edited by cmot
on 2014/07/06 23:06
Change comment: There is no comment for this version
To version 16.1
edited by cmot
on 2023/07/06 14:36
Change comment: Renamed back-links.

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Examples
1 +Examples (sct)
Parent
... ... @@ -1,0 +1,1 @@
1 +SCCharts (pre 1\.0)
Content
... ... @@ -1,13 +1,14 @@
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]]
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:KIELER.Home.SCCharts.Previous Versions (Deprecated Documentation).SCCharts (pre 1\.0).Command Line Compiler.WebHome]](%%) [[image:attach:SCCharts (pre 1.0)@quickstart.png]][[doc:Quick Start Guide (pre 0\.13)]]
2 2  
3 3  = SCCharts Examples =
4 4  
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.
5 +A few SCCharts examples...
6 6  
7 +(% class="wrapped" %)
7 7  |=(((
8 8  Example
9 9  )))|=(((
10 -
11 +\\
11 11  )))|=(((
12 12  SCChart  (Graphical)
13 13  )))|=(% colspan="1" %)(% colspan="1" %)
... ... @@ -16,16 +16,175 @@
16 16  )))
17 17  |(% colspan="1" %)(% colspan="1" %)
18 18  (((
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:KIELER.Home.SCCharts.Previous Versions (Deprecated Documentation).SCCharts (pre 1\.0).WebHome]] and [[known limitations>>doc:KIELER.Home.SCCharts.Previous Versions (Deprecated Documentation).SCCharts (pre 1\.0).WebHome]]. You may use our [[online compiler>>doc:Online Compiler]] or the [[command line compiler >>doc:KIELER.Home.SCCharts.Previous Versions (Deprecated Documentation).SCCharts (pre 1\.0).Command Line Compiler.WebHome]]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 +(((
19 19  = shifter3 =
20 20  )))|(% colspan="1" %)(% colspan="1" %)
21 21  (((
22 -
177 +\\
23 23  )))|(% colspan="1" %)(% colspan="1" %)
24 24  (((
180 +(% class="content-wrapper" %)
181 +(((
25 25  [[image:attach:PLDI'14 Artifact on SCCharts@shifter3.png]]
183 +)))
26 26  )))|(% colspan="1" %)(% colspan="1" %)
27 27  (((
28 -{{code title="shifter3.sct"}}
186 +(% class="content-wrapper" %)
187 +(((
188 +{{code language="sct" title="shifter3.sct"}}
29 29  scchart shifter3 {
30 30   input signal int I = 1;
31 31   signal int S0;
... ... @@ -43,15 +43,21 @@
43 43  }
44 44  {{/code}}
45 45  )))
206 +)))
46 46  |(((
47 47  = reincarnation =
48 48  )))|(((
49 -
210 +\\
50 50  )))|(((
212 +(% class="content-wrapper" %)
213 +(((
51 51  [[image:attach:PLDI'14 Artifact on SCCharts@reincarnation.png]]
215 +)))
52 52  )))|(% colspan="1" %)(% colspan="1" %)
53 53  (((
54 -{{code title="reincarnation.sct"}}
218 +(% class="content-wrapper" %)
219 +(((
220 +{{code language="sct" title="reincarnation.sct"}}
55 55  scchart reincarnation {
56 56   input signal A;
57 57   output signal gotS;
... ... @@ -73,15 +73,21 @@
73 73  }
74 74  {{/code}}
75 75  )))
242 +)))
76 76  |(((
77 77  = cabin =
78 78  )))|(((
79 -
246 +\\
80 80  )))|(((
248 +(% class="content-wrapper" %)
249 +(((
81 81  [[image:attach:PLDI'14 Artifact on SCCharts@cabin.png]]
251 +)))
82 82  )))|(% colspan="1" %)(% colspan="1" %)
83 83  (((
84 -{{code title="cabin.sct"}}
254 +(% class="content-wrapper" %)
255 +(((
256 +{{code language="sct" title="cabin.sct"}}
85 85  scchart Cabin {
86 86   input signal Stop;
87 87   input signal CabinStopped;
... ... @@ -121,15 +121,21 @@
121 121  }
122 122  {{/code}}
123 123  )))
296 +)))
124 124  |(((
125 125  = reactor control =
126 126  )))|(((
127 -
300 +\\
128 128  )))|(((
302 +(% class="content-wrapper" %)
303 +(((
129 129  [[image:attach:PLDI'14 Artifact on SCCharts@reactor-control.png]]
305 +)))
130 130  )))|(% colspan="1" %)(% colspan="1" %)
131 131  (((
132 -{{code title="reactor-control.sct"}}
308 +(% class="content-wrapper" %)
309 +(((
310 +{{code language="sct" title="reactor-control.sct"}}
133 133  scchart Module_ReactorControl {
134 134   output signal PullOutRods;
135 135   output signal PushInRods;
... ... @@ -177,3 +177,4 @@
177 177  }
178 178  {{/code}}
179 179  )))
358 +)))
abo.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +70.8 KB
Content
clock2h.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +51.3 KB
Content
delay.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +31.9 KB
Content
emitter.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.XWikiGuest
Size
... ... @@ -1,0 +1,1 @@
1 +28.3 KB
Content
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -9471668
1 +9471341
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9471668/Examples
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9471341/Examples (sct)