mirror of
https://github.com/Z3Prover/z3
synced 2026-07-04 14:26:10 +00:00
Fix
This commit is contained in:
parent
f895548154
commit
c7e7b40d40
3 changed files with 9 additions and 3 deletions
|
|
@ -47,7 +47,6 @@ namespace euf {
|
||||||
snode_kind sgraph::classify(expr* e) const {
|
snode_kind sgraph::classify(expr* e) const {
|
||||||
if (!is_app(e))
|
if (!is_app(e))
|
||||||
return snode_kind::s_var;
|
return snode_kind::s_var;
|
||||||
|
|
||||||
if (m_seq.str.is_empty(e))
|
if (m_seq.str.is_empty(e))
|
||||||
return snode_kind::s_empty;
|
return snode_kind::s_empty;
|
||||||
|
|
||||||
|
|
@ -339,6 +338,8 @@ namespace euf {
|
||||||
compute_metadata(n);
|
compute_metadata(n);
|
||||||
compute_hash_matrix(n);
|
compute_hash_matrix(n);
|
||||||
m_nodes.push_back(n);
|
m_nodes.push_back(n);
|
||||||
|
SASSERT(!n->is_char_or_unit() || m_seq.str.is_unit(n->get_expr()));
|
||||||
|
|
||||||
if (e) {
|
if (e) {
|
||||||
unsigned eid = e->get_id();
|
unsigned eid = e->get_id();
|
||||||
m_expr2snode.reserve(eid + 1, nullptr);
|
m_expr2snode.reserve(eid + 1, nullptr);
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ Author:
|
||||||
#include "util/region.h"
|
#include "util/region.h"
|
||||||
#include "ast/ast.h"
|
#include "ast/ast.h"
|
||||||
#include "ast/seq_decl_plugin.h"
|
#include "ast/seq_decl_plugin.h"
|
||||||
|
#include "ast/rewriter/seq_axioms.h"
|
||||||
|
|
||||||
namespace euf {
|
namespace euf {
|
||||||
|
|
||||||
|
|
@ -88,8 +89,9 @@ namespace euf {
|
||||||
n->m_kind = k;
|
n->m_kind = k;
|
||||||
n->m_id = id;
|
n->m_id = id;
|
||||||
n->m_num_args = num_args;
|
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];
|
n->m_args[i] = args[i];
|
||||||
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -267,6 +267,7 @@ namespace seq {
|
||||||
}
|
}
|
||||||
|
|
||||||
void nielsen_node::apply_subst(euf::sgraph& sg, nielsen_subst const& s) {
|
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_var);
|
||||||
SASSERT(s.m_replacement != nullptr);
|
SASSERT(s.m_replacement != nullptr);
|
||||||
for (auto &eq : m_str_eq) {
|
for (auto &eq : m_str_eq) {
|
||||||
|
|
@ -294,9 +295,11 @@ namespace seq {
|
||||||
|
|
||||||
if (s.is_char_subst()) {
|
if (s.is_char_subst()) {
|
||||||
ast_manager& m = graph().get_manager();
|
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(
|
add_constraint(
|
||||||
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)) {
|
if (m_char_ranges.contains(var_id)) {
|
||||||
auto range = m_char_ranges.find(var_id); // copy exactly
|
auto range = m_char_ranges.find(var_id); // copy exactly
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue