Comprehensive backend-independent counterexamples#883
Open
marcoeilers wants to merge 21 commits into
Open
Conversation
marcoeilers
marked this pull request as ready for review
July 15, 2026 22:33
marcoeilers
commented
Jul 21, 2026
| // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| // file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| // | ||
| // Copyright (c) 2011-2015 ETH Zurich. |
| @@ -0,0 +1,251 @@ | |||
| package viper.silver.verifier | |||
| * - a "raw" counterexample ([[RawCounterexample]]) that contains all information in a simple, | ||
| * machine-readable form, keyed by the backend-internal (SMT/Boogie) identifiers, and | ||
| * - a "resolved" counterexample ([[ResolvedCounterexample]]) that makes the raw one | ||
| * human-readable, e.g. by binding heap resources to their AST nodes and translating internal |
Contributor
Author
There was a problem hiding this comment.
This is no longer true
| // License, v. 2.0. If a copy of the MPL was not distributed with this | ||
| // file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
| // | ||
| // Copyright (c) 2011-2025 ETH Zurich. |
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 PR adds the core components for a backend-independent counterexample model, to be used in either backend using the command line parameter
--counterexample=resolved(or a raw version with--counterexample=raw).Unlike the current
--counterexample=variablesoption, it contains information not just about local variables, but also about the heap, functions, etc.Unlike Silicon's current
--counterexample=mapped, which is exclusive to Silicon, the new model also supports quantified permissions and wands, and also works in Carbon.Implementations in Silicon and Carbon will get their own PRs.
This is the result of @rvandoren's practical work project, with a bunch of additions from me.