Weighted Tree Search for Variable Name Ambiguity Resolution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Ambiguity in tree data structure searches occurs when multiple nodes contain the same value at equal distances from the context node, leading to ineffective search results, as existing methods fail to distinguish between these nodes.

Innovation Solution

The solution involves calculating weighted distances between the context node and candidate nodes, where upward steps contribute more significantly than downward steps, allowing for the selection of a specific node based on desired weighted distance, and storing these distances for efficient retrieval.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If tree traversal is performed to search for nodes containing a value, then all candidate nodes are examined, but ambiguity occurs when multiple nodes contain the same value at equal distances from the context node

Engineering Contradiction:
Improvesearch result distinctionVSAvoidsearch algorithm complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent changes the parameter used for measuring distance from a simple step count to a weighted distance that differentiates upward and downward steps. By assigning different weights to upward steps (moving toward root) and downward steps (moving toward leaves), the algorithm creates a nuanced distance metric that resolves ambiguities between nodes at the same graph distance from the context node.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If simple distance measurement is used to resolve ambiguity, then the calculation is straightforward, but nodes at equal distances cannot be distinguished

Engineering Contradiction:
Improvenode distinction capabilityVSAvoidsearch processing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent performs preliminary computation of weighted distances from the context node to all candidate nodes during the search process. By pre-calculating these weighted distances and storing them, the system eliminates the need for complex real-time distance calculations during ambiguity resolution, thereby reducing search processing time while maintaining precise node distinction capability.

Inventive Principle:
Principle #10Preliminary action

3Productivity

If tree traversal is performed for each search, then complete search results are obtained, but search efficiency decreases due to repeated traversals

Engineering Contradiction:
Improvesearch efficiencyVSAvoidsearch time
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent computes and stores weighted distances from the context node to all nodes in the tree during an initial traversal. These pre-computed weighted distances are then reused for multiple search operations, eliminating the need to perform complete tree traversals for each search. This preliminary computation significantly improves search efficiency and reduces search time for subsequent queries.

Inventive Principle:
Principle #10Preliminary action

4Loss of information

If all candidate nodes are returned in a search, then complete information is provided, but the result is ambiguous when multiple nodes contain the same value

Engineering Contradiction:
Improvesearch result clarityVSAvoidsearch result interpretation
Core Design Contradiction:
Loss of informationVSEase of operation

Solution Approach 1:

The patent introduces a weighted distance parameter that captures the structural relationship between nodes and the context node. By using this parameter to rank and distinguish candidate nodes, the system transforms ambiguous search results into ordered, interpretable results where nodes are differentiated by their positional characteristics in the tree structure.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS8700638B2Computer-implemented weighted tree search to resolve variable name ambiguity
Publication Date: 2014.04.15 LIBERA INC
  • US8700638B2 patent drawing
  • US8700638B2 patent drawing
  • US8700638B2 patent drawing

AI summary

Resolving ambiguous variable names in processing of a computer application includes representing variable declarations with dynamic variable scopes of the computer application in a tree data structure where the nodes of the tree data structure are variable names of the computer application. Ambiguous variable names are resolved by calculating distances between a context node and two or more candidate nodes of the tree data structure where each of the candidate nodes contains the searched variable name. The weighted distance between the context node and each candidate node equals the number of downward steps from the context node to the candidate node multiplied by a first constant plus the number of upward steps from the context node to the candidate node multiplied by a second constant. The node having a desired weighted distance is selected and information from the selected node is returned to the computer application as the variable value.