Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DFA._cross_product compares input symbols, fails if one is set and other frozenset #240

Open
Tagl opened this issue Nov 26, 2024 · 2 comments · May be fixed by #241
Open

DFA._cross_product compares input symbols, fails if one is set and other frozenset #240

Tagl opened this issue Nov 26, 2024 · 2 comments · May be fixed by #241

Comments

@Tagl
Copy link
Contributor

Tagl commented Nov 26, 2024

  1. What version were you using? Most recent version (v8.4.0)
  2. What were you doing? Taking the intersection of two DFA, one with a set of input symbols and the other with a frozen set of input symbols. In particular I constructed the left hand and right hand side DFAs using the substring, subsequence, of_length and count_mod helper functions.
  3. What did you expect would happen? It would work without exceptions
  4. What happened instead? An exception of type SymbolMismatchError was thrown

I think we don't want this to be an issue for users to manually take care of and I believe we can expect the input symbols to either be a set or a frozen set so we should handle the 4 possible combinations appropriately.

@eliotwrobson
Copy link
Collaborator

eliotwrobson commented Nov 26, 2024

Can you post the exact error message you had? I think fixing this will just involve casting both of the sets as frozensets before running the cross product function.

EDIT: Couldn't reproduce this when I wrote a test for it on this PR.

@Tagl
Copy link
Contributor Author

Tagl commented Nov 28, 2024

I'll make a few examples when I'm finished teaching. I double checked that I'm on the latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants