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
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsNotes
- 1.
- 2.
Not shown in the excerpt, details are in Chap. 3 of Křikava’s PhD thesis [24].
- 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.
- 5.
- 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.
First appeared in the Eiffel language under the name Design-by-contract [30].
- 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.
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.
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.
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.
The implementation is rather naive, as the purpose is to demonstrate the language features.
- 13.
- 14.
- 15.
- 16.
- 17.
References
Abdelzaher, T., Bhatti, N.: Web server QoS management by adaptive content delivery. In: 7th International Workshop on Quality of Service (1999)
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)
de Alfaro, L., Henzinger, T.A.: Interface automata. In: ACM SIGSOFT Software Engineering Notes, vol. 26 (2001)
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)
Berekmeri, M., Serrano, D.: A Control Approach for Performance of Big Data Systems. In: Proceeding of the 2014 IFAC World Congress (2014)
Beugnard, A., Jézéquel, J.M., Plouzeau, N., Watkins, D.: Making components contract aware. Computer 32(7), 38–45 (1999)
Brooks, F.P.: No silver bullet essence and accidents of software engineering. Computer 20(4), 10–19 (1987)
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)
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)
Chang, H., Collet, P.: Fine-grained contract negotiation for hierarchical software components. In: 31th EUROMICRO-SEAA Conference - CBSE Track (2005)
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
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)
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
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
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)
Eker, J., Janneck, J., Lee, E., Ludvig, J., Neuendorffer, S., Sachs, S.: Taming heterogeneity - the Ptolemy approach. Proc. IEEE 91(1), 127–144 (2003)
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)
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)
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)
Hellerstein, J., Diao, Y., Parekh, S., Tilbury, D.: Feedback Control of Computing Systems. Wiley Online Library, Hoboken (2004)
Hellerstein, J.L.: Engineering autonomic systems. In: Proceedings of the 6th International Conference on Autonomic Computing (2009)
Hewitt, C.: Viewing control structures as patterns of passing messages. Artif. Intell. 8(3), 323–364 (1977)
Holzmann, G.J.: Spin Model Checker, 1st edn. Addison-Wesley Professional, Boston (2003)
Křikava, F.: Domain-Specific Modeling Language for Self-Adaptive Software System Architectures. Ph.D. thesis, University of Nice Sophia-Antipolis (2013)
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)
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)
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)
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)
Meyer, B.: Applying ‘design by contract’. Computer 25, 40–51 (1992)
Meyer, B.: Object-Oriented Software Construction (1997)
Meyer, B.: Toward more expressive contracts. J. Object Oriented Program. 13(4) (2000)
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)
Object Management Group: OMG Object Constraint Language (OCL). Technical report, February 2014
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
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)
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)
Plasil, F., Visnovsky, S.: Behavior protocols for software components. IEEE Trans. Software Eng. 28(11), 1056–1076 (2002)
Pnueli, A.: The temporal logic of programs. In: 18th Annual Symposium on Foundations of Computer Science (1977)
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)
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)
Salehie, M., Tahvildari, L.: Self-adaptive software: landscape and research challenges. ACM Trans. Auton. Adapt. Syst. (TAAS) 4(2) (2009)
Sendall, S., Kozaczynski, W.: Model transformation: the heart and soul of model-driven software development. IEEE Softw. 20(5), 42–45 (2003)
Stolz, V., Bodden, E.: Temporal assertions using AspectJ. Electron. Notes Theoret. Comput. Sci. 144, 109–124 (2006)
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)
Zhao, Y.: A model of computation with push and pull processing. Technical report, Technical Memorandum UCB/ERL M03/51, University of California, Berkeley (2003)
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
Corresponding author
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2017 Springer International Publishing AG
About this paper
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)