<?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>// Fischer's mutual exclusion protocol.

const int N = 40;

typedef scalar[N] pid_t;

bool set = false;
pid_t id;
</declaration><template><name x="16" y="-8">P</name><parameter>const pid_t pid</parameter><declaration>clock x;
const int k = 2;</declaration><location id="id0" x="216" y="176"><name x="216" y="192">wait</name></location><location id="id1" x="216" y="48"><name x="216" y="16">req</name><label kind="invariant" x="240" y="32">x&lt;=k</label></location><location id="id2" x="64" y="48"><name x="54" y="18">A</name></location><location id="id3" x="64" y="176"><name x="56" y="192">cs</name></location><init ref="id2"/><transition><source ref="id2"/><target ref="id1"/><label kind="guard" x="104" y="24">!set</label><label kind="assignment" x="104" y="48">x = 0</label></transition><transition><source ref="id1"/><target ref="id0"/><label kind="guard" x="144" y="72">x&lt;=k</label><label kind="assignment" x="144" y="88">x = 0,
id = pid,
set = true</label></transition><transition><source ref="id0"/><target ref="id1"/><label kind="guard" x="264" y="88">!set</label><label kind="assignment" x="264" y="104">x = 0</label><nail x="251" y="146"/><nail x="251" y="82"/></transition><transition><source ref="id0"/><target ref="id3"/><label kind="guard" x="96" y="184">x&gt;k &amp;&amp; id==pid</label></transition><transition><source ref="id3"/><target ref="id2"/><label kind="assignment" x="-8" y="104">set=false</label></transition></template><system>system P;</system></nta>