anchor.diff:  
   -type strategy() :: 'one_for_all' | 'one_for_one'
                     | 'rest_for_one' | 'simple_one_for_one'.
  +
  +-type sup_flags() :: #{strategy => strategy(),         % optional
  +		       intensity => non_neg_integer(), % optional
  +		       period => pos_integer()}        % optional
  +                   | {RestartStrategy :: strategy(),
  +                      Intensity :: non_neg_integer(),
  +                      Period :: pos_integer()}.
  +
  +%%--------------------------------------------------------------------------
  +%% Defaults
  +-define(default_flags, #{strategy  => one_for_one,
  +			 intensity => 1,
  +			 period    => 5}).
  +-define(default_child_spec, #{restart  => permanent,
  +			      type     => worker}).
  +%% Default 'shutdown' is 5000 for workers and infinity for supervisors.
  +%% Default 'modules' is [M], where M comes from the child's start {M,F,A}.
   
   %%--------------------------------------------------------------------------
   
  
positive.code: check_startspec([], Res) ->
      {ok, lists:reverse(Res)}.
  
  check_childspec({Name, Func, RestartType, Shutdown, ChildType, Mods}) ->
      catch check_childspec(Name, Func, RestartType, Shutdown, ChildType, Mods);
  check_childspec(X) -> {invalid_child_spec, X}.
  
  check_childspec(Name, Func, RestartType, Shutdown, ChildType, Mods) ->
      validName(Name),
      validFunc(Func),
      validRestartType(RestartType),
      validChildType(ChildType),
      validShutdown(Shutdown, ChildType),
      validMods(Mods),
      {ok, #child{name = Name, mfargs = Func, restart_type = RestartType,
  		shutdown = Shutdown, child_type = ChildType, modules = Mods}}.
  
negative.code: 
  set_flags(Flags, State) ->
      try check_flags(Flags) of
  	#{strategy := Strategy, intensity := MaxIntensity, period := Period} ->
  	    {ok, State#state{strategy = Strategy,
  			     intensity = MaxIntensity,
  			     period = Period}}
  