A high-level operational semantics for hardware weak memory models

12/03/2018
by   Robert J. Colvin, et al.
0

Modern processors deploy a variety of weak memory models, which for efficiency reasons may execute instructions in an order different to that specified by the program text. The consequences of instruction reordering can be complex and subtle, and can impact on ensuring correctness. In this paper we build on extensive work elucidating the semantics of assembler-level languages on hardware architectures with weak memory models (specifically TSO, ARM and POWER) and lift the principles to a straightforward operational semantics which allows reasoning at a higher level of abstraction. To this end we introduce a wide-spectrum language that encompasses operations on abstract data types as well as low-level assembler code, define its operational semantics using a novel approach to allowing reordering of instructions, and derive some refinement laws that can be used to explain behaviours of real processors. In this framework memory models are mostly distinguished via a pair-wise static ordering on instruction types that determines when later instructions may be reordered before earlier instructions. In addition, memory models may use different types of storage systems. For instance, non-multicopy atomic systems allow sibling processes to see updates to different variables in different orders. We encode the semantics in the rewriting engine Maude as a model-checking tool, and develop confidence in our framework by validating our semantics against existing sets of litmus tests -- small assembler programs -- comparing our results with those observed on hardware and in existing semantics. We also use the tool as a prototype to model check implementations of data structures from the literature against their abstract specifications.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/13/2018

A wide-spectrum language for verification of programs on weak memory models

Modern processors deploy a variety of weak memory models, which for effi...
research
05/06/2021

Parallelized sequential composition, pipelines, and hardware weak memory models

Since the introduction of the CDC 6600 in 1965 and its `scoreboarding' t...
research
08/08/2020

TransForm: Formally Specifying Transistency Models and Synthesizing Enhanced Litmus Tests

Memory consistency models (MCMs) specify the legal ordering and visibili...
research
09/02/2022

Automatic Detection of Speculative Execution Combinations

Modern processors employ different prediction mechanisms to speculate ov...
research
11/29/2022

Reasoning about Promises in Weak Memory Models with Event Structures (Extended Version)

Modern processors such as ARMv8 and RISC-V allow executions in which ind...
research
10/30/2018

SBT-instrumentation: A Tool for Configurable Instrumentation of LLVM Bitcode

The paper describes a member of the Symbiotic toolbox called sbt-instrum...
research
02/07/2023

Adding Explicit Load-Acquire and Store-Release Instructions to the RISC-V ISA

Weak memory models allow for simplified hardware and increased performan...

Please sign up or login with your details

Forgot password? Click here to reset