Deadlock Analysis of Wait-Notify Coordination

  • Cosimo Laneve
  • Luca PadovaniEmail author
Part of the Lecture Notes in Computer Science book series (LNCS, volume 11760)


Deadlock analysis of concurrent programs that contain coordination primitives (wait, notify and Open image in new window ) is notoriously challenging. Not only these primitives affect the scheduling of processes, but also notifications unmatched by a corresponding wait are silently lost. We design a behavioral type system for a core calculus featuring shared objects and Java-like coordination primitives. The type system is based on a simple language of object protocols – called usages – to determine whether objects are used reliably, so as to guarantee deadlock freedom.


  1. 1.
    Agarwal, R., Stoller, S.D.: Run-time detection of potential deadlocks for programs with locks, semaphores, and condition variables. In: Proceedings of PADTAD 2006, pp. 51–60. ACM (2006).
  2. 2.
    Busi, N.: Analysis issues in petri nets with inhibitor arcs. Theor. Comput. Sci. 275(1–2), 127–177 (2002). Scholar
  3. 3.
    Caires, L., Pfenning, F., Toninho, B.: Linear logic propositions as session types. Math. Struct. Comput. Sci. 26(3), 367–423 (2016). Scholar
  4. 4.
    Demartini, C., Iosif, R., Sisto, R.: A deadlock detection tool for concurrent java programs. Softw. Pract. Exper. 29(7), 577–603 (1999)CrossRefGoogle Scholar
  5. 5.
    Deshmukh, J.V., Emerson, E.A., Sankaranarayanan, S.: Symbolic modular deadlock analysis. Autom. Softw. Eng. 18(3–4), 325–362 (2011)CrossRefGoogle Scholar
  6. 6.
    Eslamimehr, M., Palsberg, J.: Sherlock: scalable deadlock detection for concurrent programs. In: Proceedings of FSE 2014, pp. 353–365. ACM (2014)Google Scholar
  7. 7.
    Girard, J.: Linear logic. Theor. Comput. Sci. 50, 1–102 (1987). Scholar
  8. 8.
    Hamin, J., Jacobs, B.: Deadlock-free monitors. In: Ahmed, A. (ed.) ESOP 2018. LNCS, vol. 10801, pp. 415–441. Springer, Cham (2018). Scholar
  9. 9.
    Havelund, K.: Using runtime analysis to guide model checking of Java programs. In: Havelund, K., Penix, J., Visser, W. (eds.) SPIN 2000. LNCS, vol. 1885, pp. 245–264. Springer, Heidelberg (2000). Scholar
  10. 10.
    Hoare, C.A.R.: Monitors: an operating system structuring concept. Commun. ACM 17(10), 549–557 (1974). Scholar
  11. 11.
    Joshi, P., Naik, M., Sen, K., Gay, D.: An effective dynamic analysis for detecting generalized deadlocks. In: Proceedings of FSE 2010, pp. 327–336. ACM (2010).
  12. 12.
    Kobayashi, N.: Type-based information flow analysis for the pi-calculus. Acta Informatica 42(4–5), 291–347 (2005). Scholar
  13. 13.
    Kobayashi, N., Laneve, C.: Deadlock analysis of unbounded process networks. Inf. Comput. 252, 48–70 (2017). Scholar
  14. 14.
    Laneve, C.: A lightweight deadlock analysis for programs with threads and reentrant locks. In: Havelund, K., Peleska, J., Roscoe, B., de Vink, E. (eds.) FM 2018. LNCS, vol. 10951, pp. 608–624. Springer, Cham (2018). Scholar
  15. 15.
    Laneve, C., Padovani, L.: Deadlock analysis of wait-notify coordination. Technical report, Computer Science Department, University of Bologna (2019).
  16. 16.
    Naik, M., Park, C., Sen, K., Gay, D.: Effective static deadlock detection. In: Proceedings of ICSE 2009, pp. 386–396. IEEE (2009).
  17. 17.
    von Praun, C.: Detecting synchronization defects in multi-threaded object-oriented programs. Ph.D. thesis, Swiss Federal Institute of Technology, Zurich (2004)Google Scholar
  18. 18.
    Wadler, P.: Propositions as sessions. J. Funct. Program. 24(2–3), 384–418 (2014). Scholar
  19. 19.
    Williams, A., Thies, W., Ernst, M.D.: Static deadlock detection for Java libraries. In: Black, A.P. (ed.) ECOOP 2005. LNCS, vol. 3586, pp. 602–629. Springer, Heidelberg (2005). Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of Computer Science and EngineeringUniversity of Bologna – Inria FocusBolognaItaly
  2. 2.Dipartimento di InformaticaUniversità di TorinoTurinItaly

Personalised recommendations