3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 11:25:51 +00:00

eliminate basic variables from new rows

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2021-05-12 15:58:35 -07:00
parent 62b7719d5a
commit 0d776ecf88
4 changed files with 191 additions and 94 deletions

View file

@ -33,8 +33,9 @@ inline std::ostream& operator<<(std::ostream& out, pp<Numeral> const& p) {
}
template<typename Numeral>
struct mod_interval {
class mod_interval {
bool emp { false };
public:
Numeral lo { 0 };
Numeral hi { 0 };
mod_interval() {}
@ -43,6 +44,8 @@ struct mod_interval {
static mod_interval empty() { mod_interval i(0, 0); i.emp = true; return i; }
bool is_free() const { return !emp && lo == hi; }
bool is_empty() const { return emp; }
void set_free() { lo = hi = 0; emp = false; }
void set_bounds(Numeral const& l, Numeral const& h) { lo = l; hi = h; }
bool contains(Numeral const& n) const;
mod_interval operator&(mod_interval const& other) const;
mod_interval operator+(mod_interval const& other) const;