summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-03-23 12:20:23 -0500
committerGitHub <noreply@github.com>2018-03-23 12:20:23 -0500
commitd95e5257f452d765aa67931f0b2af7b178f2e986 (patch)
treef67100dedc9b9a3c7eb477dd66664b31f7f15d73 /src/theory/quantifiers/sygus/sygus_grammar_cons.cpp
parentd3528b6db31f9bdff56bc519bbf427b2533c43b8 (diff)
Enable post-condition strenghtening by default for non-syntax restricted invariant synthesis (#1703)
Diffstat (limited to 'src/theory/quantifiers/sygus/sygus_grammar_cons.cpp')
-rw-r--r--src/theory/quantifiers/sygus/sygus_grammar_cons.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp b/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp
index 1ca774c5d..08b0dc837 100644
--- a/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp
+++ b/src/theory/quantifiers/sygus/sygus_grammar_cons.cpp
@@ -36,6 +36,25 @@ CegGrammarConstructor::CegGrammarConstructor(QuantifiersEngine* qe,
{
}
+bool CegGrammarConstructor::hasSyntaxRestrictions(Node q)
+{
+ Assert(q.getKind() == FORALL);
+ for (const Node& f : q[0])
+ {
+ Node gv = f.getAttribute(SygusSynthGrammarAttribute());
+ if (!gv.isNull())
+ {
+ TypeNode tn = gv.getType();
+ if (tn.isDatatype()
+ && static_cast<DatatypeType>(tn.toType()).getDatatype().isSygus())
+ {
+ return true;
+ }
+ }
+ }
+ return false;
+}
+
void CegGrammarConstructor::collectTerms( Node n, std::map< TypeNode, std::vector< Node > >& consts ){
std::unordered_map<TNode, bool, TNodeHashFunction> visited;
std::unordered_map<TNode, bool, TNodeHashFunction>::iterator it;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback