Changes for page Examples (sct)

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

From version 12.1
edited by ssm
on 2015/06/23 16:55
Change comment: There is no comment for this version
To version 9.1
edited by cmot
on 2014/06/28 13:48
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.ssm
1 +XWiki.cmot
Content
... ... @@ -1,111 +3,5 @@
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 -
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 -= clock =
20 -
21 -(Referenced SCCharts Example)
22 -
23 -**To enable the referenced SCCharts feature,**
24 -
25 -**activate the Xtext nature for your project!**
26 -)))|(% colspan="1" %)(% colspan="1" %)
27 -(((
28 -
29 -)))|(% colspan="1" %)(% colspan="1" %)
30 -(((
31 -[[image:attach:delay.png]]
32 -
33 -[[image:attach:emitter.png]]
34 -
35 -[[image:attach:clock2h.png]]
36 -)))|(% colspan="1" %)(% colspan="1" %)
37 -(((
38 -{{code title="shifter3.sct" language="sct"}}
39 -scchart delay {
40 - input int ticksToWait;
41 - input bool clock;
42 - int counter = 0;
43 - initial state init
44 - --> done immediate with
45 - counter >= ticksToWait
46 - --> init with
47 - clock / counter = counter + 1;
48 - final state done;
49 -}
50 -{{/code}}
51 -
52 -{{code title="shifter3.sct" language="sct"}}
53 -scchart emitter {
54 - input bool clock;
55 - input bool delay;
56 - output bool emit = false;
57 - initial state wait
58 - references delay
59 - bind clock to clock,
60 - ticksToWait to delay
61 - >-> emit;
62 -
63 - state emit {
64 - entry / emit = true;
65 - exit / emit = false;
66 - }
67 - --> wait;
68 -}
69 -{{/code}}
70 -
71 -{{code title="shifter3.sct" language="sct"}}
72 -scchart clock {
73 - input bool msClock;
74 - output bool second;
75 - output bool minute;
76 - output bool hour;
77 - const int SEC = 1000;
78 - const int MIN = 60;
79 - const int HOUR = 60;
80 - region seconds:
81 - initial state seconds
82 - references emitter
83 - bind clock to msClock,
84 - metrum to SEC,
85 - emit to second
86 - >-> seconds;
87 -
88 - region minutes:
89 - initial state minutes
90 - references emitter
91 - bind clock to second,
92 - metrum to MIN,
93 - emit to minute
94 - >-> minutes;
95 -
96 - region hours:
97 - initial state hours
98 - references emitter
99 - bind clock to minute,
100 - metrum to HOUR,
101 - emit to hour
102 - >-> hours;
103 -}
104 -{{/code}}
105 -)))
106 -
107 -= SCCharts Evaluation Examples =
108 -
109 109  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.
110 110  
111 111  |=(((
... ... @@ -129,7 +129,7 @@
129 129  [[image:attach:PLDI'14 Artifact on SCCharts@shifter3.png]]
130 130  )))|(% colspan="1" %)(% colspan="1" %)
131 131  (((
132 -{{code title="shifter3.sct" language="sct"}}
26 +{{code title="shifter3.sct"}}
133 133  scchart shifter3 {
134 134   input signal int I = 1;
135 135   signal int S0;
... ... @@ -155,7 +155,7 @@
155 155  [[image:attach:PLDI'14 Artifact on SCCharts@reincarnation.png]]
156 156  )))|(% colspan="1" %)(% colspan="1" %)
157 157  (((
158 -{{code title="reincarnation.sct" language="sct"}}
52 +{{code title="reincarnation.sct"}}
159 159  scchart reincarnation {
160 160   input signal A;
161 161   output signal gotS;
... ... @@ -185,7 +185,7 @@
185 185  [[image:attach:PLDI'14 Artifact on SCCharts@cabin.png]]
186 186  )))|(% colspan="1" %)(% colspan="1" %)
187 187  (((
188 -{{code title="cabin.sct" language="sct"}}
82 +{{code title="cabin.sct"}}
189 189  scchart Cabin {
190 190   input signal Stop;
191 191   input signal CabinStopped;
... ... @@ -233,7 +233,7 @@
233 233  [[image:attach:PLDI'14 Artifact on SCCharts@reactor-control.png]]
234 234  )))|(% colspan="1" %)(% colspan="1" %)
235 235  (((
236 -{{code title="reactor-control.sct" language="sct"}}
130 +{{code title="reactor-control.sct"}}
237 237  scchart Module_ReactorControl {
238 238   output signal PullOutRods;
239 239   output signal PushInRods;
Confluence.Code.ConfluencePageClass[0]
Id
... ... @@ -1,1 +1,1 @@
1 -16810196
1 +9471500
URL
... ... @@ -1,1 +1,1 @@
1 -https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/16810196/Examples
1 +https://rtsys.informatik.uni-kiel.de/confluence//wiki/spaces/KIELER/pages/9471500/Examples