summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus/synth_conjecture.cpp
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2021-12-09 08:38:28 -0600
committerGitHub <noreply@github.com>2021-12-09 14:38:28 +0000
commitfd58b474ac339da44dc27ddbad12fefaf3fbbd4e (patch)
tree6ecd92576c2b9700d9ae49389e52865e68a83e88 /src/theory/quantifiers/sygus/synth_conjecture.cpp
parent5429a0bc6d0fc041e1a70966dee40e530862fb86 (diff)
Do not make SyGuS subsolver in unsat state after solving (#7759)
This makes subsolvers answer "unknown" instead of "unsat" when solving SyGuS inputs, by setting unknown when a SyGuS input is solved instead of asserting the negation of the input. Knowing whether the call was successful is simply obtained by calling getSynthSolutions. This will allow for multiple solutions for the same conjecture.
Diffstat (limited to 'src/theory/quantifiers/sygus/synth_conjecture.cpp')
-rw-r--r--src/theory/quantifiers/sygus/synth_conjecture.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/src/theory/quantifiers/sygus/synth_conjecture.cpp b/src/theory/quantifiers/sygus/synth_conjecture.cpp
index a90551a0f..e5dfe408b 100644
--- a/src/theory/quantifiers/sygus/synth_conjecture.cpp
+++ b/src/theory/quantifiers/sygus/synth_conjecture.cpp
@@ -306,6 +306,10 @@ bool SynthConjecture::needsCheck()
bool SynthConjecture::doCheck()
{
+ if (d_hasSolution)
+ {
+ return true;
+ }
if (isSingleInvocation())
{
// We now try to solve with the single invocation solver, which may or may
@@ -314,14 +318,12 @@ bool SynthConjecture::doCheck()
if (d_ceg_si->solve())
{
d_hasSolution = true;
- // the conjecture has a solution, so its negation holds
- Node qn = d_quant.negate();
- d_qim.addPendingLemma(qn, InferenceId::QUANTIFIERS_SYGUS_SI_SOLVED);
+ // the conjecture has a solution, we set incomplete
+ d_qim.setIncomplete(IncompleteId::QUANTIFIERS_SYGUS_SOLVED);
}
return true;
}
Assert(d_master != nullptr);
- Assert(!d_hasSolution);
// get the list of terms that the master strategy is interested in
std::vector<Node> terms;
@@ -506,11 +508,10 @@ bool SynthConjecture::doCheck()
if (options().quantifiers.cegisSample == options::CegisSampleMode::TRUST)
{
// we have that the current candidate passed a sample test
- // since we trust sampling in this mode, we assert there is no
- // counterexample to the conjecture here.
- Node qn = d_quant.negate();
- d_qim.addPendingLemma(qn,
- InferenceId::QUANTIFIERS_SYGUS_SAMPLE_TRUST_SOLVED);
+ // since we trust sampling in this mode, we assume there is a solution here
+ // and set incomplete.
+ d_hasSolution = true;
+ d_qim.setIncomplete(IncompleteId::QUANTIFIERS_SYGUS_SOLVED);
recordSolution(candidate_values);
return true;
}
@@ -573,10 +574,8 @@ bool SynthConjecture::doCheck()
d_hasSolution = false;
return false;
}
- // Use lemma to terminate with "unsat", this is justified by the verification
- // check above, which confirms the synthesis conjecture is solved.
- Node qn = d_quant.negate();
- d_qim.addPendingLemma(qn, InferenceId::QUANTIFIERS_SYGUS_VERIFY_SOLVED);
+ // We set incomplete and terminate with unknown.
+ d_qim.setIncomplete(IncompleteId::QUANTIFIERS_SYGUS_SOLVED);
return true;
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback