anchor.diff:  
   %% Internal functions
   %% Handle callback module return values
  -handle_callback({no_output, NewModState}, #state{timeout=Timeout}=State) ->
  -    {next_state, executing, State#state{modstate=NewModState}, Timeout};
  -handle_callback({no_output, NewModState, TempTimeout}, #state{timeout=Timeout}=State) when TempTimeout < Timeout ->
  -    {next_state, executing, State#state{modstate=NewModState, cb_timeout=true}, TempTimeout};
  -handle_callback({output, Output, NewModState}, #state{timeout=Timeout}=State) ->
  +handle_callback({no_output, NewModState}, State) ->
  +    {next_state, executing, State#state{modstate=NewModState}};
  +handle_callback({no_output, NewModState, PhaseTimeout}, #state{flow_timeout=Timeout}=State) when PhaseTimeout < Timeout ->
  +    {next_state, executing, State#state{modstate=NewModState}, PhaseTimeout};
  +handle_callback({output, Output, NewModState}, State) ->
       State1 = route_output(Output, State),
  -    {next_state, executing, State1#state{modstate=NewModState}, Timeout};
  -handle_callback({output, Output, NewModState, TempTimeout}, #state{timeout=Timeout}=State) when TempTimeout < Timeout ->
  +    {next_state, executing, State1#state{modstate=NewModState}};
  +handle_callback({output, Output, NewModState, PhaseTimeout}, #state{flow_timeout=Timeout}=State) when PhaseTimeout < Timeout ->
       State1 = route_output(Output, State),
  -    {next_state, executing, State1#state{modstate=NewModState, cb_timeout=true}, TempTimeout};
  +    {next_state, executing, State1#state{modstate=NewModState}, PhaseTimeout};
   handle_callback({stop, Reason, NewModState}, State) ->
       {stop, Reason, State#state{modstate=NewModState}};
   handle_callback(BadValue, _State) ->
  
positive.code:                     true ->
                          1
                  end,
      {next_state, executing, State#state{lead_partner=Lead, partners=Partners, done_count=DoneCount}, Timeout};
  executing({partners, _, _}, State) ->
      {stop, {error, no_convergence}, State};
  executing({inputs, Input}, #state{mod=PhaseMod, modstate=ModState, timeout=Timeout}=State) ->
      handle_callback(PhaseMod:handle_input(Input, ModState, Timeout), State);
  executing(inputs_done, #state{mod=PhaseMod, modstate=ModState, done_count=DoneCount0}=State) ->
      case DoneCount0 - 1 of
  
negative.code:             luke_phases:send_inputs_done(Next)
      end,
      {stop, normal, State};
  executing(timeout, #state{mod=Mod, modstate=ModState}=State) ->
      handle_callback(Mod:handle_timeout(ModState), State);
  executing(timeout, State) ->
      {stop, normal, State};
  executing(Event, #state{mod=PhaseMod, modstate=ModState}=State) ->
      handle_callback(PhaseMod:handle_event(Event, ModState), State).
  
  handle_event(_Event, StateName, State) ->
      {next_state, StateName, State}.
  
  handle_sync_event(_Event, _From, StateName, State) ->
      {reply, ignored, StateName, State}.
  handle_info(timeout, executing, #state{mod=Mod, modstate=ModState}=State) ->
      handle_callback(Mod:handle_timeout(ModState), State);
  handle_info(Info, _StateName, #state{mod=PhaseMod, modstate=ModState}=State) ->
      handle_callback(PhaseMod:handle_info(Info, ModState), State).
  
  