anchor.diff:  %% gen_server
   %% ===================================================================
   
  +-type server_info() :: 
  +    {Ref::term(), Apps::[nksip:app_id()], Server::pid(), Mon::reference()}.
  +
  +-type app_info() ::
  +    {{App::nksip:app_id(), Ref::term()}, Mon::reference()}.
  +
  +
   -record(state, {
  -    servers :: [],
  -    apps :: []
  +    servers = [] :: [server_info()],
  +    apps = [] :: [app_info()]
   }).
   
   
  
positive.code:     gen_server_info(#state{}).
  
  handle_info({'DOWN', MRef, process, _Pid, _Reason}, State) ->
      #state{apps=Apps} = State,
      case lists:keyfind(MRef, 2, Apps) of
          {{AppId, Ref}, _} -> 
              {reply, _, State1} = handle_call({stop, AppId, Ref}, none, State),
              {noreply, State1};
          false ->
              {noreply, State}
      end.
  
  
  
negative.code:     case lists:keytake(Ref, 1, Servers) of
          false ->
              {reply, {error, not_found}, State};
          {value, {_, WebApps, WebPid, WebMon}, Rest} ->
              Apps1 = case lists:keytake({AppId, Ref}, 1, Apps) of
                  false -> Apps;
                  {value, {_, AppMon}, RestApps} -> erlang:demonitor(AppMon), RestApps
              end,
              State1 = State#state{apps=Apps1},
              case lists:member(AppId, WebApps) of
                  true ->
                      case WebApps -- [AppId] of
                          [] ->
                              erlang:demonitor(WebMon),
                              Reply = do_stop_server(Ref),
                              {reply, Reply, State1#state{servers=Rest}};
                          WebApps1 ->
                              Servers1 = [{Ref, WebApps1, WebPid, WebMon}|Rest],
                              {reply, ok, State1#state{servers=Servers1}}
                      end;
                  false ->
  