Symbolic Execution Test Generation for Complex Code Coverage
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing automatic test generation methods struggle with generating high-coverage test cases for software due to limitations in handling recursive data structures, pointer handling, and ambiguous type expressions, leading to potential bugs and reduced reliability.
Innovation Solution
An information processing device and method that generates test cases by symbolizing inputs and constraints, using a symbol execution engine to collect path constraints and solve them with a constraint solver, ensuring high coverage and reliability.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If symbol execution is used to automatically generate test cases, then test coverage is improved, but execution cost and time increase significantly
Solution Approach 1:
The patent segments the test generation process into distinct phases: constraint generation from source code, constraint solving to determine input values, and test case generation. This segmentation allows the system to focus computational resources on solving constraints rather than executing entire program paths, reducing overall execution time while maintaining coverage.
Solution Approach 2:
The patent performs preliminary constraint generation and analysis before actual test execution. By pre-processing the source code to extract constraints and determining feasible input ranges in advance, the system reduces the computational burden during actual test case generation and execution, thereby reducing total time loss.
2Productivity
If manual test creation is performed, then development cost is reduced, but test coverage and quality decrease
Solution Approach 1:
The patent implements a self-service test generation system where the testing tool automatically analyzes source code, generates constraints, solves for input values, and creates test cases without human intervention. This automation eliminates the need for manual test creation while achieving comprehensive coverage, thereby increasing productivity without proportionally increasing development costs.
Solution Approach 2:
The patent introduces constraint solving as an intermediary mechanism between source code analysis and test case generation. This intermediary automatically determines valid input values by solving constraints extracted from the code, replacing manual test design while maintaining cost-effectiveness through automated reasoning rather than human effort.
3Reliability
If exhaustive tests are generated to cover all behaviors, then reliability is improved, but development time and cost increase
Solution Approach 1:
The patent changes the approach from parameter-based test execution to constraint-based test generation. By formulating test requirements as mathematical constraints and solving for input parameters that satisfy these constraints, the system can generate exhaustive tests more efficiently, reducing development time while maintaining high reliability through comprehensive coverage.
Data Source
AI summary
An information processing device that automatically generates a test code is provided.The information processing device generates a constraint from at least one of a source code, an annotation written in a source code or an annotation of a source code written in an external file, generates a source code that runs on a symbol execution engine and is obtained by symbolizing a motion and an input on the basis of the generated constraint, executes an instruction of the source code generated by the symbolization unit line by line with the symbol execution engine, performs processing in accordance with the instruction reached through the instruction execution to collect path constraints, and solves the collected path constraints using a constraint solver, to generate a test case as a solution of the path constraints.


