3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-29 03:45:51 +00:00

support for smtlib2.6 datatype parsing

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2017-09-04 21:12:43 -07:00
parent 5492d0e135
commit 5d17e28667
29 changed files with 374 additions and 206 deletions

View file

@ -174,7 +174,7 @@ class elim_uncnstr_tactic : public tactic {
if (fid == m_dt_util.get_family_id()) {
// In the current implementation, I only handle the case where
// the datatype has a recursive constructor.
ptr_vector<func_decl> const & constructors = m_dt_util.get_datatype_constructors(s);
ptr_vector<func_decl> const & constructors = *m_dt_util.get_datatype_constructors(s);
for (func_decl * constructor : constructors) {
unsigned num = constructor->get_arity();
unsigned target = UINT_MAX;
@ -704,7 +704,7 @@ class elim_uncnstr_tactic : public tactic {
app * u;
if (!mk_fresh_uncnstr_var_for(f, num, args, u))
return u;
ptr_vector<func_decl> const & accs = m_dt_util.get_constructor_accessors(c);
ptr_vector<func_decl> const & accs = *m_dt_util.get_constructor_accessors(c);
ptr_buffer<expr> new_args;
for (unsigned i = 0; i < accs.size(); i++) {
if (accs[i] == f)
@ -723,7 +723,7 @@ class elim_uncnstr_tactic : public tactic {
return u;
if (!m_mc)
return u;
ptr_vector<func_decl> const & accs = m_dt_util.get_constructor_accessors(f);
ptr_vector<func_decl> const & accs = *m_dt_util.get_constructor_accessors(f);
for (unsigned i = 0; i < num; i++) {
add_def(args[i], m().mk_app(accs[i], u));
}