Skip to content

Commit aeb3420

Browse files
Use ASTs in convert_expr
This is in preparation for making convert_expr return an AST.
1 parent 8c3a118 commit aeb3420

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/solvers/smt2/smt2_conv.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -791,19 +791,21 @@ void smt2_convt::convert_expr(const exprt &expr)
791791
{
792792
const irep_idt &id = to_symbol_expr(expr).get_identifier();
793793
DATA_INVARIANT(!id.empty(), "symbol must have identifier");
794-
out << '|' << convert_identifier(id) << '|';
794+
print(smt2_astt("|" + convert_identifier(id) + '|'), out);
795795
}
796796
else if(expr.id()==ID_nondet_symbol)
797797
{
798798
const irep_idt &id = to_nondet_symbol_expr(expr).get_identifier();
799799
DATA_INVARIANT(!id.empty(), "nondet symbol must have identifier");
800-
out << '|' << convert_identifier("nondet_"+id2string(id)) << '|';
800+
print(
801+
smt2_astt("|" + convert_identifier("nondet_" + id2string(id)) + "|"),
802+
out);
801803
}
802804
else if(expr.id()==ID_smt2_symbol)
803805
{
804806
const irep_idt &id = to_smt2_symbol(expr).get_identifier();
805807
DATA_INVARIANT(!id.empty(), "smt2 symbol must have identifier");
806-
out << id;
808+
print(smt2_astt(id2string(id)), out);
807809
}
808810
else if(expr.id()==ID_typecast)
809811
{

0 commit comments

Comments
 (0)