Goal Model Evaluation Based on State-Space Representation

Goal models have been used for the last two decades in various disciplines to represent business, organizations, and individuals’ objectives. Several methodologies and standards have emerged, and various goal analysis and evaluation algorithms have been introduced serving different sectors, including decision support. In contrast to most researches which are based mainly on simulation to predict the satisfaction levels of final goals, this research proposes a new framework for evaluating goal models based on the state-space representation that is used extensively in control systems. This new approach brings the theories and literature of state-space representation of systems to goal models, opening a new direction for using its available mature techniques and tools, for goal model analysis and evaluation. A hypothetical goal model, which can be used for policymaking after the COVID-19 pandemic, is presented as an example of how the proposed framework can be used, and the results that can be obtained.

Since their introduction in the early 90s, goal models have been used in various disciplines, especially software requirements analysis [1]- [3], [33]. Approaches have been developed to identify possible requirement conflicts [28] and to evaluate whether particular conditions can eventually lead to the satisfaction of specific requirements [29]. They have also been used to evaluate alternative system designs [12]. Goal models have also been used for business process reengineering of pre-existing processes for achieving performance improvements [4], [23], [31], [32]. A software development methodology has also been built around goal modeling [6]. Other applications of goal models in autonomous agent-based systems can be found in [5], [25]; also, other examples for applications in decision making are described in [19], [24].
A goal can be described as a desirable condition in the world, and the goal model is a graph or a language that represents the relationship between some goals from some viewpoint. Goals may be formulated at different abstraction levels, ranging from high-level strategic concerns down to low-level technical concerns [28].
In the early 90s, while focusing entirely on software requirements engineering, KAOS (Knowledge Acquisition in autOmated Specification) was the first framework featuring The associate editor coordinating the review of this manuscript and approving it for publication was Fangfei Li . goal models that gained wide popularity [1]. The framework introduced the notion of goal reduction in which a goal can be refined by other goals through AND/OR links. For an intermediate goal in the model, going up in the model can answer the question, ''why do we have this goal?'' while going down answers ''how can we reach this goal?'' i * framework emerged in 1995 by Eric Siu-Kwong Yu in 1995 in his Ph.D. thesis [31]. It used the notion of the intentional element as a hypernym for goal, task, resource, and softgoal, which can be defined as a state in the world desired to be achieved without sharply defined criteria. In addition to the ''how'' and ''why'' dimensions in goal models, it introduced a new dimension, ''who'', and presented the intentional dependency among stakeholders in the system. i * influenced NFR (Non-functional Requirements Framework) and formed a basis for other frameworks and methodologies like Tropos [6], GRL (Goal-oriented Requirements Language), and iStar 2.0 [9], which represents the core concepts of i * . The evolution of the goal model approaches and frameworks are graphically illustrated in [10]. GRL is a part of the URN, which became an ITU standard for elicitation, analysis, specification, and validation of requirements [15]. Several years later, Techne [16] proposed models supporting optional goals and preferences. More elaborate discussions about goal modeling methodologies can be found in [10], [13], [17]. VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ Goal models are promising in the field of strategic planning and public policy decision support, where a goal model can serve as the depiction of policymaker understanding of how to achieve his final goals [19], [24]. Figure 1 illustrates an example goal model that policymakers can think to handle the coronavirus COVID-19 pandemic. In this figure, G 7 is the final, or root goal in the model, and all other goals contribute to each other and finally contribute to it. G 1 , G 3 , and G 4 are leaf goals that no other goals contribute to them. Goals may contribute positively or negatively to other goals. For example, G 6 contributes positively to G 8 , while G 9 contributes back negatively to G 6 .
A Policymaker may need to estimate which leaf goals need attention first (consequently, the required fund) for the final goal to be satisfied as early as possible. These estimates can be obtained from goal model evaluation techniques. Goal model evaluation techniques can be used to evaluate satisfaction levels of root goals from satisfaction levels of leaf goals. Some other techniques work top-down, trying to find an initial set of satisfaction levels of leaf goals that can lead to the satisfaction of root goals.
Qualitative approaches for goal model evaluation assign initial labels representing the satisfaction level to leaf goals [8]. These labels are then propagated upwards involving new labels to be assigned to the next goals directly, or in case of conflicts, requiring human interaction to resolve. In [11], the authors introduced a similar forward propagating algorithm adding the deniability of the goal as a second independent dimension to the labels assigned to goals, removing the chance of conflict, and the requirement for human interaction during the execution of the algorithm. Qualitative approaches for goal model evaluation yield coarse values that cannot be satisfactory when more fine-grained outputs are required. In [18], a quantitative approach for evaluating KAOS-based goal models was introduced based on a probabilistic approach to represent partial satisfaction of goals. The authors in [11] extended their qualitative approach and provided a quantitative version of their algorithm. Quantitative approaches for goal model evaluation based on fuzzy logic have been presented in [7], [27]. Further analysis of various goal model reasoning techniques is presented in [14].
Tools have been developed for the implementation of various satisfaction evaluation methodologies and algorithms. Among these tools is jUCMNav [26], which is a graphical editor and analysis tool for URN. It is open-source and based on the Eclipse platform. It supports the qualitative or quantitative evaluation of GRL models. jUCMNav has also been used in other research efforts as a platform for implementing other evaluation algorithms and adding specific features, e.g., [2], [22]. OpenOME is another open-source Eclipsebased graphical tool for modeling and analysis of requirements using i * concepts. Another notable tool is CGM-Tool, which supports modeling and reasoning on constrained goal models, is written in Java, and is also based on Eclipse [20]. Most tools are dedicated to requirements engineering and have been developed in the context of specific methodology and model type. They require adaptations to be suitable for use in other techniques.
205112 VOLUME 8, 2020 The mentioned satisfaction analysis techniques consider only what value the final goal will eventually take, ignoring the time profile of satisfaction levels of both leaf goals (the inputs) and the root goal (the output). Additionally, these techniques ignore the nature of specific goal satisfaction dynamics, e.g., the required time for goals to be satisfied after their precedents were fully satisfied.
This paper proposes a new methodology for goal model evaluation based on the state-space representation model that has extensive uses in control engineering. The proposed methodology allows using time series for the inputs to leaf goals, and obtain the time series of the satisfaction level of the final goal, which is the outcome from goal model evaluation. Specific goal dynamic characteristics (in terms of goal satisfaction latency) for specific goals can also be defined and considered, bringing more accurate and realistic results. This way, we can extend what-if scenarios into what and when, which can be useful in decision making.
A tool has also been implemented for graphical editing of goal models using i * goal model conventions. The tool can also detect leaf goals allowing graphical manipulation of their satisfaction input levels and providing an instant visualization of the time profile of the satisfaction level of the output root goal. For the execution of the state-space model, the tool uses the signal module of SciPy [30], the free and opensource, cross-platform, widely available Python library for scientific and technical computing. This library was introduced around 2001 and is still actively maintained and used in various scientific and technical areas.
Section II presents a brief introduction to the state-space representation model of systems and its rationale. Section III describes the proposed methodology, the principles behind, and the notion of goal model fusion. The goal model fusion algorithm is then presented and is followed by a complete example to demonstrate the whole process and hence how the goal model can be evaluated. The results for that example are then presented and discussed in Section IV.

II. STATE-SPACE REPRESENTATION OF SYSTEMS
State-space representation of a system is a mathematical model of a physical system as a set of input, output, and state variables related by first-order differential equations. This model has been extensively used in modern control engineering. Today the approach is not only being used in the analysis and design of control systems but also became a well-known methodology in other areas like finance and economics. Moreover, state-space techniques gained great support for software tools, frameworks, and programming languages.
Comparing the state-space approach to classical control, which uses frequency domain, state-space can be used with time-variant, nonlinear systems of multiple inputs and multiple outputs [21].
For a system having output y 1 for an input u 1 , and output y 2 for an input u 2 , if the system has the output equals y 1 + y 2 for an input u 1 + u 2 , then the system satisfies the property  of superposition. Moreover, if a system has an output of y for an input u, and output of βy for an input βu, then the system is homogeneous. If a system follows superposition and is homogeneous, then the system is linear. Generally, the system can be defined by the two equations: Moreover, if system parameters, the matrices A, B, C, and D, do not change with time, the system is called timeinvariant. Equation (1) specifies how the state can change with the time as a function of the current state value x and the system input u whereas Equation (2) relates x and u to the system output y. Table 1 lists all components of equations (1) and (2) and summarizes the effect of the four system parameters on the system.

III. THE PROPOSED FRAMEWORK
The proposed framework is based on the analogy between systems, which is a known technique that uses the solutions from one science field and applies it to another field of interest. To the best knowledge of the author, the analogy between control system theory and goal modeling has not been studied. A goal that contributes to another goal has some analogy to systems theory where the output from a system component can be introduced as input to another, forming a larger system.
In the state-space representation of a system, the system is viewed as a set of inputs, outputs, and state variables. The system is defined in terms of four matrices A, B, C, and D. These matrices relate these components to each other. The initial conditions of the system can also be defined as the value of the state vector at time 0. In the proposed methodology, goals are considered analogous to system components, so they can also be defined in terms of the four matrices A, B, C, and D as in Equations (1) and (2). For simplicity, we can omit the D matrix from Equation (2) as it always has a null value. In our proposed evaluation framework, a default set of matrices is initially assigned to each goal in the goal model. The objective is to get a single set of matrices with the same dynamic characteristics as the original goal model. This set of matrices directly relates the inputs to the leaf goals to the outputs of the root goals, which means that applying the same input values to both the original goal model, and to the reduced one would produce the same results at any time. The transformation of the original goal model into a single goal with a single set of matrices is called goal model fusion.
A goal is assigned the set of matrices initially: representing the simple single-input singleoutput system defined by the equationsẋ = u−x and y = x. If a goal has additional inputs, then the initial B matrix assigned to it should have a number of columns equal to the number of its inputs, with each column having a ratio representing the weight of participation of this particular input to all inputs. This simple single state system has a state vector x ∈ R 1 . The output of the system at any time is directly equal to this state value, and the next state variable value comes directly from the input u. From a goal model point of view, this represents a simple propagation latency from one goal to another. For example, if the input to a goal with this initial set of matrices, at time t = 0 is the Heaviside step function u(t) = 1, then the satisfaction of the goal will take the form of Due to the nature of individual goals in the goal models, a goal may require more time to reach satisfaction even if its input has already reached satisfaction. This variable latency can be expressed based on the parameter α in the equation S(t) = 1−e −αt as shown in Figure 3. Based on the techniques from control theory, the initial set of matrices to be assigned initially to a goal can then be

A. GOAL MODEL FUSION
A goal model usually starts with a target goal, breaking it into several sub-goals. It then passes through a several breakdowns and refinement iterations until no further breakdown can be possible. From an evaluation point of view, the goal model can be viewed as a transformation that indirectly relates the external inputs that lead to leaf goals satisfactions to the satisfaction level of the root goal. Goal model fusion provides a means to relate the inputs of the leaf goals directly to the achievement of root goals.
Goal model fusion is an iterative process where every step involves the fusion of the furthest goal into its next goals. The furthest goal is the one having the maximum number of hops in its shortest path to the root goal. Each step combines matrices, states, and inputs of the further goal into its subsequent goals without losing any information. The fusion process ends with a single goal representing the whole goal model with a single set of matrices maintaining all the original model dynamics. For a simple configuration, as seen in Figure 4, let G s be the furthest goal from the root goal, which should then be fused into G t . G t gets input from G s only, so its B matrix has a single column B = [1], and u t = y s . G t is said to be extended by G s . Starting with Equations (1) and (2): which can be written in matrix form as: These two equations suggest a new goal G t as a replacement of the original G t after fusion of G s along with its inputs u s If the goal model has loops, then the inherited input from G s to G t , u s , may also include output from other goals, in addition to external inputs that come from outside the goal model to leaf goals. In the case of G s affecting more than one target (e.g., G 2 contribution to G 5 and G 6 in Figure 6(c)), then the same process is applied to each of these targets before G s can be removed from the goal model. 205114 VOLUME 8, 2020 The next goal G t may possibly have inputs from goals other than G s . In this case, B t is divided horizontally into m sections corresponding to the number of the inputs of G t , with the input from G s , y s one of them.
which can be written as: suggesting a new goal G t after fusion of G s along with In goal models with loops, the fusion of leaf goals into their next goals eventually results in a goal with a self-loop like the one shown in Figure 5 ẋ t = A t x t + B t y s In matrix form, the above equations can be written as: So far, a goal is associated with a value that represents its satisfaction level ranging from 0, which represents total denial, to 1, which represents total satisfaction. This is guaranteed by starting with inputs that fall in this range. For goals with multiple inputs, weights are used to fulfill this property. To support goal models with possible negative contributions between goals, e.g., the relation between G 9 and G 6 in the goal model in Figure 1, we need to keep the goals' denial values in a separate channel. Each connection from one goal to another in the goal model is represented by two separate channels; the suffix s will be used to denote the satisfaction channel, and the suffix d for the denial channel. The values in each channel still range from 0 to represent no satisfaction/denial to 1 for complete satisfaction/denial. The absolute satisfaction/denial level of a goal can then be determined by subtracting the denial value from the satisfaction value of the goal, resulting in a value ranging from −1 for total denial to 1 for total satisfaction, which can be normalized again to a value that ranges from 0 to 1. For positive contribution relation from a goal G s to another goal G t , the s-channel of G s is connected to the s-channel of G t and the same is for the d-channel. The satisfaction of G s leads to satisfaction in G t and denial of G s also leads to denial of G t . On the other hand, for negative contribution, the s-channel of G s is connected to the d-channel of G t , and the d-channel of G s is connected to the s-channel of G t . This exchange in channels reflects that the satisfaction of G s leads to a denial of G t and vice versa.
If a goal has connections from m other goals, then the actual input vector u has 2m components since each connection from these goals requires two inputs, one for the satisfaction channel, and the other for the denial channel, i.e., u = u 1 s u 1 d u 2 s u 2 d . . . u m s u m d T . The goal output y now has always two outputs, again one for the s-channel and the other is for the d-channel, i.e., y = y s y d .
For a goal that has n states, A, B, and C matrices have the VOLUME 8, 2020 dimensions of n × n, n × 2m, and 2 × n respectively: According to the latency parameter α of a goal, the initial value of A matrix will be −α 0 0 −α , and C will take G root ← FindRootGoal(G, L) 3: while Length(L) > 0 do Links between goal still exist 4: Targets ← OutgoingFrom(G 1 , G, L) 6: for all G 2 ∈ Targets do 7: while MAX _DEPTH ∈ Depths do 6: for all l ∈ L do 7: if Depths[l.to] = MAX _DEPTH then 8

5:
A ← ZeroMatrix(n, n) 6: SubMat(A, 0 : n t , 0 : At.width) ← A t 7: SubMat(A, n t : n, 0 : As.width) ← A s 8: i ← the index corresponding to G s in G t .inputs if G s .inputs contains input from G s then A self-loop in G s 12: j ← the index corresponding to G s in G s .inputs 13: B j ← the part of B s corresponding to j 14: SubMat(A, n t : n, n t : n) ← SubMat(A, n t : n, n t : n) +B j × C s inputs ← SubList(G t .inputs, 0 : i) 25: inputs ← ListExtend(inputs, G s .inputs) 26: l ← SubList(G t .inputs, i + 1 :) 27: inputs ← ListExtend(inputs, l) 28: DeleteRelation(G s , G t ) 29: return Goal(A, B, C, inputs) 30 The furthest goal from the root goal G 7 is G 1 . G 1 is combined into its target G 2 , leaving The relation from G 1 to G 2 is deleted, and G 1 is then removed from the model. Round 2: G 2 , G 3 , G 4 , G 9 now have the same distance from G 7 , so any of them can be selected. We arbitrarily take G 2 . G 2 has contributions to both G 6 and G 5 , resulting in u 1 replaces y 2 in G 6 inputs, and the relation from G 2 to G 6 is deleted. For G 5 , u 1 replaces y 2 in G 5 inputs, and the relation from G 2 to G 5 is deleted. G 2 can then be removed from the model. Round 3: G 3 is combined into G 6 leaving u 3 replaces y 3 in G 6 inputs, and the relation from G 3 to G 6 is deleted, and G 3 can then be removed. Round 4: G 4 is the furthest goal to G 7 ; it is then combined into its target G 5 . 205118 VOLUME 8, 2020 Round 5: G 9 is combined into its target G 6 .  y 8 replaces y 9 in G 6 inputs, and the relation from G 9 to G 6 is deleted, along with G 9 . Round 6: G 6 is combined into its target G 8 .    u 1 , u 3 , and y 8 replace y 6 in G 8 inputs, and the relation from G 6 to G 8 is deleted, along with G 6 . Round 7: G 5 is combined into its target G 8 , shown at the bottom of the next page.
Another instance of u 1 and u 4 replace y 5 in G 8 inputs, and the relation from G 5 to G 8 is deleted, along with G 5 .
Round 8: G 8 is combined into the root goal G 7 , shown at the bottom of the 11th page..
The two instances of u 1 along with u 3 and u 4 replace y 8 in G 7 inputs resolving the loop in G 8 . The relation from G 8 to G 7 is deleted as well as G 8 . Now, the goal model has been wholly fused into its root goal G 7 , and the matrices A 7 , B 7 , C 7 fully determine the dynamic behavior of the original goal model. Using traditional control engineering tools can then be VOLUME 8, 2020 used to evaluate and analyze the effect of the original inputs u 1 , u 3 , and u 4 on the satisfaction level of the root goal G 7 .

IV. RESULTS
A tool has been developed to implement the proposed methodology for goal model evaluation. The tool includes a graphical user interface (based on PyQT5) for editing goal models based on i * concepts and terminologies. A screenshot of the main window of the tool is shown in Figure 7. Upon triggering the evaluation feature, the goal model fusion algorithm is executed, yielding a set of three matrices defining the relation between the external inputs and the root goal. A window is then shown featuring a set of slider widgets corresponding to the external inputs of the goal model (u 1 : input to ''G 1 : Successful Media Campaigns'', u 3 : input to ''G 3 : Lockdown'', u 4 : input to ''G 4 : Medical Sup-plies Available''). Figure 8 is a screenshot of that window, showing the curves of satisfaction level (S), the denial level (D), and the absolute satisfaction level (Abs) of the root goal ''G 7 : Better Public Safety''. These curves are instantly updated   upon changing the values of the external inputs using the slider widgets. The framework is tested with satisfaction levels 0, 0.5, and 1 for each of the external inputs of the goal model. The obtained results are listed in Table 2. The input values u 1 , u 3 , and u 4 in the table are introduced as a Heaviside step function time series of a length of 20. The output at t = 5 and at t = 20 (which can be considered the steady-state in this example) is sampled for each input in the table. These results are based on a fixed value of 1 for the latency factor α for all goals, and a fixed weight value of 1 N for N inputs contributing to the same goal.
The output at t = 0 for all input values is not listed since it always has the results S = 0, D = 0 due to the delay required for goals to propagate their values. The steady-state output for a complete denial of all external inputs (0, 0, 0) is S = 0.142, D = 0.857. This nonzero satisfaction and incomplete denial come from the negative contribution from G 9 to G 6 , which is the reason also for a complete satisfaction input (1, 1, 1) yielding S = 0.857, D = 0.142, incomplete satisfaction and nonzero denial. Complete satisfaction in u 1 with a complete denial in other inputs leads to a S = 0.499, D = 0.499, whereas a complete satisfaction in either u 3 or u 4 with a complete denial in other inputs yields lower absolute satisfaction levels. These results reflect the fact that G 2 , which is the next goal of G 1 , has a double effect, contributing to two goals simultaneously (G 5 and G 6 ). The reason for u 3 is less significant than u 4 is that G 3 affects G 6 , which has negative    Evaluation of the goal model in Figure 1 against external inputs.
feedback from G 9 , while the path starting from G 4 has not.

V. CONCLUSION AND FUTURE WORK
In this paper, we introduced a framework for evaluating goal models based on control system theories. The proposed methodology considers the time-varying inputs resulting in a time-varying output. It also considers specific goal dynamic characteristics. An algorithm has been introduced for deducing the state-space matrices for the whole goal model from individual goals. Representing a goal model in terms of a few matrices would hypothetically give better evaluation computation performance than other evaluation techniques. Improving the computation time of the evaluation process allows for more combinations of inputs to be tested against the system being modeled. Furthermore, this new view of the goal model opens a new area for further analysis of the goal model dynamics.
A supporting tool has been developed to prove the concept of this new direction. This tool has been used to obtain a statespace model with the same characteristics as the original goal model. Execution of the state-space model against different input values is done using a mature, widely available, actively maintained Python package for technical computing.
A limitation of the proposed framework is that it cannot support nonlinear relations among goals, such as having alternatives for goal satisfaction. Future work may include a linearization for such relations. According to the new view of a goal model as a system of systems, further analysis of the goal model dynamics can be achieved. Parameters like initial matrices, α for each goal, inputs weights can be time-varying for more realistic results. Using the control theory concepts, it might also be possible to find an initial set of inputs that can lead to particular satisfaction of root goals at some point in time.