<?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>
// Should not have a deadlock

int arr[2][3] = {{1, 2, 3}, {4, 5, 6}};
int uninit;
int x = 0;
int pass = 0;

chan ch;
broadcast chan bch;
broadcast chan next;
chan charr[3];</declaration><template><name x="5" y="5">First</name><declaration>// Place local declarations here.
</declaration><location id="id0" x="-248" y="296"><urgent/></location><location id="id1" x="-152" y="296"></location><location id="id2" x="-48" y="296"></location><location id="id3" x="-48" y="240"></location><location id="id4" x="-48" y="160"></location><location id="id5" x="-128" y="72"></location><location id="id6" x="-112" y="-56"><urgent/></location><location id="id7" x="-120" y="-120"><urgent/></location><location id="id8" x="-48" y="72"></location><location id="id9" x="-48" y="8"></location><location id="id10" x="-48" y="-56"></location><location id="id11" x="-48" y="-112"></location><location id="id12" x="-48" y="-176"></location><init ref="id12"/><transition><source ref="id1"/><target ref="id0"/><label kind="guard" x="-232" y="264">pass == 1</label><label kind="assignment" x="-232" y="296">pass = -1</label></transition><transition><source ref="id2"/><target ref="id1"/><label kind="guard" x="-136" y="256">pass == 0</label><label kind="synchronisation" x="-136" y="272">next!</label><label kind="assignment" x="-136" y="296">pass = 1</label></transition><transition><source ref="id3"/><target ref="id2"/><label kind="guard" x="-32" y="256">(x &lt;? 2) == 2 &amp;&amp; ((x &gt;? 10) == 11 || x == 3)</label><label kind="assignment" x="-24" y="272">x = (x &gt; 5) ? x - 3 : x + x + 2</label></transition><transition><source ref="id4"/><target ref="id3"/><label kind="assignment" x="-16" y="192">x = 3</label><nail x="-24" y="200"/></transition><transition><source ref="id4"/><target ref="id3"/><label kind="assignment" x="-120" y="192">x = 11</label><nail x="-64" y="200"/></transition><transition><source ref="id8"/><target ref="id4"/><label kind="guard" x="-40" y="112">x == 7 &amp;&amp; uninit == 1</label></transition><transition><source ref="id8"/><target ref="id8"/><label kind="guard" x="56" y="64">x &gt; 0 &amp;&amp; x &lt; 7</label><label kind="assignment" x="56" y="80">x++, uninit = 1</label><nail x="48" y="64"/><nail x="48" y="104"/></transition><transition><source ref="id5"/><target ref="id8"/><label kind="assignment" x="-112" y="96">x -= -2</label><nail x="-88" y="96"/></transition><transition><source ref="id8"/><target ref="id5"/><label kind="guard" x="-104" y="24">x &lt;= 4</label><nail x="-88" y="48"/></transition><transition><source ref="id11"/><target ref="id6"/><label kind="guard" x="-256" y="-104">arr[1][2] != 3 || arr[0][0] != 1</label></transition><transition><source ref="id12"/><target ref="id7"/><label kind="guard" x="-120" y="-168">false</label></transition><transition><source ref="id9"/><target ref="id8"/><label kind="guard" x="-32" y="16">x == 6</label><label kind="assignment" x="-32" y="32">x = 0</label></transition><transition><source ref="id10"/><target ref="id9"/><label kind="guard" x="-32" y="-48">x == 2 &amp;&amp; arr[1][1] == 3</label><label kind="assignment" x="-32" y="-32">x += 2 + ++arr[0][0]</label></transition><transition><source ref="id11"/><target ref="id10"/><label kind="guard" x="-32" y="-104">arr[1][0] == 1 &amp;&amp; arr[1][1] == 2</label><label kind="assignment" x="-32" y="-88">x = arr[1][1]++</label></transition><transition><source ref="id12"/><target ref="id11"/><label kind="guard" x="-32" y="-160">uninit == 0 &amp;&amp; x == 0 &amp;&amp; arr[1][1] == 5</label><label kind="assignment" x="-32" y="-144">arr[1] = arr[0]</label></transition></template><template><name>Second</name><location id="id13" x="-424" y="-168"></location><location id="id14" x="-448" y="-48"></location><location id="id15" x="-352" y="-104"></location><location id="id16" x="-352" y="-16"></location><location id="id17" x="-352" y="72"></location><location id="id18" x="-248" y="72"></location><location id="id19" x="-120" y="72"><committed/></location><location id="id20" x="-248" y="-200"></location><location id="id21" x="-120" y="-8"><committed/></location><location id="id22" x="-120" y="-112"><committed/></location><location id="id23" x="-120" y="-200"><committed/></location><init ref="id20"/><transition><source ref="id15"/><target ref="id13"/><label kind="guard" x="-376" y="-160">x == 3 &amp;&amp; pass == 2</label><label kind="assignment" x="-368" y="-144">pass = 3</label></transition><transition><source ref="id15"/><target ref="id14"/><label kind="synchronisation" x="-448" y="-96">charr[1]?</label></transition><transition><source ref="id16"/><target ref="id14"/><label kind="synchronisation" x="-440" y="-24">charr[2]!</label></transition><transition><source ref="id16"/><target ref="id15"/><label kind="guard" x="-344" y="-64">x == 2</label><label kind="synchronisation" x="-344" y="-80">charr[2]?</label></transition><transition><source ref="id17"/><target ref="id16"/><label kind="guard" x="-344" y="16">x == 1</label><label kind="synchronisation" x="-344" y="0">charr[0]?</label></transition><transition><source ref="id18"/><target ref="id17"/><label kind="synchronisation" x="-304" y="48">bch!</label></transition><transition><source ref="id19"/><target ref="id18"/><label kind="guard" x="-216" y="48">pass == 1</label><label kind="assignment" x="-216" y="72">pass = 2</label></transition><transition><source ref="id21"/><target ref="id19"/><label kind="guard" x="-112" y="16">x == 1</label></transition><transition><source ref="id22"/><target ref="id21"/><label kind="synchronisation" x="-104" y="-72">ch!</label></transition><transition><source ref="id23"/><target ref="id22"/><label kind="synchronisation" x="-112" y="-168">bch!</label><label kind="assignment" x="-104" y="-152">x = 0</label></transition><transition><source ref="id20"/><target ref="id23"/><label kind="synchronisation" x="-200" y="-224">next?</label></transition></template><template><name>Listener</name><location id="id24" x="-112" y="-64"><urgent/></location><location id="id25" x="-224" y="-224"><urgent/></location><location id="id26" x="0" y="-144"></location><location id="id27" x="-112" y="-144"></location><location id="id28" x="-224" y="-144"><committed/></location><init ref="id25"/><transition><source ref="id27"/><target ref="id24"/><label kind="guard" x="-152" y="-112">x == 0</label></transition><transition><source ref="id25"/><target ref="id28"/><label kind="synchronisation" x="-272" y="-192">next?</label></transition><transition><source ref="id27"/><target ref="id26"/><label kind="synchronisation" x="-80" y="-168">ch?</label><label kind="assignment" x="-80" y="-144">x++</label></transition><transition><source ref="id28"/><target ref="id27"/><label kind="synchronisation" x="-192" y="-168">bch?</label></transition></template><template><name>Param</name><parameter>chan&amp; cc</parameter><location id="id29" x="56" y="-88"></location><location id="id30" x="-56" y="-88"></location><location id="id31" x="-168" y="-88"></location><init ref="id31"/><transition><source ref="id30"/><target ref="id29"/><label kind="synchronisation" x="-24" y="-112">cc!</label><label kind="assignment" x="-24" y="-88">x++</label></transition><transition><source ref="id31"/><target ref="id30"/><label kind="synchronisation" x="-128" y="-112">cc!</label><label kind="assignment" x="-136" y="-88">++x</label></transition></template><template><name>Final</name><parameter>int arg</parameter><location id="id32" x="-216" y="-104"><urgent/></location><init ref="id32"/><transition><source ref="id32"/><target ref="id32"/><label kind="guard" x="-120" y="-112">pass == arg</label><nail x="-128" y="-64"/><nail x="-128" y="-136"/></transition></template><template><name>Third</name><declaration>const int a_1[5] = { 7, 8, 4, 2, 11 };
const int a_2[5] = { 5, 6, 2, 0, 9 };

typedef int[0,4] a_index;

</declaration><location id="id33" x="-200" y="48"></location><location id="id34" x="-296" y="48"></location><location id="id35" x="-400" y="48"></location><location id="id36" x="-400" y="-48"></location><location id="id37" x="-280" y="-48"></location><location id="id38" x="-184" y="-40"></location><location id="id39" x="-184" y="-136"></location><location id="id40" x="-288" y="-136"></location><location id="id41" x="-400" y="-136"></location><init ref="id41"/><transition><source ref="id34"/><target ref="id33"/><label kind="guard" x="-288" y="16">pass == 3</label><label kind="assignment" x="-280" y="56">pass = 4</label></transition><transition><source ref="id35"/><target ref="id34"/></transition><transition><source ref="id36"/><target ref="id35"/></transition><transition><source ref="id37"/><target ref="id36"/></transition><transition><source ref="id38"/><target ref="id37"/><label kind="guard" x="-272" y="-32">exists (y : a_index) a_2[y] == 9</label></transition><transition><source ref="id39"/><target ref="id38"/><label kind="guard" x="-176" y="-104">forall (i : int[0,4]) a_1[i] == a_2[i] +2</label></transition><transition><source ref="id40"/><target ref="id39"/><label kind="guard" x="-272" y="-168">x == 4</label></transition><transition><source ref="id41"/><target ref="id40"/><label kind="guard" x="-392" y="-160">pass == 3</label><label kind="synchronisation" x="-368" y="-128">ch!</label></transition></template><system>// Place template instantiations here.
P1 = First();
P2 = Second();
P3 = Listener();
P4 = Listener();
P5 = Param(charr[0]);
P6 = Param(charr[2]);
P7 = Third();
P8 = Final(4);

// List one or more processes to be composed into a system.
system P1, P2, P3, P4, P5, P6, P7, P8;</system></nta>