<?xml version='1.0' encoding='utf-8'?><!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.



const int rho=400;         // must be &gt;  0 
const int rhoPrime=600;    // must be &gt;= rho       


const int eps=50;          // must be &lt;  rho/4     
const int kappa=200;       // must be &lt;= rho-4eps  


const int E=0;
const int A=1;
const int Cr=2;

int[0,2] Track=E, T_P;

const int O:=90;
const int Cl:=0;

int[0,90] g=O;

clock x,y,z,c,d;

chan step;</declaration><template><name x="5" y="5">A_IN</name><declaration>//Insert local declarations of clocks, variables and constants.
</declaration><location id="id0" x="120" y="-136"><label kind="invariant" x="112" y="-176">d&lt;=rhoPrime</label></location><location id="id1" x="120" y="-16"><committed/></location><location id="id2" x="-128" y="-136"></location><location id="id3" x="-128" y="-16"><committed/></location><location id="id4" x="-24" y="-16"></location><location id="id5" x="-24" y="-136"><committed/></location><location id="id6" x="-24" y="-256"><label kind="invariant" x="-8" y="-272">d&lt;=rhoPrime</label></location><location id="id7" x="-128" y="-256"><committed/></location><location id="id8" x="-232" y="-256"></location><location id="id9" x="-344" y="-256"><committed/></location><init ref="id9"/><transition><source ref="id0"/><target ref="id5"/><label kind="guard" x="16" y="-160">d&gt;0</label><label kind="assignment" x="16" y="-136">Track:=Cr,
d:=0</label></transition><transition><source ref="id1"/><target ref="id0"/><label kind="synchronisation" x="80" y="-88">step!</label></transition><transition><source ref="id4"/><target ref="id1"/><label kind="guard" x="16" y="-56">d&gt;0</label><label kind="assignment" x="16" y="-40">Track:=A, 

d:=0</label></transition><transition><source ref="id2"/><target ref="id7"/><label kind="guard" x="-192" y="-200">d&gt;0</label><label kind="assignment" x="-192" y="-184">Track:=A,  d:=0</label></transition><transition><source ref="id3"/><target ref="id2"/><label kind="synchronisation" x="-168" y="-88">step!</label></transition><transition><source ref="id4"/><target ref="id3"/><label kind="guard" x="-104" y="-40">d&gt;0</label><label kind="assignment" x="-112" y="-8">Track:=E, 
d:=0</label></transition><transition><source ref="id5"/><target ref="id4"/><label kind="synchronisation" x="-16" y="-88">step!</label></transition><transition><source ref="id6"/><target ref="id5"/><label kind="guard" x="-84" y="-226">d&gt;= rho</label><label kind="assignment" x="-16" y="-224">Track:=Cr,
d:=0</label></transition><transition><source ref="id7"/><target ref="id6"/><label kind="synchronisation" x="-96" y="-280">step!</label></transition><transition><source ref="id8"/><target ref="id7"/><label kind="guard" x="-216" y="-296">d&gt;0</label><label kind="assignment" x="-216" y="-280">Track:=A, 

d:=0</label></transition><transition><source ref="id9"/><target ref="id8"/><label kind="synchronisation" x="-304" y="-256">step!</label><label kind="assignment" x="-320" y="-296">Track:=E,
d:=0</label></transition></template><template><name>A_OUT</name><location id="id10" x="-200" y="128"><label kind="invariant" x="-210" y="143">z&lt;=eps</label></location><location id="id11" x="-368" y="128"><label kind="invariant" x="-378" y="143">z&lt;=eps</label></location><location id="id12" x="-424" y="64"><committed/></location><location id="id13" x="-424" y="-80"><label kind="invariant" x="-488" y="-72">z&lt;=eps</label></location><location id="id14" x="-200" y="-32"><label kind="invariant" x="-192" y="-16">z&lt;=eps</label></location><location id="id15" x="-312" y="-80"><label kind="invariant" x="-296" y="-96">z&lt;=eps</label></location><location id="id16" x="-256" y="-136"><label kind="invariant" x="-266" y="-121">z&lt;=eps</label></location><location id="id17" x="-200" y="-192"><committed/></location><location id="id18" x="-200" y="-320"><label kind="invariant" x="-192" y="-304">z&lt;=eps</label></location><location id="id19" x="-368" y="-320"><label kind="invariant" x="-400" y="-304">z&lt;=eps</label></location><location id="id20" x="-424" y="-384"><committed/></location><init ref="id20"/><transition><source ref="id10"/><target ref="id20"/><label kind="guard" x="-56" y="-112">T_P==E</label><label kind="assignment" x="-56" y="-88">y:=0,z:=0,g:=O</label><nail x="-64" y="128"/><nail x="-64" y="-416"/><nail x="-400" y="-416"/></transition><transition><source ref="id10"/><target ref="id12"/><label kind="guard" x="-320" y="48">T_P!=E</label><label kind="assignment" x="-320" y="64">z:=0</label><nail x="-256" y="64"/></transition><transition><source ref="id11"/><target ref="id10"/><label kind="guard" x="-328" y="104">x&gt;0 &amp;&amp; z&gt;0</label><label kind="assignment" x="-328" y="128">T_P:=Track</label></transition><transition><source ref="id12"/><target ref="id11"/><label kind="synchronisation" x="-392" y="80">step!</label></transition><transition><source ref="id13"/><target ref="id12"/><label kind="guard" x="-480" y="-32">T_P!=E</label><label kind="assignment" x="-536" y="-8">y:=0,z:=0,g:=Cl</label></transition><transition><source ref="id15"/><target ref="id13"/><label kind="guard" x="-392" y="-72">T_P==E</label><nail x="-368" y="-72"/></transition><transition><source ref="id13"/><target ref="id20"/><label kind="guard" x="-484" y="-262">T_P==E</label><label kind="assignment" x="-536" y="-232">y:=0,z:=0,g:=O</label></transition><transition><source ref="id15"/><target ref="id13"/><label kind="guard" x="-392" y="-112">y&gt;kappa</label><nail x="-368" y="-88"/></transition><transition><source ref="id14"/><target ref="id17"/><label kind="assignment" x="-192" y="-112">z:=0</label></transition><transition><source ref="id15"/><target ref="id14"/><label kind="guard" x="-312" y="-56">y&lt;=kappa 
&amp;&amp; T_P!=E</label></transition><transition><source ref="id16"/><target ref="id15"/><label kind="guard" x="-304" y="-144">x&gt;0 &amp;&amp; z&gt;0</label><label kind="assignment" x="-360" y="-128">T_P:=Track</label></transition><transition><source ref="id17"/><target ref="id16"/><label kind="synchronisation" x="-264" y="-184">step!</label></transition><transition><source ref="id18"/><target ref="id17"/><label kind="guard" x="-260" y="-286">T_P!=E</label><label kind="assignment" x="-192" y="-256">y:=0,z:=0,g:=O</label></transition><transition><source ref="id18"/><target ref="id20"/><label kind="guard" x="-320" y="-400">T_P==E</label><label kind="assignment" x="-320" y="-384">z:=0</label><nail x="-256" y="-384"/><nail x="-408" y="-384"/></transition><transition><source ref="id19"/><target ref="id18"/><label kind="guard" x="-344" y="-344">x&gt;0 &amp;&amp; z&gt;0</label><label kind="assignment" x="-344" y="-320">T_P:=Track</label></transition><transition><source ref="id20"/><target ref="id19"/><label kind="synchronisation" x="-392" y="-368">step!</label></transition></template><template><name>CD_S</name><location id="id21" x="-48" y="-368"><name x="-58" y="-398">q_bad</name></location><location id="id22" x="-240" y="-368"></location><location id="id23" x="-432" y="-368"></location><init ref="id23"/><transition><source ref="id22"/><target ref="id23"/><label kind="guard" x="-376" y="-288">g==Cl
&amp;&amp; c==0</label><label kind="synchronisation" x="-376" y="-304">step?</label><nail x="-304" y="-288"/><nail x="-384" y="-288"/></transition><transition><source ref="id22"/><target ref="id21"/><label kind="guard" x="-216" y="-368">Track==Cr &amp;&amp; g!=Cl
&amp;&amp; c&gt;0</label></transition><transition><source ref="id22"/><target ref="id22"/><label kind="guard" x="-280" y="-480">Track==Cr &amp;&amp; g!=Cl
&amp;&amp; c==0</label><label kind="synchronisation" x="-264" y="-448">step?</label><nail x="-232" y="-376"/><nail x="-192" y="-448"/><nail x="-288" y="-448"/></transition><transition><source ref="id22"/><target ref="id23"/><label kind="guard" x="-376" y="-352">c==0 &amp;&amp; 
Track!=Cr</label><label kind="synchronisation" x="-376" y="-368">step?</label><nail x="-304" y="-352"/><nail x="-384" y="-352"/></transition><transition><source ref="id23"/><target ref="id22"/><label kind="guard" x="-376" y="-424">Track==Cr 
&amp;&amp; g!=Cl</label><label kind="synchronisation" x="-376" y="-392">step?</label><label kind="assignment" x="-328" y="-392">c:=0</label><nail x="-384" y="-392"/><nail x="-304" y="-392"/></transition><transition><source ref="id23"/><target ref="id23"/><label kind="guard" x="-456" y="-288">g==Cl</label><label kind="synchronisation" x="-448" y="-304">step?</label><nail x="-464" y="-288"/><nail x="-400" y="-288"/></transition><transition><source ref="id23"/><target ref="id23"/><label kind="guard" x="-464" y="-472">Track!=Cr</label><label kind="synchronisation" x="-448" y="-448">step?</label><nail x="-400" y="-448"/><nail x="-464" y="-448"/></transition></template><instantiation>//Insert process assignments.
</instantiation><system>//Edit system definition.
system A_IN,A_OUT,CD_S;</system></nta>