Commit 486d9eda authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

ltlcross: list collected automata on --verbose

* bin/ltlcross.cc: Here.
parent fafb135c
......@@ -1053,17 +1053,39 @@ namespace
spot::cleanup_tmpfiles();
++round;
if (!no_checks)
auto printsize = [](const spot::const_twa_graph_ptr& aut)
{
std::cerr << "Performing sanity checks and gathering statistics..."
<< std::endl;
std::cerr << aut->num_states() << " st.,"
<< aut->num_edges() << " ed.,"
<< aut->num_sets() << " sets";
};
auto printsize = [](const spot::const_twa_graph_ptr& aut)
if (verbose)
{
std::cerr << "info: collected automata:\n";
auto tmp = [&](std::vector<spot::twa_graph_ptr>& x, unsigned i,
const char prefix)
{
std::cerr << aut->num_states() << " st.,"
<< aut->num_edges() << " ed.,"
<< aut->num_sets() << " sets";
std::cerr << "info: " << prefix << i << "\t(";
printsize(x[i]);
std::cerr << ')';
if (is_deterministic(x[i]))
std::cerr << " deterministic";
if (is_complete(x[i]))
std::cerr << " complete";
std::cerr << '\n';
};
for (unsigned i = 0; i < m; ++i)
{
tmp(pos, i, 'P');
tmp(neg, i, 'N');
}
}
if (!no_checks)
{
std::cerr << "Performing sanity checks and gathering statistics..."
<< std::endl;
if (determinize && !no_complement)
{
......@@ -1108,7 +1130,6 @@ namespace
{
if (!x[i])
return;
cleanup_acceptance_here(x[i]);
if (x[i]->acc().uses_fin_acceptance())
{
if (verbose)
......@@ -1124,6 +1145,7 @@ namespace
printsize(x[i]);
std::cerr << ") ->";
}
cleanup_acceptance_here(x[i]);
x[i] = remove_fin(x[i]);
if (verbose)
{
......@@ -1132,6 +1154,11 @@ namespace
std::cerr << ")\n";
}
}
else
{
// Remove useless sets nonetheless.
cleanup_acceptance_here(x[i]);
}
};
for (unsigned i = 0; i < m; ++i)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment