Abstract
Reusability is the ability to reuse without significant changes. Software reusability reduces development time, effort and cost. Software reuse is the process of developing new software from legacy software and not starting from scratch. However the predicting software reusability is a difficult process. Aspect oriented software development is a new approach that introduces the concept of aspects for implementing concerns. By applying an aspect oriented approach, issues related to crosscutting concerns can be isolated to increase reusability of the system. However, many research works aimed at accessing the software reusability of object oriented system but it remained unexplored for aspect oriented system. In this paper, reusability of aspect oriented systems is evaluated using package cohesion by following fuzzy logic technique.
Access provided by Autonomous University of Puebla. Download conference paper PDF
Similar content being viewed by others
Keywords
1 Introduction
Software engineering aims at improving the quality of software products in terms of their internal and external characteristics. Quality of software products and processes can be measured with the help of software metrics. But with the increase in the complexity of software, there was the need of better techniques. Object Oriented Approach (OOA) has evolved as a programming language where problem solutions are framed by decomposing them into objects that integrate functions and data in a single unit [1, 2]. Although OOA has many advantages in modelling constructs for modularity, polymorphism etc., it has some limitations also. In OOP, the implementation of concern is scattered in multiple classes. Such scattered concerns are called crosscutting concerns. Examples of such concerns are logging, synchronization, exception handling etc. [4]. Aspect Oriented technology provides the solution to this problem of crosscutting concerns which remained unsolved in Object oriented and other traditional languages.. Aspect Oriented software development (AOSD) emerged as technology that modularize crosscutting concerns with the introduction of new concept termed as aspect [3].
According to Salamon and Wallace [5], National Institute of Standard and Technology (NIST) provides measurement information for determining the reusability of software. The report prepared by NIST researchers identified ten indirect Quality characteristics for software products based on extensive research in the available literature, which also includes OO technology. The listed characteristics include parameters like- understandability, modularity, portability, reliability, completeness, maintainability, adaptability, flexibility, expandability, efficiency, completeness and generality. As Aspect Oriented Technology is an extension of OO technology and has some new features, some quality parameters needs to be redefined for aspect oriented technology. The important characteristics which contribute in assessment of reusability of AOS cannot be measured directly.
In order to provide solution to the problem Brichau and Hondt [6] proposed a reusability quality model. According to this proposed model, for measuring external quality characteristics internal characteristics such as complexity, cohesion, coupling and size are very helpful. The reusability model established the relationship among external Quality characteristics and internal characteristics by using the metrics for internal characteristics. According to this model reusability is mainly affected by Cohesion, Coupling, Size and SoC.
A high maintainable and quality software system has an advantage of reusing the existing packages, if the cohesion of these packages is maximized. As stated by Vinay and Vandana [7], Package level cohesion measure plays a crucial role in analyzing the reusability, maintainability and understandability of software. Martin et al. [8] in his work had proposed the package cohesion principles to address the goal of package structuring. According to Martin packages must contain classes that can be reused together and that are being affected by the same changes.
In this paper, effort is made to evaluate reusability of AOS using package cohesion measure PCohA, along with other package level metrics effecting reusability. Evaluation is carried out by using Fuzzy logic approach for predicting reusability using package level metrics.
The rest of the paper is organised as: Next section gives the related work done in this field which is followed by the factors affecting reusability. Then the fuzzy logic model for evaluating reusability using internal quality attributes is discussed which is followed by the case study of AspectJ project AJHotdraw for validating proposed model. In the last conclusion and future work is given.
2 Related Work
Nowadays, real world systems are evolving so fast that they are capable to meet challenges among the users and developers. A well modularized designing of software is required to meet the functional and non-functional requirement. AOSD has emerged as the development technology that modularizes the crosscutting concerns to handle the problem of scattering and tangling of concerns. Although AOSD has emerged as a solution for OO problems, but it has its own limitations. The related work will discuss the work done so far by many researchers in the area of OO and AO approach for assessing software reusability.
According to Salamon and Wallace [5], the National Institute of Standards and Technology (NIST) has defined the structural quality of software systems by specifying ten quality characteristics for software products. These quality characteristics are listed as- understandability, modularity, portability, reliability, completeness, maintainability, adaptability, flexibility, expandability, efficiency, correctness, and generality. To measure these indirect quality measures, inter quality attributes are required. According to the report, internal characteristics for assessing reusability and maintainability include - size, complexity, cohesion, coupling etc.
First quality model for AOS was proposed by Kumar et al. [9], known as AOSQUAMO. This model was an improvement of ISO Quality Model [10]. AOSQUAMO includes various external quality attributes like Complexity, Reusability, Modularity and Code-Reducibility. New attribute, evolvability is added to AOSQUAMO by Kumar [11], and the new model was named as AOSQ model. The author added some parameters as sub-characteristics of evolvability like Design Stability, Configurability etc.
Sant’ Anna et al. [12] proposed a framework to assess reusability and maintainability for AOS using internal attributes. Authors had proposed a metrics suite and a quality model for AOS. The authors have concluded that the quality of AOS can be assessed using structural design properties such as coupling, cohesion, and SOC. Leite et al. [13], has worked on enhancing the quality of software in terms of its reusability using goal driven process to. Authors have proposed a method for using quality parameters for calculating software reuse. Cunha et al. [14] had explored the use of quality characteristics like reusability, modularity and understandability for AspectJ along with java programming to enhance the AO development. Zhang et al. [15] had worked on using AOS for designing reusable connectors. Aljassere et al. [16] has proposed a new language ParaAJ, to enhance reusability in AOS by modularizing aspects.
Singh et al. [17], has proposed a model to predict maintainability for AOS using fuzzy logic. They had considered the four main internal quality attributes for assessment: coupling, cohesion, size and SOC. All these metrics are class level metrics. Nerurkar et al. [18] in their work has demonstrated the process of automating the prediction of reusability using external parameters - Understandability, maintainability, adaptability and AOS using fuzzy logic approach by considering internal parameters - cohesion, coupling, Size and SOC. Singh et al. [19], in their another research work had used fuzzy logic for assessing reusability for AOS. They concluded that using fuzzy logic for assessing reusability can help in selecting best quality software. Singh, Sangwan and Srivastava [20]) had also proposed reusability assessment model for AOS using Multi Criteria Decision Making (MCDM) approach. They have validated the proposed model by using Analytic Hierarchy Process (AHP) and cross validated it by applying Fuzzy AHP. Singh and Singhal [21] worked on assessing reusability for component based software system using fuzzy logic approach. They have used various factors like modularity, maintainability etc. for predicting the reusability.
All the frameworks for assessing OOS and AOS quality are defined on the basis of class level metrics. In this paper efforts have been made to assess Reusability, using the fuzzy model approach for AOS using package level metrics. Here, Package level metrics like Package cohesion (PCohA) [22], coupling etc., are used to assess reusability.
3 Factors Affecting Reusability
Package level metrics for reusability is proposed [23] as:
-
1.
ECA (Efferent Coupling in Aspects): This is defined as the number of packages (aspects) on which a package (aspect) depends upon.
-
2.
PCohA (Package level Cohesion in AOS): It is defined as the percentage of number of relations of each class present in the aspect to the number of classes in the aspect, averaged over the total number of classes in the aspect.
-
3.
Aspect Design Size (ADS): This is the total number of classes and interfaces in aspect (Package).
-
4.
Messaging (IP): Messaging can be calculated by counting the interface size of the package. Interface size of the package is the count of public classes in the package.
These metrics are defined on the basis of formula given in Eq. (1):
4 Proposed Fuzzy Framework
This section gives the description of fuzzy logic approach for assessing of reusability for AOS.
Fuzzy logic approach for prediction was introduced with the idea of fuzzy set theory by Lotfi Zadeh [25]. It is defined to present the theory of incomplete facts, where the fact value may vary from totally true to totally false [26]. According to Sivanandam et al. [26], the fuzzy model can be implemented with the help of Fuzzy inference system (FIS). FIS works by mapping input variables with output variable using fuzzy set. It consists of four modules - Fuzzification, Inference, Composition and Defuzzification. FIS works through five steps:
-
1.
Fuzzification of the inputs using the membership functions,
-
2.
Constructing Fuzzy Rules for fuzzified inputs,
-
3.
Mapping the input rules with the output membership function, to find the weightage of the rule.
-
4.
Analyzing the results to get predicted value of output.
Input variables are the internal characteristics that are used to assess the output attribute. The output variable is the dependent attribute which is to be predicted after fuzzification of input attributes. For the proposed fuzzy approach, input variables are the internal attributes of software such as cohesion, coupling etc. and the output variable is the external attribute such as Reusability etc. Membership functions are defined for input and output attributes to link their values. Measurement values of all attributes (inputs and outputs) are taken in scale of 0 to 1. To evaluate output variable using input variables in MATLAB, Mamdani fuzzy system is used.
Membership functions links input attributes with output attributes with the help of rules defined on inputs. Rules are constructed in Rule editor, the graphical interface for constructing rules in fuzzy model. The rules are of the form “If’abc’ and/or’xyz’ then’ XYZ’ ”. The rules constructed with the help of rule editor can be viewed through rule viewer. It consists of columns representing input and output variables. If there are n columns in the rule viewer, then last column represents the ‘then’ part of each rule and rest n-1 columns are referring to input variables.
5 Assessing Reusability for AOS Using Fuzzy Approach
5.1 Input and Output Variables for Fuzzy Model
For implementing proposed fuzzy model, input and output variables are required. Here, output variable is quality parameter Reusability for Aspect Oriented system and input variables for assessing Reusability are as follows:
-
1.
Coupling: ECA (Efferent Coupling in Aspects)
-
2.
Cohesion: PCohA (Package level Cohesion in AOSD)
-
3.
Design size: ADS (Aspect Design Size)
-
4.
Messaging: IP (Interface size of Package)
These input variables are mapped with output variables for predicting their effects using MATLAB Mamdani fuzzy system.
5.2 Membership Functions
FIS links the input values with output using membership functions. In this work, membership functions for input and output variables scaled in the range of 0 to 1 using the triangular (trimf) membership functions of MATLAB. Table 1 shows the scaled membership functions.
5.3 Rule Base for Proposed Model
In this work, three input variables are used for predicting output parameter reusability for all three cases and scaled them to three values (Table 1). So, total number of rules for each output variable is 33 which are 27 rules i.e. there are 27 if-then rules constructed using Rule Editor for each output. Figure 1 shows the rule editor for AOSReusability.
Rules are constructed on the basis of knowledge for software Reusability. For example, reusability of any software is positively correlated with cohesion and is adversely affected by coupling value [24]. Then rule can be constructed as - If Size and Coupling is low and Cohesion is high, then Reusability is high. In the similar ways, all the 27 rules are constructed for AOSReusability. Some sample rules for are given in Table 2.
Different set of input values are given as input into the fuzzy model to find the corresponding effect on output variable Reusability. Suppose the value of input variables is: PCohA = 0.5, CEA = 0.5 and ADS = 0.5. These inputs value are provided to the fuzzy model to obtain the output as 0.48 i.e. Medium. Table 3 shows the results of giving some rules as input to the proposed fuzzy based system for AOSReusability.Table 3 shows the results of giving some rules as input to the proposed fuzzy based system for AOSReusability.
It is concluded from the predicted results that the proposed fuzzy model is best suitable for determining the estimations for external quality attributes for AOS. It is clear from the predicted values that cohesion has positive effect on Reusability.
The next section presents a case study AspectJ project AJhotdraw, for validating predictions made for Reusability using proposed fuzzy model approach.
6 Case Study: AJhotdraw
In this section, AJhotdraw an aspectJ project has been studied for validating the predictions made in the proposed fuzzy model for measuring Reusability.
AJhotdraw is the aspect refactoring of Jhotdraw, drawing application developed as display good design patterns in java. AJhotdraw is written in AspectJ, an aspect language that extends java with crosscutting functionality. Many researchers have used AJhotdraw for their research oriented studies on AOS. There are 4 versions of AJhotdraw. Here, AJhotdraw 0.4 release is analysed for measuring Reusability. It is composed of 24 packages, 330 classes and total lines of code are 21542. For this research 20 packages have been analysed. Composition of those 20 packages of AJhotdraw is shown in Table 4.
Since we are assessing reusability using package level metrics, Table 5 gives the value of Reusability for each package of AJhotdraw.
Figures 2, 3 and 4 shows the relationship of package cohesion (PCohA), design size and package level coupling with Reusability respectively for each package. It is clear from the above figures that Reusability is positively affected by package cohesion whereas coupling and size has negative effects on Reusability of the packages. Karl Pearson Product Moment correlation is used to calculate the correlation between three input parameters and reusability using the values from Table 5. Correlation values are given in Table 6.
Correlation values in Table 6, has validated the predictions made through the proposed fuzzy model. It is validated that, the reusability is positively correlated with PCohA, whereas it is negatively correlated with Size and Coupling. Hence for system to be more reusable, its coupling must be low and cohesion must be high.
7 Conclusion
In this paper, a framework is proposed to assess Reusability of AOS using rule based fuzzy model. Since measuring internal quality attributes is not an easy task, it is very difficult to quantify them and hence difficult to find their contribution in assessing external quality attributes. Here in this paper, we have tried to find solution to this problem by using fuzzy logic for assessing Reusability using the package level metrics. From the literature, it has been found that very few research works have been done on assessing Reusability using Package level quality attributes for AOS. All the work is done using class level metrics. From literature review it is found that, Reusability is affected by cohesion, coupling, size, inheritance etc. These internal attributes are used as input variables for proposed Fuzzy model approach. Using Rule based fuzzy model, 27 rules are constructed for input variables to assess Reusability. Predicted values are validated by analyzing the results of measured values for Reusability using AJhotdraw, an AspectJ software. Analysis has shown that the predictions made from the fuzzy model approach for assessing Reusability are similar to the values obtained from AJhotdraw. Assessment using the proposed model can help in predicting software reusability automatically, for a module as well for the whole AOS.
The assessment framework proposed in this paper, will help in encouraging software organizations to software which are less maintainable and highly reusable. In future, other quality attributes like maintainability etc. can be assessed using metrics for AOS. Also, in future the proposed model can be applied and cross validated for Aspect oriented approach using the neural network techniques for assessment of external attributes.
References
Jacobson, I., Christerson, M., Jonsson, P., Overgaard, G.: Object Oriented Software Engineering: A Use Case Driven Approach. Addison - Wesley Publishing, Boston (1992)
Kartal, Y.B.: An evaluation of aspect oriented programming for embedded real time systems. In: IEEE Department of Microwave System Technologies. TURKEY (2007)
Filho, C., Mary, C.: A Quantitative study on the aspectization of exception handling. In: Proceedings of ECOOP, Workshop on Exception Handling in Object Oriented System (2005)
Salamon, W.J., Wallace, D.R.: Quality characteristics and metrics for reusable software (Preliminary Report). US DoC for US DoD Ballistic Missile Defence Organization. NISTIR 5459 (1994)
Brichau, J., D’Hondt.: An Introduction to Aspect Oriented Software Development AOSD. Europe (2005)
Vinay, V.: Assessing package reusability in object oriented design. Int. J. Softw.Eng. Appl. 8(4), 75–84 (2014)
Filman, R., Elrad, T., Clarke, S., Aksit, M.: Aspect oriented Software Development. Book by Pearson Education (2014)
Kumar, A., Grover, P.S., Kumar, R.: A quantitative evaluation of aspect oriented software quality model. ACM SIGSOFT Softw. Eng. Notes 34(5), 1–9 (2009)
ISO/IEC 9126–1, 2001, ISO/IEC 9126-2, 2003, ISO/IEC 9126-3, 2003 and ISO/IEC 9126-4, 2004, “Information Technology - Product Quality, Quality Model, External Metrics, Internal Metrics, Quality in use Metrics”, International Standard ISO/IEC 9126, International Standard Organization
Kumar, P.: Aspect oriented software quality model- the aosq model. Adv. Comput. Int. J. 3(2), 105–118 (2012)
Sant’ Anna, C., Garcia, A., Chavez, C., Lucena, C., Staa, A.: On the reuse and maintenance of aspect-oriented software: an assessment framework. XXIII Brazilian Symposium on Software Engineering, Manaus, Brazil (2003)
Leite, J.C., Yu, Y., Lui, L., Yu, E.S.K., Mylopoulos, J.: Quality based software reuse, advanced information system engineering.In: Proceedings of 17th International Conference, pp. 535–550. Portugal (2005)
Cunha, C.A., Sobral, J. L., Monteiro, M.P.: Reusable aspect-oriented implementations of concurrency patterns and mechanisms. In: Proceedings of 5th International Conference on Aspect-Oriented Software Development, pp. 134–145. ACM, New York (2006)
Zhang, J., Li, H., Cai, X.: Research on reusability of software connector based on AOP. In: IEEE Proceedings of International Conference on Computer Science and Information Technology (ICCSIT 2008), pp. 113–117 (2008)
Aljasser K., Schachte P.: ParaAJ -toward reusable and maintainable aspect oriented programs. In: Proceedings of 32nd Australasian Computer Science Conference, pp 53–62. Wellington, New Zealand (2009)
Singh, P.K., Sangwan, O.P., Srivastava, A.: An essence of software maintenance prediction using the fuzzy model for aspect oriented software. ARPN J. Eng. Appl. Sci. 9(9), 1598–1605. (2014)
Nerurkar, N.W., Kumar, A., Shrivastava, P.: Assessment of reusability in aspect oriented systems using fuzzy logic. ACM SIGSOFT Softw. Eng. Note 35(5), 1–5 (2010)
Singh, P.K., Sangwan, O.P., Singh, A.P., Pratap, A.: A framework for assessing the software reusability using fuzzy logic approach for aspect oriented software. Int. J. Inf. Technol. Comput. Sci. (2), 12–20 (2015)
Singh, P.K., Sangwan, O.P., Srivastava, P.: A quantitative evaluation for reusability for aspect oriented software using multi-criteria decision making approach. World Appl. Sci. J. 30(12), 1966–1976 (2014)
Singh, C., Pratap, A., Singhal, A.: An estimation of software reusability using fuzzy logic techniques.In: IEEE proceedings of International Conference on Signal propagation and Computer Technology (ICSPCT), pp: 250–256 (2014)
Kaur, P.J., Kaushal, S., Sangaiah, A.K., Picialli, F.: A framework for assessing reusability using package cohesion measure in aspect oriented system. Int. J. Parallel Progr. Spec. Issue Progr. Models Algorithms Data Anal HPC Syst. 1–22 (2017)
Kaur, P.J., Kaushal, S.: Package level metrics for reusability in aspect oriented systems. In: Proceedings of IEEE International Conference on Futuristic Trend in Computational Analysis and Knowledge Management (ABLAZE), pp: 364–368 (2015)
Bansiya, J., Davis, C.G.: A hierarchical model for object oriented design quality assessment. IEEE Trans. Softw. Eng. 28(1) (2002)
Zadeh, L.A.: Fuzzy logic, neural networks and soft computing. Commun. ACM 37(3), 77–84 (1994)
Novak, V., Perfilieva, I., Mockor, J.: Mathematical principles of fuzzy logic. Dodrecht Kluwer Academic. ISBN 0-7923-8595-0 (1999)
Sivanandam, S.N., Sumathi, S., Deepa, S.N.: Introduction to Fuzzy Logic using MATLAB. Springer-Verlag, Berlin Heidelberg (2007)
Author information
Authors and Affiliations
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2019 Springer Nature Singapore Pte Ltd.
About this paper
Cite this paper
Kaur, P.J., Kaushal, S. (2019). Effect of Package Cohesion on Evaluation of Reusability of Aspect Oriented Systems: A Fuzzy Approach. In: Luhach, A., Singh, D., Hsiung, PA., Hawari, K., Lingras, P., Singh, P. (eds) Advanced Informatics for Computing Research. ICAICR 2018. Communications in Computer and Information Science, vol 955. Springer, Singapore. https://doi.org/10.1007/978-981-13-3140-4_57
Download citation
DOI: https://doi.org/10.1007/978-981-13-3140-4_57
Published:
Publisher Name: Springer, Singapore
Print ISBN: 978-981-13-3139-8
Online ISBN: 978-981-13-3140-4
eBook Packages: Computer ScienceComputer Science (R0)