caleb531 / automata

A Python library for simulating finite automata, pushdown automata, and Turing machines
https://caleb531.github.io/automata/
MIT License
349 stars 64 forks source link

fix: Minify for partial DFAs #184

Closed eliotwrobson closed 11 months ago

eliotwrobson commented 1 year ago

Resolves #182. Modifies the algorithm to deal with partial DFAs correctly. Somewhat inefficient, but the best we can do until Valmari's algorithm gets implemented (which is a separate open issue).

cc @martinec. If you have any more potentially interesting test cases, would be good to add to make sure the algorithm is working correctly (this one is unfortunately a bit tricky to get right).

coveralls commented 1 year ago

Coverage Status

coverage: 99.64% (+0.001%) from 99.639% when pulling ecd87c4e0350cf01e2d721ba5c61b7e9cd2a39f1 on eliotwrobson:partial_fix_2 into ef0e02c88e3a6d7a32314664619d3d2b5aceca3d on caleb531:develop.

eliotwrobson commented 11 months ago

@caleb531 since this is a bug people are actively running into and the volume of changes (outside of the test cases) is small, I'm going to try and merge this sometime today.

caleb531 commented 11 months ago

@eliotwrobson Sure, I have no problem with that—the PR looks fine to me.

And if you want to go ahead and merge to main as well, please feel free. Just please be sure to run through all steps in the Release Checklist (including the creation of the GitHub Release with recent features like the PDA show_diagram method, etc.). I just want to make sure that we have everything captured.

eliotwrobson commented 11 months ago

@caleb531 going to go ahead and merge since you approved.

I don't quite have time to run through the whole release checklist right now, since we added a couple of new features in addition to this bug fix. I'll try and find time in the next couple of days to push out a minor version. I think the main thing is that people who run into this bug have a fixed version available, and just having that on the develop branch should at least help some.

caleb531 commented 11 months ago

@eliotwrobson Oh okay, sure. If you think having this fix on develop is sufficient, then I'd probably not rather rush a release if we truly don't need to.