Symbolic Type Constraints for Code Path Feasibility Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current software testing methods face challenges in achieving high code coverage, especially when dealing with objects having undefined classes, as they struggle to effectively identify and execute all possible execution paths, leading to incomplete defect detection.

Innovation Solution

The method involves generating execution paths through software code by adding symbolic type constraints and using a constraint solver to determine feasibility, discarding infeasible paths, and creating test cases for feasible paths, thereby increasing code coverage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional software testing methods are used to execute test cases, then testing can be performed with concrete variable values, but code coverage remains incomplete especially for objects with undefined classes

Engineering Contradiction:
Improvedefect detection capabilityVSAvoidcode coverage
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system performs preliminary symbolic execution before traditional testing to identify feasible execution paths. By analyzing path conditions and determining feasibility in advance, the system prepares a roadmap of testable paths, ensuring that subsequent concrete testing focuses only on achievable code sections, thereby improving overall code coverage while maintaining reliability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces symbolic execution as an intermediary between traditional test case execution and code coverage measurement. This intermediary layer analyzes path conditions and determines feasibility before concrete testing occurs, acting as a bridge that guides traditional testing methods to achieve better coverage without sacrificing defect detection capability

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If all possible execution paths are attempted to be executed, then code coverage increases, but computational resources are wasted on infeasible paths

Engineering Contradiction:
Improvecode coverageVSAvoidcomputational resource waste
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system performs preliminary feasibility analysis using symbolic execution before allocating computational resources to execute test cases. By evaluating path conditions and determining which execution paths are feasible in advance, the system avoids wasting computational energy on impossible paths while ensuring all feasible paths are covered

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Instead of attempting to execute all possible execution paths indiscriminately, the system applies partial action by focusing computational resources only on feasible paths identified through symbolic analysis. This selective approach achieves sufficient code coverage without the excessive computational waste of exploring infeasible paths

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If symbolic type constraints are added to analyze execution paths, then path feasibility can be determined accurately, but the complexity of the analysis system increases

Engineering Contradiction:
Improvepath feasibility determination accuracyVSAvoidanalysis system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent introduces symbolic type constraints as an intermediary mechanism that enables precise path feasibility determination without requiring complex analysis of every possible execution scenario. The symbolic constraints act as a filtering layer that simplifies the overall analysis by systematically eliminating infeasible paths through type-based reasoning

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system changes the parameter representation from concrete values to symbolic types during the analysis phase. This parameter transformation enables the system to determine path feasibility through symbolic constraint satisfaction rather than exhaustive concrete testing, improving accuracy while managing complexity through systematic symbolic manipulation

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9336128B2Method and system for code analysis using symbolic types
Publication Date: 2016.05.10 ORACLE INT CORP
  • US9336128B2 patent drawing
  • US9336128B2 patent drawing
  • US9336128B2 patent drawing

AI summary

A method for code analysis includes generating, by a computer processor, an execution path through software code. Generating the execution path includes adding, for an object having an undefined class, a first symbolic type constraint to a path condition of the first execution path based on a first statement in the execution path, and adding, for the object having the undefined class, a second symbolic type constraint to the path condition of the execution path based on a second statement in the first execution path. The method further includes the computer processor making a determination that the path condition of the execution path is infeasible based on the first symbolic type constraint of the object being inconsistent with the second symbolic type constraint of the object, and discarding the execution path based on the determination.