Skip to content

Commit a7be3a6

Browse files
author
martin
committed
Update and check the test cases. FUTURE for things where precision is currently insufficient.
1 parent 0a5d365 commit a7be3a6

File tree

29 files changed

+153
-45
lines changed

29 files changed

+153
-45
lines changed

regression/goto-analyzer/constant_propagation_01/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ constant_propagation1.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 12, function calls: 2$
88
--
99
^warning: ignoring
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Task defaults to --show
2+
Domain defaults to --constants
3+
GOTO-ANALYSER version 5.5 64-bit x86_64 linux
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
Reading GOTO program from `out.goto'
2+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3+
4+
main /* main */
5+
// 0 file constant_propagation_02.c line 5 function main
6+
signed int i;
7+
// 1 file constant_propagation_02.c line 5 function main
8+
i = 0;
9+
// 2 file constant_propagation_02.c line 5 function main
10+
signed int j;
11+
// 3 file constant_propagation_02.c line 5 function main
12+
j = 2;
13+
// 4 file constant_propagation_02.c line 7 function main
14+
IF FALSE THEN GOTO 1
15+
// 5 file constant_propagation_02.c line 9 function main
16+
0 = 1;
17+
// 6 file constant_propagation_02.c line 10 function main
18+
2 = 3;
19+
// 7 no location
20+
1: SKIP
21+
// 8 file constant_propagation_02.c line 12 function main
22+
ASSERT FALSE // assertion j!=3
23+
// 9 file constant_propagation_02.c line 12 function main
24+
GOTO 2
25+
// 10 file constant_propagation_02.c line 12 function main
26+
(void)0;
27+
// 11 no location
28+
2: SKIP
29+
// 12 file constant_propagation_02.c line 13 function main
30+
dead j;
31+
// 13 file constant_propagation_02.c line 13 function main
32+
dead i;
33+
// 14 file constant_propagation_02.c line 13 function main
34+
main#return_value = NONDET(signed int);
35+
// 15 file constant_propagation_02.c line 13 function main
36+
END_FUNCTION
37+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
38+
39+
_start /* _start */
40+
// 16 no location
41+
__CPROVER_initialize();
42+
// 17 file constant_propagation_02.c line 3
43+
main();
44+
// 18 file constant_propagation_02.c line 3
45+
return' = main#return_value;
46+
// 19 file constant_propagation_02.c line 3
47+
dead main#return_value;
48+
// 20 file constant_propagation_02.c line 3
49+
OUTPUT("return", return');
50+
// 21 no location
51+
END_FUNCTION
52+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53+
54+
__CPROVER_initialize /* __CPROVER_initialize */
55+
// 22 no location
56+
// Labels: __CPROVER_HIDE
57+
SKIP
58+
// 23 file <built-in-additions> line 39
59+
__CPROVER_dead_object = NULL;
60+
// 24 file <built-in-additions> line 38
61+
__CPROVER_deallocated = NULL;
62+
// 25 file <built-in-additions> line 42
63+
__CPROVER_malloc_is_new_array = FALSE;
64+
// 26 file <built-in-additions> line 40
65+
__CPROVER_malloc_object = NULL;
66+
// 27 file <built-in-additions> line 41
67+
__CPROVER_malloc_size = 0ul;
68+
// 28 file <built-in-additions> line 43
69+
__CPROVER_memory_leak = NULL;
70+
// 29 file <built-in-additions> line 31
71+
__CPROVER_next_thread_id = 0ul;
72+
// 30 file <built-in-additions> line 85
73+
__CPROVER_pipe_count = 0u;
74+
// 31 file <built-in-additions> line 65
75+
__CPROVER_rounding_mode = 0;
76+
// 32 file <built-in-additions> line 29
77+
__CPROVER_thread_id = 0ul;
78+
// 33 file <built-in-additions> line 30
79+
__CPROVER_threads_exited = ARRAY_OF(FALSE);
80+
// 34 no location
81+
END_FUNCTION

regression/goto-analyzer/constant_propagation_02/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ constant_propagation_02.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_03/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ constant_propagation_03.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_04/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ constant_propagation_04.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 6, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_05/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ constant_propagation_05.c
33
--constants --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file constant_propagation_05.c line 12 function main, assertion j!=3: FAILURE$
6+
^\[main.assertion.1\] file constant_propagation_05.c line 12 function main, assertion j!=3: FAILURE (if reachable)$
77
--
88
^warning: ignoring

regression/goto-analyzer/constant_propagation_06/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
constant_propagation_06.c
3-
--constants --intervals --verify
3+
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
66
^\[main.assertion.1\] file constant_propagation_06.c line 8 function main, assertion i>=10: SUCCESS$

regression/goto-analyzer/constant_propagation_07/test.desc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ constant_propagation_07.c
33
--constants --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file constant_propagation_07.c line 12 function main, assertion i<50: UNKNOWN$
7-
^\[main.assertion.2\] file constant_propagation_07.c line 13 function main, assertion i<51: SUCCESS$
6+
^\[main.assertion.1\] file constant_propagation_07.c line 12 function main, assertion i<51: UNKNOWN$
87
--
98
^warning: ignoring

regression/goto-analyzer/constant_propagation_08/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
CORE
1+
FUTURE
22
constant_propagation_08.c
3-
--constants --intervals --verify
3+
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
66
^\[main.assertion.1\] file constant_propagation_08.c line 12 function main, assertion i<50: UNKNOWN$

regression/goto-analyzer/constant_propagation_09/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
constant_propagation_09.c
3-
--constants --intervals --verify
3+
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
66
******** Function main

regression/goto-analyzer/constant_propagation_10/test.desc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ constant_propagation_10.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 4, assigns: 10, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 1, assigns: 10, function calls: 2$
88
--
99
^warning: ignoring
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
CORE
2-
constant_propagation_10.c
1+
FUTURE
2+
constant_propagation_11.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 2, assigns: 5, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 4, assigns: 13, function calls: 2$
88
--
99
^warning: ignoring
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
CORE
1+
FUTURE
22
constant_propagation_12.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 3, assigns: 4, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 0, assigns: 11, function calls: 2$
88
--
99
^warning: ignoring

regression/goto-analyzer/constant_propagation_13/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
FUTURE
22
constant_propagation_13.c
33
--constants --verify
44
^EXIT=0$

regression/goto-analyzer/constant_propagation_14/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
FUTURE
22
constant_propagation_14.c
33
--constants --simplify out.goto
44
^EXIT=0$
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
CORE
1+
FUTURE
22
constant_propagation_15.c
33
--constants --simplify out.goto
44
^EXIT=0$
55
^SIGNAL=0$
6-
^SIMPLIFIED: assert: 1, assume: 0, goto: 0$
7-
^UNKNOWN: assert: 0, assume: 0, goto: 0$
6+
^SIMPLIFIED: assert: 1, assume: 0, goto: 1, assigns: 4, function calls: 0$
7+
^UNMODIFIED: assert: 0, assume: 0, goto: 2, assigns: 11, function calls: 2$
88
--
99
^warning: ignoring
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CORE
1+
FUTURE
22
constant_propagation_16.c
33
--constants --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file constant_propagation_16.c line 9 function main, assertion y==0: FAILURE$
6+
^\[main.assertion.1\] file constant_propagation_16.c line 9 function main, assertion y==0: FAILURE (if reachable)$
77
--
88
^warning: ignoring

regression/goto-analyzer/constant_propagation_17/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
FUTURE
22
constant_propagation_17.c
33
--constants --verify
44
^EXIT=0$

regression/goto-analyzer/constant_propagation_18/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
FUTURE
22
constant_propagation_18.c
33
--constants --verify
44
^EXIT=0$
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
CORE
1+
FUTURE
22
intervals10.c
33
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
66
^\[main.assertion.1\] file intervals10.c line 8 function main, assertion j<=100: SUCCESS$
77
^\[main.assertion.2\] file intervals10.c line 11 function main, assertion j<101: SUCCESS$
8-
^\[main.assertion.3\] file intervals10.c line 14 function main, assertion j>100: UNKNOWN$
8+
^\[main.assertion.3\] file intervals10.c line 14 function main, assertion j>100: FAILURE (if reachable)$
99
^\[main.assertion.4\] file intervals10.c line 17 function main, assertion j<99: UNKNOWN$
10-
^\[main.assertion.5\] file intervals10.c line 20 function main, assertion j==100: UNKNOWN$
10+
^\[main.assertion.5\] file intervals10.c line 20 function main, assertion j==100: FAILURE (if reachable)$
1111
--
1212
^warning: ignoring

regression/goto-analyzer/intervals11/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
FUTURE
22
intervals11.c
33
--intervals --verify
44
^EXIT=0$
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#include <assert.h>
2+
3+
int main (void) {
4+
int i;
5+
int j;
6+
7+
if (i <= 0 && j < i)
8+
assert(j < 0);
9+
10+
if (j < i && i <= 0)
11+
assert(j < 0);
12+
13+
return 0;
14+
}
15+
16+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
FUTURE
2+
intervals12.c
3+
--intervals --verify
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
^[main.assertion.1] file intervals12.c line 8 function main, assertion j < 0: SUCCESS$
7+
^[main.assertion.2] file intervals12.c line 11 function main, assertion j < 0: SUCCESS$
8+
--
9+
^warning: ignoring
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CORE
1+
FUTURE
22
intervals6.c
33
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file intervals6.c line 7 function main, assertion x < -10 || x > 100: UNKNOWN$
6+
^\[main.assertion.1\] file intervals6.c line 7 function main, assertion x < -10 || x > 100: FAILURE (if reachable)$
77
--
88
^warning: ignoring
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CORE
1+
FUTURE
22
intervals7.c
33
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file intervals7.c line 7 function main, assertion x < -10 && x > 100: UNKNOWN$
6+
^\[main.assertion.1\] file intervals7.c line 7 function main, assertion x < -10 && x > 100: FAILURE (if reachable)$
77
--
88
^warning: ignoring
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
CORE
1+
FUTURE
22
intervals8.c
33
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file intervals8.c line 6 function main, assertion x < -10 && x < 100: UNKNOWN$
6+
^\[main.assertion.1\] file intervals8.c line 6 function main, assertion x < -10 && x < 100: FAILURE (if reachable)$
77
--
88
^warning: ignoring

regression/goto-analyzer/intervals9/intervals9.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//#include <assert.h>
1+
#include <assert.h>
22

33
int main()
44
{

regression/goto-analyzer/intervals9/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ intervals9.c
33
--intervals --verify
44
^EXIT=0$
55
^SIGNAL=0$
6-
^\[main.assertion.1\] file intervals9.c line 9 function main, assertion i >= 1 && i <= 2: SUCCESS$
6+
^\[main.assertion.1\] file intervals9.c line 9 function main, assertion i>=1 && i<=2: SUCCESS$
77
--
88
^warning: ignoring

0 commit comments

Comments
 (0)