Journal "Software Engineering"
a journal on theoretical and applied science and technology
ISSN 2220-3397

Issue N5 2019 year

DOI: 10.17587/prin.10.195-203
Application of LP-Structures to Object-Oriented Code Refactoring
S. D. Makhortov, msd_exp@outlook.com, A. A. Nogikh, a.nogikh@yandex.ru, Voronezh State University, Voronezh, 394018, Russian Federation
Corresponding author: Makhortov Sergey D., Head of Department of Applied and System Software, Voronezh State University, Voronezh, 394018, Russian Federation, E-mail: msd_exp@outlook.com
Received on March 04, 2019
Accepted on March 20, 2019

The article describes an approach of automatized refactoring that adopts lattice-based algebraic structures as a model for type hierarchy presentation and optimization. A distinctive feature of the adopted algebraic structures is their ability to aggregate models not as a relation between two independent sets, but as a means of access to the services provided by the aggregated objects. This property makes it possible to perform a much deeper optimization of type hierarchy. The described refactoring approach focuses on redundant attributes removal and on the relocation of identical attributes into their common superclasses ("Pull Up Field" technique). The crucial requirement for these transformations is that such modifications must not change the external behavior of the software. Also it is important that such modifications do not increase the complexity of the source code e.g. by combining attributes with differing semantics. The proposed approach fulfills these requirements by defining a comprehensive classification of types and attributes. Such classification enables it to take into consideration the properties of individual types and the compatibility of individual attributes. An algorithm has been described that, given a type hierarchy with an already performed classification, returns a new type hierarchy alongside with a mapping between attributes of these hierarchies. The proposed approach employs only the most fundamental ideas of the Object-Oriented programming and does not depend on any specific programming language.

Keywords: refactoring, object-oriented programming, type hierarchy, LP-structures, automatization, software development tools
pp. 195–203
For citation:
Makhortov S. D., Nogikh A. A. Application of LP-Structures to Object-Oriented Code Refactoring, Programmnaya Ingeneria, 2019, vol. 10, no. 5, pp. 195—203
This work was funded by RFBR according to the research project 19-07-00037