summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Reynolds <andrew.j.reynolds@gmail.com>2018-11-27 19:27:57 -0600
committerGitHub <noreply@github.com>2018-11-27 19:27:57 -0600
commit4698209a407a18ec667a20983328a03d42095e40 (patch)
treedf0420685321869565d378083bd598b4396fc015 /src
parenta2bba0806dab0e0d4728bbba8e4e6b4160335eeb (diff)
Improve cegqi engine trace. (#2714)
Diffstat (limited to 'src')
-rw-r--r--src/theory/quantifiers/sygus/synth_conjecture.cpp27
-rw-r--r--src/theory/quantifiers/sygus/synth_engine.cpp11
2 files changed, 22 insertions, 16 deletions
diff --git a/src/theory/quantifiers/sygus/synth_conjecture.cpp b/src/theory/quantifiers/sygus/synth_conjecture.cpp
index e1cbed044..3f0ac70f5 100644
--- a/src/theory/quantifiers/sygus/synth_conjecture.cpp
+++ b/src/theory/quantifiers/sygus/synth_conjecture.cpp
@@ -354,7 +354,7 @@ bool SynthConjecture::doCheck(std::vector<Node>& lems)
if (!d_master->allowPartialModel() && !fullModel)
{
// we retain the values in d_ev_active_gen_waiting
- Trace("cegqi-engine") << "...partial model, fail." << std::endl;
+ Trace("cegqi-engine-debug") << "...partial model, fail." << std::endl;
// if we are partial due to an active enumerator, we may still succeed
// on the next call
return !activeIncomplete;
@@ -362,19 +362,27 @@ bool SynthConjecture::doCheck(std::vector<Node>& lems)
// the waiting values are passed to the module below, clear
d_ev_active_gen_waiting.clear();
- // debug print
Assert(terms.size() == enum_values.size());
bool emptyModel = true;
- Trace("cegqi-engine") << " * Value is : ";
for (unsigned i = 0, size = terms.size(); i < size; i++)
{
- Node nv = enum_values[i];
- if (!nv.isNull())
+ if (!enum_values[i].isNull())
{
emptyModel = false;
}
- if (Trace.isOn("cegqi-engine"))
+ }
+ if (emptyModel)
+ {
+ Trace("cegqi-engine-debug") << "...empty model, fail." << std::endl;
+ return !activeIncomplete;
+ }
+ // debug print
+ if (Trace.isOn("cegqi-engine"))
+ {
+ Trace("cegqi-engine") << " * Value is : ";
+ for (unsigned i = 0, size = terms.size(); i < size; i++)
{
+ Node nv = enum_values[i];
Node onv = nv.isNull() ? d_qe->getModel()->getValue(terms[i]) : nv;
TypeNode tn = onv.getType();
std::stringstream ss;
@@ -395,12 +403,7 @@ bool SynthConjecture::doCheck(std::vector<Node>& lems)
}
}
}
- }
- Trace("cegqi-engine") << std::endl;
- if (emptyModel)
- {
- Trace("cegqi-engine") << "...empty model, fail." << std::endl;
- return !activeIncomplete;
+ Trace("cegqi-engine") << std::endl;
}
Assert(candidate_values.empty());
constructed_cand = d_master->constructCandidates(
diff --git a/src/theory/quantifiers/sygus/synth_engine.cpp b/src/theory/quantifiers/sygus/synth_engine.cpp
index 479cfa535..d3eff1750 100644
--- a/src/theory/quantifiers/sygus/synth_engine.cpp
+++ b/src/theory/quantifiers/sygus/synth_engine.cpp
@@ -321,7 +321,8 @@ bool SynthEngine::checkConjecture(SynthConjecture* conj)
return true;
}
- Trace("cegqi-engine") << " *** Check candidate phase..." << std::endl;
+ Trace("cegqi-engine-debug")
+ << " *** Check candidate phase..." << std::endl;
std::vector<Node> cclems;
bool ret = conj->doCheck(cclems);
bool addedLemma = false;
@@ -343,7 +344,8 @@ bool SynthEngine::checkConjecture(SynthConjecture* conj)
}
if (addedLemma)
{
- Trace("cegqi-engine") << " ...check for counterexample." << std::endl;
+ Trace("cegqi-engine-debug")
+ << " ...check for counterexample." << std::endl;
return true;
}
else
@@ -358,7 +360,8 @@ bool SynthEngine::checkConjecture(SynthConjecture* conj)
}
else
{
- Trace("cegqi-engine") << " *** Refine candidate phase..." << std::endl;
+ Trace("cegqi-engine-debug")
+ << " *** Refine candidate phase..." << std::endl;
std::vector<Node> rlems;
conj->doRefine(rlems);
bool addedLemma = false;
@@ -381,7 +384,7 @@ bool SynthEngine::checkConjecture(SynthConjecture* conj)
}
if (addedLemma)
{
- Trace("cegqi-engine") << " ...refine candidate." << std::endl;
+ Trace("cegqi-engine-debug") << " ...refine candidate." << std::endl;
}
}
return true;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback