hotspot tree traversal exception matching
To improve the matching of an exception with the provided abstract model a new algorithm is proposed. The search for a matching node is based on a tree traversal algorithm.
BACKGROUND
The current model is based on a linear matching of all guards in the model. The guards are the leafs of the tree and are indexed into a array. Properties of the incoming exceptions are processed against the regular expression provided in each guard for matching. If a guard match then the counting of the error is propagated to the full branch of the tree the guard belong. The mode support matching of several guards and do the proper counting accordingly. The search operates by checking every guard of the array one at a time in sequence . The performance of the matching is decrase with the size of the model and the number of guards.
NEW MODEL (Tree Traversal) To improve the performance for large abstract models a new tree traversal matching guard algorithm is proposed. In this model all nodes of the tree are guards. Such that is possible to perform a match of an exception on any node. The search for a matching node will start from the root node and its descendants. Such a model can be therefore optimize by providing a hierarchical sequence of regular expression in a proper taxonomy. The search is therefore limited to the node and their descendants that match well defined exception properties. Thus excluding nodes and their descendants early in the hierarchy that do no match the provided regular expressions. In practive a guard expression is re-distributed on the nodes of the tree branch by subsequent refinements. By default if the designer of the model do not provide a proper taxonomy, every intermediate will not match and the exception will fall in the 'other' box. This will force the designer to progressively refine the model with the proper taxonomy.