-dp- wrote: > I've looked through the user manual for v6.1 (64bit) about debugging and > about events, and searched through old postings...but found no answer. > > I would like to create a predicate that performs unification but also, > in case unification fails, indicates which arg position was responsible > for the failure. Does the builtin unifier provide any hooks for this info? You can break up unification like this unify(X, Y) :- functor(X, F, A), functor(Y, F, A), % fail if different functors (or atomic terms) ( for(I,1,A), param(X,Y) do arg(I, X, XI), arg(I, Y, YI), unify(XI, YI) % unify argument I ). and then instrument this code. -- JoachimReceived on Tue Mar 20 2012 - 01:07:07 CET
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST