Semantics for Locking Specifications
Programming Languages
2015-11-17 v2
Abstract
To prevent concurrency errors, programmers need to obey a locking discipline. Annotations that specify that discipline, such as Java's @GuardedBy, are already widely used. Unfortunately, their semantics is expressed informally and is consequently ambiguous. This article highlights such ambiguities and formalizes the semantics of @GuardedBy in two alternative ways, building on an operational semantics for a small concurrent fragment of a Java-like language. It also identifies when such annotations are actual guarantees against data races. Our work aids in understanding the annotations and supports the development of sound formal tools that verify or infer such annotations.
Cite
@article{arxiv.1501.05338,
title = {Semantics for Locking Specifications},
author = {Michael Ernst and Damiano Macedonio and Massimo Merro and Fausto Spoto},
journal= {arXiv preprint arXiv:1501.05338},
year = {2015}
}