stats: preparatory change of the implementation of %c

This now holds the scc_info while processing the %c sequence, so that
using options we will soon be able to specify which SCC to count.

* spot/twaalgos/stats.hh, spot/twaalgos/stats.cc (printable_scc_info):
New class.
(state_printer): Use it for %c.
* spot/misc/formater.hh: Add move assignment.
* bin/common_aoutput.hh, bin/common_aoutput.cc: Use printable_scc_info
for %C.
* tests/core/format.test: Add a quick test case to make sure nothing
changed.
This commit is contained in:
Alexandre Duret-Lutz 2016-08-17 14:17:37 +02:00
parent 70de1328d8
commit 4f0a630dbc
6 changed files with 47 additions and 5 deletions

View file

@ -406,7 +406,7 @@ hoa_stat_printer::print(const spot::const_parsed_aut_ptr& haut,
haut_acc_ = haut->aut->acc().num_sets();
if (has('C'))
haut_scc_ = spot::scc_info(haut->aut).scc_count();
haut_scc_.automaton(haut->aut);
if (has('N'))
{
@ -471,6 +471,7 @@ hoa_stat_printer::print(const spot::const_parsed_aut_ptr& haut,
// automata are built.
output_aut_ = nullptr;
input_aut_ = nullptr;
haut_scc_.reset();
return res;
}