METHOD AUTOMATED CLASS CONVERSION FOR COMPOSITION IMPLEMENTATION

Authors

  • O. B. Kungurtsev Odessа Polytechnic National University, Odessa, Ukraine, Ukraine
  • V. R. Bondar Odessа Polytechnic National University, Odessa, Ukraine , Ukraine
  • K. O. Gratilova Odessа Polytechnic National University, Odessa, Ukraine , Ukraine
  • N. O. Novikova Odessa National Maritime University, Odessa, Ukraine, Ukraine

DOI:

https://doi.org/10.15588/1607-3274-2024-2-14

Keywords:

object-oriented programming, classes, composition, syntactic analysis, class transformation

Abstract

Context. Using the composition relation is one of the most effective and commonly used ways to specialize classes in object-oriented programming.

Objective. Problems arise when “redundant” attributes are detected in an inner class, which are not necessary for solving the tasks of a specialized class. To work with such attributes, the inner class has corresponding program methods, whose usage not only does not solve the tasks of the specialized class, but can lead to errors in its work. The purpose of this work is to remove “redundant” attributes from the inner class, as well as all methods of the class directly or indirectly (through other methods) using these attributes.

Method. A mathematical model of the inner class was developed, which allowed us to identify “redundant” elements of the class. The method of internal class transformation is proposed, which, based on the analysis of the class code, provides the developer with information to make a decision about “redundant” attributes, and then in the automated mode gradually removes and transforms the class elements.

Result. To approbate the proposed solutions, a software product Composition Converter was developed. Experiments were carried out to compare the conversion of classes in “manual” and automated modes. The results showed a multiple reduction of conversion time in the automated mode.

Conclusions. The proposed method of automated transformation of the inner class according to the tasks of the outer class when implementing composition allows to significantly reduce the time or the number of errors when editing the code of the inner class. The method can be used for various object-oriented languages.

Author Biographies

O. B. Kungurtsev, Odessа Polytechnic National University, Odessa, Ukraine

PhD, Professor, Professor of the Software Engineering Department

V. R. Bondar, Odessа Polytechnic National University, Odessa, Ukraine

Student of the Software Engineering Department

K. O. Gratilova, Odessа Polytechnic National University, Odessa, Ukraine

Student of the Software Engineering Department

N. O. Novikova, Odessa National Maritime University, Odessa, Ukraine

PhD, Associate Professor of the Department of Technical Cybernetics and Information Technologies named after professor R. V. Merct

References

Forouzan B. A., Gilberg R. C++ Programming: An ObjectOriented Approach. McGraw-Hill Education, 2019, 960 р. https://www.booksfree.org/wp-content/uploads/2022/02/CProgramming-An-Object-Oriented-Approach-BehrouzForouzan.pdf

Lee G. Modern Programming: Object Oriented Programming and Best Practices. Packt Publishing, 2019, 266 p.

Kanjilal J. Composition vs. inheritance in OOP and C# [Electronic resource], InfoWord, 2023. Access mode: https://www.infoworld.com/article/3699129/composition-vsinheritance-in-oop-and-c-sharp.html

Kungurtsev O., Bondar V., Gratilova K. Tranforming Classes for Composition Implementation, Modern research in science and education: The 2nd International scientific and practical conference, Chicago, USA, 12–14 October 2023: proceedings. Chicago, BoScience Publisher, 2023, pp. 143–148. ISBN 978-1-73981-123-5

Talcott C., Heinrich R., Duran F. et al. Composition of Languages, Models, and Analyses. New York, Springer, 2021, 311 p.

Kihlman L. Framework for Composition of Domain Specific Languages and the Effect of Composition on Re-use of Translation Rules: abstract of the dissertation … doctor of philosophy in computer science. Essex, University of Essex, 2021, 69 p.

Pfeiffer J., Rumpe B., Schmalzing D. et al. Composition operators for modeling languages: A literature review, Journal of Computer Languages, 2023, Vol. 76, P. 101226

Zhang W., Sun Y., Oliveira B. C. Compositional Programming, ACM Transaction on Programming Lanquages and Systems, 2021, Vol. 43, pp. 1–61 https://doi.org/10.1145/3460228

Nero R. Java inheritance vs. composition: How to choose [Electronic resource], InfoWord, 2020. Access mode: https://www.infoworld.com/article/3409071/javachallenger-7-debugging-java-inheritance.html

Wang L., Du X., Jiang B. et al. KEADA: Identifying Key Classes in Software Systems Using Dynamic Analysis and Entropy-Based Metrics, PubMed, 2022,Vol. 24, № 5, P. 652 DOI: 10.3390/e24050652

Rashidi H., Azadi F. On Attributes of Objects in ObjectOriented Software Analysis, International Journal of Industrial Engineering & Production Research, 2019, Vol. 30, pp. 341–352. DOI: 10.22068/ijiepr.30.3.341

Kungurtsev O., Novikova N., Reshetnyak M. et al. Method for defining conceptual classes in the description of use cases, Photonics Applications in Astronomy, Communications, Industry, and High-Energy Physics Experiments. Vilga, 6 November 2019, proceedings, SPIE P. 11176 doi: 10.1117/12.2537070

Kungurtsev O. B., Vytnova A. I. Determination of inheritance relations and restructuring of software class models in the process of developing information systems, Radio Electronics, Computer Science, Control, 2022, № 4(63), pp. 98–107.

Slivnik B., Mernik M. On Parsing Programming Languages with Turing-Complete Parser, Mathematics, 2023, Vol. 11, Issue 7. https://doi.org/10.3390/math11071594

Slivnik B. Context-sensitive parsing for programming languages, Journal of Computer Languages, 2022, Vol. 73, P. 101172. https://doi.org/10.1016/j.cola.2022.101172

Sudheer N., Hrushikesava S. Different Approach Analysis for Static Code in Software Development, International Journal of Computer Sciences and Engineering, 2016, Vol. 4 (9), pp. 111–118.

Wojszczyk R., Hapka A., Królikowski T. Performance analysis of extracting object structure from source code, 27th International Conference on Knowledge Based and Intelligent Information and Engineering Sytems (KES 2023), 2023 : proceedings, Procedia Computer Science, 2023, Vol. 225, pp. 4065–4073. https://doi.org/10.1016/j.procs.2023.10.402

Kaur S., Singh P. How does object-oriented code refactoring influence software quality? Research landscape and challenges, Journal of Systems and Software, 2019, Vol. 157, P. 110394. https://doi.org/10.1016/j.jss.2019.110394

Wedyan F., Abufakher S. Impact of design patterns on software quality: a systematic literature review, IET Software, 2020, Vol. 14, Issue 1, pp. 1–17. https://doi.org/10.1049/iet-sen.2018.5446

Downloads

Published

2024-06-27

How to Cite

Kungurtsev, O. B., Bondar, V. R., Gratilova, K. O., & Novikova, N. O. (2024). METHOD AUTOMATED CLASS CONVERSION FOR COMPOSITION IMPLEMENTATION . Radio Electronics, Computer Science, Control, (2), 142. https://doi.org/10.15588/1607-3274-2024-2-14

Issue

Section

Progressive information technologies