Skip to main content

Contracts-Based Control Integration into Software Systems

  • Conference paper
  • First Online:
  • 1017 Accesses

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

Abstract

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 is a preview of subscription content, log in via an institution.

Buying options

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

Learn about institutional subscriptions

Notes

  1. 1.

    http://fikovnik.github.io/Actress.

  2. 2.

    Not shown in the excerpt, details are in Chap. 3 of Křikava’s PhD thesis [24].

  3. 3.

    Conceptually, each AE can be seen as a target system itself, and as such it can provide sensors and effectors enabling the AE reflection—hence the name adaptive element.

  4. 4.

    http://eclipse.org/Xtext.

  5. 5.

    http://akka.io.

  6. 6.

    Inspired by the Ptolemy 2 Accumulator actor cf. http://ptolemy.eecs.berkeley.edu/ptolemyII/ptII8.1/ptII/doc/codeDoc/ptolemy/actor/lib/Accumulator.html.

  7. 7.

    First appeared in the Eiffel language under the name Design-by-contract [30].

  8. 8.

    By the term runtime exception, we mean all exceptions that are possibly thrown at runtime, which in the case of Xbase and Java include both checked and unchecked exceptions.

  9. 9.

    Making a parallel with the Meyer’s Disciplined Exception Handling principle [30], the resume and restart actions corresponds to the retrying response and the escalation falls into failure.

  10. 10.

    There are two reasons for the suffix: (i) it makes a clear distinction between contract logic and contract exception, and (i) it makes more sense English wise.

  11. 11.

    It is unlikely that such an exception would occur. However since the size of the response has to be converted from a into a declaring this runtime exception explicitly contributes to the AE robustness.

  12. 12.

    The implementation is rather naive, as the purpose is to demonstrate the language features.

  13. 13.

    http://bit.ly/1gHM975.

  14. 14.

    https://wiki.eclipse.org/Xbase.

  15. 15.

    http://en.wikipedia.org/wiki/Actor_model.

  16. 16.

    http://www.mathworks.com/products/simulink/.

  17. 17.

    https://openmodelica.org/.

References

  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. 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)

    Article  Google Scholar 

  3. de Alfaro, L., Henzinger, T.A.: Interface automata. In: ACM SIGSOFT Software Engineering Notes, vol. 26 (2001)

    Google Scholar 

  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. 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. Beugnard, A., Jézéquel, J.M., Plouzeau, N., Watkins, D.: Making components contract aware. Computer 32(7), 38–45 (1999)

    Article  Google Scholar 

  7. Brooks, F.P.: No silver bullet essence and accidents of software engineering. Computer 20(4), 10–19 (1987)

    Article  Google Scholar 

  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. 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. Chang, H., Collet, P.: Fine-grained contract negotiation for hierarchical software components. In: 31th EUROMICRO-SEAA Conference - CBSE Track (2005)

    Google Scholar 

  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). https://doi.org/10.1007/978-3-642-02161-9_1

    Chapter  Google Scholar 

  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. 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). https://doi.org/10.1007/11821946_4

    Chapter  Google Scholar 

  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). https://doi.org/10.1007/978-3-540-77351-1_3

    Chapter  Google Scholar 

  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. Eker, J., Janneck, J., Lee, E., Ludvig, J., Neuendorffer, S., Sachs, S.: Taming heterogeneity - the Ptolemy approach. Proc. IEEE 91(1), 127–144 (2003)

    Article  Google Scholar 

  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. 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)

    Article  Google Scholar 

  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. Hellerstein, J., Diao, Y., Parekh, S., Tilbury, D.: Feedback Control of Computing Systems. Wiley Online Library, Hoboken (2004)

    Book  Google Scholar 

  21. Hellerstein, J.L.: Engineering autonomic systems. In: Proceedings of the 6th International Conference on Autonomic Computing (2009)

    Google Scholar 

  22. Hewitt, C.: Viewing control structures as patterns of passing messages. Artif. Intell. 8(3), 323–364 (1977)

    Article  Google Scholar 

  23. Holzmann, G.J.: Spin Model Checker, 1st edn. Addison-Wesley Professional, Boston (2003)

    Google Scholar 

  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. 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. 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)

    Article  Google Scholar 

  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. 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. Meyer, B.: Applying ‘design by contract’. Computer 25, 40–51 (1992)

    Article  Google Scholar 

  30. Meyer, B.: Object-Oriented Software Construction (1997)

    Google Scholar 

  31. Meyer, B.: Toward more expressive contracts. J. Object Oriented Program. 13(4) (2000)

    Google Scholar 

  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. Object Management Group: OMG Object Constraint Language (OCL). Technical report, February 2014

    Google Scholar 

  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). https://doi.org/10.1007/978-3-642-16612-9_5

    Chapter  Google Scholar 

  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. 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. Plasil, F., Visnovsky, S.: Behavior protocols for software components. IEEE Trans. Software Eng. 28(11), 1056–1076 (2002)

    Article  Google Scholar 

  38. Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science (1977)

    Google Scholar 

  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. 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. Salehie, M., Tahvildari, L.: Self-adaptive software: landscape and research challenges. ACM Trans. Auton. Adapt. Syst. (TAAS) 4(2) (2009)

    Google Scholar 

  42. Sendall, S., Kozaczynski, W.: Model transformation: the heart and soul of model-driven software development. IEEE Softw. 20(5), 42–45 (2003)

    Article  Google Scholar 

  43. Stolz, V., Bodden, E.: Temporal assertions using AspectJ. Electron. Notes Theoret. Comput. Sci. 144, 109–124 (2006)

    Article  Google Scholar 

  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. 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 

Download references

Acknowledgments

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

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Filip Křikava .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Křikava, F., Collet, P., Rouvoy, R., Seinturier, L. (2017). Contracts-Based Control Integration into Software Systems. In: de Lemos, R., Garlan, D., Ghezzi, C., Giese, H. (eds) Software Engineering for Self-Adaptive Systems III. Assurances. Lecture Notes in Computer Science(), vol 9640. Springer, Cham. https://doi.org/10.1007/978-3-319-74183-3_9

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-74183-3_9

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-74182-6

  • Online ISBN: 978-3-319-74183-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics