anchor.diff:      PAtomList = [list_to_atom([P]) ||P <-PList],
       [{var, Line, PAtom}|| PAtom <- PAtomList].
   
  -base_fn_clause(Predicate, ParamCount ) when is_atom(Predicate) andalso is_integer(ParamCount) ->
  -    ParamList = [{atom,46,Predicate}] ++ make_param_list( ParamCount - 1,46),
  +
  +get_return_value(Function, PL) ->
  +    {{succeed, [{'RetVal', RetVal}]},_}= PL({prove, {find_return, Function, {'RetVal'}}}),
  +    RetVal.
  +
  +     
  +base_fn_clause(Predicate, ParamCount,PL ) when is_atom(Predicate) andalso is_integer(ParamCount) ->
  +    RetVal = get_return_value({'/',Predicate,ParamCount},PL),
  +    
  +    ParamList = [{atom,46,Predicate}] ++ case RetVal of 
  +					     boolean -> make_param_list( ParamCount,46);
  +					     _ -> make_param_list(ParamCount -1, 46)++ [{tuple,47,[{atom,47,'X'}]}]
  +					 end,
  +							
       {clause,46,
        [{match,46,
          {var,46,'_Prove'},
  
positive.code:             [{tuple,47,
                [{atom,47,prove},
                 {tuple,47,
                  ParamList ++ [{tuple,47,[{atom,47,'X'}]
                                }]}]}]},
             [{clause,48,
               [{tuple,48,
                 [{tuple,48,
                   [{atom,48,succeed},
                    {cons,48,
                     {tuple,48,
                      [{atom,48,'X'},{var,48,'RetVal'}]},
  
negative.code:                               [{clause,26,[],[],[{tuple,27,[{atom,27,ok},AbstractDB]}]}]}),
      {ok, AST1}. 
  
  make_handler_clauses(AST, Exports,PL) ->
      NewClauses = [base_fn_clause(Predicate, Arity, PL) ||{Predicate, Arity} <- Exports],
      AST1       = lists:keyreplace(handle_call,3, AST,
                                    {function, 39, handle_call, 3,
                                     NewClauses}),
  