Skip to content

Commit 93e7d5b

Browse files
committed
SMT2 back-end: do not flatten flattened arrays
convert_expr may flatten an array anyway, in which case flatten_array would generate select statements over bitvectors instead of arrays (as flatten_array itself invokes convert_expr to supposedly construct the array expression).
1 parent 06b377d commit 93e7d5b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3060,7 +3060,7 @@ void smt2_convt::convert_struct(const struct_exprt &expr)
30603060
exprt op=expr.operands()[i-1];
30613061

30623062
// may need to flatten array-theory arrays in there
3063-
if(op.type().id() == ID_array)
3063+
if(op.type().id() == ID_array && use_array_theory(op))
30643064
flatten_array(op);
30653065
else if(op.type().id() == ID_bool)
30663066
flatten2bv(op);

0 commit comments

Comments
 (0)