Event Handler Sequence Construction via Variable Pruning
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Constructing a target event handler sequence in event-driven programs is challenging due to the large number of possible sequences and the difficulty in identifying relevant event handlers that satisfy specific conditions, leading to increased computing time and resource usage.
Innovation Solution
A method is introduced to determine a variable and its associated condition in a target event handler, prune computation event handlers based on satisfaction of the condition, and insert navigation event handlers to construct the target event handler sequence efficiently, reducing the number of partial sequences to explore.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If all possible event handler sequences are explored to construct a target sequence, then the completeness of the solution is improved, but the computing time and resource usage increase significantly
Solution Approach 1:
The patent extracts and identifies only the relevant event handlers that can potentially contribute to the target event handler sequence. By determining variables read in the first event handler, conditions associated with those variables, and event handlers that write to those variables, the method extracts a subset of relevant event handlers from the complete set of all event handlers in the program, thereby reducing the search space without sacrificing completeness of the solution
Solution Approach 2:
The patent segments the event handler selection process into distinct stages: (1) determining variables read in the first event handler, (2) determining conditions associated with those variables, (3) identifying event handlers that write to those variables, and (4) pruning to select the final sequence. This segmentation allows systematic exploration of relevant sequences while avoiding exhaustive enumeration of all possible sequences
2Measurement precision
If all event handlers are considered in constructing the target sequence, then the accuracy of identifying relevant handlers is improved, but the complexity of the process increases
Solution Approach 1:
The patent applies local quality by focusing analysis on specific local properties of event handlers: which variables they read, which conditions they evaluate, and which variables they write to. Rather than analyzing all event handlers uniformly, the method identifies and analyzes only those event handlers that have local relationships (variable dependencies) with the first event handler and the target condition, thereby maintaining accuracy while reducing process complexity
3Reliability
If comprehensive analysis of all event handlers is performed to ensure correct sequence construction, then the reliability of the result is improved, but the resource usage increases
Solution Approach 1:
The patent performs preliminary actions by pre-determining the variables read in the first event handler and the conditions associated with those variables before analyzing all event handlers. By establishing these criteria in advance, the method creates a filtering framework that guides the subsequent analysis, ensuring reliability of the result while minimizing resource usage through targeted rather than exhaustive analysis
Data Source
AI summary
A method of constructing a target event handler sequence from an end target in an event-driven program may include determining a variable to be read in a first event handler of multiple event handlers in the event-driven program. Each of the event handlers may include portions of code within the event-driven program. The method may also include determining a condition in the first event handler that is associated with the variable and determining multiple second event handlers of the event handlers that are configured to write to the variable. The method may also include pruning the second event handlers based on which of the second event handlers are configured to write a value to the variable that satisfies the condition.


