You are on page 1of 2

Review for "Safe Optimisations for Shared-Memory Concurrent Programs"

Author: Jaroslav ev k
Reviewed by: Abhilash Bhandari and Shashidhar G
Overall rating: 3/5
Writing quality: 3/5
Technical novelty: 4/5
Summary:
In concurrent shared-memory languages, sequential consistency is provide
d for only data race free programs (DRF guarantee). The authors propose to provi
de proof of correctness for compiler optimizations under the DRF guarantee (for
data race free programs) and absence of out-of-thin-air values for arbitrary pro
grams. The authors design a trace-semantics rules for thread local transformatio
n. Compiler optimizations involving both reordering and elimination are defined
semantically using the trace-semantics. The authors also give a proof for the co
rrectness of the compiler transformations that are a composition of multiple reo
rderings and eliminations.
The authors model the programs as set of traces, where each trace repres
ents a sequence of actions (reads/writes, synchronization, input/output) execute
d by each thread. Optimizations are modelled as relations on the interleaving of
these trace sets. Given an input program and a finite chain of compiler transfo
rmations, the authors devise the safety rules/constraints for the possible trans
formations in such a way that the behavior (set of interleavings) of the transfo
rmed program, obtained by performing the chain of transformations on the input p
rogram, is a subset of the behavior of the original program.
To apply the trace-semantics rules, the authors define a simple imperati
ve language with synchronization primitives. The authors show the correspondence
of the syntactic transformations with the semantic transformations with the hel
p of some simple syntactic program transformations.
The authors have also mechanized the transformation rules and proofs in
the Isabelle/HOL proof assistant.
Strengths:
1. The paper discusses only two basic tranformation rules for elimination and re
-ordering and prove that any composition of these transformations will also guar
antee DRF. Most of the compiler optimizations are some form of elimination or re
-ordering. By using these two transformations they can argue about lot of optimi
zations.
2. Use of semantic rules to guide the tranformations which allows flexibility in
identifying memory patterns that can be transformed in a program trace. i.e we
dont need to look into syntax of the program for doing the transformation.
Weaknesses:
1. The paper is difficult to understand. The flow of the paper and the sentences
may have been framed in a better and simple way.
2. Reduction in non-determinism due to transformations may have an impact on the
purpose (meaning) of the program as intended by the programmer. This may also l
ead to reduction in parallelism.
Authors comments:
1. In introduction, the author starts with a mention to "common subexpression el
imination" optimization but the example referred to performs "constant propogati

on".
2. The explanation for the example given in Figure 1 seems confusing. The origin
al program in Figure 1 contains the instructions x=2 in Thread 0 and r2=x in Thr
ead 1. However the given trace [S(1), R[y=1], X(1), R[x=0], R[x=0], X(0)] does n
ot match any SC schedule for the given original program.
3. Usage of the word "author's" in Section 5 breaks the anonymity of the author.
4. Can we use this trace semantics to identify Data-races and possibly eliminate
them?
5. The transformations are defined at semantic level. Can the transformations we
applied at abstract level as well?
Minor comments:
1. Confusing usage of "We" and "I" (used in acknowledgements).
2. Inconsistent usage of active and passive references, first person ("We") and
third person ("author's") references.
3. In Section 4 (+4), "each" is used consecutively twice.
4. "We define wildcard interleavings to be interleavings with some ordinary acti
ons replaced by wildcard reads". Define 'ordinary actions'?
5. In Theorem 1, "an elimination of data free" must become "an elimination of da
ta race free".
6. In Conclusion, "we assume that the transformed program always runs sequential
ly consistently". Please reframe the sentence.
7. In Conclusion. "We believe that there similar results can be achieved for oth
er processor memory models". Please reframe the sentence.

You might also like