A framework for embedded software portability and verification: From formal models to low-level code

Renata Martins Gomes, Bernhard Aichernig, Marcel Carsten Baunach*

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Porting software to new target architectures is a common challenge, particularly when dealing with low-level functionality in drivers or OS kernels that interact directly with hardware. Traditionally, adapting code for different hardware platforms has been a manual and error-prone process. However, with the growing demand for dependability and the increasing hardware diversity in systems like the IoT, new software development approaches are essential. This includes rigorous methods for verifying and automatically porting Real-Time Operating Systems (RTOS) to various devices. Our framework addresses this challenge through formal methods and code generation for embedded RTOS. We demonstrate a hardware-specific part of a kernel model in Event-B, ensuring correctness according to the specification. Since hardware details are only added in late modeling stages, we can reuse most of the model and proofs for multiple targets. In a proof of concept, we refine the generic model for two different architectures, also ensuring safety and liveness properties. We then showcase automatic low-level code generation from the model. Finally, a hardware-independent factorial function model illustrates more potential of our approach.

Original languageEnglish
JournalSoftware and Systems Modeling
Volume2024
Early online date1 Feb 2024
DOIs
Publication statusE-pub ahead of print - 1 Feb 2024

Keywords

  • Code generation
  • Embedded systems
  • Event-B
  • Formal methods
  • Portability
  • RTOS
  • Verification

ASJC Scopus subject areas

  • Software
  • Modelling and Simulation

Fields of Expertise

  • Information, Communication & Computing

Fingerprint

Dive into the research topics of 'A framework for embedded software portability and verification: From formal models to low-level code'. Together they form a unique fingerprint.

Cite this