Patent Document ID: 5428788
Application ID: 08072656
Patent Flag: 1

Claim One:
1. In a computer system operating with computer system software including at least a first software object "A" and a second software object "B", a computer-implemented method for implementing structural changes in said computer system software in accordance with a measured similarity between said software objects A and B, said software objects A and B comprising static declaration units of a program and having non-local identifiers that designate them, wherein said software objects A and B are declared to be within said program, and wherein said similarity is indicative of a similarity function having a coefficient k controlling how important an invoker-invokee relationship is in computing similarity, relative to the importance of having common features, a coefficient d controlling relative importance of common and distinctive features of said software objects A and B, a coefficient n controlling how sensitive similarity is to total weight of the common features, said method comprising the steps of: (a) designating bias multipliers for predetermined features of said software objects A and B, each of said predetermined features having a weight assigned thereto, each said bias multiplier comprising a feature name and a positive number; (b) using a conventional cross-reference extractor to identify all of the software objects declared in said system, to generate a unique name for each non-local identifier, and to locate each occurrence of a non-local identifier; (c) for each occurrence of a non-local identifier, determining a unique name of the identifier, herein referred to as "Y", and a unique name of the software object wherein it occurs, herein designated "X" and assigning to "X" the feature "uses-Y", and assigning to "Y", if it is a software object, the feature "used-by-X" and if one of X and Y already had the feature just assigned to it, not duplicating these feature assignments; (c') determining a value of Linked (A,B) by setting it equal to 1 if A has a feature "uses-B" or B has a feature "uses-A"; otherwise (d) to each feature named in step (c), herein designated "f", assigning a weight W.sub.f ; (e) for each bias multiplier specified in the input, recomputing the weight of said predetermined feature associated therewith by multiplying its Shannon information content by the associated bias multiplier; (f) comparing the features of said software objects A and B, in order to divide them into three sets, a first set being the features that both A and B have, a second set being the features that A has and B does not, and a third set being the features that B has and A does not; (g) computing sums of the weights of the features in each of said three sets, denoted as, W(A.andgate.B), W(A-B), and (W(B-A), respectively; (h) computing the similarity of A and B by a monotonic, matching function augmented by a term to account for linking, which must also satisfy the constraint that if the set is empty, and neither object uses the name of the other object, the similarity is 0; ##EQU4## (i) implementing structural changes in the computer system software in accordance with the computed similarity.