<?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_2.dtd'>
<nta>
	<declaration>// Place global declarations here.
clock t;

typedef int[1,3] mid_t;

chan acq[mid_t], rel[mid_t];

</declaration>
	<template>
		<name x="5" y="5">Job1</name>
		<declaration>clock x;</declaration>
		<location id="id0" x="144" y="-221">
			<name x="134" y="-255">Done</name>
		</location>
		<location id="id1" x="34" y="-221" color="#ffa500">
			<label kind="invariant" x="17" y="-255">x&lt;=3</label>
		</location>
		<location id="id2" x="-76" y="-221">
		</location>
		<location id="id3" x="-187" y="-221" color="#ff0000">
			<label kind="invariant" x="-212" y="-255">x&lt;=1</label>
		</location>
		<location id="id4" x="-297" y="-221">
		</location>
		<location id="id5" x="-526" y="-221">
			<name x="-536" y="-255">Idle</name>
		</location>
		<location id="id6" x="-416" y="-221" color="#0000ff">
			<label kind="invariant" x="-442" y="-255">x&lt;=2</label>
		</location>
		<init ref="id5"/>
		<transition>
			<source ref="id1"/>
			<target ref="id0"/>
			<label kind="guard" x="59" y="-221">(x==3)</label>
			<label kind="synchronisation" x="59" y="-238">rel[3]!</label>
		</transition>
		<transition>
			<source ref="id2"/>
			<target ref="id1"/>
			<label kind="synchronisation" x="-58" y="-238">acq[3]!</label>
			<label kind="assignment" x="-58" y="-221">x:=0</label>
		</transition>
		<transition>
			<source ref="id3"/>
			<target ref="id2"/>
			<label kind="guard" x="-161" y="-221">(x==1)</label>
			<label kind="synchronisation" x="-161" y="-238">rel[2]!</label>
		</transition>
		<transition>
			<source ref="id4"/>
			<target ref="id3"/>
			<label kind="synchronisation" x="-272" y="-238">acq[2]!</label>
			<label kind="assignment" x="-263" y="-221">x:=0</label>
		</transition>
		<transition>
			<source ref="id6"/>
			<target ref="id4"/>
			<label kind="guard" x="-391" y="-221">(x==2)</label>
			<label kind="synchronisation" x="-391" y="-238">rel[1]!</label>
		</transition>
		<transition>
			<source ref="id5"/>
			<target ref="id6"/>
			<label kind="synchronisation" x="-508" y="-238">acq[1]!</label>
			<label kind="assignment" x="-508" y="-221">x:=0</label>
		</transition>
	</template>
	<template>
		<name>Job2</name>
		<declaration>clock y;</declaration>
		<location id="id7" x="-170" y="-76">
			<name x="-180" y="-110">Done</name>
		</location>
		<location id="id8" x="-518" y="-76" color="#0000ff">
			<label kind="invariant" x="-535" y="-110">y&lt;=1</label>
		</location>
		<location id="id9" x="-408" y="-76">
		</location>
		<location id="id10" x="-297" y="-76" color="#ffa500">
			<label kind="invariant" x="-314" y="-110">y&lt;=3</label>
		</location>
		<location id="id11" x="-620" y="-76">
			<name x="-630" y="-110">Idle</name>
		</location>
		<init ref="id11"/>
		<transition>
			<source ref="id10"/>
			<target ref="id7"/>
			<label kind="guard" x="-263" y="-76">(y==3)</label>
			<label kind="synchronisation" x="-272" y="-93">rel[3]!</label>
		</transition>
		<transition>
			<source ref="id9"/>
			<target ref="id10"/>
			<label kind="synchronisation" x="-390" y="-93">acq[3]!</label>
			<label kind="assignment" x="-390" y="-76">y:=0</label>
		</transition>
		<transition>
			<source ref="id8"/>
			<target ref="id9"/>
			<label kind="guard" x="-493" y="-76">(y==1)</label>
			<label kind="synchronisation" x="-501" y="-93">rel[1]!</label>
		</transition>
		<transition>
			<source ref="id11"/>
			<target ref="id8"/>
			<label kind="synchronisation" x="-602" y="-93">acq[1]!</label>
			<label kind="assignment" x="-602" y="-76">y:=0</label>
		</transition>
	</template>
	<template>
		<name>Machine</name>
		<parameter>mid_t id</parameter>
		<declaration>clock x;</declaration>
		<location id="id12" x="-68" y="17">
			<name x="-102" y="34">cooloff</name>
			<label kind="invariant" x="-85" y="51">x&lt;=1</label>
		</location>
		<location id="id13" x="51" y="-85">
			<name x="41" y="-119">busy</name>
		</location>
		<location id="id14" x="-195" y="-85">
			<name x="-205" y="-119">free</name>
		</location>
		<init ref="id14"/>
		<transition>
			<source ref="id12"/>
			<target ref="id14"/>
			<label kind="guard" x="-170" y="-25">x==1</label>
		</transition>
		<transition>
			<source ref="id13"/>
			<target ref="id12"/>
			<label kind="synchronisation" x="8" y="-34">rel[id]?</label>
			<label kind="assignment" x="8" y="-17">x:=0</label>
		</transition>
		<transition>
			<source ref="id14"/>
			<target ref="id13"/>
			<label kind="synchronisation" x="-102" y="-110">acq[id]?</label>
		</transition>
	</template>
	<system>system Job1, Job2, Machine;</system>
	<queries>
		<query>
			<formula>A[] !(Job1.Done and Job2.Done and t&lt;=7)
			</formula>
			<comment>
			</comment>
		</query>
	</queries>
</nta>
