From: Andrew Reynolds Date: Thu, 17 May 2018 21:31:30 +0000 (-0500) Subject: Catch type errors in sygus grammars for lambda (define-fun) constructors (#1937) X-Git-Tag: cvc5-1.0.0~5040 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1af890ef4fed0c0151dc2ab954dce0121dd283d8;p=cvc5.git Catch type errors in sygus grammars for lambda (define-fun) constructors (#1937) --- diff --git a/src/theory/quantifiers/sygus/term_database_sygus.cpp b/src/theory/quantifiers/sygus/term_database_sygus.cpp index b530edeaa..85ff5c896 100644 --- a/src/theory/quantifiers/sygus/term_database_sygus.cpp +++ b/src/theory/quantifiers/sygus/term_database_sygus.cpp @@ -685,6 +685,14 @@ void TermDbSygus::registerSygusType( TypeNode tn ) { }else{ // no arguments to synthesis functions } + // register connected types + for (unsigned i = 0, ncons = dt.getNumConstructors(); i < ncons; i++) + { + for (unsigned j = 0, nargs = dt[i].getNumArgs(); j < nargs; j++) + { + registerSygusType(getArgType(dt[i], j)); + } + } //iterate over constructors for( unsigned i=0; i