}
bool Datatype::getSygusAllowAll() const {
- return d_sygus_allow_const;
+ return d_sygus_allow_all;
}
Expr Datatype::getSygusEvaluationFunc() const {
if(node.getKind() == kind::FORALL || node.getKind() == kind::EXISTS) {
// Remember if we're inside a quantifier
inQuant = true;
- }else if( theory::kindToTheoryId(node.getKind())!=theory::THEORY_BOOL &&
- node.getKind()!=kind::EQUAL && node.getKind()!=kind::SEP_STAR &&
- node.getKind()!=kind::SEP_WAND && node.getKind()!=kind::SEP_LABEL &&
- node.getKind()!=kind::BITVECTOR_EAGER_ATOM ){
+ }else if( !inTerm && hasNestedTermChildren( node ) ){
// Remember if we're inside a term
Debug("ite") << "In term because of " << node << " " << node.getKind() << std::endl;
inTerm = true;
if(node.getKind() == kind::FORALL || node.getKind() == kind::EXISTS) {
// Remember if we're inside a quantifier
inQuant = true;
- }else if( theory::kindToTheoryId(node.getKind())!=theory::THEORY_BOOL && node.getKind()!=kind::EQUAL ){
+ }else if( !inTerm && hasNestedTermChildren( node ) ){
// Remember if we're inside a term
inTerm = true;
}
}
}
+// returns true if the children of node should be considered nested terms
+bool RemoveTermFormulas::hasNestedTermChildren( TNode node ) {
+ return theory::kindToTheoryId(node.getKind())!=theory::THEORY_BOOL &&
+ node.getKind()!=kind::EQUAL && node.getKind()!=kind::SEP_STAR &&
+ node.getKind()!=kind::SEP_WAND && node.getKind()!=kind::SEP_LABEL &&
+ node.getKind()!=kind::BITVECTOR_EAGER_ATOM;
+ // dont' worry about FORALL or EXISTS (handled separately)
+}
+
}/* CVC4 namespace */
Node CegConjectureSingleInv::reconstructToSyntax( Node s, TypeNode stn, int& reconstructed, bool rconsSygus ) {
d_solution = s;
const Datatype& dt = ((DatatypeType)(stn).toType()).getDatatype();
+ Trace("csi-sol") << "Reconstruct to syntax " << s << ", allow all = " << dt.getSygusAllowAll() << " " << stn << ", reconstruct = " << rconsSygus << std::endl;
//reconstruct the solution into sygus if necessary
reconstructed = 0;