anchor.diff:  %% @doc register a process with InstanceId and Name
   %% @spec register_process(term(), term(), pid()) -> ok
   register_process(InstanceId, Name, Pid) ->
  -    
       erlang:put(instance_id, InstanceId),
       erlang:put(instance_name, Name),
       cs_send:send_local(get_pid() , {register_process, InstanceId, Name, Pid}),
  
positive.code:     AllGroups = find_all_groups(ets:tab2list(?MODULE), gb_sets:new()),
      GroupsAsJson = {array, lists:foldl(fun(El, Rest) -> [{struct, [{id, El}, {text, El}, {leaf, false}]} | Rest] end, [], gb_sets:to_list(AllGroups))},
      GroupsAsJson.
   
  %% @doc find processes in a group (for web interface)
  %% @spec get_processes_in_group(term()) -> term()
  get_processes_in_group(Group) ->
      AllProcesses = find_processes_in_group(ets:tab2list(?MODULE), gb_sets:new(), Group),
      ProcessesAsJson = {array, lists:foldl(fun(El, Rest) -> [{struct, [{id, toString(El)}, {text, toString(El)}, {leaf, true}]} | Rest] end, [], gb_sets:to_list(AllProcesses))},
      ProcessesAsJson.
      
  
  
  get_all_pids() ->   
      [X || [X]<- ets:match(?MODULE, {'_','$1'})].
      
  %%====================================================================
  %% API
  %%====================================================================
  
negative.code: -spec(lookup_process/1 :: (pid()) -> {any(), any()} | failed).
  lookup_process(Pid) ->
      case ets:match(?MODULE, {'$1',Pid}) of
          [[{Group, Name}]] ->
              {Group, Name};
          [] ->
              failed
      end.
  
  %% @doc tries to find a cs_node process
  