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

Add ScalaCheck shrinker to Nitpicker #1683

Merged
merged 5 commits into from
May 24, 2022
Merged

Add ScalaCheck shrinker to Nitpicker #1683

merged 5 commits into from
May 24, 2022

Conversation

thpani
Copy link
Collaborator

@thpani thpani commented Apr 27, 2022

To produce smaller counter-examples for easier human inspection:

  • Shrink PBT-generated TlaType1 (witness type) in Nitpicker.
  • Shrink TlaEx (witness expression) sets to sets with fewer elements.

Closes #1667, closes #1588.

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2022

Codecov Report

Merging #1683 (ac04bf2) into unstable (597f39f) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           unstable    #1683      +/-   ##
============================================
- Coverage     76.85%   76.84%   -0.01%     
============================================
  Files           383      383              
  Lines         11849    11849              
  Branches        537      537              
============================================
- Hits           9106     9105       -1     
- Misses         2743     2744       +1     
Impacted Files Coverage Δ
...a/at/forsyte/apalache/tla/lir/TlaLevelFinder.scala 97.36% <0.00%> (-2.64%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 597f39f...ac04bf2. Read the comment docs.

@thpani thpani changed the title Add shrinker for PBT-generated TLaType1's Add ScalaCheck shrinker to Nitpicker May 17, 2022
@thpani thpani marked this pull request as ready for review May 17, 2022 12:11
@thpani thpani requested a review from rodrigo7491 as a code owner May 17, 2022 12:11
@thpani thpani requested a review from konnov May 17, 2022 12:11
Copy link
Contributor

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

Looks like a great start! This'll be awesome. I've suggested a few small fixes and posed a few broader questions. I am maybe getting up to speed here too, so may just need some pointers on understanding, e.g., what's up with the expression shrinker.

Co-authored-by: Shon Feder <shon@informal.systems>
@thpani thpani requested a review from shonfeder May 23, 2022 07:01
Copy link
Contributor

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

LGTM!

@thpani thpani enabled auto-merge (squash) May 24, 2022 17:00
@thpani thpani merged commit 81fb9af into unstable May 24, 2022
@thpani thpani deleted the th/pbt-shrink branch May 24, 2022 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants