Verifying FreeRTOS' Cyclic Doubly Linked List Implementation: From Abstract Specification to Machine Code

David Sanan, Liu Yang, Zhao Yongwang, Xing Zhenchang, Mike Hinchey

Research output: Chapter in Book/Report/Conference proceedingConference contributionpeer-review

Abstract

In order to facilitate proof of correctness, micro-kernels are based on simplicity, providing an application only with the minimal set of features it needs in order to to work. However, simplicity alone does not guarantee the absence of bugs and software errors, and the complexity of an OS often makes such problems difficult to find and fix. In this work, we prove the functional correctness of an abstract model for the C implementation of the cyclic linked list in the real-time micro-kernel FreeRTOS, which is used in the FreeRTOS scheduler, its correctness being of critical importance for the real-time properties of FreeRTOS. The formal specification of the functional properties of FreeRTOS also provides a guide for a correct use of the functions that the implementation provides, since it lacks checks on the data. Additionally, we prove the correctness of the machine code resulting from compiling the implementation targeting the ARM architecture. Following a verification approach based on refinement, we first construct the abstract model of the implementation, where we prove both the cyclic linked list invariant and the correctness of the implementation behaviour for any list in the heap using separation logic. Second, we leverage existing machine code verification frameworks to get a HOL model of the FreeRTOS linked list compiled machine code, and we apply forward simulation to prove that such a machine code model refines the abstract model, and therefore satisfies the properties already proven over the specification.

Original languageEnglish
Title of host publicationProceedings - 2015 20th International Conference on Engineering of Complex Computer Systems, ICECCS 2015
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages120-129
Number of pages10
ISBN (Electronic)9781467385817
DOIs
Publication statusPublished - 15 Jan 2016
Event20th International Conference on Engineering of Complex Computer Systems, ICECCS 2015 - Gold Coast, Australia
Duration: 9 Dec 201511 Dec 2015

Publication series

NameProceedings of the IEEE International Conference on Engineering of Complex Computer Systems, ICECCS
Volume2016-January
ISSN (Print)2770-8527
ISSN (Electronic)2770-8535

Conference

Conference20th International Conference on Engineering of Complex Computer Systems, ICECCS 2015
Country/TerritoryAustralia
CityGold Coast
Period9/12/1511/12/15

Keywords

  • Formal methods
  • Machine Code verification
  • Microkernel Verification
  • Theorem Proving verification

Fingerprint

Dive into the research topics of 'Verifying FreeRTOS' Cyclic Doubly Linked List Implementation: From Abstract Specification to Machine Code'. Together they form a unique fingerprint.

Cite this