anchor.diff:  
   do_check_childspec(#{restart := RestartType,
   		     type := ChildType} = ChildSpec)->
  -    Name = case ChildSpec of
  -	       #{id := N} -> N;
  +    Id = case ChildSpec of
  +	       #{id := I} -> I;
   	       _ -> throw(missing_id)
   	   end,
       Func = case ChildSpec of
   	       #{start := F} -> F;
   	       _ -> throw(missing_start)
   	   end,
  -    validName(Name),
  +    validId(Id),
       validFunc(Func),
       validRestartType(RestartType),
       validChildType(ChildType),
  
positive.code: 	{error, Reason} ->
  	    NState = replace_child(Child#child{pid = restarting(OldPid)}, State),
  	    report_error(start_error, Reason, Child, State#state.name),
  	    {try_again, NState, Child#child.name}
      end;
  restart(rest_for_one, Child, State) ->
      {ChAfter, ChBefore} = split_child(Child#child.name, State#state.children),
      ChAfter2 = terminate_children(ChAfter, State#state.name),
      case start_children(ChAfter2, State#state.name) of
  	{ok, ChAfter3} ->
  	    {ok, State#state{children = ChAfter3 ++ ChBefore}};
  	{error, ChAfter3, {failed_to_start_child, ChName, _Reason}}
  	  when ChName =:= Child#child.name ->
  	    NChild = Child#child{pid=restarting(Child#child.pid)},
  	    NState = State#state{children = ChAfter3 ++ ChBefore},
  	    {try_again, replace_child(NChild,NState), ChName};
  	{error, ChAfter3, {failed_to_start_child, ChName, _Reason}} ->
  	    NChild = lists:keyfind(ChName, #child.name, ChAfter3),
  	    NChild2 = NChild#child{pid=?restarting(undefined)},
  	    NState = State#state{children = ChAfter3 ++ ChBefore},
  	    {try_again, replace_child(NChild2,NState), ChName}
      end;
  restart(one_for_all, Child, State) ->
      Children1 = del_child(Child#child.name, State#state.children),
      Children2 = terminate_children(Children1, State#state.name),
      case start_children(Children2, State#state.name) of
  	{ok, NChs} ->
  	    {ok, State#state{children = NChs}};
  	{error, NChs, {failed_to_start_child, ChName, _Reason}}
  	  when ChName =:= Child#child.name ->
  	    NChild = Child#child{pid=restarting(Child#child.pid)},
  	    NState = State#state{children = NChs},
  	    {try_again, replace_child(NChild,NState), ChName};
  	{error, NChs, {failed_to_start_child, ChName, _Reason}} ->
  	    NChild = lists:keyfind(ChName, #child.name, NChs),
  	    NChild2 = NChild#child{pid=?restarting(undefined)},
  	    NState = State#state{children = NChs},
  	    {try_again, replace_child(NChild2,NState), ChName}
      end.
  
  restarting(Pid) when is_pid(Pid) -> ?restarting(Pid);
  
negative.code:     lists:keyfind(Pid, #child.pid, State#state.children);
  get_child_and_args(?restarting(Pid)=RPid, State) when is_pid(Pid) ->
      lists:keyfind(RPid, #child.pid, State#state.children);
  get_child_and_args(Id, State)  ->
      lists:keyfind(Id, #child.id, State#state.children).
  
  %%-----------------------------------------------------------------
  %% Func: init_state/4
  