mirror of
https://github.com/Z3Prover/z3
synced 2025-08-12 06:00:53 +00:00
fix #4879
This commit is contained in:
parent
0643e7c0fc
commit
f71204c222
4 changed files with 68 additions and 61 deletions
|
@ -368,10 +368,14 @@ namespace datalog {
|
|||
}
|
||||
|
||||
context::finite_element context::get_constant_number(relation_sort srt, uint64_t el) {
|
||||
sort_domain & dom0 = get_sort_domain(srt);
|
||||
SASSERT(dom0.get_kind()==SK_UINT64);
|
||||
uint64_sort_domain & dom = static_cast<uint64_sort_domain &>(dom0);
|
||||
return dom.get_number(el);
|
||||
|
||||
sort_domain & dom0 = get_sort_domain(srt);
|
||||
if (dom0.get_kind() == SK_SYMBOL)
|
||||
return (finite_element)(el);
|
||||
else {
|
||||
uint64_sort_domain & dom = static_cast<uint64_sort_domain &>(dom0);
|
||||
return dom.get_number(el);
|
||||
}
|
||||
}
|
||||
|
||||
void context::print_constant_name(relation_sort srt, uint64_t num, std::ostream & out)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue