• Home
  • Search
  • Synthesizing memory models from framework sketches and Litmus tests
  • Open Access IconOpen Access
  • Cite Icon52
  • https://doi.org/10.1145/3062341.3062353Copy DOI Icon

Synthesizing memory models from framework sketches and Litmus tests

  • Jun 14, 2017
  • James Bornholt +1 more
Show More
  • Abstract
  • Literature Map
  • References
  • Citations
  • Similar Papers
Abstract

A memory consistency model specifies which writes to shared memory a given read may see. Ambiguities or errors in these specifications can lead to bugs in both compilers and applications. Yet architectures usually define their memory models with prose and litmus tests—small concurrent programs that demonstrate allowed and forbidden outcomes. Recent work has formalized the memory models of common architectures through substantial manual effort, but as new architectures emerge, there is a growing need for tools to aid these efforts. This paper presents MemSynth, a synthesis-aided system for reasoning about axiomatic specifications of memory models. MemSynth takes as input a set of litmus tests and a framework sketch that defines a class of memory models. The sketch comprises a set of axioms with missing expressions (or holes). Given these inputs, MemSynth synthesizes a completion of the axioms—i.e., a memory model—that gives the desired outcome on all tests. The MemSynth engine employs a novel embedding of bounded relational logic in a solver-aided programming language, which enables it to tackle complex synthesis queries intractable to existing relational solvers. This design also enables it to solve new kinds of queries, such as checking if a set of litmus tests unambiguously defines a memory model within a framework sketch. We show that MemSynth can synthesize specifications for x86 in under two seconds, and for PowerPC in 12 seconds from 768 litmus tests. Our ambiguity check identifies missing tests from both the Intel x86 documentation and the validation suite of a previous PowerPC formalization. We also used MemSynth to reproduce, debug, and automatically repair a paper on comparing memory models in just two days.

Similar Papers
  • Research Article
  • Citations11

Synthesizing memory models from framework sketches and Litmus tests

  • Jun 14, 2017
  • ACM SIGPLAN Notices
  • James Bornholt +1
  • Research Article
  • Citations43

HRF-Relaxed

  • Apr 16, 2015
  • ACM Transactions on Architecture and Code Optimization
  • Benedict R Gaster +2
  • Research Article
  • Citations10

Optimal Reads-From Consistency Checking for C11-Style Memory Models

  • Jun 06, 2023
  • Proceedings of the ACM on Programming Languages
  • Hünkar Can Tunç +5
  • Research Article
  • Citations86

Location consistency-a new memory model and cache consistency protocol

  • Jan 01, 2000
  • IEEE Transactions on Computers
  • G.R Gao +1
  • PDF
  • Research Article
  • Citations20

A formalization of Java’s concurrent access modes

  • Oct 10, 2019
  • Proceedings of the ACM on Programming Languages
  • John Bender +1
  • Conference Article
  • Citations8

Defining uniform and hybrid memory consistency models on a unified framework

  • Jan 05, 1999
  • A.C.M Alves De Melo
  • Research Article
  • Citations12

A volatile-by-default JVM for server applications

  • Oct 12, 2017
  • Proceedings of the ACM on Programming Languages
  • Lun Liu +2
  • Research Article

Decidability of Liveness on the TSO Memory Model

  • Feb 13, 2026
  • Formal Aspects of Computing
  • Chao Wang +5
  • Conference Article
  • Citations94

Automatic fence insertion for shared memory multiprocessing

  • Jun 23, 2003
  • Xing Fang +2
  • Research Article
  • Citations1

Automated Robustness Verification of Concurrent Data Structure Libraries against Relaxed Memory Models

  • Oct 08, 2024
  • Proceedings of the ACM on Programming Languages
  • Kartik Nagar +3
  • Conference Article

Analysis and realization of Relaxed Consistency Memory model for multi-core CPU or GPU

  • Sep 01, 2014
  • Ramanarayan Mohanty +2
  • Conference Article

Visualizing Execution Histories on Multiple Memory Consistency Models

  • Sep 28, 1998
  • Alba Cristina Magalhães De Melo +1
  • Book Chapter

Why Hitchens Matters

  • Jan 01, 2017
  • Ian Williams
  • Conference Article
  • Citations17

Synthesizing Formal Models of Hardware from RTL for Efficient Verification of Memory Model Implementations

  • Oct 17, 2021
  • Yao Hsiao +4
  • Conference Article
  • Citations48

Maximal causality reduction for TSO and PSO

  • Oct 19, 2016
  • Shiyou Huang +1
Cactus Communications logo

Copyright 2026 Cactus Communications. All rights reserved.