Execution-Centric Source Code Reconstruction for Debugging

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Debugging software programs is challenging due to the difficulty in determining the correct execution sequence of code, as existing tools only provide insights into the current program state and execution call trees, which are insufficient for identifying the root cause of complex problems.

Innovation Solution

Reconstructing source code in an execution-centric format using trace data to display the actual order of code execution, including symbols for execution flow and overlaying events that occurred at specific points in time, allowing users to visualize the execution path and connections.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of information

If traditional debugger tools are used to step through code and view current program state, then developers can observe variable states and stack information, but they cannot accurately determine the actual execution sequence and path taken by the program

Engineering Contradiction:
Improveexecution sequence informationVSAvoiddebugging difficulty
Core Design Contradiction:
Loss of informationVSEase of operation

Solution Approach 1:

The system performs preliminary actions by collecting trace data during program execution and reconstructing the execution sequence before the debugging session begins. This allows the execution path to be pre-computed and displayed, eliminating the need for developers to manually trace through code during debugging.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system creates a copy of the execution sequence information from the original program run and presents it in a reconstructed format that shows the actual path taken. This copy preserves the historical execution data without requiring the original program to be re-executed or modified.

Inventive Principle:
Principle #26Copying

2Measurement precision

If execution call trees are displayed to show the sequence of functions executed, then developers can see function-level execution order, but they lack insight into the detailed actions and statements within functions that cause problems

Engineering Contradiction:
Improveexecution detail granularityVSAvoiddebugging tool complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The system segments the execution information into hierarchical levels: function-level calls and statement-level actions within each function. This segmentation allows developers to view details at the appropriate granularity without being overwhelmed by all execution data simultaneously.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system adds a new dimension to execution visualization by displaying not just the sequence of function calls but also the specific statements executed within each function. This multi-dimensional view combines call tree structure with detailed statement-level trace information.

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

3Reliability

If the program stack is examined to look back at previous program states, then developers can see clues about prior states, but the stack is only valid for the current stopped state and does not provide complete execution history

Engineering Contradiction:
Improveexecution history accuracyVSAvoidtime to identify root cause
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system provides feedback by continuously collecting and storing execution trace data throughout program runtime, creating a complete historical record that can be queried and displayed during debugging sessions. This feedback loop ensures accurate reconstruction of any previous state.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The execution history is pre-computed and stored during normal program execution, so when debugging is needed, the complete execution path is already available for immediate display without requiring time-consuming re-analysis or re-execution.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8091074B2Execution-centric source code view
Publication Date: 2012.01.03 MICROSOFT TECHNOLOGY LICENSING LLC
  • US8091074B2 patent drawing
  • US8091074B2 patent drawing
  • US8091074B2 patent drawing

AI summary

Various technologies and techniques are disclosed for providing an execution-centric view of source code. Source code is reconstructed in an execution-centric format from a prior execution of an application. Trace data is used to determine which code addresses were executed during a prior execution of an application. Addresses in the trace data are mapped back to source code to reconstruct the source code in the execution order. The source code is then displayed in the execution-centric format. Other events that occurred at different points in time can be overlaid in the display of the execution-centric source code.