3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-08-24 12:07:52 +00:00
This commit is contained in:
Jakob Rath 2022-03-10 10:57:49 +01:00
parent 22411f8b43
commit 9b20f17f9c
2 changed files with 18 additions and 14 deletions

View file

@ -0,0 +1,50 @@
/*++
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 smul_fl_constraint final : public constraint {
friend class constraint_manager;
bool m_is_overflow;
pdd m_p;
pdd m_q;
void simplify();
smul_fl_constraint(constraint_manager& m, pdd const& p, pdd const& q, bool is_overflow);
public:
~smul_fl_constraint() override {}
bool is_overflow() const { return m_is_overflow; }
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 { return false; }
void narrow(solver& s, bool is_positive, bool first) override;
bool is_currently_false(solver & s, bool is_positive) const override { return false; }
bool is_currently_true(solver& s, bool is_positive) const override { return false; }
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; }
};
}