{
Assert(d_index == tc.getNumTerms());
Trace("sygus-enum-debug2") << "slave(" << d_tn << ") : force master...\n";
+ // if the size of the master is larger than the size limit, then
+ // there is no use continuing, since there are no more terms that this
+ // slave enumerator can return.
+ if (d_master->getCurrentSize() > d_sizeLim)
+ {
+ return false;
+ }
// must push the master index
if (!d_master->increment())
{
{
return false;
}
+ Trace("sygus-enum-summary") << "SygusEnumerator::TermEnumMaster: increment "
+ << d_tn << "..." << std::endl;
d_isIncrementing = true;
bool ret = incrementInternal();
d_isIncrementing = false;
+ Trace("sygus-enum-summary")
+ << "SygusEnumerator::TermEnumMaster: finished increment " << d_tn
+ << std::endl;
return ret;
}
// restart with constructor class one (skip nullary constructors)
d_consClassNum = 1;
- return incrementInternal();
+
+ // We break for a round: return the null term when we cross a size
+ // boundary. This ensures that the necessary breaks are taken, e.g.
+ // in slave enumerators who may instead want to abandon this call to
+ // increment master when the size of the master makes their increment
+ // infeasible.
+ d_currTermSet = true;
+ d_currTerm = Node::null();
+ return true;
}
bool incSuccess = false;
// the term was not unique based on rewriting
Trace("sygus-enum-debug2") << "master(" << d_tn
<< "): failed addTerm\n";
+ // we will return null (d_currTermSet is true at this point)
+ Assert(d_currTermSet);
d_currTerm = Node::null();
}
}
regress1/sygus/crci-ssb-unk.sy
regress1/sygus/crcy-si-rcons.sy
regress1/sygus/crcy-si.sy
+ regress1/sygus/cube-nia.sy
regress1/sygus/dt-test-ns.sy
regress1/sygus/dup-op.sy
regress1/sygus/fg_polynomial3.sy
--- /dev/null
+; EXPECT: unsat
+; COMMAND-LINE: --sygus-out=status
+
+(set-logic NIA)
+
+(synth-fun cube ((x Int)) Int
+ (
+ (Start Int (ntInt))
+
+ (ntBool Bool
+ (
+ (> ntInt ntInt)
+ (= ntInt ntInt)
+ )
+ )
+ (ntInt Int
+ (1 x
+ (* ntInt ntInt)
+ (ite ntBool ntInt ntInt)
+ )
+ )
+ )
+)
+
+(constraint (= (cube 1) 1))
+(constraint (= (cube 2) 8))
+(check-synth)