* src/tgbatest/randtgba.cc (main): Skip empty lines.
(syntax): Categorize options.
This commit is contained in:
parent
42cd2e05b5
commit
516350ddc0
2 changed files with 267 additions and 246 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2005-02-01 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/tgbatest/randtgba.cc (main): Skip empty lines.
|
||||||
|
(syntax): Categorize options.
|
||||||
|
|
||||||
2005-01-31 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2005-01-31 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
* src/tgbatest/explicit.test, src/tgbatest/explpro2.test,
|
* src/tgbatest/explicit.test, src/tgbatest/explpro2.test,
|
||||||
|
|
|
||||||
|
|
@ -152,48 +152,53 @@ syntax(char* prog)
|
||||||
{
|
{
|
||||||
std::cerr << "Usage: "<< prog << " [OPTIONS...] PROPS..." << std::endl
|
std::cerr << "Usage: "<< prog << " [OPTIONS...] PROPS..." << std::endl
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< "Options:" << std::endl
|
<< "General 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 (for our paper)"
|
<< " -1 produce minimal output (for our paper)" << std::endl
|
||||||
|
<< " -g output graph in dot format" << std::endl
|
||||||
|
<< " -s N seed for the random number generator" << std::endl
|
||||||
|
<< " -z display statistics about emptiness-check algorithms"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
|
<< " -Z like -z, but print extra statistics after the run"
|
||||||
|
<< " of each algorithm" << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< "Graph Generation Options:" << std::endl
|
||||||
<< " -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
|
||||||
<< " -d F density of the graph [0.2]" << std::endl
|
<< " -d F density of the graph [0.2]" << std::endl
|
||||||
|
<< " -n N number of nodes of the graph [20]" << std::endl
|
||||||
|
<< " -t F probability of the atomic propositions to be true"
|
||||||
|
<< " [0.5]" << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< "LTL Formula Generation Options:" << std::endl
|
||||||
<< " -dp dump priorities, do not generate any formula"
|
<< " -dp dump priorities, do not generate any formula"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
|
<< " -f N size of the formula [15]" << std::endl
|
||||||
|
<< " -F N number of formulae to generate [0]" << std::endl
|
||||||
|
<< " -l N simplify formulae using all available reductions"
|
||||||
|
<< " and reject those" << std::endl
|
||||||
|
<< " strictly smaller than N" << std::endl
|
||||||
|
<< " -i FILE do not generate formulae, read them from FILE"
|
||||||
|
<< std::endl
|
||||||
|
<< " -p S priorities to use" << std::endl
|
||||||
|
<< " -u generate unique formulae" << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< "Emptiness-Check Options:" << std::endl
|
||||||
<< " -D degeneralize TGBA for emptiness-check algorithms that"
|
<< " -D degeneralize TGBA for emptiness-check algorithms that"
|
||||||
<< " would" << std::endl
|
<< " would" << std::endl
|
||||||
<< " otherwise be skipped (implies -e)" << std::endl
|
<< " otherwise be skipped (implies -e)" << std::endl
|
||||||
<< " -e N compare result of all "
|
<< " -e N compare result of all "
|
||||||
<< "emptiness checks on N randomly generated graphs" << std::endl
|
<< "emptiness checks on N randomly generated graphs" << std::endl
|
||||||
<< " -f N the size of the formula [15]" << std::endl
|
|
||||||
<< " -F N number of formulae to generate [0]" << std::endl
|
|
||||||
<< " -g output in dot format" << std::endl
|
|
||||||
<< " -i FILE do not generate formulae, read them from FILE"
|
|
||||||
<< std::endl
|
|
||||||
<< " -l N simplify formulae using all available reductions"
|
|
||||||
<< " and reject those" << std::endl
|
|
||||||
<< " strictly smaller than N" << std::endl
|
|
||||||
<< " -m try to reduce runs, in a second pass (implies -r)"
|
<< " -m try to reduce runs, in a second pass (implies -r)"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " -n N number of nodes of the graph [20]" << std::endl
|
|
||||||
<< " -O ALGO run Only ALGO" << std::endl
|
<< " -O ALGO run Only ALGO" << std::endl
|
||||||
<< " -p S priorities to use" << std::endl
|
|
||||||
<< " -r compute and replay acceptance runs (implies -e)"
|
|
||||||
<< std::endl
|
|
||||||
<< " -R N repeat each emptiness-check and accepting run "
|
<< " -R N repeat each emptiness-check and accepting run "
|
||||||
<< "computation N times" << std::endl
|
<< "computation N times" << std::endl
|
||||||
<< " -s N seed for the random number generator" << std::endl
|
<< " -r compute and replay acceptance runs (implies -e)"
|
||||||
<< " -t F probability of the atomic propositions to be true"
|
|
||||||
<< " [0.5]" << std::endl
|
|
||||||
<< " -u generate unique formulae"
|
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " -z display statistics about computed accepting runs"
|
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< " -Z like -z, but print extra statistics after the run"
|
|
||||||
<< " of each algorithm" << std::endl
|
|
||||||
<< "Where:" << std::endl
|
<< "Where:" << std::endl
|
||||||
<< " F are floats between 0.0 and 1.0 inclusive" << std::endl
|
<< " F are floats between 0.0 and 1.0 inclusive" << std::endl
|
||||||
<< " E are floating values" << std::endl
|
<< " E are floating values" << std::endl
|
||||||
|
|
@ -201,7 +206,11 @@ syntax(char* prog)
|
||||||
<< " N are positive integers" << std::endl
|
<< " N are positive integers" << std::endl
|
||||||
<< " PROPS are the atomic properties to use on transitions"
|
<< " PROPS are the atomic properties to use on transitions"
|
||||||
<< std::endl
|
<< std::endl
|
||||||
<< "Use -dp to see the list of KEYs." << std::endl;
|
<< "Use -dp to see the list of KEYs." << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< "When -F or -i is used, a random graph a synchronized with"
|
||||||
|
<< " each formula." << std::endl << "If -e N is additionally used"
|
||||||
|
<< " N random graphs are generated for each formula." << std::endl;
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1117,7 +1126,7 @@ main(int argc, char** argv)
|
||||||
if (strcmp(opt_i, "-"))
|
if (strcmp(opt_i, "-"))
|
||||||
{
|
{
|
||||||
formula_file = new std::ifstream(opt_i);
|
formula_file = new std::ifstream(opt_i);
|
||||||
if (!(*formula_file))
|
if (!*formula_file)
|
||||||
{
|
{
|
||||||
delete formula_file;
|
delete formula_file;
|
||||||
std::cerr << "Failed to open " << opt_i << std::endl;
|
std::cerr << "Failed to open " << opt_i << std::endl;
|
||||||
|
|
@ -1268,18 +1277,23 @@ main(int argc, char** argv)
|
||||||
if (formula_file->good())
|
if (formula_file->good())
|
||||||
{
|
{
|
||||||
std::string input;
|
std::string input;
|
||||||
std::getline(*formula_file, input, '\n');
|
if (std::getline(*formula_file, input, '\n').fail())
|
||||||
|
break;
|
||||||
|
else if (input == "")
|
||||||
|
break;
|
||||||
spot::ltl::parse_error_list pel;
|
spot::ltl::parse_error_list pel;
|
||||||
spot::ltl::formula* f = spot::ltl::parse(input, pel, env);
|
spot::ltl::formula* f = spot::ltl::parse(input, pel, env);
|
||||||
if (spot::ltl::format_parse_errors(std::cerr, input, pel))
|
if (spot::ltl::format_parse_errors(std::cerr, input, pel))
|
||||||
|
{
|
||||||
|
exit_code = 1;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
formula = spot::ltl_to_tgba_fm(f, dict, true);
|
formula = spot::ltl_to_tgba_fm(f, dict, true);
|
||||||
spot::ltl::atomic_prop_set* tmp =
|
spot::ltl::atomic_prop_set* tmp =
|
||||||
spot::ltl::atomic_prop_collect(f);
|
spot::ltl::atomic_prop_collect(f);
|
||||||
for (spot::ltl::atomic_prop_set::iterator i = tmp->begin();
|
for (spot::ltl::atomic_prop_set::iterator i = tmp->begin();
|
||||||
i != tmp->end(); ++i)
|
i != tmp->end(); ++i)
|
||||||
apf->insert(
|
apf->insert(dynamic_cast<spot::ltl::atomic_prop*>((*i)->ref()));
|
||||||
dynamic_cast<spot::ltl::atomic_prop*>((*i)->ref()));
|
|
||||||
spot::ltl::destroy(f);
|
spot::ltl::destroy(f);
|
||||||
delete tmp;
|
delete tmp;
|
||||||
}
|
}
|
||||||
|
|
@ -1442,10 +1456,12 @@ main(int argc, char** argv)
|
||||||
spot::tgba_run* redrun =
|
spot::tgba_run* redrun =
|
||||||
spot::reduce_run(res->automaton(), run);
|
spot::reduce_run(res->automaton(), run);
|
||||||
if (!spot::replay_tgba_run(s,
|
if (!spot::replay_tgba_run(s,
|
||||||
res->automaton(), redrun))
|
res->automaton(),
|
||||||
|
redrun))
|
||||||
{
|
{
|
||||||
if (!opt_paper)
|
if (!opt_paper)
|
||||||
std::cout << ", but could not replay "
|
std::cout
|
||||||
|
<< ", but could not replay "
|
||||||
<< "its minimization (ERROR!)";
|
<< "its minimization (ERROR!)";
|
||||||
failed_seeds.insert(opt_ec_seed);
|
failed_seeds.insert(opt_ec_seed);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue