Skip to content

Commit 5b0e207

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 0e96666 commit 5b0e207

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
@@ -3148,7 +3148,7 @@ void smt2_convt::convert_struct(const struct_exprt &expr)
31483148
exprt op=expr.operands()[i-1];
31493149

31503150
// may need to flatten array-theory arrays in there
3151-
if(op.type().id() == ID_array)
3151+
if(op.type().id() == ID_array && use_array_theory(op))
31523152
flatten_array(op);
31533153
else if(op.type().id() == ID_bool)
31543154
flatten2bv(op);

0 commit comments

Comments
 (0)