Annotation-based diagrams for shared-data concurrency (original) (raw)
In languages such as Java and Ada, there are a number of significant concurrency-related design decisions that may not be manifest locally in code. These include, for example, the identification of shared state, how that state is protected, which threads may visit that state, and so on. These decisions relate threads, code, and shared data. We describe new UML-style diagrams that can help make explicit some useful aspects of these relationships. In addition, by using lightweight annotations on source code, we can document how these decisions are realized. By combining diagrams and annotations, we can support both forward and reverse engineering, using tools and analyses to keep the diagrams consistent with the annotated code.