Code Path Permutation Reduction via Predicate Constraint Tracking

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for evaluating and optimizing code paths in computer programs are inefficient due to the exponential scaling of possible paths with the number of branches, making it impractical to exhaustively consider all possible data paths, especially when many paths are impossible or unexecuted.

Innovation Solution

The method involves tracking predicates and storing assumed constraints to eliminate impossible paths by duplicating the path visitor for each possible predicate value, allowing the traversal of only deterministic paths, thereby reducing the number of paths that need to be explored.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If all possible code paths are considered exhaustively, then complete code analysis is achieved, but the complexity and time required scale exponentially

Engineering Contradiction:
Improvecode analysis completenessVSAvoidpath exploration complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts and eliminates impossible code paths by tracking predicate constraints and removing paths that violate these constraints. This allows the system to focus only on feasible execution paths, reducing the exponential complexity while maintaining analysis completeness for actual executable paths.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary analysis by tracking predicate constraints before full path exploration. By determining which paths are impossible based on constraint tracking, the system prepares a filtered set of only possible paths to explore, avoiding the need to examine all exponential paths.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If all possible code paths are explored, then comprehensive testing coverage is achieved, but execution time increases exponentially

Engineering Contradiction:
Improvetesting coverageVSAvoidpath traversal time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent removes impossible paths from consideration by tracking predicate constraints. This extraction of infeasible paths allows testing to focus only on actually executable paths, maintaining comprehensive coverage for valid paths while dramatically reducing the time required compared to exhaustive exploration.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent changes the parameter of path feasibility by using constraint tracking to determine which paths are possible. This allows the testing system to adjust its exploration based on predicate constraint satisfaction, time-consuming paths that violate constraints are eliminated, reducing overall execution time while maintaining coverage for feasible paths.

Inventive Principle:
Principle #35Parameter changes

3Loss of information

If redundant path tracking is performed, then complete predicate analysis is achieved, but computational resources are wasted on impossible paths

Engineering Contradiction:
Improvepredicate analysis completenessVSAvoidcomputational resource consumption
Core Design Contradiction:
Loss of informationVSLoss of energy

Solution Approach 1:

The patent extracts and eliminates paths that fail to satisfy predicate constraints. By tracking constraints and removing impossible paths early in the analysis process, the system avoids wasting computational resources on paths that cannot be executed, while maintaining complete predicate analysis for feasible paths.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent performs preliminary constraint tracking to determine path feasibility before full analysis. This preliminary action identifies which paths should be discarded based on predicate constraints, preventing unnecessary computational resources from being consumed on impossible paths while preserving complete analysis of possible paths.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12106073B2Reducing code path permutations
Publication Date: 2024.10.01 SALESFORCE INC
  • US12106073B2 patent drawing
  • US12106073B2 patent drawing
  • US12106073B2 patent drawing

AI summary

Systems, methods, and computer-readable media are provided for reducing a number of potential code paths such that it is feasible to examine all possible code paths within source code. Source code may be received. The source code may be traversed such that the path is recorded. Predicates may cause the path to split such that both paths can be traversed with the result of the predicate stored such that the path does not need to split again when encountering a new predicate for which the stored predicate is determinative. The determined paths can then be used by applications.