mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 13:55:47 +00:00
fix #1749 by rejecting non-well-founded use of datatype in array
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
b7ea90c12b
commit
4915fb080b
4 changed files with 40 additions and 26 deletions
|
@ -273,6 +273,14 @@ public:
|
|||
parameter const * get_parameters() const { return m_parameters.begin(); }
|
||||
bool private_parameters() const { return m_private_parameters; }
|
||||
|
||||
struct iterator {
|
||||
decl_info const& d;
|
||||
iterator(decl_info const& d) : d(d) {}
|
||||
parameter const* begin() const { return d.get_parameters(); }
|
||||
parameter const* end() const { return begin() + d.get_num_parameters(); }
|
||||
};
|
||||
iterator parameters() const { return iterator(*this); }
|
||||
|
||||
unsigned hash() const;
|
||||
bool operator==(decl_info const & info) const;
|
||||
};
|
||||
|
@ -571,6 +579,16 @@ public:
|
|||
parameter const & get_parameter(unsigned idx) const { return m_info->get_parameter(idx); }
|
||||
parameter const * get_parameters() const { return m_info == nullptr ? nullptr : m_info->get_parameters(); }
|
||||
bool private_parameters() const { return m_info != nullptr && m_info->private_parameters(); }
|
||||
|
||||
struct iterator {
|
||||
decl const& d;
|
||||
iterator(decl const& d) : d(d) {}
|
||||
parameter const* begin() const { return d.get_parameters(); }
|
||||
parameter const* end() const { return begin() + d.get_num_parameters(); }
|
||||
};
|
||||
iterator parameters() const { return iterator(*this); }
|
||||
|
||||
|
||||
};
|
||||
|
||||
// -----------------------------------
|
||||
|
@ -2401,11 +2419,7 @@ public:
|
|||
}
|
||||
|
||||
void reset() {
|
||||
ptr_buffer<ast>::iterator it = m_to_unmark.begin();
|
||||
ptr_buffer<ast>::iterator end = m_to_unmark.end();
|
||||
for (; it != end; ++it) {
|
||||
reset_mark(*it);
|
||||
}
|
||||
for (ast* a : m_to_unmark) reset_mark(a);
|
||||
m_to_unmark.reset();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue