From 4e62cdade61514f268b96e78e2f82ad12dfcad07 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Thu, 16 Aug 2018 16:57:50 -0500 Subject: [PATCH] Minor fixes and improvement for sygus to builtin. (#2306) --- src/theory/datatypes/datatypes_rewriter.cpp | 4 ++-- src/theory/datatypes/datatypes_rewriter.h | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/theory/datatypes/datatypes_rewriter.cpp b/src/theory/datatypes/datatypes_rewriter.cpp index 8366fe4e1..a8e5d74b6 100644 --- a/src/theory/datatypes/datatypes_rewriter.cpp +++ b/src/theory/datatypes/datatypes_rewriter.cpp @@ -186,7 +186,7 @@ RewriteResponse DatatypesRewriter::postRewrite(TNode in) return RewriteResponse(REWRITE_DONE, in); } -Kind getOperatorKindForSygusBuiltin(Node op) +Kind DatatypesRewriter::getOperatorKindForSygusBuiltin(Node op) { Assert(op.getKind() != BUILTIN); if (op.getKind() == LAMBDA) @@ -212,7 +212,7 @@ Kind getOperatorKindForSygusBuiltin(Node op) { return APPLY_UF; } - return NodeManager::operatorToKind(op); + return UNDEFINED_KIND; } Node DatatypesRewriter::mkSygusTerm(const Datatype& dt, diff --git a/src/theory/datatypes/datatypes_rewriter.h b/src/theory/datatypes/datatypes_rewriter.h index 7d91544e1..a6c95b893 100644 --- a/src/theory/datatypes/datatypes_rewriter.h +++ b/src/theory/datatypes/datatypes_rewriter.h @@ -121,6 +121,13 @@ public: * C( x, y ) and z */ static bool checkClash(Node n1, Node n2, std::vector& rew); + /** get operator kind for sygus builtin + * + * This returns the Kind corresponding to applications of the operator op + * when building the builtin version of sygus terms. This is used by the + * function mkSygusTerm. + */ + static Kind getOperatorKindForSygusBuiltin(Node op); /** make sygus term * * This function returns a builtin term f( children[0], ..., children[n] ) -- 2.30.2