Skip to content

Commit

Permalink
graphml: More precise detection of when to use '\result' variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
marek-trtik committed Nov 27, 2017
1 parent 0d3c7fb commit 9bdb376
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/goto-programs/graphml_witness.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ std::string graphml_witnesst::convert_assign_rec(
exprt clean_lhs=assign.lhs();
remove_l0_l1(clean_lhs);
std::string lhs=from_expr(ns, identifier, clean_lhs);
if(lhs.find('$')!=std::string::npos)
if(lhs.find("#return_value")!=std::string::npos ||
(lhs.find('$')!=std::string::npos &&
lhs.find("return_value___VERIFIER_nondet_")==0U))
lhs="\\result";

result=lhs+" = "+from_expr(ns, identifier, clean_rhs)+";";
Expand Down

0 comments on commit 9bdb376

Please sign in to comment.