In the old implementation, ProductDfa broke for >2 underlying dfas.
The new implementation is set up using the following core steps:
create a cartesian product of all dfa subnodes' combinations. Every
combination represents a product dfa node
for every pdfa node, create a cartesian product for all outgoing edges
of its subnodes and link to the corresponding pdfa node. This represents
'following a combination of subnodes outgoing edges simultaneously'.
This implementation is aimed at correctness and can probably be
optimized.
The most obvious optimizations appear to be:
only iterate over nodes that are connected to the initial node
combine some for-loops iterating over all (pdfa) nodes
possibly: early detection and reconciliation of final nodes
NOTE: I had to make some (local-specific?) changes to the repo to get my installation working. It's probably a good idea to test these changes on a fresh clone before merging.
In the old implementation, ProductDfa broke for >2 underlying dfas. The new implementation is set up using the following core steps:
This implementation is aimed at correctness and can probably be optimized. The most obvious optimizations appear to be:
NOTE: I had to make some (local-specific?) changes to the repo to get my installation working. It's probably a good idea to test these changes on a fresh clone before merging.