counterexample-debugger

Solid

Debug proof failures using counterexamples from Nitpick (Isabelle) or QuickChick (Coq) to identify specification errors, missing preconditions, and proof strategy issues. Use when: (1) A proof attempt fails and you need to understand why, (2) Counterexamples are generated by Nitpick or QuickChick, (3) Specifications may be incorrect or incomplete, (4) Theorems need validation before proving, (5) Missing preconditions or lemmas need identification, or (6) Proof failures need explanation and correction suggestions. Supports both Isabelle/HOL and Coq equally.

Code & Development 160 stars 17 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
73
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
100
Description 5%
100

Skill Content

# Counterexample-Guided Proof Debugger Analyze counterexamples from Nitpick or QuickChick to explain proof failures and suggest corrections to specifications or proofs. ## Workflow ### 1. Receive Counterexample Information Identify what information is provided: - **Counterexample output**: From Nitpick or QuickChick - **Failed theorem**: The statement that couldn't be proven - **Proof attempt**: Any partial proof or tactics tried - **Context**: Definitions and lemmas involved ### 2. Choose Target System Determine which proof assistant is being used: - **Isabelle/HOL with Nitpick**: Finite model finder - **Coq with QuickChick**: Property-based testing - **Both**: Provide analysis for both systems ### 3. Analyze the Counterexample Examine the counterexample systematically: **Verify the counterexample**: - Manually compute the result for the given values - Confirm it actually violates the theorem - Check if it's a genuine counterexample or tool limitation **Identify the violation**: - Which part of the theorem fails? - What values cause the failure? - Is it an edge case or fundamental issue? **Determine the root cause**: - Missing precondition? - Incorrect specification? - Wrong quantifier order? - Implementation bug? - Off-by-one error? - Type constraint issue? ### 4. Explain the Failure Provide clear explanation: **What went wrong**: - Describe why the counterexample violates the theorem - Show the computation step-by-step - Highlight the specific point of failur...

Details

Author
ArabelaTso
Repository
ArabelaTso/Skills-4-SE
Created
6 months ago
Last Updated
today
Language
Python
License
Apache-2.0

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

counterexample-explainer

Explain why counterexamples violate specifications by analyzing formal specifications (temporal logic, invariants, pre/postconditions, code contracts), informal requirements (user stories, acceptance criteria), test specifications (assertions, property-based tests), and providing step-by-step traces showing state changes, comparing expected vs actual behavior, identifying root causes, and assessing violation impact. Use when debugging test failures, understanding model checker output, explaining runtime assertion violations, analyzing static analysis warnings, or teaching specification concepts. Produces structured markdown explanations with traces, comparisons, state diagrams, and cause chains. Triggers when users ask why something failed, explain a violation, understand a counterexample, debug a specification, or analyze why a test fails.

160 Updated today
ArabelaTso
Code & Development Solid

counterexample-generator

Generate concrete counterexamples when formal verification, assertions, or specifications fail. Use this skill when debugging failed proofs, understanding why verification fails, creating minimal reproducing examples, analyzing assertion violations, investigating invariant breaks, or diagnosing specification mismatches. Produces concrete input values, execution traces, and state information that demonstrate the failure.

160 Updated today
ArabelaTso
Testing & QA Solid

counterexample-to-test-generator

Automatically generates executable test cases from model checking counterexample traces. Translates abstract counterexample states and transitions into concrete test inputs, execution steps, and assertions that reproduce property violations. Use when working with model checker outputs (SPIN, CBMC, NuSMV, TLA+, Java PathFinder, etc.) and needing to create regression tests, validate bug fixes, or reproduce verification failures in executable test suites.

160 Updated today
ArabelaTso