Changes between Version 22 and Version 23 of ErlangShellInterface


Ignore:
Timestamp:
Dec 3, 2012, 12:23:23 PM (12 years ago)
Author:
manualwiki
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ErlangShellInterface

    v22 v23  
    430430=== Duplicated code analysis === 
    431431In large program systems often occure duplicated code, which is a computer programming term for a sequence of source code that occurs more than once. There are two ways in which two code sequences can be duplicates of each other: syntactically and functionally. This new feature can detect the syntactically similar duplicates. You can learn more about this topic and about the usage, especially about the command-line usage,  on [[DuplicateCodeAnalysis| Duplicate code analysis]] page. 
     432 
     433=== Clustering === 
     434You can learn more about this topic on [[wiki:ModuleFunctionClustering]] page. 
     435 
     436You can use the clustering algorithm from {{{ri}}} by calling the {{{ri:cluster/0}}} function. You have to choose between agglomerative and genetic clustering at first and then between function and module clustering. Based on your choice {{{ri}}} will ask all of the parameters necessary for the clustering. 
     437 
     438Consider the following example: 
     439{{{ 
     440ri:cluster(). 
     441 
     442Please choose an item from the list (blank to abort). 
     443  
     444Please select an algorithm for clustering: 
     445 1. Agglomerative 
     446 2. Genetic 
     447 type the index of your choice: 1  
     448Please choose an item from the list (blank to abort). 
     449  
     450Please select an entity type for clustering: 
     451 1. function 
     452 2. module 
     453 type the index of your choice: 2 
     454Please answer the following questions (blank to abort). 
     455 Module clustering with Agglomerative algorithm 
     456 Modules to skip(Type: none for default) none 
     457 Functions to skip(Type: none for default) none 
     458 Transform function(Select: [none,zero_one]) zero_one 
     459 Distance function(Select: [call_sum,weight]) weight 
     460 Antigravity(Type: 0.5 for default) 0.5 
     461 Merge Function(Type: smart for default) smart 
     462 Save results to database: (y/n) -> n 
     463}}} 
     464 
     465The result is: 
     466{{{ 
     467See the direct information feed below: 
     468 Clustering results: 
     469 [[erl_syntax_lib,erl_syntax,igor,erl_tidy,epp_dodger,erl_recomment, 
     470  erl_prettypr,prettypr,erl_comment_scan]] 
     471 [[erl_syntax_lib,erl_syntax,igor,erl_tidy,epp_dodger,erl_recomment, 
     472  erl_prettypr,prettypr], 
     473 ... 
     474 Fitness Numbers: 
     475 [1.0,0.9473684210526315,0.918918918918919,0.8823529411764706, 
     476 0.6896551724137931,0.5384615384615384,0.45,0.25] 
     477}}} 
     478 
    432479 
    433480== Server management command list ==