Source-to-Source Approach for MISRA-C
Guardat en:
| Publicat a: | PQDT - Global (2025) |
|---|---|
| Autor principal: | |
| Publicat: |
ProQuest Dissertations & Theses
|
| Matèries: | |
| Accés en línia: | Citation/Abstract Full Text - PDF |
| Etiquetes: |
Sense etiquetes, Sigues el primer a etiquetar aquest registre!
|
| Resum: | The C programming language has been used in critical systems, such as aviation, where failures associated with the ambiguous and undefined behavior of the language can cause severe damage. To minimize such errors, standards such as MISRA C establish good programming practices that improve code safety, reliability, readability, and portability of the code. Although there are automated solutions capable of identifying violations, their effective correction still requires manual intervention by programmers. Furthermore, most of these checkers impose restrictions on the development environment, require changes to internal components, and require an understanding of complex technical details.In the context of these problems, this dissertation presents the Clava-MISRA Library, a library developed in Typescript that automates the process of correcting violations of MISRA-C in order to reduce the manual effort involved, the time required, and the occurrence of human errors. To implement this library, we adopted a source-to-source strategy, which is advantageous because it allows us to apply corrections to the source code without intervening in the compiler’s internal implementations and has a low impact on the development workflow. In this case, we use the Clava transpiler, which allows to query and transform code through its Abstract Syntax Tree and then translate it back into source code. In this sense, the Clava-MISRA Library is a complementary module that extends Clava with mechanisms to detect and correct violations of 31 guidelines.When evaluating the effectiveness of the developed library, the results show that our implementation has a stronger ability to detect violations than the considered checkers and significantly reduces the number of MISRA-C violations initially present, which proves the feasibility of automating this process. In addition, we also evaluated the performance of these two functionalities, which allowed us to identify rules with higher processing costs and potential improvements for future work. |
|---|---|
| ISBN: | 9798265496966 |
| Font: | ProQuest Dissertations & Theses Global |