Skip to content

Comprehensive backend-independent counterexamples#883

Open
marcoeilers wants to merge 21 commits into
masterfrom
meilers_raoul_counterexamples
Open

Comprehensive backend-independent counterexamples#883
marcoeilers wants to merge 21 commits into
masterfrom
meilers_raoul_counterexamples

Conversation

@marcoeilers

@marcoeilers marcoeilers commented Sep 1, 2025

Copy link
Copy Markdown
Contributor

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=variables option, 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.

@marcoeilers
marcoeilers marked this pull request as ready for review July 15, 2026 22:33
// 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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Wrong year

@@ -0,0 +1,251 @@
package viper.silver.verifier

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Header missing

* - 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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Update

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.

1 participant