Counterexample Test Suite Generation for Full Branch Coverage

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for creating high-coverage regression test suites for computer programs are labor-intensive and inefficient, requiring numerous code executions and lacking in automation.

Innovation Solution

A method involving seeding contradictions into computer program branches, using an SMT-based Hoare-style prover to generate counterexamples, which are then used to create a test suite.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If manual creation of test suite is used, then test coverage can be achieved, but the process is unacceptably tedious and labor-intensive

Engineering Contradiction:
Improvetest coverageVSAvoidtime consumption
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent replaces manual mechanical test creation with an automated prover system that uses formal verification methods. The prover automatically generates test cases by analyzing program semantics and generating counterexamples, eliminating the need for manual test suite construction while achieving comprehensive branch coverage.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The test suite generation process becomes self-service through the prover system that automatically analyzes the program code, identifies all possible execution paths, and generates appropriate test cases without human intervention. The system serves itself by using the program's own structure and logic to create its test suite.

Inventive Principle:
Principle #25Self-service

2Extent of automation

If existing automated methods are used, then test suite generation is automated, but the methods are often inefficient and require numerous code executions

Engineering Contradiction:
Improveautomation levelVSAvoidgeneration efficiency
Core Design Contradiction:
Extent of automationVSProductivity

Solution Approach 1:

The patent replaces execution-based automated testing with a formal verification approach using a prover system. Instead of running numerous code executions to infer coverage, the prover statically analyzes the program structure and semantics to determine all reachable branches, eliminating the inefficiency of repeated executions while maintaining high automation.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The prover performs preliminary analysis of the program structure before any test execution occurs. By pre-analyzing control flow graphs and program semantics, the system identifies all possible execution paths in advance, allowing efficient test case generation without requiring numerous actual code executions during the testing phase.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If focus is on failed proof of correctness, then formal verification is applied, but the process does not directly generate executable test cases

Engineering Contradiction:
Improvecorrectness verificationVSAvoidtest case generation
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent converts the failure of formal proof into a beneficial test case generation process. When the prover cannot prove program correctness, it generates counterexamples that serve as valid test cases. This transforms the negative outcome of failed verification into a positive result, directly producing executable test cases that expose potential issues in the program.

Inventive Principle:
Principle #22Blessing in disguise (Convert harm into benefit)

Solution Approach 2:

Instead of trying to prove correctness and hoping for test cases, the patent inverts the approach by deliberately seeking to disprove correctness. The prover attempts to find counterexamples that violate program specifications, and these counterexamples become the test cases. This inversion directly links verification failure to test case generation, making the process more operational.

Inventive Principle:
Principle #13The other way round (Inversion)

Data Source

PatentUS12561232B2Seeding contradiction as a fast method for generating full-coverage test suites
Publication Date: 2026.02.24 CONSTR EDUCATION & RES GENOSSENSCHAFT
  • US12561232B2 patent drawing
  • US12561232B2 patent drawing
  • US12561232B2 patent drawing

AI summary

Systems and methods for checking the correctness of a computer program with at least one incorrect instruction inserted into at least one of a plurality of branches of the computer program. At least one prover generates a counterexample of computer program correctness in order to switch focus from a failed proof of the correctness of the computer program to a failed test of the correctness of the computer program.