Test-Case Generator Extracts Counterexamples From Failed Proofs

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The challenge lies in bridging the gap between program proofs and the identification of specific test cases that cause a program to fail, as program testing is easier to conduct but does not guarantee correctness, while program proving guarantees correctness but is difficult to obtain successfully.

Innovation Solution

A method and tool for generating failing tests based on counterexamples from proof failures, using a test-case generator that extracts context and test data from erroneous functions and counterexamples, to create test cases that can identify and rectify bugs in computer-executable instructions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If program testing is used to verify software correctness, then it is easier to conduct and provides concrete failure information, but it does not guarantee correctness of the software

Engineering Contradiction:
Improveease of conducting verificationVSAvoidguarantee of software correctness
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The patent combines program testing and program proving into a unified verification system. When proof verification fails, the system automatically generates tests from counterexamples, merging the rigor of formal proofs with the concrete diagnostic value of tests. This allows the verification process to benefit from both mathematical certainty and practical test-driven debugging.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

Counterexamples serve as an intermediary between failed proofs and test generation. The counterexample extraction module translates abstract proof failures into concrete test cases that can be executed and used for debugging, bridging the gap between formal verification and practical testing.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If program proving is used to guarantee software correctness, then mathematical certainty is achieved, but it is difficult to obtain successful proofs and provides no concrete indication of underlying problems

Engineering Contradiction:
Improveguarantee of software correctnessVSAvoiddifficulty of obtaining successful proofs
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

Counterexamples act as an intermediary that translates abstract proof failures into actionable test cases. When a proof fails, the counterexample extraction module generates concrete input values and execution traces that point to the specific location and nature of the error, making debugging feasible without requiring successful formal proofs.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements feedback by using test results to guide further proof attempts. Failed tests provide concrete information about where the program violates its specification, allowing developers to refine their proofs or correct the code based on specific failure scenarios rather than abstract proof failures.

Inventive Principle:
Principle #23Feedback

3Productivity

If traditional testing methodologies are used to develop test cases, then test plans can be created based on system design, but the overwhelming number of test scenarios makes the process inefficient

Engineering Contradiction:
Improveefficiency of test case generationVSAvoidnumber of test scenarios
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The system extracts only the relevant test scenarios needed to expose failures, rather than generating or executing all possible test cases. By focusing on counterexamples from proof failures, it isolates the specific input combinations that are most likely to reveal bugs, dramatically reducing the effective test suite size while maintaining verification effectiveness.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The verification system is self-service in that it automatically generates its own test cases from proof failures without requiring manual test plan development. The counterexample extraction and test generation modules autonomously create targeted tests based on the program's specification and actual execution behavior, eliminating the need for extensive manual testing effort.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12287726B2System and method for generating failing tests from failed proofs
Publication Date: 2025.04.29 SIT AUTONOMOUS AG
  • US12287726B2 patent drawing
  • US12287726B2 patent drawing
  • US12287726B2 patent drawing

AI summary

A method for verifying a set of computer-executable instructions using at least one failing test generated by a test-case generator is disclosed herein. The method comprises verifying the set of computer-executable instructions by a verification module using a plurality of predefined verification conditions; determining if the verification is successful; in response to successful verification, label the set of computer-executable instructions as successful; and in response to unsuccessful verification, generate at least one counterexample, with respect to a proof failure and corresponding to at least one failed verification condition of the plurality of the predefined verification conditions, and generate a failing test, by a test-case generator, based on at least one counterexample. A program verification tool for testing the set of computer-executable instructions is also disclosed.