Skip to content

✨ Bias towards extreme values for integer and bigint #1149

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

Merged
merged 6 commits into from
Nov 15, 2020

Conversation

dubzzz
Copy link
Owner

@dubzzz dubzzz commented Nov 9, 2020

In a nutshell

Up to now, when trying to bias generated values to fall quickly in classical corner cases, fast-check used to generate integer values close to zero. It did a quite nice job to find bugs in lots of programs. But most of the time when we build algorithms, we have bugs close to zero but also close to our boundaries (ie min and max values).

This new development tries to push bias to the next level: bias should not only find bugs related to small values but also the ones related to largest ones. When we say: our algorithm should work with integer value, fast-check should trust you and try any integer values including crazy ones like Number.MAX_SAFE_INTEGER if you said it worked for it too.

Next steps: In the future, arbitraries on strings (outside of this review) will also bias towards classical strings causing issues.

✔️ New feature
❌ Fix an issue
❌ Documentation improvement
❌ Other: please explain

(✔️: yes, ❌: no)

Potential impacts

Impact generated values of all the arbitraries of fast-check.

As integer is a root arbitrary for barely any of the arbitraries offered in fast-check, mos of the arbitraries will be impacted by this change (regarding generated values).

Verified

This commit was signed with the committer’s verified signature.
innocenzi Enzo Innocenzi

Verified

This commit was signed with the committer’s verified signature.
innocenzi Enzo Innocenzi

Verified

This commit was signed with the committer’s verified signature.
innocenzi Enzo Innocenzi

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 9, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 93ac7a0:

Sandbox Source
Vanilla Configuration
fast-check-examples Configuration

@coveralls
Copy link

coveralls commented Nov 9, 2020

Coverage Status

Coverage decreased (-0.1%) to 96.318% when pulling 93ac7a0 on bias-towards-extreme-values into e5ad46b on master.

@dubzzz dubzzz merged commit c1d6b5a into master Nov 15, 2020
@dubzzz dubzzz deleted the bias-towards-extreme-values branch November 15, 2020 11:40
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.

None yet

2 participants