Debugging Method Using Recorded Execution Replay

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional debugging methods require multiple iterations of adding print instructions, re-compilation, and re-execution, which are time-consuming and can affect error reproducibility due to changes in the program environment, and may alter the manifestation of asynchronous events.

Innovation Solution

A method that generates an output log by evaluating additional print instructions based on a recorded execution, allowing the print instructions to be inserted into the log as if they were part of the original execution, ensuring consistent error identification without re-executing the program, using an intermediate data structure to cache and efficiently store output from existing print instructions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If multiple iterations of adding print instructions, re-compilation and re-execution are performed, then the source of error can be accurately identified, but the time required for debugging increases substantially

Engineering Contradiction:
Improveerror identification accuracyVSAvoiddebugging time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent records the execution state (register values, memory contents, instruction pointers) during the original program execution before any debugging modifications are made. This preliminary capture of execution state allows subsequent analysis without requiring re-execution, thereby eliminating the time-consuming iterative re-compilation and re-execution process while maintaining accurate error identification capability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates a copy of the execution state by recording all relevant program variables, register values, and memory contents during the original execution. This recorded execution state serves as a snapshot that can be analyzed repeatedly without affecting the original program or requiring time-consuming re-executions, thus resolving the contradiction between accurate error identification and debugging time

Inventive Principle:
Principle #26Copying

2Loss of information

If print instructions are added to the source code, then program behavior can be analyzed to determine error source, but the timing of asynchronous events may be affected causing errors to disappear or manifest differently

Engineering Contradiction:
Improveprogram behavior informationVSAvoiderror reproducibility
Core Design Contradiction:
Loss of informationVSReliability

Solution Approach 1:

The patent extracts the essential debugging information (variable values, register states, memory contents) from the original program execution and stores it in a recorded execution state. This extraction eliminates the need to add print instructions to the source code, thereby preventing any interference with the original program timing and asynchronous events while still providing comprehensive program behavior analysis capability

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent introduces a recording mechanism as an intermediary that captures execution state without modifying the original program flow. This intermediary recording process occurs transparently during execution and allows subsequent analysis of the captured state without requiring the program to be re-executed with debug modifications, thus maintaining both information completeness and error reproducibility

Inventive Principle:
Principle #24Intermediary (Mediator)

3Measurement precision

If the program is re-executed multiple times with different print instructions, then the error source can be narrowed down, but the program environment changes affecting error reproducibility

Engineering Contradiction:
Improveerror localization precisionVSAvoidprogram environment consistency
Core Design Contradiction:
Measurement precisionVSStability of the object's composition

Solution Approach 1:

The patent performs preliminary recording of the complete program execution state including all environmental conditions, variable values, and system states during the original execution. This preliminary capture preserves the exact program environment composition, allowing multiple analyses with different query parameters without requiring re-execution that would alter environmental conditions, thus maintaining both error localization precision and environment stability

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11030076B2Debugging method
Publication Date: 2021.06.08 UNDO
  • US11030076B2 patent drawing
  • US11030076B2 patent drawing
  • US11030076B2 patent drawing

AI summary

A method of generating an output log for analysis of a computer program, the method comprising: receiving a recording of an execution of the program; receiving an additional print instruction to print a value of a data item and an indication of a point in the program at which the additional print instruction is to be evaluated; determining a corresponding point in the recording of the execution based upon the indication of the point in the program; and evaluating the additional print instruction based upon the recording of the execution and the determined corresponding point to determine an output of the additional print instruction for insertion into the output log.