fix clause added at each step.

This commit is contained in:
Vitor Santos Costa 2011-09-16 15:48:43 +01:00
parent 5b0874be32
commit 8ca147719f

View File

@ -128,9 +128,12 @@ store_cl(Cl) :-
add_new_clause(_,(_ :- true),_,_) :- !.
add_new_clause(_,(H :- B),_,_) :-
%trace,
% user:db_usage,
% user:db_dynamic,
domain(H, K, V, D),
user:cost((H :- B), _, Cost),
format(user_error,'Current Cost: ~w.~n', [Cost]),
rewrite_body(B, IB, Vs, _, ( !, { V = K with p(D, CPTList, Vs) })),
% need to remember which CPT we want
get_dist_key(Id, K),