prolog is sufficiently strange enough that it's unlikely that anyone here (who doesn't know prolog) is going to answer any question on it. Try asking on comp.lang.prolog