Skip to content

Commit 50154b6

Browse files
authored
Merge pull request #5316 from thk123/print-status-during-incremental-solving
Incremental solving producing cprover status as it goes
2 parents 79b512e + 4972f54 commit 50154b6

File tree

12 files changed

+115
-0
lines changed

12 files changed

+115
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
CORE
22
main.c
33
--incremental-loop main.0 --unwind-max 15
4+
activate-multi-line-match
45
^EXIT=0$
56
^SIGNAL=0$
67
^VERIFICATION SUCCESSFUL$
8+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 15
79
--
810
^warning: ignoring

regression/cbmc-incr-oneloop/alarm2/test-json-output.desc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ main.c
55
^SIGNAL=0$
66
"messageText": "VERIFICATION FAILED"
77
"currentUnwinding": 1
8+
"incrementalStatus": "INCONCLUSIVE"
89
--
910
^warning: ignoring

regression/cbmc-incr-oneloop/alarm2/test-xml-output.desc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ main.c
66
<text>VERIFICATION FAILED</text>
77
<current-unwinding>1</current-unwinding>
88
<refinement-iteration>1</refinement-iteration>
9+
<incremental-status>INCONCLUSIVE</incremental-status>
910
--
1011
^warning: ignoring
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
CORE
22
main.c
33
--incremental-loop main.0 --unwind-min 5 --unwind-max 10
4+
activate-multi-line-match
45
Current unwinding: 1
6+
Incremental status: INCONCLUSIVE
7+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 6
8+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 7
59
^EXIT=10$
610
^SIGNAL=0$
711
^VERIFICATION FAILED$
812
--
913
^warning: ignoring
14+
--
15+
The multi-line match is added to verify that an incremental status is printed immediately after each unwinding
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
CORE
2+
test.c
3+
--incremental-loop main.0 --no-propagation
4+
activate-multi-line-match
5+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 2
6+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 6
7+
Incremental status: FAILURE\nCurrent unwinding: 7
8+
^EXIT=10$
9+
^SIGNAL=0$
10+
^VERIFICATION FAILED$
11+
--
12+
^warning: ignoring
13+
--
14+
Ensure that with multiple properties, the incremental status
15+
switches to failure as soon as one property has been falsified
16+
but keeps unwinding till it has resolved them all
17+
18+
Use `--no-propagation` to ensure that even the output is the same regardless of whether the asserts are checked via the solver or the constant propagator
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
int main()
2+
{
3+
for(int i = 0; i < 10; ++i)
4+
{
5+
assert(i != 5);
6+
assert(i != 8);
7+
}
8+
return 0;
9+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
CORE
2+
test.c
3+
--incremental-loop main.0
4+
activate-multi-line-match
5+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 2
6+
Incremental status: INCONCLUSIVE\nCurrent unwinding: 6
7+
Incremental status: FAILURE\nCurrent unwinding: 7
8+
^EXIT=10$
9+
^SIGNAL=0$
10+
^VERIFICATION FAILED$
11+
--
12+
^warning: ignoring
13+
--
14+
Ensure that with multiple properties, the incremental status
15+
switches to failure as soon as one property has been falsified
16+
but keeps unwinding till it has resolved them all
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int main()
2+
{
3+
for(int i = 0; i < 10; ++i)
4+
{
5+
}
6+
// nothing to check
7+
return 0;
8+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
CORE
2+
test.c
3+
--incremental-loop main.0
4+
activate-multi-line-match
5+
^EXIT=0$
6+
^SIGNAL=0$
7+
VERIFICATION SUCCESSFUL
8+
--
9+
Incremental status
10+
--
11+
Verify no incremental status updates when no properties to check
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
int main()
2+
{
3+
for(int i = 0; i < 10; ++i)
4+
{
5+
assert(i != 10);
6+
}
7+
return 0;
8+
}

0 commit comments

Comments
 (0)