Backward Propagation Test Case Generation for Floating Point Units
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional test case generators for floating point units (FPUs) lack control over instruction and operand generation, leading to inefficient coverage and time-intensive coverage hole closure, with random generators being fast but uncontrolled and constraint-solving generators being slow and limited in user control.
Innovation Solution
A method that generates test cases by taking predefined instruction mnemonics, resolving instruction groups, propagating results backwards, and randomly generating operands, using a table format and parameter file to define 'interesting scenarios' for precise and flexible test scenario formulation.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If conventional random test case generators are used, then test case generation speed is fast, but control over instructions and operands is limited
Solution Approach 1:
The system performs preliminary actions by pre-defining test case structures with specific scenarios (such as exception conditions, format conversions, and edge cases) before actual test generation. This allows the generator to quickly instantiate tests by filling in parameters according to pre-planned structures, achieving both speed and control.
Solution Approach 2:
The test case generation process is segmented into distinct components: structure definition, parameter specification, and instance generation. By dividing the generation process into these manageable segments, the system can control each aspect independently while maintaining overall efficiency.
2Ease of operation
If constraint-solving based test case generators are used, then control over instruction generation is total, but generation speed is very slow
Solution Approach 1:
The system pre-defines all possible test case structures, instruction templates, and operand constraints before generation begins. This preliminary structuring eliminates the need for slow constraint-solving during actual test generation, as the system simply needs to instantiate pre-planned templates with appropriate parameters.
Solution Approach 2:
Instead of starting with random instructions and checking constraints (traditional constraint-solving approach), the system inverts the process by starting with predefined test structures and constraints, then generating instructions that fit these predetermined frameworks. This reversal dramatically improves speed while maintaining control.
3Ease of operation
If manual test case creation is used, then interesting scenarios can be precisely controlled, but only a very small number of tests can be created
Solution Approach 1:
The system creates templates representing common test scenarios and exception conditions. Once a test structure is manually defined once as a template, it can be automatically copied and instantiated multiple times with different parameters, generating large numbers of tests from a small set of manually-crafted templates.
Solution Approach 2:
The test case structure definitions are designed to be universal and parameterizable, allowing a single template to serve multiple purposes by varying input parameters. This multi-functionality enables a small number of manually-created templates to generate a large volume of diverse test cases.
4Quantity of substance
If conventional test case generators are used, then large amounts of untargeted random tests are generated, but coverage holes are hard to close and coverage implementation is time intensive
Solution Approach 1:
The system pre-identifies coverage goals and defines test case structures specifically designed to hit target scenarios and exception conditions. By planning coverage requirements in advance and structuring tests to address specific coverage holes, the system eliminates wasted generation on untargeted random tests and quickly closes coverage gaps.
Solution Approach 2:
The system incorporates coverage analysis feedback into the test generation process. By monitoring which coverage goals have been met and which remain open, the system can adjust subsequent test generation to focus on uncovered areas, systematically closing coverage holes rather than generating random tests indefinitely.
Data Source
AI summary
A method of generating a test case from a given test case structure, the method including generating instructions for the given test case structure, propagating predefined results in a backwards manner, randomly generating remaining operands of the test case structure in a forwards manner, and calculating a result for the test case by determining missing input operands and storing these input operands in both the temporary register file and the initial register file, and calculating missing results and storing all results in the temporary register file.


