This ensures we infer when a conjecture is PBE based on the conjecture plus the side condition for abduction. This fixes issues where the sygus solver was over-pruning solutions for abduction queries.
It also changes the names of internal symbols used for abduction/interpolation queries. These names are used when the experimental sygus-stream is used. These symbols are changed (from "A") to avoid confusion with user symbols.
conjn = conjn.negate();
d_abdConj = conjn;
asserts.push_back(conjn);
- std::string name("A");
+ std::string name("__internal_abduct");
Node aconj = quantifiers::SygusAbduct::mkAbductionConjecture(
name, asserts, axioms, grammarType);
// should be a quantified conjecture with one function-to-synthesize
<< std::endl;
// must expand definitions
Node conjn = d_env.getTopLevelSubstitutions().apply(conj);
- std::string name("A");
+ std::string name("__internal_interpol");
quantifiers::SygusInterpol interpolSolver(d_env);
if (interpolSolver.solveInterpolation(
// First, must be unique up to rewriting
if (bterms.find(bnr) != bterms.end())
{
- Trace("sygus-enum-exc") << "Exclude: " << bn << std::endl;
+ Trace("sygus-enum-exc") << "Exclude (by rewriting): " << bn << std::endl;
return false;
}
// insert to builtin term cache, regardless of whether it is redundant
// callback-specific add term
if (!addTermInternal(n, bn, bnr))
{
- Trace("sygus-enum-exc")
- << "Exclude: " << bn << " due to callback" << std::endl;
return false;
}
Trace("sygus-enum-terms") << "tc(" << d_tn << "): term " << bn << std::endl;
}
}
// initialize the example inference utility
- if (!d_exampleInfer->initialize(d_base_inst, d_candidates))
+ // Notice that we must also consider the side condition when inferring
+ // whether the conjecture is PBE. This ensures we do not prune solutions
+ // that may satisfy the side condition based on equivalence-up-to-examples
+ // with solutions that do not.
+ Node conjForExamples = d_base_inst;
+ if (!d_embedSideCondition.isNull())
+ {
+ conjForExamples = nm->mkNode(AND, d_embedSideCondition, d_base_inst);
+ }
+ if (d_exampleInfer!=nullptr && !d_exampleInfer->initialize(conjForExamples, d_candidates))
{
// there is a contradictory example pair, the conjecture is infeasible.
Node infLem = d_feasible_guard.negate();
}
// otherwise, allocate it
Node f = d_tds->getSynthFunForEnumerator(e);
- bool hasExamples = (d_exampleInfer->hasExamples(f)
+ bool hasExamples = (d_exampleInfer != nullptr && d_exampleInfer->hasExamples(f)
&& d_exampleInfer->getNumExamples(f) != 0);
d_enumManager[e].reset(new EnumValueManager(
d_env, d_qstate, d_qim, d_treg, d_stats, e, hasExamples));
regress1/sygus/abd-simple-conj-4.smt2
regress1/sygus/abduction_1255.corecstrs.readable.smt2
regress1/sygus/abduction_streq.readable.smt2
+ regress1/sygus/abduction-no-pbe-sym-break.smt2
regress1/sygus/abv.sy
regress1/sygus/array-grammar-store.sy
regress1/sygus/array_search_5-Q-easy.sy
--- /dev/null
+; COMMAND-LINE: --produce-abducts
+; SCRUBBER: grep -v -E '(\(define-fun)'
+; EXIT: 0
+
+(set-logic UF)
+(set-option :produce-abducts true)
+(declare-const A Bool)
+(declare-const B Bool)
+(declare-const C Bool)
+(assert (=> A C))
+(get-abduct D (=> A B))