Fence Synthesis under the C11 Memory Model

by   Sanjana Singh, et al.

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.


page 1

page 2

page 3

page 4


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 ...

Compilation of Coordinated Choice

Recently, we have proposed coordinated choices, which are nondeterminist...

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...

Unrealizability Logic

We consider the problem of establishing that a program-synthesis problem...

Cudagrind: A Valgrind Extension for CUDA

Valgrind, and specifically the included tool Memcheck, offers an easy an...

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

Persistent Memory (PM) technologies enable program recovery to a consist...

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