Variable Origin Tracing in Software Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Software debugging systems face challenges in efficiently tracing the origin and propagation of variable values within complex applications, making it difficult for developers to identify the source of issues in source code.

Innovation Solution

The software identifies a target variable and automatically processes source code statements to determine if it involves direct or indirect assignments, tracing the value's origin through the call stack, allowing for the identification of the statement where the value was first assigned, even if it involves method calls or external sources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If developers manually trace variable values through complex source code, then they can identify the origin of values, but the time and effort required increases significantly

Engineering Contradiction:
Improveability to identify variable originVSAvoidtime to trace variable values
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system pre-computes and stores variable origin information in a call stack data structure during normal program execution. When a debugging query is made, the pre-computed information is immediately retrieved rather than requiring real-time manual tracing, thus resolving the contradiction between accurate identification and time consumption.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent introduces a call stack as an intermediary data structure that captures variable assignment information during execution. This intermediary stores the propagation path of variable values, allowing developers to query origins without manually tracing through complex code, thereby reducing time while maintaining precision.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Measurement precision

If developers examine all source code statements to find variable origins, then they can locate the source, but the complexity of the task increases

Engineering Contradiction:
Improveaccuracy of locating variable sourceVSAvoidcomplexity of debugging process
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent segments the debugging task into two parts: (1) automatic capture of variable assignment information during normal execution and storage in a call stack, and (2) simple query of pre-computed information. This segmentation reduces the complexity of the debugging process while maintaining accurate location of variable sources.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs self-service by automatically tracking and recording variable origin information during program execution without requiring developer intervention. The call stack autonomously captures assignment paths, freeing developers from the complex task of manual tracing while ensuring accurate source location.

Inventive Principle:
Principle #25Self-service

3Loss of information

If the system tracks all variable assignments throughout the application, then it can provide complete origin information, but the memory and processing requirements increase

Engineering Contradiction:
Improvecompleteness of variable origin dataVSAvoidmemory resources required
Core Design Contradiction:
Loss of informationVSQuantity of substance

Solution Approach 1:

The patent extracts only the essential variable origin information needed for debugging into a call stack data structure. Rather than storing complete program state or all possible variable assignments, it selectively captures assignment paths for variables that are actually queried during debugging, thus reducing memory requirements while maintaining information completeness for relevant variables.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS9632910B2System and method for software debugging using variable location
Publication Date: 2017.04.25 SAP SE
  • US9632910B2 patent drawing
  • US9632910B2 patent drawing
  • US9632910B2 patent drawing

AI summary

This disclosure provides software that identifies a variable in a computer program as a target variable. The software automatically processes a first source code statement in the computer program for the target variable. The software determines if the target variable is not found in the particular processed statement and progresses through preceding statements until the target variable is found. The software determines if the particular statement involves an indirect assignment to the target variable and can return that particular statement as the origination statement. Additionally, the software determines if the particular statement involves a direct assignment to the target variable from a second variable. If the particular statement involves a direct assignment to the target variable from a second variable, the software can change the target variable to the second variable and can progress through preceding statements until the new target variable is found in a particular of the statements.