Skip to main content

Automated Modular Verification for Relaxed Communication Protocols

  • Conference paper
  • First Online:
Programming Languages and Systems (APLAS 2018)

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 11275))

Included in the following conference series:

Abstract

Ensuring software correctness and safety for communication-centric programs is important but challenging. In this paper we introduce a solution for writing communication protocols, for checking protocol conformance and for verifying implementation safety. This work draws on ideas from both multiparty session types, which provide a concise way to express communication protocols, as well as from separation-style logics for shared-memory concurrency, which provide strong safety guarantees for resource sharing. On the one hand, our proposal improves the expressiveness and precision of session types, without sacrificing their conciseness. On the other hand, it increases the applicability of software verification as well as its precision, by making it protocol aware. We also show how to perform the verification of such programs in a modular and automatic fashion.

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

References

  1. Mercurius. http://loris-5.d2.comp.nus.edu.sg/Mercurius

  2. Balzer, S., Pfenning, F.: Manifest sharing with session types. PACMPL 1(ICFP), 37 (2017)

    Google Scholar 

  3. Bettini, L., Coppo, M., D’Antoni, L., De Luca, M., Dezani-Ciancaglini, M., Yoshida, N.: Global progress in dynamically interleaved multiparty sessions. In: van Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 418–433. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85361-9_33

    Chapter  Google Scholar 

  4. Bocchi, L., Honda, K., Tuosto, E., Yoshida, N.: A theory of design-by-contract for distributed multiparty interactions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 162–176. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15375-4_12

    Chapter  MATH  Google Scholar 

  5. Caires, L.: Spatial-behavioral types for concurrency and resource control in distributed systems. Theor. Comput. Sci. 402(2–3), 120–141 (2008)

    Article  MathSciNet  Google Scholar 

  6. Caires, L., Pfenning, F.: Session types as intuitionistic linear propositions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 222–236. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-15375-4_16

    Chapter  Google Scholar 

  7. Caires, L., Seco, J.C.: The type discipline of behavioral separation. In: ACM SIGPLAN Notices, pp. 275–286. ACM (2013)

    Google Scholar 

  8. Capecchi, S., Giachino, E., Yoshida, N.: Global escape in multiparty sessions. MSCS 26, 156–295 (2014)

    MathSciNet  MATH  Google Scholar 

  9. Carbone, M., Honda, K., Yoshida, N.: Structured interactional exceptions in session types. In: van Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 402–417. Springer, Heidelberg (2008). https://doi.org/10.1007/978-3-540-85361-9_32

    Chapter  Google Scholar 

  10. Carbone, M., Montesi, F.: Deadlock-freedom-by-design: multiparty asynchronous global programming. SIGPLAN Not. 48(1), 263–274 (2013)

    Article  Google Scholar 

  11. Carbone, M., Montesi, F., Schürmann, C., Yoshida, N.: Multiparty session types as coherence proofs. In: CONCUR, vol. 42, pp. 412–426 (2015)

    Google Scholar 

  12. Chin, W.N., David, C., Nguyen, H.H., Qin, S.: Automated verification of shape, size and bag properties via user-defined predicates in separation logic. Sci. Comput. Program. 77(9), 1006–1036 (2012)

    Article  Google Scholar 

  13. Costea, A.: A session logic for relaxed communication protocols. Ph.D. dissertation, School of Computing, National University of Singapore (2017)

    Google Scholar 

  14. Craciun, F., Kiss, T., Costea, A.: Towards a session logic for communication protocols. In: ICECCS, pp. 140–149 (2015)

    Google Scholar 

  15. Delmolino, K., Arnett, M., Kosba, A., Miller, A., Shi, E.: Step by step towards creating a safe smart contract: lessons and insights from a cryptocurrency lab. In: Clark, J., Meiklejohn, S., Ryan, P.Y.A., Wallach, D., Brenner, M., Rohloff, K. (eds.) FC 2016. LNCS, vol. 9604, pp. 79–94. Springer, Heidelberg (2016). https://doi.org/10.1007/978-3-662-53357-4_6

    Chapter  Google Scholar 

  16. Dezani-Ciancaglini, M., Mostrous, D., Yoshida, N., Drossopoulou, S.: Session types for object-oriented languages. In: Thomas, D. (ed.) ECOOP 2006. LNCS, vol. 4067, pp. 328–352. Springer, Heidelberg (2006). https://doi.org/10.1007/11785477_20

    Chapter  Google Scholar 

  17. Dinsdale-Young, T., Dodds, M., Gardner, P., Parkinson, M.J., Vafeiadis, V.: Concurrent abstract predicates. In: D’Hondt, T. (ed.) ECOOP 2010. LNCS, vol. 6183, pp. 504–528. Springer, Heidelberg (2010). https://doi.org/10.1007/978-3-642-14107-2_24

    Chapter  Google Scholar 

  18. Gay, S.J., Vasconcelos, V.T., Ravara, A., Gesbert, N., Caldeira, A.Z.: Modular session types for distributed object-oriented programming. In: POPL, pp. 299–312 (2010)

    Google Scholar 

  19. Hawblitzel, C., et al.: IronFleet: proving practical distributed systems correct. In: SOSP, pp. 1–17 (2015)

    Google Scholar 

  20. Hoare, C.A.R.: Communicating sequential processes. In: Hansen, P.B. (ed.) The Origin of Concurrent Programming, pp. 413–443. Springer, New York (1978). https://doi.org/10.1007/978-1-4757-3472-0_16

    Chapter  Google Scholar 

  21. Hoare, T., O’Hearn, P.: Separation logic semantics for communicating processes. Electron. Notes Theor. Comput. Sci. 212, 3–25 (2008)

    Article  Google Scholar 

  22. Honda, K., Vasconcelos, V.T., Kubo, M.: Language primitives and type discipline for structured communication-based programming. In: Hankin, C. (ed.) ESOP 1998. LNCS, vol. 1381, pp. 122–138. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0053567

    Chapter  Google Scholar 

  23. Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. J. ACM 63, 1–67 (2016)

    Article  MathSciNet  Google Scholar 

  24. Igarashi, A., Kobayashi, N.: A generic type system for the pi-calculus. Theor. Comput. Sci. 311(1), 121–163 (2004)

    Article  MathSciNet  Google Scholar 

  25. Kobayashi, N.: Type systems for concurrent processes: from deadlock-freedom to livelock-freedom, time-boundedness. In: van Leeuwen, J., Watanabe, O., Hagiya, M., Mosses, P.D., Ito, T. (eds.) TCS 2000. LNCS, vol. 1872, pp. 365–389. Springer, Heidelberg (2000). https://doi.org/10.1007/3-540-44929-9_27

    Chapter  Google Scholar 

  26. Kobayashi, N.: A type system for lock-free processes. IC 177(2), 122–159 (2002)

    MathSciNet  MATH  Google Scholar 

  27. Kobayashi, N., Laneve, C.: Deadlock analysis of unbounded process networks. IC 252, 48–70 (2017)

    MathSciNet  MATH  Google Scholar 

  28. Leino, K.R.M., Müller, P.: A basis for verifying multi-threaded programs. In: Castagna, G. (ed.) ESOP 2009. LNCS, vol. 5502, pp. 378–393. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-00590-9_27

    Chapter  Google Scholar 

  29. Lindley, S., Morris, J.G.: A semantics for propositions as sessions. In: Vitek, J. (ed.) ESOP 2015. LNCS, vol. 9032, pp. 560–584. Springer, Heidelberg (2015). https://doi.org/10.1007/978-3-662-46669-8_23

    Chapter  Google Scholar 

  30. Lindley, S., Morris, J.G.: Embedding session types in Haskell. In: Proceedings of the 9th International Symposium on Haskell, pp. 133–145. ACM (2016)

    Google Scholar 

  31. Lopez, H.A., et al.: Protocol-based verification of message-passing parallel programs. In: OOPSLA 2015. ACM (2015)

    Google Scholar 

  32. Lozes, É., Villard, J.: Shared contract-obedient channels. Sci. Comput. Program. 100, 28–60 (2015)

    Article  Google Scholar 

  33. Neubauer, M., Thiemann, P.: An implementation of session types. In: Jayaraman, B. (ed.) PADL 2004. LNCS, vol. 3057, pp. 56–70. Springer, Heidelberg (2004). https://doi.org/10.1007/978-3-540-24836-1_5

    Chapter  Google Scholar 

  34. Ng, N., Yoshida, N., Honda, K.: Multiparty session C: safe parallel programming with message optimisation. In: Furia, C.A., Nanz, S. (eds.) TOOLS 2012. LNCS, vol. 7304, pp. 202–218. Springer, Heidelberg (2012). https://doi.org/10.1007/978-3-642-30561-0_15

    Chapter  Google Scholar 

  35. Nielson, F., Nielson, H.R.: From CML to its process algebra. Theor. Comput. Sci. 155(1), 179–219 (1996)

    Article  MathSciNet  Google Scholar 

  36. Orchard, D., Yoshida, N.: Effects as sessions, sessions as effects. In: POPL, pp. 568–581. ACM, New York (2016)

    Article  Google Scholar 

  37. Parkinson, M., Bierman, G.: Separation logic and abstraction. In: ACM SIGPLAN Notices, pp. 247–258. ACM (2005)

    Google Scholar 

  38. Reynolds, J.C.: Separation logic: a logic for shared mutable data structures. In: LICS, pp. 55–74 (2002)

    Google Scholar 

  39. Sergey, I., Wilcox, J.R., Tatlock, Z.: Programming and proving with distributed protocols. POPL 2, 28:1–28:30 (2018)

    Google Scholar 

  40. Toninho, B., Caires, L., Pfenning, F.: Dependent session types via intuitionistic linear type theory. In: PPDP, pp. 161–172. ACM (2011)

    Google Scholar 

  41. Villard, J., Lozes, É., Calcagno, C.: Proving copyless message passing. In: Hu, Z. (ed.) APLAS 2009. LNCS, vol. 5904, pp. 194–209. Springer, Heidelberg (2009). https://doi.org/10.1007/978-3-642-10672-9_15

    Chapter  Google Scholar 

  42. Wadler, P.: Propositions as sessions. In: ICFP, pp. 273–286. ACM (2012)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Andreea Costea .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2018 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Costea, A., Chin, WN., Qin, S., Craciun, F. (2018). Automated Modular Verification for Relaxed Communication Protocols. In: Ryu, S. (eds) Programming Languages and Systems. APLAS 2018. Lecture Notes in Computer Science(), vol 11275. Springer, Cham. https://doi.org/10.1007/978-3-030-02768-1_16

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-02768-1_16

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-02767-4

  • Online ISBN: 978-3-030-02768-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics