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

Fix naming of automatically generated next-state variables #349

Merged
merged 4 commits into from
Sep 10, 2024

Conversation

CyanoKobalamyne
Copy link
Collaborator

If a user has state variables called both x and x.next in their BTOR2 file, Pono currently throws an error, because TransitionSystem.make_statevar creates two solver symbols, an identically-named one for the current value of the state variable, and one with ".next" appended for the next value. This PR changes the suffix to be something that is less likely to clash with actual signals. It is still possible to cause a crash deliberately, but the only way to avoid that would be to make the variable names less readable and using something like an UUID.

@CyanoKobalamyne CyanoKobalamyne merged commit 96136ce into main Sep 10, 2024
4 checks passed
@CyanoKobalamyne CyanoKobalamyne deleted the next-var-fix branch September 10, 2024 23:45
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 this pull request may close these issues.

1 participant