mirror of
https://github.com/Z3Prover/z3
synced 2025-05-15 11:44:44 +00:00
add at-least and pbge to API, fix for issue #864
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c69a86e647
commit
8d09b6e4a8
11 changed files with 182 additions and 48 deletions
|
@ -402,6 +402,20 @@ namespace smt {
|
|||
|
||||
#endif
|
||||
|
||||
bool context::validate_justification(bool_var v, bool_var_data const& d, b_justification const& j) {
|
||||
if (j.get_kind() == b_justification::CLAUSE && v != true_bool_var) {
|
||||
clause* cls = j.get_clause();
|
||||
unsigned num_lits = cls->get_num_literals();
|
||||
literal l = cls->get_literal(0);
|
||||
if (l.var() != v) {
|
||||
l = cls->get_literal(1);
|
||||
}
|
||||
SASSERT(l.var() == v);
|
||||
SASSERT(m_assignment[l.index()] == l_true);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool context::validate_model() {
|
||||
if (!m_proto_model) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue