Moving from Specifications to Contracts in Component-Based Design

  • Sebastian S. Bauer
  • Alexandre David
  • Rolf Hennicker
  • Kim Guldstrand Larsen
  • Axel Legay
  • Ulrik Nyman
  • Andrzej Wąsowski
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7212)

Abstract

We study the relation between specifications of component behaviors and contracts providing means to specify assumptions on environments as well as component guarantees. We show how a contract framework can be built in a generic way on top of any specification theory which supports composition and specification refinement. Our contract framework lifts refinement to the level of contracts and proposes a notion of contract composition on the basis of dominating contracts. Contract composition satisfies a universal property and can be constructively defined if the underlying specification theory is complete, i.e. it offers operators for quotienting and conjoining specifications. We illustrate our generic construction of contracts by moving a specification theory for modal transition systems to contracts and we show that a (previously proposed) trace-based contract theory is an instance of our framework.

References

  1. 1.
    Aarts, F., Vaandrager, F.: Learning I/O Automata. In: Gastin, P., Laroussinie, F. (eds.) CONCUR 2010. LNCS, vol. 6269, pp. 71–85. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  2. 2.
    de Alfaro, L., Henzinger, T.A.: Interface automata. In: FSE, pp. 109–120. ACM Press (2001)Google Scholar
  3. 3.
    de Alfaro, L., Henzinger, T.A., Stoelinga, M.I.A.: Timed Interfaces. In: Sangiovanni-Vincentelli, A.L., Sifakis, J. (eds.) EMSOFT 2002. LNCS, vol. 2491, pp. 108–122. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  4. 4.
    de Alfaro, L., da Silva, L.D., Faella, M., Legay, A., Roy, P., Sorea, M.: Sociable Interfaces. In: Gramlich, B. (ed.) FroCos 2005. LNCS (LNAI), vol. 3717, pp. 81–105. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  5. 5.
    Bauer, S.S., David, A., Hennicker, R., Larsen, K.G., Legay, A., Nyman, U., Wasowski, A.: Moving from specifications to contracts in component-based design. Tech. Rep. 1201, LMU Munich, Germany (January 2012)Google Scholar
  6. 6.
    Bauer, S.S., Fahrenberg, U., Juhl, L., Larsen, K.G., Legay, A., Thrane, C.R.: Quantitative Refinement for Weighted Modal Transition Systems. In: Murlak, F., Sankowski, P. (eds.) MFCS 2011. LNCS, vol. 6907, pp. 60–71. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  7. 7.
    Bauer, S.S., Hennicker, R.: Views on Behaviour Protocols and Their Semantic Foundation. In: Kurz, A., Lenisa, M., Tarlecki, A. (eds.) CALCO 2009. LNCS, vol. 5728, pp. 367–382. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  8. 8.
    Bauer, S.S., Larsen, K.G., Legay, A., Nyman, U., Wasowski, A.: A Modal Specification Theory for Components with Data. In: FACS 2011. LNCS. Springer, Heidelberg (2011)Google Scholar
  9. 9.
    Bauer, S.S., Mayer, P., Schroeder, A., Hennicker, R.: On Weak Modal Compatibility, Refinement, and the MIO Workbench. In: Esparza, J., Majumdar, R. (eds.) TACAS 2010. LNCS, vol. 6015, pp. 175–189. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  10. 10.
    Benveniste, A., Caillaud, B., Ferrari, A., Mangeruca, L., Passerone, R., Sofronis, C.: Multiple Viewpoint Contract-Based Specification and Design. In: de Boer, F.S., Bonsangue, M.M., Graf, S., de Roever, W.-P. (eds.) FMCO 2007. LNCS, vol. 5382, pp. 200–225. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  11. 11.
    Bertrand, N., Legay, A., Pinchinat, S., Raclet, J.-B.: A Compositional Approach on Modal Specifications for Timed Systems. In: Breitman, K., Cavalcanti, A. (eds.) ICFEM 2009. LNCS, vol. 5885, pp. 679–697. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  12. 12.
    Caillaud, B., Delahaye, B., Larsen, K.G., Legay, A., Pedersen, M.L., Wasowski, A.: Constraint markov chains. Theor. Comput. Sci. 412(34), 4373–4404 (2011)MathSciNetMATHCrossRefGoogle Scholar
  13. 13.
    Chakrabarti, A., de Alfaro, L., Henzinger, T.A., Stoelinga, M.: Resource Interfaces. In: Alur, R., Lee, I. (eds.) EMSOFT 2003. LNCS, vol. 2855, pp. 117–133. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  14. 14.
    David, A., Larsen, K.G., Legay, A., Nyman, U., Wasowski, A.: Timed I/O automata: a complete specification theory for real-time systems. In: HSCC, pp. 91–100. ACM (2010)Google Scholar
  15. 15.
    Delahaye, B., Caillaud, B., Legay, A.: Probabilistic contracts: a compositional reasoning methodology for the design of systems with stochastic and/or non-deterministic aspects. Formal Methods in System Design 38(1), 1–32 (2011)MATHCrossRefGoogle Scholar
  16. 16.
    Doyen, L., Henzinger, T.A., Jobstman, B., Petrov, T.: Interface theories with component reuse. In: EMSOFT, pp. 79–88. ACM Press (2008)Google Scholar
  17. 17.
    Emmi, M., Giannakopoulou, D., Păsăreanu, C.S.: Assume-Guarantee Verification for Interface Automata. In: Cuellar, J., Sere, K. (eds.) FM 2008. LNCS, vol. 5014, pp. 116–131. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  18. 18.
    Godefroid, P., Jagadeesan, R.: On the Expressiveness of 3-Valued Models. In: Zuck, L.D., Attie, P.C., Cortesi, A., Mukhopadhyay, S. (eds.) VMCAI 2003. LNCS, vol. 2575, pp. 206–222. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  19. 19.
    Goessler, G., Raclet, J.B.: Modal contracts for component-based design. In: SEFM, pp. 295–303. IEEE Computer Society (2009)Google Scholar
  20. 20.
    Grumberg, O., Lange, M., Leucker, M., Shoham, S.: Don’t Know in the μ-Calculus. In: Cousot, R. (ed.) VMCAI 2005. LNCS, vol. 3385, pp. 233–249. Springer, Heidelberg (2005)CrossRefGoogle Scholar
  21. 21.
    Huth, M., Jagadeesan, R., Schmidt, D.A.: Modal Transition Systems: A Foundation for Three-Valued Program Analysis. In: Sands, D. (ed.) ESOP 2001. LNCS, vol. 2028, pp. 155–169. Springer, Heidelberg (2001)CrossRefGoogle Scholar
  22. 22.
    Jones, C.B.: Development methods for computer programs including a notion of interference. Ph.D. thesis, Oxford University Computing Laboratory (1981)Google Scholar
  23. 23.
    Larsen, K.G.: Modal Specifications. In: Sifakis, J. (ed.) CAV 1989. LNCS, vol. 407, pp. 232–246. Springer, Heidelberg (1990)CrossRefGoogle Scholar
  24. 24.
    Larsen, K.G., Legay, A., Traonouez, L.-M., Wąsowski, A.: Robust Specification of Real Time Components. In: Fahrenberg, U., Tripakis, S. (eds.) FORMATS 2011. LNCS, vol. 6919, pp. 129–144. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  25. 25.
    Larsen, K.G., Nyman, U., Wąsowski, A.: Interface Input/Output Automata. In: Misra, J., Nipkow, T., Karakostas, G. (eds.) FM 2006. LNCS, vol. 4085, pp. 82–97. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  26. 26.
    Larsen, K.G., Nyman, U., Wąsowski, A.: Modal I/O Automata for Interface and Product Line Theories. In: De Nicola, R. (ed.) ESOP 2007. LNCS, vol. 4421, pp. 64–79. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  27. 27.
    Larsen, K.G., Thomsen, B.: A modal process logic. In: LICS. IEEE Computer Society (1988)Google Scholar
  28. 28.
    Liskov, B., Wing, J.M.: A behavioral notion of subtyping. ACM Trans. Program. Lang. Syst. 16(6), 1811–1841 (1994)CrossRefGoogle Scholar
  29. 29.
    Meyer, B.: Applying ”design by contract”. IEEE Computer 25(10), 40–51 (1992)CrossRefGoogle Scholar
  30. 30.
    Misra, J., Chandy, K.M.: Proofs of networks of processes. IEEE Trans. Software Eng. 7(4), 417–426 (1981)MathSciNetCrossRefGoogle Scholar
  31. 31.
    Quinton, S., Graf, S.: Contract-based verification of hierarchical systems of components. In: SEFM, pp. 377–381. IEEE Computer Society (2008)Google Scholar
  32. 32.
    Raclet, J.B., Badouel, E., Benveniste, A., Caillaud, B., Legay, A., Passerone, R.: A modal interface theory for component-based design. Fundam. Inform. 108(1-2), 119–149 (2011)MathSciNetGoogle Scholar
  33. 33.
    Raclet, J.B., Badouel, E., Benveniste, A., Caillaud, B., Passerone, R.: Why are modalities good for interface theories? In: ACSD, pp. 119–127. IEEE Computer Society (2009)Google Scholar
  34. 34.
    Sassolas, M., Chechik, M., Uchitel, S.: Exploring inconsistencies between modal transition systems. Software and System Modeling 10(1), 117–142 (2011)CrossRefGoogle Scholar
  35. 35.
    Tripakis, S., Lickly, B., Henzinger, T.A., Lee, E.A.: A theory of synchronous relational interfaces. ACM Trans. Program. Lang. Syst. 33(4), 14 (2011)CrossRefGoogle Scholar
  36. 36.
    Wei, O., Gurfinkel, A., Chechik, M.: Mixed Transition Systems Revisited. In: Jones, N.D., Müller-Olm, M. (eds.) VMCAI 2009. LNCS, vol. 5403, pp. 349–365. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  37. 37.
    Xu, D.N., Gössler, G., Girault, A.: Probabilistic Contracts for Component-Based Design. In: Bouajjani, A., Chin, W.-N. (eds.) ATVA 2010. LNCS, vol. 6252, pp. 325–340. Springer, Heidelberg (2010)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Sebastian S. Bauer
    • 1
  • Alexandre David
    • 2
  • Rolf Hennicker
    • 1
  • Kim Guldstrand Larsen
    • 2
  • Axel Legay
    • 2
    • 3
  • Ulrik Nyman
    • 2
  • Andrzej Wąsowski
    • 4
  1. 1.Ludwig-Maximilians-Universität MünchenGermany
  2. 2.Computer Science DepartmentAalborg UniversityDenmark
  3. 3.INRIA/IRISARennes CedexFrance
  4. 4.IT University of CopenhagenDenmark

Personalised recommendations