Software Module Clustering Using Bio-Inspired Algorithms

Software Module Clustering Using Bio-Inspired Algorithms

Kawal Jeet (D. A. V. College, India) and Renu Dhir (Dr. B. R. Ambedkar National Institute of Technology, India)
DOI: 10.4018/978-1-4666-9644-0.ch017
OnDemand PDF Download:


Nature has always been a source of inspiration for human beings. Large numbers of complex optimization problems have been solved by the techniques inspired by nature. Software modularization is one of such complex problems that have been encountered by software engineers. It is the process of organizing modules of a software system into optimal clusters. In this chapter, some bio-inspired algorithms such as bat, artificial bee colony, black hole and firefly algorithm have been proposed for the cause of software modularization. The hybrid of these algorithms with crossover and mutation operators of the genetic algorithm has also been proposed. All the algorithms along with their hybrids are tested on seven benchmark open source software systems. It has been evaluated from the results thus obtained that the hybrid of these algorithms proved to optimize better than the existing genetic and hill-climbing approaches.
Chapter Preview


Human beings are always fascinated by nature. They have always found inspiration from nature in solving complex research and engineering problems. It could be easily depicted from various new optimization algorithms that are bio-inspired. Genetic Algorithms (GA)(Goldberg, 2006), Bat algorithm (Bat)(Yang, 2010b),Artificial Bee Colony algorithm (Mala & Mohan)(Yan, Zhu, Zou, & Wang, 2012), Black Hole algorithm (BH)(Hatamlou, 2013), Firefly algorithm (Kononoff, Lehman, & Heinrichs; Yang, 2010a)are the names of few of them. GA has been inspired by Darwin’s theory of survival of the fittest bat algorithm has been inspired by the technique followed by bats to locate its prey in dark, ABC is an algorithm that has been inspired by swarm behavior of honey bees; BH has been inspired by the gravity of black holes in universe where gravitational force is so strong that even light can’t get escape and FF has been inspired by the flashing characteristics of fireflies to attract other fireflies. These algorithms are widely used for solving various complex optimization problems ranging from routing in wireless networks to image optimization.

In this paper, some of the bio-inspired algorithms have been used for modularization of software systems. Software modularization is the process of allocating modules to subsystems or clusters. This allocation should lead to efficient modularization of the software system concerned. It should be done in such a way that there should be minimum coupling and maximum cohesion among the subsystems and clusters thus generated. It is particularly useful to

  • Recover the modularization of the system when source code is the only means available to get information about the system.

  • Identify the best possible package to which classes of a java project should be allocated to its actual delivery.

  • Combine the classes that could be downloaded together.

Software modularization is particularly useful during the maintenance phase of the software development life cycle. Maintenance is the largest and most expensive phase of the software development lifecycle (IEEE Standard for Software Maintenance). During this phase, the software system undergoes continuous change and is enhanced for a number of reasons. It is generally accompanied by the turnover of the software engineers involved in its development. It ultimately leads to the decay of the original clustering of the modules of the system concerned. It is called software erosion. For the effective and efficient maintenance of the software system, it is important to re-identify the modularization of this system. It might be a difficult task, especially in the absence of original design documents.

In this proposed work, bio-inspired algorithms such as bat, ABC, BH, and FF have been used for solving the problem of software modularization. These algorithms work to find optimized results but might get stuck at local optima. Experiments have been conducted to use the hybrid combination of these algorithms with crossover and mutation operators of genetic algorithm for software module clustering. Adding these operators has an inherent advantage of adding randomization which saves these algorithms to get stuck at local optima. Although we observed good quality modularization but we recommend the resulting modularization to be approved by the experts. In other words, it could be used as guidance to the experts but could not replace them.

The rest of the chapter is organized as discussed here. The literature of the field of software modularization, as well as applications of bio-inspired algorithms, has been discussed. Further, a concept of search based software engineering has been discussed along with the skeleton of bio-inspired algorithms. Software modularization using these bio-inspired algorithms has been elaborated. The experimental setup which includes the information about the samples, encoding scheme and algorithmic parameters used has been given. Results are discussed and analyzed followed by the discussion about threats to the validity of this research work, conclusion, and future work.

Key Terms in this Chapter

Radius of Event Horizon: Sphere shaped boundary around the black hole where escape speed is equal to a speed of light. Nothing can escape once it enters this radius because nothing can have speed faster than the speed of light.

Graphviz: Graph Visualization Software is open source software initiated by AT&T Labs which is used for drawing graphs.

Software Modularization: It is the process of organizing modules of a software system into optimal clusters.

Search Based Software Engineering: Application of meta-heuristic search to a large body of software engineering where natural representation and fitness function suggest themselves.

Module Dependency Graph: Graph representing the system modules as nodes and the module-level relationships as edges between these nodes.

Firefly: A unisex creature which attracts other regardless of its sex.

Black Hole: A region in space with so much mass concentration that no object can escape its gravitational pull.

Modularization Quality: Ratio of cohesion and coupling.

Complete Chapter List

Search this Book: