Don't pass the automaton to enumerate_cycle and is_weak_scc.

The scc_map knows the automaton already.

* src/tgbaalgos/cycles.cc, src/tgbaalgos/cycles.hh,
src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh: Simplify the
interface.
* src/tgbatest/ltl2tgba.cc: Adjust calls.
This commit is contained in:
Alexandre Duret-Lutz 2012-09-21 14:30:34 +02:00
parent 40de47f159
commit d228784c39
5 changed files with 17 additions and 18 deletions

View file

@ -33,8 +33,8 @@ namespace spot
public:
bool result;
weak_checker(const tgba* aut, const scc_map& map)
: enumerate_cycles(aut, map), result(true)
weak_checker(const scc_map& map)
: enumerate_cycles(map), result(true)
{
}
@ -66,14 +66,14 @@ namespace spot
}
bool
is_weak_scc(const tgba* aut, scc_map& map, unsigned scc)
is_weak_scc(scc_map& map, unsigned scc)
{
// If no cycle is accepting, the SCC is weak.
if (!map.accepting(scc))
return true;
// If the SCC is accepting, but one cycle is not, the SCC is not
// weak.
weak_checker w(aut, map);
weak_checker w(map);
w.run(scc);
return w.result;
}