From: Abdalrhman Mohamed <32971963+abdoo8080@users.noreply.github.com> Date: Sat, 28 Mar 2020 16:41:22 +0000 (-0500) Subject: Stop printing datatype declaration for Sygus V1 grammar. (#4168) X-Git-Tag: cvc5-1.0.0~3432 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c6b35d8ce7dcacd2f13bcdd5365629ee315dc8d;p=cvc5.git Stop printing datatype declaration for Sygus V1 grammar. (#4168) --- diff --git a/src/parser/parser.h b/src/parser/parser.h index d6c0e0e15..72e175a58 100644 --- a/src/parser/parser.h +++ b/src/parser/parser.h @@ -273,6 +273,9 @@ public: return d_input; } + /** Get unresolved sorts */ + inline std::set& getUnresolvedSorts() { return d_unresolved; } + /** Deletes and replaces the current parser input. */ void setInput(Input* input) { delete d_input; diff --git a/src/parser/smt2/Smt2.g b/src/parser/smt2/Smt2.g index 69f21acb7..0c42678aa 100644 --- a/src/parser/smt2/Smt2.g +++ b/src/parser/smt2/Smt2.g @@ -782,8 +782,24 @@ sygusGrammarV1[CVC4::api::Sort & ret, Debug("parser-sygus") << " " << i << " : " << datatypes[i].getName() << std::endl; } - std::vector datatypeTypes = - PARSER_STATE->bindMutualDatatypeTypes(datatypes, false); + + std::vector dtypes; + dtypes.reserve(ndatatypes); + + for (api::DatatypeDecl i : datatypes) + { + dtypes.push_back(i.getDatatype()); + } + + std::set tset = + api::sortSetToTypes(PARSER_STATE->getUnresolvedSorts()); + + std::vector datatypeTypes = + SOLVER->getExprManager()->mkMutualDatatypeTypes( + dtypes, tset, ExprManager::DATATYPE_FLAG_PLACEHOLDER); + + PARSER_STATE->getUnresolvedSorts().clear(); + ret = datatypeTypes[0]; };