skipped predicates

Erwan Jahier Erwan.Jahier at irisa.fr
Fri Sep 18 19:31:10 AEST 1998


One thing that is missing in the current Mercury tracer is handling of
skipped predicates. 

Skipped predicates are particulary usefull to handle predicates that are
defined in modules that have not been compiled with --trace option on.

One thing we could do to handle them is to pre-process the modules we
want to trace by replacing all the predicates that are defined in
"skipped" modules (append), by fresh ones (append_skipped)  which will
simply call the former (append_skipped(L1, L2, L3) :- append(L1, L2, L3)
).

that way, the following predicate:
	foo(ListOut) :-
		bar(L1, L2),
		append(L1, L2, ListOut).

would produce the following trace:
	call foo(-) 
 	    call bar(-, -)
 	         ... [event occuring within bar/2]
 	    exit bar([1,2], [3]),
 	    call append_skipped([1, 2], [3], -)
 	    exit append_skipped([1, 2], [3], [1, 2, 3])
	exit foo([1, 2, 3])

What do you think ?

-- 
R1.



More information about the developers mailing list