Shortest Unique Substring Debugging for Program Trace Analysis
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current debugging methods face challenges in efficiently identifying the specific sequence of instructions responsible for exceptions in computer programs, often requiring analysis of extensive traces and generating excessive information, which can overwhelm developers.
Innovation Solution
A method that determines and highlights the shortest unique substrings within a program trace, focusing on the ultimate shortest unique substring as the most likely cause of exceptions, thereby reducing the amount of information needed to diagnose errors and streamline the debugging process.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional debugging methods analyze extensive program traces to identify exception causes, then debugging accuracy is improved, but information overload and analysis complexity increase
Solution Approach 1:
The patent extracts only the essential and unique information from program traces by identifying shortest unique substrings that differentiate failing runs from successful runs. This extraction principle filters out redundant trace information while preserving the critical exception-causing sequences, thereby improving debugging accuracy without causing information overload
Solution Approach 2:
The patent segments the program trace into discrete instruction sequences and identifies the minimal unique substrings that characterize exception behavior. By dividing the trace into manageable segments and selecting only the distinguishing portions, the method reduces information complexity while maintaining diagnostic precision
2Reliability
If traditional debugging methods provide comprehensive trace information, then debugging completeness is improved, but developer cognitive load increases
Solution Approach 1:
The patent extracts only the critical exception-causing instruction sequences from comprehensive traces, presenting to developers minimal yet complete information about the exception source. This extraction reduces cognitive load by filtering out irrelevant details while preserving the essential debugging information needed for reliable bug identification
3Difficulty of detecting and measuring
If debugging tools generate detailed execution traces, then error detection capability is improved, but computational overhead increases
Solution Approach 1:
The patent extracts only the essential distinguishing features from execution traces by identifying shortest unique substrings. This extraction approach maintains error detection capability by preserving the critical exception-causing sequences while significantly reducing computational overhead through minimal data processing and comparison operations
Solution Approach 2:
The patent applies partial action by generating and analyzing only the necessary portion of trace information required for exception detection. Instead of processing complete detailed traces, the method processes minimal unique substrings, thereby maintaining error detection capability while reducing computational overhead through selective rather than exhaustive analysis
Data Source
Figure 1~2
Figure 3
Figure 4
AI summary
A method for debugging a computer program is proposed. The method comprises: running at least part of said computer program on a computer (2.1), thereby prompting said computer to execute a sequence of instructions (ABDACDABCD) and to generate a trace (ABDACDABCD) corresponding to said executed sequence of instructions; and, when said program has generated an exception, selecting a set of one or more exception strings (BD, AC, BC, ABD, BDA, DAC, ACD, DAB, ABC, BCD) on the basis of said trace, so that each of said exception strings is a unique substring of said trace (2.2); and indicating said exception strings to a user or to a debugging tool (2.3). The set of exception strings may notably include the ultimate shortest unique substring (BC) of said trace. A computer program product is also described.