= Module and Function Dependencies = == Concerning terminology == We say that a module A is '''dependent''' on another '''module''' ''B'' (''A -> B'') if there is at least one function call from ''A'' to ''B''. \\ A '''cyclic dependency''' appears, when ''B'' is also dependent directly (''B -> A'') or indirectly (e.g. ''B -> C -> A'') from ''A''. \\ Note that it is possible to have a cyclic dependency among the modules while having no cyclic dependencies among the functions. \\ For example, a function call from ''A:foo'' to ''B:foo'', and from ''B:foo2'' to ''A:foo2'' implies a cyclic dependency on the module level. \\ If one wants to have a deeper analysis and pays more attention to the concerning functions, a '''function''' level query should be done. \\ In our previous example, no function level cycle appears, unless ''A:foo'' calls ''B:foo'', and ''B:foo'' calls ''A:foo''. \\ \\ The following examinations can be done considering dependencies:\\ * ''Checking'' whether there are ''cycles'', if so, ''listing'' them out * ''Printing out'' the cycles, meaning the modules/functions will not be rep- resented by their proper graph node, but with their ''names'' \\ (for instance, instead of {{{ {'$gn', module,3} }}}, module test will be printed, if the graph node stands for that exact module). * Checking for cycle ''from one or more nodes'' as starting points * ''Drawing'' the dependency graph * Drawing the dependency graph from a starting node * Drawing the cyclic part of the dependency graph if one exists (you can also give a cyclic node as a starting node) \\ \\ Dependency analysis can be done in two ways: by the means of ri interface or using the web interface. \\ To call the desired query, the user should give a proplist, stating the different requirements. \\ The two interface functions are: 1. {{{ri:draw_dep/1}}} - for drawing 2. {{{ri:print_dep/1}}} - for listing, printing out to the standard output \\ \\ The options and the keys for the functions are: * {{{{level, Level}| Level = mod | func}}} Stating the level of the query, module or function level. * {{{{type, Type} Type = all | cycles}}}} The investigation should be done on the whole graph/table, or just on the cycle part (if it exists). \\ When listing out the cycles, "all" gives back the result in their graph node form, while "cycles" returns with their proper names (see examples above).