anchor.diff:  
   %% External exports
   -export([
  -	start/0, start_link/0, start_link/1,
  -	parse/1, parse/2
  +	start_link/1, parse/1, parse/2
   ]).
   
   %% gen_server callbacks
   -export([init/1, handle_call/3, handle_cast/2,
   	handle_info/2, code_change/3, terminate/2]).
   
  --define(RETRY,   1).
  --define(PORT_TIMEOUT, 30000).
  --define(TIMEOUT, ?PORT_TIMEOUT*16).
  +-define(TIMEOUT, 120000).
   
  --record(state, {port}).
  +-record(state, {port, queue = queue:new()}).
   
  -start() ->
  -	gen_server:start(?MODULE, [], []).
   start_link(_) ->
  -	start_link().
  -start_link() ->
   	gen_server:start_link(?MODULE, [], []).
   
   parse(Data) ->
  
positive.code: %% ===================================================================
  
  init(_) ->
  	process_flag(trap_exit, true),
  	{ok, #state{port = start_port()}}.
  
  handle_call({parse, Data, Headers}, From, State) ->
  	handle_call({parse, Data, Headers, ?RETRY}, From, State);
  handle_call({parse, _Data, _Headers, 0}, _From, #state{port = Port} = State) ->
  	{reply, {error, undefined}, State#state{port = restart_port(Port)}};
  handle_call({parse, Data, Headers, Cnt}, From, #state{port = Port} = State) ->
  	port_command(Port, term_to_binary({parse, Data, Headers})),
  	receive
  		{Port, {data, PData}} ->
  			{reply, binary_to_term(PData), State};
  		{'EXIT', Port, _Reason} ->
  			handle_call({parse, Data, Headers, Cnt-1}, From, State#state{port = start_port()})
  	after ?PORT_TIMEOUT ->
  		handle_call({parse, Data, Headers, Cnt-1}, From, State#state{port = restart_port(Port)})
  	end.
  
  handle_cast(_Request, State) ->
  	{noreply, State}.
  
  handle_info({'EXIT', Port, _Reason}, #state{port = Port} = State) ->
  	{noreply, State#state{port = start_port()}};
  handle_info(_Info, State) ->
  	{noreply, State}.
  
  
negative.code: 
  terminate(_Reason, _State) ->
  	ok.
  