Skip to content

Commit e61f443

Browse files
tautschnigDaniel Kroening
authored and
Daniel Kroening
committed
SMT2 conversion: permit single-operand concatenation
This is a no-op (with the requirement that types match), but permissible in our expression model.
1 parent 6c8d919 commit e61f443

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,15 @@ void smt2_convt::convert_expr(const exprt &expr)
918918
{
919919
convert_constant(to_constant_expr(expr));
920920
}
921+
else if(expr.id() == ID_concatenation && expr.operands().size() == 1)
922+
{
923+
DATA_INVARIANT_WITH_DIAGNOSTICS(
924+
expr.type() == expr.operands().front().type(),
925+
"concatenation over a single operand should have matching types",
926+
expr.pretty());
927+
928+
convert_expr(expr.operands().front());
929+
}
921930
else if(expr.id()==ID_concatenation ||
922931
expr.id()==ID_bitand ||
923932
expr.id()==ID_bitor ||

0 commit comments

Comments
 (0)