Search-based software engineering explained

Search-based software engineering (SBSE) applies metaheuristic search techniques such as genetic algorithms, simulated annealing and tabu search to software engineering problems. Many activities in software engineering can be stated as optimization problems. Optimization techniques of operations research such as linear programming or dynamic programming are often impractical for large scale software engineering problems because of their computational complexity or their assumptions on the problem structure. Researchers and practitioners use metaheuristic search techniques, which impose little assumptions on the problem structure, to find near-optimal or "good-enough" solutions.[1]

SBSE problems can be divided into two types:

Definition

SBSE converts a software engineering problem into a computational search problem that can be tackled with a metaheuristic. This involves defining a search space, or the set of possible solutions. This space is typically too large to be explored exhaustively, suggesting a metaheuristic approach. A metric[3] (also called a fitness function, cost function, objective function or quality measure) is then used to measure the quality of potential solutions. Many software engineering problems can be reformulated as a computational search problem.[4]

The term "search-based application", in contrast, refers to using search-engine technology, rather than search techniques, in another industrial application.

Brief history

One of the earliest attempts to apply optimization to a software engineering problem was reported by Webb Miller and David Spooner in 1976 in the area of software testing.[5] In 1992, S. Xanthakis and his colleagues applied a search technique to a software engineering problem for the first time.[6] The term SBSE was first used in 2001 by Harman and Jones.[7] The research community grew to include more than 800 authors by 2013, spanning approximately 270 institutions in 40 countries.[8]

Application areas

Search-based software engineering is applicable to almost all phases of the software development process. Software testing has been one of the major applications.[9] Search techniques have been applied to other software engineering activities, for instance, requirements analysis,[10] [11] design,[12] [13] refactoring,[14] development,[15] and maintenance.[16]

Requirements engineering

Requirements engineering is the process by which the needs of a software's users and environment are determined and managed. Search-based methods have been used for requirements selection and optimisation with the goal of finding the best possible subset of requirements that matches user requests amid constraints such as limited resources and interdependencies between requirements. This problem is often tackled as a multiple-criteria decision-making problem and, generally involves presenting the decision maker with a set of good compromises between cost and user satisfaction as well as the requirements risk.[17] [18] [19] [20]

Debugging and maintenance

Identifying a software bug (or a code smell) and then debugging (or refactoring) the software is largely a manual and labor-intensive endeavor, though the process is tool-supported. One objective of SBSE is to automatically identify and fix bugs (for example via mutation testing).

Genetic programming, a biologically-inspired technique that involves evolving programs through the use of crossover and mutation, has been used to search for repairs to programs by altering a few lines of source code. The GenProg Evolutionary Program Repair software repaired 55 out of 105 bugs for approximately $8 each in one test.[21]

Coevolution adopts a "predator and prey" metaphor in which a suite of programs and a suite of unit tests evolve together and influence each other.[22]

Testing

Search-based software engineering has been applied to software testing, including the automatic generation of test cases (test data), test case minimization and test case prioritization.[23] Regression testing has also received some attention.

Optimizing software

The use of SBSE in program optimization, or modifying a piece of software to make it more efficient in terms of speed and resource use, has been the object of successful research.[24] In one instance, a 50,000 line program was genetically improved, resulting in a program 70 times faster on average.[25] A recent work by Basios et al. shows that by optimising the data structure, Google Guava found a 9% improvement in execution time, 13% improvement in memory consumption and 4% improvement in CPU usage separately.[26]

Project management

A number of decisions that are normally made by a project manager can be done automatically, for example, project scheduling.[27]

Tools

Tools available for SBSE include OpenPAT,[28] EvoSuite,[29] and Coverage, a code coverage measurement tool for Python.

Methods and techniques

A number of methods and techniques are available, including:

Industry acceptance

As a relatively new area of research, SBSE does not yet experience broad industry acceptance.

Successful applications of SBSE in the industry can mostly be found within software testing, where the capability to automatically generate random test inputs for uncovering bugs at a big scale is attractive to companies. In 2017, Facebook acquired the software startup Majicke Limited that developed Sapienz, a search-based bug finding app.[31]

In other application scenarios, software engineers may be reluctant to adopt tools over which they have little control or that generate solutions that are unlike those that humans produce.[32] In the context of SBSE use in fixing or improving programs, developers need to be confident that any automatically produced modification does not generate unexpected behavior outside the scope of a system's requirements and testing environment. Considering that fully automated programming has yet to be achieved, a desirable property of such modifications would be that they need to be easily understood by humans to support maintenance activities.[33]

Another concern is that SBSE might make the software engineer redundant. Supporters claim that the motivation for SBSE is to enhance the relationship between the engineer and the program.[34]

See also

External links

Notes and References

  1. Mohan . M. . Greer . D. . 2019-08-01 . Using a many-objective approach to investigate automated refactoring . Information and Software Technology . 112 . 83–101 . 10.1016/j.infsof.2019.04.009 . 0950-5849.
  2. 10.1109/SCAM.2010.28. 10th IEEE Working Conference on Source Code Analysis and Manipulation (SCAM 2010). 7–19. Harman. Mark. Why Source Code Analysis and Manipulation Will Always be Important. 10th IEEE Working Conference on Source Code Analysis and Manipulation (SCAM 2010). 2010.
  3. 10.1109/METRIC.2004.1357891. 10th International Symposium on Software Metrics, 2004. 58–69. Harman. Mark. John A. Clark . Metrics are fitness functions too. Proceedings of the 10th International Symposium on Software Metrics, 2004 . 2004.
  4. 10.1049/ip-sen:20030559. 1462-5970. 150. 3. 161–175. Clark. John A.. Dolado. José Javier. Harman. Mark. Hierons. Robert M.. Jones. Bryan F.. Lumkin. M.. Mitchell. Brian S.. Mancoridis. Spiros. Rees. K.. Roper. Marc. Shepperd. Martin J.. Reformulating software engineering as a search problem. IEE Proceedings - Software. 2003. 10.1.1.144.3059.
  5. 10.1109/TSE.1976.233818. 0098-5589. SE-2. 3. 223–226. Miller. Webb. Spooner. David L. . Automatic Generation of Floating-Point Test Data. IEEE Transactions on Software Engineering. 1976. 18875300.
  6. S. Xanthakis, C. Ellis, C. Skourlas, A. Le Gall, S. Katsikas and K. Karapoulios, "Application of genetic algorithms to software testing," in Proceedings of the 5th International Conference on Software Engineering and its Applications, Toulouse, France, 1992, pp. 625–636
  7. 10.1016/S0950-5849(01)00189-6. 0950-5849. 43. 14. 833–839. Harman. Mark. Jones. Bryan F.. Search-based software engineering. Information and Software Technology. 2001-12-15. 10.1.1.143.9716.
  8. Harman. Mark. Mansouri. S. Afshin. Zhang. Yuanyuan. 2012-11-01. Search-based software engineering: Trends, techniques and applications. ACM Computing Surveys. en. 45. 1. 1–61. 10.1145/2379776.2379787. 207198163.
  9. 10.1002/stvr.294. 1099-1689. 14. 2. 105–156. McMinn. Phil. Search-based software test data generation: a survey. Software Testing, Verification and Reliability. 2004. 10.1.1.122.33. 17408871.
  10. 10.1016/j.infsof.2003.07.002. 0950-5849. 46. 4. 243–253. Greer. Des. Ruhe. Guenther. Software release planning: an evolutionary and iterative approach. Information and Software Technology. 2004-03-15. 10.1.1.195.321. 710923.
  11. 10.1109/SBES.2009.23. XXIII Brazilian Symposium on Software Engineering, 2009. SBES '09. 207–215. Colares. Felipe. Souza. Jerffeson. Carmo. Raphael. Pádua. Clarindo. Mateus. Geraldo R.. A New Approach to the Software Release Planning. XXIII Brazilian Symposium on Software Engineering, 2009. SBES '09. 2009.
  12. 10.1016/S0950-5849(01)00195-1. 0950-5849. 43. 14. 891–904. Clark. John A.. Jacob. Jeremy L. . Protocols are programs too: the meta-heuristic search for security protocols. Information and Software Technology. 2001-12-15. 10.1.1.102.6016.
  13. Räihä. Outi. 2010-11-01. A survey on search-based software design. Computer Science Review. 4. 4. 203–249. 10.1016/j.cosrev.2010.06.001. 1574-0137. 10.1.1.188.9036.
  14. Mariani. Thainá. Vergilio. Silvia Regina. 2017-03-01. A systematic review on search-based refactoring. Information and Software Technology. 83. 14–34. 10.1016/j.infsof.2016.11.009. 0950-5849.
  15. 10.1016/j.ins.2006.12.020. 0020-0255. 177. 11. 2380–2401. Alba. Enrique. Chicano. J. Francisco . Software project management with GAs. Information Sciences. 2007-06-01. 10630/8145. free.
  16. 10.1109/ICSM.2005.79. Proceedings of the 21st IEEE International Conference on Software Maintenance, 2005. ICSM'05. 240–249. Antoniol. Giuliano. Di Penta. Massimiliano . Harman. Mark. Search-based techniques applied to optimization of project planning for a massive maintenance project. Proceedings of the 21st IEEE International Conference on Software Maintenance, 2005. ICSM'05. 2005. 10.1.1.63.8069.
  17. PhD. University of London. Zhang. Yuanyuan. Multi-Objective Search-based Requirements Selection and Optimisation. Strand, London, UK. February 2010.
  18. Y. Zhang and M. Harman and S. L. Lim, "Search Based Optimization of Requirements Interaction Management," Department of Computer Science, University College London, Research Note RN/11/12, 2011.
  19. Book: Li. Lingbo. Harman. Mark. Letier. Emmanuel. Zhang. Yuanyuan. Proceedings of the 2014 Annual Conference on Genetic and Evolutionary Computation . Robust next release problem . 2014. 1247–1254. 10.1145/2576768.2598334. 9781450326629. Gecco '14. 8423690.
  20. Li. L.. Harman. M.. Wu. F.. Zhang. Y.. The Value of Exact Analysis in Requirements Selection. IEEE Transactions on Software Engineering. 2017. 43. 6. 580–596. 10.1109/TSE.2016.2615100. 8398275. 0098-5589.
  21. 10.1109/ICSE.2012.6227211. 2012 34th International Conference on Software Engineering (ICSE). 3–13. Le Goues. Claire. Dewey-Vogt. Michael. Forrest. Stephanie. Weimer. Westley . A systematic study of automated program repair: Fixing 55 out of 105 bugs for $8 each. 2012 34th International Conference on Software Engineering (ICSE). 2012.
  22. 10.1109/CEC.2008.4630793. IEEE Congress on Evolutionary Computation, 2008. CEC 2008. (IEEE World Congress on Computational Intelligence). 162–168. Arcuri. Andrea. Yao. Xin . A novel co-evolutionary approach to automatic software bug fixing. IEEE Congress on Evolutionary Computation, 2008. CEC 2008. (IEEE World Congress on Computational Intelligence). 2008. 10.1.1.159.7991.
  23. Book: Harman. Mark. Jia. Yue. Zhang. Yuanyuan. 2015 IEEE 8th International Conference on Software Testing, Verification and Validation (ICST) . Achievements, Open Problems and Challenges for Search Based Software Testing . April 2015. Graz, Austria. IEEE. 1–12. 10.1109/ICST.2015.7102580. 10.1.1.686.7418. 978-1-4799-7125-1. 15272060.
  24. Memeti . Suejb . Pllana . Sabri . Binotto . Alecio . Kolodziej . Joanna . Brandic . Ivona . Ivona Brandić . Using meta-heuristics and machine learning for software optimization of parallel computing systems: a systematic literature review . Computing . 101 . 8 . 2018 . 893–936 . 10.1007/s00607-018-0614-9 . 1801.09444 . 2018arXiv180109444M . 13868111 .
  25. Langdon. William B.. Harman. Mark . Optimising Existing Software with Genetic Programming. IEEE Transactions on Evolutionary Computation.
  26. Book: Basios. Michail. Li. Lingbo. Wu. Fan. Kanthan. Leslie. Barr. Earl T.. Search Based Software Engineering . Optimising Darwinian Data Structures on Google Guava . 10452. 9 September 2017. 161–167. 10.1007/978-3-319-66299-2_14. en. Lecture Notes in Computer Science. 978-3-319-66298-5.
  27. ACM. 10.1145/2330163.2330332. 978-1-4503-1177-9. 1221–1228. Minku. Leandro L.. Sudholt. Dirk. Yao. Xin . Evolutionary algorithms for the project scheduling problem: runtime analysis and improved design. Proceedings of the fourteenth international conference on Genetic and evolutionary computation conference. New York, NY, USA. GECCO '12. 2012.
  28. Book: Mayo. M.. Spacey. S.. Search Based Software Engineering. Predicting Regression Test Failures Using Genetic Algorithm-Selected Dynamic Performance Analysis Metrics. Lecture Notes in Computer Science. 8084. 158–171. 2013. 10.1007/978-3-642-39742-4_13. https://researchcommons.waikato.ac.nz/bitstream/10289/7763/1/SBSE13.pdf. 10289/7763. 978-3-642-39741-7. free.
  29. Web site: Home . evosuite.org.
  30. Web site: Open Source Profilers in Java.
  31. Web site: Sapienz: Facebook's push to automate software testing . 30 December 2018 . VentureBeat . 29 September 2020.
  32. Web site: Programming using genetic algorithms: isn't that what humans already do ;-) . Jones . Derek . 18 October 2013 . The Shape of Code . 31 October 2013.
  33. 10.1007/s11219-013-9208-0. 1573-1367. 21. 3. 421–443. Le Goues. Claire. Forrest . Stephanie . Weimer. Westley. Current challenges in automatic software repair. Software Quality Journal. 2013-09-01. 10.1.1.371.5784. 16435531.
  34. IEEE Press. First International Workshop on Combining Modelling with Search-Based Software Engineering, First International Workshop on Combining Modelling with Search-Based Software Engineering. 49–50. Simons. Christopher L.. Whither (away) software engineers in SBSE?. San Francisco, USA. 2013-10-31. May 2013.