randltl: fix generation without unary operators

* spot/tl/randomltl.hh (has_unary_ops): New method.
* spot/tl/randomltl.cc: Avoid creating subformulas of even size
when we do not have unary operators.
* tests/core/randpsl.test: Test it.
* NEWS: Mention it.
This commit is contained in:
Alexandre Duret-Lutz 2024-08-21 21:36:54 +02:00
parent 436e5a2d7f
commit baf2778c9a
4 changed files with 62 additions and 5 deletions

5
NEWS
View file

@ -36,6 +36,11 @@ New in spot 2.12.0.dev (not yet released)
were missing the rule "[*0]|f ≡ f" when f already accepts the
empty word. (Issue #545.)
Bug fixes:
- Generating random formula without any unary opertors would very
often create formulas much smaller than asked.
New in spot 2.12 (2024-05-16)
Build: