summaryrefslogtreecommitdiff
path: root/src/theory/quantifiers/sygus/synth_conjecture.cpp
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2019-12-17 13:43:44 -0800
committerGitHub <noreply@github.com>2019-12-17 13:43:44 -0800
commite9499c41f405df8b42fd9ae10004b1b91a869106 (patch)
treefa1475f43a3e61b8f6ffdcb903b65919eba28661 /src/theory/quantifiers/sygus/synth_conjecture.cpp
parent9b2914ed9f7b14ecf535ffe9e1328d0fa042e072 (diff)
Generate code for options with modes. (#3561)
This commit adds support for code generation of options with modes (enums). From now on option enums can be specified in the corresponding *.toml files without the need of extra code. All option enums are now in the options namespace.
Diffstat (limited to 'src/theory/quantifiers/sygus/synth_conjecture.cpp')
-rw-r--r--src/theory/quantifiers/sygus/synth_conjecture.cpp25
1 files changed, 16 insertions, 9 deletions
diff --git a/src/theory/quantifiers/sygus/synth_conjecture.cpp b/src/theory/quantifiers/sygus/synth_conjecture.cpp
index e30f9771c..03449589b 100644
--- a/src/theory/quantifiers/sygus/synth_conjecture.cpp
+++ b/src/theory/quantifiers/sygus/synth_conjecture.cpp
@@ -66,7 +66,7 @@ SynthConjecture::SynthConjecture(QuantifiersEngine* qe, SynthEngine* p)
{
d_modules.push_back(d_ceg_pbe.get());
}
- if (options::sygusUnifPi() != SYGUS_UNIF_PI_NONE)
+ if (options::sygusUnifPi() != options::SygusUnifPiMode::NONE)
{
d_modules.push_back(d_ceg_cegisUnif.get());
}
@@ -483,7 +483,7 @@ bool SynthConjecture::doCheck(std::vector<Node>& lems)
bool sk_refine = (!isGround() || d_refine_count == 0) && constructed_cand;
if (sk_refine)
{
- if (options::cegisSample() == CEGIS_SAMPLE_TRUST)
+ if (options::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
@@ -799,14 +799,17 @@ Node SynthConjecture::getEnumeratedValue(Node e, bool& activeIncomplete)
// or basic. The auto mode always prefers the optimized enumerator over
// the basic one.
Assert(d_tds->isBasicEnumerator(e));
- if (options::sygusActiveGenMode() == SYGUS_ACTIVE_GEN_ENUM_BASIC)
+ if (options::sygusActiveGenMode()
+ == options::SygusActiveGenMode::ENUM_BASIC)
{
d_evg[e].reset(new EnumValGeneratorBasic(d_tds, e.getType()));
}
else
{
- Assert(options::sygusActiveGenMode() == SYGUS_ACTIVE_GEN_ENUM
- || options::sygusActiveGenMode() == SYGUS_ACTIVE_GEN_AUTO);
+ Assert(options::sygusActiveGenMode()
+ == options::SygusActiveGenMode::ENUM
+ || options::sygusActiveGenMode()
+ == options::SygusActiveGenMode::AUTO);
d_evg[e].reset(new SygusEnumerator(d_tds, this));
}
}
@@ -1061,7 +1064,8 @@ void SynthConjecture::printSynthSolution(std::ostream& out)
if (status != 0
&& (options::sygusRewSynth() || options::sygusQueryGen()
- || options::sygusFilterSolMode() != SYGUS_FILTER_SOL_NONE))
+ || options::sygusFilterSolMode()
+ != options::SygusFilterSolMode::NONE))
{
Trace("cegqi-sol-debug") << "Run expression mining..." << std::endl;
std::map<Node, ExpressionMinerManager>::iterator its =
@@ -1078,13 +1082,16 @@ void SynthConjecture::printSynthSolution(std::ostream& out)
{
d_exprm[prog].enableQueryGeneration(options::sygusQueryGenThresh());
}
- if (options::sygusFilterSolMode() != SYGUS_FILTER_SOL_NONE)
+ if (options::sygusFilterSolMode()
+ != options::SygusFilterSolMode::NONE)
{
- if (options::sygusFilterSolMode() == SYGUS_FILTER_SOL_STRONG)
+ if (options::sygusFilterSolMode()
+ == options::SygusFilterSolMode::STRONG)
{
d_exprm[prog].enableFilterStrongSolutions();
}
- else if (options::sygusFilterSolMode() == SYGUS_FILTER_SOL_WEAK)
+ else if (options::sygusFilterSolMode()
+ == options::SygusFilterSolMode::WEAK)
{
d_exprm[prog].enableFilterWeakSolutions();
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback