mirror of
https://github.com/Z3Prover/z3
synced 2025-08-24 03:57:51 +00:00
umul 2
This commit is contained in:
parent
d4592f2abf
commit
48c6bea331
8 changed files with 48 additions and 50 deletions
|
@ -1,55 +0,0 @@
|
|||
/*++
|
||||
Copyright (c) 2021 Microsoft Corporation
|
||||
|
||||
Module Name:
|
||||
|
||||
polysat multiplication overflow constraint
|
||||
|
||||
Author:
|
||||
|
||||
Jakob Rath, Nikolaj Bjorner (nbjorner) 2021-12-09
|
||||
|
||||
--*/
|
||||
#pragma once
|
||||
#include "math/polysat/constraint.h"
|
||||
|
||||
namespace polysat {
|
||||
|
||||
class solver;
|
||||
|
||||
class mul_ovfl_constraint final : public constraint {
|
||||
friend class constraint_manager;
|
||||
|
||||
pdd m_p;
|
||||
pdd m_q;
|
||||
|
||||
mul_ovfl_constraint(constraint_manager& m, pdd const& p, pdd const& q);
|
||||
void simplify();
|
||||
bool is_always_false(bool is_positive, pdd const& p, pdd const& q) const;
|
||||
bool is_always_true(bool is_positive, pdd const& p, pdd const& q) const;
|
||||
bool narrow_bound(solver& s, bool is_positive, pdd const& p0, pdd const& q0, pdd const& p, pdd const& q);
|
||||
bool try_viable(solver& s, bool is_positive, pdd const& p0, pdd const& q0, pdd const& p, pdd const& q);
|
||||
lbool eval(pdd const& p, pdd const& q) const;
|
||||
|
||||
public:
|
||||
~mul_ovfl_constraint() override {}
|
||||
pdd const& p() const { return m_p; }
|
||||
pdd const& q() const { return m_q; }
|
||||
std::ostream& display(std::ostream& out, lbool status) const override;
|
||||
std::ostream& display(std::ostream& out) const override;
|
||||
bool is_always_false(bool is_positive) const override;
|
||||
void narrow(solver& s, bool is_positive, bool first) override;
|
||||
bool is_currently_false(solver & s, bool is_positive) const override;
|
||||
bool is_currently_true(solver& s, bool is_positive) const override;
|
||||
bool is_currently_false(solver& s, assignment_t const& sub, bool is_positive) const override { return false; }
|
||||
bool is_currently_true(solver& s, assignment_t const& sub, bool is_positive) const override { return false; }
|
||||
|
||||
inequality as_inequality(bool is_positive) const override { throw default_exception("is not an inequality"); }
|
||||
unsigned hash() const override;
|
||||
bool operator==(constraint const& other) const override;
|
||||
bool is_eq() const override { return false; }
|
||||
|
||||
void add_to_univariate_solver(solver& s, univariate_solver& us, unsigned dep, bool is_positive) const override;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue