The predicate compute_intermodule_graph/1 calls the Ciao compiler to obtain which modules are in the intermodular punit, which is controlled by the flag punit_boundary. This is done by:
ModList is the list of modules to analyze. This list is formed by the modules which have their .reg file outdated, or if the module is not completely analyzed (some of the entries in the .reg file are marked or invalid). For those modules which have no .reg file, the parents of the module are included in the list (as there are no call patterns for those modules without .reg file).
The structure of the elements in the list is a term (Mod,Depth,Force), where Mod stands for the module name, Depth is the maximum depth without cycles in the intermodular graph, and Force marks those modules which must be completely reanalyzed (only useful for the parents of the modules with no reg file).
Obtains ModList, the list of modules in the program unit that is currently loaded. This list is formed by the modules which appear in the top-down modular graph traversal with registries set to read_write mode (and including library modules if punit_boundary flag is set to 'on'. compute_punit_modules/2 needs to be called before.
Returns the list of included files in the program unit. This list includes not only files explicitly included with :- include declarations, but also packages used. compute_punit_modules/2 needs to be called before.
Obtains CycleList, the list of cycles in the program unit whose top-level module is TopLevelFile. A cycle is a ciclic dependency in the module dependency graph. Every element of CycleList is a list of the modules which belong to each cycle. Modules not belonging to any cycle are represented as one-element lists. CycleList is sorted as a post-order traversal of the inter-cycle dependency graph.
The modules included in CycleList are those which appear in the top-down modular graph traversal with registries set to read_write mode (and including library modules if punit_boundary flag is set to 'on'.)
Succeeds if module in Base can be processed by intermodular preprocessing tools. This predicate may have to load the registry file of that module, in order to check that the module has read-write mode.
Reads the registry file of Module and loads it into registry/2, erasing any previous registry information for that module. Base must be the absolute file name, but excluding file extension.
Writes to disk the registry information stored in memory for module Module which has as base file name Base.
Module with basename Base is of type Type and it is opened with mode OpenMode. Type can be user or library. OpenMode is used to indicate if an imported module's registry can be updated. It can take the values read_write or read_only.
OpenMode is the new open mode of the module with basename Base. OpenMode can take the values read_write and read_only.
Writes on disk the registry information of the modules related to the current module (CurrBase) which have been modified. This information is updated by gen_registry_info/3. Even if this predicate is used, save_registry_info/2 must be used after performing intermodular preprocessing.
Writes on disk the registry information of the modules loaded into Ciaopp or related to modules loaded into Ciaopp. This information is updated by gen_registry_info/3. This predicate must be called after performing intermodular preprocessing (analysis, specialization...), even if save_registry_info/3 has been used.
Gets the list of imported modules from the current module. This list is obtained from the itf information of the current module, and is stored in imported_module/1.
Returns the list of modules analyzed the last time a modular analysis was executed.
Sets the list of modules which have been analyzed.