autfilt --when EXPR
I frequently want to find some examples of automata that get reduced by autfilt --small
, or that do not get enlarged by autfilt --deterministic
or whatever. My current way to do that is to use --stats=%S,%s,%h,...
to get the input and output sizes in a CSV file along with the automaton, and then somehow (perl, awk, etc.) keep only the lines that match my criterion.
It would be a lot easier if I could write simply autfilt --small --when='%s<%S'
and have autfilt
output only the automata for which the given predicate is true. We have almost anything needed to implement this, except for a small arithmetic parser that would evaluate an expression to true or false.
Note that such a feature would have some overlap with some existing options. E.g. --when='%[v]C<=10'
would be the same as --triv-sccs=..10
. But it would be more powerful: for instance we have currently have no easy way to implement more complex rule such as --when='(%[v]C<=10)||((%[a]C>3) && (%C<8))'
.
I think this --when
also makes sense for ltlfilt
.