-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Nikolaj Bjorner <[email protected]>
- Loading branch information
1 parent
d83d0a8
commit aa66be9
Showing
9 changed files
with
428 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} | ||
|
||
|
||
} |
Oops, something went wrong.