Content area

Abstract

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.

Details

1010268
Business indexing term
Identifier / keyword
Title
Source-to-Source Approach for MISRA-C
Number of pages
82
Publication year
2025
Degree date
2025
School code
5896
Source
MAI 87/6(E), Masters Abstracts International
ISBN
9798265496966
Committee member
Miguel Pinho, Luís
University/institution
Universidade do Porto (Portugal)
University location
Portugal
Degree
Master's
Source type
Dissertation or Thesis
Language
English
Document type
Dissertation/Thesis
Dissertation/thesis number
32426802
ProQuest document ID
3288163999
Document URL
https://www.proquest.com/dissertations-theses/source-approach-misra-c/docview/3288163999/se-2?accountid=208611
Copyright
Database copyright ProQuest LLC; ProQuest does not claim copyright in the individual underlying works.
Database
ProQuest One Academic