Do not assume that concatenation cannot accept the empty word.
For instance "(a+#e);(b+#e);(c*)" does. * src/ltlvisit/consterm.cc: Fix handling of Concat operator. * src/ltltest/consterm.test: Add more tests.
This commit is contained in:
parent
bd9136a98e
commit
ad519b8568
2 changed files with 4 additions and 9 deletions
|
|
@ -37,3 +37,6 @@ run 1 ../consterm '((a ; b) + #e)'
|
|||
run 0 ../consterm '((a ; b) + #e) & e'
|
||||
run 1 ../consterm '((a ; b) + #e) & #e'
|
||||
run 1 ../consterm '((a ; b) + #e) & (a* + b)'
|
||||
run 1 ../consterm '(a + #e);(b + #e);(c + #e)'
|
||||
run 0 ../consterm '(a + #e);(b + e);(c + #e)'
|
||||
run 1 ../consterm '(a + #e);(b + e)*;(c + #e)'
|
||||
|
|
|
|||
|
|
@ -97,12 +97,6 @@ namespace spot
|
|||
void
|
||||
visit(const multop* mo)
|
||||
{
|
||||
if (mo->op() == multop::Concat)
|
||||
{
|
||||
result_ = false;
|
||||
return;
|
||||
}
|
||||
|
||||
unsigned max = mo->size();
|
||||
// This sets the initial value of result_.
|
||||
mo->nth(0)->accept(*this);
|
||||
|
|
@ -119,13 +113,11 @@ namespace spot
|
|||
return;
|
||||
break;
|
||||
case multop::And:
|
||||
case multop::Concat:
|
||||
result_ &= r;
|
||||
if (!result_)
|
||||
return;
|
||||
break;
|
||||
case multop::Concat:
|
||||
assert(!"unreachable code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue