anchor.diff:  
   mass(end_of_trace = T) ->  T;
   
  -mass({port_info, Info}) -> handle_porti(Info), [];
  -mass({proc_info, Info}) -> handle_proci(Info), [];
  -mass({trace_info, Info}) -> handle_traci(Info), [];
  -
  -mass({trace, A, B, C})    -> mass(A, B, C, no_time);
  -mass({trace, A, B, C, D}) -> mass(A, B, {C, D}, no_time);
  -mass({_, A, B, C, TS})    -> mass(A ,B, C, TS);
  -mass({_, A, B, C, D, TS}) -> mass(A, B, {C, D}, TS);
  -mass(X)                   -> ?log({unrec_msg, X}), [].
  -
  -mass(Pid, T=send, X, TS) ->                         mass_send(Pid,T,X,TS);
  -mass(Pid, T=send_to_non_existing_process, X,TS) ->  mass_send(Pid,T,X,TS);
  -mass(Pid, T='receive', Message, TS) ->              {T,pi(Pid),Message,TS};
  -mass(Pid, T=call, MFA, TS) ->                       {T,pi(Pid),MFA,TS};
  -mass(Pid, T=return_to, MFA, TS) ->                  {T,pi(Pid),MFA,TS};
  -mass(Pid, T=return_from, {MFA,R}, TS) ->            {T,pi(Pid),{MFA,R},TS};
  -mass(Pid, T=spawn, {P2, MFA}, TS) ->  ins({P2,MFA}),{T,pi(Pid),{pi(P2),MFA},TS};
  -mass(Pid, T=exit, Reason, TS) ->                    {T,pi(Pid),Reason,TS};
  -mass(Pid, T=link, Pd, TS) ->                        {T,pi(Pid),pi(Pd),TS};
  -mass(Pid, T=unlink, Pd, TS) when is_pid(Pd) ->      {T,pi(Pid),pi(Pd),TS};
  -mass(Pid, T=unlink, _Crap, TS) ->                   {T,pi(Pid),unknown,TS};
  -mass(Pid, T=getting_linked, Pd, TS) ->              {T,pi(Pid),pi(Pd),TS};
  -mass(Pid, T=getting_unlinked, Pd, TS) ->            {T,pi(Pid),pi(Pd),TS};
  -mass(Pid, T=register, Nm, TS) ->      ins({Pid,Nm}),{T,pi(Pid),Nm,TS};
  -mass(Pid, T=unregister, Name, TS) ->      del(Name),{T,pi(Pid),Name,TS};
  -mass(Pid, T=in, MFA, TS) ->                         {T,pi(Pid),MFA,TS};
  -mass(Pid, T=out, MFA, TS) ->                        {T,pi(Pid),MFA,TS};
  -mass(Pid, T=gc_start, Info, TS) ->                  {T,pi(Pid),Info,TS};
  -mass(Pid, T=gc_end, Info, TS) ->                    {T,pi(Pid),Info,TS}.
  -
  -mass_send(Pid, T, {Msg, To}, TS) when is_pid(To); is_port(To) ->
  -  {T,pi(Pid),{pi(To), Msg},TS};
  -mass_send(Pid, T, {Msg, To}, TS) when is_atom(To) ->
  -  {T,pi(Pid),{{find_pid(To),To}, Msg},TS};
  -mass_send(Pid, T, {Msg, {To,Node}}, TS) when is_atom(To), Node==node(Pid) ->
  -  {T,pi(Pid),{{find_pid(To),To}, Msg},TS};
  -mass_send(Pid, T, {Msg, {To,Node}}, TS) when is_atom(To), is_atom(Node) ->
  -  {T,pi(Pid),{{remote,{To,Node}}, Msg},TS}.
  +mass({port_info,Info}) -> handle_porti(Info),[];
  +mass({proc_info,Info}) -> handle_proci(Info),[];
  +mass({trace_info,Info}) -> handle_traci(Info),[];
  +
  +mass({trace,A,B,C})    -> mass(A,B,C,no_time);
  +mass({trace,A,B,C,D}) -> mass(A,B,{C,D},no_time);
  +mass({_,A,B,C,TS})    -> mass(A ,B,C,TS);
  +mass({_,A,B,C,D,TS}) -> mass(A,B,{C,D},TS);
  +mass(X)                   -> ?log({unrec_msg,X}),[].
  +
  +mass(Pid,T=send,X,TS) ->                         mass_send(Pid,T,X,TS);
  +mass(Pid,T=send_to_non_existing_process,X,TS) -> mass_send(Pid,T,X,TS);
  +mass(Pid,T='receive',Message,TS) ->              {T,pi(Pid),Message,TS};
  +mass(Pid,T=call,MFA,TS) ->                       {T,pi(Pid),MFA,TS};
  +mass(Pid,T=return_to,MFA,TS) ->                  {T,pi(Pid),MFA,TS};
  +mass(Pid,T=return_from,{MFA,R},TS) ->            {T,pi(Pid),{MFA,R},TS};
  +mass(Pid,T=spawn,{P2,MFA},TS) ->  ins({P2,MFA}),{T,pi(Pid),{pi(P2),MFA},TS};
  +mass(Pid,T=exit,Reason,TS) ->                    {T,pi(Pid),Reason,TS};
  +mass(Pid,T=link,Pd,TS) ->                        {T,pi(Pid),pi(Pd),TS};
  +mass(Pid,T=unlink,Pd,TS) when is_pid(Pd) ->      {T,pi(Pid),pi(Pd),TS};
  +mass(Pid,T=unlink,_Crap,TS) ->                   {T,pi(Pid),unknown,TS};
  +mass(Pid,T=getting_linked,Pd,TS) ->              {T,pi(Pid),pi(Pd),TS};
  +mass(Pid,T=getting_unlinked,Pd,TS) ->            {T,pi(Pid),pi(Pd),TS};
  +mass(Pid,T=register,Nm,TS) ->      ins({Pid,Nm}),{T,pi(Pid),Nm,TS};
  +mass(Pid,T=unregister,Name,TS) ->      del(Name),{T,pi(Pid),Name,TS};
  +mass(Pid,T=in,MFA,TS) ->                         {T,pi(Pid),MFA,TS};
  +mass(Pid,T=out,MFA,TS) ->                        {T,pi(Pid),MFA,TS};
  +mass(Pid,T=gc_start,Info,TS) ->                  {T,pi(Pid),Info,TS};
  +mass(Pid,T=gc_end,Info,TS) ->                    {T,pi(Pid),Info,TS}.
  +
  +mass_send(Pid,T,{Msg,To},TS) when is_pid(To); is_port(To) ->
  +  {T,pi(Pid),{pi(To),Msg},TS};
  +mass_send(Pid,T,{Msg,To},TS) when is_atom(To) ->
  +  {T,pi(Pid),{{find_pid(To),To},Msg},TS};
  +mass_send(Pid,T,{Msg,{To,Node}},TS) when is_atom(To),Node==node(Pid) ->
  +  {T,pi(Pid),{{find_pid(To),To},Msg},TS};
  +mass_send(Pid,T,{Msg,{To,Node}},TS) when is_atom(To),is_atom(Node) ->
  +  {T,pi(Pid),{{remote,{To,Node}},Msg},TS}.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   pi(file_driver) -> {trace,file_driver};
   pi(Port) when is_port(Port) ->
     case ets_lup(Port) of
  -    [] -> {Port, unknown};
  -    Name -> {Port, Name}
  +    [] -> {Port,unknown};
  +    Name -> {Port,Name}
     end;
   pi(Pid) when is_pid(Pid) ->
     case ets_lup(Pid) of
  -    [] -> {Pid, unknown};
  -    {M,F,A} when is_list(A) -> {Pid, {M,F,length(A)}};
  -    Name -> {Pid, Name}
  +    [] -> {Pid,unknown};
  +    {M,F,A} when is_list(A) -> {Pid,{M,F,length(A)}};
  +    Name -> {Pid,Name}
     end.
   
   find_pid(Name) -> ets_lup(Name).
   
   
  -handle_porti(Is) -> lists:foreach(fun(I)->ins(I) end, Is).
  -
  -handle_proci(Is) -> lists:foreach(fun(I)->ins(I) end, Is).
  +handle_porti(Is) -> lists:foreach(fun(I)->ins(I) end,Is).
  +
  +handle_proci(Is) -> lists:foreach(fun(I)->ins(I) end,Is).
   
   handle_traci(_I) -> ok.
   
  -%%% sherk_scan table translates Pid -> Tag, where Tag can be;
  +%%% sherk_scan table translates Pid -> Tag,where Tag can be;
   %%% atom() -  (a registered name)
   %%% tuple(atom(),atom(),integer()) - an initial call (we missed the spawn)
   %%% tuple(atom(),atom(),list()) - info from spawn
  
positive.code: %%%  Min - integer() - min sequence number
  %%%  Max - integer() - max sequence number
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  go(FileName, Patt, CBs, '', Max) ->
    go(FileName, Patt, CBs, 0, Max);
  go(FileName, _Patt, raw, Min, Max) ->
    {ok, FD} = file:open(FileName, [read, raw, binary,compressed]),
    State = #state{min=Min,max=Max},
    file_action(FD, State, fun raw/2),
    file:close(FD);
  go(FileName, Patt, CBs, Min, Max) ->
    sherk_ets:new(?MODULE),
    {ok, FD} = file:open(FileName, [read,raw,binary,compressed]),
    State = #state{pattern=Patt,cbs=cbs(CBs),min=Min,max=Max},
    St = file_action(FD, State, fun do/2),
    file:close(FD),
    {hits, St#state.hits}.
  
  -define(CHUNKSIZE, 100000).
  file_action(FD, Stat,Fun) ->
    file_action(make_chunk(FD, <<>>), FD, Stat, Fun).
  
  file_action(_, _FD, #state{eof = true} = Stat, Fun) ->
    Fun(end_of_trace, Stat);
  file_action(eof, _FD, Stat, Fun) ->
    Fun(end_of_trace, Stat);
  file_action({Term, Rest}, FD, Stat, Fun) ->
    file_action(make_chunk(FD, Rest), FD, Fun(Term, Stat), Fun).
  
  make_chunk(_FD, eof) ->
    eof;
  make_chunk(FD, <<0, Size:32, Tal/binary>> = Bin) ->
    case Tal of
      <<Term:Size/binary, Tail/binary>> -> {binary_to_term(Term), Tail};
      _ -> make_chunk(FD, get_more_bytes(FD, Bin))
    end;
  make_chunk(FD, B) when size(B) < 5 ->
    make_chunk(FD, get_more_bytes(FD, B)).
  
  get_more_bytes(FD, Rest) ->
    case file:read(FD, ?CHUNKSIZE) of
      {ok, Bin} -> <<Rest/binary, Bin/binary>>;
      _ -> eof
    end.
  
  
negative.code:     _ -> State
    end.
  
  raw_out(_Mess,State = #state{seq=Seq}) ->
    case {State#state.min < Seq,Seq < State#state.max} of
      {true,true} ->
        %%io:fwrite("~w - ~w~n",[Seq,Mess]),
        State#state{seq=Seq+1};
  