A framework for static analysis and verification of low-level RTOS code

被引:0
作者
Manjunath, Vignesh [1 ,2 ]
Baunach, Marcel [2 ]
机构
[1] Pro2Future GmbH, Inffeldgasse 25F, A-8010 Graz, Austria
[2] Graz Univ Technol, Inffeldgasse 16, A-8010 Graz, Austria
关键词
RTOS; WCET; Low-level code verification; Formal methods; Static analysis; Software reliability;
D O I
10.1016/j.sysarc.2024.103220
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Modern embedded software development uses model-based methods to support long-term maintenance, portability, and correctness. A growing trend is to use formal methods to create software models and verify their correctness against requirement specifications. However, modeling and verifying low-level Real-Time Operating Systems (RTOS) or Basic Software (BSW) code sequences remains a major challenge, as it requires correctness against the internal hardware behavior and timing. To ensure this correctness, we need formal models of the complex hardware architecture, and due to the increased model complexity, the verification can lead to a state space explosion. In this paper, we mitigate these challenges by using an existing static Worst-Case Execution Time (WCET) analysis tool, OTAWA, for microarchitecture analysis. We use the intermediate results of the WCET analysis as input to our process, which verifies the correctness of the low-level implementations against the runtime effects of the hardware (e.g., synchronization dependencies, memory race conditions) and analyzes the timing and performance of the low-level code with respect to the data hazards in the pipeline. After successful verification, the results can be used in a formal method environment to model and verify the low-level code for correctness against the timing and requirement specifications. We demonstrate the proposed framework by analyzing and verifying the low-level context switch sequence of a classic AUTOSAR-based RTOS and the kernel startup sequence of FreeRTOS for correctness against hardware effects in the AURIX TriCore architecture. In addition, we show an empirical evaluation of our framework to examine the scalability, performance, and state space.
引用
收藏
页数:12
相关论文
共 36 条
  • [1] Abrial J., 2010, MODELING EVENT B SYS, DOI DOI 10.1017/CBO9781139195881
  • [2] Data dependence analysis of assembly code
    Amme, W
    Braun, P
    Thomasset, F
    Zehendner, E
    [J]. INTERNATIONAL JOURNAL OF PARALLEL PROGRAMMING, 2000, 28 (05) : 431 - 467
  • [3] [Anonymous], 2014, TC27x D-Step User Manual V2.2
  • [4] [Anonymous], 2022, Pydot: Python interface to GraphViz
  • [5] [Anonymous], 2023, Embench: benchmark suite
  • [6] [Anonymous], 2022, Pandas Python library
  • [7] [Anonymous], 2012, TriCore TC1.6P & TC1.6E User Manual
  • [8] [Anonymous], 2022, Dot language
  • [9] [Anonymous], 2022, HTMLParser Python library
  • [10] Aslanyan Hayk, 2020, 2020 Ivannikov Memorial Workshop (IVMEM), P3, DOI 10.1109/IVMEM51402.2020.00007