mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 17:15:31 +00:00
fix #2762, fix #2750, add iterative unrolling to help on termination on sat instances (to address non-termination in #2759 and #2762)
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
0d004b5232
commit
489448b869
3 changed files with 55 additions and 46 deletions
|
@ -365,11 +365,13 @@ seq_decl_plugin::seq_decl_plugin(): m_init(false),
|
|||
m_string(nullptr),
|
||||
m_char(nullptr),
|
||||
m_re(nullptr),
|
||||
m_has_re(false) {}
|
||||
m_has_re(false),
|
||||
m_has_seq(false) {}
|
||||
|
||||
void seq_decl_plugin::finalize() {
|
||||
for (unsigned i = 0; i < m_sigs.size(); ++i)
|
||||
dealloc(m_sigs[i]);
|
||||
for (psig* s : m_sigs) {
|
||||
dealloc(s);
|
||||
}
|
||||
m_manager->dec_ref(m_string);
|
||||
m_manager->dec_ref(m_char);
|
||||
m_manager->dec_ref(m_re);
|
||||
|
@ -518,7 +520,7 @@ sort* seq_decl_plugin::apply_binding(ptr_vector<sort> const& binding, sort* s) {
|
|||
|
||||
|
||||
void seq_decl_plugin::init() {
|
||||
if(m_init) return;
|
||||
if (m_init) return;
|
||||
ast_manager& m = *m_manager;
|
||||
m_init = true;
|
||||
sort* A = m.mk_uninterpreted_sort(symbol((unsigned)0));
|
||||
|
@ -674,6 +676,7 @@ func_decl* seq_decl_plugin::mk_assoc_fun(decl_kind k, unsigned arity, sort* cons
|
|||
func_decl * seq_decl_plugin::mk_func_decl(decl_kind k, unsigned num_parameters, parameter const * parameters,
|
||||
unsigned arity, sort * const * domain, sort * range) {
|
||||
init();
|
||||
m_has_seq = true;
|
||||
ast_manager& m = *m_manager;
|
||||
sort_ref rng(m);
|
||||
switch(k) {
|
||||
|
|
|
@ -154,6 +154,7 @@ class seq_decl_plugin : public decl_plugin {
|
|||
sort* m_char;
|
||||
sort* m_re;
|
||||
bool m_has_re;
|
||||
bool m_has_seq;
|
||||
|
||||
void match(psig& sig, unsigned dsz, sort* const* dom, sort* range, sort_ref& rng);
|
||||
|
||||
|
@ -206,6 +207,7 @@ public:
|
|||
app* mk_string(zstring const& s);
|
||||
|
||||
bool has_re() const { return m_has_re; }
|
||||
bool has_seq() const { return m_has_seq; }
|
||||
|
||||
bool is_considered_uninterpreted(func_decl * f) override;
|
||||
};
|
||||
|
@ -237,6 +239,7 @@ public:
|
|||
bool is_skolem(expr const* e) const { return is_app_of(e, m_fid, _OP_SEQ_SKOLEM); }
|
||||
|
||||
bool has_re() const { return seq.has_re(); }
|
||||
bool has_seq() const { return seq.has_seq(); }
|
||||
|
||||
class str {
|
||||
seq_util& u;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue