22 inline DdNode *DD::getNode()
const
88 return "QBF/BDD/CORE";
106 unsigned var=it->var_no;
108 if(it->type==quantifiert::EXISTENTIAL)
111 std::cout <<
"BDD E: " << var <<
", " <<
112 matrix->nodeCount() <<
" nodes\n";
115 BDD *model=
new BDD();
117 *model=
matrix->AndAbstract(
127 it->type == quantifiert::UNIVERSAL,
128 "only handles quantified variables");
130 std::cout <<
"BDD A: " << var <<
", " <<
131 matrix->nodeCount() <<
" nodes\n";
141 return P_SATISFIABLE;
146 return P_UNSATISFIABLE;
167 BDD &var=*(
new BDD());
242 status() <<
"Compressing Certificate" << eom;
246 if(quantifier.type==quantifiert::EXISTENTIAL)
249 const BDD &model=*
model_bdds[quantifier.var_no];
259 model2=model2.AndAbstract(~var, var);
261 model2=model2.AndAbstract(var, var);
275 if(q.
type==quantifiert::UNIVERSAL)
277 INVARIANT(l.
var_no() != 0,
"input literal wasn't properly initialized");
281 it !=
variable_map.end(),
"variable not found in the variable map");
283 const exprt &sym=it->second.first;
284 unsigned index=it->second.second;
289 extract_expr.negate();
297 q.
type == quantifiert::EXISTENTIAL,
298 "only quantified literals are supported");
304 std::cout <<
"CACHE HIT for " << l.
dimacs() <<
'\n';
317 "there must be a model BDD for the literal");
321 std::cout <<
"Model " << l.
var_no() <<
'\n';
322 model.PrintMinterm();
340 std::cout <<
"CUBE: ";
342 std::cout << cube[i];
374 else if(result.
operands().size()==1)
bool process_clause(const bvt &bv, bvt &dest) const
filter 'true' from clause, eliminate duplicates, recognise trivially satisfied clauses
virtual literalt new_variable() override
Generate a new variable and return it as a literal.
virtual size_t no_variables() const override
Base class for all expressions.
void copy_to_operands(const exprt &expr)
Copy the given argument to the end of exprt's operands.
void add_to_operands(const exprt &expr)
Add the given argument to the end of exprt's operands.
The Boolean constant false.
Unbounded, signed integers (mathematical integers, not bitvectors)
tvt l_get(literalt a) const override
const exprt f_get(literalt l) override
~qbf_bdd_certificatet(void) override
qbf_bdd_certificatet(void)
function_cachet function_cache
literalt new_variable(void) override
Generate a new variable and return it as a literal.
literalt new_variable() override
Generate a new variable and return it as a literal.
void lcnf(const bvt &bv) override
bool is_in_core(literalt l) const override
resultt prop_solve() override
~qbf_bdd_coret() override
tvt l_get(literalt a) const override
bdd_variable_mapt bdd_variable_map
modeltypet m_get(literalt a) const override
std::string solver_text() const override
literalt lor(literalt a, literalt b) override
void compress_certificate(void)
virtual void add_quantifier(const quantifiert &quantifier)
bool find_quantifier(const literalt l, quantifiert &q) const
bool is_quantified(const literalt l) const
void simplify_extractbits(exprt &expr) const
variable_mapt variable_map
The Boolean constant true.
std::vector< literalt > bvt
literalt const_literal(bool value)
#define PRECONDITION_WITH_DIAGNOSTICS(CONDITION,...)
#define UNREACHABLE
This should be used to mark dead code.
API to expression classes.
std::string to_string(const string_not_contains_constraintt &expr)
Used for debug printing.