3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-04-15 16:54:11 +00:00
This commit is contained in:
CEisenhofer 2026-04-08 09:27:46 +02:00
parent f895548154
commit c7e7b40d40
3 changed files with 9 additions and 3 deletions

View file

@ -47,7 +47,6 @@ namespace euf {
snode_kind sgraph::classify(expr* e) const {
if (!is_app(e))
return snode_kind::s_var;
if (m_seq.str.is_empty(e))
return snode_kind::s_empty;
@ -339,6 +338,8 @@ namespace euf {
compute_metadata(n);
compute_hash_matrix(n);
m_nodes.push_back(n);
SASSERT(!n->is_char_or_unit() || m_seq.str.is_unit(n->get_expr()));
if (e) {
unsigned eid = e->get_id();
m_expr2snode.reserve(eid + 1, nullptr);

View file

@ -27,6 +27,7 @@ Author:
#include "util/region.h"
#include "ast/ast.h"
#include "ast/seq_decl_plugin.h"
#include "ast/rewriter/seq_axioms.h"
namespace euf {
@ -88,8 +89,9 @@ namespace euf {
n->m_kind = k;
n->m_id = id;
n->m_num_args = num_args;
for (unsigned i = 0; i < num_args; ++i)
for (unsigned i = 0; i < num_args; ++i) {
n->m_args[i] = args[i];
}
return n;
}

View file

@ -267,6 +267,7 @@ namespace seq {
}
void nielsen_node::apply_subst(euf::sgraph& sg, nielsen_subst const& s) {
SASSERT(!s.m_var->is_char_or_unit() || s.m_replacement->is_char_or_unit());
SASSERT(s.m_var);
SASSERT(s.m_replacement != nullptr);
for (auto &eq : m_str_eq) {
@ -294,9 +295,11 @@ namespace seq {
if (s.is_char_subst()) {
ast_manager& m = graph().get_manager();
expr* var_c_expr = s.m_var->arg(0)->get_expr();
expr* repl_c_expr = s.m_replacement->arg(0)->get_expr();
add_constraint(
constraint(
m.mk_eq(s.m_var->get_expr(), s.m_replacement->get_expr()), s.m_dep, m));
m.mk_eq(var_c_expr, repl_c_expr), s.m_dep, m));
if (m_char_ranges.contains(var_id)) {
auto range = m_char_ranges.find(var_id); // copy exactly