Modelling and Verifying Programs Under the Total Store Order Memory Model in an Algebraic Semantics Style

Lili Xiao, Huibiao Zhu, Jonathan P. Bowen, Sini Chen

Research output: Chapter in Book/Report/Conference proceedingChapterpeer-review

1 Scopus citations

Abstract

Modelling and verification of multi-threaded programs are difficult since one must consider all the ways that instructions in different threads can be interleaved. Modern hardware architectures and mainstream programming languages employ relaxed memory models for efficiency purposes, and the additional interleavings from them make the modelling and verification more complex. Total Store Order (TSO) is a widely used relaxed memory model in SPARC implementations and x86 architecture. In this paper, we are committed to proposing a lightweight method for formally modelling and verifying programs under the TSO memory model. Above all, we apply Unifying Theories of Programming (UTP) to investigate a set of algebraic laws, which can dynamically generate configuration sequences of programs under TSO. At the meantime, the information of each configuration is recorded. During this process, we define three properties (including Write-Read Reordering, Read-after-Write Elimination and Barrier) related to the unique features of TSO, and check whether the properties are satisfied. The algebraic laws are implemented in the rewriting engine Maude, and the verification is also conducted in Maude. The verification results show that the properties are all in line with our expectations.

Original languageEnglish
Title of host publicationLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
PublisherSpringer Science and Business Media Deutschland GmbH
Pages206-225
Number of pages20
DOIs
StatePublished - 2024

Publication series

NameLecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)
VolumeLNCS 14781
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Keywords

  • Algebraic Laws
  • Relaxed Memory Models
  • Total Store Order (TSO)
  • Unifying Theories of Programming (UTP)
  • Verification

Fingerprint

Dive into the research topics of 'Modelling and Verifying Programs Under the Total Store Order Memory Model in an Algebraic Semantics Style'. Together they form a unique fingerprint.

Cite this