Allow boolean atoms to be negated in rational expressions.

* src/ltlparse/ltlparse.yy (rationalexp): Recognize "OP_NOT
booleanatom".
* src/ltlvisit/consterm.cc, src/tgbaalgos/ltl2tgba_fm.cc: Adjust.
* src/tgbatest/ltl2tgba.test: Add one test.
This commit is contained in:
Alexandre Duret-Lutz 2010-03-10 14:38:17 +01:00
parent bbb645e1fc
commit 4aa82ec762
4 changed files with 18 additions and 6 deletions

View file

@ -364,14 +364,22 @@ namespace spot
{
case unop::F:
case unop::G:
case unop::Not:
case unop::X:
case unop::Finish:
case unop::Closure:
case unop::NegClosure:
break;
assert(!"not a rational operator");
return;
case unop::Not:
{
// Not can only appear in front of constants or atomic
// propositions.
const formula* f = node->child();
assert(dynamic_cast<const atomic_prop*>(f)
|| dynamic_cast<const constant*>(f));
res_ = !recurse(f) & next_to_concat();
return;
}
case unop::Star:
{
formula* f;