Multi-objective Integer Linear Programming approach for Automatic Software Cognitive Complexity Reduction

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Novoa-Hurtado, Adriana, Saborido, Rubén, Chicano, Francisco, Giménez-Medina, Manuel
Formato: Preprint
Publicado: 2026
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866908796594421760
author Novoa-Hurtado, Adriana
Saborido, Rubén
Chicano, Francisco
Giménez-Medina, Manuel
author_facet Novoa-Hurtado, Adriana
Saborido, Rubén
Chicano, Francisco
Giménez-Medina, Manuel
contents 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 integer linear programming model to obtain a set of solutions that reduce the cognitive complexity of a given piece of code, such as balancing the number of lines of code and its cognitive complexity. In addition, several algorithms have been developed to validate the model. These algorithms have been integrated into a tool that enables the parameterised resolution of the problem of reducing software cognitive complexity.
format Preprint
id arxiv_https___arxiv_org_abs_2601_21565
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Multi-objective Integer Linear Programming approach for Automatic Software Cognitive Complexity Reduction
Novoa-Hurtado, Adriana
Saborido, Rubén
Chicano, Francisco
Giménez-Medina, Manuel
Software Engineering
Computation and Language
2020: 90C10 (Primary), 90C29, 68N30 (Secondary)
G.1.6; F.2.2; D.2.8
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 integer linear programming model to obtain a set of solutions that reduce the cognitive complexity of a given piece of code, such as balancing the number of lines of code and its cognitive complexity. In addition, several algorithms have been developed to validate the model. These algorithms have been integrated into a tool that enables the parameterised resolution of the problem of reducing software cognitive complexity.
title Multi-objective Integer Linear Programming approach for Automatic Software Cognitive Complexity Reduction
topic Software Engineering
Computation and Language
2020: 90C10 (Primary), 90C29, 68N30 (Secondary)
G.1.6; F.2.2; D.2.8
url https://arxiv.org/abs/2601.21565