Chapter 14

Identifying and Handling Uncertainties in the Feedback Control Loop

R. de Lemos * , † ; P. Potena ‡      * University of Kent, United Kingdom
† CISUC, University of Coimbra, Portugal
‡ Fondazione Bruno Kessler, Trento, Italy

Abstract

In the feedback control loop, uncertainty is associated to different sources (e.g., the environment), and appears in different forms (e.g., as noise in variables or imperfections in techniques being used). In the MAPE-K control loop, uncertainty is normally handled by the decision maker at the Plan stage. However, depending on the complexity of the stages of the MAPE-K control loop, uncertainties need also to be handled at other stages, depending on the uncertainties associated with that stage. Moreover, uncertainties may also propagate between the stages of the control loop, which might affect how uncertainties are handled. In this position chapter, we claim that uncertainties should be identified and handled at the different stages of the feedback control loop. We propose an approach for the identification of internal and external sources of uncertainty for a given stage, and we promote error propagation analysis as a method for analyzing the propagation of uncertainties between stages. In terms of trade-off analysis, which can take place at any stage of the MAPE-K control loop, such an approach provides a clear benefit since it leads to a more accurate estimation of the system quality attributes because uncertainties are handled in the context where they arise.

Keywords

Self-adaptive software systems; Uncertainties; Feedback control loop; MAPE-K; Error propagation; Decision making; Trade-off analysis

14.1 Introduction

The key role of the feedback control loop in self-adaptive software systems, like the MAPE-K control loop [ 1 ], is to handle changes and uncertainties related to the target system, its goals, and its environment. The MAPE-K control loop, in particular, is characterized by multiple stages, which themselves can equally be a source of different types of uncertainties. Examples of uncertainties that might emerge at a particular stage: (i) users often find it difficult to accurately express quality preferences [ 2 ], (ii) distinct techniques can be used at a particular stage [ 3 ], or (iii) the analytical models used for assessing the system’s quality attributes may simplify, by definition, assumptions that may not hold at runtime [ 4 ].

In view of these examples, there is the need for considering uncertainty as a first-class concept for improving the quality, or sometimes, even the correctness of adaptation decisions [ 4 – 6 ].

There have been several contributions in the literature typically focused on identifying and handling uncertainties in self-adaptive software systems. Examples of these contributions are related to: (i) show how uncertainty may impact the system’s ability to satisfy its objectives [ 7 ], (ii) show how uncertainty may affect the definition and evaluation of software models [ 8 , 9 ], (iii) specify the behavior of dynamically adaptive systems [ 10 ], (iv) express the uncertainty associated with the satisfaction of non-functional requirements given a set of design decisions [ 11 ], or (v) support the development and execution of self-adaptive software that handles uncertainty, while satisfying certain non-functional requirements (e.g., response time and the faulty behavior) [ 12 ]. Therefore, the identification and handling of uncertainties have been recognized as key factors for enabling systems to make accurate trade-off analysis related to both functional and non-functional requirements.

Although several approaches for identifying and handling uncertainties have been introduced in the last few years, they typically address uncertainties at the Plan stage of the MAPE-K control loop [ 7 ] without: (i) considering the different stages of a feedback control loop as a source of uncertainty that could be characterized as non-negligible, or (ii) providing support for collectively handle uncertainties related to the whole feedback control loop, which might be influenced by the dependencies between the stages.

The line taken in this chapter is that there is a need to identify and handle uncertainties locally at the different stages of the feedback control loop. This is essential because at any given stage there are uncertainties related to, for example, goals and inputs to the stage, techniques being used, and assumptions being made. There are several reasons for motivating this approach: (i) if uncertainty is not explicitly captured at a given stage, it might cease to exist or transformed when data is transferred between the stages of the control loop, (ii) if uncertainty is not considered locally at a given stage, the context for that uncertainty might be lost at the loop level, and (iii) if uncertainty is not identified and handled separately at the different stages of the control loop, there is the potential for the curse of dimensionality because of the high number of dimensions that need to be considered (i.e., the goal in decision making is to have fewer dimensions so smaller is the hypothesis space, which allows to obtain faster and more effective decision makers). However, the identification and handling of uncertainty cannot be done in isolation just at the stage level. There are dependencies between the stages of the MAPE-K control loop that need to be taken into account. Hence the motivation for defining an approach in which uncertainty and its propagation are considered in the context of the whole feedback control loop.

As a contribution, this chapter presents an approach that promotes (i) the identification and handling of uncertainty at the different stages of the feedback control loop, and (ii) the analysis of uncertainty propagation between the stages of the loop. The ultimate goal of the proposed approach is to obtain more accurate estimations for the system quality attributes, which are fundamental for the process of decision making. Trade-offs are the core of decision making when evaluating multiple alternatives for selecting one that best fulfils the goals of a stakeholder. In software development, the analysis of trade-offs, between the quality attributes describing different alternatives, has been essentially a development-time activity. However, with the event of self-adaptive software systems there has been a shift towards trade-off analysis at runtime in which decisions are made without any human interference. This cannot be achieved by just using ever more sophisticated techniques since important aspects regarding uncertainty propagation in the feedback control loop may not be captured, hence the contribution of this position chapter.

The rest of the chapter is organized as follows. In Section 14.2 , we motivate the need for identifying and handling uncertainty in a coherent way along all the stages of the feedback control loop. Section 14.3 provides a brief overview of the methodology for identifying and handling uncertainty in the MAPE-K control loop. Section 14.4 , using a case study of a smartphone application, we identify sources of uncertainty associated with the different stages of the feedback control loop. Related work is described in Section 14.5 . Finally, Section 14.6 presents the conclusions, and provides indicative future work in the form of challenges.

14.2 Motivation

This section motivates the need to consider the identification and handling of uncertainties in a staged way, rather than in a single stage, because depending on the feedback loop, its stages might be complex enough that would justify decisions to be made incrementally.

First, we present the stages of the feedback loop in which uncertainty should be identified and handled, next, we introduce some basic concepts regarding uncertainty, and finally, we provide some examples regarding the propagation of uncertainty in a feedback loop.

14.2.1 Feedback Loop

In this chapter, we adopt as a feedback control loop, the MAPE-K control loop [ 1 ], as shown in Fig. 14.1 . In this diagram, the main feedback control loop, which embodies the stages of the MAPE-K loop, observes (via probes) and adapts (via effectors) a target system. The Monitor stage enables to obtain the state of the target system and its environment. The Analyze stage analyzes the state of the target system and its environment in order, first, to decide whether adaptation should be triggered ( Solution Domain ), and second, to identify the appropriate courses of action in case adaptation is required ( Problem Domain ). The Plan stage, first, selects amongst alternative courses of action those that are the most appropriate ( Decision Maker ), and second, generates the plans that will realize the selected course of action ( Plan Synthesis ). The Execute stage executes the plans that deploy the course of action for adapting the system. Finally, Knowledge represents any information related to the perceived state of the target system and environment that enables the provision of self-adaptation. Overall, the MAPE-K loop is appealing due to its simplicity and extendable nature.

f14-01-9780128028551

Fig. 14.1 Modified version of the MAPE-K control loop for autonomic computing. Modified from J.O. Kephart, D.M. Chess, The vision of autonomic computing, Computer 36 (1) (2003) 41–50.

In the MAPE-K loop, depending on the diversity of the activities performed at each of the stages, several specific control loops (to be referred as meta-loops ) can be attached to each of the stages of the MAPE-K loop, as shown in Fig. 14.1 . This allows to enforce separation of concerns depending on what and how should be achieved for a particular stage. For example, for the Monitor stage, different monitoring techniques, like active and proactive, can be used in the different parts of the target system, and each of these might need to be independently self-managed. The same applies to the Analyze (Solution Domain) stage in which specific feedback loops can be associated with the different types of tests, like integration or regression testing, that need to be performed on a particular architectural configuration. In parallel with testing, one could also envisage another feedback loop in which probabilistic model checking is used to analyze whether an architectural configuration is able to satisfy the system properties. The individual outcomes of these meta-loops would be fed into the respective stage of the main MAPE-K loop, and the collective outcome from the meta-loops could be used as evidence for supporting the decisions associated with a given stage.

As an example of a meta-loop, we could associate with the Analyze (Problem Domain) stage a meta-loop responsible for self-diagnosis [ 13 ]. Diagnosis is responsible for the localization of faults, which is usually linked to the decision of whether to trigger adaptation. Although diagnosis is usually associated with the Monitor and Analyze stages of the main feedback control loop, its management for the sake of autonomy could be allocated to a meta-loop. In terms of a new meta-loop for self-diagnosis, the Monitor stage would collect data related to architectural configuration, and the operational state of the architectural elements. The Analyze (Problem Domain) stage would localize the faulty components, forward this information to the main feedback control loop, and evaluate whether the confidence levels, or accuracy [ 14 ], are within acceptable threshold. In case the confidence level is below an acceptable threshold, adaptation of self-diagnosis should be triggered. The identification of alternative diagnosis techniques and/or the level and type of monitoring should be the responsibility of Analyze (Solution Domain) stage. The Plan (Decision Maker) stage would select the best configuration regarding techniques and monitoring probes to be deployed, and Plan (Plan Synthesis) stage would generate the plan for deploying a new diagnosis. Finally, when processing the plan, the Execute stage of the meta-loop would notify the Monitor stage of the main loop about the new monitoring settings.

14.2.2 Uncertainty

Uncertainty means different things for the different fields of scientific research. In this chapter, we define uncertainty as “ any deviation from the unachievable ideal of completely deterministic knowledge of the relevant system ” [ 15 ]. Uncertainty usually takes two views [ 7 , 9 ]. First, aleatory , or stochastic uncertainty, which is associated with the natural variability of physical processes. Second, epistemic , or state-of-knowledge uncertainty, which is associated with the uncertainties in knowledge of these processes. A feedback control loop is basically designed to reduce the effects of uncertainty [ 16 ]. These can be related to either imperfections in the models and techniques being used, or disturbances and noise associated with the variables of those models and techniques, which are examples of epistemic and aleatory uncertainty, respectively.

The sources of uncertainty, associated with a stage of the MAPE-K loop can either be internal or external to the stage. Internal sources are associated with the lack or insufficiency of information, and they are related to internal factors that the stage might exert partial control. Internal sources are associated with epistemic type of uncertainties. External sources arise from the environment of a particular stage, and they are related to external factors that the stage has no control. External sources are associated with both epistemic and aleatory type of uncertainties.

Sources of uncertainty might impact the stages of a feedback control loop either explicitly or implicitly. Explicit impact of uncertainty occurs when the uncertainty source is clearly expressed or observable. Implicit impact of uncertainty occurs when the uncertainty source is implied though not directly expressed, it might be inherent in the nature of the interactions amongst the stages of the control loop.

The flow of the impact that uncertainty sources might have on a stage of a feedback control loop can either be downstream or upstream. The downstream flow of the impact follows the usual direction in the processing of the MAPE-K loop stages: initial stages of the feedback loop might affect later stages. The upstream flow of the impact follows the counter-direction in the processing of the MAPE-K loop stages: later stages of the feedback loop might affect initial stages.

14.2.3 Uncertainty Propagation in the MAPE-K Loop

In order to demonstrate the impact of the uncertainty propagation in the MAPE-K loop, we present in the following, based on the diagram of Fig. 14.2 , some illustrative cases.

f14-02-9780128028551

Fig. 14.2 Examples of uncertainty propagation in the MAPE-K loop.

Internal uncertainties, associated with a particular stage of the MAPE-K feedback control loop, can be propagated to the other stages of the loop. These uncertainties are usually of epistemic nature, and are related to types of techniques used and the parameters of those techniques. In the context of this chapter, the focus is the Analyze (Problem Domain) stage whose outcome is related to the decision of whether to adapt or not.

Regarding the propagation of external uncertainties, there are several variants amongst the stages of the MAPE-K loop, for example: explicit and implicit upstream propagation, and explicit downstream propagation. The downstream propagation of uncertainties follows the normal flow of the MAPE-K loop stages. As an example, depending how uncertainties are handled at the Monitor stage, these may propagate to the Analyze (Problem Domain) and affect decisions to be made at this stage. The key distinction between explicit and implicit upstream propagation is the fact that in implicit propagation, techniques associated with a particular stage might not be aware of changes elsewhere that may affect their processing. An example for this case is shown in Fig. 14.2 in which the Plan might change the configuration of the target system in such a way that indirectly affects Analyze (Problem Domain). For instance, the new configuration may contain a software component from which less monitoring data is available. Concerning the explicit propagation, there is a direct relation between the changes that occur elsewhere in the MAPE-K loop and the uncertainties associated with a particular stage. For example, in the diagram of Fig. 14.2 , the deployment of a plan might imply changes in the monitoring settings for a particular configuration, which then might affect the uncertainties related to Analyze (Problem Domain). Similarly, the Plan stage may not be able to identify a configuration that can be deployed considering the goals of the system, and what it does is to change those goals. For instance, the threshold associated with the trigger of adaptation might need to be lowered if a deployment cannot be found.

Uncertainties associated with the different stages of a feedback control loop need to be handled in order to optimize the quality of the services delivered by the system. In terms of the MAPE-K loop, uncertainties that are associated with its different stages are predominately handled at the Plan stage by the decision maker. However, regarding the MAPE-K loops with more complex configurations [ 17 ], such as the one presented above, the uncertainty associated with a given stage needs to be identified and handled at that stage of the feedback loop. The current perspective on software engineering for self-adaptive systems lacks this notion of staged decisions as a manner in which the feedback control loop handles uncertainty. Hence, the challenge being put forward in this chapter is the identification and handling of uncertainty as a function of the stages of the feedback control loop.

In summary, the motivation for dealing with uncertainty in a staged way in the MAPE-K loop is its similarity compared with error propagation in software architectures. Although individual components may work correctly, when these are placed in an architectural configuration, components may fail due to dependencies and relationships with the other components of the configuration [ 18 ]. The claim being made regarding uncertainties in a feedback control loop is that, although uncertainty needs to be identified and handled at each stage of the control loop, there is also the need to deal with uncertainty in a collective way because of the explicit and implicit dependencies between the different stages of the control loop.

14.3 Methodology

Uncertainty is embedded in every facet of adaptation, and the goal of this work is to show how to identify and handle uncertainties in order to mitigate the impact of its propagation in a feedback control loop, like the MAPE-K loop. First we need to identify, in the context of a particular stage of the MAPE-K loop, the sources of uncertainty that may affect the stage. Then, according to the uncertainties and the needs of the stage, techniques need to be identified for handling uncertainty. Even if uncertainty is handled in a staged way, we need to consider the propagation of uncertainty. In the context of a feedback control loop, uncertainty propagation refers to the way in which the uncertainty associated with other stages of the feedback loop might impact the uncertainty of a given stage. The proposition being made in this chapter is to use error propagation techniques as an inspiration for analyzing uncertainty propagation in the MAPE-K loop. 1

14.3.1 Identifying Sources of Uncertainty

In order to identify the potential sources of uncertainty in the MAPE-K loop, we have used Structured Analysis for Requirements Definition (SADT) [ 20 ] for describing the stages of the MAPE-K loop in terms of their properties : input and output data, control data, and mechanisms. Based on these properties, the identification of uncertainties aims to localize the sources of uncertainty affecting a given stage, which can either be internal or external. Internal sources of uncertainty are associated with those properties that the stage has some control, like mechanisms. Examples of mechanisms are the techniques being used by a stage. On the other hand, external sources are associated with those properties that the stage has no control, such as, input and control data. The control data, for example, may refer to goals (refinement/transformation of the goals associated with the system), constraints and assumptions associated with the stage. Finally, the handling of uncertainties aims to manipulate those properties that can be controlled by the stage. Decision making is one of the tools to handle uncertainty in which the sources of uncertainty are transformed by the decisions (i.e., the consequence of decisions may either be propagated or uncertainty mitigated).

For exemplifying how uncertainties can be identified and handled at a given stage of the MAPE-K loop, in the following, we refer once again to the self-diagnosis meta-loop previously described, and in particular, to the Analyze (Problem Domain) stage of that meta-loop. As input data, we identify the monitoring data related to the architectural configuration of the target system, such as, the operational state of its architectural elements, and the environment of the target system. For control data, there is the expected quality (confidence levels/accuracy) of the diagnosis, and constraints related to time and resources. As mechanisms, we identify the technique(s) that can be used to perform diagnosis. Finally, for output data, we expect to obtain a list of potential faulty components with confidence levels.

Regarding the identification of uncertainties, for instances, external sources are associated with the quality of the monitoring data, which might be associated with missing data, or not enough data, or erroneous data, etc. On the other hand, internal sources are associated with the parameters of the diagnosis algorithm being used, or the algorithm being employed.

14.3.2 Handling Uncertainty

Concerning the handling of uncertainties, and taking as an example self-diagnosis, uncertainties could be mitigated by: changing the algorithm being used in case assumptions cease to hold, changing the parameters of the algorithm, or employing Monte Carlo simulations to the external sources of uncertainty. In the context of the self-diagnosis meta-loop example, another measure for handling uncertainty would be for the self-diagnosis to request the Monitor stage of the main loop to change its monitoring settings, in order for the self-diagnosis to receive more detailed information about the state of the target system. Another technique for handling uncertainties is that of decision making in which uncertainties are transformed. As already mentioned, the basis of decision making regarding software systems at the architectural level is the trade-off analysis of alternative architectural configurations in terms of their quality attributes—the decision takes place usually at the Plan stage of the MAPE-K control loop. In this case, the inputs to the decision making are the quality attributes, and their confidence levels, associated with the alternative architectural configurations, including the operational status of their components and connectors. Uncertainties associated with the quality attributes might lead to the decisions that might undermine the proper operation of the system. For example, if self-diagnosis identifies the wrong faulty component with a false degree of confidence, this might not trigger adaptation that would reconfigure the system in order to fix the fault localized by the self-diagnosis.

14.3.3 Analyzing Propagation of Uncertainty

Associated with each of the stages of MAPE-K loop, there are propagated uncertainties that need to be handled in order to optimize the quality of the services delivered by the system. Uncertainty propagation refers to the effects that property uncertainties of other stages might have upon the properties of a given stage. A method for analyzing uncertainty propagation between the stages of a feedback control loop that can be exploited is that of analysis of error propagation 2 between software components [ 21 ], which has been proven to be influential for the estimation of system reliability. The same rationale can be applied to uncertainty propagation through the stages of the MAPE-K loop: external sources of uncertainty can affect the processing of a given stage to the point that the outcome of the stage might reflect how uncertainty is handled at that stage. More specifically, error propagation probability [ 21 ] from component Comp A to component Comp B , that are tied through the connector Conn X , is defined by the function Prob ([ Comp B ]( x )≠[ Comp B ]( x′ )| x ≠ x′ ), where [ Comp B ] denotes the function of component Comp B , and x is an element of the connector Conn X from Comp A to Comp B . This property expresses the probability that a component may propagate an erroneous message (uncertainty) when it receives as input an erroneous message (uncertainty).

Similarly, if we consider the stages of a feedback control loop to be like software components (and, thus, their associated decision making process like the function of a component), the uncertainty propagation probability from stage Stage A to stage Stage B may also be rooted on the function Prob ([ Stage B ]( x )≠[ Stage B ]( x′ )| x ≠ x′ ), where x is an uncertainty source of input data received from stage Stage A to stage Stage B . In other words, this function may be used for expressing the ability of the stage Stage B to mitigate uncertainty received form Stage A ; therefore, it may give an assessment of the robustness of the decisions made by Stage B with regard to the uncertainty propagated from the stage Stage A . In fact, the propagation of uncertainty in a feedback control loop refers to the way in which the uncertainty associated with other stages of the feedback loop might impact the uncertainty of a given stage.

In this chapter, the propagation of uncertainty is described in the context of the stages of the MAPE-K control loop, however uncertainties associated with properties of the target system and its environment should also be taken into account depending on what the Monitor is able to observe. These sources of uncertainty should also have an impact on the runtime trade-offs analysis of the decision making not only in terms of the values of the quality attributes, but also on how the trade-off analysis is performed. For example, depending on the level of uncertainty associated with an environmental property, a different technique for trade-off analysis might need to be deployed.

14.4 Case Study: Identification of Uncertainties

In this section, we demonstrate the process of identifying sources of uncertainty in the MAPE-K loop in the context of a case study.

14.4.1 Smartphone Application

In the following, we describe an example (inspired by [ 22 ]) that we devised for illustrating how accurate analysis of uncertainty propagation may influence the estimation of system reliability. In this example, a smartphone user requires the latest news from a service provider (here called Multimedia Service ). The news includes text and topical videos available in MPEG2 format. Fig. 14.3A illustrates the software architecture of the system, essentially describing dependencies between components of the system.

f14-03-9780128028551

Fig. 14.3 Smartphone application example. (A) Software architecture. (B) Hardware architecture.

It is a client/server system, where the Client is connected via wireless network to the Multimedia Service . The Transcoding component adapts the video content for the smartphone format. The Compression component adapts the news content to the wireless link. The Merging component integrates the text with the video stream for the limited smartphone display. The Locations Database and the Translation components, are used, respectively, for (i) collecting information about the localization of the cells used for user location, and (ii) adapting the text of the smartphone format for showing a user location map.

We consider three services that the system is able to provide. The first service, S 1 , provides news in textual format, the second one, S 2 , provides news with both textual and video content, and the third service, S 3 , provides a user location map. Fig. 14.3B schematically depicts the hardware architecture of the deployment platform.

14.4.2 Identifying Sources of Uncertainty

For the purpose of the exercise, the goal of the feedback control loop is to control the architectural configuration of the software, and its deployment, in order to maintain the system reliability above a certain threshold (e.g., R ≥ 0.99). In the following, for each of the stages of the MAPE-K loop, we identify the properties associated with each of the stages, and from these properties, we identify potential sources of uncertainty that may affect the stage.

Monitor stage

This stage monitors the system software architecture, and its deployment on hardware nodes.

Properties

As input data, probes will monitor the operational state of the software components, the hardware nodes and their links, and collect information regarding component invocations. For control data, there is the expected quality (confidence levels/accuracy) of the monitoring data, and constraints related to time and resources. As mechanisms, we identify the technique(s) that can be used to monitoring (e.g., dynamic or static). Finally, as output data, monitoring data (e.g., software component invocations) is obtained from probes or gauges to be used by the other stages of the MAPE-K loop.

Sources of uncertainty

One possible external source of uncertainty is associated with the data coming from the probes, whose quality depends on the quality of the probes. Another possible source is associated with the monitoring settings, these can be changed during runtime, which might affect the selection of probes to be used. Internal sources of uncertainty are related to the techniques employed for managing the monitoring (e.g., static, dynamic, or proactive).

Analyze (Problem Domain) stage

This stage estimates the reliability of the deployed software architecture to decide whether adaptation should be triggered.

Properties

As input data, we identify the monitoring data related to the architectural configuration of the target system (e.g., the operational state of its architectural elements), and the environment of the system (e.g., operational state of the hardware nodes). The control data is related to the reliability estimation threshold (e.g., R ≥ 0.99) that if violated should trigger adaptation. The mechanisms are related to the technique(s) that can be used to estimate reliability. The output data is the trigger that starts adaptation, and to which a confidence level is associated.

Sources of uncertainty

External sources of uncertainty are associated with the quality of the monitoring data (e.g., missing data, not enough data, erroneous data, etc.). On the other hand, internal sources of uncertainty are associated with the differences in the technique being used to estimate reliability, and the inaccuracies (e.g., due to simplifying assumptions) that may affect the parameters of those techniques.

Analyze (Solution Domain) stage

This stage identifies a set of alternative system configurations that are able to satisfied the specified reliability constraint. These system configurations consist of alternative software architecture configurations and their deployment into hardware nodes.

Properties

The input data comprises a set of available architectural elements and hardware nodes, monitoring data related to the architectural configuration of the target system, and monitoring data related to the environment of the system. The control data specifies the expected quality (confidence levels/accuracy) of the reliability estimation. The mechanisms are related to the technique(s) that can be used to estimate reliability. Finally, the output data will consist of a list of alternative system configurations, with their respective reliability estimations and confidence levels.

Sources of uncertainty

External sources of uncertainty are associated with the quality of the monitoring data (e.g., missing data, not enough data, erroneous data, etc.), and model drift (i.e., accuracy of the models representing the system configuration). Internal sources of uncertainty, similar to the previous case, are associated with the different techniques being used to estimate reliability, and the inaccuracies (e.g., due to simplifying assumptions) that may affect the parameters of those techniques.

Synthesis (Decision Maker) stage

This stage selects the best system configuration depending on the reliability estimation and confidence levels associated with each of the configurations, plus any other criteria (e.g., cost or other non-functional requirement) that might influence the selection.

Properties

The input data consists of a list of alternative system configurations with their respective attributes for the decision making, including their estimated reliability with confidence levels, and any other data related to the target system or the environment that might affect the decision making. The control data are the criteria for selecting the best system configuration, which are related to the system non-functional requirements. The mechanisms are related to the technique(s) that can be used for decision making. Finally, the output data will consist of a single system configuration that will be deployed.

Sources of uncertainty

External sources of uncertainty are associated with the quality of the monitoring data related to the attributes that would be used in the decision making. Internal sources of uncertainty are associated with the differences in the technique being used for decision making, and the inaccuracies that may affect the parameters of those techniques.

Synthesis (Plan Synthesis) stage

This stage generates the plan that will manage the deployment of the selected system configuration.

Properties

The input data comprises the selected system configuration that will be deployed, the operational data regarding availability of software components and hardware nodes, and the actual availability of resources. The control data is related to the system and component constraints that need to be enforced while deploying the system, which might involve its reconfiguration. The mechanisms are techniques to be used in the generation of the plans, and different techniques might generate different plans. The output data is a plan responsible for deploying the selected system configuration.

Sources of uncertainty

The operational data regarding availability of software components and hardware nodes are the main external sources of uncertainty. Internal sources of uncertainty are associated with the different techniques employed for generating the plans, and how those techniques are parameterized.

Execute

This stage is essentially responsible for executing the plan in order to deploy the new system configuration.

Properties

As input data, this stage receives the plan that would manage the deployment of the system configuration, i.e., reconfigure the software architecture and deployment of architectural elements into the hardware nodes. The control data is related to system constraints regarding time for deployment. The mechanisms are associated with the engines responsible for the execution of the plans, such as, workflow management systems. The output data are the commands sent to the effectors for modifying the configuration of the target system.

Sources of uncertainty

The external sources of uncertainty are associated, for example, with the ability of the effectors in carrying out the modifications, and whether software components and hardware nodes remain available during reconfiguration.

14.5 Related Work

It has been claimed that the identification of uncertainty sources is fundamental for obtaining correct adaptation decisions, and trustworthy assessment of the quality of the deployed software [ 4 ]. It has been recognized the importance of control theory principles to reason effectively about uncertainty of self-adaptive systems [ 6 ]. It has also been recognized that uncertainty can only be controlled by making it explicit [ 5 ], and by considering it as a first-class concept. However, in practice, the staged handling of uncertainty is usually implicit, such as, in the self-optimization to reduce energy consumption (e.g., [ 23 ]), and in performance-tuning and resource-provisioning scenarios (e.g., [ 24 ]).

A quite extensive list of uncertainty sources has been identified for self-adaptive systems (see, e.g., [ 7 – 9 ]). Since not all sources of uncertainty have similar characteristics, this requires the usage of the different techniques for identifying and handling uncertainties [ 7 ]. There are several approaches that cater for both types of uncertainty (i.e., classical distinction between epistemic and aleatory uncertainty) [ 9 , 25 , 26 ], as there are approaches that are able to handle specific sources of uncertainty (i.e., problem-state identification, the strategy selection, and strategy success or failure [ 4 ]).

Handling uncertainty in the feedback control loop also requires coordination since the loop itself might be also a source of uncertainty [ 7 ]. Moreover, this coordination might not be restricted to the typical four stages of the MAPE-K loop since simple MAPE-K loops may not be appropriate to deal with more complex adaptations [ 27 ], where MAPE-K loops can incorporate different kinds of coordination [ 28 ]. Other approaches for handling uncertainty, instead of focusing on the stages of the MAPE-K loop, have proposed runtime modeling techniques for updating the knowledge data of a control loop, together with an error handling loop on the top of the main loop [ 8 ].

There are several contributions in the context of self-adaptive software systems on decision making under uncertainty. Bayesian decision theory has been proposed for capturing the uncertainty associated with the satisfaction of non-functional requirements (NFRs) given a set of design alternatives [ 11 ]. Moreover, the exploration of early architectural decisions is also supported by using fuzzy mathematical methods [ 29 ], Monte Carlo simulation [ 30 ], and game theoretic approaches [ 31 ]. Regarding the latter contribution, the outcome of handling uncertainties in a staged way could be fed into a decision maker that would be responsible for performing runtime trade-off analysis for satisfying the system requirements and optimize the quality of services under some cost constraints, for example. These, and other contributions, have mainly focused on analyzing the impact of uncertainties related to input parameters when evaluating architectural alternatives, without considering the joint analysis of sources of uncertainty and their propagation.

Several methods have been introduced to estimate the propagation of the uncertainty on the quality of a system (e.g., [ 32 , 33 ]). These methods typically address propagation of uncertainties associated with input parameters of architecture-based software quality models, without explicitly considering the propagation of the uncertainty through the architectural elements (e.g., components or services). Examples of such methods include, the analysis of the propagation of parameter uncertainties (e.g., components reliabilities) regarding reliability estimation [ 32 ], and the analysis of model-based performance of software architectures under uncertainty of input parameters (e.g., workload, operational profile, and resource demand of services) [ 33 ].

14.6 Conclusions

The claim being made in this chapter is that, in self-adaptive software systems, depending on the feedback control loop, uncertainty should be handled according to the complexity of the control loop (whether it is connected with other control loops) and its stages (the number of features associated with a given stage). In simple control loops, just like the traditional four stages of the MAPE-K control loop, uncertainty can be handled in a single place, like the Plan stage. However, in more complex feedback control loops, which might embody complex stages, which on their own might consist of several feedback control loops (i.e., meta-loops), there is a need to identify and handled uncertainty at the different stages of the feedback control loop.

The ideas presented in this chapter, to the best of our knowledge, are a first attempt to investigate the propagation of uncertainty in feedback control loops. For that, we have proposed a method for identifying uncertainties at the stage level, and put forward error propagation analysis as a method for analyzing the propagation of uncertainties in a MAPE-K control loop. The goal of such approach is to maximize the utility of the services to be delivered by the system, which can be achieved, during runtime, by architectural trade-off analysis of the system quality attributes at any stage of the MAPE-K control loop.

In terms of future work, there are several open challenges, and in the following, we identify three of these challenges. First, considering that self-adaptive systems can change themselves, one should expect that sources of uncertainty to change during runtime, and this requires dynamic mechanisms that continuously monitors uncertainty sources, and finds solutions to better handle them. Moreover, the identification of sources of uncertainty, either explicit or implicit, is still an analytical human-based activity, and finding automated tools for this activity is a major challenge. Second, uncertainties associated with each quality attribute should be handled in a specific way, which requires a wide of techniques that need to be made available at runtime. The challenge here is to provide the appropriate support for controller to select autonomously the appropriate technique depending on the identified uncertainty. Finally, the third challenge is related to the ability of the controller to self-manage the orchestration of the activities related to the identification and handling of uncertainties. This should be a runtime activity supported by a wide range of techniques and oracles that should be able to identify where in the feedback control loop trade-off analysis take place, analyze their role and impact, and find ways of improving decision making by providing more accurate quality attributes.

References

[1] Kephart J.O., Chess D.M. The vision of autonomic computing. Computer. 2003;36(1):41–50.

[2] Chen B., Peng X., Yu Y., Zhao W. Uncertainty handling in goal-driven self-optimization—limiting the negative effect on adaptation. J. Syst. Softw. 2014;90:114–127.

[3] Gonzalez-Herrera I., Bourcier J., Daubert E., Rudametkin W., Barais O., Fouquet F., Jezequel J.-M. Scapegoat: an adaptive monitoring framework for component-based systems. In: Proceedings of the 2014 IEEE/IFIP Conference on Software Architecture (WICSA). 2014:67–76.

[4] Cheng S., Garlan D. Handling uncertainty in autonomic systems. In: Proceedings of the ASE 2007 International Workshop on Living With Uncertainty, Atlanta, GA. 2007.

[5] Autili M., Cortellessa V., Di Ruscio D., Inverardi P., Pelliccione P., Tivoli M. Eagle: engineering software in the ubiquitous globe by leveraging uncertainty. In: Proceedings of the 19th ACM SIGSOFT Symposium and the 13th European Conference on Foundations of Software Engineering, ESEC/FSE ’11. New York, NY: ACM; 2011:488–491.

[6] Brun Y., Marzo Serugendo G., Gacek C., Giese H., Kienle H., Litoiu M., Müller H., Pezzè M., Shaw M. Engineering self-adaptive systems through feedback loops. In: Berlin, Heidelberg: Springer-Verlag; 2009:48–70. Software Engineering for Self-Adaptive Systems. .

[7] Esfahani N., Malek S. Uncertainty in self-adaptive software systems. In: Software Engineering for Self-Adaptive Systems II. Berlin, Heidelberg: Springer; 2013:214–238. vol. 7475 of Lecture Notes in Computer Science. .

[8] Giese H., Bencomo N., Pasquale L., Ramirez A., Inverardi P., Wätzoldt S., Clarke S. Living with uncertainty in the age of runtime models. In: Cheng B., Amann U., Bencomo N., France R., eds. [email protected]. Berlin, Heidelberg: Springer; 2014:47–100. vol. 8378 of Lecture Notes in Computer Science. .

[9] Perez-Palacin D., Mirandola R. Uncertainties in the modeling of self-adaptive systems: a taxonomy and an example of availability evaluation. In: Proceedings of the Fifth ACM/SPEC International Conference on Performance Engineering, ICPE 14. New York, NY: ACM; 2014:3–14.

[10] Whittle J., Sawyer P., Bencomo N., Cheng B.H.C., Bruel J. RELAX: a language to address uncertainty in self-adaptive systems requirement. Requir. Eng. 2010;15(2):177–196.

[11] Bencomo N., Belaggoun A., Issarny V. Dynamic decision networks for decision-making in self-adaptive systems: a case study. In: Proceedings of the Eighth International Symposium on Software Engineering for Adaptive and Self-Managing Systems, SEAMS ’13. IEEE Press; 2013:113–122.

[12] Ghezzi C., Pinto L.S., Spoletini P., Tamburrelli G. Managing non-functional uncertainty via model-driven adaptivity. In: Proceedings of the 2013 International Conference on Software Engineering, ICSE ’13. Piscataway, NJ: IEEE Press; 2013:33–42.

[13] Casanova P., Garlan D., Schmerl B., Abreu R. Diagnosing architectural run-time failures. In: Proceedings of the Eighth International Symposium on Software Engineering for Adaptive and Self-Managing Systems, SEAMS 2013. Piscataway, NJ: IEEE Press; 2013:103–112.

[14] Casanova P., Garlan D., Schmerl B., Abreu R. Diagnosing unobserved components in self-adaptive systems. In: Proceedings of the Ninth International Symposium on Software Engineering for Adaptive and Self-Managing Systems, SEAMS 2014. New York, NY: ACM; 2014:75–84.

[15] Walker W., Harremoes P., Rotmans J., van der Sluijs J., van Asselt M., Janssen P., von Krauss M.K. Defining uncertainty: a conceptual basis for uncertainty management in model-based decision support. Integr. Assess. 2003;4(1):5–17.

[16] Aström K.J., Wittenmark B. Adaptive Control. Reading, MA: Addison-Wesley; 1995.

[17] da Silva C.E., de Lemos R. Dynamic management of integration testing for self-adaptive systems. In: LADC Workshop on Dependable in Adaptive and Self-Managing Systems (WDAS), Rio de Janeiro, RJ, Brazil. 2013:3–10.

[18] Wallnau K., Stafford J.A. Dispelling the myth of component evaluation. In: Norwood, MA: Artech House, Inc.; . Building Reliable Component-Based Software Systems. 2002;vol. 8.

[19] Avizienis A., Laprie J.-C., Randell B., Landwehr C. Basic concepts and taxonomy of dependable and secure computing. IEEE Trans. Dependable Secure Comput. 2004;1(1):11–33.

[20] Ross D.T., Schoman K.E. Structured analysis for requirements definition. IEEE Trans. Softw. Eng. 1977;3(1):6–15.

[21] Abdelmoez W., Nassar D., Shereshevsky M., Gradetsky N., Gunnalan R., Ammar H., Yu B., Mili A. Error propagation in software architectures. In: Proceedings of the International Symposium on Software Metrics. 2004:384–393.

[22] Alrifai M., Risse T. Combining global optimization with local selection for efficient QoS-aware service composition. In: Proceedings of the of the 18th International Conference on World Wide Web, WWW ’09. New York, NY: ACM; 2009:881–890.

[23] Druilhe R., Anne M., Pulou J., Duchien L., Seinturier L. Components mobility for energy efficiency of digital home. In: Proceedings of the 16th International ACM Sigsoft Symposium on Component-Based Software Engineering, CBSE ’13. New York, NY: ACM; 2013:153–158.

[24] Litoiu M., Mihaescu M., Ionescu D., Solomon B. Scalable adaptive web services. In: Proceedings of the International Workshop on Systems Development in SOA Environments, SDSOA ’08. New York, NY: ACM; 2008:47–52.

[25] Chen X., Park E.-J., Xiu D. A flexible numerical approach for quantification of epistemic uncertainty. J. Comput. Phys. 2013;240:211–224.

[26] Helton J.C., Johnson J.D., Oberkampf W.L., Sallaberry C. Representation of analysis results involving aleatory and epistemic uncertainty. Int. J. Gen. Syst. 2010;39:605–646.

[27] Vromant P., Weyns D., Malek S., Andersson J. On interacting control loops in self-adaptive systems. In: Proceedings of the Sixth International Symposium on Software Engineering for Adaptive and Self-Managing Systems, SEAMS ’11. New York, NY: ACM; 2011:202–207.

[28] Weyns D., Schmerl B., Grassi V., Malek S., Mirandola R., Prehofer C., Wuttke J., Andersson J., Giese H., Gschka K. On patterns for decentralized control in self-adaptive systems. In: Software Engineering for Self-Adaptive Systems II. Berlin, Heidelberg: Springer; 2013:76–107. vol. 7475 of Lecture Notes in Computer Science. .

[29] Esfahani N., Malek S., Razavi K. Guidearch: guiding the exploration of architectural solution space under uncertainty. In: Proceedings of the 2013 International Conference on Software Engineering, ICSE’13. Piscataway, NJ: IEEE Press; 2013:43–52.

[30] Letier E., Stefan D., Barr E.T. Uncertainty, risk, and information value in software requirements and architecture. In: Proceedings of the 36th International Conference on Software Engineering, ICSE 2014. New York, NY: ACM; 2014:883–894.

[31] Merad S., de Lemos R., Anderson T. A game theoretic solution for the optimal selection of services. In: Cardellini V., Casalicchio E., Branco K.R.L.J.C., Estrella J.C., Monaco F.J., eds. Performance and Dependability in Service Computing: Concepts, Techniques and Research Directions. Hershey, PA: IGI Global; 2012:172–188.

[32] Goseva-Popstojanova K., Kamavaram S. Assessing uncertainty in reliability of component-based software systems. In: Proceedings of the 14th International Symposium on Software Reliability Engineering, ISSRE. 2003:307–320.

[33] Trubiani C., Meedeniya I., Cortellessa V., Aleti A., Grunske L. Model-based performance analysis of software architectures under uncertainty. In: Proceedings of the Ninth International ACM Sigsoft Conference on Quality of Software Architectures. New York, NY: ACM; 2013:69–78.


1 Although uncertainty propagation and error propagation are used interchangeably in the scientific literature, the interpretation taken in this chapter for error propagation is that from fault tolerance [ 19 ].

2 Error propagation in fault tolerance refers to the successive process of transforming an error into other errors in a given component or between components, until they are either mitigated or possibly affecting the system output [ 19 ].