Commit 58aff37d authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

* src/tgbatest/randtgba.cc: Add option -O, so we can profile each

emptiness-check on its own.
parent 0efca0f6
2004-12-16 Alexandre Duret-Lutz <adl@src.lip6.fr>
* src/tgbatest/randtgba.cc: Add option -O, so we can profile each
emptiness-check on its own.
* src/ltlparse/ltlscan.ll: Pass yyleng to the std::string constructor,
so it doesn't have to compute it.
* src/tgbaparse/tgbascan.ll: Likewise.
......
......@@ -131,6 +131,7 @@ syntax(char* prog)
<< " -m try to reduce runs, in a second pass (implies -r)"
<< std::endl
<< " -n N number of nodes of the graph [20]" << std::endl
<< " -O ALGO run Only ALGO" << std::endl
<< " -r compute and replay acceptance runs (implies -e)"
<< std::endl
<< " -R N repeat each emptiness-check and accepting run "
......@@ -354,6 +355,8 @@ main(int argc, char** argv)
int opt_R = 0;
const char* opt_O = 0;
bool opt_dot = false;
int opt_ec = 0;
int opt_ec_seed = 0;
......@@ -418,6 +421,25 @@ main(int argc, char** argv)
syntax(argv[0]);
opt_n = to_int(argv[++argn]);
}
else if (!strcmp(argv[argn], "-O"))
{
if (argc < argn + 2)
syntax(argv[0]);
opt_O = argv[++argn];
int s = sizeof(ec_algos) / sizeof(*ec_algos);
int i;
for (i = 0; i < s; ++i)
if (!strcmp(opt_O, ec_algos[i].name))
break;
if (i == s)
{
std::cerr << "Unknown algorithm. Available algorithms are:"
<< std::endl;
for (i = 0; i < s; ++i)
std::cerr << " " << ec_algos[i].name << std::endl;
exit(1);
}
}
else if (!strcmp(argv[argn], "-r"))
{
opt_replay = true;
......@@ -497,6 +519,8 @@ main(int argc, char** argv)
{
spot::emptiness_check* ec;
spot::emptiness_check_result* res;
if (opt_O && strcmp(opt_O, ec_algos[i].name))
continue;
ec = cons_emptiness_check(i, a, degen, opt_n_acc);
if (!ec)
continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment