May-Happen-in-Parallel Analysis with Condition Synchronization
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.
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.
- 1.Ericsson AB. Erlang Efficiency Guide, 5.8., 5th edn., October 2011. http://www.erlang.org/doc/efficiency_guide/users_guide.html
- 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
- 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
- 11.Giachino, E., Grazia, C.A., Laneve, C., Lienhardt, M., Wong, P.: Deadlock Analysis of Concurrent Objects - Theory and Practice (2013)Google Scholar
- 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.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
- 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