Generic Metadata Transport of High-Level–Language Properties between LLVM-Compiler Front and Middle End for Static Analysis
- Typ der Arbeit: Masterarbeit
- Status der Arbeit: abgeschlossen
- Projekte: AHA
- Betreuer: Gerion Entrup, Daniel Lohmann
- Ende der Arbeit: 15. Jul 2024
Currently, ARA -- an operating-system aware whole-system compiler -- operates exclusively on the LLVM IR (an intermediate language between the high level language and the binary code). However, sometimes information from the front end (that the LLVM IR is not able to express) would give better analysis results. Examples for that are:
- Function like macros of the CPP that implement operating system relevant functions. For example the
assert()
-function in FreeRTOS is implemented as a macro which resolves to an endless loop and thus a possible system end, a meaningful information for the analysis. - Type informations for function pointers: The LLVM IR recently lost the ability to encode the type of pointers. This information, however, is essential to tighten our analysis for the interprocedural control flow.
- Inheritance information in C++: The LLVM IR only encodes inclusion not inheritance thus all information about a virtual dispatch is lost, thus again make the interprocedural control-flow analysis harder. LLVM already has done some work here for CFI.
Your task with this thesis is to fix these problems by making it possible to get front-end information into ARA. An important part of the thesis is to do this systematically: Check the literature for useful source code information for abstract interpretation and develop a generic and extensible mechanism to get information from an LLVM front end into the middle end. The whole tasks splits into several subtasks:
- Make an overview of information that are useful for abstract interpretation and are only present in the high level language.
- Design a mechanism to encode these information in a common way and transfer it in form of metadata from the front end to the middle end.
- Extract the data in ARA's internal data structures.
- Evaluate the design by implementing information extraction for the above mentioned examples.
Related Publications
-
RTAS
Conference
A
ARA: Static Initialization of Dynamically-Created System Objects -
Proceedings of the 27th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'21)2021.
PDF Details Video Teaser Video 10.1109/RTAS52030.2021.00039 [BibTex]