* iface/gspn/ltlgspn.cc: Use command-line options to
select algorithms, not #defines. * iface/gspn/Makefile.am (check_PROGRAMS): Remove eltlgspn-srg, efmgspn-srg, fmgspn-rg, and fmgspn-srg and their associated source variables. These are all replaced by ltlgspn-rg and ltlgspn-srg. * iface/gspn/dcswavefm.test, iface/gspn/dcswaveltl.test, iface/gspn/dcswaveeltl.test, iface/gspn/udcsefm.test, iface/gspn/udcseltl.test, iface/gspn/udcsfm.test, iface/gspn/udcsltl.test: Adjust calls to ltlgspn-srg.
This commit is contained in:
parent
b64c41abcf
commit
c7bbe60f4c
10 changed files with 142 additions and 80 deletions
13
ChangeLog
13
ChangeLog
|
|
@ -1,5 +1,16 @@
|
||||||
2003-10-08 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2003-10-08 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
|
* iface/gspn/ltlgspn.cc: Use command-line options to
|
||||||
|
select algorithms, not #defines.
|
||||||
|
* iface/gspn/Makefile.am (check_PROGRAMS): Remove eltlgspn-srg,
|
||||||
|
efmgspn-srg, fmgspn-rg, and fmgspn-srg and their associated
|
||||||
|
source variables. These are all replaced by
|
||||||
|
ltlgspn-rg and ltlgspn-srg.
|
||||||
|
* iface/gspn/dcswavefm.test, iface/gspn/dcswaveltl.test,
|
||||||
|
iface/gspn/dcswaveeltl.test, iface/gspn/udcsefm.test,
|
||||||
|
iface/gspn/udcseltl.test, iface/gspn/udcsfm.test,
|
||||||
|
iface/gspn/udcsltl.test: Adjust calls to ltlgspn-srg.
|
||||||
|
|
||||||
* iface/gspn/Makefile.am (XFAIL_TESTS): Remove.
|
* iface/gspn/Makefile.am (XFAIL_TESTS): Remove.
|
||||||
|
|
||||||
2003-10-06 Rachid REBIHA <rebiha@src.lip6.fr>
|
2003-10-06 Rachid REBIHA <rebiha@src.lip6.fr>
|
||||||
|
|
@ -1691,7 +1702,7 @@
|
||||||
now that CVS Bison is fixed.
|
now that CVS Bison is fixed.
|
||||||
* src/ltlparse/ltlscan.ll: Use yyunput to shut up a GCC warning.
|
* src/ltlparse/ltlscan.ll: Use yyunput to shut up a GCC warning.
|
||||||
|
|
||||||
2003-04-24 Rachid REBIHA <rebiha@nyx>
|
2003-04-24 Rachid REBIHA <rebiha@src.lip6.fr>
|
||||||
|
|
||||||
* src/ltltest/tostring.test: New file.
|
* src/ltltest/tostring.test: New file.
|
||||||
* src/ltltest/tostring.cc: New files.
|
* src/ltltest/tostring.cc: New files.
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,7 @@ check_PROGRAMS = \
|
||||||
dottygspn-rg \
|
dottygspn-rg \
|
||||||
dottygspn-srg \
|
dottygspn-srg \
|
||||||
ltlgspn-rg \
|
ltlgspn-rg \
|
||||||
ltlgspn-srg \
|
ltlgspn-srg
|
||||||
eltlgspn-srg \
|
|
||||||
efmgspn-srg \
|
|
||||||
fmgspn-rg \
|
|
||||||
fmgspn-srg
|
|
||||||
|
|
||||||
dottygspn_rg_SOURCES = dottygspn.cc
|
dottygspn_rg_SOURCES = dottygspn.cc
|
||||||
dottygspn_rg_LDADD = libspotgspn.la $(LIBGSPNRG_LDFLAGS)
|
dottygspn_rg_LDADD = libspotgspn.la $(LIBGSPNRG_LDFLAGS)
|
||||||
|
|
@ -33,22 +29,6 @@ ltlgspn_rg_LDADD = libspotgspn.la $(LIBGSPNRG_LDFLAGS)
|
||||||
ltlgspn_srg_SOURCES = ltlgspn.cc
|
ltlgspn_srg_SOURCES = ltlgspn.cc
|
||||||
ltlgspn_srg_LDADD = libspotgspn.la $(LIBGSPNSRG_LDFLAGS)
|
ltlgspn_srg_LDADD = libspotgspn.la $(LIBGSPNSRG_LDFLAGS)
|
||||||
|
|
||||||
eltlgspn_srg_SOURCES = ltlgspn.cc
|
|
||||||
eltlgspn_srg_LDADD = libspotgspn.la $(LIBGSPNSRG_LDFLAGS)
|
|
||||||
eltlgspn_srg_CPPFLAGS = -DCEC $(AM_CPPFLAGS)
|
|
||||||
|
|
||||||
efmgspn_srg_SOURCES = ltlgspn.cc
|
|
||||||
efmgspn_srg_LDADD = libspotgspn.la $(LIBGSPNSRG_LDFLAGS)
|
|
||||||
efmgspn_srg_CPPFLAGS = -DCEC -DFM $(AM_CPPFLAGS)
|
|
||||||
|
|
||||||
fmgspn_rg_SOURCES = ltlgspn.cc
|
|
||||||
fmgspn_rg_CPPFLAGS = -DFM $(AM_CPPFLAGS)
|
|
||||||
fmgspn_rg_LDADD = libspotgspn.la $(LIBGSPNRG_LDFLAGS)
|
|
||||||
|
|
||||||
fmgspn_srg_SOURCES = ltlgspn.cc
|
|
||||||
fmgspn_srg_CPPFLAGS = -DFM $(AM_CPPFLAGS)
|
|
||||||
fmgspn_srg_LDADD = libspotgspn.la $(LIBGSPNSRG_LDFLAGS)
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
examples/DCSwave/DCSWave.def \
|
examples/DCSwave/DCSWave.def \
|
||||||
examples/DCSwave/DCSWave.net \
|
examples/DCSwave/DCSWave.net \
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ cp -R $srcdir/examples/DCSwave .
|
||||||
chmod +w DCSwave
|
chmod +w DCSwave
|
||||||
|
|
||||||
# G(ATTiIDLj => F(!SCj U SCi)) is true
|
# G(ATTiIDLj => F(!SCj U SCi)) is true
|
||||||
../eltlgspn-srg DCSwave/DCSWave '!G(ATTiIDLj => F(!SCj U SCi))' ATTiIDLj SCi SCj > output || exit 1
|
../ltlgspn-srg -c -l -e DCSwave/DCSWave '!G(ATTiIDLj => F(!SCj U SCi))' ATTiIDLj SCi SCj > output || exit 1
|
||||||
|
|
||||||
# G(F(!SCj U SCi)) is false
|
# G(F(!SCj U SCi)) is false
|
||||||
../eltlgspn-srg DCSwave/DCSWave '!G(F(!SCj U SCi))' ATTiIDLj SCi SCj >output
|
../ltlgspn-srg -c -l -e DCSwave/DCSWave '!G(F(!SCj U SCi))' ATTiIDLj SCi SCj >output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ cp -R $srcdir/examples/DCSwave .
|
||||||
chmod +w DCSwave
|
chmod +w DCSwave
|
||||||
|
|
||||||
# G(ATTiIDLj => F(!SCj U SCi)) is true
|
# G(ATTiIDLj => F(!SCj U SCi)) is true
|
||||||
../fmgspn-srg DCSwave/DCSWave '!G(ATTiIDLj => F(!SCj U SCi))' ATTiIDLj SCi SCj > output || exit 1
|
../ltlgspn-srg -c -f -m DCSwave/DCSWave '!G(ATTiIDLj => F(!SCj U SCi))' ATTiIDLj SCi SCj > output || exit 1
|
||||||
|
|
||||||
# G(F(!SCj U SCi)) is false
|
# G(F(!SCj U SCi)) is false
|
||||||
../fmgspn-srg DCSwave/DCSWave '!G(F(!SCj U SCi))' ATTiIDLj SCi SCj > output
|
../ltlgspn-srg -c -f -m DCSwave/DCSWave '!G(F(!SCj U SCi))' ATTiIDLj SCi SCj > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -6,8 +6,8 @@ cp -R $srcdir/examples/DCSwave .
|
||||||
chmod +w DCSwave
|
chmod +w DCSwave
|
||||||
|
|
||||||
# G(ATTiIDLj => F(!SCj U SCi)) is true
|
# G(ATTiIDLj => F(!SCj U SCi)) is true
|
||||||
../ltlgspn-srg DCSwave/DCSWave '!G(ATTiIDLj => F(!SCj U SCi))' ATTiIDLj SCi SCj > output || exit 1
|
../ltlgspn-srg -c -l -m DCSwave/DCSWave '!G(ATTiIDLj => F(!SCj U SCi))' ATTiIDLj SCi SCj > output || exit 1
|
||||||
|
|
||||||
# G(F(!SCj U SCi)) is false
|
# G(F(!SCj U SCi)) is false
|
||||||
../ltlgspn-srg DCSwave/DCSWave '!G(F(!SCj U SCi))' ATTiIDLj SCi SCj > output
|
../ltlgspn-srg -c -l -m DCSwave/DCSWave '!G(F(!SCj U SCi))' ATTiIDLj SCi SCj > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -8,75 +8,146 @@
|
||||||
#include "tgbaalgos/magic.hh"
|
#include "tgbaalgos/magic.hh"
|
||||||
#include "tgbaalgos/emptinesscheck.hh"
|
#include "tgbaalgos/emptinesscheck.hh"
|
||||||
|
|
||||||
|
void
|
||||||
|
syntax(char* prog)
|
||||||
|
{
|
||||||
|
std::cerr << "Usage: "<< prog
|
||||||
|
<< " [OPTIONS...] model formula props..." << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< " -c compute a counter example" << std::endl
|
||||||
|
<< " (instead of just checking for emptiness)" << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< " -e use Couvreur's emptiness-check (default)" << std::endl
|
||||||
|
<< " -m degeneralize and perform a magic-search" << std::endl
|
||||||
|
<< std::endl
|
||||||
|
<< " -l use Couvreur's LaCIM algorithm for translation (default)"
|
||||||
|
<< std::endl
|
||||||
|
<< " -f use Couvreur's FM algorithm for translation"
|
||||||
|
<< std::endl;
|
||||||
|
exit(2);
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
main(int argc, char **argv)
|
main(int argc, char **argv)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
int formula_index = 1;
|
||||||
|
enum { Couvreur, Magic } check = Couvreur;
|
||||||
|
enum { Lacim, Fm } trans = Lacim;
|
||||||
|
bool compute_counter_example = false;
|
||||||
|
|
||||||
spot::gspn_environment env;
|
spot::gspn_environment env;
|
||||||
|
|
||||||
if (argc <= 3)
|
while (formula_index < argc && *argv[formula_index] == '-')
|
||||||
{
|
{
|
||||||
std::cerr << "usage: " << argv[0]
|
if (!strcmp(argv[formula_index], "-c"))
|
||||||
<< " model formula props..." << std::endl;
|
{
|
||||||
exit(1);
|
compute_counter_example = true;
|
||||||
}
|
}
|
||||||
|
else if (!strcmp(argv[formula_index], "-e"))
|
||||||
|
{
|
||||||
|
check = Couvreur;
|
||||||
|
}
|
||||||
|
else if (!strcmp(argv[formula_index], "-m"))
|
||||||
|
{
|
||||||
|
check = Magic;
|
||||||
|
}
|
||||||
|
else if (!strcmp(argv[formula_index], "-l"))
|
||||||
|
{
|
||||||
|
trans = Lacim;
|
||||||
|
}
|
||||||
|
else if (!strcmp(argv[formula_index], "-f"))
|
||||||
|
{
|
||||||
|
trans = Fm;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
syntax(argv[0]);
|
||||||
|
}
|
||||||
|
++formula_index;
|
||||||
|
}
|
||||||
|
if (argc < formula_index + 4)
|
||||||
|
syntax(argv[0]);
|
||||||
|
|
||||||
while (argc > 3)
|
|
||||||
|
while (argc > formula_index + 2)
|
||||||
{
|
{
|
||||||
env.declare(argv[argc - 1]);
|
env.declare(argv[argc - 1]);
|
||||||
--argc;
|
--argc;
|
||||||
}
|
}
|
||||||
|
|
||||||
spot::ltl::parse_error_list pel;
|
spot::ltl::parse_error_list pel;
|
||||||
spot::ltl::formula* f = spot::ltl::parse(argv[2], pel, env);
|
spot::ltl::formula* f = spot::ltl::parse(argv[formula_index + 1],
|
||||||
|
pel, env);
|
||||||
|
|
||||||
if (spot::ltl::format_parse_errors(std::cerr, argv[2], pel))
|
if (spot::ltl::format_parse_errors(std::cerr,
|
||||||
exit(1);
|
argv[formula_index + 1], pel))
|
||||||
|
exit(2);
|
||||||
|
|
||||||
|
argv[1] = argv[formula_index];
|
||||||
spot::gspn_interface gspn(2, argv);
|
spot::gspn_interface gspn(2, argv);
|
||||||
spot::bdd_dict* dict = new spot::bdd_dict();
|
spot::bdd_dict* dict = new spot::bdd_dict();
|
||||||
|
|
||||||
#if FM
|
spot::tgba* a_f = 0;
|
||||||
spot::tgba* a_f = spot::ltl_to_tgba_fm(f, dict);
|
switch (trans)
|
||||||
#else
|
{
|
||||||
spot::tgba* a_f = spot::ltl_to_tgba_lacim(f, dict);
|
case Fm:
|
||||||
#endif
|
a_f = spot::ltl_to_tgba_fm(f, dict);
|
||||||
|
break;
|
||||||
|
case Lacim:
|
||||||
|
a_f = spot::ltl_to_tgba_lacim(f, dict);
|
||||||
|
break;
|
||||||
|
}
|
||||||
spot::ltl::destroy(f);
|
spot::ltl::destroy(f);
|
||||||
|
|
||||||
spot::tgba* model = new spot::tgba_gspn(dict, env);
|
spot::tgba* model = new spot::tgba_gspn(dict, env);
|
||||||
spot::tgba_product* prod = new spot::tgba_product(model, a_f);
|
spot::tgba_product* prod = new spot::tgba_product(model, a_f);
|
||||||
#if CEC
|
|
||||||
|
switch (check)
|
||||||
{
|
{
|
||||||
spot::emptiness_check empty_check;
|
case Couvreur:
|
||||||
bool res = empty_check.tgba_emptiness_check(prod);
|
{
|
||||||
|
spot::emptiness_check ec;
|
||||||
|
bool res = ec.tgba_emptiness_check(prod);
|
||||||
if (!res)
|
if (!res)
|
||||||
{
|
{
|
||||||
empty_check.counter_example(prod);
|
if (compute_counter_example)
|
||||||
std::cout << empty_check.print_result(std::cout, prod, model);
|
{
|
||||||
|
ec.counter_example(prod);
|
||||||
|
ec.print_result(std::cout, prod, model);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "non empty" << std::endl;
|
||||||
|
}
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "not found";
|
std::cout << "empty" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
break;
|
||||||
spot::tgba_tba_proxy* d = new spot::tgba_tba_proxy(prod);
|
case Magic:
|
||||||
{
|
{
|
||||||
|
spot::tgba_tba_proxy* d = new spot::tgba_tba_proxy(prod);
|
||||||
spot::magic_search ms(d);
|
spot::magic_search ms(d);
|
||||||
|
|
||||||
if (ms.check())
|
if (ms.check())
|
||||||
{
|
{
|
||||||
|
if (compute_counter_example)
|
||||||
ms.print_result (std::cout, model);
|
ms.print_result (std::cout, model);
|
||||||
|
else
|
||||||
|
std::cout << "non-empty" << std::endl;
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "not found";
|
std::cout << "empty" << std::endl;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
delete d;
|
delete d;
|
||||||
#endif
|
}
|
||||||
|
}
|
||||||
delete prod;
|
delete prod;
|
||||||
delete model;
|
delete model;
|
||||||
delete a_f;
|
delete a_f;
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ cp -R $srcdir/examples/udcs .
|
||||||
chmod +w udcs
|
chmod +w udcs
|
||||||
|
|
||||||
# F(ReP1 => F(gsP1)) is false
|
# F(ReP1 => F(gsP1)) is false
|
||||||
../efmgspn-srg udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -f -e udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
||||||
# !F(ReP1 => F(gsP1)) is true
|
# !F(ReP1 => F(gsP1)) is true
|
||||||
../efmgspn-srg udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
../ltlgspn-srg -c -f -e udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
||||||
|
|
||||||
# !G(ReP1 => F(gsP1)) is false
|
# !G(ReP1 => F(gsP1)) is false
|
||||||
../efmgspn-srg udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -f -e udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ cp -R $srcdir/examples/udcs .
|
||||||
chmod +w udcs
|
chmod +w udcs
|
||||||
|
|
||||||
# F(ReP1 => F(gsP1)) is false
|
# F(ReP1 => F(gsP1)) is false
|
||||||
../eltlgspn-srg udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -l -e udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
||||||
# !F(ReP1 => F(gsP1)) is true
|
# !F(ReP1 => F(gsP1)) is true
|
||||||
../eltlgspn-srg udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
../ltlgspn-srg -c -l -e udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
||||||
|
|
||||||
# !G(ReP1 => F(gsP1)) is false
|
# !G(ReP1 => F(gsP1)) is false
|
||||||
../eltlgspn-srg udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -l -e udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ cp -R $srcdir/examples/udcs .
|
||||||
chmod +w udcs
|
chmod +w udcs
|
||||||
|
|
||||||
# F(ReP1 => F(gsP1)) is false
|
# F(ReP1 => F(gsP1)) is false
|
||||||
../fmgspn-srg udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -f -m udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
||||||
# !F(ReP1 => F(gsP1)) is true
|
# !F(ReP1 => F(gsP1)) is true
|
||||||
../fmgspn-srg udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
../ltlgspn-srg -c -f -m udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
||||||
|
|
||||||
# !G(ReP1 => F(gsP1)) is false
|
# !G(ReP1 => F(gsP1)) is false
|
||||||
../fmgspn-srg udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -f -m udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,12 @@ cp -R $srcdir/examples/udcs .
|
||||||
chmod +w udcs
|
chmod +w udcs
|
||||||
|
|
||||||
# F(ReP1 => F(gsP1)) is false
|
# F(ReP1 => F(gsP1)) is false
|
||||||
../ltlgspn-srg udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -l -m udcs/udcs 'F(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
||||||
# !F(ReP1 => F(gsP1)) is true
|
# !F(ReP1 => F(gsP1)) is true
|
||||||
../ltlgspn-srg udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
../ltlgspn-srg -c -l -m udcs/udcs '!F(ReP1 => F(gsP1))' ReP1 gsP1 > output || exit 1
|
||||||
|
|
||||||
# !G(ReP1 => F(gsP1)) is false
|
# !G(ReP1 => F(gsP1)) is false
|
||||||
../ltlgspn-srg udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
../ltlgspn-srg -c -l -m udcs/udcs '!G(ReP1 => F(gsP1))' ReP1 gsP1 > output
|
||||||
test $? = 1 || exit 1
|
test $? = 1 || exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue