mirror of
https://github.com/Z3Prover/z3
synced 2025-04-27 10:55:50 +00:00
Remove int64, uint64 typedefs in favor of int64_t / uint64_t.
This commit is contained in:
parent
16a2ad9afd
commit
2fa304d8de
80 changed files with 437 additions and 449 deletions
|
@ -384,7 +384,7 @@ namespace datalog {
|
|||
|
||||
VERIFY(sig.first_functional() == 1);
|
||||
|
||||
uint64 upper_bound = get_signature()[0];
|
||||
uint64_t upper_bound = get_signature()[0];
|
||||
bool empty_table = empty();
|
||||
|
||||
if (upper_bound > (1 << 18)) {
|
||||
|
|
|
@ -832,7 +832,7 @@ namespace datalog {
|
|||
class table_plugin;
|
||||
class table_base;
|
||||
|
||||
typedef uint64 table_sort;
|
||||
typedef uint64_t table_sort;
|
||||
typedef svector<table_sort> table_signature_base0;
|
||||
typedef uint64_hash table_sort_hash;
|
||||
|
||||
|
|
|
@ -448,7 +448,7 @@ namespace datalog {
|
|||
}
|
||||
|
||||
std::string relation_manager::to_nice_string(const relation_element & el) const {
|
||||
uint64 val;
|
||||
uint64_t val;
|
||||
std::stringstream stm;
|
||||
if(get_context().get_decl_util().is_numeral_ext(el, val)) {
|
||||
stm << val;
|
||||
|
@ -461,7 +461,7 @@ namespace datalog {
|
|||
|
||||
std::string relation_manager::to_nice_string(const relation_sort & s, const relation_element & el) const {
|
||||
std::stringstream stm;
|
||||
uint64 val;
|
||||
uint64_t val;
|
||||
if(get_context().get_decl_util().is_numeral_ext(el, val)) {
|
||||
get_context().print_constant_name(s, val, stm);
|
||||
}
|
||||
|
@ -1339,9 +1339,9 @@ namespace datalog {
|
|||
class relation_manager::default_table_filter_not_equal_fn
|
||||
: public table_mutator_fn, auxiliary_table_filter_fn {
|
||||
unsigned m_column;
|
||||
uint64 m_value;
|
||||
uint64_t m_value;
|
||||
public:
|
||||
default_table_filter_not_equal_fn(context & ctx, unsigned column, uint64 value)
|
||||
default_table_filter_not_equal_fn(context & ctx, unsigned column, uint64_t value)
|
||||
: m_column(column),
|
||||
m_value(value) {
|
||||
}
|
||||
|
@ -1372,7 +1372,7 @@ namespace datalog {
|
|||
return nullptr;
|
||||
}
|
||||
dl_decl_util decl_util(m);
|
||||
uint64 value = 0;
|
||||
uint64_t value = 0;
|
||||
if (!decl_util.is_numeral_ext(y, value)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace datalog {
|
|||
//
|
||||
// -----------------------------------
|
||||
|
||||
unsigned get_domain_length(uint64 dom_size) {
|
||||
unsigned get_domain_length(uint64_t dom_size) {
|
||||
SASSERT(dom_size>0);
|
||||
|
||||
unsigned length = 0;
|
||||
|
@ -128,7 +128,7 @@ namespace datalog {
|
|||
unsigned sig_sz = sig.size();
|
||||
unsigned first_functional = sig_sz-m_functional_col_cnt;
|
||||
for (unsigned i=0; i<sig_sz; i++) {
|
||||
uint64 dom_size = sig[i];
|
||||
uint64_t dom_size = sig[i];
|
||||
unsigned length = get_domain_length(dom_size);
|
||||
SASSERT(length>0);
|
||||
SASSERT(length<=64);
|
||||
|
|
|
@ -153,7 +153,7 @@ namespace datalog {
|
|||
variable. Otherwise \c m_reserve==NO_RESERVE.
|
||||
|
||||
The size of m_data is actually 8 bytes larger than stated in m_data_size, so that we may
|
||||
deref an uint64 pointer at the end of the array.
|
||||
deref an uint64_t pointer at the end of the array.
|
||||
*/
|
||||
storage m_data;
|
||||
storage_indexer m_data_indexer;
|
||||
|
@ -290,10 +290,10 @@ namespace datalog {
|
|||
//the following two operations allow breaking of the object invariant!
|
||||
void resize_data(size_t sz) {
|
||||
m_data_size = sz;
|
||||
if (sz + sizeof(uint64) < sz) {
|
||||
if (sz + sizeof(uint64_t) < sz) {
|
||||
throw default_exception("overflow resizing data section for sparse table");
|
||||
}
|
||||
m_data.resize(sz + sizeof(uint64));
|
||||
m_data.resize(sz + sizeof(uint64_t));
|
||||
}
|
||||
|
||||
bool insert_offset(store_offset ofs) {
|
||||
|
@ -321,8 +321,8 @@ namespace datalog {
|
|||
class column_info {
|
||||
unsigned m_big_offset;
|
||||
unsigned m_small_offset;
|
||||
uint64 m_mask;
|
||||
uint64 m_write_mask;
|
||||
uint64_t m_mask;
|
||||
uint64_t m_write_mask;
|
||||
public:
|
||||
unsigned m_offset; //!< in bits
|
||||
unsigned m_length; //!< in bits
|
||||
|
@ -330,7 +330,7 @@ namespace datalog {
|
|||
column_info(unsigned offset, unsigned length) \
|
||||
: m_big_offset(offset/8),
|
||||
m_small_offset(offset%8),
|
||||
m_mask( length==64 ? ULLONG_MAX : (static_cast<uint64>(1)<<length)-1 ),
|
||||
m_mask( length==64 ? ULLONG_MAX : (static_cast<uint64_t>(1)<<length)-1 ),
|
||||
m_write_mask( ~(m_mask<<m_small_offset) ),
|
||||
m_offset(offset),
|
||||
m_length(length) {
|
||||
|
@ -338,15 +338,15 @@ namespace datalog {
|
|||
SASSERT(length+m_small_offset<=64);
|
||||
}
|
||||
table_element get(const char * rec) const {
|
||||
const uint64 * ptr = reinterpret_cast<const uint64*>(rec+m_big_offset);
|
||||
uint64 res = *ptr;
|
||||
const uint64_t * ptr = reinterpret_cast<const uint64_t*>(rec+m_big_offset);
|
||||
uint64_t res = *ptr;
|
||||
res>>=m_small_offset;
|
||||
res&=m_mask;
|
||||
return res;
|
||||
}
|
||||
void set(char * rec, table_element val) const {
|
||||
SASSERT( (val&~m_mask)==0 ); //the value fits into the column
|
||||
uint64 * ptr = reinterpret_cast<uint64*>(rec+m_big_offset);
|
||||
uint64_t * ptr = reinterpret_cast<uint64_t*>(rec+m_big_offset);
|
||||
*ptr&=m_write_mask;
|
||||
*ptr|=val<<m_small_offset;
|
||||
}
|
||||
|
|
|
@ -62,13 +62,13 @@ doc* doc_manager::allocate(tbv* t) {
|
|||
doc* doc_manager::allocate(tbv const& src) {
|
||||
return allocate(m.allocate(src));
|
||||
}
|
||||
doc* doc_manager::allocate(uint64 n) {
|
||||
doc* doc_manager::allocate(uint64_t n) {
|
||||
return allocate(m.allocate(n));
|
||||
}
|
||||
doc* doc_manager::allocate(rational const& r) {
|
||||
return allocate(m.allocate(r));
|
||||
}
|
||||
doc* doc_manager::allocate(uint64 n, unsigned hi, unsigned lo) {
|
||||
doc* doc_manager::allocate(uint64_t n, unsigned hi, unsigned lo) {
|
||||
return allocate(m.allocate(n, hi, lo));
|
||||
}
|
||||
doc* doc_manager::allocate(doc const& src, unsigned const* permutation) {
|
||||
|
|
|
@ -61,9 +61,9 @@ public:
|
|||
doc* allocate(doc const& src);
|
||||
doc* allocate(tbv const& src);
|
||||
doc* allocate(tbv * src);
|
||||
doc* allocate(uint64 n);
|
||||
doc* allocate(uint64_t n);
|
||||
doc* allocate(rational const& r);
|
||||
doc* allocate(uint64 n, unsigned hi, unsigned lo);
|
||||
doc* allocate(uint64_t n, unsigned hi, unsigned lo);
|
||||
doc* allocate(doc const& src, unsigned const* permutation);
|
||||
void deallocate(doc* src);
|
||||
void copy(doc& dst, doc const& src);
|
||||
|
|
|
@ -215,7 +215,7 @@ namespace datalog {
|
|||
SASSERT(remaining_time_limit>restart_time);
|
||||
remaining_time_limit -= restart_time;
|
||||
}
|
||||
uint64 new_restart_time = static_cast<uint64>(restart_time)*m_context.initial_restart_timeout();
|
||||
uint64_t new_restart_time = static_cast<uint64_t>(restart_time)*m_context.initial_restart_timeout();
|
||||
if (new_restart_time > UINT_MAX) {
|
||||
restart_time = UINT_MAX;
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ tbv* tbv_manager::allocate(tbv const& bv) {
|
|||
copy(*r, bv);
|
||||
return r;
|
||||
}
|
||||
tbv* tbv_manager::allocate(uint64 val) {
|
||||
tbv* tbv_manager::allocate(uint64_t val) {
|
||||
tbv* v = allocate0();
|
||||
for (unsigned bit = std::min(64u, num_tbits()); bit-- > 0;) {
|
||||
if (val & (1ULL << bit)) {
|
||||
|
@ -84,7 +84,7 @@ tbv* tbv_manager::allocate(uint64 val) {
|
|||
return v;
|
||||
}
|
||||
|
||||
tbv* tbv_manager::allocate(uint64 val, unsigned hi, unsigned lo) {
|
||||
tbv* tbv_manager::allocate(uint64_t val, unsigned hi, unsigned lo) {
|
||||
tbv* v = allocateX();
|
||||
SASSERT(64 >= num_tbits() && num_tbits() > hi && hi >= lo);
|
||||
set(*v, val, hi, lo);
|
||||
|
@ -134,7 +134,7 @@ void tbv_manager::set(tbv& dst, unsigned index, tbit value) {
|
|||
}
|
||||
|
||||
|
||||
void tbv_manager::set(tbv& dst, uint64 val, unsigned hi, unsigned lo) {
|
||||
void tbv_manager::set(tbv& dst, uint64_t val, unsigned hi, unsigned lo) {
|
||||
SASSERT(lo <= hi && hi < num_tbits());
|
||||
for (unsigned i = 0; i < hi - lo + 1; ++i) {
|
||||
set(dst, lo + i, (val & (1ULL << i))?BIT_1:BIT_0);
|
||||
|
|
|
@ -51,9 +51,9 @@ public:
|
|||
tbv* allocate0();
|
||||
tbv* allocateX();
|
||||
tbv* allocate(tbv const& bv);
|
||||
tbv* allocate(uint64 n);
|
||||
tbv* allocate(uint64_t n);
|
||||
tbv* allocate(rational const& r);
|
||||
tbv* allocate(uint64 n, unsigned hi, unsigned lo);
|
||||
tbv* allocate(uint64_t n, unsigned hi, unsigned lo);
|
||||
tbv* allocate(tbv const& bv, unsigned const* permutation);
|
||||
tbv* allocate(char const* bv);
|
||||
|
||||
|
@ -80,7 +80,7 @@ public:
|
|||
std::ostream& display(std::ostream& out, tbv const& b, unsigned hi, unsigned lo) const;
|
||||
tbv* project(bit_vector const& to_delete, tbv const& src);
|
||||
bool is_well_formed(tbv const& b) const; // - does not contain BIT_z;
|
||||
void set(tbv& dst, uint64 n, unsigned hi, unsigned lo);
|
||||
void set(tbv& dst, uint64_t n, unsigned hi, unsigned lo);
|
||||
void set(tbv& dst, rational const& r, unsigned hi, unsigned lo);
|
||||
void set(tbv& dst, tbv const& other, unsigned hi, unsigned lo);
|
||||
void set(tbv& dst, unsigned index, tbit value);
|
||||
|
|
|
@ -261,7 +261,7 @@ namespace datalog {
|
|||
num_bits = 1;
|
||||
return true;
|
||||
}
|
||||
uint64 n, sz;
|
||||
uint64_t n, sz;
|
||||
ast_manager& m = get_ast_manager();
|
||||
if (dl.is_numeral(e, n) && dl.try_get_size(m.get_sort(e), sz)) {
|
||||
num_bits = 0;
|
||||
|
@ -277,7 +277,7 @@ namespace datalog {
|
|||
return bv.get_bv_size(s);
|
||||
if (m.is_bool(s))
|
||||
return 1;
|
||||
uint64 sz;
|
||||
uint64_t sz;
|
||||
if (dl.try_get_size(s, sz)) {
|
||||
while (sz > 0) ++num_bits, sz /= 2;
|
||||
return num_bits;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue