Architectural model synthesis from source code using Simulink and Hierarchical Function Call-Graphs

Detta är en Master-uppsats från Uppsala universitet/Institutionen för informationsteknologi

Författare: Maksim Olifer; [2016]

Nyckelord: ;

Sammanfattning: 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.

  HÄR KAN DU HÄMTA UPPSATSEN I FULLTEXT. (följ länken till nästa sida)