This app runs inside the BotSurf browser. Don't have it yet? Get the app or extension now!

Counter-Example Trace Explainer from Model Checker

Developer Tools · All
0 installs · Verified BotGentz app
Launch App
Opens in BotSurf — nothing to install.
CategoryDeveloper Tools
PlatformAll
Pricing Free
Installs0
Download BotSurf to use — free
No account needed for free apps. Once BotSurf is open, find this app in Apps from the + menu.

About this app

WHAT IT DOES

This tool explains counter-example traces generated by formal verification and model checker tools, helping developers and auditors understand why an invariant was violated. By parsing structured trace data from tools like Certora, Foundry, Echidna, and others, it provides a clear, human-readable explanation of the execution path that leads to a violation. The explainer breaks down each step of the trace—including function calls, arguments, and state changes—and identifies the exact point where the violation occurs. It generates contextual explanations that describe the sequence of operations, the state transitions involved, and the root cause of the invariant breakage. This is essential for developers debugging failed verification attempts, auditors analyzing counter-examples, and teams iterating on invariant specifications.

HOW TO USE

Connect your wallet (read-only, no transaction required) and select the target network. Enter the contract name and address, then paste the counter-example trace as a structured JSON object into the text area. The trace should include a tool name, property name, violation status, and a steps array with function calls and state snapshots. Click "explain counter-example" and the tool will parse the trace, analyze the execution path, and generate a detailed explanation. Results display a summary with contract and trace metadata, a natural language explanation of the violation, a trace summary card, a step-by-step view of the execution path with state changes, and a detailed table of all trace steps. Use the explanation to identify the root cause of the violation and refine your invariant specifications or contract logic.

TECHNICAL MECHANISM

The explainer uses a structured parsing engine that processes counter-example traces from multiple formal verification tools. It accepts JSON input with a flexible schema that includes tool identification, property names, violation flags, and a steps array. Each step in the trace must contain a step number, function name, arguments, and state snapshot (key-value pairs representing contract state variables). The engine iterates through the steps, building an execution timeline and tracking state changes across the trace. It identifies the violation point by detecting steps where state transitions break the expected invariant or where the tool explicitly marks a violation. The engine then generates a natural language explanation that describes the function call sequence leading to the violation, highlights the critical state change, and provides context about the invariant being tested. The explanation is tailored based on the trace length (single-step vs. multi-step violations) and the tool that generated the counter-example. The implementation includes validation for input format integrity and handles missing fields gracefully.

WHAT IT CANNOT SEE

This tool cannot analyze counter-examples from tools that do not provide structured trace outputs (e.g., plain text error logs). It is limited by the completeness and accuracy of the input counter-example traces—if the trace omits critical state variables or function calls, the explanation will be incomplete. It cannot generate new counter-examples—only explains existing ones. It cannot verify whether a counter-example is valid without re-running the model checker; it trusts the input as given. The tool relies on the accuracy and completeness of source code verification and model checker data. It is limited to the specific state variables and function calls captured in the trace; external contract interactions or cross-contract state not included in the trace will not be explained. It cannot resolve ambiguous counter-examples without additional manual analysis or re-running the verification with different configurations. The generated explanation is based on pattern matching and heuristics; complex or subtle violations may require deeper manual investigation.

PLEASE NOTE

This is a read‑only analytics tool—it never submits transactions or signs anything. It is designed for EVM‑compatible chains and works with outputs from major formal verification tools. The generated explanations are for informational and audit purposes only and should not be considered a definitive diagnosis. Always verify counter-examples by reproducing them in a local testing environment or re-running the verification tool. For complex counter-examples, consult the specific tool's documentation and consider additional manual analysis.

Similar Apps

Log in to BotGentz

Suggest an App

Tell us what you'd find useful — if we build it, we'll email you the moment it's ready.