* src/ltlvisit/contain.hh, src/ltlvisit/contain.cc (reduce_tau03):

New function, performing LTL reduction a la tauriainen.03.a83.
* src/ltltest/equals.cc, src/ltltest/reduc.cc: Add support for
the new reduction.
* src/ltltest/reduc.test: Cut the test in half, and additionally
test the new reduction.
* src/ltltest/reduccmp.test: Run on the new reduction.
* src/ltltest/Makefile.am: Adjust.
* src/tgbatest/ltl2tgba.cc: Add new options to apply the reduction.
* src/tgbatest/spotlbtt.test: Use them.
This commit is contained in:
Alexandre Duret-Lutz 2006-07-19 16:30:10 +00:00
parent 8cbec95253
commit d4c9bf2b1e
10 changed files with 444 additions and 76 deletions

View file

@ -1,4 +1,4 @@
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// Copyright (C) 2004, 2006 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
//
@ -30,6 +30,7 @@
#include "ltlvisit/tostring.hh"
#include "ltlvisit/reduce.hh"
#include "ltlvisit/length.hh"
#include "ltlvisit/contain.hh"
#include "ltlast/allnodes.hh"
void
@ -42,6 +43,9 @@ syntax(char* prog)
int
main(int argc, char** argv)
{
bool tau03 = false;
bool stronger = false;
if (argc < 3)
syntax(argv[0]);
@ -57,6 +61,9 @@ main(int argc, char** argv)
case 2:
o = spot::ltl::Reduce_Eventuality_And_Universality;
break;
case 9:
tau03 = stronger = true;
/* fall through */
case 3:
o = spot::ltl::Reduce_All;
break;
@ -71,6 +78,12 @@ main(int argc, char** argv)
o = (spot::ltl::Reduce_Syntactic_Implications
| spot::ltl::Reduce_Eventuality_And_Universality);
break;
case 8:
stronger = true;
/* fall through */
case 7:
tau03 = true;
break;
default:
return 2;
}
@ -114,6 +127,13 @@ main(int argc, char** argv)
spot::ltl::destroy(ftmp1);
spot::ltl::destroy(ftmp2);
if (tau03)
{
ftmp1 = f1;
f1 = spot::ltl::reduce_tau03(f1, stronger);
spot::ltl::destroy(ftmp1);
}
int length_f1_after = spot::ltl::length(f1);
std::string f1s_after = spot::ltl::to_string(f1);