anchor.diff:  new(Name) ->
       ets:new(Name, [named_table,set,protected,{keypos,1}]).
   
  -%% add_built_in(Functor, Database) -> NewDatabase.
  +%% add_built_in(Db, Functor) -> NewDb.
   %%  Add Functor as a built-in in the database.
   
   add_built_in(Db, Functor) ->
  
positive.code: 	[] -> undefined				%Undefined
      end.
  
  %% get_interp_functors(Database) -> [Functor].
  
  get_interpreted_functors(Db) ->
      ets:foldl(fun ({Func,clauses,_,_}, Fs) -> [Func|Fs];
  
negative.code: %%  Retract (remove) the clause with tag ClauseTag from the list of
  %%  clauses of Functor.
  
  retract_clause(Db, Functor, Tag) ->
      case ets:lookup(Db, Functor) of
  	[{_,built_in}] -> error;		%Can't retract here
  	[{_,code,_}] -> error;			%Can't retract here
  	[{_,clauses,Nt,Cs}] ->
  	    ets:insert(Db, {Functor,clauses,Nt,lists:keydelete(Tag, 1, Cs)}),
  	    {ok,Db};
  	[] -> {ok,Db}				%Do nothing
      end.
  
  %% abolish_clauses(Db, Functor) -> NewDatabase.
  
  abolish_clauses(Db, Functor) ->
      case ets:lookup(Db, Functor) of
  	[{_,built_in}] -> error;		%Can't abolish here
  	[{_,code,_}] ->
  	    ets:delete(Db, Functor),
  	    {ok,Db};
  	[{_,clauses,_,_}] ->
  	    ets:delete(Db, Functor),
  	    {ok,Db};
  	[] -> {ok,Db}				%Do nothing
      end.
  