ltlcross: list collected automata on --verbose

* bin/ltlcross.cc: Here.
This commit is contained in:
Alexandre Duret-Lutz 2016-07-13 15:34:13 +02:00
parent fafb135c87
commit 486d9edad7

View file

@ -1053,11 +1053,6 @@ namespace
spot::cleanup_tmpfiles(); spot::cleanup_tmpfiles();
++round; ++round;
if (!no_checks)
{
std::cerr << "Performing sanity checks and gathering statistics..."
<< std::endl;
auto printsize = [](const spot::const_twa_graph_ptr& aut) auto printsize = [](const spot::const_twa_graph_ptr& aut)
{ {
std::cerr << aut->num_states() << " st.," std::cerr << aut->num_states() << " st.,"
@ -1065,6 +1060,33 @@ namespace
<< aut->num_sets() << " sets"; << aut->num_sets() << " sets";
}; };
if (verbose)
{
std::cerr << "info: collected automata:\n";
auto tmp = [&](std::vector<spot::twa_graph_ptr>& x, unsigned i,
const char prefix)
{
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) if (determinize && !no_complement)
{ {
bool print_first = verbose; bool print_first = verbose;
@ -1108,7 +1130,6 @@ namespace
{ {
if (!x[i]) if (!x[i])
return; return;
cleanup_acceptance_here(x[i]);
if (x[i]->acc().uses_fin_acceptance()) if (x[i]->acc().uses_fin_acceptance())
{ {
if (verbose) if (verbose)
@ -1124,6 +1145,7 @@ namespace
printsize(x[i]); printsize(x[i]);
std::cerr << ") ->"; std::cerr << ") ->";
} }
cleanup_acceptance_here(x[i]);
x[i] = remove_fin(x[i]); x[i] = remove_fin(x[i]);
if (verbose) if (verbose)
{ {
@ -1132,6 +1154,11 @@ namespace
std::cerr << ")\n"; std::cerr << ")\n";
} }
} }
else
{
// Remove useless sets nonetheless.
cleanup_acceptance_here(x[i]);
}
}; };
for (unsigned i = 0; i < m; ++i) for (unsigned i = 0; i < m; ++i)
{ {