Skip to content

Commit 7f085d8

Browse files
Use ASTs in convert_expr
This is in preparation for making convert_expr return an AST.
1 parent 81f6ddf commit 7f085d8

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
@@ -862,19 +862,21 @@ void smt2_convt::convert_expr(const exprt &expr)
862862
{
863863
const irep_idt &id = to_symbol_expr(expr).get_identifier();
864864
DATA_INVARIANT(!id.empty(), "symbol must have identifier");
865-
out << '|' << convert_identifier(id) << '|';
865+
smt2_ast_symbolt::make(
866+
"|" + convert_identifier(id) + '|')->print(out);
866867
}
867868
else if(expr.id()==ID_nondet_symbol)
868869
{
869870
const irep_idt &id = to_nondet_symbol_expr(expr).get_identifier();
870871
DATA_INVARIANT(!id.empty(), "nondet symbol must have identifier");
871-
out << '|' << convert_identifier("nondet_"+id2string(id)) << '|';
872+
smt2_ast_symbolt::make(
873+
"|" + convert_identifier("nondet_"+id2string(id)) + "|")->print(out);
872874
}
873875
else if(expr.id()==ID_smt2_symbol)
874876
{
875877
const irep_idt &id = to_smt2_symbol(expr).get_identifier();
876878
DATA_INVARIANT(!id.empty(), "smt2 symbol must have identifier");
877-
out << id;
879+
smt2_ast_symbolt::make(id2string(id))->print(out);
878880
}
879881
else if(expr.id()==ID_typecast)
880882
{

0 commit comments

Comments
 (0)