Implement is_safety_automaton().

* src/tgbaalgos/safety.hh, src/tgbaalgos/safety.cc: New
files.
* src/tgbaalgos/Makefile.am: Add them.
* src/tgbatests/ltl2tgba.cc: Add option "-O".
* src/tgbaalgos/scc.hh: Update documentation.
* src/tgbatest/Makefile.am (TESTS): Add safety.test.
* src/tgbatest/safety.test: New file.
This commit is contained in:
Alexandre Duret-Lutz 2010-03-20 12:57:36 +01:00
parent 99c1b607de
commit 0af8d03261
8 changed files with 264 additions and 6 deletions

View file

@ -53,6 +53,7 @@
#include "tgbaalgos/replayrun.hh"
#include "tgbaalgos/rundotdec.hh"
#include "tgbaalgos/sccfilter.hh"
#include "tgbaalgos/safety.hh"
#include "tgbaalgos/eltl2tgba_lacim.hh"
#include "eltlparse/public.hh"
#include "misc/timer.hh"
@ -256,6 +257,8 @@ syntax(char* prog)
<< std::endl
<< " -NN output the never clain for Spin, with commented states"
<< " (implies -D)" << std::endl
<< " -O tell whether the automaton is a safety automaton"
<< std::endl
<< " -t output automaton in LBTT's format" << std::endl
<< std::endl
@ -522,6 +525,10 @@ main(int argc, char** argv)
output = 8;
spin_comments = true;
}
else if (!strcmp(argv[formula_index], "-O"))
{
output = 13;
}
else if (!strcmp(argv[formula_index], "-p"))
{
post_branching = true;
@ -1087,6 +1094,12 @@ main(int argc, char** argv)
case 12:
stats_reachable(a).dump(std::cout);
break;
case 13:
std::cout << (is_safety_automaton(a) ?
"is a safety automaton" :
"may not be a safety automaton")
<< std::endl;
break;
default:
assert(!"unknown output option");
}