Counterexample Test 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 programs to generate counterexamples using an SMT-based Hoare-style prover, which switches the focus from failed proofs to failed tests, enabling the creation of a full-coverage test suite without executing the code.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If manual creation of test suites is performed, then coverage can be achieved, but the process is unacceptably tedious and labor-intensive
Solution Approach 1:
The patent replaces manual mechanical creation of test cases with an automated prover system that uses logical reasoning to generate test inputs. The prover systematically explores program paths and generates counterexamples automatically, eliminating the need for manual test case design while achieving comprehensive coverage.
Solution Approach 2:
The test suite generation process becomes self-service through the prover's ability to autonomously analyze the program structure, identify all possible execution paths, and generate appropriate test inputs without human intervention. The system serves itself by automatically creating the test suite that validates the program.
2Extent of automation
If existing automated methods are used to generate test suites, then some automation is achieved, but the methods are often inefficient and inadequate
Solution Approach 1:
The patent replaces conventional automated testing mechanisms with a formal proof-based approach. Instead of using traditional test generation algorithms, the system employs a prover that uses logical deduction and counterexample generation to create test cases, achieving both high automation and high efficiency.
Solution Approach 2:
The prover performs preliminary analysis of the program structure and logic before generating test cases. By pre-processing the program to understand its control flow and data dependencies, the system can efficiently generate targeted test inputs that maximize coverage without unnecessary exploration.
3Extent of automation
If dynamic test generation tools are used, then automated test suite creation is possible, but numerous executions of the code are required
Solution Approach 1:
The prover performs preliminary static analysis of the program to understand its structure and logic before any test executions. This pre-processing allows the system to generate test cases based on logical reasoning rather than through numerous trial executions, significantly reducing the number of runs needed.
Solution Approach 2:
The patent substitutes dynamic execution-based test generation with a static proof-based approach. The prover analyzes the program without executing it, using logical deduction to generate test inputs that would exercise all code paths, thereby eliminating the need for numerous runtime executions.
4Reliability
If 100% coverage is required for useful regression testing, then test effectiveness is improved, but the effort required becomes excessive
Solution Approach 1:
The patent replaces complex manual or heuristic-based test generation processes with a formal proof system. The prover systematically ensures 100% coverage through logical deduction, making the process reliable without requiring excessive human effort or complexity in the generation methodology.
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.


