Skip to main content

Runtime Verification of Expected Energy Consumption in Smartphones

  • Conference paper
  • First Online:
Model Checking Software (SPIN 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9232))

Included in the following conference series:

Abstract

Smartphones connected to Internet should work properly for days without a reset. One of the most critical non-functional properties to ensure the correct behavior is energy consumption. However, currently there is a lack of automated techniques to check whether the actual mobile consume is within the expected limits. To apply runtime verification techniques in this context, we need (a) detailed profiles of consumptions for specific actions in apps of interest (such as activate GPS, send a data packet to the network, etc.); (b) a method to automatically generate sufficiently representative use cases of the mobile behavior; (c) a language to describe the expected behavior in terms of energy consumption (energy properties); and (d) a method to monitor the mobile execution traces and analyze them against the energy properties. We aim to construct a tool chain addressing all these steps. We have already designed and implemented a model-based approach to automatically generate execution traces in mobile devices using Spin. This paper focuses on the formalization and analysis of energy properties with a specification language inspired by the interval logic. The paper presents this logic, the implementation of runtime verification using Büchi automata, and the practical use of the whole tool chain for model-based runtime verification of energy-related properties. Spin is a main ingredient for generating the test cases and checking the properties.

Work partially supported by grants P11-TIC-07659 (Regional Government of Andalusia), TIN2012-35669 (Spanish Ministry of Economy and Competitiveness), UMA-Keysight Technologies 8.06/5.47.3868-4Green and the AUIP as sponsor of the Scholarship Program Academic Mobility.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    According to Gardner’s report ICT (Information and Communications Technology) consumes 2 % of energy in the world and it is increasing 6 % every year.

  2. 2.

    We assume that \(e[\pi ](i)\) represents the time instant when state \(s_i\) is created.

  3. 3.

    To simplify the presentation, we assume that finite traces have at least one non-ending state \(s_0\).

  4. 4.

    \(\epsilon \) represents the empty sequence.

  5. 5.

    The implementation and examples are available online: http://morse.uma.es/tools/draco.

References

  1. Adalid, D., Salmerón, A., Gallardo, M.M., Merino, P.: Using spin for automated debugging of infinite executions of java programs. J. Syst. Softw. 90, 61–75 (2014)

    Article  Google Scholar 

  2. Android Open Source Project: logcat. http://developer.android.com/tools/help/logcat.html

  3. Android Open Source Project: UIAutomatorViewer. http://developer.android.com/training/testing/ui-testing/index.html

  4. Baums, A., Zaznova, N.: Power optimization of embedded real-time systems and their adaptability. Autom. Control Comput. Sci. 42(3), 153–162 (2008). http://dx.doi.org/10.3103/S0146411608030073

    Article  Google Scholar 

  5. Chandra, R., Fatemieh, O., Moinzadeh, P., Thekkath, C.A., Xie, Y.: End-to-end energy management of mobile devices. Technical report MSR-TR-2013-69, Microsoft, July 2013. http://research.microsoft.com/apps/pubs/default.aspx?id=198163

  6. Chaochen, Z., Hansen, M.R.: Duration Calculus - A Formal Approach to Real-Time Systems. Monographs in Theoretical Computer Science. An EATCS Series. Springer, Heidelberg (2004). http://dx.doi.org/10.1007/978-3-662-06784-0

    MATH  Google Scholar 

  7. Espada, A.R., Gallardo, M.M., Salmerón, A., Merino, P.: Using model checking to generate test cases for android applications. In: Pakulin, N., Petrenko, A.K., Schlingloff, B.H. (eds.) Proceedings Tenth Workshop on Model Based Testing. Electronic Proceedings in Theoretical Computer Science, vol. 180, pp. 7–21. Open Publishing Association, Amsterdam (2015)

    Google Scholar 

  8. Espada, A.R., Gallardo, M.M., Adalid, D.: Dragonfly: encapsulating android for instrumentation. In: Proceedings of the XIII Jornadas de Programación y Lenguajes (PROLE 2013) (2013)

    Google Scholar 

  9. Liu, Y., Xu, C., Cheung, S.C.: Characterizing and detecting performance bugs for smartphone applications. In: Proceedings of the 36th International Conference on Software Engineering, ICSE 2014, pp. 1013–1024. ACM, New York (2014). http://doi.acm.org/10.1145/2568225.2568229

  10. Merino, P., Salmerón, A.: Combining SPIN with ns-2 for protocol optimization. In: van de Pol, J., Weber, M. (eds.) SPIN 2010. LNCS, vol. 6349, pp. 40–57. Springer, Heidelberg (2010)

    Chapter  Google Scholar 

  11. Metri, G., Shi, W., Brockmeyer, M.: Energy-efficiency comparison of mobile platforms and applications: a quantitative approach. In: Proceedings of the 16th International Workshop on Mobile Computing Systems and Applications, HotMobile 2015, pp. 39–44. ACM, New York (2015). http://doi.acm.org/10.1145/2699343.2699358

  12. Microsoft: Eloupe project. http://research.microsoft.com/en-us/projects/eloupe/

  13. Nakajima, S.: Model checking of energy consumption behavior. In: Cardin, M.A., Krob, D., Lui, P.C., Tan, Y.H., Wood, K. (eds.) Complex Systems Design & Management Asia, pp. 3–14. Springer International Publishing, Switzerland (2015). http://dx.doi.org/10.1007/978-3-319-12544-2_1

    Google Scholar 

  14. Oracle: Java Debug Interface. http://docs.oracle.com/javase/6/docs/jdk/api/jpda/jdi/index.html

  15. Pathak, A., Hu, Y.C., Zhang, M.: Bootstrapping energy debugging on smartphones: a first look at energy bugs in mobile devices. In: Proceedings of the 10th ACM Workshop on Hot Topics in Networks, HotNets-X, pp. 5:1–5:6. ACM, New York (2011). http://doi.acm.org/10.1145/2070562.2070567

  16. Pathak, A., Jindal, A., Hu, Y.C., Midkiff, S.P.: What is keeping my phone awake?: characterizing and detecting no-sleep energy bugs in smartphone apps. In: Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services, MobiSys 2012, pp. 267–280. ACM, New York (2012). http://doi.acm.org/10.1145/2307636.2307661

  17. Salmerón, A., Merino, P.: Integrating model checking and simulation for protocol optimization. Simulation 91(1), 3–25 (2015). http://dx.doi.org/10.1177/0037549714557054

    Article  Google Scholar 

  18. Schmitt, P.H., Werner, F.: Model checking for energy efficient scheduling in wireless sensor networks. In: Technical report (2007)

    Google Scholar 

  19. Wang, C., Yan, F., Guo, Y., Chen, X.: Power estimation for mobile applications with profile-driven battery traces. In: 2013 IEEE International Symposium on Low Power Electronics and Design (ISLPED), pp. 120–125, September 2013

    Google Scholar 

  20. Wilke, C., Götz, S., Reimann, J., Aßmann, U.: Vision paper: towards model-based energy testing. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 480–489. Springer, Heidelberg (2011). http://dx.doi.org/10.1007/978-3-642-24485-8_35

    Chapter  Google Scholar 

  21. Xia, M., He, W., Liu, X., Liu, J.: Why application errors drain battery easily?: a study of memory leaks in smartphone apps. In: Proceedings of the Workshop on Power-Aware Computing and Systems, HotPower 2013, pp. 2:1–2:5. ACM, New York (2013). http://doi.acm.org/10.1145/2525526.2525846

  22. Zhang, J., Musa, A., Le, W.: A comparison of energy bugs for smartphoneplatforms. In: 2013 1st International Workshop on the Engineering of Mobile-Enabled Systems (MOBS), pp. 25–30, May 2013

    Google Scholar 

  23. Zhang, L., Gordon, M.S., Dick, R.P., Mao, Z.M., Dinda, P., Yang, L.: Adel: an automatic detector of energy leaks for smartphone applications. In: Proceedings of the Eighth IEEE/ACM/IFIP International Conference on Hardware/Software Codesign and System Synthesis, CODES+ISSS 2012, pp. 363–372. ACM, New York (2012). http://doi.acm.org/10.1145/2380445.2380503

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Alberto Salmerón .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Espada, A.R., del Mar Gallardo, M., Salmerón, A., Merino, P. (2015). Runtime Verification of Expected Energy Consumption in Smartphones. In: Fischer, B., Geldenhuys, J. (eds) Model Checking Software. SPIN 2015. Lecture Notes in Computer Science(), vol 9232. Springer, Cham. https://doi.org/10.1007/978-3-319-23404-5_10

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-23404-5_10

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-23403-8

  • Online ISBN: 978-3-319-23404-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics