mirror of
https://github.com/Z3Prover/z3
synced 2025-08-24 20:16:00 +00:00
smul no overflow
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
89d6f1c191
commit
8c9835bca6
24 changed files with 376 additions and 63 deletions
48
src/math/polysat/smul_ovfl_constraint.h
Normal file
48
src/math/polysat/smul_ovfl_constraint.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*++
|
||||
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_ovfl_constraint final : public constraint {
|
||||
friend class constraint_manager;
|
||||
|
||||
pdd m_p;
|
||||
pdd m_q;
|
||||
|
||||
void simplify();
|
||||
smul_ovfl_constraint(constraint_manager& m, pdd const& p, pdd const& q);
|
||||
|
||||
public:
|
||||
~smul_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 { 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; }
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue