mirror of
https://github.com/Z3Prover/z3
synced 2025-05-05 14:55: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
|
@ -1622,11 +1622,13 @@ private:
|
|||
sort * mk_sort(symbol const & name, sort_info * info);
|
||||
|
||||
public:
|
||||
sort * mk_sort(symbol const & name) { return mk_sort(name, 0); }
|
||||
sort * mk_uninterpreted_sort(symbol const & name, unsigned num_parameters, parameter const * parameters);
|
||||
|
||||
sort * mk_uninterpreted_sort(symbol const & name) { return mk_uninterpreted_sort(name, 0, 0); }
|
||||
|
||||
sort * mk_sort(symbol const & name, sort_info const & info) {
|
||||
if (info.get_family_id() == null_family_id) {
|
||||
return mk_sort(name, 0);
|
||||
return mk_uninterpreted_sort(name);
|
||||
}
|
||||
else {
|
||||
return mk_sort(name, &const_cast<sort_info &>(info));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue