Semantically Equivalent Program Variant Generation for Defect Detection

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional fuzz testing techniques are time-consuming, labor-intensive, and ineffective in detecting complex defects such as timing-related issues or semantically invalid code, often resulting in poor code coverage and failure to uncover critical faults.

Innovation Solution

Generating semantically equivalent variants of a computer program through randomly selected semantic-preserving transforms and performing unit tests on these variants to expose and detect defects that would otherwise remain undetectable.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If conventional fuzz testing techniques are used to detect software defects, then some defects can be discovered, but the testing process becomes very time consuming and labor intensive

Engineering Contradiction:
Improvedefect detection capabilityVSAvoidtesting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary actions by generating semantically equivalent variants of the computer program before actual testing occurs. Multiple variants are created in advance using semantic transforms, allowing the testing process to systematically evaluate different program representations and uncover defects more efficiently than conventional fuzz testing

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The invention creates multiple copies (variants) of the computer program that are semantically equivalent but structurally different. These copies are generated through semantic transforms and then tested to detect defects, replacing the need for extensive manual fuzz testing while maintaining high defect detection capability

Inventive Principle:
Principle #26Copying

2Reliability

If conventional fuzz testing techniques are used, then some defects may be detected, but code coverage remains poor and complex defects like timing-related issues are not uncovered

Engineering Contradiction:
Improvedefect detection capabilityVSAvoidcode coverage
Core Design Contradiction:
ReliabilityVSDifficulty of detecting and measuring

Solution Approach 1:

The system transitions to another dimension by transforming the program semantically rather than merely varying inputs. By creating variants with different control flow structures, variable declarations, and statement orders that preserve semantics, the testing process achieves deeper code coverage and detects complex defects including timing-related issues that conventional fuzz testing misses

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Reliability

If manual iterative testing is performed to improve defect detection, then more defects can be found, but the process becomes labor intensive and inefficient

Engineering Contradiction:
Improvedefect detection capabilityVSAvoidtesting efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system implements self-service by automatically generating semantically equivalent variants and performing comprehensive testing without requiring manual iterative intervention. The automated generation and testing process maintains high defect detection capability while significantly improving testing efficiency and reducing labor intensity

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS10997060B2Device, system, and method for detecting a defect in a computer program by generating and testing semantically equivalent computer program variants
Publication Date: 2021.05.04 THE UNITED STATES OF AMERICA AS REPRESENTED BY THE SECRETARY OF THE NAVY
  • US10997060B2 patent drawing
  • US10997060B2 patent drawing
  • US10997060B2 patent drawing

AI summary

Semantically equivalent variants of a computer program are generated by applying randomly selected transforms to the computer program. Unit tests are performed on the variants of the computer program to detect a defect in the computer program.