* src/ltlvisit/tostring.cc: Fix output of F0, F1, G0, G1, X0, and X1.
* src/ltltest/tostring.test: Test these.
This commit is contained in:
parent
1d72cdc86e
commit
2f7d46d719
3 changed files with 15 additions and 0 deletions
|
|
@ -1,3 +1,8 @@
|
||||||
|
2004-01-30 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
|
* src/ltlvisit/tostring.cc: Fix output of F0, F1, G0, G1, X0, and X1.
|
||||||
|
* src/ltltest/tostring.test: Test these.
|
||||||
|
|
||||||
2004-01-29 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
2004-01-29 Alexandre Duret-Lutz <adl@src.lip6.fr>
|
||||||
|
|
||||||
* src/tgba/tgbaexplicit.cc (tgba_explicit::get_acceptance_condition):
|
* src/tgba/tgbaexplicit.cc (tgba_explicit::get_acceptance_condition):
|
||||||
|
|
|
||||||
|
|
@ -43,3 +43,5 @@ run 0 ./tostring 'a <=> b'
|
||||||
run 0 ./tostring 'a & b & (c |(f U g)| e)'
|
run 0 ./tostring 'a & b & (c |(f U g)| e)'
|
||||||
run 0 ./tostring 'b & a & a & (c | e |(g U g)| e | c) & b'
|
run 0 ./tostring 'b & a & a & (c | e |(g U g)| e | c) & b'
|
||||||
run 0 ./tostring 'F"F1"&G"G"&X"X"'
|
run 0 ./tostring 'F"F1"&G"G"&X"X"'
|
||||||
|
run 0 ./tostring 'GFfalse'
|
||||||
|
run 0 ./tostring 'GFtrue'
|
||||||
|
|
|
||||||
|
|
@ -96,10 +96,14 @@ namespace spot
|
||||||
void
|
void
|
||||||
visit(const unop* uo)
|
visit(const unop* uo)
|
||||||
{
|
{
|
||||||
|
// The parser treats F0, F1, G0, G1, X0, and X1 as atomic
|
||||||
|
// propositions. So make sure we output F(0), G(1), etc.
|
||||||
|
bool need_parent = !! dynamic_cast<const constant*>(uo->child());
|
||||||
switch(uo->op())
|
switch(uo->op())
|
||||||
{
|
{
|
||||||
case unop::Not:
|
case unop::Not:
|
||||||
os_ << "!";
|
os_ << "!";
|
||||||
|
need_parent = false;
|
||||||
break;
|
break;
|
||||||
case unop::X:
|
case unop::X:
|
||||||
os_ << "X";
|
os_ << "X";
|
||||||
|
|
@ -112,7 +116,11 @@ namespace spot
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (need_parent)
|
||||||
|
os_ << "(";
|
||||||
uo->child()->accept(*this);
|
uo->child()->accept(*this);
|
||||||
|
if (need_parent)
|
||||||
|
os_ << ")";
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue