mirror of
https://github.com/Z3Prover/z3
synced 2025-04-30 04:15:51 +00:00
na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
d83d0a83d6
commit
aa66be9406
9 changed files with 428 additions and 87 deletions
56
src/sat/smt/bv_solver.cpp
Normal file
56
src/sat/smt/bv_solver.cpp
Normal file
|
@ -0,0 +1,56 @@
|
|||
/*++
|
||||
Copyright (c) 2020 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
bv_internalize.cpp
|
||||
|
||||
Abstract:
|
||||
|
||||
Internalize utilities for bit-vector solver plugin.
|
||||
|
||||
Author:
|
||||
|
||||
Nikolaj Bjorner (nbjorner) 2020-09-02
|
||||
|
||||
--*/
|
||||
|
||||
#include "sat/smt/bv_solver.h"
|
||||
#include "sat/smt/euf_solver.h"
|
||||
#include "sat/smt/sat_th.h"
|
||||
#include "tactic/tactic_exception.h"
|
||||
|
||||
namespace bv {
|
||||
|
||||
void solver::fixed_var_eh(theory_var v) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
\brief Find an unassigned bit for m_wpos[v], if such bit cannot be found invoke fixed_var_eh
|
||||
*/
|
||||
void solver::find_wpos(theory_var v) {
|
||||
literal_vector const & bits = m_bits[v];
|
||||
unsigned sz = bits.size();
|
||||
unsigned & wpos = m_wpos[v];
|
||||
unsigned init = wpos;
|
||||
for (; wpos < sz; wpos++) {
|
||||
TRACE("find_wpos", tout << "curr bit: " << bits[wpos] << "\n";);
|
||||
if (s().value(bits[wpos]) == l_undef) {
|
||||
TRACE("find_wpos", tout << "moved wpos of v" << v << " to " << wpos << "\n";);
|
||||
return;
|
||||
}
|
||||
}
|
||||
wpos = 0;
|
||||
for (; wpos < init; wpos++) {
|
||||
if (s().value(bits[wpos]) == l_undef) {
|
||||
TRACE("find_wpos", tout << "moved wpos of v" << v << " to " << wpos << "\n";);
|
||||
return;
|
||||
}
|
||||
}
|
||||
TRACE("find_wpos", tout << "v" << v << " is a fixed variable.\n";);
|
||||
fixed_var_eh(v);
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue