anchor.diff:  
   lock_release_atom() -> '_._concuerror_lock_release'.
   
  +-define( ONLY_INITIALLY, true).
  +-define(      SYMMETRIC, true).
  +-define(      CHECK_MSG, true).
  +-define(     ALLOW_SWAP, true).
  +-define(DONT_ALLOW_SWAP, false).
  +-define( DONT_CHECK_MSG, false).
  +
   -spec dependent(concuerror_sched:transition(),
                   concuerror_sched:transition()) -> boolean().
   
   dependent(A, B) ->
  -    dependent(A, B, true, true).
  -
  -dependent({Lid, _Instr1, _Msgs1}, {Lid, _Instr2, _Msgs2}, true, true) ->
  -    %% No need to take care of same Lid dependencies
  -    true;
  +    dependent(A, B, ?CHECK_MSG, ?ALLOW_SWAP).
  +
  +%% Instructions from the same process are always dependent
  +dependent({Lid, _Instr1, _Msgs1},
  +          {Lid, _Instr2, _Msgs2}, ?ONLY_INITIALLY, ?ONLY_INITIALLY) ->
  +    true;
  +
  +%% XXX: This should be fixed in sched:recent_dependency_cv and removed
  +dependent({_Lid1, _Instr1, _Msgs1},
  +          {_Lid2, Special, _Msgs2}, ?ONLY_INITIALLY, ?ONLY_INITIALLY)
  +  when Special =:= 'block'; Special =:= 'init' ->
  +    false;
   
   %% Register and unregister have the same dependencies.
   %% Use a unique value for the Pid to avoid checks there.
  -dependent({Lid, {unregister, RegName}, Msgs}, B, true, true) ->
  -    dependent({Lid, {register, {RegName, make_ref()}}, Msgs}, B, true, true);
  -dependent(A, {Lid, {unregister, RegName}, Msgs}, true, true) ->
  -    dependent(A, {Lid, {register, {RegName, make_ref()}}, Msgs}, true, true);
  -
  -
  -%% Decisions depending on messages sent and receive statements:
  +dependent({Lid, {unregister, RegName}, Msgs}, B,
  +          ?ONLY_INITIALLY, ?ONLY_INITIALLY) ->
  +    dependent({Lid, {register, {RegName, make_ref()}}, Msgs}, B,
  +              ?ONLY_INITIALLY, ?ONLY_INITIALLY);
  +dependent(A, {Lid, {unregister, RegName}, Msgs},
  +          ?ONLY_INITIALLY, ?ONLY_INITIALLY) ->
  +    dependent(A, {Lid, {register, {RegName, make_ref()}}, Msgs},
  +              ?ONLY_INITIALLY, ?ONLY_INITIALLY);
  +
  +
  +%% Decisions depending on send and receive statements:
   
   %% Sending to the same process:
   dependent({_Lid1, Instr1, PreMsgs1} = Trans1,
             {_Lid2, Instr2, PreMsgs2} = Trans2,
  -          true, true) ->
  +          ?CHECK_MSG, ?ONLY_INITIALLY) ->
       Check =
           case {PreMsgs1, Instr1, PreMsgs2, Instr2} of
               {[_|_], _, [_|_], _} ->
  
positive.code:             lists:foldl(Fold, false, Keys)
      end;
  dependent_ets({insert_new, [_, _, _, _, _, false]},
                {insert_new, [_, _, _, _, _, false]}, false) ->
      false;
  dependent_ets({insert_new, [T, _, Keys1, KP, _Objects1, _Status1]},
                {insert_new, [T, _, Keys2, KP, _Objects2, _Status2]}, false) ->
      ordsets:intersection(Keys1, Keys2) =/= [];
  dependent_ets({insert_new, [T, _, Keys1, KP, _Objects1, _Status1]},
                {insert, [T, _, Keys2, KP, _Objects2, true]}, _Swap) ->
      ordsets:intersection(Keys1, Keys2) =/= [];
  dependent_ets({Insert, [T, _, Keys, _KP, _Objects1, true]},
                {lookup, [T, _, K]}, _Swap)
    when Insert =:= insert; Insert =:= insert_new ->
      ordsets:is_element(K, Keys);
  dependent_ets({delete, [T, _]}, {_, [T|_]}, _Swap) ->
      true;
  dependent_ets({new, [_Tid1, Name, Options1]},
                {new, [_Tid2, Name, Options2]}, false) ->
      lists:member(named_table, Options1) andalso
          lists:member(named_table, Options2);
  dependent_ets(Op1, Op2, false) ->
      dependent_ets(Op2, Op1, true);
  dependent_ets(_Op1, _Op2, true) ->
      false.
  
negative.code: %% Table owners exits mess things up.
  dependent({_Lid1, { ets, {   _Op,                     [Table|_Rest]}}, _Msgs1},
            {_Lid2, {exit, {normal, {{_Heirs, Tables}, _Name, _Links}}}, _Msgs2},
            _CheckMsg, _AllowSwap) ->
      lists:keymember(Table, 1, Tables);
  
  %% Heirs exit should also be monitored.
  %% Links exit should be monitored to be sure that messages are captured.
  dependent({Lid1, {exit, {normal, {{Heirs1, _Tbls1}, _Name1, Links1}}}, _Msgs1},
            {Lid2, {exit, {normal, {{Heirs2, _Tbls2}, _Name2, Links2}}}, _Msgs2},
            _CheckMsg, ?SYMMETRIC) ->
      lists:member(Lid1, Heirs2) orelse lists:member(Lid2, Heirs1) orelse
          lists:member(Lid1, Links2) orelse lists:member(Lid2, Links1);
  
  