Skip to content

Commit 5fe1967

Browse files
committed
Use set_to_true in convert_decls
This avoids creating a variable that is equal to the truth value of the equality. While at it, also add a call to merge_irep to clean up the equality expression that was created.
1 parent 9d66549 commit 5fe1967

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/goto-symex/symex_target_equation.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -386,11 +386,10 @@ void symex_target_equationt::convert_decls(
386386
{
387387
if(step.is_decl() && !step.ignore && !step.converted)
388388
{
389-
// The result is not used, these have no impact on
390-
// the satisfiability of the formula.
391-
decision_procedure.handle(step.cond_expr);
392-
decision_procedure.handle(
393-
equal_exprt{step.ssa_full_lhs, step.ssa_full_lhs});
389+
decision_procedure.set_to_true(step.cond_expr);
390+
equal_exprt eq{step.ssa_full_lhs, step.ssa_full_lhs};
391+
merge_irep(eq);
392+
decision_procedure.set_to_true(eq);
394393
step.converted = true;
395394
with_solver_hardness(
396395
decision_procedure, hardness_register_ssa(step_index, step));

0 commit comments

Comments
 (0)