Rename is_safety_automaton() as is_guarantee_automaton() and
implement is_safety_mwdba(). Note: I swapped the name of safety and guarantee when I implemented is_safety_automaton() on 2010-03-20. Fortunately, is_safety_automaton() was only used where is_guarantee_automaton() would have been correct. * src/tgbaalgos/safety.cc (is_guarantee_automaton): Rename as ... (is_guarantee_automaton): ... this. (is_safety_mwdba): New function. * src/tgbaalgos/safety.hh: Adjust and add documentation. * src/tgbaalgos/minimize.cc: Use is_guarantee_automaton() instead of is_safety_automaton(). * src/tgbatests/safety.test: Rename as ... * src/tgbatests/obligation.test: ... this, and augment the test. * src/tgbatest/Makefile.am: Adjust. * src/tgbatest/ltl2tgba.cc (-O): Display whether a formula represent a safety, guarantee, or obligation property. * NEWS: Adjust.
This commit is contained in:
parent
14b701b54d
commit
db124d02c0
9 changed files with 260 additions and 129 deletions
|
|
@ -266,7 +266,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"
|
||||
<< " -O tell if a formula represents a safety, guarantee, "
|
||||
<< "or obligation property"
|
||||
<< std::endl
|
||||
<< " -t output automaton in LBTT's format" << std::endl
|
||||
<< std::endl
|
||||
|
|
@ -534,6 +535,7 @@ main(int argc, char** argv)
|
|||
else if (!strcmp(argv[formula_index], "-O"))
|
||||
{
|
||||
output = 13;
|
||||
opt_minimize = true;
|
||||
}
|
||||
else if (!strcmp(argv[formula_index], "-p"))
|
||||
{
|
||||
|
|
@ -1144,10 +1146,30 @@ main(int argc, char** argv)
|
|||
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;
|
||||
if (minimized == 0)
|
||||
{
|
||||
std::cout << "this is not an obligation property";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (is_guarantee_automaton(minimized))
|
||||
{
|
||||
std::cout << "this is a guarantee property (hence, "
|
||||
<< "an obligation property)";
|
||||
}
|
||||
else if (is_safety_mwdba(minimized))
|
||||
{
|
||||
std::cout << "this is a safety property (hence, "
|
||||
<< "an obligation property)";
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "this is an obligation property that is "
|
||||
<< "neither a safety nor a guarantee";
|
||||
}
|
||||
}
|
||||
std::cout << std::endl;
|
||||
|
||||
break;
|
||||
default:
|
||||
assert(!"unknown output option");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue