anchor.diff:           add_edges/3,
            add_vertex/1,
            add_vertices/1]).
  +
  +%% Utility
  +-export([to_dot/0,
  +         export_dot/1]).
   
   %% Test
   -export([n_vertices/0,
  
positive.code: add_edges(Src, Dst, Pid) ->
      gen_server:call(?MODULE, {add_edges, Src, Dst, Pid}, infinity).
  
  n_vertices() ->
      gen_server:call(?MODULE, n_vertices, infinity).
  
  
negative.code: handle_call({add_vertices, Vs}, _From, #state{dag=Dag}=State) ->
      [digraph:add_vertex(Dag, V) || V <- Vs],
      {reply, ok, State};
  
  handle_call(to_dot, _From, #state{dag=Dag}=State) ->
      io:format(to_dot(Dag)),
      {reply, ok, State};
  
  handle_call({export_dot, Path}, _From, #state{dag=Dag}=State) ->
      R = file:write_file(Path, to_dot(Dag)),
      {reply, R, State};
  
  %% @doc Check if linking the given vertices will introduce a cycle in the graph.
  %%
  