Skip to content

Commit dc975d5

Browse files
committed
Add handling of "unknown" SMT outcome
Currently it is possible for z3 (and maybe other SMT solvers) to return a satisfiability result of "unknown". At the moment this is treated as an ERROR outcome in cbmc. This commit changes the error message handling to output why the result was ERROR by reporting the "unknown" satisfiability result.
1 parent 00c32e3 commit dc975d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/solvers/smt2/smt2_dec.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ decision_proceduret::resultt smt2_dect::read_result(std::istream &in)
154154
res=resultt::D_SATISFIABLE;
155155
else if(parsed.id()=="unsat")
156156
res=resultt::D_UNSATISFIABLE;
157+
else if(parsed.id() == "unknown")
158+
{
159+
messaget log{message_handler};
160+
log.error() << "SMT2 solver returned \"unknown\"" << messaget::eom;
161+
return decision_proceduret::resultt::D_ERROR;
162+
}
157163
else if(
158164
parsed.id().empty() && parsed.get_sub().size() == 1 &&
159165
parsed.get_sub().front().get_sub().size() == 2)

0 commit comments

Comments
 (0)