Skip to content

Commit e355fab

Browse files
committed
Add test 56-witness/76-apron-unassume-extra-trivial
1 parent 379b3a1 commit e355fab

File tree

3 files changed

+59
-1
lines changed

3 files changed

+59
-1
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// SKIP PARAM: --set ana.activated[+] apron --set ana.apron.domain polyhedra --set ana.activated[+] unassume --set witness.yaml.unassume 76-apron-unassume-extra-trivial.yml
2+
#include <assert.h>
3+
// Using polyhedra instead of octagon, because the former has no narrowing and really needs the witness.
4+
int main() {
5+
int i = 0;
6+
while (i < 100) { // TODO: location invariant before loop doesn't work anymore
7+
i++;
8+
}
9+
assert(i == 100);
10+
return 0;
11+
}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
- entry_type: invariant_set
2+
metadata:
3+
format_version: "2.0"
4+
uuid: 0a72f7b3-7826-4f68-bc7b-25425e95946e
5+
creation_time: 2022-07-26T09:11:03Z
6+
producer:
7+
name: Goblint
8+
version: heads/yaml-witness-unassume-0-g48503c690-dirty
9+
command_line: '''./goblint'' ''--enable'' ''dbg.debug'' ''--enable'' ''dbg.regression''
10+
''--html'' ''--set'' ''ana.activated[+]'' ''apron'' ''--enable'' ''witness.yaml.enabled''
11+
''76-apron-unassume-extra-trivial.c'''
12+
task:
13+
input_files:
14+
- 76-apron-unassume-extra-trivial.c
15+
input_file_hashes:
16+
76-apron-unassume-extra-trivial.c: 71e40ed99b5217343d0831e293e7207e5bd30ce53f6ab73f0c1ef6ced1afcc60
17+
data_model: LP64
18+
language: C
19+
content:
20+
- invariant:
21+
type: loop_invariant
22+
location:
23+
file_name: 76-apron-unassume-extra-trivial.c
24+
line: 6
25+
column: 3
26+
function: main
27+
value: 100LL - (long long )i >= 0LL
28+
format: c_expression
29+
- invariant:
30+
type: loop_invariant
31+
location:
32+
file_name: 76-apron-unassume-extra-trivial.c
33+
line: 6
34+
column: 3
35+
function: main
36+
value: (long long )i >= 0LL
37+
format: c_expression
38+
- invariant:
39+
type: loop_invariant
40+
location:
41+
file_name: 76-apron-unassume-extra-trivial.c
42+
line: 6
43+
column: 3
44+
function: main
45+
value: '1'
46+
format: c_expression

tests/regression/56-witness/dune

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
(run %{update_suite} apron-unassume-precheck -q)
2424
(run %{update_suite} apron-tracked-global-annot -q)
2525
(run %{update_suite} apron-unassume-no-strengthening -q)
26-
(run %{update_suite} apron-unassume-set-tokens -q)))))
26+
(run %{update_suite} apron-unassume-set-tokens -q)
27+
(run %{update_suite} apron-unassume-extra-trivial -q)))))
2728

2829
(cram
2930
(deps (glob_files *.c) (glob_files ??-*.yml) (glob_files strip-ghost-alloc.sh)))

0 commit comments

Comments
 (0)