File tree Expand file tree Collapse file tree 4 files changed +15
-20
lines changed Expand file tree Collapse file tree 4 files changed +15
-20
lines changed Original file line number Diff line number Diff line change 1
- CORE broken-z3 -smt-backend
1
+ CORE thorough -smt-backend
2
2
main.c
3
3
--bounds-check --pointer-check
4
4
^EXIT=10$
@@ -12,3 +12,6 @@ payload\[\(.*\)[kl]2\]: FAILURE
12
12
\[\(.*\)i\]: FAILURE
13
13
dest\[\(.*\)j\]: FAILURE
14
14
payload\[\(.*\)[kl]\]: FAILURE
15
+ --
16
+ Appears to take Z3 more than 10 minutes to solve, and approximately 500 seconds
17
+ when using the in-tree SMT solver.
Original file line number Diff line number Diff line change 1
- CORE broken-z3-smt-backend
1
+ CORE
2
2
union_member.c
3
3
4
4
^EXIT=10$
@@ -8,6 +8,3 @@ union_member.c
8
8
^VERIFICATION FAILED$
9
9
--
10
10
^warning: ignoring
11
- --
12
- This fails when using the SMT backend with Z3 with the error message
13
- "select requires 1 arguments, but was provided with 2 arguments"
Original file line number Diff line number Diff line change 1
- CORE broken-z3-smt-backend
1
+ CORE
2
2
union_update.c
3
3
4
4
^EXIT=10$
@@ -8,6 +8,3 @@ union_update.c
8
8
^VERIFICATION FAILED$
9
9
--
10
10
^warning: ignoring
11
- --
12
- This fails when using the SMT backend with Z3 with the error message
13
- "store expects the first argument sort to be an array".
Original file line number Diff line number Diff line change @@ -5459,20 +5459,18 @@ bool smt2_convt::use_array_theory(const exprt &expr)
5459
5459
const typet &type = expr.type ();
5460
5460
PRECONDITION (type.id ()==ID_array);
5461
5461
5462
- if (use_datatypes)
5462
+ // a union is always flattened; else always use array theory when we have
5463
+ // datatypes
5464
+ if (expr.id () == ID_with)
5465
+ return use_array_theory (to_with_expr (expr).old ());
5466
+ else if (auto member = expr_try_dynamic_cast<member_exprt>(expr))
5463
5467
{
5464
- return true ; // always use array theory when we have datatypes
5468
+ // arrays inside structs get flattened, unless we have datatypes
5469
+ return use_datatypes && member->compound ().type ().id () != ID_union &&
5470
+ member->compound ().type ().id () != ID_union_tag;
5465
5471
}
5466
5472
else
5467
- {
5468
- // arrays inside structs or unions get flattened
5469
- if (expr.id ()==ID_with)
5470
- return use_array_theory (to_with_expr (expr).old ());
5471
- else if (expr.id ()==ID_member)
5472
- return false ;
5473
- else
5474
- return true ;
5475
- }
5473
+ return true ;
5476
5474
}
5477
5475
5478
5476
void smt2_convt::convert_type (const typet &type)
You can’t perform that action at this time.
0 commit comments