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

Fixes #1523 #1561

Merged
merged 2 commits into from
Dec 16, 2024
Merged

Fixes #1523 #1561

merged 2 commits into from
Dec 16, 2024

Conversation

Amyr14
Copy link

@Amyr14 Amyr14 commented Dec 11, 2024

Empty domains and empty ranges in the setOfMaps operator now give Set(Map()) and Set() respectively, like TLC.

Fixes #1523

Copy link
Collaborator

@bugarela bugarela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thanks for taking this 😄 I have a small suggestion inline and two requests:

  1. Run npm run format and commit the changes as the CI lint check is failing
  2. Add "Fixes #1523" to the PR description so it automatically closes the issue when we merge this

Comment on lines 901 to 903
assertResultAsString('Set().setOfMaps(Set(3, 5)) == Set(Map())', 'true')
assertResultAsString('Set().setOfMaps(Set()) == Set(Map())', 'true')
assertResultAsString('Set(1, 2).setOfMaps(Set()) == Set()', 'true')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes it a bit easier to read and will also result in better error messages if it ever breaks (i.e. someone tries to remove one of the ifs you added). The way you wrote it will result in error messages like "expected true, got false" which is not as helpful as "expected Set(), got Set(Map())".

Suggested change
assertResultAsString('Set().setOfMaps(Set(3, 5)) == Set(Map())', 'true')
assertResultAsString('Set().setOfMaps(Set()) == Set(Map())', 'true')
assertResultAsString('Set(1, 2).setOfMaps(Set()) == Set()', 'true')
assertResultAsString('Set().setOfMaps(Set(3, 5))', 'Set(Map())')
assertResultAsString('Set().setOfMaps(Set())', 'Set(Map())')
assertResultAsString('Set(1, 2).setOfMaps(Set())', 'Set()')

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! 😄

@Amyr14 Amyr14 changed the title Fixed issue #1523 Fixes #1523 Dec 13, 2024
@bugarela
Copy link
Collaborator

Thank you! For the "Fixes #1523", I think it needs to be on the description, not the title. I just edited your description to add it - see how "Fixes" gets a underscore and, if you hover over it, GitHub explains that this will close the appropriate issue.

I'll go ahead and merge it. Thanks a lot for the contribution ✨

@bugarela bugarela merged commit acdd6fb into informalsystems:main Dec 16, 2024
14 checks passed
@bugarela bugarela mentioned this pull request Jan 24, 2025
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.

Incompatibility of the Quint simulator with TLA+ on empty sets
2 participants