Sound Atomicity Inference for Data-Centric Synchronization

09/11/2023
by   Hervé Paulino, et al.
0

Data-Centric Concurrency Control (DCCC) shifts the reasoning about concurrency restrictions from control structures to data declaration. It is a high-level declarative approach that abstracts away from the actual concurrency control mechanism(s) in use. Despite its advantages, the practical use of DCCC is hindered by the fact that it may require many annotations and/or multiple implementations of the same method to cope with differently qualified parameters. Moreover, the existing DCCC solutions do not address the use of interfaces, precluding their use in most object-oriented programs. To overcome these limitations, in this paper we present AtomiS, a new DCCC model based on a rigorously defined type-sound programming language. Programming with AtomiS requires only (atomic)-qualifying types of parameters and return values in interface definitions, and of fields in class definitions. From this atomicity specification, a static analysis infers the atomicity constraints that are local to each method, considering valid only the method variants that are consistent with the specification, and performs code generation for all valid variants of each method. The generated code is then the target for automatic injection of concurrency control primitives, by means of the desired automatic technique and associated atomicity and deadlock-freedom guarantees, which can be plugged-into the model's pipeline. We present the foundations for the AtomiS analysis and synthesis, with formal guarantees that the generated program is well-typed and that it corresponds behaviourally to the original one. The proofs are mechanised in Coq. We also provide a Java implementation that showcases the applicability of AtomiS in real-life programs.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
01/15/2019

Obfuscating Java Programs by Translating Selected Portions of Bytecode to Native Libraries

Code obfuscation is a popular approach to turn program comprehension and...
research
07/02/2022

Sikkel: Multimode Simple Type Theory as an Agda Library

Many variants of type theory extend a basic theory with additional primi...
research
08/14/2021

Data Type Inference for Logic Programming

In this paper we present a new static data type inference algorithm for ...
research
03/28/2018

Deadlock-Free Typestate-Oriented Programming

Context. TypeState-Oriented Programming (TSOP) is a paradigm intended to...
research
11/11/2020

Petr4: Formal Foundations for P4 Data Planes

P4 is a domain-specific language for programming and specifying packet-p...
research
06/17/2019

How to Avoid Making a Billion-Dollar Mistake: Type-Safe Data Plane Programming with SafeP4

The P4 programming language offers high-level, declarative abstractions ...
research
01/08/2019

A Journey Among Java Neutral Program Variants

Neutral program variants are functionally similar to an original program...

Please sign up or login with your details

Forgot password? Click here to reset