Simulating Operational Memory Models Using Off-The-Shelf Program Analysis Tools

1Citations
Citations of this article
7Readers
Mendeley users who have this article in their library.

This article is free to access.

Abstract

Memory models allow reasoning about the correctness of multithreaded programs. Constructing and using such models is facilitated by simulators that reveal which behaviours of a given program are allowed. While extensive work has been done on simulating axiomatic memory models, there has been less work on simulation of operational models. Operational models are often considered more intuitive than axiomatic models, but are challenging to simulate due to the vast number of paths through the model's transition system. Observing that a similar path-explosion problem is tackled by program analysis tools, we investigate the idea of reducing the decision problem of 'whether a given memory model allows a given behaviour' to the decision problem of 'whether a given C program is safe', which can be handled by a variety of off-The-shelf tools. We report on our experience using multiple program analysis tools for C for this purpose-a model checker (CBMC), a symbolic execution tool (KLEE), and three coverage-guided fuzzers (libFuzzer, Centipede and AFL++)-presenting two case-studies. First, we evaluate the performance and scalability of these tools in the context of the x86 memory model, showing that fuzzers offer performance competitive with that of RMEM, a state-of-The-Art bespoke memory model simulator. Second, we study a more complex, recently developed memory model for hybrid CPU/FPGA devices for which no bespoke simulator is available. We highlight how different encoding strategies can aid the various tools and show how our approach allows us to simulate the CPU/FPGA model twice as deeply as in prior work, leading to us finding and fixing several infidelities in the model. We also experimented with applying three analysis tools that won the 'falsification' category in the 2023 Annual Software Verification Competition (SV-COMP). We found that these tools do not scale to our use cases, motivating us to submit example C programs arising from our work for inclusion in the set of SV-COMP benchmarks, so that they can serve as challenge examples.

References Powered by Scopus

An extensible SAT-solver

1856Citations
N/AReaders
Get full text

How to Make a Multiprocessor Computer That Correctly Executes Multiprocess Programs

1599Citations
N/AReaders
Get full text

A tool for checking ANSI-C programs

1050Citations
N/AReaders
Get full text

Cited by Powered by Scopus

Seq2Seq-AFL: Fuzzing via sequence-to-sequence model

1Citations
N/AReaders
Get full text

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Cite

CITATION STYLE

APA

Iorga, D., Wickerson, J., & Donaldson, A. F. (2023). Simulating Operational Memory Models Using Off-The-Shelf Program Analysis Tools. IEEE Transactions on Software Engineering, 49(12), 5084–5102. https://doi.org/10.1109/TSE.2023.3326056

Readers' Seniority

Tooltip

Lecturer / Post doc 1

50%

PhD / Post grad / Masters / Doc 1

50%

Readers' Discipline

Tooltip

Business, Management and Accounting 1

50%

Computer Science 1

50%

Save time finding and organizing research with Mendeley

Sign up for free