anchor.diff:  %% STUB
   dependent(TransitionA, TransitionB) -> true.
   
  -run_selected(Transition, #flanagan_state{must_replay = true} = State) ->
  -    run_selected(Transition, replay_trace(State));
  -run_selected({Lid, Instruction}, State) ->
  -    Next = wait_next(Lid, State),
  -    UpdatedState = handle_instruction(Instruction, Lid, State),
  -    {Next, UpdatedState}.
  +%% - add new entry with new entry
  +%% - wait next of current process
  +%% - wait any possible additional messages
  +%% - check for async
  +update_trace(Selected, Next, State) ->
  +    UpdatedState = handle_instruction(Selected, State),
  +    UpdatedState.
   
   %% STUB
   replay_trace(State) ->
       State.
   
  -wait_next(Lid, State) ->
  -    ok = resume(Lid, State),
  +wait_next(Lid) ->
  +    ok = resume(Lid),
       receive
  -        #sched{msg = Type, lid = Lid, misc = Misc} ->
  +        #sched{msg = Type, lid = Lid, misc = Misc, type = next} ->
               case Type of
                   error -> {error, Misc};
                   _Else -> {ok, {Lid, {Type, Misc}}}
               end
       end.
   
  -resume(Lid, #flanagan_state{lid_to_pid = LidToPid}) ->
  -    Pid = dict:fetch(Lid, LidToPid),
  +resume(Lid) ->
  +    Pid = lid:get_pid(Lid),
       Pid ! #sched{msg = continue},
       ok.
   
   %% STUB
  -handle_instruction({spawn, Opts}, Lid, State) ->
  -    Parent = Lid,
  -    ChildPid =
  -        receive
  -            #sched{msg = spawned, lid = Parent, misc = ChildPid0} ->
  -                ChildPid0
  -        end,
  +handle_instruction({Lid, {spawn, Opts}}, State) ->
  +    %% Parent = Lid,
  +    %% [TraceTop|RestTrace] = Trace,
  +    %% #trace_state{i = N, next = Next, clock_map = ClockMap} = TraceTop,
  +    %% NewStep = #trace_state{i = N+1, last = Transition},
  +
  +    %% #flanagan_state{trace = [TraceTop|RestTrace]
  +    %% ChildPid =
  +    %%     receive
  +    %%         #sched{msg = spawned, lid = Parent, misc = Pid, type = prev} ->
  +    %%             Pid
  +    %%     end,
  +    %% ChildNextInstr =
  +    %%     receive
  +    %%         #sched{msg = Next, lid = ChildPid, misc = Misc, type = next} ->
  +    %%             {Next, Misc}
  +    %%     end,
  +    
       State.
   
   %% STUB
  
positive.code: 	  i         = 0                 :: s_i(),
  	  last                          :: transition(),
  	  enabled   = ordsets:new()     :: ordsets:ordset(), %% set(lid:lid()),
  	  next      = dict:new()        :: dict(), %% dict(lid:lid(), instr()),
  	  backtrack = ordsets:new()     :: ordsets:ordset(), %% set(lid:lid()),
  	  done      = ordsets:new()     :: ordsets:ordset(), %% set(lid:lid()),
  
negative.code:                   error          :: ?NO_ERROR | error:error(),
                    state          :: state:state()}).
  
  
  %% 'next' messages are about next instrumented instruction not yet dispatched
  %% 'prev' messages are about additional effects of a dispatched instruction
  %% 'async' messages are about receives which have become enabled
  -type sched_msg_type() :: 'next' | 'prev' | 'async'.
  
  %% Internal message format
  %%
  %% msg    : An atom describing the type of the message.
  %% pid    : The sender's LID.
  %% misc   : Optional arguments, depending on the message type.
  -record(sched, {msg          :: atom(),
                  lid          :: lid:lid(),
                  misc = empty :: term(),
                  type = next  :: sched_msg_type()}).
  
  %% Special internal message format (fields same as above).
  -record(special, {msg :: atom(),
  