Add an algorithm (from Couvreur) working on BDDs to reduce the
size of TGBAs represented as BDDs by deleting unaccepting SCCs. * src/eltlparse/eltlparse.yy: Remove a warning. * src/tgba/tgbabddconcrete.cc, src/tgba/tgbabddconcrete.hh, src/tgba/tgbabddcoredata.cc, src/tgba/tgbabddcoredata.hh: Add a new function delete_unaccepting_scc in both classes. * src/tgbatest/eltl2tgba.cc, src/tgbatest/spotlbtt.test: Use this new function in LaCIM for ELTL and bench it. * src/tgbatest/defs.in: Fix it. * bench/ltl2tgba/algorithms, bench/ltl2tgba/defs.in: Add LaCIM for ELTL in benchs.
This commit is contained in:
parent
dc8cb56b67
commit
edd4b2b532
11 changed files with 136 additions and 7 deletions
|
|
@ -50,7 +50,7 @@ mkdir $testSubDir
|
|||
cd $testSubDir
|
||||
|
||||
DOT='@DOT@'
|
||||
top_builddir='@top_builddir@'
|
||||
top_builddir='../@top_builddir@'
|
||||
LBTT="@LBTT@"
|
||||
LBTT_TRANSLATE="@LBTT_TRANSLATE@"
|
||||
VALGRIND='@VALGRIND@'
|
||||
|
|
|
|||
|
|
@ -36,14 +36,18 @@
|
|||
void
|
||||
syntax(char* prog)
|
||||
{
|
||||
std::cerr << "Usage: " << prog << " [OPTIONS...] formula [file]" << std::endl
|
||||
<< " " << prog << " -F [OPTIONS...] file [file]" << std::endl
|
||||
<< " " << prog << " -L [OPTIONS...] file [file]" << std::endl
|
||||
std::cerr << "Usage: " << prog << " [OPTIONS...] formula [file]" << std::endl
|
||||
<< " " << prog << " -F [OPTIONS...] file [file]" << std::endl
|
||||
<< " " << prog << " -L [OPTIONS...] file [file]" << std::endl
|
||||
<< " " << prog << " -LW [OPTIONS...] file [file]" << std::endl
|
||||
<< std::endl
|
||||
<< "Options:" << std::endl
|
||||
<< " -F read the formula from the file (extended input format)"
|
||||
<< std::endl
|
||||
<< " -L read the formula from an LBTT-compatible file"
|
||||
<< std::endl
|
||||
<< " -LW read the formula from an LBTT-compatible file"
|
||||
<< " (with no reduction)"
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
|
|
@ -76,14 +80,16 @@ main(int argc, char** argv)
|
|||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
spot::ltl::formula* f = 0;
|
||||
int formula_index = 0;
|
||||
int reduce = 1;
|
||||
|
||||
if (strcmp(argv[1], "-F") == 0)
|
||||
{
|
||||
f = spot::eltl::parse_file(argv[2], p, env, false);
|
||||
formula_index = 2;
|
||||
}
|
||||
if (strcmp(argv[1], "-L") == 0)
|
||||
if (strcmp(argv[1], "-L") == 0 || strcmp(argv[1], "-LW") == 0)
|
||||
{
|
||||
reduce = strcmp(argv[1], "-LW") == 0 ? 0 : 1;
|
||||
std::string input;
|
||||
std::ifstream ifs(argv[2]);
|
||||
std::getline(ifs, input, '\0');
|
||||
|
|
@ -118,8 +124,10 @@ main(int argc, char** argv)
|
|||
|
||||
spot::bdd_dict* dict = new spot::bdd_dict();
|
||||
spot::tgba_bdd_concrete* concrete = spot::eltl_to_tgba_lacim(f, dict);
|
||||
if (reduce == 1)
|
||||
concrete->delete_unaccepting_scc();
|
||||
|
||||
if (strcmp(argv[1], "-L") == 0)
|
||||
if (strcmp(argv[1], "-L") == 0 || strcmp(argv[1], "-LW") == 0)
|
||||
spot::lbtt_reachable(std::cout, concrete);
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,6 +64,14 @@ Algorithm
|
|||
{
|
||||
Name = "Spot (Couvreur -- LaCIM), eltl"
|
||||
Path = "${LBTT_TRANSLATE}"
|
||||
Parameters = "--spot '../eltl2tgba -LW'"
|
||||
Enabled = yes
|
||||
}
|
||||
|
||||
Algorithm
|
||||
{
|
||||
Name = "Spot (Couvreur -- LaCIM), eltl + delete_unaccepting_scc"
|
||||
Path = "${LBTT_TRANSLATE}"
|
||||
Parameters = "--spot '../eltl2tgba -L'"
|
||||
Enabled = yes
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue