Add a minimizing solver for smaller counter-examples#176
Open
SolalPirelli wants to merge 2 commits intoepfl-lara:scala-2.13from
Open
Add a minimizing solver for smaller counter-examples#176SolalPirelli wants to merge 2 commits intoepfl-lara:scala-2.13from
SolalPirelli wants to merge 2 commits intoepfl-lara:scala-2.13from
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is part of the Formal Verification course project from @mbovel and me, the idea is to add a "minimizing" solver that makes "smaller" counter-examples, such as ints/BVs closer to 0 and ADT constructors with fewer parameters.
Two examples from our project presentation:
With default Stainless this results in a counter-example of
-1743011841, with oursmt-z3-minsolver it results in0instead (and the overflow counter-example is also far closer to 0).With default Stainless the output isn't stable, it will somewhat randomly be one of the three ADT constructors, with our
smt-z3-minit's alwaysSmall()(and the overflow counter-examples are also minimized).WDYT? In particular, should there be other kinds of minimization? What tests should there be, and is there an easier way to write such tests than the rather verbose one we added (the TIP format maybe)?