Skip to content

Commit

Permalink
patch to fix #5110
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Apr 8, 2021
1 parent d91eac2 commit 44156f9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/ast/datatype_decl_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,13 +641,13 @@ namespace datatype {
}

bool util::is_considered_uninterpreted(func_decl * f, unsigned n, expr* const* args) {
if (is_accessor(f)) {
func_decl* c = get_accessor_constructor(f);
SASSERT(n == 1);
if (is_constructor(args[0]))
return to_app(args[0])->get_decl() != c;
if (!is_accessor(f))
return false;
}
func_decl* c = get_accessor_constructor(f);
SASSERT(n == 1);
std::cout << f->get_name() << " " << mk_pp(args[0], m) << "\n";
if (is_constructor(args[0]))
return to_app(args[0])->get_decl() != c;
return false;
}

Expand Down
5 changes: 5 additions & 0 deletions src/model/model_evaluator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,17 @@ struct evaluator_cfg : public default_rewriter_cfg {
result = m.get_some_value(f->get_range());
return BR_DONE;
}
else if (m_dt.is_accessor(f) && !is_ground(args[0])) {
result = m.mk_app(f, num, args);
return BR_DONE;
}
if (fi) {
if (fi->is_partial())
fi->set_else(m.get_some_value(f->get_range()));

var_subst vs(m, false);
result = vs(fi->get_interp(), num, args);
std::cout << result << "\n";
return BR_REWRITE_FULL;
}

Expand Down

0 comments on commit 44156f9

Please sign in to comment.