Skip to content

Commit

Permalink
Throw exception when IC3 bad state reachability check result is unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoKobalamyne committed Sep 14, 2024
1 parent 58f61e1 commit 7c1d536
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions engines/ic3base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@

#include "engines/ic3base.h"

#include "assert.h"
#include <cassert>

#include "smt/available_solvers.h"
#include "utils/exceptions.h"
#include "utils/logger.h"
#include "utils/term_analysis.h"

using namespace smt;
using namespace std;
Expand Down Expand Up @@ -366,7 +367,10 @@ bool IC3Base::reaches_bad(IC3Formula & out)

pop_solver_context();

assert(!r.is_unknown());
if (r.is_unknown()) {
throw PonoException("Bad state check in IC3 returned unknown");
}

return r.is_sat();
}

Expand Down Expand Up @@ -648,7 +652,7 @@ bool IC3Base::block_all()
} // end while(!proof_goals.empty())

assert(!(goal = IC3Formula()).term); // in debug mode, reset it
} // end while(reaches_bad(goal))
} // end while(reaches_bad(goal))

assert(proof_goals.empty());
return true;
Expand Down

0 comments on commit 7c1d536

Please sign in to comment.