* src/misc/optionmap.hh, src/misc/optionmap.cc
(option_map::parse_options): Rewrite. Do not modify the input string, allow !foo as a shorthand for foo=0, and support K and M suffixes for values. * src/tgbatest/randtgba.cc (cons_emptiness_check): Simplify. * wrap/python/spot.i: Process optionmap.hh. * wrap/python/tests/optionmap.py: New file. * wrap/python/tests/Makefile.am (TESTS): Add it.
This commit is contained in:
parent
f3effb9da0
commit
fed4b6f05c
7 changed files with 170 additions and 40 deletions
|
|
@ -104,17 +104,17 @@ struct ec_algo
|
|||
|
||||
ec_algo ec_algos[] =
|
||||
{
|
||||
{ "Cou99", "poprem=0",
|
||||
{ "Cou99", "!poprem",
|
||||
couvreur99_cons, 0, -1U, true },
|
||||
{ "Cou99_shy-", "poprem=0,shy=1,group=0",
|
||||
{ "Cou99_shy-", "!poprem shy !group",
|
||||
couvreur99_cons, 0, -1U, true },
|
||||
{ "Cou99_shy", "poprem=0,shy=1,group=1",
|
||||
{ "Cou99_shy", "!poprem shy group",
|
||||
couvreur99_cons, 0, -1U, true },
|
||||
{ "Cou99_rem", "poprem=1",
|
||||
{ "Cou99_rem", "poprem",
|
||||
couvreur99_cons, 0, -1U, true },
|
||||
{ "Cou99_rem_shy-", "poprem=1,shy=1,group=0",
|
||||
{ "Cou99_rem_shy-", "poprem shy !group",
|
||||
couvreur99_cons, 0, -1U, true },
|
||||
{ "Cou99_rem_shy", "poprem=1,shy=1,group=1",
|
||||
{ "Cou99_rem_shy", "poprem shy group",
|
||||
couvreur99_cons, 0, -1U, true },
|
||||
{ "CVWY90", 0,
|
||||
ms_cons, 0, 1, true },
|
||||
|
|
@ -141,11 +141,9 @@ cons_emptiness_check(int num, const spot::tgba* a,
|
|||
spot::option_map o = options;
|
||||
if (ec_algos[num].options)
|
||||
{
|
||||
char* x = strdup(ec_algos[num].options);
|
||||
const char* err = o.parse_options(x);
|
||||
const char* err = o.parse_options(ec_algos[num].options);
|
||||
assert(!err);
|
||||
(void)err;
|
||||
free(x);
|
||||
}
|
||||
if (n_acc < ec_algos[num].min_acc || n_acc > ec_algos[num].max_acc)
|
||||
a = degen;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue