Herramienta de métricas de calidad de diseño software en aplicaciones para iPhone

Bookmark (0)
Please login to bookmark Close

En este TFG se ha creado una herramienta para medir la calidad del diseño software de aplicaciones hechas en Swift mediante el uso de métricas de acoplamiento. El proyecto se ha realizado por un equipo compuesto por 3 personas, bajo la supervisión de 2 tutores. Aunque este TFG documentará solo una parte de la herramienta, todos los miembros han contribuido en todas las etapas del desarrollo. La herramienta ha sido implementada utilizando el lenguaje Rust. La decisión del lenguaje se hizo pensando en la eficiencia y el posible uso que se le podría dar a la herramienta con otros lenguajes diferentes a Swift. La herramienta funcionará de la siguiente manera, se le pasará un árbol sintáctico abstracto (ast) generado por el compilador de Swift, el cual se analizará creando tokens y, posteriormente, nodos. Con la información de estos nodos se creará una estructura intermedia en formato json. Tras esto, se analizará dicha estructura intermedia para poder realizar las métricas y concluir si un código es muy dependiente entre sus elementos. Este TFG documentará el segundo paso del proceso, en el cual se generarán las estructuras intermedias mediante la información obtenida de los nodos creados en la primera parte. Estas estructuras serán la entrada del último paso en el que se calcularán las métricas de acoplamiento del código Swift inicial. El trabajo realizado ha implicado una curva de aprendizaje significativa con respecto al lenguaje Rust, lenguaje que no se conocía en un inicio. Además, se ha realizado un gran esfuerzo a la gestión del repositorio Github en el que se encuentra la herramienta, así como a la implementación de test unitarios y de integración para garantizar la funcionalidad de todos los elementos de la herramienta. En este enlace se encuentra el código fuente de la herramienta implementada: https://github.com/jdortiz/ast2md/tree/develop
ABSTRACT
In this Bachelor’s Thesis (TFG), a tool has been developed to measure the software design quality of applications developed in Swift by using coupling metrics. The project has been undertaken by a team comprising 3 individuals, under the supervision of 2 mentors. Although this TFG will document only a portion of the tool, all members have contributed across all stages of its development. The tool has been implemented using the Rust programming language. The choice of language was made considering the efficiency and the potential usage of the tool with languages other than Swift. The tool will operate as follows: it will be provided with an abstract syntax tree (ast) generated by the Swift compiler, which will be analyzed by creating tokens and subsequently nodes. Using the information from these nodes, an intermediate structure in json format will be created. This intermediate structure will then be analyzed to perform metrics and determine if a piece of code has high inter-element dependency. This TFG will document the second step of the process, in which intermediate structures will be generated using the information obtained from the nodes created in the first part. These structures will serve as the input for the final step, where the coupling metrics of the initial Swift code will be calculated. The work undertaken has entailed a significant learning curve regarding the Rust language, which was unfamiliar to the team at the project’s outset. Furthermore, substantial effort has been dedicated to managing the GitHub repository housing the tool, as well as implementing unit and integration tests to ensure the functionality of all tool components. Here is the source code for the implemented tool: https://github.com/jdortiz/ast2md/tree/develop

​En este TFG se ha creado una herramienta para medir la calidad del diseño software de aplicaciones hechas en Swift mediante el uso de métricas de acoplamiento. El proyecto se ha realizado por un equipo compuesto por 3 personas, bajo la supervisión de 2 tutores. Aunque este TFG documentará solo una parte de la herramienta, todos los miembros han contribuido en todas las etapas del desarrollo. La herramienta ha sido implementada utilizando el lenguaje Rust. La decisión del lenguaje se hizo pensando en la eficiencia y el posible uso que se le podría dar a la herramienta con otros lenguajes diferentes a Swift. La herramienta funcionará de la siguiente manera, se le pasará un árbol sintáctico abstracto (ast) generado por el compilador de Swift, el cual se analizará creando tokens y, posteriormente, nodos. Con la información de estos nodos se creará una estructura intermedia en formato json. Tras esto, se analizará dicha estructura intermedia para poder realizar las métricas y concluir si un código es muy dependiente entre sus elementos. Este TFG documentará el segundo paso del proceso, en el cual se generarán las estructuras intermedias mediante la información obtenida de los nodos creados en la primera parte. Estas estructuras serán la entrada del último paso en el que se calcularán las métricas de acoplamiento del código Swift inicial. El trabajo realizado ha implicado una curva de aprendizaje significativa con respecto al lenguaje Rust, lenguaje que no se conocía en un inicio. Además, se ha realizado un gran esfuerzo a la gestión del repositorio Github en el que se encuentra la herramienta, así como a la implementación de test unitarios y de integración para garantizar la funcionalidad de todos los elementos de la herramienta. En este enlace se encuentra el código fuente de la herramienta implementada: https://github.com/jdortiz/ast2md/tree/develop
ABSTRACT
In this Bachelor’s Thesis (TFG), a tool has been developed to measure the software design quality of applications developed in Swift by using coupling metrics. The project has been undertaken by a team comprising 3 individuals, under the supervision of 2 mentors. Although this TFG will document only a portion of the tool, all members have contributed across all stages of its development. The tool has been implemented using the Rust programming language. The choice of language was made considering the efficiency and the potential usage of the tool with languages other than Swift. The tool will operate as follows: it will be provided with an abstract syntax tree (ast) generated by the Swift compiler, which will be analyzed by creating tokens and subsequently nodes. Using the information from these nodes, an intermediate structure in json format will be created. This intermediate structure will then be analyzed to perform metrics and determine if a piece of code has high inter-element dependency. This TFG will document the second step of the process, in which intermediate structures will be generated using the information obtained from the nodes created in the first part. These structures will serve as the input for the final step, where the coupling metrics of the initial Swift code will be calculated. The work undertaken has entailed a significant learning curve regarding the Rust language, which was unfamiliar to the team at the project’s outset. Furthermore, substantial effort has been dedicated to managing the GitHub repository housing the tool, as well as implementing unit and integration tests to ensure the functionality of all tool components. Here is the source code for the implemented tool: https://github.com/jdortiz/ast2md/tree/develop Read More