Contracts-Based Control Integration into Software Systems

  • Filip Křikava
  • Philippe Collet
  • Romain Rouvoy
  • Lionel Seinturier
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 9640)


Among the different techniques that are used to design self-adaptive software systems, control theory allows one to design an adaptation policy whose properties, such as stability and accuracy, can be formally guaranteed under certain assumptions. However, in the case of software systems, the integration of these controllers to build complete feedback control loops remains manual. More importantly, it requires an extensive handcrafting of non-trivial implementation code. This may lead to inconsistencies and instabilities as no systematic and automated assurance can be obtained on the fact that the initial assumptions for the designed controller still hold in the resulting system.

In this chapter, we rely on the principles of design-by-contract to ensure the correction and robustness of a self-adaptive software system built using feedback control loops. Our solution raises the level of abstraction upon which the loops are specified by allowing one to define and automatically verify system-level properties organized in contracts. They cover behavioral, structural and temporal architectural constraints as well as explicit interaction. These contracts are complemented by a first-class support for systematic fault handling. As a result, assumptions about the system operation conditions become more explicit and verifiable in a systematic way.



This work is partially supported by the Datalyse project and was previously supported by the ANR SALTY project under contract ANR-09-SEGI-012.


  1. 1.
    Abdelzaher, T., Bhatti, N.: Web server QoS management by adaptive content delivery. In: 7th International Workshop on Quality of Service (1999)Google Scholar
  2. 2.
    Abdelzaher, T., Shin, K., Bhatti, N.: Performance guarantees for Web server end-systems: a control-theoretical approach. IEEE Trans. Parallel Distrib. Syst. 13(1), 80–96 (2002)CrossRefGoogle Scholar
  3. 3.
    de Alfaro, L., Henzinger, T.A.: Interface automata. In: ACM SIGSOFT Software Engineering Notes, vol. 26 (2001)Google Scholar
  4. 4.
    Asadollahi, R., Salehie, M., Tahvildari, L.: StarMX: a framework for developing self-managing Java-based systems. In: 2009 ICSE Workshop on Software Engineering for Adaptive and Self-Managing Systems (2009)Google Scholar
  5. 5.
    Berekmeri, M., Serrano, D.: A Control Approach for Performance of Big Data Systems. In: Proceeding of the 2014 IFAC World Congress (2014)Google Scholar
  6. 6.
    Beugnard, A., Jézéquel, J.M., Plouzeau, N., Watkins, D.: Making components contract aware. Computer 32(7), 38–45 (1999)CrossRefGoogle Scholar
  7. 7.
    Brooks, F.P.: No silver bullet essence and accidents of software engineering. Computer 20(4), 10–19 (1987)CrossRefGoogle Scholar
  8. 8.
    Cámara, J., de Lemos, R., Laranjeiro, N., Ventura, R., Vieira, M.: Robustness evaluation of the rainbow framework for self-adaptation. In: Proceedings of the 29th Annual ACM Symposium on Applied Computing (2014)Google Scholar
  9. 9.
    Cassou, D., Balland, E., Consel, C., Lawall, J.: Leveraging software architectures to guide and verify the development of sense/compute/control applications. In: 33rd International Conference on Software Engineering (2011)Google Scholar
  10. 10.
    Chang, H., Collet, P.: Fine-grained contract negotiation for hierarchical software components. In: 31th EUROMICRO-SEAA Conference - CBSE Track (2005)Google Scholar
  11. 11.
    Cheng, B.H.C., et al.: Software engineering for self-adaptive systems: a research roadmap. In: Cheng, B.H.C., de Lemos, R., Giese, H., Inverardi, P., Magee, J. (eds.) Software Engineering for Self-Adaptive Systems. LNCS, vol. 5525, pp. 1–26. Springer, Heidelberg (2009). CrossRefGoogle Scholar
  12. 12.
    Cheng, S.W., Garlan, D., Schmerl, B.: Evaluating the effectiveness of the Rainbow self-adaptive system. In: 4th ICSE Workshop on Software Engineering for Adaptive and Self-Managing Systems (2009)Google Scholar
  13. 13.
    Collet, P., Ozanne, A., Rivierre, N.: Enforcing different contracts in hierarchical component-based systems. In: Löwe, W., Südholt, M. (eds.) SC 2006. LNCS, vol. 4089, pp. 50–65. Springer, Heidelberg (2006). CrossRefGoogle Scholar
  14. 14.
    Collet, P., Malenfant, J., Ozanne, A., Rivierre, N.: Composite contract enforcement in hierarchical component systems. In: Lumpe, M., Vanderperren, W. (eds.) SC 2007. LNCS, vol. 4829, pp. 18–33. Springer, Heidelberg (2007). CrossRefGoogle Scholar
  15. 15.
    Efftinge, S., Eysholdt, M., Köhnlein, J., Zarnekow, S., von Massow, R., Hasselbring, W., Hanus, M.: Xbase: implementing domain-specific languages for Java. In: Proceedings of the 11th International Conference on Generative Programming and Component Engineering (2012)Google Scholar
  16. 16.
    Eker, J., Janneck, J., Lee, E., Ludvig, J., Neuendorffer, S., Sachs, S.: Taming heterogeneity - the Ptolemy approach. Proc. IEEE 91(1), 127–144 (2003)CrossRefGoogle Scholar
  17. 17.
    Filieri, A., Hoffmann, H., Maggio, M.: Automated design of self-adaptive software with control-theoretical formal guarantees. In: Proceedings 36th International Conference on Software Engineering (2014)Google Scholar
  18. 18.
    Garlan, D., Cheng, S., Huang, A., Schmerl, B., Steenkiste, P.: Rainbow: architecture-based self adaptation with reusable infrastructure. IEEE Comput. 37(10), 46–54 (2004)CrossRefGoogle Scholar
  19. 19.
    Hebig, R., Giese, H., Becker, B.: Making control loops explicit when architecting self-adaptive systems. In: Proceeding of the Second International Workshop on Self-Organizing Architectures (2010)Google Scholar
  20. 20.
    Hellerstein, J., Diao, Y., Parekh, S., Tilbury, D.: Feedback Control of Computing Systems. Wiley Online Library, Hoboken (2004)CrossRefGoogle Scholar
  21. 21.
    Hellerstein, J.L.: Engineering autonomic systems. In: Proceedings of the 6th International Conference on Autonomic Computing (2009)Google Scholar
  22. 22.
    Hewitt, C.: Viewing control structures as patterns of passing messages. Artif. Intell. 8(3), 323–364 (1977)CrossRefGoogle Scholar
  23. 23.
    Holzmann, G.J.: Spin Model Checker, 1st edn. Addison-Wesley Professional, Boston (2003)Google Scholar
  24. 24.
    Křikava, F.: Domain-Specific Modeling Language for Self-Adaptive Software System Architectures. Ph.D. thesis, University of Nice Sophia-Antipolis (2013)Google Scholar
  25. 25.
    Křikava, F., Collet, P., France, R.B.: ACTRESS: domain-specific modeling of self-adaptive software architectures. In: Proceedings of the 29th Annual ACM Symposium on Applied Computing (2014)Google Scholar
  26. 26.
    Le Traon, Y., Baudry, B., Jézéquel, J.M.: Design by contract to improve software vigilance. IEEE Trans. Software Eng. 32(8), 571–586 (2006)CrossRefGoogle Scholar
  27. 27.
    Lu, Y., Abdelzaher, T., Lu, C., Tao, G.: An adaptive control framework for QoS guarantees and its application to differentiated caching. In: 10th International Workshop on Quality of Service (2002)Google Scholar
  28. 28.
    Lynch, N.A., Tuttle, M.R.: Hierarchical correctness proofs for distributed algorithms. In: Proceedings of the 6th Annual ACM Symposium on Principles of Distributed Computing, PODC 1987 (1987)Google Scholar
  29. 29.
    Meyer, B.: Applying ‘design by contract’. Computer 25, 40–51 (1992)CrossRefGoogle Scholar
  30. 30.
    Meyer, B.: Object-Oriented Software Construction (1997)Google Scholar
  31. 31.
    Meyer, B.: Toward more expressive contracts. J. Object Oriented Program. 13(4) (2000)Google Scholar
  32. 32.
    Niz, D.D., Bhatia, G., Rajkumar, R.: Model-based development of embedded systems: the SysWeaver approach. In: 12th IEEE Real-Time and Embedded Technology and Applications Symposium (2006)Google Scholar
  33. 33.
    Object Management Group: OMG Object Constraint Language (OCL). Technical report, February 2014Google Scholar
  34. 34.
    Odersky, M.: Contracts for scala. In: Barringer, H., Falcone, Y., Finkbeiner, B., Havelund, K., Lee, I., Pace, G., Roşu, G., Sokolsky, O., Tillmann, N. (eds.) RV 2010. LNCS, vol. 6418, pp. 51–57. Springer, Heidelberg (2010). CrossRefGoogle Scholar
  35. 35.
    Oreizy, P., Rosenblum, D.S., Taylor, R.N.: On the role of connectors in modeling and implementing software architectures. Department of Information and Computer Science, University of California, Technical report (1998)Google Scholar
  36. 36.
    Parizek P., Plasil, F., Kofron, J.: Model checking of software components: combining Java PathFinder and behavior protocol model checker. In: 30th Annual IEEE/NASA Software Engineering Workshop (SEW-30) (2006)Google Scholar
  37. 37.
    Plasil, F., Visnovsky, S.: Behavior protocols for software components. IEEE Trans. Software Eng. 28(11), 1056–1076 (2002)CrossRefGoogle Scholar
  38. 38.
    Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science (1977)Google Scholar
  39. 39.
    Ramirez, A.J., Cheng, B.H.C.: Design patterns for developing dynamically adaptive systems. In: Proceedings of the 2010 ICSE Workshop on Software Engineering for Adaptive and Self-Managing Systems (2010)Google Scholar
  40. 40.
    Rouvoy, R., Barone, P., Ding, Y., Eliassen, F., Hallsteinsen, S., Lorenzo, J., Mamelli, A., Scholz, U.: MUSIC: middleware support for self-adaptation in ubiquitous and service-oriented environments. In: Proceedings of the 1st Workshop on Mobile, MobMid 2008 (2008)Google Scholar
  41. 41.
    Salehie, M., Tahvildari, L.: Self-adaptive software: landscape and research challenges. ACM Trans. Auton. Adapt. Syst. (TAAS) 4(2) (2009)Google Scholar
  42. 42.
    Sendall, S., Kozaczynski, W.: Model transformation: the heart and soul of model-driven software development. IEEE Softw. 20(5), 42–45 (2003)CrossRefGoogle Scholar
  43. 43.
    Stolz, V., Bodden, E.: Temporal assertions using AspectJ. Electron. Notes Theoret. Comput. Sci. 144, 109–124 (2006)CrossRefGoogle Scholar
  44. 44.
    Villegas, N.M., Müller, H.A., Tamura, G., Duchien, L., Casallas, R.: A framework for evaluating quality-driven self-adaptive software systems. In: 6th International Symposium on Software Engineering for Adaptive and Self-Managing Systems (2011)Google Scholar
  45. 45.
    Zhao, Y.: A model of computation with push and pull processing. Technical report, Technical Memorandum UCB/ERL M03/51, University of California, Berkeley (2003)Google Scholar

Copyright information

© Springer International Publishing AG 2017

Authors and Affiliations

  • Filip Křikava
    • 1
  • Philippe Collet
    • 3
  • Romain Rouvoy
    • 2
  • Lionel Seinturier
    • 2
  1. 1.Czech Technical UniversityPragueCzech Republic
  2. 2.University of Lille/InriaLilleFrance
  3. 3.Université Nice Sophia AntipolisNiceFrance

Personalised recommendations