mirror of
https://github.com/Z3Prover/z3
synced 2025-04-23 09:05:31 +00:00
string/sequence static features test
This commit is contained in:
parent
3fe49137d0
commit
54e28a4fe7
3 changed files with 26 additions and 4 deletions
|
@ -278,6 +278,17 @@ public:
|
|||
return is_sort_of(s, m_fid, _STRING_SORT);
|
||||
}
|
||||
|
||||
bool is_non_string_sequence(expr const * n) const {
|
||||
if (is_string_term(n))
|
||||
return false;
|
||||
|
||||
sort * s = get_sort(n);
|
||||
if (u.is_seq(s) && !u.is_string(s)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
MATCH_BINARY(is_concat);
|
||||
MATCH_UNARY(is_length);
|
||||
MATCH_TERNARY(is_extract);
|
||||
|
|
|
@ -284,8 +284,9 @@ void static_features::update_core(expr * e) {
|
|||
m_has_arrays = true;
|
||||
if (!m_has_str && m_sequtil.str.is_string_term(e))
|
||||
m_has_str = true;
|
||||
if (!m_has_seq_non_str && m_sequtil.is_seq(e))
|
||||
if (!m_has_seq_non_str && m_sequtil.str.is_non_string_sequence(e)) {
|
||||
m_has_seq_non_str = true;
|
||||
}
|
||||
if (is_app(e)) {
|
||||
family_id fid = to_app(e)->get_family_id();
|
||||
mark_theory(fid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue