Closed Jaxan closed 4 years ago
Sorry for the delayed response. You are right, even by the definitions in the Bollig et al. paper a residual language cannot be empty and hence the "sink" row is not eligible for a prime row.
I was thinking about how to best implement this but your PR already does this nicely. Thank you!
The construction in LearnLib for the canonical RFSA sometimes includes a sink state. This is wrong. A row which does not accept anything, should not be consider to be prime.
I have to agree that the definitions in the Bollig et al paper "Angluin-Style Learning of NFA" (2009) are not very precise on this matter. But in the original work on RFSA by Denis and Eposito ("Residual Finite State Automata", 2002) it is clear that an empty language is not prime:
(This also agrees with the standard notion of join-irreducible from lattice theory: the bottom element is not join-irreducible.) Consequently, the canonical RFSA will never have sink states.
Here is the code to reproduce the bug:
Wrong output
The state
s3
is a sink state, and should be removed altogether. Otherwise, the automaton is correct, and accepts the language L.