* src/tgbaalgos/emptinesscheck.cc (emptiness_check::check2):
New function, variant of emptiness_check::check(). * src/tgbaalgos/emptinesscheck.hh (emptiness_check::check2): Likewise. * src/tgbatest/emptchk.test, src/tgbatest/emptchke.test: Exercize -e2. * src/tgbatest/ltl2tgba.cc: Support -e2, for emptiness_check::check2(). * iface/gspn/Makefile.am [WITH_GSPN_EESRG] (check_PROGRAMS): Compile ltlgspn-eesrg instead of ltleesrg. (ltleesrg_SOURCES, ltleesrg_LDADD): Replace by... (ltlgspn_eesrg_SOURCES, ltlgspn_eesrg_LDADD, LIBGSPNESRG_LDFLAGS): ... these. * iface/gspn/ltleesrg.cc: Delete. * iface/gspn/ltlgspn.cc [EESRG]: Support EESRG conditionally. Support -e2.
This commit is contained in:
parent
a1f990b125
commit
93f1cc0d47
9 changed files with 271 additions and 109 deletions
|
|
@ -31,6 +31,10 @@ expect_ce()
|
|||
run 0 ./ltl2tgba -e -D "$1"
|
||||
run 0 ./ltl2tgba -e -f "$1"
|
||||
run 0 ./ltl2tgba -e -f -D "$1"
|
||||
run 0 ./ltl2tgba -e2 "$1"
|
||||
run 0 ./ltl2tgba -e2 -D "$1"
|
||||
run 0 ./ltl2tgba -e2 -f "$1"
|
||||
run 0 ./ltl2tgba -e2 -f -D "$1"
|
||||
run 0 ./ltl2tgba -m "$1"
|
||||
run 0 ./ltl2tgba -m -f "$1"
|
||||
}
|
||||
|
|
@ -41,6 +45,10 @@ expect_no()
|
|||
run 0 ./ltl2tgba -E -D "$1"
|
||||
run 0 ./ltl2tgba -E -f "$1"
|
||||
run 0 ./ltl2tgba -E -f -D "$1"
|
||||
run 0 ./ltl2tgba -E2 "$1"
|
||||
run 0 ./ltl2tgba -E2 -D "$1"
|
||||
run 0 ./ltl2tgba -E2 -f "$1"
|
||||
run 0 ./ltl2tgba -E2 -f -D "$1"
|
||||
run 0 ./ltl2tgba -M "$1"
|
||||
run 0 ./ltl2tgba -M -f "$1"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,4 +33,5 @@ s1, "s2", "a & !b", c d;
|
|||
EOF
|
||||
|
||||
run 0 ./ltl2tgba -e -X input
|
||||
run 0 ./ltl2tgba -e2 -X input
|
||||
run 0 ./ltl2tgba -m -X input
|
||||
|
|
|
|||
|
|
@ -32,8 +32,12 @@ syntax(char* prog)
|
|||
<< " -D degeneralize the automaton" << std::endl
|
||||
<< " -e emptiness-check (Couvreur), expect and compute "
|
||||
<< "a counter-example" << std::endl
|
||||
<< " -e2 emptiness-check (Couvreur variant), expect and compute "
|
||||
<< "a counter-example" << std::endl
|
||||
<< " -E emptiness-check (Couvreur), expect no counter-example "
|
||||
<< std::endl
|
||||
<< " -E2 emptiness-check (Couvreur variant), expect no "
|
||||
<< "counter-example " << std::endl
|
||||
<< " -f use Couvreur's FM algorithm for translation"
|
||||
<< std::endl
|
||||
<< " -F read the formula from the file" << std::endl
|
||||
|
|
@ -69,7 +73,7 @@ main(int argc, char** argv)
|
|||
bool file_opt = false;
|
||||
int output = 0;
|
||||
int formula_index = 0;
|
||||
enum { None, Couvreur, MagicSearch } echeck = None;
|
||||
enum { None, Couvreur, Couvreur2, MagicSearch } echeck = None;
|
||||
enum { NoneDup, BFS, DFS } dupexp = NoneDup;
|
||||
bool magic_many = false;
|
||||
bool expect_counter_example = false;
|
||||
|
|
@ -104,12 +108,24 @@ main(int argc, char** argv)
|
|||
expect_counter_example = true;
|
||||
output = -1;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-e2"))
|
||||
{
|
||||
echeck = Couvreur2;
|
||||
expect_counter_example = true;
|
||||
output = -1;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-E"))
|
||||
{
|
||||
echeck = Couvreur;
|
||||
expect_counter_example = false;
|
||||
output = -1;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-E2"))
|
||||
{
|
||||
echeck = Couvreur2;
|
||||
expect_counter_example = false;
|
||||
output = -1;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-f"))
|
||||
{
|
||||
fm_opt = true;
|
||||
|
|
@ -290,9 +306,16 @@ main(int argc, char** argv)
|
|||
case None:
|
||||
break;
|
||||
case Couvreur:
|
||||
case Couvreur2:
|
||||
{
|
||||
spot::emptiness_check ec = spot::emptiness_check(a);
|
||||
bool res = ec.check();
|
||||
bool res;
|
||||
|
||||
if (echeck == Couvreur)
|
||||
res = ec.check();
|
||||
else
|
||||
res = ec.check2();
|
||||
|
||||
if (expect_counter_example)
|
||||
{
|
||||
if (res)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue