Program Debugging via Selected Code Portion Simulation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Debugging large programs is a time-consuming and tedious process that often requires extensive hours to identify and fix anomalies, with no guarantee that the exact scenario causing the bug will be reproduced, especially when re-compiling and simulating the entire program.
Innovation Solution
A method that allows selecting a specific portion of the program between trackable inputs and outputs, simulating its execution with recorded input data, and presenting information on an output device, enabling a 'slim' test environment to recreate and fix bugs efficiently, rather than debugging the entire program.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If the entire program is re-compiled and simulated to debug, then the bug scenario can be reproduced, but the debugging time becomes extremely long
Solution Approach 1:
The patent divides the entire program into multiple functional modules and allows users to select only the relevant module containing the bug for debugging. This segmentation enables focused simulation on specific portions of code rather than the entire program, significantly reducing compilation and simulation time while maintaining accurate bug reproduction for the selected module.
Solution Approach 2:
The patent extracts and isolates the specific module or code portion where the bug is suspected to occur, separating it from the rest of the program. By taking out only the necessary component for debugging and simulating it independently with relevant input data, the system achieves fast debugging without compromising the accuracy of bug scenario reproduction.
2Loss of time
If a small portion of the program is selected for debugging, then the debugging time is reduced, but it becomes difficult to reproduce the exact bug scenario
Solution Approach 1:
The patent performs preliminary actions by automatically collecting and storing all input data, execution traces, and contextual information from the original program execution before debugging begins. When a user selects a specific module for debugging, the system retrieves the pre-collected input data relevant to that module, ensuring that the exact bug scenario can be reproduced without requiring full program simulation.
Solution Approach 2:
The patent introduces an intermediary mechanism that bridges the selected module and the original execution context. This intermediary captures and preserves the input-output relationships and execution state from the full program run, allowing the isolated module to be simulated with accurate input data that reflects the actual bug scenario, thus maintaining reproduction reliability.
3Reliability
If the entire program is debugged, then all potential bugs can be found, but the process becomes tedious and time-consuming
Solution Approach 1:
The patent applies local quality by enabling different debugging approaches for different parts of the program. Users can apply comprehensive debugging to specific critical modules while using faster, targeted simulation for other modules. This allows thorough bug detection in areas where it matters most while maintaining ease of operation across the entire debugging process.
Solution Approach 2:
The patent implements partial action by allowing users to debug only the portions of the program that are necessary based on the suspected bug location. Instead of requiring complete program debugging, the system enables selective debugging of relevant modules with sufficient input data to reproduce and fix bugs, making the process less tedious while maintaining effectiveness.
Data Source
AI summary
A system and method of debugging a program may include obtaining a selection of a portion of the program which is between trackable inputs and outputs. The method may also include simulating an execution on the portion of the program, by providing input data via the inputs that was input through said inputs during a recorded execution of the program. The method may further include presenting information relating to the simulated execution on an output device.


