* src/tgbatest/randtgba.cc, src/tgbatest/ltl2tgba.cc: Add options
This commit is contained in:
parent
7d0b3fe297
commit
f56abf58b8
3 changed files with 263 additions and 148 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2005-01-24 Denis Poitrenaud <Denis.Poitrenaud@lip6.fr>
|
||||||
|
|
||||||
|
* src/tgbatest/randtgba.cc, src/tgbatest/ltl2tgba.cc: Add options
|
||||||
|
dedicated to display of stats.
|
||||||
|
|
||||||
2005-01-24 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2005-01-24 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
* src/tgbatest/randtgba.cc: Some fixes from Denis for ratio stats.
|
* src/tgbatest/randtgba.cc: Some fixes from Denis for ratio stats.
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
// 02111-1307, USA.
|
// 02111-1307, USA.
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
@ -52,6 +53,9 @@
|
||||||
#include "tgbaalgos/replayrun.hh"
|
#include "tgbaalgos/replayrun.hh"
|
||||||
#include "tgbaalgos/rundotdec.hh"
|
#include "tgbaalgos/rundotdec.hh"
|
||||||
|
|
||||||
|
#include "tgbaalgos/stats.hh"
|
||||||
|
#include "tgbaalgos/emptiness_stats.hh"
|
||||||
|
|
||||||
void
|
void
|
||||||
syntax(char* prog)
|
syntax(char* prog)
|
||||||
{
|
{
|
||||||
|
|
@ -60,6 +64,8 @@ syntax(char* prog)
|
||||||
<< " "<< prog << " -X [OPTIONS...] file" << std::endl
|
<< " "<< prog << " -X [OPTIONS...] file" << std::endl
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< "Options:" << std::endl
|
<< "Options:" << std::endl
|
||||||
|
<< " -0 produce minimal output dedicated to the paper"
|
||||||
|
<< std::endl
|
||||||
<< " -a display the acceptance_conditions BDD, not the "
|
<< " -a display the acceptance_conditions BDD, not the "
|
||||||
<< "reachability graph"
|
<< "reachability graph"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
|
|
@ -154,6 +160,7 @@ main(int argc, char** argv)
|
||||||
int exit_code = 0;
|
int exit_code = 0;
|
||||||
|
|
||||||
bool debug_opt = false;
|
bool debug_opt = false;
|
||||||
|
bool paper_opt = false;
|
||||||
enum { NoDegen, DegenTBA, DegenSBA } degeneralize_opt = NoDegen;
|
enum { NoDegen, DegenTBA, DegenSBA } degeneralize_opt = NoDegen;
|
||||||
bool degeneralize_maybe = false;
|
bool degeneralize_maybe = false;
|
||||||
bool fm_opt = false;
|
bool fm_opt = false;
|
||||||
|
|
@ -186,6 +193,7 @@ main(int argc, char** argv)
|
||||||
spot::ltl::atomic_prop_set* unobservables = 0;
|
spot::ltl::atomic_prop_set* unobservables = 0;
|
||||||
spot::tgba_explicit* system = 0;
|
spot::tgba_explicit* system = 0;
|
||||||
spot::tgba* product = 0;
|
spot::tgba* product = 0;
|
||||||
|
spot::tgba* product_to_free = 0;
|
||||||
spot::bdd_dict* dict = new spot::bdd_dict();
|
spot::bdd_dict* dict = new spot::bdd_dict();
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
|
|
@ -195,7 +203,11 @@ main(int argc, char** argv)
|
||||||
|
|
||||||
++formula_index;
|
++formula_index;
|
||||||
|
|
||||||
if (!strcmp(argv[formula_index], "-a"))
|
if (!strcmp(argv[formula_index], "-0"))
|
||||||
|
{
|
||||||
|
paper_opt = true;
|
||||||
|
}
|
||||||
|
else if (!strcmp(argv[formula_index], "-a"))
|
||||||
{
|
{
|
||||||
output = 2;
|
output = 2;
|
||||||
}
|
}
|
||||||
|
|
@ -641,8 +653,22 @@ main(int argc, char** argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spot::tgba* product_degeneralized = 0;
|
||||||
|
|
||||||
if (system)
|
if (system)
|
||||||
a = product = new spot::tgba_product(system, a);
|
{
|
||||||
|
a = product = product_to_free = new spot::tgba_product(system, a);
|
||||||
|
if (degeneralize_maybe
|
||||||
|
&& degeneralize_opt == NoDegen
|
||||||
|
&& product->number_of_acceptance_conditions() > 1)
|
||||||
|
degeneralize_opt = DegenTBA;
|
||||||
|
if (degeneralize_opt == DegenTBA)
|
||||||
|
a = product = product_degeneralized =
|
||||||
|
new spot::tgba_tba_proxy(product);
|
||||||
|
else if (degeneralize_opt == DegenSBA)
|
||||||
|
a = product = product_degeneralized =
|
||||||
|
new spot::tgba_sba_proxy(product);
|
||||||
|
}
|
||||||
|
|
||||||
switch (output)
|
switch (output)
|
||||||
{
|
{
|
||||||
|
|
@ -726,9 +752,12 @@ main(int argc, char** argv)
|
||||||
case Tau03Search:
|
case Tau03Search:
|
||||||
if (a->number_of_acceptance_conditions() == 0)
|
if (a->number_of_acceptance_conditions() == 0)
|
||||||
{
|
{
|
||||||
std::cout << "To apply tau03_search, the automaton must have at "
|
if (!paper_opt)
|
||||||
<< "least one accepting condition. Try with another "
|
std::cout << "To apply tau03_search, the automaton must have at"
|
||||||
<< "algorithm." << std::endl;
|
<< " least one accepting condition. Try with another"
|
||||||
|
<< " algorithm." << std::endl;
|
||||||
|
else
|
||||||
|
std::cout << std::endl;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -748,63 +777,100 @@ main(int argc, char** argv)
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
spot::emptiness_check_result* res = ec->check();
|
spot::emptiness_check_result* res = ec->check();
|
||||||
if (!graph_run_opt && !graph_run_tgba_opt)
|
if (paper_opt)
|
||||||
ec->print_stats(std::cout);
|
{
|
||||||
if (expect_counter_example != !!res &&
|
std::ios::fmtflags old = std::cout.flags();
|
||||||
(!bit_state_hashing || !expect_counter_example))
|
std::cout << std::left << std::setw(20)
|
||||||
exit_code = 1;
|
<< echeck_algo << ", ";
|
||||||
|
spot::tgba_statistics a_size =
|
||||||
if (!res)
|
spot::stats_reachable(ec->automaton());
|
||||||
{
|
std::cout << std::right << std::setw(10)
|
||||||
std::cout << "no accepting run found";
|
<< a_size.states << ", "
|
||||||
if (bit_state_hashing && expect_counter_example)
|
<< std::right << std::setw(10)
|
||||||
{
|
<< a_size.transitions << ", ";
|
||||||
std::cout << " even if expected" << std::endl;
|
std::cout <<
|
||||||
std::cout << "this is maybe due to the use of the bit "
|
ec->automaton()->number_of_acceptance_conditions()
|
||||||
<< "state hashing technic" << std::endl;
|
<< ", ";
|
||||||
std::cout << "you can try to increase the heap size "
|
const spot::ec_statistics* ecs =
|
||||||
<< "or use an explicit storage" << std::endl;
|
dynamic_cast<const spot::ec_statistics*>(ec);
|
||||||
}
|
if (ecs)
|
||||||
|
std::cout << std::right << std::setw(10)
|
||||||
|
<< ecs->states() << ", "
|
||||||
|
<< std::right << std::setw(10)
|
||||||
|
<< ecs->transitions() << ", "
|
||||||
|
<< std::right << std::setw(10)
|
||||||
|
<< ecs->max_depth();
|
||||||
|
else
|
||||||
|
std::cout << "no stats,, ";
|
||||||
|
if (res)
|
||||||
|
std::cout << ", accepting run found";
|
||||||
|
else
|
||||||
|
std::cout << ", no accepting run found";
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
break;
|
std::cout << std::setiosflags(old);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if (!graph_run_opt && !graph_run_tgba_opt)
|
||||||
|
ec->print_stats(std::cout);
|
||||||
|
if (expect_counter_example != !!res &&
|
||||||
|
(!bit_state_hashing || !expect_counter_example))
|
||||||
|
exit_code = 1;
|
||||||
|
|
||||||
spot::tgba_run* run = res->accepting_run();
|
if (!res)
|
||||||
if (!run)
|
{
|
||||||
{
|
std::cout << "no accepting run found";
|
||||||
std::cout << "an accepting run exists" << std::endl;
|
if (bit_state_hashing && expect_counter_example)
|
||||||
}
|
{
|
||||||
else
|
std::cout << " even if expected" << std::endl;
|
||||||
{
|
std::cout << "this is maybe due to the use of the bit"
|
||||||
if (opt_reduce)
|
<< " state hashing technic" << std::endl;
|
||||||
{
|
std::cout << "you can try to increase the heap size "
|
||||||
spot::tgba_run* redrun =
|
<< "or use an explicit storage"
|
||||||
spot::reduce_run(res->automaton(), run);
|
<< std::endl;
|
||||||
delete run;
|
}
|
||||||
run = redrun;
|
std::cout << std::endl;
|
||||||
}
|
break;
|
||||||
if (graph_run_opt)
|
}
|
||||||
{
|
else
|
||||||
spot::tgba_run_dotty_decorator deco(run);
|
{
|
||||||
spot::dotty_reachable(std::cout, a, &deco);
|
|
||||||
}
|
spot::tgba_run* run = res->accepting_run();
|
||||||
else if (graph_run_tgba_opt)
|
if (!run)
|
||||||
{
|
{
|
||||||
spot::tgba* ar = spot::tgba_run_to_tgba(a, run);
|
std::cout << "an accepting run exists" << std::endl;
|
||||||
spot::dotty_reachable(std::cout, ar);
|
}
|
||||||
delete ar;
|
else
|
||||||
}
|
{
|
||||||
else
|
if (opt_reduce)
|
||||||
{
|
{
|
||||||
spot::print_tgba_run(std::cout, a, run);
|
spot::tgba_run* redrun =
|
||||||
if (!spot::replay_tgba_run(std::cout, a, run, true))
|
spot::reduce_run(res->automaton(), run);
|
||||||
exit_code = 1;
|
delete run;
|
||||||
}
|
run = redrun;
|
||||||
delete run;
|
}
|
||||||
}
|
if (graph_run_opt)
|
||||||
}
|
{
|
||||||
|
spot::tgba_run_dotty_decorator deco(run);
|
||||||
|
spot::dotty_reachable(std::cout, a, &deco);
|
||||||
|
}
|
||||||
|
else if (graph_run_tgba_opt)
|
||||||
|
{
|
||||||
|
spot::tgba* ar = spot::tgba_run_to_tgba(a, run);
|
||||||
|
spot::dotty_reachable(std::cout, ar);
|
||||||
|
delete ar;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
spot::print_tgba_run(std::cout, a, run);
|
||||||
|
if (!spot::replay_tgba_run(std::cout, a, run,
|
||||||
|
true))
|
||||||
|
exit_code = 1;
|
||||||
|
}
|
||||||
|
delete run;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
delete res;
|
delete res;
|
||||||
}
|
}
|
||||||
while (search_many);
|
while (search_many);
|
||||||
|
|
@ -813,7 +879,8 @@ main(int argc, char** argv)
|
||||||
|
|
||||||
if (f)
|
if (f)
|
||||||
spot::ltl::destroy(f);
|
spot::ltl::destroy(f);
|
||||||
delete product;
|
delete product_degeneralized;
|
||||||
|
delete product_to_free;
|
||||||
delete system;
|
delete system;
|
||||||
delete expl;
|
delete expl;
|
||||||
delete degeneralized;
|
delete degeneralized;
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,7 @@ syntax(char* prog)
|
||||||
<< "Options:" << std::endl
|
<< "Options:" << std::endl
|
||||||
<< " -0 suppress default output, just generate the graph"
|
<< " -0 suppress default output, just generate the graph"
|
||||||
<< " in memory" << std::endl
|
<< " in memory" << std::endl
|
||||||
|
<< " -1 produce minimal output dedicated to the paper"
|
||||||
<< " -a N F number of acceptance conditions and probability that"
|
<< " -a N F number of acceptance conditions and probability that"
|
||||||
<< " one is true" << std::endl
|
<< " one is true" << std::endl
|
||||||
<< " [0 0.0]" << std::endl
|
<< " [0 0.0]" << std::endl
|
||||||
|
|
@ -492,70 +493,95 @@ print_ar_stats(ar_stats_type& ar_stats)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
print_ratio_stats(const std::string& s, const ratio_stat_type& ratio_stats)
|
print_ratio_stats(const std::string& s, const ratio_stat_type& ratio_stats,
|
||||||
|
bool opt_paper = false)
|
||||||
{
|
{
|
||||||
std::cout << std::endl;
|
|
||||||
std::ios::fmtflags old = std::cout.flags();
|
std::ios::fmtflags old = std::cout.flags();
|
||||||
std::cout << std::right << std::fixed << std::setprecision(1);
|
if (opt_paper)
|
||||||
|
{
|
||||||
std::cout << "Ratios in case of non-emptiness (" << s << ")"
|
std::cout << "ratios (" << s << ")" << std::endl;
|
||||||
<< std::endl;
|
std::cout << std::right << std::fixed << std::setprecision(1);
|
||||||
std::cout << "<for all algorithms, the reference size is the one of"
|
for (ratio_stat_type::const_iterator i = ratio_stats.begin();
|
||||||
<< " the generalized automaton>" << std::endl;
|
i != ratio_stats.end(); ++i)
|
||||||
std::cout << std::setw(22) << ""
|
{
|
||||||
<< " | % states | % transitions |"
|
std::cout << std::setw(22) << i->first << " "
|
||||||
<< std::endl << std::setw(22) << "algorithm"
|
<< std::setw(8)
|
||||||
<< " | min < mean < max | min < mean < max | n"
|
<< (static_cast<float>(i->second.tot_ratio_states) /
|
||||||
<< std::endl
|
i->second.n) * 100.
|
||||||
<< std::setw(79) << std::setfill('-') << "" << std::setfill(' ')
|
<< " "
|
||||||
<< std::endl;
|
<< std::setw(8)
|
||||||
for (ratio_stat_type::const_iterator i = ratio_stats.begin();
|
<< (static_cast<float>(i->second.tot_ratio_transitions) /
|
||||||
i != ratio_stats.end(); ++i)
|
i->second.n) * 100.
|
||||||
std::cout << std::setw(22) << i->first << " |"
|
<< " "
|
||||||
<< std::setw(6) << i->second.min_ratio_states * 100.
|
<< std::setw(8)
|
||||||
<< " "
|
<< (static_cast<float>(i->second.tot_ratio_depth) /
|
||||||
<< std::setw(8)
|
i->second.n) * 100.
|
||||||
<< (static_cast<float>(i->second.tot_ratio_states) /
|
<< std::setw(4) << i->second.n
|
||||||
i->second.n) * 100.
|
<< std::endl;
|
||||||
<< " "
|
}
|
||||||
<< std::setw(6) << i->second.max_ratio_states * 100.
|
}
|
||||||
<< " |"
|
else
|
||||||
<< std::setw(6) << i->second.min_ratio_transitions * 100.
|
{
|
||||||
<< " "
|
std::cout << std::endl;
|
||||||
<< std::setw(8)
|
std::cout << std::right << std::fixed << std::setprecision(1);
|
||||||
<< (static_cast<float>(i->second.tot_ratio_transitions) /
|
std::cout << "Ratios in case of non-emptiness (" << s << ")"
|
||||||
i->second.n) * 100.
|
<< std::endl;
|
||||||
<< " "
|
std::cout << "<for all algorithms, the reference size is the one of"
|
||||||
<< std::setw(6) << i->second.max_ratio_transitions * 100.
|
<< " the generalized automaton>" << std::endl;
|
||||||
<< " |"
|
std::cout << std::setw(22) << ""
|
||||||
<< std::setw(4) << i->second.n
|
<< " | % states | % transitions |"
|
||||||
<< std::endl;
|
<< std::endl << std::setw(22) << "algorithm"
|
||||||
std::cout << std::setw(79) << std::setfill('-') << "" << std::setfill(' ')
|
<< " | min < mean < max | min < mean < max | n"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< std::setw(22) << ""
|
<< std::setw(79) << std::setfill('-') << ""
|
||||||
<< " | % maximal depth |"
|
<< std::setfill(' ') << std::endl;
|
||||||
<< std::endl
|
for (ratio_stat_type::const_iterator i = ratio_stats.begin();
|
||||||
<< std::setw(22) << "algorithm"
|
i != ratio_stats.end(); ++i)
|
||||||
<< " | min < mean < max | n"
|
std::cout << std::setw(22) << i->first << " |"
|
||||||
<< std::endl
|
<< std::setw(6) << i->second.min_ratio_states * 100.
|
||||||
<< std::setw(53) << std::setfill('-') << "" << std::setfill(' ')
|
<< " "
|
||||||
<< std::endl;
|
<< std::setw(8)
|
||||||
for (ratio_stat_type::const_iterator i = ratio_stats.begin();
|
<< (static_cast<float>(i->second.tot_ratio_states) /
|
||||||
i != ratio_stats.end(); ++i)
|
i->second.n) * 100.
|
||||||
std::cout << std::setw(22) << i->first << " |"
|
<< " "
|
||||||
<< std::setw(6)
|
<< std::setw(6) << i->second.max_ratio_states * 100.
|
||||||
<< i->second.min_ratio_depth * 100.
|
<< " |"
|
||||||
<< " "
|
<< std::setw(6) << i->second.min_ratio_transitions * 100.
|
||||||
<< std::setw(8)
|
<< " "
|
||||||
<< (static_cast<float>(i->second.tot_ratio_depth) /
|
<< std::setw(8)
|
||||||
i->second.n) * 100.
|
<< (static_cast<float>(i->second.tot_ratio_transitions) /
|
||||||
<< " "
|
i->second.n) * 100.
|
||||||
<< std::setw(6)
|
<< " "
|
||||||
<< i->second.max_ratio_depth * 100.
|
<< std::setw(6) << i->second.max_ratio_transitions * 100.
|
||||||
<< " |"
|
<< " |"
|
||||||
<< std::setw(4) << i->second.n
|
<< std::setw(4) << i->second.n
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
std::cout << std::setw(79) << std::setfill('-') << ""
|
||||||
|
<< std::setfill(' ') << std::endl
|
||||||
|
<< std::setw(22) << ""
|
||||||
|
<< " | % maximal depth |"
|
||||||
|
<< std::endl
|
||||||
|
<< std::setw(22) << "algorithm"
|
||||||
|
<< " | min < mean < max | n"
|
||||||
|
<< std::endl
|
||||||
|
<< std::setw(53) << std::setfill('-') << ""
|
||||||
|
<< std::setfill(' ') << std::endl;
|
||||||
|
for (ratio_stat_type::const_iterator i = ratio_stats.begin();
|
||||||
|
i != ratio_stats.end(); ++i)
|
||||||
|
std::cout << std::setw(22) << i->first << " |"
|
||||||
|
<< std::setw(6)
|
||||||
|
<< i->second.min_ratio_depth * 100.
|
||||||
|
<< " "
|
||||||
|
<< std::setw(8)
|
||||||
|
<< (static_cast<float>(i->second.tot_ratio_depth) /
|
||||||
|
i->second.n) * 100.
|
||||||
|
<< " "
|
||||||
|
<< std::setw(6)
|
||||||
|
<< i->second.max_ratio_depth * 100.
|
||||||
|
<< " |"
|
||||||
|
<< std::setw(4) << i->second.n
|
||||||
|
<< std::endl;
|
||||||
|
}
|
||||||
std::cout << std::setiosflags(old);
|
std::cout << std::setiosflags(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -614,6 +640,7 @@ generate_formula(const spot::ltl::random_ltl& rl, int opt_f, int opt_s,
|
||||||
int
|
int
|
||||||
main(int argc, char** argv)
|
main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
|
bool opt_paper = false;
|
||||||
bool opt_dp = false;
|
bool opt_dp = false;
|
||||||
int opt_f = 15;
|
int opt_f = 15;
|
||||||
int opt_F = 0;
|
int opt_F = 0;
|
||||||
|
|
@ -663,6 +690,10 @@ main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
opt_0 = true;
|
opt_0 = true;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[argn], "-1"))
|
||||||
|
{
|
||||||
|
opt_paper = true;
|
||||||
|
}
|
||||||
else if (!strcmp(argv[argn], "-a"))
|
else if (!strcmp(argv[argn], "-a"))
|
||||||
{
|
{
|
||||||
if (argc < argn + 3)
|
if (argc < argn + 3)
|
||||||
|
|
@ -889,7 +920,8 @@ main(int argc, char** argv)
|
||||||
{
|
{
|
||||||
if (opt_ec)
|
if (opt_ec)
|
||||||
{
|
{
|
||||||
std::cout << "seed: " << opt_ec_seed << std::endl;
|
if (!opt_paper)
|
||||||
|
std::cout << "seed: " << opt_ec_seed << std::endl;
|
||||||
spot::srand(opt_ec_seed);
|
spot::srand(opt_ec_seed);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -932,8 +964,11 @@ main(int argc, char** argv)
|
||||||
continue;
|
continue;
|
||||||
++n_ec;
|
++n_ec;
|
||||||
std::string algo = ec_algos[i].name;
|
std::string algo = ec_algos[i].name;
|
||||||
std::cout.width(32);
|
if (!opt_paper)
|
||||||
std::cout << algo << ": ";
|
{
|
||||||
|
std::cout.width(32);
|
||||||
|
std::cout << algo << ": ";
|
||||||
|
}
|
||||||
tm_ec.start(algo);
|
tm_ec.start(algo);
|
||||||
for (int count = opt_R;;)
|
for (int count = opt_R;;)
|
||||||
{
|
{
|
||||||
|
|
@ -960,7 +995,8 @@ main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
std::cout << "acc. run";
|
if (!opt_paper)
|
||||||
|
std::cout << "acc. run";
|
||||||
++n_non_empty;
|
++n_non_empty;
|
||||||
const spot::acss_statistics* acss =
|
const spot::acss_statistics* acss =
|
||||||
dynamic_cast<const spot::acss_statistics*>(res);
|
dynamic_cast<const spot::acss_statistics*>(res);
|
||||||
|
|
@ -991,7 +1027,8 @@ main(int argc, char** argv)
|
||||||
if (!run)
|
if (!run)
|
||||||
{
|
{
|
||||||
tm_ar.cancel(algo);
|
tm_ar.cancel(algo);
|
||||||
std::cout << " exists, not computed";
|
if (!opt_paper)
|
||||||
|
std::cout << " exists, not computed";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1000,17 +1037,19 @@ main(int argc, char** argv)
|
||||||
if (!spot::replay_tgba_run(s, res->automaton(),
|
if (!spot::replay_tgba_run(s, res->automaton(),
|
||||||
run))
|
run))
|
||||||
{
|
{
|
||||||
std::cout << ", but could not replay it "
|
if (!opt_paper)
|
||||||
<< "(ERROR!)";
|
std::cout << ", but could not replay it "
|
||||||
|
<< "(ERROR!)";
|
||||||
failed_seeds.insert(opt_ec_seed);
|
failed_seeds.insert(opt_ec_seed);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << ", computed";
|
if (!opt_paper)
|
||||||
|
std::cout << ", computed";
|
||||||
if (opt_z)
|
if (opt_z)
|
||||||
ar_stats[algo].count(run);
|
ar_stats[algo].count(run);
|
||||||
}
|
}
|
||||||
if (opt_z)
|
if (opt_z && !opt_paper)
|
||||||
std::cout << " [" << run->prefix.size()
|
std::cout << " [" << run->prefix.size()
|
||||||
<< "+" << run->cycle.size()
|
<< "+" << run->cycle.size()
|
||||||
<< "]";
|
<< "]";
|
||||||
|
|
@ -1022,8 +1061,9 @@ main(int argc, char** argv)
|
||||||
if (!spot::replay_tgba_run(s,
|
if (!spot::replay_tgba_run(s,
|
||||||
res->automaton(), redrun))
|
res->automaton(), redrun))
|
||||||
{
|
{
|
||||||
std::cout << ", but could not replay "
|
if (!opt_paper)
|
||||||
<< "its minimization (ERROR!)";
|
std::cout << ", but could not replay "
|
||||||
|
<< "its minimization (ERROR!)";
|
||||||
failed_seeds.insert(opt_ec_seed);
|
failed_seeds.insert(opt_ec_seed);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1032,7 +1072,7 @@ main(int argc, char** argv)
|
||||||
if (opt_z)
|
if (opt_z)
|
||||||
mar_stats[algo].count(redrun);
|
mar_stats[algo].count(redrun);
|
||||||
}
|
}
|
||||||
if (opt_z)
|
if (opt_z && !opt_paper)
|
||||||
{
|
{
|
||||||
std::cout << " [" << redrun->prefix.size()
|
std::cout << " [" << redrun->prefix.size()
|
||||||
<< "+" << redrun->cycle.size()
|
<< "+" << redrun->cycle.size()
|
||||||
|
|
@ -1043,25 +1083,28 @@ main(int argc, char** argv)
|
||||||
delete run;
|
delete run;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
std::cout << std::endl;
|
if (!opt_paper)
|
||||||
|
std::cout << std::endl;
|
||||||
delete res;
|
delete res;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (ec_algos[i].safe)
|
if (ec_algos[i].safe)
|
||||||
{
|
{
|
||||||
std::cout << "empty language" << std::endl;
|
if (!opt_paper)
|
||||||
|
std::cout << "empty language" << std::endl;
|
||||||
++n_empty;
|
++n_empty;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "maybe empty language" << std::endl;
|
if (!opt_paper)
|
||||||
|
std::cout << "maybe empty language" << std::endl;
|
||||||
++n_maybe_empty;
|
++n_maybe_empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_Z)
|
if (opt_Z && !opt_paper)
|
||||||
ec->print_stats(std::cout);
|
ec->print_stats(std::cout);
|
||||||
delete ec;
|
delete ec;
|
||||||
}
|
}
|
||||||
|
|
@ -1100,7 +1143,7 @@ main(int argc, char** argv)
|
||||||
}
|
}
|
||||||
while (opt_F || opt_i);
|
while (opt_F || opt_i);
|
||||||
|
|
||||||
if (!ec_stats.empty())
|
if (!opt_paper && !ec_stats.empty())
|
||||||
{
|
{
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::ios::fmtflags old = std::cout.flags();
|
std::ios::fmtflags old = std::cout.flags();
|
||||||
|
|
@ -1163,20 +1206,19 @@ main(int argc, char** argv)
|
||||||
|
|
||||||
if (!glob_ratio_stats.empty())
|
if (!glob_ratio_stats.empty())
|
||||||
{
|
{
|
||||||
print_ratio_stats("all tests", glob_ratio_stats);
|
print_ratio_stats("all tests", glob_ratio_stats, opt_paper);
|
||||||
if (ratio_stats.size() > 1)
|
if (ratio_stats.size() > 1)
|
||||||
for (ratio_stats_type::const_iterator i = ratio_stats.begin();
|
for (ratio_stats_type::const_iterator i = ratio_stats.begin();
|
||||||
i != ratio_stats.end(); ++i)
|
i != ratio_stats.end(); ++i)
|
||||||
{
|
{
|
||||||
std::ostringstream s;
|
std::ostringstream s;
|
||||||
s << "tests with " << i->first << " acceptance conditions";
|
s << "tests with " << i->first << " acceptance conditions";
|
||||||
print_ratio_stats(s.str(), i->second);
|
print_ratio_stats(s.str(), i->second, opt_paper);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!opt_paper && !acss_stats.empty())
|
||||||
if (!acss_stats.empty())
|
|
||||||
{
|
{
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::ios::fmtflags old = std::cout.flags();
|
std::ios::fmtflags old = std::cout.flags();
|
||||||
|
|
@ -1207,7 +1249,8 @@ main(int argc, char** argv)
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
std::cout << std::setiosflags(old);
|
std::cout << std::setiosflags(old);
|
||||||
}
|
}
|
||||||
if (!ars_stats.empty())
|
|
||||||
|
if (!opt_paper && !ars_stats.empty())
|
||||||
{
|
{
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
std::ios::fmtflags old = std::cout.flags();
|
std::ios::fmtflags old = std::cout.flags();
|
||||||
|
|
@ -1239,20 +1282,20 @@ main(int argc, char** argv)
|
||||||
std::cout << std::setiosflags(old);
|
std::cout << std::setiosflags(old);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ar_stats.empty())
|
if (!opt_paper && !ar_stats.empty())
|
||||||
{
|
{
|
||||||
std::cout << std::endl
|
std::cout << std::endl
|
||||||
<< "Statistics about accepting runs:" << std::endl;
|
<< "Statistics about accepting runs:" << std::endl;
|
||||||
print_ar_stats(ar_stats);
|
print_ar_stats(ar_stats);
|
||||||
}
|
}
|
||||||
if (!mar_stats.empty())
|
if (!opt_paper && !mar_stats.empty())
|
||||||
{
|
{
|
||||||
std::cout << std::endl
|
std::cout << std::endl
|
||||||
<< "Statistics about reduced accepting runs:" << std::endl;
|
<< "Statistics about reduced accepting runs:" << std::endl;
|
||||||
print_ar_stats(mar_stats);
|
print_ar_stats(mar_stats);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (opt_z)
|
if (!opt_paper && opt_z)
|
||||||
{
|
{
|
||||||
if (!tm_ec.empty())
|
if (!tm_ec.empty())
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue