3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-07 15:55:46 +00:00

add option to increase thresholds based on simulated equality

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-01-16 22:43:18 -08:00
parent 93d1091ad9
commit 22f1c6448a
6 changed files with 166 additions and 35 deletions

View file

@ -161,6 +161,27 @@ namespace sat {
}
return true;
}
/**
sat-sweep evaluation. Given 64 bits worth of possible values per variable,
find possible values for function table encoded by cut.
*/
uint64_t cut::eval(svector<uint64_t> const& env) const {
uint64_t result = 0ull;
uint64_t t = table();
unsigned sz = size();
if (sz == 1 && t == 2) {
return env[m_elems[0]];
}
for (unsigned i = 0; i < 64; ++i) {
unsigned offset = 0;
for (unsigned j = 0; j < sz; ++j) {
offset |= (((env[m_elems[j]] >> i) & 0x1) << j);
}
result |= ((t >> offset) & 0x1) << i;
}
return result;
}
std::ostream& cut::display(std::ostream& out) const {
out << "{";