Skip to content

Commit b3211bf

Browse files
author
Enrico Steffinlongo
authored
Merge pull request #7002 from esteffin/esteffin/non-smt2-standard-array-support
Regression tests for non-SMT2.6-standard array support
2 parents 8f14711 + add779a commit b3211bf

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
int main()
2+
{
3+
__CPROVER_bool bool_array[100];
4+
unsigned int index;
5+
__CPROVER_assume(index < 10000);
6+
bool_array[index] = 1;
7+
__CPROVER_assert(bool_array[index], "Array condition");
8+
__CPROVER_assert(!bool_array[index], "Array condition");
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
KNOWNBUG
2+
bool_array_write.c
3+
4+
Passing problem to incremental SMT2 solving
5+
\[main\.assertion\.1\] line \d+ Array condition: SUCCESS
6+
\[main\.assertion\.2\] line \d+ Array condition: FAILURE
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
--
11+
Test of updating the value at an index of a __CPROVER_bool (boolean) array.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
int main()
2+
{
3+
int example_array[10000][2000];
4+
unsigned int index_i;
5+
unsigned int index_j;
6+
__CPROVER_assume(index_i < 10000);
7+
__CPROVER_assume(index_j < 2000);
8+
example_array[index_i][index_j] = 42;
9+
__CPROVER_assert(example_array[index_i][index_j] == 42, "Array condition");
10+
__CPROVER_assert(example_array[index_i][index_j] != 42, "Array condition");
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
KNOWNBUG
2+
multi_dimension_array_write.c
3+
4+
Passing problem to incremental SMT2 solving
5+
\[main\.assertion\.1\] line \d+ Array condition: SUCCESS
6+
\[main\.assertion\.2\] line \d+ Array condition: FAILURE
7+
^EXIT=10$
8+
^SIGNAL=0$
9+
--
10+
--
11+
Test of updating the value at an index of a __CPROVER_bool (boolean) array.

0 commit comments

Comments
 (0)