dfa icon indicating copy to clipboard operation
dfa copied to clipboard

Minor: Creating DFA with outputs=None fails.

Open sjunges opened this issue 2 years ago • 1 comments

The following code fails, which is slightly unexpected:

dfa1 = DFA(
    start=0,
    inputs={0, 1},
    outputs=None,
    label=lambda s: (s % 4) == 3,
    transition=lambda s, c: (s + c) % 4,
)

I would expect this to be the same as not setting any outputs. Setting an empty dictionary yields problems with the lstar library.

sjunges avatar Apr 15 '22 13:04 sjunges

In principle this seems easy to fix. In the same way as how inputs can be optional.

Happy to shepherd a PR, but bandwidth limited until mid may

mvcisback avatar Apr 17 '22 05:04 mvcisback