anchor.diff:      store(ctpg,[A,B,C]),
       dbg:ctpg(A,B,C).
   
  +ms(return) ->
  +    [{'_',[],[{return_trace}]}];
  +ms(caller) ->
  +    [{'_',[],[{message,{caller}}]}];
  +ms({codestr, FunStr}) ->
  +    {ok, MS} = string2ms(FunStr),
  +    MS;
  +ms(Other) ->
  +    Other.
  +
  +-spec string2ms(string()) -> {ok, list()} | {error, fun_format}.
  +string2ms(FunStr) ->
  +    case erl_scan:string(fix_dot(FunStr)) of
  +	{ok, Tokens, _} ->
  +	    case erl_parse:parse_exprs(Tokens) of
  +		{ok, [Expression]} ->
  +		    case Expression of
  +			{_, _, {clauses, Clauses}} ->
  +			    {ok, ms_transform:transform_from_shell(dbg, Clauses, [])};
  +			_ ->
  +			    {error, fun_format}
  +		    end;
  +		_ ->
  +		    {error, fun_format}
  +	    end;
  +	_ ->{error, fun_format}
  +    end.
  +
  +-spec fix_dot(string()) -> string().
  +fix_dot(FunStr) ->
  +    [H | Rest]  = lists:reverse(FunStr),
  +    case H of
  +	$. ->
  +	    FunStr;
  +	H ->
  +	    lists:reverse([$., H | Rest])
  +    end.
   
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   %%% Support for sequential trace
  
positive.code: %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  %%% Trace pattern
  tp(A,B) ->
      store(tp,[A,B]),
      dbg:tp(A,B).
  tp(A,B,C) ->
      store(tp,[A,B,C]),
      dbg:tp(A,B,C).
  tp(A,B,C,D) ->
      store(tp,[A,B,C,D]),
      dbg:tp(A,B,C,D).
  
  tpl(A,B) ->
      store(tpl,[A,B]),
      dbg:tpl(A,B).
  tpl(A,B,C) ->
      store(tpl,[A,B,C]),
      dbg:tpl(A,B,C).
  tpl(A,B,C,D) ->
      store(tpl,[A,B,C,D]),
      dbg:tpl(A,B,C,D).
  
  ctp() ->
      store(ctp,[]),
  
negative.code: stop_opts(Opts) ->
      case {lists:member(format,Opts), lists:member(return, Opts)} of
  	{true, _} ->
  	    format; % format implies fetch
  	{_, true} ->
  	    fetch; % if we specify return, the data should be fetched
  	_ ->
  	    case lists:member(fetch,Opts) of
  		true -> fetch;
  		false -> nofetch
  	    end
      end.
  
  