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

add validation to aig_simplifier, start BIG-based masking

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-01-11 20:47:38 -08:00
parent 41a00707e1
commit e0a41a18c3
14 changed files with 741 additions and 167 deletions

View file

@ -414,20 +414,29 @@ public:
reinterpret_cast<SZ *>(m_data)[SIZE_IDX]--;
}
void push_back(T const & elem) {
old_vector& push_back(T const & elem) {
if (m_data == nullptr || reinterpret_cast<SZ *>(m_data)[SIZE_IDX] == reinterpret_cast<SZ *>(m_data)[CAPACITY_IDX]) {
expand_vector();
}
new (m_data + reinterpret_cast<SZ *>(m_data)[SIZE_IDX]) T(elem);
reinterpret_cast<SZ *>(m_data)[SIZE_IDX]++;
return *this;
}
void push_back(T && elem) {
template <typename ...Args>
old_vector& push_back(T const& elem, T elem2, Args ... elems) {
push_back(elem);
push_back(elem2, elems ...);
return *this;
}
old_vector& push_back(T && elem) {
if (m_data == nullptr || reinterpret_cast<SZ *>(m_data)[SIZE_IDX] == reinterpret_cast<SZ *>(m_data)[CAPACITY_IDX]) {
expand_vector();
}
new (m_data + reinterpret_cast<SZ *>(m_data)[SIZE_IDX]) T(std::move(elem));
reinterpret_cast<SZ *>(m_data)[SIZE_IDX]++;
return *this;
}
void insert(T const & elem) {

View file

@ -70,6 +70,7 @@ public:
friend bool operator!=(symbol const & s1, symbol const & s2) { return s1.m_data != s2.m_data; }
bool is_numerical() const { return GET_TAG(m_data) == 1; }
bool is_null() const { return m_data == nullptr; }
bool is_non_empty_string() const { return !is_null() && !is_numerical() && 0 != bare_str()[0]; }
unsigned int get_num() const { SASSERT(is_numerical()); return UNBOXINT(m_data); }
std::string str() const;
friend bool operator==(symbol const & s1, char const * s2) {