3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 20:05:51 +00:00
This commit is contained in:
Nikolaj Bjorner 2022-01-15 18:01:31 -08:00
parent 1b5f7cd9e5
commit bc9c6ad93d
3 changed files with 12 additions and 4 deletions

View file

@ -18,6 +18,7 @@ Author:
#include "sat/smt/pb_solver.h"
#include "ast/pb_decl_plugin.h"
#include "sat/smt/euf_solver.h"
namespace pb {
@ -27,8 +28,12 @@ namespace pb {
literal solver::internalize(expr* e, bool sign, bool root, bool redundant) {
flet<bool> _redundant(m_is_redundant, redundant);
if (m_pb.is_pb(e))
return internalize_pb(e, sign, root);
if (m_pb.is_pb(e)) {
sat::literal lit = internalize_pb(e, sign, root);
if (m_ctx && !root && lit != sat::null_literal)
m_ctx->attach_lit(lit, e);
return lit;
}
UNREACHABLE();
return sat::null_literal;
}