Self-Adaptation: MAPE-K and Control Theory Danny Weyns & Stepan Shevtsov www.lnu.se/adaptwise Grenoble, France November 4, 2014 Linnaeus University Sweden Växjö Campus AdaptWise research team focusing on engineering self-adaptive systems 2 Research setting • Software engineers have to deal with uncertainties resulting from incomplete knowledge at design time, e.g. • - Dynamic operating conditions that are difficult to predict • - Parts enter and leave the system at will • - Changing goals • How to engineer such systems and guarantee the required system goals? Self-adaptation • System maintains a model of itself at runtime • System reasons about itself and adapts to realize system goals • Architecture-based self-adaptation • - Separation between domain concerns & adaptation concerns • - Adaptation concerns are handled by a feedback loop • - Feedback loop ≈ set of components that share knowledge Model architecture-based self-adaptation Software system effect input Environment Non-controllable software, hardware, network, physical context Model architecture-based self-adaptation Self-adaptive software system Managing system monitor monitor adapt Managed system Controllable software effect input Environment Non-controllable software, hardware, network, physical context Model architecture-based self-adaptation Self-adaptive software system A M P K monitor monitor Managing system E adapt Managed system Controllable software effect input Environment Non-controllable software, hardware, network, physical context MAPE-K - M: Monitor - A: Analyze - P: Plan - E: Execute - K: Knowledge Research focus • Principles of architecture-based self-adaptation • - FORMS: Unifying reference model for self-adaptation • - Do External Feedback Loops Improve the Design of SelfAdaptive Systems? • Rigorous modeling and verification • - ActivFORMS: Active formal models for self-adaptation • - Unifying approach for self-adaptation that integrates architecture-based approach with control-theoretic approach Research focus • Principles of architecture-based self-adaptation • - FORMS: Unifying reference model for self-adaptation • - Do External Feedback Loops Improve the Design of SelfAdaptive Systems? • Assurances to handle uncertainty Today • - ActivFORMS: Active formal models for self-adaptation • - Unifying approach for self-adaptation that integrates architecture-based approach with control-theoretic approach ActivFORMS: Starting points Assurances for self-adaption - One prominent approach is using formal models - Main focus on K of MAPE-K - Main focus on uncertainty wrt model parameters Assurance of adaptation capabilities by MAPE functions? - E.g., does analysis detect errors correctly? - Are adaptations performed in order of selected plan? How to provide assurances with changing/new goals? - Requires support for adaptations of adaptation functions ActivFORMS: Active formal models for selfadaptation Formal model of complete MAPE-K loop Model is directly executed to adapt the managed system Model directly supports online verification of goal satisfaction/violation Goals and MAPE-K models can be changed at runtime to support changing/new goals Approach Active Model MAPE-K behaviors modeled as network of timed automata Adaptation requirements formulated in timed computation tree logic Model can be verified offline (e.g., using Uppaal tool) PlanDisableLane planningDisableLane[RiD]? !dependOnLane() PlanDisableLane initiatePlan() PlanDisable Plan PlanReady PlanWait planningDisableLane[RiD]? dependOnLane() addPlanStepWait() !dependOnLane() initiatePlan() planned() Figure 6: Input triggered execution execute[RiD]! PlanDisable PlanWait addPlanStepDisable() dependOnLane() addPlanStepWait() Plan PlanReady planned() Figure 4: Plan automaton of a robot execute[RiD]! from verification only hold to the extent that the implementation of the managed system conforms to the model of the system that is addPlanStepDisable() used for verification. Such conformance can be tested, for example with model-based testing techniques [21]. We illustrate verification with an example for the robotic system. Monitoring(1).RequestToDisableLane && knowledge[1].disabledLane == Lane_cd --> Execution(1).DisableLane && knowledge[1].disabledLane == Lane_cd The goal allows verifying that when the monitor behavior of Figure 7: Time triggered execution triggered either by input from the managed system or the environ2 Virtual Machine Can load and execute active model Interaction with managed system and environment through probes and effectors Allows verification of goal satisfaction/violation Goals and MAPE-K models can be changed at runtime to support changing/new goals Goal management Goal model with associated adaptation models Goal monitor monitors goal satisfaction Goal adaptor satisfies current goals and adapt active model when needed Goal manager supports inspection active model and updating models Case study Goal Management Interface Goal Management Interface Show executing model Goal Management Interface Updating goals and models Goal Management Interface Update model Discussion Active formal model paves the way for “handling continuous change” Goal model and associated adaptation models - Support changing goals and adding new goals - Results in small models allowing efficient verification We have applied the approach successfully to different case studies Various opportunities for future research remain, including: - Support for probabilistic models - Runtime support for model checking - Coordination between active models Research focus • Principles of architecture-based self-adaptation • - FORMS: Unifying reference model for self-adaptation • - Do External Feedback Loops Improve the Design of SelfAdaptive Systems? • Rigorous modeling and verification • - ActivFORMS: Active formal models for self-adaptation • - Unifying approach for self-adaptation that integrates architecture-based approach with control-theoretic approach Unifying approach for self-adaptation that integrates architecture-based approach with control-theoretic approach Control theory provides a mature mathematical framework to design and analyze feedback loops Has been used to control computing systems Focus primarily on controlling resources of computing systems (CPU, memory, bandwidth, etc.) Our aim is to control software Motivation for controlling software How do control-based solutions relate to MAPE-K based solutions? Are they complementary? Or does control theory provide a foundational theoretical framework to software adaptation? Unifying approach for self-adaptation that integrates architecture-based approach with control-theoretic approach Control in service-based system: e.g., - Dynamically replace service that goes down with alternative - Change service with better quality properties - Change the workflow at runtime to improve QoS, etc. Variety of challenges How does the (mathema-cal) model of so2ware look like? For which types of adapta-ons can we control so2ware and for which not? How is a setpoint/input defined? What are the “knobs” to adapt so2ware? What guarantees can be provided? How do typical so2ware adapta-on proper-es relate to typical proper-es of controllers? What are the benefits and limita-ons of applying control theory to so2ware systems? Current work Systema-c literature review of using control theory to adapt so2ware Focus on applica-on layer and suppor-ng service layer (not 1 to 1 mapping to resources (e.g. a driver or virtual machine) Research ques-ons we plan to address -‐ RQ1: What is the focus of research on control-‐based adapta-on in so2ware systems? -‐ RQ2: What quali-es are affected by adap-ng so2ware using principles from control theory? -‐ RQ3: How are the so2ware systems with feedback controllers modeled and constructed? In parallel, we are studying how to apply a control-‐based approach to adapt the architecture of a service based system Bibliography • D. Weyns, S. Malek, J. Andersson, FORMS: Unifying Reference Model for Formal Specifica-on of Distributed Self-‐Adap-ve Systems, ACM Transac-ons on Autonomous and Adap-ve Systems, TAAS, 7(1), 2012 • D. Weyns, U. I2ikhar and J. Söderlund, Do External Feedback Loops Improve the Design of Self-‐Adap-ve Systems? A Controlled Experiment, So2ware Engineering for Adap-ve and Self-‐Managing Systems, SEAMS 2013 • M. Usman I2ikhar, Danny Weyns: Ac-vFORMS: ac-ve formal models for self-‐adapta-on, Interna-onal Symposium in So2ware Engineering of Adap-ve and Self-‐Managing Systems, SEAMS 2014 • D. Weyns, S. Shevtsov, S. Pllana: Providing Assurances for Self-‐Adapta-on in a Mobile Digital Storytelling Applica-on Using Ac-vFORMS, Interna-onal Conference on Self-‐Adap-ve and Self-‐Organizing Systems, SASO 2014 • Papers available via: hcp://homepage.lnu.se/staff/daweaa/publica-ons/publica-ons.htm
© Copyright 2026 Paperzz