![]() |
ИСТИНА |
Войти в систему Регистрация |
ИСТИНА ЦЭМИ РАН |
||
An approach of automatized object-oriented code refactoring is described that applies lattice-based algebraic structures for type hierarchy representation and op-timization. A distinctive feature of these algebraic structures is their ability to model aggregation not as a relation between two independent sets of types and at-tributes, but as a relation between two specific types. The property makes it possible to perform a more careful optimization of type hierarchy. The described approach focuses on redundant attributes removal and on the relocation of identical attributes into their common superclasses (“Pull Up Field” technique). In this paper it is demonstrated how the adopted algebraic structures can be extended to model a wide range of type hierarchies. Also, they are shown to be able to perform transformations allowing for external constraints. Such constraints may represent some additional knowledge of the type hierarchy or of the refactoring process itself. The described approach employs only the fundamental ideas of object-oriented programming. Supplemented with language-specific features it may be used as a basis for building intellectual systems that facilitate object-oriented code refactoring.