Affiliation:
1. ENS Cachan Bretagne - IRISA, Rennes, France
2. ENS Cachan Bretagne - IRISA & Purdue University, Rennes, France
3. Purdue University, West Lafayette, USA
4. INRIA Rennes & Purdue University, Rennes, France
Abstract
Recent advances in verification have made it possible to envision trusted implementations of real-world languages. Java with its type-safety and fully specified semantics would appear to be an ideal candidate; yet, the complexity of the translation steps used in production virtual machines have made it a challenging target for verifying compiler technology. One of Java's key innovations, its memory model, poses significant obstacles to such an endeavor. The Java Memory Model is an ambitious attempt at specifying the behavior of multithreaded programs in a portable, hardware agnostic, way. While experts have an intuitive grasp of the properties that the model should enjoy, the specification is complex and not well-suited for integration within a verifying compiler infrastructure. Moreover, the specification is given in an axiomatic style that is distant from the intuitive reordering-based reasonings traditionally used to justify or rule out behaviors, and ill suited to the kind of operational reasoning one would expect to employ in a compiler. This paper takes a step back, and introduces a Buffered Memory Model (BMM) for Java. We choose a pragmatic point in the design space sacrificing generality in favor of a model that is fully characterized in terms of the reorderings it allows, amenable to formal reasoning, and which can be efficiently applied to a specific hardware family, namely x86 multiprocessors. Although the BMM restricts the reorderings compilers are allowed to perform, it serves as the key enabling device to achieving a verification pathway from bytecode to machine instructions. Despite its restrictions, we show that it is backwards compatible with the Java Memory Model and that it does not cripple performance on TSO architectures.
Publisher
Association for Computing Machinery (ACM)
Subject
Computer Graphics and Computer-Aided Design,Software
Cited by
15 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. UTP semantics for the MCA ARMv8 architecture;Journal of Systems Architecture;2022-04
2. A Survey of Programming Language Memory Models;Programming and Computer Software;2021-11
3. Safe-by-default Concurrency for Modern Programming Languages;ACM Transactions on Programming Languages and Systems;2021-09-30
4. Accelerating sequential consistency for Java with speculative compilation;Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation;2019-06-08
5. Operational semantics of a weak memory model with channel synchronization;Journal of Logical and Algebraic Methods in Programming;2019-02