Post-Print Version DOI: http://doi.acm.org/10.1145/1569901.1570253

An Adaptive Strategy for Improving the Performance of Genetic Programming-based Approaches to Evolutionary Testing José Carlos Bregieiro Ribeiro

Mário Alberto Zenha-Rela

Francisco Fernández de Vega

Polytechnic Institute of Leiria Morro do Lena, Alto do Vieiro Leiria, Portugal

University of Coimbra CISUC, DEI, 3030-290, Coimbra, Portugal

University of Extremadura C/ Sta Teresa de Jornet, 38 Mérida, Spain

[email protected]

[email protected]

[email protected] ABSTRACT

This paper proposes an adaptive strategy for enhancing Genetic Programming-based approaches to automatic test case generation. The main contribution of this study is that of proposing an adaptive Evolutionary Testing methodology for promoting the introduction of relevant instructions into the generated test cases by means of mutation; the instructions from which the algorithm can choose are ranked, with their rankings being updated every generation in accordance to the feedback obtained from the individuals evaluated in the preceding generation. The experimental studies developed show that the adaptive strategy proposed improves the algorithm’s efficiency considerably, while introducing a negligible computational overhead.

Categories and Subject Descriptors D.2.5 [Software Engineering]: Testing and Debugging— Testing tools (e.g., data generators, coverage testing)

General Terms Verification

Keywords Evolutionary Testing, Search-Based Software Engineering, Genetic Programming, Adaptive Evolutionary Algorithms

1.

INTRODUCTION

Evolutionary Algorithms (EAs) are general – yet powerful – methods for search and optimization. However, if knowledge about a problem is available, a bias can be introduced directly into the problem so as to remove (or penalize) undesirable candidate solutions and improve the efficiency of the search. Unfortunately, a priori knowledge about the intricacies of the problem is frequently unavailable, but this does not necessarily prevent introducing an appropriate specific bias into an evolutionary problem; for many tasks, it is possible to dynamically adapt aspects to anticipate the regularities of the environment and improve solution optimization or acquisition speed [1]. Adaptive Evolutionary Copyright is held by the author/owner(s). GECCO’09, July 8–12, 2009, Montréal Québec, Canada. ACM 978-1-60558-325-9/09/07.

Algorithms (AEAs) are distinguished by their dynamic manipulation of selected parameters or operators during the course of evolving a problem solution [2]. The focus of our on-going research is on generating test data for the unit-testing of Object-Oriented (OO) programs using EAs. Our approach to Evolutionary Testing (ET) involves representing and evolving test cases using the StronglyTyped Genetic Programming (STGP) paradigm. Test case quality evaluation involves instrumenting the object under test, and executing it using the generated test cases – with the intention of collecting trace information with which to derive coverage metrics. The goal is that of finding a test set that achieves full structural coverage of the test object [4]. The main contribution of this study is that of proposing a novel adaptive approach to ET.

2.

AN ADAPTIVE STRATEGY TO ET

In STGP-based ET approaches the Method Call Sequences (MCSs) that compose test cases are encoded as STGP trees. Each tree subscribes to a Function Set, which must be specified beforehand and defines the STGP nodes legally permitted in the tree; the Function Set thus contains the set of instructions from which the algorithm can choose, and defines the constraints involved in MCS construction. The Function Set definition process is, however, heavily problemspecific and usually falls on the users’ hands; there are good reasons to suppose that there is no one strategy that will be optimal for all ET problem domains. The novel strategy proposed is based on the concept of dynamically adapting the Function Set’s constraints selection probabilities. During an evolutionary run, it is possible to perceive that the introduction of certain instructions should be favoured, e.g. because they had been less prone to throw runtime exceptions and their introduction will likely contribute to test case feasibility [5], or simply because they had been used less frequently and their inclusion would promote diversity and allow trying out different objects and states in the search for full structural coverage. The main process by which new genetic material is introduced during the evolutionary search is by means of the mutation operator. Whenever mutation occurs, a new (sub)tree must be created; we propose employing Luke’s Stronglytyped Probabilistic Tree Creation 2 (PTC2) algorithm [3] to perform this task, so as to take advantage of the built-in feature that allows assigning probabilities to the selection of

Table 1: Percentage of runs to attain full coverage. Test Object adaptive static Vector 80% 77% BitSet 56% 45% constraints. What’s more, we have modified this algorithm in order to be able to dynamically update the constraints’ probabilities during the evolutionary run. Namely, the constraints’ selection probabilities are recalculated every generation as detailed in the following Section.

3.

5.

TECHNICAL APPROACH

Let the constraint selection ranking of constraint c in generation g be identified as ρgc . Then, ρgc is updated, at the beginning of each generation, as follows. ρgc = ρg−1 − λg−1 − σcg−1 − γcg−1 c c

(1)

The runtime exceptions caused factor λ is equal to the number of runtime exceptions thrown by instructions corresponding to constraint c dividing by the total number of trees (i.e., MCSs). This factor’s main purpose is that of penalizing the ranking of constraints corresponding to instructions that have caused runtime exceptions to be thrown in the preceding generation. The runtime exceptions caused by ancestors factor σ is equal to the sum of the inverses of the ancestry levels (2 = parent, 3 = grandparent, ...) of the ancestors of constraint c that threw runtime exceptions. This factor’s main purpose is that of penalizing the ranking of constraints which have participated in the composition of sub-trees (i.e., sub-MCSs) that have caused runtime exceptions to be thrown in the preceding generation. The constraint diversity factor γ is equal to the deviation between the number of times constraint c was used and the average number of times all constraints were selected for inclusion in the MCSs of the preceding generation, dividing by the deviation range (i.e., the maximum deviation minus the minimum deviation). This factor’s main purposes are those of allowing constraints to recover their ranking if they have been being used infrequently, and penalizing the ranking of constraints which have been selected too often. The constraints’ selection probabilities correspond to the normalized values of the ρ factors.

4.

the percentage of runs to attain full structural coverage per method, the adaptive strategy outperformed the static approach in 28.4% of the methods tested, whereas the latter only surpassed the former in 5.9% of the situations. What’s more, the adaptive strategy allowed attaining full structural coverage for 4 methods in which the success rate had been of 0% using the non-adaptive strategy – which indicates that this strategy is specially suited for overcoming some difficult state problems. In terms of speed, the overhead introduced by embedding the adaptive strategy into the evolutionary algorithm was a mere 0.19%.

EXPERIMENTAL STUDIES

The adaptive technique described in the previous Sections was embedded in eCrash tool [4], and a series of empirical studies were executed with the objective of assessing its contribution to enhance the test case generation procedure. The Java Vector and BitSet classes (JDK 1.4.2) were used as test objects, and 20 runs were executed for each of the 67 public methods of these classes; half of these runs were performed employing the adaptive strategy, and half using a “static” approach for comparison purposes. The results clearly indicated that the test case generation procedure’s success rate was improved by the inclusion of the adaptive methodology. Regarding the overall average number of runs attaining full structural coverage, the adaptive strategy enhanced results by 3% for the Vector class and by 11% for the BitSet class (Table 1). In terms of

CONCLUSIONS

The main contribution of this work is that of proposing a dynamic adaptation strategy for promoting the introduction of relevant instructions into the generated test cases by means of mutation. The adaptive ET strategy proposed obtains feedback from the individuals produced and evaluated in the preceding generation, and dynamically updates the selection probability of the constraints defined in the Function Set so as to encourage the selection of interesting genetic material while promoting diversity and test case feasibility. This methodology allows mitigating the negative effects of including a large number of entries into the Function Set; also, it allows a higher degree of freedom when defining it, by minimizing the impact of redundant, irrelevant or erroneous choices. The experimental studies implemented indicate a considerable improvement in the algorithm’s efficiency when compared to its static counterpart, while introducing a negligible overhead. Future work involves developing strategies for dynamically adapting other aspects of our EA, such as the operators’ selection probabilities.

6.

ACKNOWLEDGEMENTS

This work has been partially supported by project TIN200768083-C02 (Spanish Ministry of Education and Culture, NonHierarchical Network Evolutionary System Project – NoHNES).

7.

REFERENCES

[1] P. J. Angeline. Adaptive and self-adaptive evolutionary computations. In Computational Intelligence: A Dynamic Systems Perspective, pages 152–163. IEEE Press, 1995. [2] A. E. Eiben, R. Hinterding, and Z. Michalewicz. Parameter control in evolutionary algorithms. IEEE Transactions on Evolutionary Computation, 3:124–141, 1999. [3] S. Luke. Two fast tree-creation algorithms for genetic programming. IEEE Transactions on Evolutionary Computation, 4(3):274–283, Sept. 2000. [4] J. C. B. Ribeiro. Search-based test case generation for object-oriented java software using strongly-typed genetic programming. In GECCO ’08: Proceedings of the 2008 GECCO Conference Companion on Genetic and Evolutionary Computation, pages 1819–1822, New York, NY, USA, 7 2008. ACM. [5] J. C. B. Ribeiro, M. Z. Rela, and F. F. de Vega. A strategy for evaluating feasible and unfeasible test cases for the evolutionary testing of object-oriented software. In AST ’08: Proceedings of the 3rd International Workshop on Automation of Software Test, pages 85–92, New York, NY, USA, 2008. ACM.

An Adaptive Strategy for Improving the Performance of ...

Performance of Genetic Programming-based. Approaches to Evolutionary ... Evolutionary Testing, Search-Based Software Engineering,. Genetic Programming ...

124KB Sizes 1 Downloads 253 Views

Recommend Documents

An Adaptive Strategy for Improving the Performance of ...
Software testing is an ... software testing. Evolutionary Testing. Evolutionary. Algorithms. +. Software ... Let the constraint selection ranking of constraint c in.

Improving Performance of World Wide Web by Adaptive ...
Dec 17, 2006 - of the file, saving the web pages at the client side, changing the burst nature of traffic ... unnecessarily increase storage costs, transmission costs, download .... When uploading large files, intelligent agents prompt the user to ..

Techniques for Improving the Performance of Naive ...
... negatively. In such cases,. 1 http://people.csail.mit.edu/people/jrennie/20Newsgroups/. 2 http://www.cs.cmu.edu/afs/cs.cmu.edu/project/theo-20/www/data/ ...

an adaptive parameter control strategy for aco - Semantic Scholar
Aug 16, 2006 - 1College of Computer Science and Engineering, South China University of Technology, Guangzhou, P. R. ... one of the best performing algorithms for NP-hard problems ..... program tools, systems and computing machines.

Techniques for Improving the Performance of Naive Bayes ... - CiteSeerX
and student of the WebKB corpus and remove all HTML markup. All non-alphanumeric ..... C.M., Frey, B.J., eds.: AI & Statistics 2003: Proceedings of the Ninth.

Improving Security and Performance of an Ad Hoc ...
munications systems, the Research Community focused its effort on security and. ⋆ The work of ... privacy to wireless Mobile Ad Hoc networks (MANETs). ...... For a text file, it is simply not possible, we could loose information which prevents the 

APPLICATION OF AN ADAPTIVE BACKGROUND MODEL FOR ...
Analysis and Machine Intelligence, 11(8), 1989, 859-872. [12] J. Sklansky, Measuring concavity on a rectangular mosaic. IEEE Transactions on Computing, ...

Improving Performance of Communication Through ...
d IBM Canada CAS Research, Markham, Ontario, Canada e Department of Computer .... forms the UPC source code to an intermediate representation (W-Code); (ii). 6 ...... guages - C, Tech. rep., http://www.open-std.org/JTC1/SC22/WG14/.

Improving the Performance of the Sparse Matrix Vector ...
Currently, Graphics Processing Units (GPUs) offer massive ... 2010 10th IEEE International Conference on Computer and Information Technology (CIT 2010).

Improving the Packet Delivery Performance for ... - IEEE Xplore
Abstract—In this letter, we investigate the properties of packet collisions in IEEE 802.15.4-based wireless sensor networks when packets with the same content ...

Improving Energy Performance in Canada
Sustainable Development Technology Canada –. NextGen ..... through education and outreach, as well as through .... energy science and technology by conducting ...... 171 026. Oct. 11. 175 552. Nov. 11. 167 188. Dec. 11. 166 106. Jan. 12.

Improving Energy Performance in Canada
and Canadian businesses money by decreasing their energy bills ... oee.nrcan.gc.ca/publications/statistics/trends11/pdf/trends.pdf. economy in ...... 2015–2016.

Improving FPGA Performance and Area Using an ... - Springer Link
input sharing and fracturability we are able to get the advantages of larger LUT sizes ... ther improvements built on the ALM we can actually show an area benefit. 2 Logic ..... results comparing production software and timing models in both cases an

Improving FPGA Performance and Area Using an ... - Springer Link
that a 4-LUT provides the best area-delay product. .... This terminology is necessary in order to account for area later. ... a 12% overall savings in ALM area.

Improving the Performance of Trickle-Based Data Dissemination in ...
and Johan J. Lukkien. Dept. of Mathematics and Computer Science, Eindhoven University of Technology,. P.O. Box 513, 5600 MB, Eindhoven, The Netherlands.

Improving the Finite Sample Performance of ...
ternational risk$sharing becomes larger when the technology shock becomes ..... Assumption FL can be replaced by the bounded deterministic sequence of.

Improving UX through performance - GitHub
Page 10 ... I'm rebuilding the Android app for new markets ... A debug bridge for Android applications https://github.com/facebook/stetho ...

Improving Performance and Lifetime of the SSD RAID-based Host ...
This paper proposes a cost-effective and reliable SSD host ..... D10. D11. SSD. Cache. 2. P0. P1. P2. P3. SSD. Cache. 3. Stripe. Data. Parity. Figure 2: .... Web. Response Time (Rela*ve). RAID-0. RAID-5. SRC. Figure 4: Response times of SRC and RAID-

Mini-Rank: Adaptive DRAM Architecture for Improving ...
classify the twenty-six benchmarks of the SPEC2000 suite .... trend of power saving and performance impact are similar to ..... IEEE Micro, 26(4):52–60, 2006.

Improving the Performance of Web Services by ...
I. INTRODUCTION. As far as communication for distributed applications in ... dynamic strategy based on client profiling and on a predic- tive model. With a ...

An Architecture for Affective Management of Systems of Adaptive ...
In: Int'l Workshop on Database and Expert Systems Applications (DEXA 2003), ... Sterritt, R.: Pulse monitoring: extending the health-check for the autonomic grid.

An Adaptive Hybrid Multiprocessor Technique for ... - Kaust
must process large amounts of data which may take a long time. Here, we introduce .... and di are matched, or -4 when qi and di are mismatched. To open a new ...