Code Coverage Table for MC/DC Evaluation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for evaluating Modified Condition/Decision Coverage (MC/DC) in software testing are inefficient, particularly in safety-critical systems, as they require capturing and analyzing extensive execution traces, which is bandwidth-intensive and performance-consuming, and do not ensure that all condition combinations are tested.
Innovation Solution
A method and apparatus for generating code coverage information by creating and using a code coverage table during execution, where a bitstring represents condition values to index entries in the table, allowing efficient recording and analysis of decision evaluations, thereby reducing the need for full trace capture and improving analysis efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If full execution traces are captured and analyzed to evaluate MC/DC criteria, then code coverage compliance can be determined, but significant bandwidth is required and system performance is impacted
Solution Approach 1:
The patent extracts only the essential information needed for MC/DC evaluation (condition values and decision outcomes) from the full execution trace, storing them in compact data structures within the target system. This extraction approach eliminates the need to capture and analyze entire execution traces, significantly reducing bandwidth requirements and performance impact while maintaining evaluation accuracy
Solution Approach 2:
The patent segments the code into decision points and conditions, creating separate data structures for each decision (e.g., decision records, condition tables). This segmentation allows efficient tracking of condition values and decision outcomes without processing the entire execution trace, reducing the computational burden and bandwidth requirements
2Measurement precision
If execution traces are captured for MC/DC evaluation, then code coverage criteria can be assessed, but the process becomes bandwidth-intensive and difficult to maintain
Solution Approach 1:
The patent implements self-service by having the target system automatically generate and maintain code coverage data structures during normal execution. The instrumented code automatically records condition values and decision outcomes in predefined data structures, eliminating the need for external trace capture infrastructure and simplifying the overall system architecture
Solution Approach 2:
The patent prepares data structures (decision records, condition tables, bitstrings) in advance before execution, with predefined formats and locations. This preliminary preparation eliminates the need for complex runtime trace processing and simplifies the capture mechanism, as the system only needs to fill in pre-allocated data structures during execution
3Reliability
If extensive execution traces are captured to demonstrate MC/DC criteria, then comprehensive testing coverage can be achieved, but the analysis process significantly impacts model performance
Solution Approach 1:
The patent extracts only the minimal necessary information (condition boolean values and decision outcomes) required for MC/DC verification, storing them in compact bitstrings and tables. This extraction eliminates the need to process large volumes of execution trace data, maintaining comprehensive testing coverage while minimizing performance impact on model execution
Solution Approach 2:
The patent changes the representation parameters of execution data from detailed trace information to compact bitstrings and enumerated values. By encoding condition values as bits and decision outcomes as enumerated parameters, the system maintains complete testing coverage information in a highly compressed format that minimizes memory and processing requirements
Data Source
AI summary
A method and computer program for generating code coverage information during testing of a code sequence are described, in which the code sequence comprises decisions, each having one or more conditions as inputs. The method includes executing the code sequence on target processing circuitry under the control of test stimuli and maintaining, in memory, a code coverage table for at least one decision. When a decision is evaluated, a bitstring is created within a storage element, each position in the bitstring being associated with one of the conditions and the value in that position representing the value of that condition used in evaluating the decision. The bitstring is used to identify the entry, in the code coverage table associated with the evaluated decision, for that combination of values of the conditions, and a confirmation value is recorded in that entry, indicating that the decision has been evaluated for that entry.


