Thank you Alexandre!
I've played a bit with it and here is an observation.
If there is no `States: ` header in the file then all the numbers are
computed based on the states listed in the body.
However if there is a `States: ` header then things are a bit different.
Warnings (many of them) will be displayed if, in the body, there are more
states than the number declared in the header.
In that case the total number `%[a]s` computed is the same as if the
`States: ` header was absent.
If, in the body, there are less states than the number declared in the
`States: ` header then the number
of unreachable states will be "increased" so that the equality `%[r]s +
%[u]s = %[a]s` holds.
This behavior is consistent with the output of `--hoaf` which is "padding"
the body part by
declaring all these unreachable states explicitly.
On the other hand, `jhoafparser parse` returns a warning:
`Warning: There are <number> states without definition`
However `jhoafparser print` performs no padding unlike `autfilt --hoaf`.
I realize I might be the only one who got confused about this corner case.
If there is somebody else then we now have a record in the mailing list.
Perhaps the same warning should be output by `autfilt` so that the user
knows something is going on when looking at `%[a]s`.
Pierre.
On Fri, 21 Oct 2022 at 17:37, Alexandre Duret-Lutz <adl(a)lrde.epita.fr>
wrote:
pierreganty(a)gmail.com writes:
I did not find how to get the number of states
(reachable or not) of
an automaton using autfilt (in particular the `--stats` option). The
option provided by `autfilt --stats` is for reachable states only.
Hi Pierre
Thank you for the suggestion. Here is what you can now do with the
latest development version [*].
Create a test automaton with an edge labeled by false in the middle:
$ ltl2tgba 'X[10]a' | sed '/State: 4/,/State: 5/s/\[t\]/[f]/' >
test.hoa
Display count of [r]eachable, [u]unreachable, and [a]ll states:
$ autfilt --stats='%[r]s + %[u]s = %[a]s' test.hoa
7 + 5 = 12
The same syntax will work for %e and %t as well.
Best regards,
Alexandre
[*]
https://gitlab.lre.epita.fr/spot/spot/-/jobs/artifacts/next/browse?job=make…