sccinfo: introduce is_rejecting()

Because scc_info does not perform a full emptiness check, it is not
always able to tell whether an SCC is accepting if the acceptance
condition use Fin primitives.  This introduce is_rejecting_scc() in
addition to to is_accepting_scc().  Only one of them may be true, but
they can both be false if scc_info has no idea whether the SCC is
accepting.

* src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh: Implement
is_rejecting_scc().
* src/bin/ltlcross.cc, src/tgba/acc.cc, src/tgba/acc.hh,
src/tgbaalgos/dtgbacomp.cc, src/tgbaalgos/isweakscc.cc,
src/tgbaalgos/remfin.cc, src/tgbaalgos/safety.cc,
src/tgbaalgos/sccfilter.cc: Use it.
* src/tgbaalgos/dotty.cc: Use is_rejecting_scc() and is_accepting_scc()
to color SCCs.
* doc/org/oaut.org: Document the colors used.
* src/tgbatest/neverclaimread.test, src/tgbatest/readsave.test: Adjust
tests.
* src/tgbatest/sccdot.test: New test case.
* src/tgbatest/Makefile.am: Add it.
This commit is contained in:
Alexandre Duret-Lutz 2015-03-03 18:09:44 +01:00
parent 8658441839
commit ebe4ffc507
16 changed files with 475 additions and 45 deletions

View file

@ -164,10 +164,25 @@ namespace spot
for (unsigned i = 0; i < sccs; ++i)
{
os_ << " subgraph cluster_" << i << " {\n";
// Color the SCC to indicate whether is it accepting.
if (!si->is_useful_scc(i))
os_ << " color=grey\n";
else if (si->is_trivial(i))
os_ << " color=black\n";
else if (si->is_accepting_scc(i))
os_ << " color=green\n";
else if (si->is_rejecting_scc(i))
os_ << " color=red\n";
else
os_ << " color=orange\n";
if (name_ || opt_show_acc_)
// Reset the label, otherwise the graph label would
// be inherited by the cluster.
os_ << " label=\"\"\n";
{
// Reset the label, otherwise the graph label would
// be inherited by the cluster.
os_ << " label=\"\"\n";
}
for (auto s: si->states_of(i))
process_state(s);
os_ << " }\n";