<?xml version="1.0" encoding="utf-8"?><!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.1//EN' 'https://www.it.uu.se/research/group/darts/uppaal/flat-1_1.dtd'><nta><declaration>// Place global declarations here.

clock globalClock;

const int FRIENDS =3;
const int HANDSHAKES_SIMULTANEOUSLY = 1;

typedef int[0, FRIENDS-1] friend_id;
typedef int[0, HANDSHAKES_SIMULTANEOUSLY-1] shake_id;

chan shake[shake_id];
chan release[shake_id];


friend_id var;</declaration><template><name x="5" y="5">Friend</name><parameter>const friend_id id</parameter><declaration>// Place local declarations here.

shake_id h;</declaration><location id="id0" x="-754" y="-302"><name x="-792" y="-280">GivingHand</name></location><location id="id1" x="-752" y="-496"><name x="-802" y="-534">DoingNothing</name></location><init ref="id1"/><transition><source ref="id0"/><target ref="id1"/><label kind="synchronisation" x="-896" y="-416">release[h]!</label><nail x="-818" y="-398"/></transition><transition><source ref="id1"/><target ref="id0"/><label kind="select" x="-674" y="-430">j:shake_id</label><label kind="synchronisation" x="-674" y="-414">shake[j]!</label><label kind="assignment" x="-672" y="-400">h = j</label><nail x="-690" y="-398"/></transition></template><template><name>Handshake</name><parameter>const shake_id id</parameter><declaration>friend_id first;
friend_id second;

clock x;</declaration><location id="id2" x="-832" y="-128"><committed/></location><location id="id3" x="-640" y="-192"></location><location id="id4" x="-832" y="-320"></location><location id="id5" x="-448" y="-320"><name x="-432" y="-328">Two</name></location><location id="id6" x="-640" y="-448"></location><init ref="id4"/><transition><source ref="id2"/><target ref="id4"/></transition><transition><source ref="id3"/><target ref="id2"/><label kind="synchronisation" x="-752" y="-144">release[id]?</label></transition><transition><source ref="id5"/><target ref="id3"/><label kind="synchronisation" x="-528" y="-256">release[id]?</label></transition><transition><source ref="id4"/><target ref="id6"/><label kind="synchronisation" x="-832" y="-416">shake[id]?</label></transition><transition><source ref="id6"/><target ref="id5"/><label kind="synchronisation" x="-528" y="-416">shake[id]?</label></transition></template><system>// Place template instantiations here.

// List one or more processes to be composed into a system.
system Friend, Handshake;</system></nta>
