<?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>//Insert declarations of global clocks, variables, constants and channels.

clock x, y, time;

int[0,1] flag;

int count;

const int l1 = 4;

const int l2 = 5;

const int l = 18;
</declaration><template><name x="5" y="5">Main</name><declaration>//Insert local declarations of clocks, variables and constants.
</declaration><location id="id0" x="224" y="192"><name x="208" y="144">main</name><label kind="invariant" x="256" y="152">x &lt;= l2</label></location><location id="id1" x="224" y="384"><name x="240" y="384">final</name></location><init ref="id0"/><transition><source ref="id0"/><target ref="id1"/><label kind="guard" x="232" y="296">x &gt;= l1 and flag == true and count == 0</label></transition><transition><source ref="id0"/><target ref="id0"/><label kind="guard" x="-24" y="136">x &gt;= l1 and flag == true and count &gt; 0</label><label kind="assignment" x="32" y="288">x = 0,
count = count -1</label><nail x="64" y="192"/><nail x="64" y="288"/></transition><transition><source ref="id0"/><target ref="id0"/><label kind="guard" x="392" y="176">x &gt;= l1 and flag == false</label><label kind="assignment" x="392" y="248">x = 0,
count = count +1</label><nail x="384" y="192"/><nail x="384" y="288"/></transition></template><template><name x="5" y="5">Int</name><location id="id2" x="128" y="96"><label kind="invariant" x="160" y="88">y &lt;= l</label></location><location id="id3" x="128" y="288"></location><init ref="id2"/><transition><source ref="id2"/><target ref="id3"/><label kind="assignment" x="136" y="176">flag = true</label></transition></template><system>//Insert process assignments.

//Edit system definition.
system Main, Int;</system></nta>