Open vhavlena opened 1 week ago
Is there a specific algorithm for checking NFA flatness you would like to use? An idea is to utilize the existing Tarjan's algorithm for discovering SCCs. For each SCC, we determine whether there are states in said SCC with multiple ingoing transitions from states in that SCC, which would mean that there are multiple paths (multiple cycles) the given state is part of, meaning that the NFA is not flat.
I thought the same way. I have made a prototype. I create a PR at some point.
For Z3-Noodler we need to check if an NFA is flat. It could be useful to add something like
is_flat
method for checking flatness of the automaton.