Changes between Version 7 and Version 8 of Dependency


Ignore:
Timestamp:
Apr 22, 2015, 12:42:29 PM (10 years ago)
Author:
tothm
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Dependency

    v7 v8  
     1[[PageOutline]] 
     2 
    13= Dependency analysis = 
    24 
    3 The base of dependency analysis is function calls. \\ 
     5== Concerning terminology == 
    46 
    5 Basically, the following examinations can be done: 
    6  * cycle checking and listing 
    7  * relationship search 
    8  * drawing 
     7We say that module A depends on module B (B -> A) if there is at least one function call from B to A. There is a cyclic dependency if B also depends directly (A -> B) or indirectly (e.g. A -> C -> B) on A. 
    98 
    10 On every level these operations have different subtypes which will be described in details at the appropriate section. 
     9Dependency can be defined on the function level as well. Function A:foo depends on function B:foo (B:foo -> A:foo) if B:foo calls A:foo. There is a cyclic dependency if B:foo also depends on A:foo, directly or indirectly. 
    1110 
    12 The analysis can be done on different levels: 
    13  * [./Functions Function and Module level] - function and module levels share the same similarities, thus they are described together. 
    14  * [./FunctionBlocks Function blocks] - simply, function block is a set of modules. There is a rule how the set is created. 
    15   
     11Note that it is possible to have a cyclic dependency among modules while having no cyclic dependencies among their functions. For example, function calls from A:foo to B:foo and from B:foo2 to A:foo2 imply a cyclic dependency on the module level, but no one on the function level. 
     12 
     13It is also possible to have dependencies between moduleblock. A moduleblock is a list containing modules ([A, B, ...]). Moduleblock X depends on moduleblock Y (Y -> X) if any of the modules of X depends on at least one of Y's modules. In the same way as before, a cyclic dependency can be defined as well. 
     14 
     15== Capabilities == 
     16 
     17Mainly, you can check for cycles and dependencies among entities within the RefactorErl database. This means that the program looks for dependencies on the given level, and returns with a graph representation containing those dependencies. 
     18 
     19In case of vast databases, dependencies can be very complex, and hard to represent. To avoid producing useless, huge dependency graphs, we provide some filter options that you can use for narrowing down the result. 
     20 
     21== Filtering options == 
     22 
     23* '''Level''' - The result will only contain the dependencies based on the given level (function, module or moduleblock dependencies). 
     24* '''Type''' - The result will contain all dependencies or only cyclic dependencies. 
     25* '''Exclude''' - Entities depending on the '''exclude''' entities (directly or indirectly) and the '''exclude''' entities themselves are excluded from the result. 
     26* '''Exclude_children''' - Entities depending on the '''exclude_children''' entities (directly or indirectly) are excluded from the result, but not the "exclude_children" entities. 
     27* '''Exclude_lib''' - Entities residing in the '''exclude_lib''' libraries (but not subdirectories) are excluded from the result. 
     28* '''Exclude_otp''' - The result will or will not contain the Erlang/OTP standard modules and functions. 
     29* '''Starting_nodes''' - The result will only contain the '''starting_nodes''' entities and entities depending on them (directly or indirectly). 
     30* '''Connection''' - The result will only contain the '''connection''' entities and the dependencies between the '''connection''' entities. 
     31* '''Groups''' - Defines the moduleblocks, on which the dependency analysis will be made. 
     32 
     33== Output == 
     34 
     35The output of the dependency analysis is a graph representation, where entities are nodes and dependencies are edges between these nodes (A -> B dependency would result as a directed edge from A node to B node). This representation can be text based (as erlang terms) or visual (described in a .dot graph file). 
     36 
     37In the text based representation entities are enumerated with entities depending on them. An entity is described as its name or the corresponding id in the database, depending entities are put in a list. 
     38 
     39== Visual representation == 
     40 
     41=== Function level === 
     42 
     43Function dependency graphs look like the following. 
     44 
     45[[Image(function_graph.png, 512px)]] 
     46 
     47* '''ROOT triangle''' represents a formal starting point 
     48* '''Rectangle, deep purple''' nodes represent modules 
     49* '''Rectangle, black''' nodes represent functions given in the connection option 
     50* '''Hexagon, black''' nodes represent functions 
     51* '''Ellipse, grey''' nodes represent functions which are part of an indirect dependency path 
     52 
     53* '''Solid, continuous edge, black, normal arrowhead''' to modules from the root, and the from modules to their functions 
     54* '''Dashed edge, black, normal arrowhead''' indicates that a function calls another function 
     55* '''Dotted edge, grey, normal arrowhead''' indicates that a function calls another function and the edge is part of an indirect dependency path 
     56* '''Dashed edge, red, special arrowhead''' indicates a function call, but also that it is a cyclic edge 
     57* '''Dotted edge, red, normal arrowhead''' indicates a cyclic edge which is part of an indirect dependency path 
     58* '''Dashed edge, green, normal arrowhead''' indicates an idirect dependency 
     59 
     60=== Module level === 
     61 
     62Module dependency graphs look like the following. 
     63 
     64[[Image(module_graph.png, 512px)]] 
     65 
     66* '''Rectangle, deep purple''' nodes represent modules 
     67* '''Rectangle, black''' nodes represent modules given in the connection option 
     68* '''Ellipse, grey''' nodes represent modules which are part of an indirect dependency path 
     69 
     70* '''Dashed edge, black, normal arrowhead''' indicates that a module calls another module 
     71* '''Dotted edge, red, normal arrowhead''' indicates a call loop which is part of an indirect dependency path 
     72* '''Dashed edge, red, special arrowhead''' indicates a call loop 
     73* '''Dotted edge, grey, normal arrowhead''' indicates that a module calls another module and the edge is part of an indirect dependency path 
     74* '''Dashed edge, green, normal arrowhead''' indicates an idirect dependency 
     75 
     76=== Moduleblock level === 
     77 
     78Moduleblock dependency graphs look like the following. 
     79 
     80[[Image(mb_graph.png, 512px)]] 
     81 
     82* '''Hexagon, black''' nodes represent moduleblocks 
     83* '''Rectangle table''' lists the modules of the moduleblocks 
     84 
     85* '''Dashed edge, black, normal arrowhead''' indicates that a moduleblock calls another moduleblock 
     86* '''Dashed edge, red, special arrowhead''' indicates a call loop 
     87 
     88== Usage == 
     89 
     90Dependency analysis can be done via the following interfaces: 
     91 * [DevDependency/ErlangShellInterface#Analysis Erlang shell] 
     92 * [DevDependency/WebInterface/DependencyExaminations Old Web interface] 
     93 * [wiki:DevDependency/Web2/DependencyExaminations New Web Interface] 
     94 * [wiki:DevDependency/EmacsInterface Emacs] 
     95 * [wiki:DevDependency/WxInterface/DepGraph Wx] 
     96 * [wiki:DevDependency/QtInterface QT]