<?xml version="1.0"?>
<!DOCTYPE nta PUBLIC "-//Uppaal Team//DTD Flat System 1.0//EN" "http://www.docs.uu.se/docs/rtmv/uppaal/xml/flat-1_0.dtd">
<nta>
  <declaration>//Insert declarations of global clocks, variables, constants and channels.
chan a;
chan b;
chan c;
int v;
int p;
const NULL -1;</declaration>
  <template>
    <name x="5" y="5">Env</name>
    <parameter x="5" y="20"/>
    <declaration>//Insert local declarations of clocks, variables and constants.
</declaration>
  <location id="id0" x="104" y="88"/><location id="id1" x="184" y="48"><committed/></location><location id="id3" x="80" y="168"><committed/></location><location id="id4" x="176" y="176"/><init ref="id4"/><transition><source ref="id0"/><target ref="id1"/><label kind="assignment" x="112" y="16">p:=1</label><nail x="112" y="48"/><nail x="152" y="32"/></transition><transition><source ref="id1"/><target ref="id0"/><label kind="synchronisation" x="168" y="88">a!</label><nail x="184" y="80"/><nail x="136" y="104"/></transition><transition><source ref="id0"/><target ref="id3"/><label kind="assignment" x="28" y="124">p:=2</label><nail x="64" y="112"/></transition><transition><source ref="id3"/><target ref="id0"/><label kind="synchronisation" x="112" y="136">a!</label><nail x="104" y="144"/><nail x="120" y="120"/></transition><transition><source ref="id4"/><target ref="id0"/><label kind="assignment" x="152" y="120">p:=NULL</label></transition><transition><source ref="id0"/><target ref="id0"/><label kind="synchronisation" x="56" y="0">c?</label><nail x="48" y="32"/><nail x="88" y="8"/></transition><transition><source ref="id0"/><target ref="id0"/><label kind="synchronisation" x="16" y="72">b!</label><nail x="40" y="48"/><nail x="40" y="104"/></transition></template>
  <template><name x="5" y="5">Ctl</name><parameter x="5" y="20"/><declaration>clock cl;</declaration><location id="id5" x="80" y="80"><name x="70" y="50">waita</name></location><location id="id6" x="80" y="160"><committed/></location><location id="id7" x="-8" y="240"><name x="-40" y="208">waitc</name><label kind="invariant" x="-48" y="248">cl&lt;=3</label></location><location id="id8" x="152" y="240"><name x="152" y="208">waitb</name></location><init ref="id5"/><transition><source ref="id5"/><target ref="id6"/><label kind="assignment" x="104" y="104">v:=p,
p:=NULL</label><label kind="synchronisation" x="104" y="88">a?</label></transition><transition><source ref="id6"/><target ref="id7"/><label kind="guard" x="-8" y="168">v==1</label><label kind="assignment" x="-8" y="184">cl:=0</label></transition><transition><source ref="id6"/><target ref="id8"/><label kind="guard" x="120" y="176">v==2</label></transition><transition><source ref="id7"/><target ref="id5"/><label kind="guard" x="-64" y="96">cl==3</label><label kind="assignment" x="-64" y="128">v:=0</label><label kind="synchronisation" x="-64" y="112">c!</label><nail x="-72" y="240"/><nail x="-72" y="80"/></transition><transition><source ref="id7"/><target ref="id8"/><label kind="synchronisation" x="64" y="240">b?</label><label kind="assignment" x="64" y="256">v:=2</label></transition><transition><source ref="id8"/><target ref="id7"/><label kind="synchronisation" x="64" y="296">b?</label><label kind="assignment" x="64" y="312">v:=1,
cl:=0</label><nail x="152" y="296"/><nail x="-8" y="296"/></transition></template><instantiation>//Insert process assignments.
</instantiation>
  <system>//Edit system definition.
system Env, Ctl;</system>
</nta>
