Architectural model synthesis from source code using Simulink and Hierarchical Function Call-Graphs
Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesis
Modern software systems developed in the automotive industry are very complex. In order to analyze, understand, and document these software systems, architectural models of the systems at different abstraction levels are used. However, these models are typically ambiguous and inconsistent with the implementation. This thesis presents an approach to construct an unambiguous model of C code in an automatic manner, with a focus on architecture consistency by employing the Simulink environment extended by an external custom GUI. Such approach also facilitates compliance with the functional safety standard ISO 26262 that requires models of software systems (including legacy code), where the models capture both its behavior and structure. More specifically, we develop a method for hierarchical modelling in Simulink and describe mapping to the actual C code architecture expressed by distinct abstraction levels (e.g. layers, modules, functions). Although Simulink is capable of handling modular structures, there is a lack of proper visual representation support, which at the moment can reflect only inter-functional dependencies in terms of caller-to-callee relations, omitting any hierarchical view of abstraction layers. An attempt to extend graphical features of Simulink had several drawbacks and performance issues. As an enhanced solution, external GUI was developed for enabling a "complete" representation of the code architecture. For that purpose, reverse engineering approaches were employed with a help of LLVM compiler infrastructure and poolalloc project. A further analysis of LLVM IR allowed extracting a function call graph, including indirect function calls with a satisfactory precision (which can be possibly improved). For a better performance, the resulting graph was placed in a database, which allowed to dynamically select particular parts and relations of the graph. The developed tool-chain was evaluated on a two production software system called COO7 and GMS. This thesis was done at Scania CV AB in Södertälje, Sweden.
Place, publisher, year, edition, pages
2016. , 66 p.
Engineering and Technology
IdentifiersURN: urn:nbn:se:uu:diva-296883OAI: oai:DiVA.org:uu-296883DiVA: diva2:940069
Masters Programme in Embedded Systems
Rümmer, PhilippPearson, Justin