Show counterexample values in the final expected refinement - #299
Open
CatarinaGamboa wants to merge 1 commit into
Open
CatarinaGamboa wants to merge 1 commit into
CatarinaGamboa wants to merge 1 commit into
Conversation
Collaborator
|
A while back I thought about adding a simplification pass specifically for expected types that could also be applied to counterexamples, and I think that would address this issue in a better way. This simplification would expand aliases and static final constants, for example:
Then we could have navigate the simplification history just like we are doing for the found types. |
Collaborator
Author
|
Yeah we could extend the simplification here, but also do the substitution of values with the counter-examples in the expected type |
Collaborator
|
Yes, I also had thought about that possibility. We can plug them in the expected type and then perform the same simplification to see how they make the expected type false. |
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.
Summary
Carry the expanded expected predicate used by the SMT check into refinement errors. Substitute every displayed counterexample value that can safely be parsed as a literal, using expression variable identities. Preserve the original expected predicate and counterexample assignments.
For an alias mismatch, the verifier can now show:
The CLI error displays the final expected predicate and witness.
RefinementErroralso exposes both as predicates for a future server DTO and VS Code presentation change. Verification results are unchanged.Closes #296.
Verification
git diff --checkpassed.Integration note
The current VS Code server DTO does not serialize these new fields, so they will not appear in the extension until a separate server/client update consumes them.