Skip to content

Commit 9bf1e35

Browse files
tautschnigpeterschrammel
authored andcommitted
Added a test case requiring GraphML witnesses
The test data includes almost all GraphML output - lines that may be interpreted as regular expressions are omitted.
1 parent ab8cc8b commit 9bf1e35

File tree

2 files changed

+112
-0
lines changed

2 files changed

+112
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
extern int __VERIFIER_nondet_int(void);
2+
3+
typedef enum {
4+
LIST_BEG,
5+
LIST_END
6+
} end_point_t;
7+
8+
typedef enum {
9+
ITEM_PREV,
10+
ITEM_NEXT
11+
} direction_t;
12+
13+
void remove_one(end_point_t from)
14+
{
15+
const direction_t next_field = (LIST_BEG == from) ? ITEM_NEXT : ITEM_PREV;
16+
}
17+
18+
end_point_t rand_end_point(void)
19+
{
20+
_Bool choice;
21+
if (choice)
22+
return LIST_BEG;
23+
else
24+
return LIST_END;
25+
}
26+
27+
int main()
28+
{
29+
remove_one(rand_end_point());
30+
31+
__CPROVER_assert(0, "");
32+
33+
return 0;
34+
}
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
CORE
2+
main.c
3+
--graphml-witness -
4+
^EXIT=10$
5+
^SIGNAL=0$
6+
^VERIFICATION FAILED$
7+
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8+
<key attr.name="invariant" attr.type="string" for="node" id="invariant"/>
9+
<key attr.name="invariant.scope" attr.type="string" for="node" id="invariant.scope"/>
10+
<key attr.name="nodeType" attr.type="string" for="node" id="nodetype">
11+
<default>path</default>
12+
</key>
13+
<key attr.name="isFrontierNode" attr.type="boolean" for="node" id="frontier">
14+
<default>false</default>
15+
</key>
16+
<key attr.name="isViolationNode" attr.type="boolean" for="node" id="violation">
17+
<default>false</default>
18+
</key>
19+
<key attr.name="isEntryNode" attr.type="boolean" for="node" id="entry">
20+
<default>false</default>
21+
</key>
22+
<key attr.name="isSinkNode" attr.type="boolean" for="node" id="sink">
23+
<default>false</default>
24+
</key>
25+
<key attr.name="enterLoopHead" attr.type="boolean" for="edge" id="enterLoopHead">
26+
<default>false</default>
27+
</key>
28+
<key attr.name="threadNumber" attr.type="int" for="node" id="thread">
29+
<default>0</default>
30+
</key>
31+
<key attr.name="sourcecodeLanguage" attr.type="string" for="graph" id="sourcecodelang"/>
32+
<key attr.name="programFile" attr.type="string" for="graph" id="programfile"/>
33+
<key attr.name="programHash" attr.type="string" for="graph" id="programhash"/>
34+
<key attr.name="specification" attr.type="string" for="graph" id="specification"/>
35+
<key attr.name="architecture" attr.type="string" for="graph" id="architecture"/>
36+
<key attr.name="producer" attr.type="string" for="graph" id="producer"/>
37+
<key attr.name="sourcecode" attr.type="string" for="edge" id="sourcecode"/>
38+
<key attr.name="startline" attr.type="int" for="edge" id="startline"/>
39+
<key attr.name="control" attr.type="string" for="edge" id="control"/>
40+
<key attr.name="assumption" attr.type="string" for="edge" id="assumption"/>
41+
<key attr.name="assumption.resultfunction" attr.type="string" for="edge" id="assumption.resultfunction"/>
42+
<key attr.name="assumption.scope" attr.type="string" for="edge" id="assumption.scope"/>
43+
<key attr.name="enterFunction" attr.type="string" for="edge" id="enterFunction"/>
44+
<key attr.name="returnFromFunction" attr.type="string" for="edge" id="returnFrom"/>
45+
<key attr.name="witness-type" attr.type="string" for="graph" id="witness-type"/>
46+
<graph edgedefault="directed">
47+
<data key="sourcecodelang">C</data>
48+
<node id="sink"/>
49+
<node id="33.22">
50+
<data key="entry">true</data>
51+
</node>
52+
<edge source="33.22" target="4.29">
53+
<data key="originfile">main.c</data>
54+
<data key="startline">21</data>
55+
</edge>
56+
<node id="4.29"/>
57+
<edge source="4.29" target="29.31">
58+
<data key="originfile">main.c</data>
59+
<data key="startline">29</data>
60+
<data key="assumption.scope">main</data>
61+
</edge>
62+
<node id="29.31"/>
63+
<edge source="29.31" target="5.33">
64+
<data key="originfile">main.c</data>
65+
<data key="startline">15</data>
66+
<data key="assumption.scope">remove_one</data>
67+
</edge>
68+
<node id="5.33">
69+
<data key="violation">true</data>
70+
</node>
71+
<edge source="5.33" target="sink">
72+
<data key="originfile">main.c</data>
73+
<data key="startline">31</data>
74+
</edge>
75+
</graph>
76+
</graphml>
77+
--
78+
^warning: ignoring

0 commit comments

Comments
 (0)