Retractable and Speculative Contracts

  • Franco Barbanera
  • Ivan Lanese
  • Ugo de’Liguoro
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10319)


Behavioral contracts are abstract descriptions of the communications that clients and servers perform. Behavioral contracts come naturally equipped with a notion of compliance: when a client and a server follow compliant contracts, their interaction is guaranteed to progress or successfully complete. We study two extensions of contracts, dealing respectively with backtracking and with speculative execution. We show that the two extensions give rise to the same notion of compliance. As a consequence, they also give rise to the same subcontract relation, which determines when one server can be replaced by another preserving compliance. Moreover, compliance and subcontract relation are both decidable in polynomial time.


Operational Semantic Label Transition System Conservative Extension Speculative Execution Speculative Contract 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


  1. 1.
    Avizienis, A., Laprie, J.-C., Randell, B., Landwehr, C.E.: Basic concepts and taxonomy of dependable and secure computing. IEEE Trans. Dep. Sec. Comput. 1(1), 11–33 (2004)CrossRefGoogle Scholar
  2. 2.
    Barbanera, F., de’Liguoro, U.: Two notions of sub-behaviour for session-based client/server systems. In: PPDP, pp. 155–164. ACM Press (2010)Google Scholar
  3. 3.
    Barbanera, F., Liguoro, U.: Sub-behaviour relations for session-based client/server systems. MSCS 25(6), 1339–1381 (2015)MathSciNetzbMATHGoogle Scholar
  4. 4.
    Barbanera, F., de’Liguoro, U.: A game interpretation of retractable contracts. In: Lluch Lafuente, A., Proença, J. (eds.) COORDINATION 2016. LNCS, vol. 9686, pp. 18–34. Springer, Cham (2016). doi: 10.1007/978-3-319-39519-7_2 Google Scholar
  5. 5.
    Barbanera, F., Dezani-Ciancaglini, M., de’Liguoro, U.: Compliance for reversible client/server interactions. In: BEAT, EPTCS, vol. 162, pp. 35–42 (2014)Google Scholar
  6. 6.
    Barbanera, F., Dezani-Ciancaglini, M., de’Liguoro, U.: Reversible client/server interactions. Formal Asp. Comput. 28(4), 697–722 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  7. 7.
    Barbanera, F., Dezani-Ciancaglini, M., Lanese, I., de’Liguoro, U.: Retractable contracts. In: PLACES 2015, EPTCS, vol. 203, pp. 61–72. Open Publishing Association (2016)Google Scholar
  8. 8.
    Barbanera, F., Lanese, I., de’Liguoro, U.: Retractable and speculative contracts (TR) (2017).
  9. 9.
    Bartoletti, M., Cimoli, T., Murgia, M., Podda, A.S., Pompianu, L.: Compliance and subtyping in timed session types. In: Graf, S., Viswanathan, M. (eds.) FORTE 2015. LNCS, vol. 9039, pp. 161–177. Springer, Cham (2015). doi: 10.1007/978-3-319-19195-9_11 CrossRefGoogle Scholar
  10. 10.
    Bernardi, G.T., Hennessy, M.: Modelling session types using contracts. Math. Struct. Comput. Sci. 26(3), 510–560 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  11. 11.
    Bernardi, G.T., Hennessy, M.: Using higher-order contracts to model session types. Logical Methods Comput. Sci. 12(2), 1–43 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  12. 12.
    Carbone, M., Honda, K., Yoshida, N.: Structured interactional exceptions in session types. In: Breugel, F., Chechik, M. (eds.) CONCUR 2008. LNCS, vol. 5201, pp. 402–417. Springer, Heidelberg (2008). doi: 10.1007/978-3-540-85361-9_32 CrossRefGoogle Scholar
  13. 13.
    Carothers, C.D., Perumalla, K.S., Fujimoto, R.: Efficient optimistic parallel simulations using reverse computation. ACM Trans. Model. Comput. Simul. 9(3), 224–253 (1999)CrossRefGoogle Scholar
  14. 14.
    Carpineti, S., Castagna, G., Laneve, C., Padovani, L.: A formal account of contracts for web services. In: Bravetti, M., Núñez, M., Zavattaro, G. (eds.) WS-FM 2006. LNCS, vol. 4184, pp. 148–162. Springer, Heidelberg (2006). doi: 10.1007/11841197_10 CrossRefGoogle Scholar
  15. 15.
    Castagna, G., Gesbert, N., Padovani, L.: A theory of contracts for web services. ACM Trans. Prog. Lang. Syst. 31(5), 19:1–19:61 (2009)CrossRefzbMATHGoogle Scholar
  16. 16.
    Preda, M., Gabbrielli, M., Lanese, I., Mauro, J., Zavattaro, G.: Graceful interruption of request-response service interactions. In: Kappel, G., Maamar, Z., Motahari-Nezhad, H.R. (eds.) ICSOC 2011. LNCS, vol. 7084, pp. 590–600. Springer, Heidelberg (2011). doi: 10.1007/978-3-642-25535-9_45 CrossRefGoogle Scholar
  17. 17.
    Danos, V., Krivine, J.: Reversible communicating systems. In: Gardner, P., Yoshida, N. (eds.) CONCUR 2004. LNCS, vol. 3170, pp. 292–307. Springer, Heidelberg (2004). doi: 10.1007/978-3-540-28644-8_19 CrossRefGoogle Scholar
  18. 18.
    Vries, E., Koutavas, V., Hennessy, M.: Communicating transactions. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 569–583. Springer, Heidelberg (2010). doi: 10.1007/978-3-642-15375-4_39 CrossRefGoogle Scholar
  19. 19.
    Dezani-Ciancaglini, M., Giannini, P.: Reversible multiparty sessions with checkpoints. In: EXPRESS/SOS 2016, EPTCS, vol. 222, pp. 60–74 (2016)Google Scholar
  20. 20.
    Gapeyev, V., Levin, M.Y., Pierce, B.C.: Recursive subtyping revealed. J. Funct. Program. 12(6), 511–548 (2002)MathSciNetCrossRefzbMATHGoogle Scholar
  21. 21.
    Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall, New York (1985)zbMATHGoogle Scholar
  22. 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). doi: 10.1007/BFb0053567 CrossRefGoogle Scholar
  23. 23.
    Honda, K., Yoshida, N., Carbone, M.: Multiparty asynchronous session types. In: POPL, pp. 273–284. ACM Press (2008)Google Scholar
  24. 24.
    Hüttel, H., et al.: Foundations of session types and behavioural contracts. ACM Comput. Surv. 49(1), 3:1–3:36 (2016)CrossRefGoogle Scholar
  25. 25.
    Lanese, I., Mezzina, C.A., Stefani, J.-B.: Reversibility in the higher-order \(\pi \)-calculus. Theor. Comput. Sci. 625, 25–84 (2016)MathSciNetCrossRefzbMATHGoogle Scholar
  26. 26.
    Lanese, I., Mezzina, C.A., Tiezzi, F.: Causal-consistent reversibility. Bull. EATCS 114 (2014)Google Scholar
  27. 27.
    Laneve, C., Padovani, L.: The must preorder revisited. In: Caires, L., Vasconcelos, V.T. (eds.) CONCUR 2007. LNCS, vol. 4703, pp. 212–225. Springer, Heidelberg (2007). doi: 10.1007/978-3-540-74407-8_15 CrossRefGoogle Scholar
  28. 28.
    Padovani, L.: Contract-based discovery of web services modulo simple orchestrators. Theoret. Comput. Sci. 411, 3328–3347 (2010)MathSciNetCrossRefzbMATHGoogle Scholar
  29. 29.
    Phillips, I.C.C., Ulidowski, I.: Reversing algebraic process calculi. J. Logic Alg. Program. 73(1–2), 70–96 (2007)CrossRefzbMATHGoogle Scholar
  30. 30.
    Prabhu, P., Ramalingam, G., Vaswani, K.: Safe programmable speculative parallelism. In: PLDI, pp. 50–61. ACM (2010)Google Scholar
  31. 31.
    Quiñones, C.G., et al.: Mitosis compiler: an infrastructure for speculative threading based on pre-computation slices. In: PLDI, pp. 269–279. ACM (2005)Google Scholar
  32. 32.
    Tiezzi, F., Yoshida, N.: Towards reversible sessions. In: PLACES, EPTCS, vol. 155. pp. 17–24 (2014)Google Scholar
  33. 33.
    Tiezzi, F., Yoshida, N.: Reversible session-based pi-calculus. J. Log. Algebr. Meth. Program. 84(5), 684–707 (2015)MathSciNetCrossRefzbMATHGoogle Scholar
  34. 34.
    Xu, L., Hutter, F., Hoos, H.H., Leyton-Brown, K.: Satzilla: Portfolio-based algorithm selection for SAT. J. Artif. Intell. Res. (JAIR) 32, 565–606 (2008)zbMATHGoogle Scholar
  35. 35.
    Zhang, L., Malik, S.: The quest for efficient boolean satisfiability solvers. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 17–36. Springer, Heidelberg (2002). doi: 10.1007/3-540-45657-0_2 CrossRefGoogle Scholar

Copyright information

© IFIP International Federation for Information Processing 2017

Authors and Affiliations

  • Franco Barbanera
    • 1
  • Ivan Lanese
    • 2
  • Ugo de’Liguoro
    • 3
  1. 1.University of CataniaCataniaItaly
  2. 2.Dipartimento di Informatica - Scienza e IngegneriaUniversity of Bologna/INRIABolognaItaly
  3. 3.Dipartimento di InformaticaUniversity of TorinoTorinoItaly

Personalised recommendations