3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 17:15:31 +00:00

Remove int64, uint64 typedefs in favor of int64_t / uint64_t.

This commit is contained in:
Bruce Mitchener 2018-03-31 14:45:04 +07:00
parent 16a2ad9afd
commit 2fa304d8de
80 changed files with 437 additions and 449 deletions

View file

@ -20,7 +20,7 @@ Revision History:
Hilbert basis can be templatized
based on traits that define numeral:
as rational, mpz, checked_int64
as rational, mpz, checked_int64
(checked or unchecked).
--*/

View file

@ -5479,7 +5479,7 @@ namespace polynomial {
}
p_prime = derivative(p, x);
resultant(p, p_prime, x, r);
bool sign = (static_cast<uint64>(m) * static_cast<uint64>(m-1))%4 != 0;
bool sign = (static_cast<uint64_t>(m) * static_cast<uint64_t>(m-1))%4 != 0;
TRACE("resultant", tout << "discriminant sign: " << sign << "\n";);
scoped_numeral lc(m_manager);
if (const_coeff(p, x, m, lc)) {
@ -6963,7 +6963,7 @@ namespace polynomial {
return m_imp->m().set_zp(p);
}
void manager::set_zp(uint64 p) {
void manager::set_zp(uint64_t p) {
return m_imp->m().set_zp(p);
}

View file

@ -218,7 +218,7 @@ namespace polynomial {
\brief Set manager as Z_p[X1, ..., Xn]
*/
void set_zp(numeral const & p);
void set_zp(uint64 p);
void set_zp(uint64_t p);
/**
\brief Abstract event handler.
@ -1043,7 +1043,7 @@ namespace polynomial {
scoped_numeral m_p;
public:
scoped_set_zp(manager & _m, numeral const & p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
scoped_set_zp(manager & _m, uint64 p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
scoped_set_zp(manager & _m, uint64_t p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
~scoped_set_zp() { if (m_modular) m.set_zp(m_p); else m.set_z(); }
};
};

View file

@ -153,7 +153,7 @@ namespace upolynomial {
\brief Set manager as Z_p[X]
*/
void set_zp(numeral const & p) { m().set_zp(p); }
void set_zp(uint64 p) { m().set_zp(p); }
void set_zp(uint64_t p) { m().set_zp(p); }
void checkpoint();
@ -486,7 +486,7 @@ namespace upolynomial {
core_manager::scoped_numeral m_p;
public:
scoped_set_zp(core_manager & _m, numeral const & p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
scoped_set_zp(core_manager & _m, uint64 p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
scoped_set_zp(core_manager & _m, uint64_t p):m(_m), m_modular(m.modular()), m_p(m.m()) { m_p = m.p(); m.set_zp(p); }
~scoped_set_zp() { if (m_modular) m.set_zp(m_p); else m.set_z(); }
};

View file

@ -38,9 +38,9 @@ unsigned get_p_from_manager(zp_numeral_manager const & zp_nm) {
if (!nm.is_uint64(p)) {
throw upolynomial_exception("The prime number attempted in factorization is too big!");
}
uint64 p_uint64 = nm.get_uint64(p);
uint64_t p_uint64 = nm.get_uint64(p);
unsigned p_uint = static_cast<unsigned>(p_uint64);
if (((uint64)p_uint) != p_uint64) {
if (((uint64_t)p_uint) != p_uint64) {
throw upolynomial_exception("The prime number attempted in factorization is too big!");
}
return p_uint;
@ -1075,7 +1075,7 @@ bool factor_square_free(z_manager & upm, numeral_vector const & f, factors & fs,
while (trials < params.m_p_trials) {
upm.checkpoint();
// construct prime to check
uint64 next_prime = prime_it.next();
uint64_t next_prime = prime_it.next();
if (next_prime > params.m_max_p) {
fs.push_back(f_pp, k);
return false;

View file

@ -150,12 +150,12 @@ namespace subpaving {
void int2hwf(mpz const & a, hwf & o) {
if (!m_qm.is_int64(a))
throw subpaving::exception();
int64 val = m_qm.get_int64(a);
int64_t val = m_qm.get_int64(a);
double dval = static_cast<double>(val);
m_ctx.nm().set(o, dval);
double _dval = m_ctx.nm().m().to_double(o);
// TODO check the following test
if (static_cast<int64>(_dval) != val)
if (static_cast<int64_t>(_dval) != val)
throw subpaving::exception();
}

View file

@ -73,17 +73,17 @@ public:
// TODO: add SIN, COS, TAN, ...
};
protected:
kind m_kind;
uint64 m_timestamp;
kind m_kind;
uint64_t m_timestamp;
public:
constraint(kind k):m_kind(k), m_timestamp(0) {}
kind get_kind() const { return m_kind; }
// Return the timestamp of the last propagation visit
uint64 timestamp() const { return m_timestamp; }
uint64_t timestamp() const { return m_timestamp; }
// Reset propagation visit time
void set_visited(uint64 ts) { m_timestamp = ts; }
void set_visited(uint64_t ts) { m_timestamp = ts; }
};
/**
@ -149,17 +149,17 @@ public:
unsigned m_lower:1;
unsigned m_open:1;
unsigned m_mark:1;
uint64 m_timestamp;
uint64_t m_timestamp;
bound * m_prev;
justification m_jst;
void set_timestamp(uint64 ts) { m_timestamp = ts; }
void set_timestamp(uint64_t ts) { m_timestamp = ts; }
public:
var x() const { return static_cast<var>(m_x); }
numeral const & value() const { return m_val; }
numeral & value() { return m_val; }
bool is_lower() const { return m_lower; }
bool is_open() const { return m_open; }
uint64 timestamp() const { return m_timestamp; }
uint64_t timestamp() const { return m_timestamp; }
bound * prev() const { return m_prev; }
justification jst() const { return m_jst; }
void display(std::ostream & out, numeral_manager & nm, display_var_proc const & proc = display_var_proc());
@ -486,7 +486,7 @@ private:
id_gen m_node_id_gen;
uint64 m_timestamp;
uint64_t m_timestamp;
node * m_root;
// m_leaf_head is the head of a doubly linked list of leaf nodes to be processed.
node * m_leaf_head;