This makes it so that -t nl-ext is a concise summary of what the nl-ext solver is doing, which I use frequently for debugging.
This is a temporary solution, we should consider a deeper refactoring of traces throughout NL at some point.
void NonlinearExtension::getAssertions(std::vector<Node>& assertions)
{
- Trace("nl-ext") << "Getting assertions..." << std::endl;
+ Trace("nl-ext-assert-debug") << "Getting assertions..." << std::endl;
bool useRelevance = false;
if (options::nlRlvMode() == options::NlRlvMode::INTERLEAVE)
{
++it)
{
const Assertion& assertion = *it;
- Trace("nl-ext") << "Loaded " << assertion.d_assertion << " from theory"
- << std::endl;
+ Trace("nl-ext-assert-debug")
+ << "Loaded " << assertion.d_assertion << " from theory" << std::endl;
Node lit = assertion.d_assertion;
if (useRelevance && !v.isRelevant(lit))
{
auto iait = init_assertions.find(lit);
if (iait != init_assertions.end())
{
- Trace("nl-ext") << "Adding " << lit << std::endl;
+ Trace("nl-ext-assert-debug") << "Adding " << lit << std::endl;
assertions.push_back(lit);
init_assertions.erase(iait);
}
// function by the code above.
for (const Node& a : init_assertions)
{
- Trace("nl-ext") << "Adding " << a << std::endl;
+ Trace("nl-ext-assert-debug") << "Adding " << a << std::endl;
assertions.push_back(a);
}
Trace("nl-ext") << "...keep " << assertions.size() << " / "
{
++(d_stats.d_checkRuns);
- if (Trace.isOn("nl-ext"))
+ if (Trace.isOn("nl-strategy"))
{
for (const auto& a : assertions)
{
- Trace("nl-ext") << "Input assertion: " << a << std::endl;
+ Trace("nl-strategy") << "Input assertion: " << a << std::endl;
}
}
if (!d_strategy.isStrategyInit())
while (!stop && steps.hasNext())
{
InferStep step = steps.next();
- Trace("nl-ext") << "Step " << step << std::endl;
+ Trace("nl-strategy") << "Step " << step << std::endl;
switch (step)
{
case InferStep::BREAK: stop = d_im.hasPendingLemma(); break;
}
}
+ Trace("nl-ext") << "finished strategy" << std::endl;
Trace("nl-ext") << " ...finished with " << d_im.numWaitingLemmas()
<< " waiting lemmas." << std::endl;
Trace("nl-ext") << " ...finished with " << d_im.numPendingLemmas()
void ExponentialSolver::checkInitialRefine()
{
NodeManager* nm = NodeManager::currentNM();
- Trace("nl-ext")
- << "Get initial refinement lemmas for transcendental functions..."
- << std::endl;
for (std::pair<const Kind, std::vector<Node> >& tfl : d_data->d_funcMap)
{
if (tfl.first != Kind::EXPONENTIAL)
{
continue;
}
+ Trace("nl-ext")
+ << "Get initial (exp) refinement lemmas for transcendental functions..."
+ << std::endl;
Assert(tfl.first == Kind::EXPONENTIAL);
for (const Node& t : tfl.second)
{
void ExponentialSolver::checkMonotonic()
{
- Trace("nl-ext") << "Get monotonicity lemmas for transcendental functions..."
- << std::endl;
-
auto it = d_data->d_funcMap.find(Kind::EXPONENTIAL);
if (it == d_data->d_funcMap.end())
{
return;
}
+ Trace("nl-ext")
+ << "Get monotonicity lemmas for (exp) transcendental functions..."
+ << std::endl;
// sort arguments of all transcendentals
std::vector<Node> tf_args;
std::map<Node, Node> tf_arg_to_term;
void SineSolver::checkInitialRefine()
{
NodeManager* nm = NodeManager::currentNM();
- Trace("nl-ext")
- << "Get initial refinement lemmas for transcendental functions..."
- << std::endl;
for (std::pair<const Kind, std::vector<Node> >& tfl : d_data->d_funcMap)
{
if (tfl.first != Kind::SINE)
{
continue;
}
+ Trace("nl-ext") << "Get initial (sine) refinement lemmas for "
+ "transcendental functions..."
+ << std::endl;
for (const Node& t : tfl.second)
{
// initial refinements
void SineSolver::checkMonotonic()
{
- Trace("nl-ext") << "Get monotonicity lemmas for transcendental functions..."
- << std::endl;
auto it = d_data->d_funcMap.find(Kind::SINE);
if (it == d_data->d_funcMap.end())
Trace("nl-ext-exp") << "No sine terms" << std::endl;
return;
}
+ Trace("nl-ext")
+ << "Get monotonicity lemmas for (sine) transcendental functions..."
+ << std::endl;
// sort arguments of all transcendentals
std::vector<Node> tf_args;
void TranscendentalSolver::checkTranscendentalTangentPlanes()
{
- Trace("nl-ext") << "Get tangent plane lemmas for transcendental functions..."
- << std::endl;
+ if (Trace.isOn("nl-ext"))
+ {
+ if (!d_tstate.d_funcMap.empty())
+ {
+ Trace("nl-ext")
+ << "Get tangent plane lemmas for transcendental functions..."
+ << std::endl;
+ }
+ }
// this implements Figure 3 of "Satisfiaility Modulo Transcendental Functions
// via Incremental Linearization" by Cimatti et al
for (const std::pair<const Kind, std::vector<Node> >& tfs :