Skip to content

Commit e69d3ac

Browse files
Use ASTs in convert_expr
This is in preparation for making convert_expr return an AST.
1 parent 9fd9d95 commit e69d3ac

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
@@ -880,19 +880,21 @@ void smt2_convt::convert_expr(const exprt &expr)
880880
{
881881
const irep_idt &id = to_symbol_expr(expr).get_identifier();
882882
DATA_INVARIANT(!id.empty(), "symbol must have identifier");
883-
out << '|' << convert_identifier(id) << '|';
883+
smt2_ast_symbolt::make(
884+
"|" + convert_identifier(id) + '|')->print(out);
884885
}
885886
else if(expr.id()==ID_nondet_symbol)
886887
{
887888
const irep_idt &id = to_nondet_symbol_expr(expr).get_identifier();
888889
DATA_INVARIANT(!id.empty(), "nondet symbol must have identifier");
889-
out << '|' << convert_identifier("nondet_"+id2string(id)) << '|';
890+
smt2_ast_symbolt::make(
891+
"|" + convert_identifier("nondet_"+id2string(id)) + "|")->print(out);
890892
}
891893
else if(expr.id()==ID_smt2_symbol)
892894
{
893895
const irep_idt &id = to_smt2_symbol(expr).get_identifier();
894896
DATA_INVARIANT(!id.empty(), "smt2 symbol must have identifier");
895-
out << id;
897+
smt2_ast_symbolt::make(id2string(id))->print(out);
896898
}
897899
else if(expr.id()==ID_typecast)
898900
{

0 commit comments

Comments
 (0)