-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathfunction_calls.xml
More file actions
49 lines (48 loc) · 1.62 KB
/
function_calls.xml
File metadata and controls
49 lines (48 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE nta PUBLIC '-//Uppaal Team//DTD Flat System 1.6//EN' 'http://www.it.uu.se/research/group/darts/uppaal/flat-1_6.dtd'>
<nta>
<declaration>int v;
bool enabled(int i) {
return (i>0);
}
</declaration>
<template>
<name x="5" y="5">P</name>
<location id="id0" x="136" y="0">
<name x="126" y="-34">Done</name>
</location>
<location id="id1" x="0" y="0">
<urgent/>
</location>
<init ref="id1"/>
<transition id="id2">
<source ref="id1"/>
<target ref="id0"/>
<label kind="guard" x="25" y="-25">enabled(1)</label>
<label kind="assignment" x="25" y="0">v=1</label>
</transition>
</template>
<system>system P;</system>
<queries>
<query>
<formula>simulate[<=5;3] { v, enabled(1) } : 2 : enabled(1)</formula>
<comment>Good call, should pass</comment>
</query>
<query>
<formula>simulate[<=5;3] { v, enabled(1) } : 2 : enabled()</formula>
<comment>Call is missing argument, should give meaningful error and not crash.</comment>
</query>
<query>
<formula>simulate[<=5;3] { v, enabled() } : 2 : enabled(1)</formula>
<comment>Call is missing argument, should give meaningful error and not crash.</comment>
</query>
<query>
<formula>simulate[<=5;3] { v, enabled() } : 2 : enabled()</formula>
<comment>Both calls are missing arguments, should give error message and not crash</comment>
</query>
<query>
<formula>simulate[<=5;3] { v, non_existent() } : 2 : non_existent()</formula>
<comment>Chould give meaningfull error message and not crash</comment>
</query>
</queries>
</nta>