Fence Synthesis under the C11 Memory Model

07/30/2022
by   Sanjana Singh, et al.
0

The C/C++11 (C11) standard offers a spectrum of ordering guarantees on memory access operations. The combinations of such orderings pose a challenge in developing correct and efficient weak memory programs. A common solution to preclude those program outcomes that violate the correctness specification is using C11 synchronization-fences, which establish ordering on program events. The challenge is in choosing a combination of fences that (i) restores the correctness of the input program, with (ii) as little impact on efficiency as possible (i.e., the smallest set of weakest fences). This problem is the optimal fence synthesis problem and is NP-hard for straight-line programs. In this work, we propose the first fence synthesis technique for C11 programs called FenSying and show its optimality. We additionally propose a near-optimal efficient alternative called fFenSying. We prove the optimality of FenSying and the soundness of fFenSying and present an implementation of both techniques. Finally, we contrast the performance of the two techniques and empirically demonstrate fFenSyings effectiveness.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
06/16/2017

A Coq-based synthesis of Scala programs which are correct-by-construction

The present paper introduces Scala-of-Coq, a new compiler that allows a ...
research
04/29/2020

Compilation of Coordinated Choice

Recently, we have proposed coordinated choices, which are nondeterminist...
research
01/29/2020

Concise Read-Only Specifications for Better Synthesis of Programs with Pointers – Extended Version

In program synthesis there is a well-known trade-off between concise and...
research
11/14/2022

Unrealizability Logic

We consider the problem of establishing that a program-synthesis problem...
research
10/03/2013

Cudagrind: A Valgrind Extension for CUDA

Valgrind, and specifically the included tool Memcheck, offers an easy an...
research
10/18/2022

NearPM: A Near-Data Processing System for Storage-Class Applications

Persistent Memory (PM) technologies enable program recovery to a consist...
research
05/28/2022

Learning from Self-Sampled Correct and Partially-Correct Programs

Program synthesis aims to generate executable programs that are consiste...

Please sign up or login with your details

Forgot password? Click here to reset