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
22main.c
33--bounds-check --pointer-check
44^EXIT=10$
@@ -12,3 +12,6 @@ payload\[\(.*\)[kl]2\]: FAILURE
1212\[\(.*\)i\]: FAILURE
1313dest\[\(.*\)j\]: FAILURE
1414payload\[\(.*\)[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
22union_member.c
33
44^EXIT=10$
@@ -8,6 +8,3 @@ union_member.c
88^VERIFICATION FAILED$
99--
1010^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
22union_update.c
33
44^EXIT=10$
@@ -8,6 +8,3 @@ union_update.c
88^VERIFICATION FAILED$
99--
1010^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)
54595459 const typet &type = expr.type ();
54605460 PRECONDITION (type.id ()==ID_array);
54615461
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))
54635467 {
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;
54655471 }
54665472 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 ;
54765474}
54775475
54785476void smt2_convt::convert_type (const typet &type)
You can’t perform that action at this time.
0 commit comments