64 return std::string(ipasir_signature());
69 for(
const auto &literal : bv)
73 else if(!literal.is_false())
77 "reject out of bound variables");
81 for(
const auto &literal : bv)
83 if(!literal.is_false())
86 ipasir_add(
solver, literal.dimacs());
99 static size_t cnf_clause_index = 0;
107 bv, cnf, cnf_clause_index, !clause_removed);
121 bvt::const_iterator it =
122 std::find_if(assumptions.begin(), assumptions.end(),
is_false);
123 const bool has_false = it != assumptions.end();
127 log.
status() <<
"got FALSE as assumption: instance is UNSATISFIABLE"
132 for(
const auto &literal : assumptions)
134 if(!literal.is_true())
135 ipasir_assume(
solver, literal.dimacs());
139 int solver_state = ipasir_solve(
solver);
140 if(10 == solver_state)
146 else if(20 == solver_state)
152 log.
status() <<
"SAT checker: solving returned without solution"
155 "solving inside IPASIR SAT solver has been interrupted");
166 INVARIANT(
false,
"method not supported");
Thrown when an unexpected error occurs during the analysis (e.g., when the SAT solver returns an erro...
bool process_clause(const bvt &bv, bvt &dest) const
filter 'true' from clause, eliminate duplicates, recognise trivially satisfied clauses
virtual size_t no_variables() const override
std::unique_ptr< clause_hardness_collectort > solver_hardness
mstreamt & statistics() const
mstreamt & status() const
tvt l_get(literalt a) const override final
This method returns the truth value for a literal of the current SAT model.
virtual ~satcheck_ipasirt() override
satcheck_ipasirt(message_handlert &message_handler)
std::string solver_text() const override
This method returns the description produced by the linked SAT solver.
void lcnf(const bvt &bv) override final
void set_assignment(literalt a, bool value) override
bool is_in_conflict(literalt a) const override
Returns true if an assumption is in the final conflict.
resultt do_prop_solve(const bvt &assumptions) override
bool is_false(const literalt &l)
std::vector< literalt > bvt
void solver(std::vector< framet > &frames, const std::unordered_set< symbol_exprt, irep_hash > &address_taken, const solver_optionst &solver_options, const namespacet &ns, std::vector< propertyt > &properties, std::size_t property_index)
#define INVARIANT(CONDITION, REASON)
This macro uses the wrapper function 'invariant_violated_string'.