aboutsummaryrefslogtreecommitdiff
path: root/assignment2/hyman.xml
diff options
context:
space:
mode:
Diffstat (limited to 'assignment2/hyman.xml')
-rw-r--r--assignment2/hyman.xml10
1 files changed, 10 insertions, 0 deletions
diff --git a/assignment2/hyman.xml b/assignment2/hyman.xml
new file mode 100644
index 0000000..fb22f25
--- /dev/null
+++ b/assignment2/hyman.xml
@@ -0,0 +1,10 @@
+<?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>// Place global declarations here.
+typedef int[0,1] ids;
+bool blocked[ids];
+int turn = 0;</declaration><template><name x="5" y="5">Process</name><parameter>ids id</parameter><declaration>// Place local declarations here.
+</declaration><location id="id0" x="-2264" y="-552"></location><location id="id1" x="-2168" y="-472"><name x="-2264" y="-504">WaitBlocked</name></location><location id="id2" x="-2360" y="-336"><name x="-2408" y="-320">CriticalSection</name></location><location id="id3" x="-2360" y="-472"><name x="-2456" y="-456">GainControl</name></location><location id="id4" x="-2576" y="-472"><name x="-2608" y="-512">Start</name></location><init ref="id4"/><transition><source ref="id0"/><target ref="id3"/><label kind="assignment" x="-2368" y="-576">turn := id</label><nail x="-2360" y="-552"/></transition><transition><source ref="id1"/><target ref="id0"/><label kind="guard" x="-2216" y="-576">not blocked[1-id]</label><nail x="-2168" y="-552"/></transition><transition><source ref="id1"/><target ref="id1"/><label kind="guard" x="-2120" y="-456">blocked[1-id]</label><nail x="-2168" y="-432"/><nail x="-2128" y="-432"/><nail x="-2128" y="-472"/></transition><transition><source ref="id3"/><target ref="id1"/><label kind="guard" x="-2312" y="-464">turn != id</label></transition><transition><source ref="id2"/><target ref="id4"/><label kind="assignment" x="-2552" y="-368">blocked[id] := false</label><nail x="-2576" y="-336"/></transition><transition><source ref="id3"/><target ref="id2"/><label kind="guard" x="-2352" y="-424">turn == id</label></transition><transition><source ref="id4"/><target ref="id3"/><label kind="assignment" x="-2536" y="-496">blocked[id] := true</label></transition></template><system>// Place template instantiations here.
+p1 = Process(0);
+p2 = Process(1);
+
+// List one or more processes to be composed into a system.
+system p1, p2;</system></nta> \ No newline at end of file