~opaal-developers/opaal/trunk

« back to all changes in this revision

Viewing changes to tests/vikingtests/viking12.xml

  • Committer: Mads Chr. Olesen
  • Date: 2013-09-24 10:05:34 UTC
  • mfrom: (54.1.134 opaal-ltsmin-succgen)
  • Revision ID: launchpad@shiyee.dk-20130924100534-xg7ijz0sbdabnz36
Make the ltsmin gensuccgen branch the new trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.1//EN' 'http://www.it.uu.se/research/group/darts/uppaal/flat-1_1.dtd'><nta><declaration>chan take, release;               // Take and release torch
 
2
int L;          // The side the torch is on
 
3
clock time;             // Global time
 
4
clock y1;
 
5
clock y2;
 
6
clock y3;
 
7
clock y4;
 
8
clock y5;
 
9
clock y6;
 
10
clock y7;
 
11
clock y8;
 
12
clock y9;
 
13
clock y10;</declaration><template><name x="5" y="5">Viking1</name><location id="id0" x="288" y="80"></location><location id="id1" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id2" x="64" y="216"></location><location id="id3" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id3"/><transition><source ref="id2"/><target ref="id3"/><label kind="guard" x="72" y="176">y1 &gt;= 5</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id1"/><target ref="id2"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y1 = 0</label></transition><transition><source ref="id0"/><target ref="id1"/><label kind="guard" x="296" y="112">y1 &gt;= 5</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id3"/><target ref="id0"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y1 = 0</label></transition></template><template><name x="5" y="5">Viking2</name><location id="id4" x="288" y="80"></location><location id="id5" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id6" x="64" y="216"></location><location id="id7" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id7"/><transition><source ref="id6"/><target ref="id7"/><label kind="guard" x="72" y="176">y2 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id5"/><target ref="id6"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y2 = 0</label></transition><transition><source ref="id4"/><target ref="id5"/><label kind="guard" x="296" y="112">y2 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id7"/><target ref="id4"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y2 = 0</label></transition></template><template><name x="5" y="5">Viking3</name><location id="id8" x="288" y="80"></location><location id="id9" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id10" x="64" y="216"></location><location id="id11" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id11"/><transition><source ref="id10"/><target ref="id11"/><label kind="guard" x="72" y="176">y3 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id9"/><target ref="id10"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y3 = 0</label></transition><transition><source ref="id8"/><target ref="id9"/><label kind="guard" x="296" y="112">y3 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id11"/><target ref="id8"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y3 = 0</label></transition></template><template><name x="5" y="5">Viking4</name><location id="id12" x="64" y="216"></location><location id="id13" x="64" y="80"><name x="56" y="48">unsafe</name></location><location id="id14" x="288" y="80"></location><location id="id15" x="290" y="214"><name x="312" y="200">safe</name></location><init ref="id13"/><transition><source ref="id12"/><target ref="id13"/><label kind="guard" x="72" y="176">y4 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id15"/><target ref="id12"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y4 = 0</label></transition><transition><source ref="id14"/><target ref="id15"/><label kind="guard" x="296" y="112">y4 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id13"/><target ref="id14"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y4 = 0</label></transition></template><template><name x="5" y="5">Viking5</name><location id="id16" x="288" y="80"></location><location id="id17" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id18" x="64" y="216"></location><location id="id19" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id19"/><transition><source ref="id18"/><target ref="id19"/><label kind="guard" x="72" y="176">y5 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id17"/><target ref="id18"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y5 = 0</label></transition><transition><source ref="id16"/><target ref="id17"/><label kind="guard" x="296" y="112">y5 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id19"/><target ref="id16"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y5 = 0</label></transition></template><template><name x="5" y="5">Viking6</name><location id="id20" x="288" y="80"></location><location id="id21" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id22" x="64" y="216"></location><location id="id23" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id23"/><transition><source ref="id22"/><target ref="id23"/><label kind="guard" x="72" y="176">y6 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id21"/><target ref="id22"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y6 = 0</label></transition><transition><source ref="id20"/><target ref="id21"/><label kind="guard" x="296" y="112">y6 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id23"/><target ref="id20"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y6 = 0</label></transition></template><template><name x="5" y="5">Viking7</name><location id="id24" x="288" y="80"></location><location id="id25" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id26" x="64" y="216"></location><location id="id27" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id27"/><transition><source ref="id26"/><target ref="id27"/><label kind="guard" x="72" y="176">y7 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id25"/><target ref="id26"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y7 = 0</label></transition><transition><source ref="id24"/><target ref="id25"/><label kind="guard" x="296" y="112">y7 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id27"/><target ref="id24"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y7 = 0</label></transition></template><template><name x="5" y="5">Viking8</name><location id="id28" x="288" y="80"></location><location id="id29" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id30" x="64" y="216"></location><location id="id31" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id31"/><transition><source ref="id30"/><target ref="id31"/><label kind="guard" x="72" y="176">y8 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id29"/><target ref="id30"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y8 = 0</label></transition><transition><source ref="id28"/><target ref="id29"/><label kind="guard" x="296" y="112">y8 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id31"/><target ref="id28"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y8 = 0</label></transition></template><template><name x="5" y="5">Viking9</name><location id="id32" x="288" y="80"></location><location id="id33" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id34" x="64" y="216"></location><location id="id35" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id35"/><transition><source ref="id34"/><target ref="id35"/><label kind="guard" x="72" y="176">y9 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id33"/><target ref="id34"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y9 = 0</label></transition><transition><source ref="id32"/><target ref="id33"/><label kind="guard" x="296" y="112">y9 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id35"/><target ref="id32"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y9 = 0</label></transition></template><template><name x="5" y="5">Viking10</name><location id="id36" x="288" y="80"></location><location id="id37" x="288" y="216"><name x="272" y="232">safe</name></location><location id="id38" x="64" y="216"></location><location id="id39" x="64" y="80"><name x="56" y="48">unsafe</name></location><init ref="id39"/><transition><source ref="id38"/><target ref="id39"/><label kind="guard" x="72" y="176">y10 &gt;= 10</label><label kind="synchronisation" x="72" y="120">release!</label></transition><transition><source ref="id37"/><target ref="id38"/><label kind="guard" x="208" y="224">L == 1</label><label kind="synchronisation" x="216" y="192">take!</label><label kind="assignment" x="104" y="224">y10 = 0</label></transition><transition><source ref="id36"/><target ref="id37"/><label kind="guard" x="296" y="112">y10 &gt;= 10</label><label kind="synchronisation" x="296" y="160">release!</label></transition><transition><source ref="id39"/><target ref="id36"/><label kind="guard" x="120" y="56">L == 0</label><label kind="synchronisation" x="120" y="88">take!</label><label kind="assignment" x="216" y="56">y10 = 0</label></transition></template><template><name x="5" y="5">Torch</name><location id="id40" x="200" y="192"><name x="192" y="200">one</name></location><location id="id41" x="200" y="48"></location><location id="id42" x="64" y="120"><name x="48" y="88">free</name></location><location id="id43" x="336" y="120"><name x="328" y="88">two</name></location><init ref="id42"/><transition><source ref="id42"/><target ref="id41"/><label kind="synchronisation" x="104" y="56">take?</label></transition><transition><source ref="id41"/><target ref="id40"/></transition><transition><source ref="id41"/><target ref="id43"/><label kind="synchronisation" x="264" y="56">take?</label></transition><transition><source ref="id40"/><target ref="id42"/><label kind="synchronisation" x="96" y="176">release?</label><label kind="assignment" x="32" y="144">L = (1 - L) % 2</label></transition><transition><source ref="id43"/><target ref="id40"/><label kind="synchronisation" x="256" y="176">release?</label></transition></template><system>//const int fastest = 5;
 
14
//const int fast    = 10;
 
15
//const int slow    = 20;
 
16
//const int slowest = 25;
 
17
 
 
18
//Viking1 = Soldier(fastest);
 
19
//Viking2 = Soldier(fast);
 
20
//Viking3 = Soldier(slow);
 
21
//Viking4 = Soldier(slowest);
 
22
 
 
23
Viking11 = Viking10();
 
24
Viking12 = Viking10();
 
25
system Viking1, Viking2, Viking3, Viking4, Viking5, Viking6, Viking7, Viking8, Viking9, Viking10, Viking11, Viking12, Torch;</system></nta>
 
 
b'\\ No newline at end of file'