3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

enable nested ADT and sequences

add API to define forward reference to recursively defined datatype.
The forward reference should be used only when passed to constructor declarations that are used in a datatype definition (Z3_mk_datatypes). The call to Z3_mk_datatypes ensures that the forward reference can be resolved with respect to constructors.
This commit is contained in:
Nikolaj Bjorner 2022-04-27 09:58:38 +01:00
parent 8e2f09b517
commit 81d97a81af
10 changed files with 232 additions and 92 deletions

View file

@ -166,7 +166,7 @@ expr * datatype_factory::get_fresh_value(sort * s) {
for (unsigned i = 0; i < num; i++) {
sort * s_arg = constructor->get_domain(i);
if (!found_fresh_arg &&
!m_util.is_recursive_array(s_arg) &&
!m_util.is_recursive_nested(s_arg) &&
(!m_util.is_recursive(s) || !m_util.is_datatype(s_arg) || !m_util.are_siblings(s, s_arg))) {
expr * new_arg = m_model.get_fresh_value(s_arg);
if (new_arg != nullptr) {