mirror of
https://github.com/Z3Prover/z3
synced 2025-11-05 13:56:03 +00:00
add way to parse xor into solver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
ea96c10165
commit
5f45469d9b
5 changed files with 109 additions and 2 deletions
|
|
@ -31,6 +31,7 @@ Notes:
|
|||
|
||||
#include "ast/pb_decl_plugin.h"
|
||||
#include "sat/smt/euf_solver.h"
|
||||
#include "sat/smt/xor_solver.h"
|
||||
|
||||
namespace euf {
|
||||
|
||||
|
|
@ -498,4 +499,17 @@ namespace euf {
|
|||
}
|
||||
}
|
||||
|
||||
void solver::add_xor(sat::literal_vector const& lits) {
|
||||
family_id fid = m.mk_family_id("xor");
|
||||
auto* ext = m_id2solver.get(fid, nullptr);
|
||||
th_solver* xr;
|
||||
if (!ext) {
|
||||
xr = alloc(xr::solver, *this);
|
||||
add_solver(xr);
|
||||
ext = xr;
|
||||
}
|
||||
xr = dynamic_cast<xr::solver*>(ext);
|
||||
xr->add_xor(lits);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue