Skip to content

Commit 0cf7793

Browse files
committed
Do not ignore SMT solver failures
`check_sat` in scratch_programt was treating UNSAT and ERROR as the same. This was causing SMT solver errors to be silently ignored, and be treated as UNSAT results instead.
1 parent db8e258 commit 0cf7793

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/goto-instrument/accelerate/scratch_program.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,12 @@ bool scratch_programt::check_sat(bool do_slice, guard_managert &guard_manager)
7171
std::cout << "Finished symex, invoking decision procedure.\n";
7272
#endif
7373

74-
return ((*checker)() == decision_proceduret::resultt::D_SATISFIABLE);
74+
auto result = (*checker)();
75+
INVARIANT(
76+
result != decision_proceduret::resultt::D_ERROR,
77+
"Error running the SMT solver");
78+
79+
return (result == decision_proceduret::resultt::D_SATISFIABLE);
7580
}
7681

7782
exprt scratch_programt::eval(const exprt &e)

0 commit comments

Comments
 (0)