3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-28 19:35:50 +00:00
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2019-12-26 02:30:12 -08:00
parent d13f1310a7
commit 2c6e6b1fdb
4 changed files with 75 additions and 9 deletions

View file

@ -203,6 +203,8 @@ namespace dd {
unsigned dag_size(pdd const& p);
unsigned degree(pdd const& p);
bool var_is_leaf(PDD p, unsigned v);
bool is_reachable(PDD p);
void compute_reachable(svector<bool>& reachable);
void try_gc();
@ -291,9 +293,9 @@ namespace dd {
bool is_zero() const { return m.is_zero(root); }
bool is_linear() const { return m.is_linear(root); }
bool is_binary() const { return m.is_binary(root); }
bool var_is_leaf(unsigned v) const { return m.var_is_leaf(root, v); }
pdd minus() const { return m.minus(*this); }
pdd operator-() const { return m.minus(*this); }
pdd operator+(pdd const& other) const { return m.add(*this, other); }
pdd operator-(pdd const& other) const { return m.sub(*this, other); }
pdd operator*(pdd const& other) const { return m.mul(*this, other); }
@ -317,11 +319,11 @@ namespace dd {
inline pdd operator*(int x, pdd const& b) { return b * rational(x); }
inline pdd operator*(pdd const& b, int x) { return b * rational(x); }
inline pdd operator+(rational const& r, const pdd& b) { return b + r; }
inline pdd operator+(rational const& r, pdd const& b) { return b + r; }
inline pdd operator+(int x, pdd const& b) { return b + rational(x); }
inline pdd operator+(pdd const& b, int x) { return b + rational(x); }
inline pdd operator-(rational const& r, pdd const& b) { return r + (-b); }
inline pdd operator-(rational const& r, pdd const& b) { return r + b.minus(); }
inline pdd operator-(int x, pdd const& b) { return rational(x) - b; }
inline pdd operator-(pdd const& b, int x) { return b + (-rational(x)); }