Object-Oriented Genetic Improvement for Improved Energy Consumption in Google Guava

  • Nathan BurlesEmail author
  • Edward Bowles
  • Alexander E. I. Brownlee
  • Zoltan A. Kocsis
  • Jerry Swan
  • Nadarajen Veerapen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9275)


In this work we use metaheuristic search to improve Google’s Guava library, finding a semantically equivalent version of with reduced energy consumption. Semantics-preserving transformations are found in the source code, using the principle of subtype polymorphism. We introduce a new tool, Opacitor, to deterministically measure the energy consumption, and find that a statistically significant reduction to Guava’s energy consumption is possible. We corroborate these results using Jalen, and evaluate the performance of the metaheuristic search compared to an exhaustive search—finding that the same result is achieved while requiring almost 200 times fewer fitness evaluations. Finally, we compare the metaheuristic search to an independent exhaustive search at each variation point, finding that the metaheuristic has superior performance.


Genetic Improvement Object-oriented programming Subclass substitution Liskov Substitution Principle Energy profiling 



Work funded by UK EPSRC grant EP/J017515/1. Data available at


  1. 1.
    Abbott, R.J.: Object-oriented genetic programming, an initial implementation. In: Proceedings of the 6th International Conference on Computational Intelligence and Natural Computing, North Carolina, USA (2003)Google Scholar
  2. 2.
    Bruce, W.S.: Automatic generation of object-oriented programs using genetic programming. In: Proceedings of the 1st Annual Conference on Genetic Programming, pp. 267–272. MIT Press, Cambridge (1996)Google Scholar
  3. 3.
    Chu, P.C., Beasley, J.E.: A genetic algorithm for the generalised assignment problem. Comput. Oper. Res. 24(1), 17–23 (1997)MathSciNetCrossRefzbMATHGoogle Scholar
  4. 4.
    Cohen, M., Zhu, H.S., Senem, E.E., Liu, Y.D.: Energy types. In: Proceedings of the ACM International Conference on Object Oriented Programming Systems Languages and Applications, OOPSLA 2012, pp. 831–850. ACM, NY (2012)Google Scholar
  5. 5.
    Hao, S., Li, D., Halfond, W.G., Govindan, R.: Estimating mobile application energy consumption using program analysis. In: 35th International Conference on Software Engineering, pp. 92–101. IEEE (2013)Google Scholar
  6. 6.
    Holland, J.H.: Adaptation in Natural and Artificial Systems: An Introductory Analysis with Applications to Biology, Control and Artificial Intelligence. MIT Press, Cambridge (1992)Google Scholar
  7. 7.
    Liskov, B.: ‘Data abstraction and hierarchy’ (keynote address). SIGPLAN Not. 23(5), 17–34 (1987)CrossRefGoogle Scholar
  8. 8.
    Lucas, S.: Exploiting reflection in object oriented genetic programming. In: Keijzer, M., O’Reilly, U.-M., Lucas, S., Costa, E., Soule, T. (eds.) EuroGP 2004. LNCS, vol. 3003, pp. 369–378. Springer, Heidelberg (2004) CrossRefGoogle Scholar
  9. 9.
    Manotas, I., Pollock, L., Clause, J.: Seeds: a software engineer’s energy-optimization decision support framework. In: Proceedings of the 36th International Conference on Software Engineering, pp. 503–514. ACM, NY (2014)Google Scholar
  10. 10.
    Neumann, G., Swan, J., Harman, M., Clark, J.A.: The executable experimental template pattern for the systematic comparison of metaheuristics. In: Proceedings of the 2014 Conference Companion on Genetic and Evolutionary Computation Companion, pp. 1427–1430. ACM (2014)Google Scholar
  11. 11.
    Noureddine, A., Bourdon, A., Rouvoy, R., Seinturier, L.: Runtime monitoring of software energy hotspots. In: Proceedings of the 27th IEEE/ACM International Conference on Automated Software Engineering, pp. 160–169. IEEE (2012)Google Scholar
  12. 12.
    Oppacher, Y., Oppacher, F., Deugo, D.: Evolving java objects using a grammar-based approach. In: Proceedings of the 11th Annual Conference on Genetic and Evolutionary Computation, pp. 1891–1892. ACM, NY (2009)Google Scholar
  13. 13.
    Sahin, C., Pollock, L., Clause, J.: How do code refactorings affect energy usage? In: Proceedings of the 8th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, pp. 36:1–36:10. ACM, NY (2014)Google Scholar
  14. 14.
    Swan, J., Burles, N.: Templar - a framework for template-method hyper-heuristics. In: Machado, P., Heywood, M.I., McDermott, J., Castelli, M., García-Sánchez, P., Burelli, P., Risi, S., Sim, K. (eds.) EuroGP 2015. LNCS, vol. 9025, pp. 205–216. Springer, Switzerland (2015) Google Scholar
  15. 15.
    White, T., Fan, J., Oppacher, F.: Basic object oriented genetic programming. In: Mehrotra, K.G., Mohan, C.K., Oh, J.C., Varshney, P.K., Ali, M. (eds.) IEA/AIE 2011, Part I. LNCS, vol. 6703, pp. 59–68. Springer, Heidelberg (2011) CrossRefGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2015

Authors and Affiliations

  • Nathan Burles
    • 1
    Email author
  • Edward Bowles
    • 1
  • Alexander E. I. Brownlee
    • 2
  • Zoltan A. Kocsis
    • 2
  • Jerry Swan
    • 1
  • Nadarajen Veerapen
    • 2
  1. 1.University of YorkYorkUK
  2. 2.University of StirlingStirlingUK

Personalised recommendations