bradengroom/scala-automata-library

removeNondistinguishableStates() issue

Closed this issue · 6 comments

(a union Set(b,c,d)).removeUnreachableStates.removeNondistinguishableStates.print

running this gives an incorrect DFA. Testing suggests that the problem is with the removeNondistinguishableStates() method. Running the line

(a union Set(b,c,d)).getDFA.removeNondistinguishableStates.print

provides the correct answer. This shouldnt be making a difference though since removeNondistinguishableStates() calls getDFA if the machine is not deterministic already.

I am unable to reproduce the issue. The issue will be closed for now.

Still an issue
(a union Set(b,c,d)).minimize.print

Needs to be rewritten completely now

Still buggy:
println("(a+)b".getDFA.removeNondistinguishableStates)

This bug may or may not be caused by this method:
println("(a*)".getDFA.removeNondistinguishableStates)

This part of the issue has been fixed:
println("(a*)".getDFA.removeNondistinguishableStates)

It was a problem with Automaton.toString()