mirror of
https://github.com/Z3Prover/z3
synced 2026-04-05 03:09:01 +00:00
Fix three assertion violations in nseq string solver (#9106)
- seq_model.cpp: skip trivial memberships in collect_var_regex_constraints; SAT leaf nodes can have "" in nullable_regex (trivial) in addition to primitive (single-variable) memberships after Brzozowski derivative consumption reduces a concrete string membership to empty. - seq_nielsen.cpp: fix SASSERT(!var) typo in var_ub(); should be SASSERT(var) matching the pattern in var_lb(). - seq_regex.cpp: replace VERIFY(re_expr) with null guard in minterm_to_char_set(); nullptr means no regex constraint and should return the full alphabet, as the test test_minterm_nullptr_is_full expects. Agent-Logs-Url: https://github.com/Z3Prover/z3/sessions/31db5346-9b60-4a20-a101-beca9fc9e4f8 Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: NikolajBjorner <3085284+NikolajBjorner@users.noreply.github.com>
This commit is contained in:
parent
dbdccbff97
commit
1c24c835c9
3 changed files with 5 additions and 2 deletions
|
|
@ -324,6 +324,8 @@ namespace smt {
|
|||
SASSERT(sat_node);
|
||||
for (auto const& mem : sat_node->str_mems()) {
|
||||
SASSERT(mem.m_str && mem.m_regex);
|
||||
if (mem.is_trivial())
|
||||
continue; // empty string in nullable regex: already satisfied, no variable to constrain
|
||||
VERIFY(mem.is_primitive()); // everything else should have been eliminated already
|
||||
euf::snode* first = mem.m_str->first();
|
||||
unsigned id = first->id();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue