3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-09-03 08:38:06 +00:00
* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fill

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* update drat and fix euf bugs

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* const qualifiers

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* reorg ba

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* reorg

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* build warnings

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2020-09-13 19:29:59 -07:00 committed by GitHub
parent d56dd1db7b
commit 796e2fd9eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 2571 additions and 1850 deletions

View file

@ -29,7 +29,7 @@ struct sexpr_composite : public sexpr {
unsigned m_num_chilren;
sexpr * m_children[0];
sexpr_composite(unsigned num_children, sexpr * const * children, unsigned line, unsigned pos):
sexpr(COMPOSITE, line, pos),
sexpr(kind_t::COMPOSITE, line, pos),
m_num_chilren(num_children) {
for (unsigned i = 0; i < num_children; i++) {
m_children[i] = children[i];
@ -45,7 +45,7 @@ struct sexpr_numeral : public sexpr {
m_val(val) {
}
sexpr_numeral(rational const & val, unsigned line, unsigned pos):
sexpr(NUMERAL, line, pos),
sexpr(kind_t::NUMERAL, line, pos),
m_val(val) {
}
};
@ -53,7 +53,7 @@ struct sexpr_numeral : public sexpr {
struct sexpr_bv : public sexpr_numeral {
unsigned m_size;
sexpr_bv(rational const & val, unsigned size, unsigned line, unsigned pos):
sexpr_numeral(BV_NUMERAL, val, line, pos),
sexpr_numeral(kind_t::BV_NUMERAL, val, line, pos),
m_size(size) {
}
};
@ -61,11 +61,11 @@ struct sexpr_bv : public sexpr_numeral {
struct sexpr_string : public sexpr {
std::string m_val;
sexpr_string(std::string const & val, unsigned line, unsigned pos):
sexpr(STRING, line, pos),
sexpr(kind_t::STRING, line, pos),
m_val(val) {
}
sexpr_string(char const * val, unsigned line, unsigned pos):
sexpr(STRING, line, pos),
sexpr(kind_t::STRING, line, pos),
m_val(val) {
}
};
@ -73,7 +73,7 @@ struct sexpr_string : public sexpr {
struct sexpr_symbol : public sexpr {
symbol m_val;
sexpr_symbol(bool keyword, symbol const & val, unsigned line, unsigned pos):
sexpr(keyword ? KEYWORD : SYMBOL, line, pos),
sexpr(keyword ? kind_t::KEYWORD : kind_t::SYMBOL, line, pos),
m_val(val) {
}
};
@ -122,12 +122,12 @@ sexpr * const * sexpr::get_children() const {
void sexpr::display_atom(std::ostream & out) const {
switch (get_kind()) {
case sexpr::COMPOSITE:
case sexpr::kind_t::COMPOSITE:
UNREACHABLE();
case sexpr::NUMERAL:
case sexpr::kind_t::NUMERAL:
out << static_cast<sexpr_numeral const *>(this)->m_val;
break;
case sexpr::BV_NUMERAL: {
case sexpr::kind_t::BV_NUMERAL: {
out << '#';
unsigned bv_size = static_cast<sexpr_bv const *>(this)->m_size;
rational val = static_cast<sexpr_bv const *>(this)->m_val;
@ -172,11 +172,11 @@ void sexpr::display_atom(std::ostream & out) const {
out << buf.c_ptr();
break;
}
case sexpr::STRING:
case sexpr::kind_t::STRING:
out << "\"" << escaped(static_cast<sexpr_string const *>(this)->m_val.c_str()) << "\"";
break;
case sexpr::SYMBOL:
case sexpr::KEYWORD:
case sexpr::kind_t::SYMBOL:
case sexpr::kind_t::KEYWORD:
out << static_cast<sexpr_symbol const *>(this)->m_val;
break;
default:
@ -220,7 +220,7 @@ void sexpr_manager::del(sexpr * n) {
sexpr * n = m_to_delete.back();
m_to_delete.pop_back();
switch (n->get_kind()) {
case sexpr::COMPOSITE: {
case sexpr::kind_t::COMPOSITE: {
unsigned num = n->get_num_children();
for (unsigned i = 0; i < num; i++) {
sexpr * child = n->get_child(i);
@ -233,20 +233,20 @@ void sexpr_manager::del(sexpr * n) {
m_allocator.deallocate(sizeof(sexpr_composite) + num * sizeof(sexpr*), n);
break;
}
case sexpr::NUMERAL:
case sexpr::kind_t::NUMERAL:
static_cast<sexpr_numeral*>(n)->~sexpr_numeral();
m_allocator.deallocate(sizeof(sexpr_numeral), n);
break;
case sexpr::BV_NUMERAL:
case sexpr::kind_t::BV_NUMERAL:
static_cast<sexpr_bv*>(n)->~sexpr_bv();
m_allocator.deallocate(sizeof(sexpr_bv), n);
break;
case sexpr::STRING:
case sexpr::kind_t::STRING:
static_cast<sexpr_string*>(n)->~sexpr_string();
m_allocator.deallocate(sizeof(sexpr_string), n);
break;
case sexpr::SYMBOL:
case sexpr::KEYWORD:
case sexpr::kind_t::SYMBOL:
case sexpr::kind_t::KEYWORD:
static_cast<sexpr_symbol*>(n)->~sexpr_symbol();
m_allocator.deallocate(sizeof(sexpr_symbol), n);
break;