mirror of
https://github.com/Z3Prover/z3
synced 2025-08-04 10:20:23 +00:00
Add get_sort(expr * n) function that does not depend on ast_manager. Move power_of_two to rational class. Add arith_recognizers and bv_recognizers classes. The two new classes contain the 'read-only' methods from arith_util and bv_util.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
4f0d5a5756
commit
cec328cfdc
17 changed files with 314 additions and 282 deletions
|
@ -26,14 +26,13 @@ class rational {
|
|||
static rational m_zero;
|
||||
static rational m_one;
|
||||
static rational m_minus_one;
|
||||
|
||||
static vector<rational> m_powers_of_two;
|
||||
static synch_mpq_manager * g_mpq_manager;
|
||||
|
||||
|
||||
static synch_mpq_manager & m() { return *g_mpq_manager; }
|
||||
|
||||
public:
|
||||
static void initialize();
|
||||
|
||||
static void finalize();
|
||||
/*
|
||||
ADD_INITIALIZER('rational::initialize();')
|
||||
|
@ -272,6 +271,8 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
static rational power_of_two(unsigned k);
|
||||
|
||||
bool is_power_of_two(unsigned & shift) {
|
||||
return m().is_power_of_two(m_val, shift);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue