check out "deterministic simulation testing of distributed systems" by a foundationdb guy

I
  begin
    read x
    incr x
    read again, ensure only once
  commit

A
  begin
    read x
    incr x
    maybe abort and roll back?
    incr x
    read value x for verification
    maybe abort and roll back?
    read value x for verification
    maybe abort and roll back?
  commit

D
  data verifier
  committed tuple checker

