Navegación

Búsqueda

Búsqueda avanzada

A Novel Formulation of the Software Cognitive Complexity Reduction Problem

Resumen:

Reducing the Cognitive Complexity of a piece of code to a given threshold is not trivial. Recently, we modeled Software Cognitive Complexity reduction as an optimization problem and we proposed an approach to assist developers on this task. This approach enumerates sequences of Extract Method refactoring operations until a stopping criteria is met. As result, it returns the minimal sequence of Extract Method refactoring operations found that is able to reduce the Cognitive Complexity of a method to the given threshold. However, enumeration algorithms fail to scale with the code size. The number of refactoring plans can grow exponentially with the number of lines of code. In this paper, instead of enumerating sequences of Extract Method refactoring operations, we model the Cognitive Complexity reduction as an Integer Linear Programming optimization problem. This makes it feasible to use solvers, like CPLEX, to efficiently find optimal solutions in large programs.

Palabras Clave:

cognitive complexity - Optimization - Software

Autor(es):

Handle:

11705/JISBD/2022/6644

Descargas:

Este artículo tiene una licencia de uso CreativeCommons - Reconocimiento (by)

Descarga el artículo haciendo click aquí.

Ver la referencia en formato Bibtex