Software Open Access

A Formalization of Java's Concurrent Access Modes

John Bender; Jens Palsberg

Project leader(s)
John Bender

Java’s memory model was recently updated and expanded with new access modes. The accompanying documentation for these access modes is intended to make strong guarantees about program behavior that the Java compiler must enforce, yet the documentation is frequently unclear. This makes the intended program behavior ambiguous, impedes discussion of key design decisions, and makes it impossible to prove general properties about the semantics of the access modes.

In this paper we present the first formalization of Java’s access modes. We have constructed an axiomatic model for all of the modes using the Herd modeling tool. This allows us to give precise answers to questions about the behavior of example programs, called litmus tests. We have validated our model using a large suite of litmus tests from existing research which helps to shed light on the relationship with other memory models. We have also modeled the semantics in Coq and proven several general theorems including a DRF guarantee, which says that if a program is properly synchronized then it will exhibit sequentially consistent behavior. Finally, we use our model to prove that the unusual design choice of a partial order among writes to the same location is unobservable in any program.

Files (1.0 GB)
Name Size
jam.ova
md5:075e24da3d3b145aed443f7454259661
1.0 GB Download
LICENSE.md
md5:8b860e117f0a9eaf7a85d7ac6984b8d3
1.1 kB Download
README.md
md5:81be18933d0eff1f4a4074fbc10588aa
9.1 kB Download
87
33
views
downloads
All versions This version
Views 8766
Downloads 3318
Data volume 10.5 GB5.2 GB
Unique views 8364
Unique downloads 1310

Share

Cite as