Advertisement

May-Happen-in-Parallel Analysis with Condition Synchronization

  • Elvira AlbertEmail author
  • Antonio Flores-Montoya
  • Samir Genaim
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9964)

Abstract

Concurrent programs can synchronize by means of conditions and/or message passing. In the former, processes communicate and synchronize by means of shared variables that several processes can read and write. In the latter, communication is by sending, receiving and waiting for messages. Condition synchronization is often more efficient but also more difficult to analyze and reason about. In this paper, we leverage an existing may-happen-in-parallel (MHP) analysis, which was designed for a particular form of message passing based on future variables, to handle condition synchronization effectively, thus enabling the analysis of programs that use both mechanisms. This is done by developing a must-have-finished analysis which is used to refine the MHP relations inferred by the original MHP analysis. The information inferred by an MHP has been proven to be essential to infer both safety properties (e.g., deadlock freedom) and liveness properties (termination and resource boundedness) of concurrent programs.

Notes

Acknowledgements

We would like to thank the reviewers for their comments that have helped improve the quality and the presentation of the paper. This work was funded partially by the EU project FP7-ICT-610582 ENVISAGE: Engineering Virtualized Services (http://www.envisage-project.eu), the Spanish MINECO project TIN2012-38137, and the CM project S2013/ICE-3006.

References

  1. 1.
    Ericsson AB. Erlang Efficiency Guide, 5.8., 5th edn., October 2011. http://www.erlang.org/doc/efficiency_guide/users_guide.html
  2. 2.
    Agarwal, S., Barik, R., Sarkar, V., Shyamasundar, R.K.: May-happen-in-parallel analysis of x10 programs. In: Yelick, K.A., Mellor-Crummey, J.M. (eds.) Proceedings of PPOPP 2007, pp. 183–193. ACM (2007)Google Scholar
  3. 3.
    Albert, E., Arenas, P., Correas, J., Genaim, S., Gómez-Zamalloa, M., Puebla, G., Román-Díez, G.: Object-sensitive cost analysis for concurrent objects. Softw. Test. Verif. Reliab. 25(3), 218–271 (2015)CrossRefGoogle Scholar
  4. 4.
    Albert, E., Flores-Montoya, A.E., Genaim, S.: Analysis of may-happen-in-parallel in concurrent objects. In: Giese, H., Rosu, G. (eds.) FMOODS/FORTE -2012. LNCS, vol. 7273, pp. 35–51. Springer, Heidelberg (2012). doi: 10.1007/978-3-642-30793-5_3 CrossRefGoogle Scholar
  5. 5.
    Albert, E., Flores-Montoya, A., Genaim, S., Martin-Martin, E.: Termination and cost analysis of loops with concurrent interleavings. In: Hung, D., Ogawa, M. (eds.) ATVA 2013. LNCS, vol. 8172, pp. 349–364. Springer, Heidelberg (2013). doi: 10.1007/978-3-319-02444-8_25 CrossRefGoogle Scholar
  6. 6.
    Albert, E., Genaim, S., Gordillo, P.: May-happen-in-parallel analysis for asynchronous programs with inter-procedural synchronization. In: Blazy, S., Jensen, T. (eds.) SAS 2015. LNCS, vol. 9291, pp. 72–89. Springer, Heidelberg (2015). doi: 10.1007/978-3-662-48288-9_5 CrossRefGoogle Scholar
  7. 7.
    Barik, R.: Efficient computation of may-happen-in-parallel information for concurrent java programs. In: Ayguadé, E., Baumgartner, G., Ramanujam, J., Sadayappan, P. (eds.) LCPC 2005. LNCS, vol. 4339, pp. 152–169. Springer, Heidelberg (2006). doi: 10.1007/978-3-540-69330-7_11 CrossRefGoogle Scholar
  8. 8.
    Boer, F.S., Clarke, D., Johnsen, E.B.: A complete guide to the future. In: Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 316–330. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-71316-6_22 CrossRefGoogle Scholar
  9. 9.
    Emmi, M., Lal, A., Qadeer, S.: Asynchronous programs with prioritized task-buffers. In: Proceedings of the ACM SIGSOFT 20th International Symposium on the Foundations of Software Engineering, FSE 2012, pp. 48:1–48:11. ACM, New York (2012)Google Scholar
  10. 10.
    Flores-Montoya, A.E., Albert, E., Genaim, S.: May-happen-in-parallel based deadlock analysis for concurrent objects. In: Beyer, D., Boreale, M. (eds.) FMOODS/FORTE -2013. LNCS, vol. 7892, pp. 273–288. Springer, Heidelberg (2013). doi: 10.1007/978-3-642-38592-6_19 CrossRefGoogle Scholar
  11. 11.
    Giachino, E., Grazia, C.A., Laneve, C., Lienhardt, M., Wong, P.: Deadlock Analysis of Concurrent Objects - Theory and Practice (2013)Google Scholar
  12. 12.
    Haller, P., Odersky, M.: Scala actors: unifying thread-based and event-based programming. Theor. Comput. Sci. 410(2–3), 202–220 (2009)MathSciNetCrossRefzbMATHGoogle Scholar
  13. 13.
    Johnsen, E.B., Hähnle, R., Schäfer, J., Schlatte, R., Steffen, M.: ABS: a core language for abstract behavioral specification. In: Aichernig, B.K., Boer, F.S., Bonsangue, M.M. (eds.) FMCO 2010. LNCS, vol. 6957, pp. 142–164. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-25271-6_8 CrossRefGoogle Scholar
  14. 14.
    Lee, J.K., Palsberg, J.: Featherweight X10: a core calculus for async-finish parallelism. In: Proceedings of PPoPP 2010, pp. 25–36. ACM (2010)Google Scholar
  15. 15.
    Milanova, A., Rountev, A., Ryder, B.G.: Parameterized object sensitivity for points-to analysis for Java. ACM Trans. Softw. Eng. Methodol. 14, 1–41 (2005)CrossRefGoogle Scholar
  16. 16.
    Naik, M., Park, C.-S., Sen, K., Gay, D.: Effective static deadlock detection. In: Proceedings of the 31st International Conference on Software Engineering, ICSE 2009, pp. 386–396. IEEE Computer Society, Washington, DC (2009)Google Scholar
  17. 17.
    Naumovich, G., Avrunin, G.S., Clarke, L.A.: An efficient algorithm for computing MHP information for concurrent Java programs. SIGSOFT Softw. Eng. Not. 24(6), 338–354 (1999). 319252CrossRefGoogle Scholar
  18. 18.
    Nielson, F., Nielson, H.R., Hankin, C.: Principles of Program Analysis, 2nd edn. Springer, Heidelberg (2005)zbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Elvira Albert
    • 1
    Email author
  • Antonio Flores-Montoya
    • 2
  • Samir Genaim
    • 1
  1. 1.Complutense University of Madrid (UCM)MadridSpain
  2. 2.Technische Universität Darmstadt (TUD)DarmstadtGermany

Personalised recommendations