Closed huahaiy closed 7 years ago
Apparently, calling (fsm/reset-generation)
between calls solve the problem.
There are still infinite loop issues with certain construction. For example, the following still leads to infinite loop:
(dotimes [i 10]
(println i)
(apply a/or [[1 2 4 (a/or 5 6 7 8)] [1 (a/or 5 6 7 8) 10]])
(fsm/reset-generations))
Namely, if we or
together automatons containing identical nested or
of more than 3 items, an infinite loop appears.
This is now fixed. Thanks.
The
or
function in core may run into infinite loop at the minimization step. In particular, when it happens, the infinite loop will appear in theroot
function in themerge-pairs
function. The occurrence of the infinite loop seems to be random, however, it will always appear if one runsor
enough times.To reproduce, run the following code:
It may take a couple of runs of the above to generate an infinite loop. The process will have to be killed to stop it.
If we only
or
two states together, this bug doesn't appear.