Changes between Version 2 and Version 3 of Dependency


Ignore:
Timestamp:
Mar 19, 2012, 11:45:19 PM (13 years ago)
Author:
manualwiki
Comment:

dep. changes

Legend:

Unmodified
Added
Removed
Modified
  • Dependency

    v2 v3  
    224224 
    225225=== Optional ''Other'' category === 
    226 Let's think about function blocksin the first sense as mentioned in the beginning, so every directory with its absolute path gives a different function block.  The Other category is a special collector name for those modules which cannot be divided into any function block. Practically this covers those modules which do not have directories (for example, usually erlang). This category can be taken into consideration as a false function block, so 
     226Let's think about function blocks in the sense that every directory with its absolute path gives a different function block.  The Other category is a special collector name for those modules which cannot be divided into any function block. Practically this covers those modules which do not have directories (for example, usually erlang). This category can be taken into consideration as a false function block, so 
    227227a new option was introduced for eliminating this category. With this the dependencies with ''Other'' category are skipped, the tool takes into consideration only the real connections. 
    228228 
     
    250250 
    251251Explanation of figure: 
    252 * Hexagon nodes (eg.: cycle1, erlang, test2) - representing  function blocks as number (colour: ''black'') 
     252* Hexagon nodes (eg.: {{{cycle1, erlang, test2}}}) - representing  function blocks as number (colour: ''black'') 
    253253* Dotted edge, normal arrowhead - indicates that a fb calls another fb (colour: ''black'') 
    254254* Dotted edge, special arrowhead - cyclic edge (colour: ''red'') 
     255 
     256=== Using function block analysis from the web interface === 
     257The usage of function block analysis is described in !!! TODO add ref.!!! 
     258 
     259=== Defining function blocks with regular expressions === 
     260Function blocks can be filtered by the means of regular expressions. 
     261An interface function, called {{{ri:fb_regexp/1}} is provided and its parameters are the following: 
     262* {{{ {type, Type} }}} \\ 
     263  {{{ Type = list | get_rel | cycle | draw }}} 
     264  * {{{list}}} Prints out every function block which matches the 
     265    basic regular expression. 
     266  * {{{get_rel}}} Decides whether there is a connection between 
     267    the two given function blocks. 
     268  * {{{cycle}}} Checks for cycles in the dependencies between the 
     269    given function block list. 
     270  * {{{ draw }}} Prints out the entire graph or creates a subgraph 
     271    drawing from the given function block list.  Output file is 
     272    {{{fb_relations.dot}}} or can be user defined with the ''dot'' 
     273    key. 
     274 
     275* {{{ {regexp, Value} }}} \\ 
     276  {{{ Value = File::string() | [RegExp::string()] }}} 
     277   
     278  If this option (tuple) is not given, the program works with a basic 
     279  regular expression.  The basic rule: {{{<function block>/common/<service>/ebin}}} or 
     280  {{{<function block>/common/<service>/lib/ebin}}}. \\ 
     281  The regular expression saved for this: 
     282  {{{ (/)[0-9a-zA-Z_./]+/common/[0-9a-zA-Z_.]+/(lib/)?(ebin)$ }}} 
     283   
     284 
     285  * {{{ Value }}} - If the regular expression is given in a file 
     286    then every single regexp has to be defined in a separate line and 
     287    must follow the Perl syntax and semantics as the http://www.erlang.org/doc/man/re.html 
     288    erlang module resembles so. However, the user can give the regular expressions in a list 
     289    as well. If there is an error with a regular expression in the 
     290    file or in the list, it prints out the regexp, the error 
     291    specification, and the position. The most usual regexp is ".*" 
     292    (the Perl syntax does not allow simply "*", because this symbols 
     293    means possible unlimited repetition of characters declared before 
     294    it, and there are no characters declared before it) 
     295 
     296Examples: 
     297*  {{{ri:fb_regexp([{type, draw}, {dot, test.dot}]).}}} 
     298*  {{{ri:fb_regexp([{type, list}, {regexp, "regexp"}]).}}} 
     299*  {{{ri:fb_regexp([{type, list}, {regexp, "^/home/[a-z./]+}]).}}} 
     300 
     301 
     302=== User defined function blocks === 
     303One can make his own function block in the following three ways: 
     3041. Giving the exact modules (with their name) which should be in 
     305  one function block. 
     3062. Regular expressions covering the structure of the directories. 
     3073. By regular expressions covering the structure of the directories 
     308  and the structure of the name of the files. 
     309 
     310Example: 
     311{{{ refusr_fb_regexp:re([{type, list}, {fb, [[cycle1, cycle2],"/home/user/[a-zA-z]*", "/home/user/[a-zA-z./]*/.*_ui.erl"]}]). }}} 
     312 
     313 
     314'''Optimisations''' 
     315 
     316For efficiency and time improving reasons, the result of the queries 
     317are saved into {{{dets}}} tables for the further queries. 
     318 
     319 
     320The results of previous queries are saved into dets tables (in the {{{dep_files}}} directory).  This means that if 
     321the same query is run, the execution time may decreases significantly. 
     322At first run, a digraph is built as in the previous version, only it 
     323is saved later.If there was a whole database dependency check, than the tool works from that dets 
     324table instead of building a new subgraph, which also improves time 
     325efficiency. Due to this, it is strongly advised that if one knows that 
     326a lot of different node queries will be done, a whole check should be 
     327run in the first place.  
     328The saves are available until the 
     329database is unchanged. At the moment the hash value of the database is 
     330changed, the existing dets tables are deleted. The deletion does not 
     331effect the ''.dot'' files, although it is significant to remember 
     332to save them somewhere else from the ''dep_files'' directory, 
     333because the next call for draw function will overwrite the 
     334corresponding ''.dot'' file. This could be prevented by using the 
     335feature, that the user can define his own dot file name and absolute 
     336path.