acc: strengthen is_generalized_rabin() and is_generalized_streett()
* spot/twa/acc.cc: These functions were segfaulting on acceptance conditions such as "Acceptance: 3 t" or "Acceptance: 3 f". The issue was revealed on branch "next" by the change that print_dot() display the acceptance condition by default, but we want the fix on master as well. * NEWS: Mention the issue.
This commit is contained in:
parent
651a27202c
commit
b6e44e6b8b
2 changed files with 13 additions and 3 deletions
6
NEWS
6
NEWS
|
|
@ -1,6 +1,10 @@
|
||||||
New in spot 2.5.1.dev (not yet released)
|
New in spot 2.5.1.dev (not yet released)
|
||||||
|
|
||||||
Nothing yet.
|
Bugs fixed:
|
||||||
|
|
||||||
|
- acc_cond::is_generalized_rabin() and
|
||||||
|
acc_cond::is_generalized_streett() would segfault on weird
|
||||||
|
acceptance conditions such as "3 t" or "3 f".
|
||||||
|
|
||||||
New in spot 2.5.1 (2018-02-20)
|
New in spot 2.5.1 (2018-02-20)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -659,7 +659,10 @@ namespace spot
|
||||||
pairs.resize(num_);
|
pairs.resize(num_);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (code_.is_t()
|
// "Acceptance: 0 f" is caught by is_generalized_rabin() above.
|
||||||
|
// Therefore is_f() below catches "Acceptance: n f" with n>0.
|
||||||
|
if (code_.is_f()
|
||||||
|
|| code_.is_t()
|
||||||
|| code_.back().sub.op != acc_op::Or)
|
|| code_.back().sub.op != acc_op::Or)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -740,7 +743,10 @@ namespace spot
|
||||||
pairs.resize(num_);
|
pairs.resize(num_);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (code_.is_f()
|
// "Acceptance: 0 t" is caught by is_generalized_buchi() above.
|
||||||
|
// Therefore is_t() below catches "Acceptance: n t" with n>0.
|
||||||
|
if (code_.is_t()
|
||||||
|
|| code_.is_f()
|
||||||
|| code_.back().sub.op != acc_op::And)
|
|| code_.back().sub.op != acc_op::And)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue