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

Limit number of choices in choose expression to at most 10000 #725

Merged
merged 3 commits into from
May 2, 2024

Conversation

aman-goel
Copy link
Contributor

Updates include:

[PCompiler]

  • Throw a static error if N is integer literal greater than 10K in choose(N)

[C# and PSym Runtimes]

  • Throw an error if N is integer variable greater than 10K in choose(N)
  • Throw an error if N is seq/set/map with greater than 10K elements in choose(N)

[Docs]

  • Update P GitHub manual for choose to reflect this change

[Tst]

  • Adds new unit tests

aman-goel added 3 commits May 2, 2024 18:58
Adds throwing a compile-time or runtime error if the number of choices in a choose(.) is greater than 10000.

Updates GitHub docs to reflect this change.
@aman-goel aman-goel marked this pull request as ready for review May 2, 2024 20:08
@aman-goel aman-goel requested a review from ankushdesai May 2, 2024 20:08
Copy link
Member

@ankushdesai ankushdesai left a comment

Choose a reason for hiding this comment

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

Thanks!

@ankushdesai ankushdesai merged commit 5f96108 into master May 2, 2024
14 checks passed
@ankushdesai ankushdesai deleted the dev/choose branch May 2, 2024 20:30
aman-goel added a commit that referenced this pull request May 6, 2024
* Limit number of choices in a choose(.) to atmost 10,000

Adds throwing a compile-time or runtime error if the number of choices in a choose(.) is greater than 10000.

Updates GitHub docs to reflect this change.

* Adds regression tests for choose exceeding 10000 choices

* [PSym] Throw error if number of choices are greater than 10000
aman-goel added a commit that referenced this pull request May 6, 2024
* Limit number of choices in a choose(.) to atmost 10,000

Adds throwing a compile-time or runtime error if the number of choices in a choose(.) is greater than 10000.

Updates GitHub docs to reflect this change.

* Adds regression tests for choose exceeding 10000 choices

* [PSym] Throw error if number of choices are greater than 10000
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.

2 participants