Semantics-based composition of class hierarchies
First Claim
1. A method on an information processing device for reporting any behavioral differences after composing two or more class hierarchies 1 and 2 with associated applications A1 and A2 respectively, the method on the information processing device comprising:
- creating a composed hierarchy 3 by analyzing a hierarchy 1 and a hierarchy 2;
creating well-defined methods and/or fields in one or more classes of the hierarchy 3 by analyzing the hierarchy 1 and the hierarchy 2 and user-supplied information;
associating a definition of a method M in a class D in a hierarchy with each executed call to a definition of a method M′
in a class C in the hierarchy where class D is a subtype of class C in a behavior in the hierarchy for each of an application A1 and an application A2, wherein the method M and the method M′
have an identical signature;
testing if two behaviors across the hierarchy 1 and the hierarchy 3 are different by comparing a behavior B3 of the application A1 in the composed hierarchy 3 with a behavior B1 of the application A1 in the hierarchy 1 and reporting any differences therebetween; and
testing if two behaviors across the hierarchy 2 and the hierarchy 3 are different by comparing a behavior B4 of the application A2 in the composed hierarchy 3 with a behavior B2 of the application A2 in the hierarchy 2 and reporting any differences therebetween.
1 Assignment
0 Petitions
Accused Products
Abstract
A system, method and computer readable medium for providing class hierarchy composition aims at constructing software systems by composing a set of class hierarchies into an executable system. Current composition algorithms cannot provide semantic guarantees. The present invention provides a composition algorithm, together with an interference criterion and its correctness proof, which guarantees that behavior of the original hierarchies is preserved for interference-free compositions. In case of interference, an impact analysis can determine the consequences of integration. The method is based on existing program analysis technology and is illustrated by various examples.
31 Citations
29 Claims
-
1. A method on an information processing device for reporting any behavioral differences after composing two or more class hierarchies 1 and 2 with associated applications A1 and A2 respectively, the method on the information processing device comprising:
-
creating a composed hierarchy 3 by analyzing a hierarchy 1 and a hierarchy 2; creating well-defined methods and/or fields in one or more classes of the hierarchy 3 by analyzing the hierarchy 1 and the hierarchy 2 and user-supplied information; associating a definition of a method M in a class D in a hierarchy with each executed call to a definition of a method M′
in a class C in the hierarchy where class D is a subtype of class C in a behavior in the hierarchy for each of an application A1 and an application A2, wherein the method M and the method M′
have an identical signature;testing if two behaviors across the hierarchy 1 and the hierarchy 3 are different by comparing a behavior B3 of the application A1 in the composed hierarchy 3 with a behavior B1 of the application A1 in the hierarchy 1 and reporting any differences therebetween; and testing if two behaviors across the hierarchy 2 and the hierarchy 3 are different by comparing a behavior B4 of the application A2 in the composed hierarchy 3 with a behavior B2 of the application A2 in the hierarchy 2 and reporting any differences therebetween. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A method on an information processing device of composing two or more input class hierarchies 1 and 2 with associated applications A1 and A2 respectively, the method on the information processing device comprising:
-
determining a union of any inheritance relations in two or more input class hierarchies 1 and 2; determining one or more cycles in a transitive closure of the inheritance relations, and constructing a set of equivalence classes ε
corresponding to the cycles;creating of a class in a composed hierarchy 3 for each equivalence class in ε
;associating a definition of a method M in a class D in a hierarchy with each executed call to a definition of a method M′
in a class C in the hierarchy where class D is a subtype of class C in a behavior in the hierarchy for each of an application A1 and an application A2, wherein the method M and the method M′
have an identical signature;associating a name and a set of members with each class in the composed hierarchy 3; creating inheritance relations in the composed hierarchy 3; testing if two behaviors across the hierarchy 1 and the hierarchy 3 are different by comparing a behavior of the application A1 in the composed hierarchy 3 with a behavior of the application A1 in the hierarchy 1, and reporting any differences therebetween; and testing if two behaviors across the hierarchy 2 and the hierarchy 3 are different by comparing a behavior of the application A2 in the composed hierarchy 3 with a behavior of the application A2 in the hierarchy 2, and reporting any differences therebetween. - View Dependent Claims (13)
-
-
14. A physical computer readable medium including computer instructions for execution on an information processing device for composing two or more class hierarchies 1 and 2 with associated applications A1 and A2 respectively, the computer instructions comprising programming instructions for:
-
creating a composed hierarchy 3 by analyzing a hierarchy 1 and a hierarchy 2; creating well-defined methods and/or fields in one or more classes of the hierarchy 3 by analyzing the hierarchy 1 and the hierarchy 2 and user-supplied information; associating a definition of a method M in a class D in a hierarchy with each executed call to a definition of a method M′
in a class C in the hierarchy where class D is a subtype of class C in a behavior in the hierarchy for each of an application A1 and an application A2, wherein the method M and the method M′
have an identical signature;testing if two behaviors across the hierarchy 1 and the hierarchy 3 are different by comparing a behavior B3 of the application A1 in the composed hierarchy 3 with a behavior B1 of the application A1 in the hierarchy 1 and reporting any differences therebetween; and testing if two behaviors across the hierarchy 2 and the hierarchy 3 are different by comparing a behavior B4 of the application A2 in the composed hierarchy 3 with a behavior B2 of the application A2 in the hierarchy 2, and reporting any differences therebetween. - View Dependent Claims (15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A physical computer readable medium including computer instructions for execution on an information processing device for composing two or more class hierarchies 1 and 2 with associated applications A1 and A2 respectively, the computer instructions comprising instructions for:
-
determining a union of any inheritance relations in two or more input class hierarchies 1 and 2; determining one or more cycles in a transitive closure of the inheritance relations, and constructing a set of equivalence classes ε
corresponding to the cycles;associating a name and a set of members with each class; creating inheritance relations in the composed hierarchy 3; associating a definition of a method M in a class D in a hierarchy with each executed call to a definition of a method M′
in a class C in the hierarchy where class D is a subtype of class C in a behavior in the hierarchy for each of an application A1 and an application A2, wherein the method M and the method M′
have an identical signature;creating of a class in a composed hierarchy 3 for each equivalence class in ε
;
testing if two behaviors across the hierarchy 1 and the hierarchy 3 are different by comparing a behavior B3 of the application A1 in the composed hierarchy 3 with a behavior B1 of the application A1 in the hierarchy 1 and reporting any differences therebetween; andtesting if two behaviors across the hierarchy 3 and the hierarchy 3 are different by comparing a behavior b4 of the application A2 in the composed hierarchy 3 with a behavior B2 of the application A2 in the hierarchy 2, and reporting any differences therebetween. - View Dependent Claims (26)
-
-
27. A computer system for composing two or more class hierarchies 1 and 2 with associated applications A1 and A2 respectively, the computer system comprising:
-
a processor coupled to memory for executing a software program to perform;
means for creating a composed hierarchy 3 by analyzing a hierarchy 1 and a hierarchy 2;means for creating well-defined methods and/or fields created in one or more classes of the hierarchy 3 by analyzing the hierarchy 1 and the hierarchy 2 and user-supplied information; means for associating a definition of a method M in a class D in a hierarchy with each executed call to a definition of a method M′
in a class C in the hierarchy where class D is a subtype of class C in a behavior in the hierarchy for each of an application A1 and an application A2, wherein the method M and the method M′
have an identical signature;means for testing if two behaviors across the hierarchy 1 and the hierarchy 3 are different by comparing a behavior B3 of the application A1 in the composed hierarchy 3 with a behavior B1 of the application A1 in the hierarchy 1 and reporting any differences therebetween; and means for testing if two behaviors across the hierarchy 2 and the hierarchy 3 are different by comparing a behavior B4 of the application A2 in the composed hierarchy 3 with a behavior B2 of the application A2 in the hierarchy 2, and reporting any differences therebetween. - View Dependent Claims (28, 29)
-
Specification