• R/O
  • HTTP
  • SSH
  • HTTPS

tutorial: Commit

This repository is for tutorials of Eos.


Commit MetaInfo

Revisionf3a52c70cb905e2fcb1e655dcc11002822a743f1 (tree)
Time2014-12-01 09:44:38
Authorkinoshita-eos <kinoshita@yasu...>
Commiterkinoshita-eos

Log Message

Add: tutorial for PIONE-PNML about if-statement.
new file: SampleCode/PIONE-PNML/Basic5/Serial5.md
new file: SampleCode/PIONE-PNML/Basic5/Serial5.pnml
new file: SampleCode/PIONE-PNML/Basic5/SerialInput/test1.in
new file: SampleCode/PIONE-PNML/Basic5/SerialInput/test2.in
new file: SampleCode/PIONE-PNML/Basic5/SerialInput/test3.in
new file: SampleCode/PIONE-PNML/Basic5/SerialInput/test4.in
new file: SampleCode/PIONE-PNML/Basic5/SerialInput/test5.in

Change Summary

Incremental Difference

--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/Serial5.md
@@ -0,0 +1,15 @@
1+# Serial2.pione
2+
3+## First
4+Multiply 2 to all input data.
5+
6+```
7+awk '{print $1*2}' {$I[1]} > {$O[1]}
8+```
9+
10+## Second
11+Add 1 to all input data.
12+
13+```
14+awk '{print $1+1}' {$I[1]} > {$O[1]}
15+```
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/Serial5.pnml
@@ -0,0 +1,352 @@
1+<?xml version="1.0" encoding="UTF-8"?>
2+<!--PLEASE DO NOT EDIT THIS FILE
3+Created with Workflow PetriNet Designer Version 3.2.0 (woped.org)-->
4+<pnml>
5+ <net type="http://www.informatik.hu-berlin.de/top/pntd/ptNetb" id="noID">
6+ <place id="p1">
7+ <name>
8+ <text>&lt;'*.in'</text>
9+ <graphics>
10+ <offset x="10" y="120"/>
11+ </graphics>
12+ </name>
13+ <graphics>
14+ <position x="10" y="80"/>
15+ <dimension x="40" y="40"/>
16+ </graphics>
17+ </place>
18+ <place id="p3">
19+ <name>
20+ <text>'{$*}.out'</text>
21+ <graphics>
22+ <offset x="400" y="160"/>
23+ </graphics>
24+ </name>
25+ <graphics>
26+ <position x="400" y="120"/>
27+ <dimension x="40" y="40"/>
28+ </graphics>
29+ </place>
30+ <place id="p5">
31+ <name>
32+ <text>'{$*}.out'</text>
33+ <graphics>
34+ <offset x="390" y="70"/>
35+ </graphics>
36+ </name>
37+ <graphics>
38+ <position x="400" y="30"/>
39+ <dimension x="40" y="40"/>
40+ </graphics>
41+ </place>
42+ <place id="p6">
43+ <name>
44+ <text>>'*.out'</text>
45+ <graphics>
46+ <offset x="540" y="120"/>
47+ </graphics>
48+ </name>
49+ <graphics>
50+ <position x="540" y="80"/>
51+ <dimension x="40" y="40"/>
52+ </graphics>
53+ </place>
54+ <place id="p7">
55+ <name>
56+ <text>$mode == 1</text>
57+ <graphics>
58+ <offset x="130" y="120"/>
59+ </graphics>
60+ </name>
61+ <graphics>
62+ <position x="130" y="80"/>
63+ <dimension x="40" y="40"/>
64+ </graphics>
65+ </place>
66+ <place id="p9">
67+ <name>
68+ <text/>
69+ <graphics>
70+ <offset x="270" y="70"/>
71+ </graphics>
72+ </name>
73+ <graphics>
74+ <position x="270" y="30"/>
75+ <dimension x="40" y="40"/>
76+ </graphics>
77+ </place>
78+ <place id="p10">
79+ <name>
80+ <text/>
81+ <graphics>
82+ <offset x="270" y="160"/>
83+ </graphics>
84+ </name>
85+ <graphics>
86+ <position x="270" y="120"/>
87+ <dimension x="40" y="40"/>
88+ </graphics>
89+ </place>
90+ <transition id="t4">
91+ <name>
92+ <text>then</text>
93+ <graphics>
94+ <offset x="210" y="70"/>
95+ </graphics>
96+ </name>
97+ <graphics>
98+ <position x="210" y="30"/>
99+ <dimension x="40" y="40"/>
100+ </graphics>
101+ <toolspecific tool="WoPeD" version="1.0">
102+ <time>0</time>
103+ <timeUnit>1</timeUnit>
104+ <orientation>1</orientation>
105+ </toolspecific>
106+ </transition>
107+ <transition id="t5">
108+ <name>
109+ <text>else</text>
110+ <graphics>
111+ <offset x="210" y="160"/>
112+ </graphics>
113+ </name>
114+ <graphics>
115+ <position x="210" y="120"/>
116+ <dimension x="40" y="40"/>
117+ </graphics>
118+ <toolspecific tool="WoPeD" version="1.0">
119+ <time>0</time>
120+ <timeUnit>1</timeUnit>
121+ <orientation>1</orientation>
122+ </toolspecific>
123+ </transition>
124+ <transition id="t7">
125+ <name>
126+ <text/>
127+ <graphics>
128+ <offset x="470" y="120"/>
129+ </graphics>
130+ </name>
131+ <graphics>
132+ <position x="470" y="80"/>
133+ <dimension x="40" y="40"/>
134+ </graphics>
135+ <toolspecific tool="WoPeD" version="1.0">
136+ <time>0</time>
137+ <timeUnit>1</timeUnit>
138+ <orientation>1</orientation>
139+ </toolspecific>
140+ </transition>
141+ <transition id="t1">
142+ <name>
143+ <text>First</text>
144+ <graphics>
145+ <offset x="330" y="70"/>
146+ </graphics>
147+ </name>
148+ <graphics>
149+ <position x="330" y="30"/>
150+ <dimension x="40" y="40"/>
151+ </graphics>
152+ <toolspecific tool="WoPeD" version="1.0">
153+ <time>0</time>
154+ <timeUnit>1</timeUnit>
155+ <orientation>1</orientation>
156+ </toolspecific>
157+ </transition>
158+ <transition id="t2">
159+ <name>
160+ <text>Second</text>
161+ <graphics>
162+ <offset x="330" y="160"/>
163+ </graphics>
164+ </name>
165+ <graphics>
166+ <position x="330" y="120"/>
167+ <dimension x="40" y="40"/>
168+ </graphics>
169+ <toolspecific tool="WoPeD" version="1.0">
170+ <time>0</time>
171+ <timeUnit>1</timeUnit>
172+ <orientation>1</orientation>
173+ </toolspecific>
174+ </transition>
175+ <transition id="t3">
176+ <name>
177+ <text>if</text>
178+ <graphics>
179+ <offset x="70" y="120"/>
180+ </graphics>
181+ </name>
182+ <graphics>
183+ <position x="70" y="80"/>
184+ <dimension x="40" y="40"/>
185+ </graphics>
186+ <toolspecific tool="WoPeD" version="1.0">
187+ <time>0</time>
188+ <timeUnit>1</timeUnit>
189+ <orientation>1</orientation>
190+ </toolspecific>
191+ </transition>
192+ <arc id="a11" source="p5" target="t7">
193+ <inscription>
194+ <text>1</text>
195+ </inscription>
196+ <graphics/>
197+ <toolspecific tool="WoPeD" version="1.0">
198+ <probability>1.0</probability>
199+ <displayProbabilityOn>false</displayProbabilityOn>
200+ <displayProbabilityPosition x="500.0" y="0.0"/>
201+ </toolspecific>
202+ </arc>
203+ <arc id="a10" source="p10" target="t2">
204+ <inscription>
205+ <text>1</text>
206+ </inscription>
207+ <graphics/>
208+ <toolspecific tool="WoPeD" version="1.0">
209+ <probability>1.0</probability>
210+ <displayProbabilityOn>false</displayProbabilityOn>
211+ <displayProbabilityPosition x="500.0" y="0.0"/>
212+ </toolspecific>
213+ </arc>
214+ <arc id="a13" source="t7" target="p6">
215+ <inscription>
216+ <text>1</text>
217+ </inscription>
218+ <graphics/>
219+ <toolspecific tool="WoPeD" version="1.0">
220+ <probability>1.0</probability>
221+ <displayProbabilityOn>false</displayProbabilityOn>
222+ <displayProbabilityPosition x="500.0" y="0.0"/>
223+ </toolspecific>
224+ </arc>
225+ <arc id="a12" source="p3" target="t7">
226+ <inscription>
227+ <text>1</text>
228+ </inscription>
229+ <graphics/>
230+ <toolspecific tool="WoPeD" version="1.0">
231+ <probability>1.0</probability>
232+ <displayProbabilityOn>false</displayProbabilityOn>
233+ <displayProbabilityPosition x="500.0" y="0.0"/>
234+ </toolspecific>
235+ </arc>
236+ <arc id="a15" source="t4" target="p9">
237+ <inscription>
238+ <text>1</text>
239+ </inscription>
240+ <graphics/>
241+ <toolspecific tool="WoPeD" version="1.0">
242+ <probability>1.0</probability>
243+ <displayProbabilityOn>false</displayProbabilityOn>
244+ <displayProbabilityPosition x="500.0" y="0.0"/>
245+ </toolspecific>
246+ </arc>
247+ <arc id="a17" source="t5" target="p10">
248+ <inscription>
249+ <text>1</text>
250+ </inscription>
251+ <graphics/>
252+ <toolspecific tool="WoPeD" version="1.0">
253+ <probability>1.0</probability>
254+ <displayProbabilityOn>false</displayProbabilityOn>
255+ <displayProbabilityPosition x="500.0" y="0.0"/>
256+ </toolspecific>
257+ </arc>
258+ <arc id="a16" source="p9" target="t1">
259+ <inscription>
260+ <text>1</text>
261+ </inscription>
262+ <graphics/>
263+ <toolspecific tool="WoPeD" version="1.0">
264+ <probability>1.0</probability>
265+ <displayProbabilityOn>false</displayProbabilityOn>
266+ <displayProbabilityPosition x="500.0" y="0.0"/>
267+ </toolspecific>
268+ </arc>
269+ <arc id="a1" source="p1" target="t3">
270+ <inscription>
271+ <text>1</text>
272+ </inscription>
273+ <graphics/>
274+ <toolspecific tool="WoPeD" version="1.0">
275+ <probability>1.0</probability>
276+ <displayProbabilityOn>false</displayProbabilityOn>
277+ <displayProbabilityPosition x="500.0" y="0.0"/>
278+ </toolspecific>
279+ </arc>
280+ <arc id="a3" source="t2" target="p3">
281+ <inscription>
282+ <text>1</text>
283+ </inscription>
284+ <graphics/>
285+ <toolspecific tool="WoPeD" version="1.0">
286+ <probability>1.0</probability>
287+ <displayProbabilityOn>false</displayProbabilityOn>
288+ <displayProbabilityPosition x="500.0" y="0.0"/>
289+ </toolspecific>
290+ </arc>
291+ <arc id="a4" source="t3" target="p7">
292+ <inscription>
293+ <text>1</text>
294+ </inscription>
295+ <graphics/>
296+ <toolspecific tool="WoPeD" version="1.0">
297+ <probability>1.0</probability>
298+ <displayProbabilityOn>false</displayProbabilityOn>
299+ <displayProbabilityPosition x="500.0" y="0.0"/>
300+ </toolspecific>
301+ </arc>
302+ <arc id="a5" source="p7" target="t4">
303+ <inscription>
304+ <text>1</text>
305+ </inscription>
306+ <graphics/>
307+ <toolspecific tool="WoPeD" version="1.0">
308+ <probability>1.0</probability>
309+ <displayProbabilityOn>false</displayProbabilityOn>
310+ <displayProbabilityPosition x="500.0" y="0.0"/>
311+ </toolspecific>
312+ </arc>
313+ <arc id="a8" source="p7" target="t5">
314+ <inscription>
315+ <text>1</text>
316+ </inscription>
317+ <graphics/>
318+ <toolspecific tool="WoPeD" version="1.0">
319+ <probability>1.0</probability>
320+ <displayProbabilityOn>false</displayProbabilityOn>
321+ <displayProbabilityPosition x="500.0" y="0.0"/>
322+ </toolspecific>
323+ </arc>
324+ <arc id="a9" source="t1" target="p5">
325+ <inscription>
326+ <text>1</text>
327+ </inscription>
328+ <graphics/>
329+ <toolspecific tool="WoPeD" version="1.0">
330+ <probability>1.0</probability>
331+ <displayProbabilityOn>false</displayProbabilityOn>
332+ <displayProbabilityPosition x="500.0" y="0.0"/>
333+ </toolspecific>
334+ </arc>
335+ <toolspecific tool="WoPeD" version="1.0">
336+ <bounds>
337+ <position x="11" y="33"/>
338+ <dimension x="755" y="474"/>
339+ </bounds>
340+ <scale>100</scale>
341+ <treeWidthRight>597</treeWidthRight>
342+ <overviewPanelVisible>true</overviewPanelVisible>
343+ <treeHeightOverview>100</treeHeightOverview>
344+ <treePanelVisible>true</treePanelVisible>
345+ <verticalLayout>false</verticalLayout>
346+ <resources/>
347+ <simulations/>
348+ <partnerLinks/>
349+ <variables/>
350+ </toolspecific>
351+ </net>
352+</pnml>
\ No newline at end of file
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/SerialInput/test1.in
@@ -0,0 +1,2 @@
1+3
2+5
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/SerialInput/test2.in
@@ -0,0 +1,2 @@
1+2
2+4
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/SerialInput/test3.in
@@ -0,0 +1,2 @@
1+7
2+1
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/SerialInput/test4.in
@@ -0,0 +1,3 @@
1+8
2+9
3+6
--- /dev/null
+++ b/SampleCode/PIONE-PNML/Basic5/SerialInput/test5.in
@@ -0,0 +1,9 @@
1+1
2+2
3+3
4+4
5+5
6+6
7+7
8+8
9+9
Show on old repository browser