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 bdc63db9f0
commit 97832af321
4 changed files with 61 additions and 6 deletions

5
NEWS
View file

@ -1,6 +1,9 @@
New in spot 2.12.0.dev (not yet released)
Nothing yet.
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)