Counterexample Test Suite Generation for Full Branch Coverage
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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.
3Reliability
If focus is on failed proof of correctness, then formal verification is applied, but the process does not directly generate executable test cases
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.
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.
Data Source
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.


