Composable Memory Transactions
Proceedings of the tenth ACM SIGPLAN symposium on Principles and practice of parallel programming, 2005 · paper · Computer science
Presents a transactional-memory concurrency model in Concurrent Haskell, adding retry for modular blocking and orElse for choosing between alternatives. It argues these let concurrent operations be composed into larger ones, and gives a formal operational semantics.
Checked: PDF from microsoft.com, fetched 4 Oct 2026. Page numbers are those of that PDF.
2 findings
Reference or label Section 5.1 says "The actions a (Figure 2) allow reading...", but the Action grammar 'a ::= !c | ?c | ϵ' is in Figure 3, not Figure 2.
- p. 7 Section 5.1, paragraph on I/O transitions
The actions a (Figure 2)
- p. 7 Figure 3
Action a ::= !c | ?c | ϵ
Judge's note: Page 7 image: Figure 3 (program state and evaluation contexts) contains 'Action a ::= !c | ?c | ϵ'. Page 6 crop: Figure 2 (syntax of values and terms) has no Action production.
Second check: another model agreed
Report a problem with this finding
Wording In the Section 6.2 code example "f x = if x==0 then True else f (n-1)", the recursive call uses the unbound variable n where the parameter is x (presumably f (x-1)).
- p. 9 Section 6.2, code example
f x = if x==0 then True else f (n-1)
Judge's note: Page 9 crop: f's parameter is x, and no n is bound in the example. The surrounding text relies on f looping for negative arguments, which needs f (x-1).
Second check: another model agreed
Report a problem with this finding
20 minor (typos and the like; most checked by the judge only)
Wording In Figure 2 the value grammar lists bare "newTVar", but its neighbours are given with arguments ('readTVar r', 'writeTVar r M', 'forkIO M'), and rule (NEW) in Figure 4 reduces "newTVar M".
- p. 6 Figure 2, Value production
newTVar
- p. 8 Figure 4, rule (NEW)
E[newTVar M]; Θ, ∆ ⇒ E[return r]; Θ[r ↦ M], ∆[r ↦ M]
- p. 8 Figure 4, rule (NEW)
newTVar M
Judge's note: Page 6 crop: Figure 2 lists 'newTVar' with no argument. Page 8, Figure 4: (NEW) pattern-matches E[newTVar M]. A bare function name could be read as a partially applied value, so this is a notational inconsistency, not a definite error.
Second check: another model agreed
Report a problem with this finding
Wording Section 5.1 says the term evaluation context E "looks into the left operand of >>=, catch, and orElse", but Figure 3 defines E ::= [·] | E >>= M | catch E M, with no orElse case.
- p. 7 Section 5.1, last paragraph
looks into the left operand of >>=, catch, and orElse.
- p. 7 Figure 3, Evaluation contexts
E ::= [·] | E >>= M | catch E M
- p. 7 Section 5.1, last paragraph
looks into the left operand of >>=, catch, and orElse
- p. 7 Figure 3
[·] | >>= M | catch M
Only the authors can say what is right here.
Judge's note: Page 7 image: Figure 3 shows only the >>= and catch forms for E. In Figure 4 (page 8), orElse is handled by the separate rules OR1–OR3, which run M1 to completion with ⇒*. The prose may describe the combined effect informally, but as written it does not match the grammar.
Second check: another model agreed
Report a problem with this finding
Wording The prose for (ATHROW) says "instead just the allocation effects ∆ are added to the initial heap Θ", while the rule in Figure 4 gives the result heap as Θ ∪ ∆′ (with ∆′ the allocations from the run starting at {}).
- p. 7 Section 5.2, description of (ATHROW)
∆ are added to the initial heap Θ.
- p. 8 Figure 4, rule (ATHROW)
Θ ∪ ∆′
Judge's note: Page 7 prose against the page 8 Figure 4 (ATHROW) conclusion 'P[throw N]; Θ ∪ ∆′'. The prose uses ∆ loosely for the allocation record, but in the rule the quantity added is the primed ∆′. Minor notational mismatch.
Second check: another model agreed
Report a problem with this finding
Wording Section 6.4 says orElse "places two additional requirements on the STM. Firstly, proper nested transactions are needed...", but no second requirement is explicitly marked.
- p. 9 Section 6.4, first paragraph
which places two additional requirements on the STM. Firstly, proper nested trans-actions are needed
Judge's note: Pages 9–10: Section 6.4 has no 'Secondly' or equivalent. The paragraph on waiting on the union of TVars when both branches retry is presumably the second requirement, but it is not labelled as such.
Second check: another model agreed
Report a problem with this finding
Wording The Section 6.2 inconsistent-view example reads the same TVar twice ("x <- readTVar v ; y <- readTVar v"), yet the text discusses x-y being less than zero.
- p. 9 Section 6.2, foo example
{ x <- readTVar v
- p. 9 Section 6.2, following text
If foo saw memory at a moment at which x-y was less than zero
- p. 9 Section 6.1 (continued)
reads first consult the log so that they see preceding writes from the same transaction
Only the authors can say what is right here.
Judge's note: Page 9 image. Section 6.1 (pages 8–9) says each log entry records the old value when the TVar is first accessed, and that reads consult the log first. Under that implementation the second read of v returns the logged value, so x-y would be 0. The example presumably intended two different TVars; only the authors can say.
Second check: another model agreed
Report a problem with this finding
Wording Appendix A code "; catch (g item) (recover exn item) }" uses exn, which is not bound at the call site; the handler needs to be a function of the exception, e.g. (\exn -> recover exn item).
- p. 13 Appendix A, second version of f
; catch (g item) (recover exn item) }
Judge's note: Checked p.13 and crop C020-a. In the body of f, exn is bound only as a parameter in the where-clause definition "recover exn item = do { unReadPort p item ; throw exn }". The catch handler is a function from the exception to an STM action, as the 'bad' example above shows ("catch (f p1) (\exn -> f p2)"). So "(recover exn item)" at the call site refers to a free variable. This is a slip in illustrative code and the intent is clear, so it is minor.
Second check: another model agreed
Report a problem with this finding
Typo Duplicated article in Section 2.1: "and those that do rely on a a programmer-supplied boolean guard".
- p. 2 Section 2.1, 'Secondly' paragraph
rely on a a programmer-supplied boolean guard
- p. 2 2.1, blocking paragraph
those that do rely on a a programmer-supplied boolean guard
Judge's note: The page 2 crop shows 'a a' in the right column, in the 'Secondly, blocking is not composable' paragraph.
Second check: none (judge only)
Report a problem with this finding
Typo The Section 3.5 code example opens with "atomic (do {" followed by "{ n <- readTVar v_n" (two '{' and one '('), but closes only with "; ...write data into buffer... }" (one '}' and no ')').
- p. 4 Section 3.5, first code example
atomic (do {
Judge's note: Page 4 image: the example ends at the foot of the right column, and page 5 continues with prose, so the code is not continued there. Brackets are unbalanced: two opening braces and one closing; one opening parenthesis and none closing. Other examples, e.g. 'atomic (do { getR r1 3; getR r2 7 })', are balanced.
Second check: none (judge only)
Report a problem with this finding
Typo Ungrammatical in Section 3.4: "STM Haskell also lets us to compose transactions as alternatives" (should be 'lets us compose').
- p. 4 Section 3.4, first paragraph
STM Haskell also lets us to compose
- p. 4 Section 3.4, first paragraph
STM Haskell also lets us to compose transac-
Judge's note: Seen in the page 4 crop, Section 3.4, first paragraph.
Second check: none (judge only)
Report a problem with this finding
Typo Garbled sentence in Section 5.2: "Rule (AADMIN) lifts the administrative transitions into the STM world, just as t."
- p. 7 Section 5.2, end of the STM transitions paragraph
administrative transitions into the STM world, just as t.
Only the authors can say what is right here.
Judge's note: The page 7 image prints 'just as t.' literally, so this is not an extraction artefact. The intended ending (presumably a reference to (ADMIN) for the I/O world) is missing; only the authors can supply it.
Second check: none (judge only)
Report a problem with this finding
Typo Missing word in Section 6.1: "These two values are identical in the case a TVar that has been read but not written" (should be 'in the case of a TVar').
- p. 8 Section 6.1, second paragraph
identical in the case a TVar that has been read but not written
- p. 8 Section 6.1, second paragraph
the case a TVar that has been read but not written
- p. 8 6.1
in the case a TVar that has been read
Judge's note: Seen in the page 8 image, Section 6.1, second paragraph.
Second check: none (judge only)
Report a problem with this finding
Typo Wrong preposition in Section 6.4: "the thread will wait on the union on the sets of TVars" (should be 'union of the sets'; later in the same paragraph it reads 'the union of the sets of TVars').
- p. 10 Section 6.4
wait on the union on the sets of TVars
- p. 10 Section 6.4, paragraph on both alternatives calling retry
wait on the union on the sets of
Judge's note: Seen in the page 10 image, Section 6.4.
Second check: none (judge only)
Report a problem with this finding
Typo Misspelling in Section 6.6: "a simple implemention of unbounded channels" (should be 'implementation').
- p. 10 Section 6.6, second paragraph
simple implemention of unbounded channels
Judge's note: Seen in the page 10 image, Section 6.6, second paragraph.
Second check: none (judge only)
Report a problem with this finding
Typo Appendix A, p.12: "we have become convinvced that we should" should read "convinced".
- p. 12 Appendix A, first sentence
we have become convinvced
- p. 12 Appendix A
convinvced
- p. 13 Appendix A
seems inconsisent
- p. 13 Appendix A
rasies an exception
Judge's note: Seen in crop C017-a: the image prints "convinvced". The other Appendix A typos this cluster mentions (inconsisent, rasies, insside, "To to", arument) are judged on their own in C021–C024.
Second check: none (judge only)
Report a problem with this finding
Typo Reference [4]: "Batchelors thesis" should read "Bachelor's thesis".
- p. 12 Reference [4]
Batchelors thesis
Judge's note: Crop C018-a shows the reference reading "Batchelors thesis, University of Cambridge Computer Laboratory, 2000." This is a misspelling.
Second check: none (judge only)
Report a problem with this finding
Typo Reference [18]: the author's surname is printed "MARTNEZ, J. F." with a letter missing (presumably Martínez).
- p. 12 Reference [18]
MARTNEZ, J. F., AND TORRELLAS, J.
Only the authors can say what is right here.
Judge's note: Rests on outside knowledge: that the first author of 'Speculative synchronization' (ASPLOS-X) is José F. Martínez. Crop C019-a shows "MARTNEZ, J. F., AND TORRELLAS, J." in the printed reference, so the letter is missing on the page itself and is not a text-extraction loss. This looks like a dropped accented character.
Second check: none (judge only)
Report a problem with this finding
Typo Appendix A, p.13: "seems inconsisent" should read "inconsistent".
- p. 13 Appendix A
seems inconsisent
- p. 13
seems inconsisent.
Judge's note: Seen in crop C020-a and on full page 13: "This treatment of effects that precede an exception seems inconsisent."
Second check: none (judge only)
Report a problem with this finding
Typo Appendix A, p.13: "if the computation rasies an exception" should read "raises".
- p. 13 Appendix A
if the computation rasies an exception
- p. 13 Appendix A
the computation rasies an exception
Judge's note: Seen in crop C020-a and on full page 13: "should be reverted if the computation rasies an exception."
Second check: none (judge only)
Report a problem with this finding
Typo Appendix A, p.13: "“look insside” a catch. To to this" should read "inside" and "To do this".
- p. 13 Appendix A
“look insside” a catch. To to this
- p. 13 Appendix A
look insside” a catch. To to this
Judge's note: Full page 13 shows "one that does not “look insside” a catch. To to this, we add a new STM evaluation context".
Second check: none (judge only)
Report a problem with this finding
Typo Appendix A, p.13: "run the first arument of catch" should read "argument".
- p. 13 Appendix A, final paragraph
run the first arument of catch
- p. 13 Appendix A, after XSTM rules
the first arument of catch
Judge's note: Full page 13, the paragraph after the XSTM rules, shows "All three rules run the first arument of catch".
Second check: none (judge only)