5
© 2013, IJARCSSE All Rights Reserved Page | 1796 Volume 3, Issue 6, June 2013 ISSN: 2277 128X International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com Coupling Based Structural Metrics-An Quality Assessment of Software Modularization Deepti Gupta Department of Computer Science & Engg. Kurukshetra University, Kurukshetra, India AbstractSoftware Modularization is more vast term that includes the concept of procedural, object based and objects oriented languages. There are number of tools and techniques available to perform metric analysis on such software or code. But still there is lack of existence of such approach at one place that can handle all kind of software modularization estimation at one place. The metrics presented and evaluated in this thesis are both ‘pure’ object–oriented metrics (Metrics for pure object oriented programming) and metrics proposed for objectoriented programming (Object-based programming). The complete software modularization concept is divided in three main components i) Use of API ii) Use of Non API iii) Use of shared variables. .KeywordsMetrics /measurement, Software Modularization, API (Application Programming Interface), Coupling, Function Call Traffic. I. INTRODUCTION A. Modularization Modularization refers to the division of software into subunits. These subunits can be described as a macro, sub-routine, procedure, function or a module according to the programming language used[9]. B. Software Modularization Software modularization deal with different modules. These modules can be integrated directly or indirectly. The number of level between two modules also affects its quality. Type of modularization i.e. its API or non API also assigned by different weight ages. These relations are represented in the form of coupling and cohesion in an object oriented language. C. S/W ModularizationPrinciples As Software modularization is an important characteristic to Software Engineering.These are [6]. Principle 1: Related to Similarity of Purpose. Maximization of Module Coherence on the Basis of Similarity and Singularity Purpose. Minimization of Purpose Dispersion. Maximization of Module Coherence on the basis of Commonality of goals. Minimization of Goal Dispersion. Principle 2:Related to Module Encapsulation. Maximization of API-Based Inter-module Call Traffic. Minimization of Non-API Based Inter-module Call Traffic. II. Objectives The proposed system is the representation of such a system that can provide a tool for this kind of modularization. System will use software tool in java IDE that will accept the project folder as the input and inspect all its working including the functional, modular and interface metrics. The system will work for object based, procedural, object orientation systems. Along with it can estimate the software quality of any open source software system so the main objective of our proposed approach is: 1. The main objective of this Project is to measure the quality of modularization of object-oriented projects by Coupling-based Structural metrics. 2. Goal is to analyses or measure how the code is framed for the particular software and Applying Software metrics to show the result. III. PRESENT WORK We will at the present time a new set of metrics that cater to the principles. We will begin with coupling-based structural metrics that provide various measures of the function-call traffic through the API’s of the modules in relation to the overall function-call traffic. For that we have find the following four factors.

Coupling Based Structural Metrics-An Quality Assessment of ...ijarcsse.com/Before_August_2017/docs/papers/Volume_3/6_June20… · The system will work for object based, procedural,

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Coupling Based Structural Metrics-An Quality Assessment of ...ijarcsse.com/Before_August_2017/docs/papers/Volume_3/6_June20… · The system will work for object based, procedural,

© 2013, IJARCSSE All Rights Reserved Page | 1796

Volume 3, Issue 6, June 2013 ISSN: 2277 128X

International Journal of Advanced Research in Computer Science and Software Engineering Research Paper Available online at: www.ijarcsse.com

Coupling Based Structural Metrics-An Quality Assessment of

Software Modularization Deepti Gupta

Department of Computer Science & Engg.

Kurukshetra University, Kurukshetra, India

Abstract— Software Modularization is more vast term that includes the concept of procedural, object based and objects

oriented languages. There are number of tools and techniques available to perform metric analysis on such software or

code. But still there is lack of existence of such approach at one place that can handle all kind of software modularization

estimation at one place. The metrics presented and evaluated in this thesis are both ‘pure’ object–oriented metrics

(Metrics for pure object oriented programming) and metrics proposed for object–oriented programming (Object-based

programming). The complete software modularization concept is divided in three main components i) Use of API ii) Use

of Non API iii) Use of shared variables.

.Keywords— Metrics /measurement, Software Modularization, API (Application Programming Interface), Coupling,

Function Call Traffic.

I. INTRODUCTION

A. Modularization

Modularization refers to the division of software into subunits. These subunits can be described as a macro, sub-routine,

procedure, function or a module according to the programming language used[9].

B. Software Modularization

Software modularization deal with different modules. These modules can be integrated directly or indirectly. The number of level between two modules also affects its quality. Type of modularization i.e. its API or non API also assigned by different

weight ages. These relations are represented in the form of coupling and cohesion in an object oriented language.

C. S/W ModularizationPrinciples As Software modularization is an important characteristic to Software Engineering.These are [6].

Principle 1: Related to Similarity of Purpose.

Maximization of Module Coherence on the Basis of Similarity and Singularity Purpose.

Minimization of Purpose Dispersion.

Maximization of Module Coherence on the basis of Commonality of goals.

Minimization of Goal Dispersion.

Principle 2:Related to Module Encapsulation.

Maximization of API-Based Inter-module Call Traffic. Minimization of Non-API Based Inter-module Call Traffic.

II. Objectives The proposed system is the representation of such a system that can provide a tool for this kind of modularization. System

will use software tool in java IDE that will accept the project folder as the input and inspect all its working including the

functional, modular and interface metrics. The system will work for object based, procedural, object orientation systems.

Along with it can estimate the software quality of any open source software system so the main objective of our proposed

approach is:

1. The main objective of this Project is to measure the quality of modularization of object-oriented projects by

Coupling-based Structural metrics.

2. Goal is to analyses or measure how the code is framed for the particular software and Applying Software metrics to show the result.

III. PRESENT WORK

We will at the present time a new set of metrics that cater to the principles. We will begin with coupling-based structural

metrics that provide various measures of the function-call traffic through the API’s of the modules in relation to the overall

function-call traffic. For that we have find the following four factors.

Page 2: Coupling Based Structural Metrics-An Quality Assessment of ...ijarcsse.com/Before_August_2017/docs/papers/Volume_3/6_June20… · The system will work for object based, procedural,

Gupta et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6),

June - 2013, pp. 1796-1800

© 2013, IJARCSSE All Rights Reserved Page | 1797

A. Module Interaction Index

This metric calculates how effectively a module’s API functions are used by the other modules in the system. Assume that a

module m has n functions nff ...1 , of which the n1 API functions are given by the subset a

n

a ff 11 ... . Also assume that the

system S has modules. We now express Module Interaction Index (MII) for a given modules and for the entire software system S by [6].

mK

fKextfffamMII

ext

aa

n

a

11 ....

= 0, when no external calls made to m,

M

i imMIIM

SMII1

1.

MII(m) =)(

)(}..........{

mKext

faKextfafaaf

B. Non-API Function Closedness Index

We now analyze the function calls from the point of view of non-API functions. Recall that the module encapsulation

principles P2 also require minimization of non-API-based inter-module call traffic. Ideally, the non-API functions of a

module should not expose themselves to the external world. We measure the extent of this traffic using a metric that we call

“Non-API Function Closedness Index,” or NC. Let a

mF ' and na

mF ' represent the set of all functions, the API functions, and the

non-API functions, respectively, in module m. Ideally,na

m

a

mm FFF . But since, in reality, we may not be able to

conclusively categorize a function as an API function or as a non-API function, this constraint would not be obeyed. The

deviation from this constraint is measured by the metric.

||||

||a

mm

na

m

FF

FmNC

= 0 if there are no non – API functions,

M

i imNCM

SNC1

1

C. API Function Usage Index

This index determines what fraction of the API functions exposed by a module is being used by the other modules. Suppose

that m has n API functions and let us say that jn number of API functions is called by another module jm . Also assume that

there are k modules kmm ....1 that call one or more of the API functions of module m. We may now formulate an API

function usage index in the following manner .

kn

nmAPIU

k

j j

*

1

= 0 if n = 0,

apiuM

i i

apiu

mAPIUM

SAPIU1

1

D. Implicit Dependency Index

This metric, which we call the Implicit Dependency Index (IDI), is constructed by recording for each module the number of

functions that write to global entities (such as variables, files, databases), with the specifications that such global entities are

accessed by functions in other modules. We believe that the larger this count is in relation to the size of the inter-module

traffic consisting of explicit function calls, the greater the insidiousness of implicit dependencies.

For each module mi, we use the notation ,,, jimmD jig to denote the number of dependencies created when a function

in mi writes to a global entity that is subsequently accessed by some function in jm let ,,, jimmD jif denote the

number of explicit calls made by all the functions in mi to any of the functions in jm . We claim that the larger gD is in

relation to jD , the worse the state of the software system. We therefore define the metric as follows :

Page 3: Coupling Based Structural Metrics-An Quality Assessment of ...ijarcsse.com/Before_August_2017/docs/papers/Volume_3/6_June20… · The system will work for object based, procedural,

Gupta et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6),

June - 2013, pp. 1796-1800

© 2013, IJARCSSE All Rights Reserved Page | 1798

jfjgmCmj

jfmCmj

mmDmmD

mmDmIDI

,,

,

= 1 when C (m) =,

M

i imIDIM

SIDI1

1

1)Algorithm for Coupling Based Structural Metric

This algorithms calculates how effectively a module’s API functions are used by the other modules in the system.

Step 1: To measure MII(S).

Step 2: Find API functions of modules.

𝑓𝑎 ∈ (𝑓𝑎 ……𝑓𝑛1𝑎 )

Step 3: Find external calls made to the API functions.

𝐾𝑒𝑥𝑡 (𝑓𝑎) , where 𝑓𝑎 ∈ (𝑓𝑎 ……𝑓𝑛1𝑎 )

Step 4: Find total external call made to the API functions.

𝐾𝑒𝑥𝑡 (𝑓𝑎) Step 5: Find total external function call made to the module.

𝐾𝑒𝑥𝑡 (𝑚)

Step 6: Find MII(m), division Of Step 3 by Step 4.

for MII(m) = 0, no external call made to m.

Step 7: Find the total MII(𝑚𝑖) of all modules, i.e. for i=1 to M.

𝑀𝐼𝐼(𝑚𝑖)𝑀𝑖=1

Step 8: For 𝑀𝐼𝐼 𝑆 , Divide Step 7 by number of modules i.e. 𝑀. Step 9: Output is 𝑀𝐼𝐼 𝑆 .

IV. RESULTS AND DISCUSSION Implementation is the stage of the project when the theoretical design is turned out into a working system. Thus it can be

considered to be the most critical stage in achieving a successful new system and in giving the user, confidence that the new

system will work and be effective.In this we develop a tool in java which explain as follws:

A. Code Analyser

Code Analyzer is a software tool which reads any java code which uses the modulizaration notion. In this code analyzer tool

we create four steps in menu bar as shown in figure below the steps are:-file, FindMetricFactor, Apply Formula and output

the working simulation result of the following code analyzer tool is in details shown step by step.

Figure4.1 Code Analyzer

B. Opening The Input Project

Figure 4.2 Input Project Data

Page 4: Coupling Based Structural Metrics-An Quality Assessment of ...ijarcsse.com/Before_August_2017/docs/papers/Volume_3/6_June20… · The system will work for object based, procedural,

Gupta et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6),

June - 2013, pp. 1796-1800

© 2013, IJARCSSE All Rights Reserved Page | 1799

C. Input Project AfterParsing

Figure 4.3 Project Parsing

D. Finding Metrics Factors

Figure 4.4Finding Metrics Factor

E. Applying Formula

Figure 4.5Apply Formula

F. Calculate Values as Output

Figure4.6 Calculate Value

Figure 4.7Result Coupling Based Metrics

Page 5: Coupling Based Structural Metrics-An Quality Assessment of ...ijarcsse.com/Before_August_2017/docs/papers/Volume_3/6_June20… · The system will work for object based, procedural,

Gupta et al., International Journal of Advanced Research in Computer Science and Software Engineering 3(6),

June - 2013, pp. 1796-1800

© 2013, IJARCSSE All Rights Reserved Page | 1800

In this we have designed three process classes and these all are integrated in the main class. The modularization achieve here

is the composition type. Where the independent classes are accessed in the same program. In the above application we are

interacting with in the application as well as the library is being used. It means both the API and non-API modularization

exist in the above representation. As we can see this type of composition where there is weak bounding between these classes. The given chart also represents the same where the modularization index show low bounding of modularization. But

still both the API and non API interfacing is being used in the application.

V. CONCLUSION

The proposed system is capable to estimate the software quality of the modules of the software. The proposed work provides

a conceptual and practical framework for the measurement of various attributes like inheritance, polymorphism, coupling,

cohesion, and depth of inheritance etc.The most common use of software modularization is interdependency of code to

interact with each other. They follow “Step-in out” method to carry out their functioning thereby increasing over all software

quality and productivity.

REFERENCES

[1] Shyam R. chidamber and chris F. Kemerer, “A Metrics Suit For Object Oriented Design”, IEEE Transactions On Software Engineering,Vol.29,No 6,June 1994.

[2] Basili, R. Victor, Fellow, Briand, C. Lionel and Melo, L.Walcelio, “The Conceptual Coupling Metrics for Object-

Oriented Systems”,Transactions On Software Engineering,Vol.22,No 10,October 1996.

[3] Edward B. Allen, Taghi M. Khoshgoftaar “Measuring Coupling and Cohesion of Software Modules:An Information-

Theory Approach",1530-1435,2001

[4] Arisholm Erik, Lionel C. Briand, and Foyen Audun ,“The Conceptual Coupling Metrics for Object-Oriented Systems”

,IEEE Transactions On Software Engineering,Vol.30,No 8,Auguest 2004.

[5] Poshyvanyk Denys, Andrian Marcu,”The Conceptual Coupling Metrics for Object-Oriented Systems” 22nd IEEE

International Conference on Software Maintenance (ICSM'06) 0-7695-2354-4/06.

[6] Sarkar Santonu, Girish Maskeri Rama, and Avinash C. Kak “API-Based and Information-Theoretic Metrics for

Measuring the Quality of Software Modularization”,IEEE Transactions On Software Engineering,Vol.33,No 1,January 2007.

[7] Mathur Aditya P.,”Foundation of Software Testing : fundamental algorithms and techniques” by Dorling Kindersley

Pvt. Ltd., 2008.

[8] Rama Girish Maskeri, Patel Naineet SETLabs., Infosys, Bangalore, India , “Software Modularization operators”,

Software Maintenance (ICSM), 2010 IEEE International Conference on E-ISBN: 978-1-4244-8628-1, 2010

[9] Praditwong, K, Harmanand, M. Xin Yao, “Software Module Clustering as a Multi–Objective Search Problem”, IEEE

Transactions On Software Engineering, 2010.