Replace most uses of scc_map by scc_info.
This involves reimplementing some algorithms using tgba_digraph, and implementing an explicit product that takes two tgba_digraphs and produces a tgba_digraph. * src/tgbaalgos/product.cc, src/tgbaalgos/product.hh: New files. * src/tgbaalgos/Makefile.am: Adjust. * src/bin/ltlcross.cc, src/tgba/tgba.cc, src/tgba/tgba.hh, src/tgba/tgbasafracomplement.cc, src/tgba/tgbasafracomplement.hh, src/tgbaalgos/cycles.cc, src/tgbaalgos/cycles.hh, src/tgbaalgos/degen.cc, src/tgbaalgos/degen.hh, src/tgbaalgos/isweakscc.cc, src/tgbaalgos/isweakscc.hh, src/tgbaalgos/minimize.cc, src/tgbaalgos/minimize.hh, src/tgbaalgos/powerset.cc, src/tgbaalgos/powerset.hh, src/tgbaalgos/safety.cc, src/tgbaalgos/safety.hh, src/tgbaalgos/sccinfo.cc, src/tgbaalgos/sccinfo.hh, src/tgbatest/complementation.cc, src/tgbatest/emptchk.cc, src/tgbatest/ltl2ta.test, src/tgbatest/ltl2tgba.cc, src/tgbatest/randtgba.cc: Update to use scc_info and/or tgba_digraph.
This commit is contained in:
parent
b6745482af
commit
2fb436a174
27 changed files with 497 additions and 394 deletions
|
|
@ -54,7 +54,7 @@
|
|||
#include "tgbaalgos/gtec/gtec.hh"
|
||||
#include "misc/timer.hh"
|
||||
#include "tgbaalgos/stats.hh"
|
||||
#include "tgbaalgos/scc.hh"
|
||||
#include "tgbaalgos/sccinfo.hh"
|
||||
#include "tgbaalgos/emptiness_stats.hh"
|
||||
#include "tgbaalgos/scc.hh"
|
||||
#include "tgbaalgos/sccinfo.hh"
|
||||
|
|
@ -1286,14 +1286,14 @@ checked_main(int argc, char** argv)
|
|||
{
|
||||
if (degeneralize_opt == DegenTBA)
|
||||
{
|
||||
a = spot::degeneralize_tba(a, degen_reset, degen_order,
|
||||
degen_cache);
|
||||
a = spot::degeneralize_tba(ensure_digraph(a),
|
||||
degen_reset, degen_order, degen_cache);
|
||||
}
|
||||
else if (degeneralize_opt == DegenSBA)
|
||||
{
|
||||
tm.start("degeneralization");
|
||||
a = spot::degeneralize(a, degen_reset, degen_order,
|
||||
degen_cache);
|
||||
a = spot::degeneralize(ensure_digraph(a),
|
||||
degen_reset, degen_order, degen_cache);
|
||||
tm.stop("degeneralization");
|
||||
assume_sba = true;
|
||||
}
|
||||
|
|
@ -1303,7 +1303,8 @@ checked_main(int argc, char** argv)
|
|||
&& (!f || f->is_syntactic_recurrence()))
|
||||
{
|
||||
tm.start("determinization 2");
|
||||
auto determinized = tba_determinize(a, 0, opt_determinize_threshold);
|
||||
auto determinized = tba_determinize(ensure_digraph(a), 0,
|
||||
opt_determinize_threshold);
|
||||
tm.stop("determinization 2");
|
||||
if (determinized)
|
||||
a = determinized;
|
||||
|
|
@ -1312,7 +1313,7 @@ checked_main(int argc, char** argv)
|
|||
if (opt_monitor)
|
||||
{
|
||||
tm.start("Monitor minimization");
|
||||
a = minimize_monitor(a);
|
||||
a = minimize_monitor(ensure_digraph(a));
|
||||
tm.stop("Monitor minimization");
|
||||
assume_sba = false; // All states are accepting, so double
|
||||
// circles in the dot output are
|
||||
|
|
@ -1397,7 +1398,7 @@ checked_main(int argc, char** argv)
|
|||
if (opt_monitor)
|
||||
{
|
||||
tm.start("Monitor minimization");
|
||||
a = minimize_monitor(a);
|
||||
a = minimize_monitor(ensure_digraph(a));
|
||||
tm.stop("Monitor minimization");
|
||||
assume_sba = false; // All states are accepting, so double
|
||||
// circles in the dot output are
|
||||
|
|
@ -1509,7 +1510,7 @@ checked_main(int argc, char** argv)
|
|||
if (degeneralize_opt == DegenTBA)
|
||||
{
|
||||
tm.start("degeneralize product");
|
||||
a = spot::degeneralize_tba(a,
|
||||
a = spot::degeneralize_tba(ensure_digraph(a),
|
||||
degen_reset,
|
||||
degen_order,
|
||||
degen_cache);
|
||||
|
|
@ -1518,7 +1519,7 @@ checked_main(int argc, char** argv)
|
|||
else if (degeneralize_opt == DegenSBA)
|
||||
{
|
||||
tm.start("degeneralize product");
|
||||
a = spot::degeneralize(a,
|
||||
a = spot::degeneralize(ensure_digraph(a),
|
||||
degen_reset,
|
||||
degen_order,
|
||||
degen_cache);
|
||||
|
|
@ -1572,7 +1573,7 @@ checked_main(int argc, char** argv)
|
|||
// It is possible that we have applied other
|
||||
// operations to the automaton since its initial
|
||||
// degeneralization. Let's degeneralize again!
|
||||
auto s = spot::degeneralize(a, degen_reset,
|
||||
auto s = spot::degeneralize(ensure_digraph(a), degen_reset,
|
||||
degen_order, degen_cache);
|
||||
spot::never_claim_reachable(std::cout, s, f, spin_comments);
|
||||
}
|
||||
|
|
@ -1621,8 +1622,8 @@ checked_main(int argc, char** argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
bool g = is_guarantee_automaton(a);
|
||||
bool s = is_safety_mwdba(a);
|
||||
bool g = is_guarantee_automaton(ensure_digraph(a));
|
||||
bool s = is_safety_mwdba(ensure_digraph(a));
|
||||
if (g && !s)
|
||||
{
|
||||
std::cout << "this is a guarantee property (hence, "
|
||||
|
|
@ -1649,8 +1650,7 @@ checked_main(int argc, char** argv)
|
|||
break;
|
||||
case 15:
|
||||
{
|
||||
spot::scc_map m(a);
|
||||
m.build_map();
|
||||
spot::scc_info m(ensure_digraph(a));
|
||||
spot::enumerate_cycles c(m);
|
||||
unsigned max = m.scc_count();
|
||||
for (unsigned n = 0; n < max; ++n)
|
||||
|
|
@ -1662,8 +1662,7 @@ checked_main(int argc, char** argv)
|
|||
}
|
||||
case 16:
|
||||
{
|
||||
spot::scc_map m(a);
|
||||
m.build_map();
|
||||
spot::scc_info m(ensure_digraph(a));
|
||||
unsigned max = m.scc_count();
|
||||
for (unsigned n = 0; n < max; ++n)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue