I have logtalk rule to add to the prolog DB :
add(IF, THEN) :- new_uid(U), assertz(cond(IF, 0, U)), assertz(act(U) :- THEN).
it seems to work