Backward Slicing Symbol Database Linear Complexity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for backward slicing in large computer programs are inefficient due to high time and memory requirements, making them unsuitable for programs exceeding 200,000 lines of code, as they involve constructing detailed system dependence graphs with cubic time complexity and quadratic memory usage.

Innovation Solution

A method that generates a symbol database with reference lists for used symbols, allowing for recursive analysis of dependencies, reducing the complexity to linear time and memory usage by focusing on relevant code sections, and utilizing a tokenized representation for faster analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If a system dependence graph is constructed to enable backward slicing, then dependency analysis capability is improved, but time complexity increases to cubic and memory usage increases to quadratic

Engineering Contradiction:
Improvedependency analysis capabilityVSAvoidtime complexity
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent extracts only the necessary dependency information needed for backward slicing, rather than constructing the complete system dependence graph. It extracts symbol usage locations and direct dependencies from the source code, eliminating the need to model all control-flow and data-flow relationships throughout the entire program. This selective extraction reduces time complexity from cubic to linear while maintaining sufficient dependency analysis capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses simple data structures (symbol tables mapping symbols to usage locations and direct dependency lists) instead of complex system dependence graphs. These lightweight structures are sufficient for backward slicing and can be constructed efficiently in linear time, replacing the heavy quadratic/cubic complexity of traditional approaches.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

2Reliability

If a system dependence graph is constructed to enable backward slicing, then dependency analysis capability is improved, but memory requirements increase to quadratic

Engineering Contradiction:
Improvedependency analysis capabilityVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent extracts only the necessary dependency information needed for backward slicing, rather than constructing the complete system dependence graph. It extracts symbol usage locations and direct dependencies from the source code, eliminating the need to model all control-flow and data-flow relationships throughout the entire program. This selective extraction reduces memory requirements from quadratic to linear while maintaining sufficient dependency analysis capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent uses simple data structures (symbol tables mapping symbols to usage locations and direct dependency lists) instead of complex system dependence graphs. These lightweight structures are sufficient for backward slicing and can be constructed efficiently in linear time, replacing the heavy quadratic/cubic complexity of traditional approaches.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

3Reliability

If traditional backward slicing methods are used on large programs, then analysis completeness is improved, but execution time becomes prohibitively long

Engineering Contradiction:
Improveanalysis completenessVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the dependency analysis into discrete symbol-level units. Instead of analyzing the entire program at once through complex graph construction, it processes the program by identifying individual symbols and their direct dependencies. This segmentation enables linear-time processing while maintaining complete analysis of all symbols that affect the target variable.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary symbol extraction and dependency identification during a single linear-time pass through the source code. By pre-building the symbol table and direct dependency lists in this initial pass, the system prepares all necessary information for backward slicing without requiring subsequent complex graph construction or multiple analysis passes.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS9164742B2Method and a system for searching for parts of a computer program which affects a given symbol
Publication Date: 2015.10.20 LUTRON TECHNOLOGY COMPANY LLC
  • US9164742B2 patent drawing
  • US9164742B2 patent drawing
  • US9164742B2 patent drawing

AI summary

The present invention relates to a method and system for searching for parts of a computer program which affects a given symbol. The system comprises a first data storage area (1) for storing a symbol database including information on names of symbols, such as variables and functions, used in the computer program, and including, in connection to each symbol, a reference list including references to locations in the computer program where the symbol is used, a second data storage area (2) for storing a result list, and a search module (6) configured to in response to a request for information on which parts of the computer program affect a given symbol: a) retrieve the list of references for the symbol from the data-base, and store at least some of the references in the result list, b) analyze the program code or a representation of the program code on the location pointed out by the stored references, and based thereon determine whether the value of the symbol depends on any other symbol or symbols, and if the analysis discovers that the value of the symbol depends on any other symbol or symbols the steps a-b are repeated in a recursive manner for the discovered symbol or symbols until the analysis reveals that the value of the symbol does not depend on any further symbol, and to produce information on which parts of the computer program affects the symbol based on the references stored in the result list.