Changes between Version 6 and Version 7 of Dependency/Functions


Ignore:
Timestamp:
Apr 17, 2012, 2:56:37 PM (13 years ago)
Author:
manualwiki
Comment:

dep_changes

Legend:

Unmodified
Added
Removed
Modified
  • Dependency/Functions

    v6 v7  
    2727that the program is going to look for loops on the given level, and returns with the path of the cycles. \\ 
    2828 
    29 If one wants to have a more visual view of the dependencies, there is the ''draw'' option. This will generate a ''.dot'' file, which latter can be converted to a desired image file format. Since in the case of a vast database, the generated picture of dependencies can be very complex and hard to figure out, there are different options how the user can narrow down the result, and get a more easier understandable view. For instance, it is possible just to receive an image of the graph which contains only the cycles, or to exclude the OTP modules from the result. \\ 
     29If one wants to have a more visual view of the dependencies, there is the ''draw'' option. This will generate a ''.dot'' file, which latter can be converted to a desired image file format. The following picture will show us an example on function level: 
     30 
     31[[Image(dep_fun_before.png, 700px)]] 
     32 
     33This illustration shows the functions with their modules and the function calls made from one function to 
     34another. With red edges, it is easy to spot the cycles. Using tooltips more information can be gained. Everything related to the representation is explained later, in the wiki:Dependency/Functions#Representation section. 
     35 
     36 
     37Since in the case of a vast database, the generated picture of dependencies can be very complex and hard to figure out, there are different options how the user can narrow down the result, and get a more easier understandable view. For instance, it is possible just to receive an image of the graph which contains only the cycles, or to exclude the OTP modules from the result. \\ 
    3038In every dependency option there is the opportunity to run the examination from a given function/module or a list of them. 
    3139 
     
    123131ri:print_dep([{level, func}, {type, cycles}]). 
    124132 
    125  
    126   6 cycle(s),  
    127133  [['foo:fv4/1','foo:fv4/1'], 
    128134  ['test3:p/1','test:fv6/1','test3:p/1'], 
     
    138144ri:print_dep([{level, func}, {type, all}]). 
    139145 
    140   "6 cycle(s)", 
     146  {"6 cycle(s)", 
    141147  {[[{'$gn',func,28},{'$gn',func,28}],  
    142148  [{'$gn',func,29},{'$gn',func,37},{'$gn',func,29}], 
     
    166172=== Function Level === 
    167173Let's take an example to explain the meaning of the representation of 
    168 dependency graphs.  A {{{ri:draw_dep([{level, func}, {type, all}])}}} 
     174dependency graphs, and work with the example shown in the beginning of the page. 
     175A 
     176{{{#!erlang 
     177ri:draw_dep([{level, func}, {type, all}]) 
     178}}} 
    169179call was made, which generated a ''Graphviz dot file''. \\ 
    170180  
     
    183193 
    184194 
    185 The next figure was made after a {{{ri:anal_dyn()}}} was run, which is a dynamic analyser. Due to its work the call graph changes a bit,  
     195The next figure was made after a 
     196{{{#!erlang 
     197ri:anal_dyn() 
     198}}} 
     199was run, which is a dynamic analyser. Due to its work the call graph changes a bit,  
    186200new types of nodes and edges are introduced. 
    187201