9.12.1 Introduction

Please note: the Cross-References tool is mostly superseeded by the SICStus Prolog IDE, SPIDER (see SICStus Prolog IDE). SPIDER will analyze the source code fully automatically and will annotate the edited source code to highlight unused and undefined predicates. The cross-reference analysis performed by SPIDER is more precise than the analysis implemented by the cross-referencer described below.

The main purpose of the cross-referencer, spxref, is to find undefined predicates and unreachable code. To this end, it begins by looking for initializations, hooks and public directives to start tracing the reachable code from. If an entire application is being checked, it also traces from user:runtime_entry/1. If individual module-files are being checked, it also traces from their export lists.

A second function of spxref is to aid in the formation of module statements. spxref can list all of the required module/2 and use_module/2 statements by file.

The cross-referencer is called spxref, and is run from the shell prompt, specifying the names of the Prolog source files you wish to check.


Send feedback on this subject.