Multi-objective Integer Linear Programming approach for Automatic Software Cognitive Complexity Reduction
Adriana Novoa-Hurtado, Rub\'en Saborido, Francisco Chicano, Manuel Gim\'enez-Medina

TL;DR
This paper presents a multi-objective integer linear programming model to optimize code refactoring for reducing software cognitive complexity, balancing code simplicity and size, validated through algorithms integrated into a practical tool.
Contribution
It introduces a novel multi-objective ILP approach for automatic code refactoring aimed at reducing cognitive complexity, with algorithms and a tool for practical application.
Findings
The ILP model effectively balances code size and complexity.
Algorithms successfully generate multiple optimal refactoring solutions.
The tool facilitates parameterized complexity reduction in real-world code.
Abstract
Clear and concise code is necessary to ensure maintainability, so it is crucial that the software is as simple as possible to understand, to avoid bugs and, above all, vulnerabilities. There are many ways to enhance software without changing its functionality, considering the extract method refactoring the primary process to reduce the effort required for code comprehension. The cognitive complexity measure employed in this work is the one defined by SonarSource, which is a company that develops well-known applications for static code analysis. This extraction problem can be modeled as a combinatorial optimization problem. The main difficulty arises from the existence of different criteria for evaluating the solutions obtained, requiring the formulation of the code extraction problem as a multi-objective optimization problem using alternative methods. We propose a multi-objective…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Cognitive Computing and Networks · Software Reliability and Analysis Research
