3:-module(trill_test,
    4  [close_to/2,close_to/3,run/1]).    5
    6:- meta_predicate run(:).    7
    8run(M:H):-
    9	copy_term(H,NH),
   10	numbervars(NH),
   11%	NH=(_Query,close_to('P',_Prob)),
   12	format("~p.~n",[NH]),
   13	(H=(G,R)),
   14	time(call(M:G)),!,
   15	format("\t~p.~n~n",[G]),
   16	call(R).
   17
   18epsilon(0.09).
   19
   20close_to(V,T):-
   21	epsilon(E),
   22	TLow is T-E,
   23	THigh is T+E,
   24	TLow<V,
   25	V<THigh.
   26
   27close_to(V,T,E):-
   28	TLow is T-E,
   29	THigh is T+E,
   30	TLow<V,
   31	V<THigh