mirror of
https://github.com/Z3Prover/z3
synced 2025-08-12 22:20:54 +00:00
adding user-propagator ability
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
c13e3ce693
commit
152c95f72a
15 changed files with 305 additions and 21 deletions
|
@ -150,6 +150,18 @@ namespace smt {
|
|||
return lit;
|
||||
}
|
||||
|
||||
literal theory::mk_literal(expr* _e) {
|
||||
expr_ref e(_e, m);
|
||||
bool is_not = m.is_not(_e, _e);
|
||||
if (!ctx.e_internalized(_e)) {
|
||||
ctx.internalize(_e, is_quantifier(_e));
|
||||
}
|
||||
literal lit = ctx.get_literal(_e);
|
||||
ctx.mark_as_relevant(lit);
|
||||
if (is_not) lit.neg();
|
||||
return lit;
|
||||
}
|
||||
|
||||
enode* theory::ensure_enode(expr* e) {
|
||||
if (!ctx.e_internalized(e)) {
|
||||
ctx.internalize(e, is_quantifier(e));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue