Skip to content

Commit

Permalink
fix #7103
Browse files Browse the repository at this point in the history
  • Loading branch information
NikolajBjorner committed Jan 28, 2024
1 parent f8a3b6f commit 2b68394
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/smt/theory_special_relations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,17 @@ namespace smt {

func_decl* memf, *nextf, *connectedf;

std::string member, next, connected_sym;
unsigned index = r.decl()->get_parameter(0).get_int();
member = "member" + std::to_string(index);
next = "next" + std::to_string(index);
connected_sym = "connected" + std::to_string(index);
std::string member, next, connected_sym, id;
auto const& pa = r.decl()->get_parameter(0);
if (pa.is_int())
id = std::to_string(pa.get_int());
else if (pa.is_ast() && is_func_decl(pa.get_ast()))
id = to_func_decl(pa.get_ast())->get_name().str();
else
throw default_exception("expected an integer or function declaration");
member = "member" + id;
next = "next" + id;
connected_sym = "connected" + id;
{
sort* dom[2] = { s, listS };
recfun::promise_def mem = p.ensure_def(symbol(member), 2, dom, m.mk_bool_sort(), true);
Expand Down

0 comments on commit 2b68394

Please sign in to comment.