<?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>// Number of processes

const int N = 2;

int[0,1] flag[N];

int[0,1] turn;</declaration><template><name x="5" y="5">P</name><parameter>const int pid</parameter><declaration>//Insert local declarations of clocks, variables and constants.
</declaration><location id="id0" x="64" y="64"></location><location id="id1" x="256" y="64"></location><location id="id2" x="256" y="256"></location><location id="id3" x="64" y="256"><name x="32" y="264">cs</name></location><location id="id4" x="64" y="448"></location><init ref="id0"/><transition><source ref="id0"/><target ref="id1"/><label kind="assignment" x="128" y="40">flag[pid]=true</label></transition><transition><source ref="id1"/><target ref="id2"/><label kind="assignment" x="264" y="144">turn=1-pid</label></transition><transition><source ref="id2"/><target ref="id3"/><label kind="guard" x="104" y="232">flag[1-pid]==false</label></transition><transition><source ref="id3"/><target ref="id0"/><label kind="assignment" x="72" y="144">flag[pid]=false</label></transition><transition><source ref="id2"/><target ref="id4"/><label kind="guard" x="112" y="400">flag[1-pid]==true</label></transition><transition><source ref="id4"/><target ref="id3"/><label kind="guard" x="-16" y="400">turn==pid</label></transition><transition><source ref="id4"/><target ref="id2"/><label kind="guard" x="88" y="456">turn==1-pid</label><nail x="256" y="448"/></transition></template><system>P0 = P(0);
P1 = P(1);
system P0,P1;</system></nta>