detecting possible design flaws or violations of
design philosophy. The metrics implemented in the
system are the following:
WMC: Weighted Methods per Class
DIT: Depth of Inheritance
NOC: Number Of Children.
The second group of metrics are the ones proposed
by Briand et al. (1997) as measure of coupling
between classes:
IC_Attr: Import Coupling with Class-Attribute
interaction between a class and the rest
EC_Attr: Export Coupling with Class-Attribute
interaction between a class and the rest
IC_Par: Import Coupling with Class-Method
interaction between a class and the rest
EC_Par: Export Coupling with Class-Method
interaction between a class and the rest.
The third category includes MOOD metrics (Brito
and Melo, 1996). The objective of these metrics is to
define a measure of the use of mechanisms of OO
design such as inheritance (MIF and AIF metrics),
information hiding (MHF and AHF-metric) and
polymorphism (the PF metric):
MHF: Method Hiding Factor
AHF: Attribute Hiding Factor
MIF: Method Inheritance Factor
AIF: Attribute Inheritance Factor
PF: Polymorphism Factor
Finally, we have implemented the classical metrics
proposed by Lorenz and Kidd (1994), both related to
size (PIM, NIM, NIV, NCV, and NCM) and to
inheritance (NMO, NMI, and NMA):
PIM: Public Instance Methods
NIM: Number of Instance Methods
NIV: Number of Instance Variables
NCM: Number of Class Methods
NCV: Number of Class Variables
NMO: Number of Methods Overridden
NMI: Number of Methods Inherited
NMA: Number of Methods Defined
2.2 Classification Metrics
We have also considered other 18 metrics, classified
in three different categories, most of them described
at (Genero et al. 2005). The first category is related
with the size of the elements of a class:
NumAttr: Number of attributes in a class
NumOps: Number of operations in a class
NumPubOps: Number of public operations in a
class
Other group of metrics is focused on inheritance:
NOC: Number Of Children (or direct
descendents of a class)
NumDesc: Number of descendents of a class
NumAnc: Number of ancestors of a class
DIT: Depth of Inheritance
CLD: Class to Leaf Depth
OpsInh: Number of inherited operations
AttrInh: Number of inherited attributes
And a set of metrics related with coupling:
Dep_Out: Number of elements on which a class
depends
Dep_In: Number of elements that depend on a
class
NumAssEl_ssc: Number of associated elements
in the same scope (namespace) as a class
IC_Attr: Import Coupling with Class-Attribute
interaction between a class and the rest
EC_Attr: Export Coupling with Class-Attribute
interaction between a class and the rest
IC_Par: Import Coupling with Class-Method
interaction between a class and the rest
EC_Par: Export Coupling with Class-Method
interaction between a class and the rest.
3 XMI FORMAT TO REPRESENT
UML CLASS DIAGRAMS
A UML modeling tool is a software application that
supports some or all of the notation and semantics
associated with the Unified Modeling Language
(OMG, 2009). One of the features that should be
considered when choosing and UML tool is the
possibility of importing and exporting models using
the XMI format. XMI (XML Metadata Interchange)
is the format for UML model interchange (OMG,
2007).
XMI is a XML dialect that incorporates tags to
represent UML diagrams. For class diagrams, listing
1 presents a code extract which corresponds to
figure 1 class diagram (exported as a
ClassDiagram.xmi file). Tags
<packagedElement> with the attribute
type=Class are used to represent classes, while
<ownedOperation>, <ownedAttribute>
and <generalization> tags represent
attributes, operations and inherence associations.
WEB TOOL FOR OBJECT ORIENTED DESIGN METRICS
301