mirror of
https://github.com/Z3Prover/z3
synced 2025-05-03 22:05:45 +00:00
Fix uninterpreted sort definition. There was a mismatch in the behavior of the API and SMT front-ends. The SMT front-ends were using user_sorts to be able to support parametric uninterpreted sorts. After this fix, the API also creates user_sorts.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
3b8d72beeb
commit
3a15db5244
8 changed files with 23 additions and 14 deletions
|
@ -303,12 +303,10 @@ sort * psort_user_decl::instantiate(pdecl_manager & m, unsigned n, sort * const
|
|||
if (r)
|
||||
return r;
|
||||
if (m_def == 0) {
|
||||
user_sort_plugin * plugin = m.m().get_user_sort_plugin();
|
||||
buffer<parameter> ps;
|
||||
for (unsigned i = 0; i < n; i++)
|
||||
ps.push_back(parameter(s[i]));
|
||||
decl_kind kind = plugin->register_name(m_name);
|
||||
r = plugin->mk_sort(kind, ps.size(), ps.c_ptr());
|
||||
r = m.m().mk_uninterpreted_sort(m_name, ps.size(), ps.c_ptr());
|
||||
}
|
||||
else {
|
||||
r = m_def->instantiate(m, s);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue