Using prolog_walk_code/1 to identify meta predicate calls?

Or, a bit simpler and not spamming your console:

?- tell('./calls (meta).txt'), listing(call_graph:calls), told.

gxref/0 works differently. It runs on top of library(prolog_xref), which does source analysis. The code walking library examines the binary and thus examines all code while the source analysis can be incomplete because there are many ways how the actually loaded code may differ from the source (term/goal expansion, generated dynamic code, etc.)

1 Like