User Tools

Site Tools


pom

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
pom [2014/01/10 05:36]
yann
pom [2014/02/19 07:56]
yann
Line 1: Line 1:
 ====== POM ====== ====== POM ======
  
 +POM stands for Primitives, Operations, Metrics and is a framework built to compute software metrics on PADL models. A paper introducing POM has been published by [[http://​www.ptidej.net/​publications/​Author/​ZAIDI-F.php|Zaidi,​ Guéhéneuc,​ and Sahraoui]] and can be used as reference. Metrics can be a several kinds:
 +  * Unary or binary, depending on whether they take as input one or two [[padl|IFirstClassEntity(ies)]];​
 +  * Context dependent or independent,​ depending on whether they can be computed by considering given [[padl|IFirstClassEntity(ies)]] independently of the rest of the model.
  
-===== Metrics ​definitions ​=====+===== Metrics ​Definition ​=====
  
-  ​^ Names ^ Definitions ^ +^ Names ^ Definitions ^ 
-  | ACAIC | Ancestor Class-Attribute Import Coupling ​+| ACAIC | Ancestor Class-Attribute Import Coupling | 
-  | ACMIC | Ancestors Class-Method Import Coupling | +| ACMIC | Ancestors Class-Method Import Coupling | 
-  | AID | Average Inheritance Depth of an entity | +| AID | Average Inheritance Depth of an entity | 
-  | ANA | Count the average ​number of classes ​from which a class inherits informations | +| ANA | Average ​number of entities ​from which an entity ​inherits informations ​wrt. to the total number of entities in a model 
-  | CAM | Computes the relatedness ​among methods of the class based upon the parameter list of the methods | +| CAM | Relatedness ​among methods of an entity ​based on the parameter list of its methods | 
-  CBOin | Coupling Between Objects of one entity | +CBO | Coupling Between Objects of one entity | 
-  CBOout | Coupling Between Objects of one entity | +CBOingoing | Coupling Between Objects of one entity ​(in-going coupling only, towards the entity) ​
-  CIS | Counts ​the number ​of public methods in a class | +CBOoutgoing Coupling Between Objects of one entity (out-going coupling only, from the entity) | 
-  | CLD | Class to Leaf Depth of an entity+| CIS | Number ​of public methods in a class | 
-  | cohesionAttributes |  +| CLD | Class to Leaf Depth of an entity | 
-  | connectivity |  +| cohesionAttributes | ​Percentage of fields (declared and inherited) used by the declared methods of one entity wrt. all its fields ​
-  | CP | The number ​of packages that depend on the package containing entity | +| connectivity | ​Number of couples of methods that use each other 
-  | DAM | Returns the ratio of the number of private(protected) ​Attributes to the total number of Attributes ​declared in a class +| CP | Number ​of packages that depend on the package containing ​the entity | 
-  | DCAEC | Returns the DCAEC (Descendants Class-Attribute Export Couplingof one entity | +| DAM | Ratio of the number of private (and protected) ​fields wrt. the total number of fields ​declared in an entity ​
-  DCC | Returns the number ​of classes a class is directly related to (by attribute declarations and message passing) | +| DCAEC | Descendants Class-Attribute Export Coupling of one entity | 
-  | DCMEC | Returns the DCMEC (Descendants Class-Method Export Couplingof one entity | +DCCdesign Number ​of classes ​that a class is directly related to (by attribute and parameter declarations) | 
-  | DIT | Returns the DIT (Depth of inheritance tree) of an entity+| DCCimplementation | Number of classes that a class is directly related to (by attribute declarations and message passing) | 
-  | DSC | Count of the total number of classes ​in the design ​+| DCMEC | Descendants Class-Method Export Coupling of one entity | 
-  | EIC | the number ​of inheritance relationships in which superclasses ​are in external packages | +| DIT | Depth of Inheritance Tree of an entity | 
-  | EIP | the number ​of inheritance relationships where the superclass ​is in the package containing entity and the subclass ​is in another package | +| DSC | Number ​of top-level entities ​in a model 
-  | ICHClass | Compute the complexity ​of an entity as the sum of the complexities of its declared and inherited methods | +| EIC | Number ​of inheritance relationships in which super-entities ​are in external packages | 
-  LCOM1 | Returns ​the LCOM (Lack of COhesion in Methodsof an entity | +| EIP | Number ​of inheritance relationships where the super-entity ​is in the package containing ​the entity and the sub-entites ​is in another package | 
-  | LCOM2 | Returns the LCOM (Lack of COhesion in Methodsof an entity | +| FanOut | Number of methods and fields used by one entity | 
-  | MFA | The ratio of the number of methods inherited by a class to the number of methods accessible by member methods of the class +| ICHClass | ​Complexity ​of an entity as the sum of the complexities of its declared and inherited methods | 
-  MOA | Count the number ​of data declarations whose types are user defined ​classes ​+IR Number of calls from the methods of an entity to the methods and fields declared in its super-entities | 
-  | NAD | number ​of attributes declared ​+| LCOM1 | ​Lack of COhesion in Methods of an entity | 
-  NADExtended | Number of attributes declared in a class and in its member ​classes ​+| LCOM2 | Lack of COhesion in Methods of an entity | 
-  | NCM | Returns the NCM (Number of Changed Methodsof an entity. | +| LCOM5 | Lack of COhesion in Methods of an entity | 
-  | NCP | the number ​of classes package ​containing entity | +| LOC | Sum of the numbers of lines of code in the methods of an entity | 
-  | NMA | Returns the NMA (Number of New Methods) of an entity | +| McCabe | Sum of the cyclomatic complexities of the operations of an entity | 
-  | NMD | number ​of methods declared ​+| MFA | Ratio of the number of methods inherited by an entity wrt. the number of methods accessible by member methods of the entity ​
-  NMDExtended | Number of methods declared in the class and in its member ​classes ​+MLOCsum ​Sum of the numbers of lines of code in the methods of an entity. Same as LOC | 
-  | NMI | Returns the NMI (Number of Methods Inherited) of an entity | +| MOA | Number ​of data declarations whose types are user-defined ​entities ​
-  | NMO | Returns the NMO (Number of Methods Overridden) of an entity | +| NAD | Number ​of Attributes Declared by an entity ​
-  | NOA | Returns the NOA (Number Of Ancestorsof an entity | +NADextended | Number of Attributes Declared by an entity ​and in its member ​entities ​
-  | NOC | Returns the NOC (Number Of Childrenof an entity | +| NCM | Number of Changed Methods of an entity ​wrtits hierarchy ​
-  | NOD | Returns the NOD (Number ​Of Descendents) ​of an entity | +| NCP | Number ​of Classes Package ​containing ​an entity, i.e., the "​depth"​ of the package containment ​
-  | NOH | Count The number of class hierarchies ​in the design ​+| NMA | Number of Methods ​Added by an entity ​wrt. its hierarchy ​
-  | NOM | Counts all methods defined in a class +| NMD | Number ​of Methods Declared by an entity ​
-  | NOP | Returns the NOP (Number Of Parentsof an entity | +NMDextended | Number of Methods Declared by an entity ​and its member ​entities ​
-  | NOParam | Maximum mumber ​of parameters of the methods of an entity | +| NMI | Number of Methods Inherited ​by an entity. Constructors or not considered as method, they are not counted in the result of the metric ​
-  | NOPM | Count of the Methods that can exhibit polymorphic behavior ​+| NMO | Number of Methods Overridden ​by an entity | 
-  | PIIR | The number ​of inheritance relationships existing between ​classes ​in the package containing entity | +| NOA | Number Of Ancestors of an entity | 
-  | PP | The number ​of provider packages of the package containing entity | +| NOC | Number Of Children of an entity | 
-  | REIP | EIP divided by the sum of PIIR and EIP | +| NOD | Number ​of descendents ​of an entity | 
-  RFP | the number of class references from classes ​belonging to other packages to classes ​belonging to the package containing entity | +| NOF | Number Of Fields declared by an entity | 
-  | RPII | PIIR divided by the sum of PIIR and EIP+| NOH | Number Of Hierarchies ​in a model 
-  | RRFP | RFP divided by the sum of RFP and the number of internal class references | +| NOM | Number Of Methods declared by an entity ​
-  | RRTP | RTP divided by the sum of RTP and the number of internal class references | +| NOP | Number Of Parents of an entity | 
-  | RTP | The number ​of class references from classes ​in the package containing entity to classes ​in other packages | +| NOParam | ​Number ​of parameters of the methods of an entity | 
-  | SIX | Returns the SIX (Specialisation IndeXof an entity | +| NOPM | ​Number Of Polymorphic ​Methods ​in an entity wrt. its hierarchy | 
-  WMC1 | Computes the weight ​of an entity considering ​the complexity ​of a method to be unity +| NOTC | Number of invocations of JUnit assert methods ​that occur in the code of a test case | 
-  McCabe | McCabe Complexity: ​Number of points ​of decision + 1 +| NOTI | Number Of Transitive Invocation among methods of a class. See the Law of Demeter for a definition | 
-  CBO | Coupling Between Objects ​of one entity | +| NPrM | Number protected members of an entity | 
-  LCOM5 | Returns ​the LCOM (Lack of COhesion in Methods) of an entity | +| oneWayCoupling | Coupling Between Objects of one entity (out-going coupling only, from the entity). Same as CBOoutgoing ​
-  WMC | Computes the weight ​of an entity ​by computing ​the number ​of method invocations in each method ​ |+| PIIR | ​Number ​of inheritance relationships existing between ​entities ​in the package containing ​an entity | 
 +| PP | Number ​of provider packages of the package containing ​an entity | 
 +| REIP | EIP divided by the sum of PIIR and EIP | 
 +RFC Response for class: ​number of methods of an entity and of methods of other entities that are invoked by the methods of the entity | 
 +| RFCextended | Response for class: number of methods of an entity and of methods of other entities that are invoked by the methods of the entity plus number of methods declared by that entity | 
 +| RFP | Number of references from entities ​belonging to other packages to entities ​belonging to the package containing ​an entity | 
 +| RPII | PIIR divided by the sum of PIIR and EIP | 
 +| RRFP | RFP divided by the sum of RFP and the number of internal class references | 
 +| RRTP | RTP divided by the sum of RTP and the number of internal class references | 
 +| RTP | Number ​of references from entities ​in the package containing ​an entity to entities ​in other packages | 
 +| SIX | Specialisation IndeX of an entity | 
 +TestCaseLOC ​Number ​of lines of code of all the methods ​of a test case 
 +TLOC | Number of lines of code of all the methods of an entity. Same as LOC 
 +VGSum Sum of the cyclomatic complexities of the operations of an entity. Same as McCabe ​
 +WMC1 Weight of an entity considering ​the complexity ​of each of its method as being 1. (Default constructors are considered even if not explicitely declared
 +| WMCinvocations | Weight ​of an entity ​considering the complexity of each of its method as being the numbers of invocations that they perform. (Default constructors are considered even if not explicitely declared). ​
 +WMCmccabe ​Weight ​of an entity ​considering ​the complexity ​of each of its method ​as being their McCabe cyclomatic complexity. (Default constructors are considered even if not explicitely declared). ​|
  
-===== Computing ​Metrics =====+===== Metrics ​Computation ​=====
  
 Computing POM metrics using PADL is made easy by the helper class ''​pom.helper.MetricsGenerator''​. After having installed CPL, PADL, and POM, just go into the ''​POM Tests''​ project and have a look at this class. It provides a main method with snippets of code to call one of the three methods: Computing POM metrics using PADL is made easy by the helper class ''​pom.helper.MetricsGenerator''​. After having installed CPL, PADL, and POM, just go into the ''​POM Tests''​ project and have a look at this class. It provides a main method with snippets of code to call one of the three methods:
Line 68: Line 87:
    * ''​computeMetricsFromEclipse''​    * ''​computeMetricsFromEclipse''​
    * ''​computeMetricsFromJARs''​    * ''​computeMetricsFromJARs''​
-which can be used to compute automatically metrics from various input sources. Also have a look at the constant array listing the metrics that must be computed or avoided: ''​METRICS_TO_AVOID''​ and ''​METRICS_TO_COMPUTE''​.+which can be used to compute automatically metrics from various input sources. Also have a look at the constant array listing the metrics that must be computed or avoided: ''​METRICS_TO_AVOID''​ and ''​METRICS_TO_COMPUTE''​. As other repositories,​ POM makes it easy [[repositories|to access the different kinds of metrics]].
pom.txt · Last modified: 2017/09/06 01:54 (external edit)