Trace("cegis") << "...register enumerator " << candidates[i];
// We use symbolic constants if we are doing repair constants or if the
// grammar construction was not simple.
- bool useSymCons = false;
if (options::sygusRepairConst()
|| options::sygusGrammarConsMode()
!= options::SygusGrammarConsMode::SIMPLE)
SygusTypeInfo& cti = d_tds->getTypeInfo(ctn);
if (cti.hasSubtermSymbolicCons())
{
- useSymCons = true;
// remember that we are using symbolic constructors
d_usingSymCons = true;
Trace("cegis") << " (using symbolic constructors)";
}
}
Trace("cegis") << std::endl;
- d_tds->registerEnumerator(
- candidates[i], candidates[i], d_parent, erole, useSymCons);
+ d_tds->registerEnumerator(candidates[i], candidates[i], d_parent, erole);
}
return true;
}
}
Trace("cegis-unif-enum") << "* Registering new enumerator " << e
<< " to strategy point " << si.d_pt << "\n";
- bool useSymCons =
- options::sygusGrammarConsMode() != options::SygusGrammarConsMode::SIMPLE;
- d_tds->registerEnumerator(e, si.d_pt, d_parent, erole, useSymCons);
+ d_tds->registerEnumerator(e, si.d_pt, d_parent, erole);
}
void CegisUnifEnumDecisionStrategy::registerEvalPts(
{
sfvl = preGrammarType.getDType().getSygusVarList();
tn = preGrammarType;
+ // normalize type, if user-provided
+ SygusGrammarNorm sygus_norm(d_qe);
+ tn = sygus_norm.normalizeSygusType(tn, sfvl);
}else{
sfvl = getSygusVarList(sf);
// check which arguments are irrelevant
Trace("cegqi-debug") << "...sygus var list associated with " << sf << " is "
<< sfvl << std::endl;
- // normalize type
- SygusGrammarNorm sygus_norm(d_qe);
- tn = sygus_norm.normalizeSygusType(tn, sfvl);
-
std::map<Node, Node>::const_iterator itt = templates.find(sf);
if( itt!=templates.end() ){
Node templ = itt->second;
for (const Node& e : d_candidate_to_enum[c])
{
TypeNode etn = e.getType();
- d_tds->registerEnumerator(e, c, d_parent, ROLE_ENUM_POOL, false);
+ d_tds->registerEnumerator(e, c, d_parent, ROLE_ENUM_POOL);
d_enum_to_candidate[e] = c;
TNode te = e;
// initialize static symmetry breaking lemmas for it
void TermDbSygus::registerEnumerator(Node e,
Node f,
SynthConjecture* conj,
- EnumeratorRole erole,
- bool useSymbolicCons)
+ EnumeratorRole erole)
{
if (d_enum_to_conjecture.find(e) != d_enum_to_conjecture.end())
{
Trace("sygus-db") << " registering symmetry breaking clauses..."
<< std::endl;
- d_enum_to_using_sym_cons[e] = useSymbolicCons;
// depending on if we are using symbolic constructors, introduce symmetry
// breaking lemma templates for each relevant subtype of the grammar
SygusTypeInfo& eti = getTypeInfo(et);
for (unsigned i = 0, ncons = dt.getNumConstructors(); i < ncons; i++)
{
bool isAnyC = static_cast<int>(i) == anyC;
- if (isAnyC && !useSymbolicCons)
- {
- // if we are not using the any constant constructor
- // do not use the symbolic constructor
- rm_indices.push_back(i);
- }
- else if (anyC != -1 && !isAnyC && useSymbolicCons)
+ if (anyC != -1 && !isAnyC)
{
// if we are using the any constant constructor, do not use any
// concrete constant
* and not x2-x1 will be generated, assuming x1 and x2 are in the same
* "subclass", see getSubclassForVar).
*
- * useSymbolicCons : whether we want model values for e to include symbolic
- * constructors like the "any constant" variable.
- *
* An "active guard" may be allocated by this method for e based on erole
* and the policies for active generation.
*/
void registerEnumerator(Node e,
Node f,
SynthConjecture* conj,
- EnumeratorRole erole,
- bool useSymbolicCons = false);
+ EnumeratorRole erole);
/** is e an enumerator registered with this class? */
bool isEnumerator(Node e) const;
/** return the conjecture e is associated with */
regress1/sygus/issue3498.smt2
regress1/sygus/issue3514.smt2
regress1/sygus/issue3507.smt2
+ regress1/sygus/issue3580.sy
regress1/sygus/large-const-simp.sy
regress1/sygus/let-bug-simp.sy
regress1/sygus/list-head-x.sy
; EXPECT: unsat
-; COMMAND-LINE: --sygus-out=status --sygus-repair-const --lang=sygus2
+; COMMAND-LINE: --sygus-out=status --sygus-repair-const --lang=sygus2 --sygus-grammar-cons=any-const
(set-logic LIA)
(synth-inv inv-f ((x Int) (y Int)) )
--- /dev/null
+; EXPECT: unsat
+; COMMAND-LINE: --sygus-out=status --sygus-active-gen=none --lang=sygus2
+(set-logic ALL)
+(synth-fun f
+ () Bool
+ ((B Bool))
+ (
+ (B Bool (true))
+ )
+)
+(synth-fun g
+ ((r Int)) Bool
+ ((B Bool) (I Int) (IConst Int))
+ (
+ (B Bool ((= I I) (=> B B)))
+ (I Int (r 0 (mod I IConst)))
+ (IConst Int ((Constant Int)))
+ )
+)
+(constraint (g 0))
+(constraint (not (g 1)))
+(constraint (g 2))
+(constraint f)
+(check-synth)
; EXPECT: unsat
-; COMMAND-LINE: --sygus-out=status --sygus-repair-const
+; COMMAND-LINE: --sygus-out=status --sygus-repair-const --sygus-grammar-cons=any-const
(set-logic LIA)
(synth-inv inv-f ((y Int) (z Int) (c Int)))