mirror of
https://github.com/Z3Prover/z3
synced 2025-08-11 13:40:52 +00:00
patch seq theory using purification to avoid unsoundness caused by interaction with canonization and rewriting
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
2db2767e7a
commit
70b4822571
6 changed files with 45 additions and 42 deletions
|
@ -4514,6 +4514,14 @@ bool seq_rewriter::is_string(unsigned n, expr* const* es, zstring& s) const {
|
|||
return true;
|
||||
}
|
||||
|
||||
expr_ref seq_rewriter::mk_length(expr* s) {
|
||||
expr_ref result(m());
|
||||
if (BR_FAILED == mk_seq_length(s, result))
|
||||
result = str().mk_length(s);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* itos(n) = <numeric string> -> n = numeric
|
||||
*/
|
||||
|
|
|
@ -280,7 +280,7 @@ class seq_rewriter {
|
|||
bool reduce_subsequence(expr_ref_vector& ls, expr_ref_vector& rs, expr_ref_pair_vector& eqs);
|
||||
bool reduce_by_length(expr_ref_vector& ls, expr_ref_vector& rs, expr_ref_pair_vector& eqs);
|
||||
bool reduce_itos(expr_ref_vector& ls, expr_ref_vector& rs, expr_ref_pair_vector& eqs);
|
||||
bool reduce_eq_empty(expr* l, expr* r, expr_ref& result);
|
||||
bool reduce_eq_empty(expr* l, expr* r, expr_ref& result);
|
||||
bool min_length(expr_ref_vector const& es, unsigned& len);
|
||||
expr* concat_non_empty(expr_ref_vector& es);
|
||||
|
||||
|
@ -344,6 +344,8 @@ public:
|
|||
|
||||
bool reduce_contains(expr* a, expr* b, expr_ref_vector& disj);
|
||||
|
||||
expr_ref mk_length(expr* s);
|
||||
|
||||
void add_seqs(expr_ref_vector const& ls, expr_ref_vector const& rs, expr_ref_pair_vector& new_eqs);
|
||||
|
||||
// Expose derivative and nullability check
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue