Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach
1. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Requirements for Adaptive Systems:
A Goal-Driven Modeling and Analysis Approach
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and
Daniel M. Batista
October 19, 2015
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
2. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Table of contents
1 Introduction
2 Pragmatic Requirements
3 Pragmatic Goal Model and Achievability
4 Evaluation
5 Conclusions and Future Work
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
3. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Introduction
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
4. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Contextual Goal Models
Context
Context is defined as the reification of the system’s environment,
i.e., the surrounding in which it operates
Contextual Goal-Model
CGMs explicitly capture the relation between the goal model and
dynamic environment of a system
For goal models, context is defined as a partial state of the world
relevant to an actor’s goals.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
5. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Variability
The variability of goal achievement strategies is the baseline for
an actor to adapt by deciding which alternative to adopt as a
response to certain triggers, such as a context change.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
6. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Traditional CGM
[p] isnotified
about emergency
medicalcare
reaches[p]
emergencyis
detected
ambulance is
dispatched to [p]
location
central
receives [p] info
setup
automated [p]
info
and
processes
sensorsdata
notifies [p]
bymobile
vibration
or
[p] infois sent
to emergency
and
[p] location is
identified
access[p]
location[l] from
triangulation
send [p] info
bySMS
acessdata
from
database
C2
C2
c5
Mobile
Personal
Emergency
Response
C2
Ambulance
Dispatching
System
situationsare
identified
identifies
situation
notifies [p]
by light alert
centrals
calls [p]
vital signs are
monitored
and
collects data
fromsensors
persistsdata
to database
and [p] situation
data isrecovered
and
identifies[p]
location [l]
byvoicecall
send [p] info
byinternet
C3 vC4
respond to
emergency
or
notifies [p]
bysound alert
C8C1
C7C6[p] call for
helpis accepted
receives
emergency
button call
notifycentral
bySMS
notifycentral
byInternet
C3 vC4
confirms
emergency
bycall
falsealarm is
checked
accepts
emergency
and
C2¬C2
access[p] location
[l] from aGPS
or
C2
or
or
or
[p] iscontacted
Considerlast known
location [l] of [p]
[p] infois
prepared
get infofrom
responsiblefor[p]
contact
responsiblefor
[p]
or
C1:
C2:
C3:
C4:
C5:
C6:
C7:
C8:
Quiet Ambient
GSM Coverage
Internet is available
Mobile Connection is configured
Data Coverage
Location tolerate phone ring
Patient is in a dim area
A staff is available to call
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
7. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal Interpretation
However, we advocate another effect of context on CGMs and
requirements in general:
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
8. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal Interpretation
However, we advocate another effect of context on CGMs and
requirements in general:
The interpretation of a goal achievement is context dependent.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
9. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal Interpretation
However, we advocate another effect of context on CGMs and
requirements in general:
The interpretation of a goal achievement is context dependent.
The mere achievement of the sub-goals in a goal model does not
imply that the parent goal has been achieved.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
10. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Our proposal
In this paper, we present the following contributions to the
state-of-the-art:
Pragmatic goals’ concept:
A goal’s interpretation varies according to context.
Achievability concept:
Capability of fulfilling a goal as interpreted within the context
of operation.
Algorithm:
We also develop and implement an algorithm to compute the
execution plan which is likely to achieve a pragmatic goal in a
certain context
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
11. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Requirements
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
12. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Goal Achievement
Achieving a goal means:
Traditional View
Achieving one (OR-Decomposition) or all (AND- Decomposition)
of the subgoals
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
13. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Goal Achievement
Achieving a goal means:
Traditional View
Achieving one (OR-Decomposition) or all (AND- Decomposition)
of the subgoals
Our View
The decision whether a goal is achieved cannot be decoupled from
the provided QoS level which can itself be context-dependent.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
14. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Goal Achievement
Achieving a goal means:
Traditional View
Achieving one (OR-Decomposition) or all (AND- Decomposition)
of the subgoals
Our View
The decision whether a goal is achieved cannot be decoupled from
the provided QoS level which can itself be context-dependent.
What about softgoals?
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
15. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Goal Achievement
Achieving a goal means:
Traditional View
Achieving one (OR-Decomposition) or all (AND- Decomposition)
of the subgoals
Our View
The decision whether a goal is achieved cannot be decoupled from
the provided QoS level which can itself be context-dependent.
What about softgoals?
This is not a matter of achieving a goal with higher or lower
quality, but achieving it at all.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
16. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal Interpretation
A pragmatic goal describes the means to achieve it and also the
interpretation of that achievement.
Goal Interpretation
Context-dependent set of mandatory and crisp, therefore
quantifiable, quality constraints (QCs).
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
17. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal Interpretation
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
18. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Traditional CGM
[p] isnotified
about emergency
medicalcare
reaches[p]
emergencyis
detected
ambulance is
dispatched to [p]
location
central
receives [p] info
setup
automated [p]
info
and
processes
sensorsdata
notifies [p]
bymobile
vibration
or
[p] infois sent
to emergency
and
[p] location is
identified
access[p]
location[l] from
triangulation
send [p] info
bySMS
acessdata
from
database
C2
C2
c5
Mobile
Personal
Emergency
Response
C2
Ambulance
Dispatching
System
situationsare
identified
identifies
situation
notifies [p]
by light alert
centrals
calls [p]
vital signs are
monitored
and
collects data
fromsensors
persistsdata
to database
and [p] situation
data isrecovered
and
identifies[p]
location [l]
byvoicecall
send [p] info
byinternet
C3 vC4
respond to
emergency
or
notifies [p]
bysound alert
C8C1
C7C6[p] call for
helpis accepted
receives
emergency
button call
notifycentral
bySMS
notifycentral
byInternet
C3 vC4
confirms
emergency
bycall
falsealarm is
checked
accepts
emergency
and
C2¬C2
access[p] location
[l] from aGPS
or
C2
or
or
or
[p] iscontacted
Considerlast known
location [l] of [p]
[p] infois
prepared
get infofrom
responsiblefor[p]
contact
responsiblefor
[p]
or
C1:
C2:
C3:
C4:
C5:
C6:
C7:
C8:
Quiet Ambient
GSM Coverage
Internet is available
Mobile Connection is configured
Data Coverage
Location tolerate phone ring
Patient is in a dim area
A staff is available to call
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
19. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic CGM
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
20. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Pragmatic Goal Model and Achievability
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
21. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Meta Model
Pragmatic Goal
Task
+ providedQuality()
DelegationRequirement
+ myType();
+ getQualReq()
+ isAchievable ()
+ isApplicable()
CGM
+ getRoot();
Interpretation
+ getQualityRequirement()
Goal
+ isOrDecomposition()
+ isAndDecomposition()
+ isAchievable ()
+ getVariant()
Quality Constraint
+ getQualReq()
+ getApplicableRefinements()
+ delegatee
+ dependum
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
22. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Achievability Evaluation Method - Requirements
cgm.getRoot()
isApplicable(current)?
NULL
myType?
Task
Achievability Process
Goal
Achievability Process
Yes
No
Goal/Delegation
Task
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
23. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Task Achievability Process
canFulfill(qualReq)?
new Plan(root)
NULL
No
Yes
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
24. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal Achievability Process
stricterQC
(root.qualReq, qualReq)
Plan
complete = NULL
for each Refinement d in
root.getRefinements()
plan =
d.isAchievable(. . . )
plan is NULL?
AND-decomposition?
NULL
Decomposition?
Add to
complete plan
plan
More dependencies?
complete
No
Yes
Yes
And
Or
No
Yes
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
25. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Evaluation
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
26. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal-Question-Metric Plan
Goal 1: Algorithm’s runtime usage capability
1.1 How long would it take to come up with an
answer?
Execution time
1.2 How reliable are the answers provided? % of correct answers
1.3 How does it scale over the amount of goals in
the model in average?
Execution time
1.4 How does it scale over the amount of contexts
in the model in average?
Execution time
1.5 How does the algorithm scale over the amount
of goals in the model in the worst case scenario?
Execution time
1.6 How does the algorithm scale over the
amount of contexts in the model in the worst case
scenario?
Execution time
Goal 2: Pinpoint unachievable context sets
2.1 Can it cover all context sets for models
increasingly large models?
Context sets coverage
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
27. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal 1:
1.1: How long would the algorithm take to come up with an
answer?
1
average execution time of 4000 algorithm iterations over the 4 scenarios
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
28. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal 1:
1.1: How long would the algorithm take to come up with an
answer?
Less than 1 millisecond for the presented CGM 1
1
average execution time of 4000 algorithm iterations over the 4 scenarios
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
29. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
1.2: How reliable would an answer provided by the algorithm be?
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
30. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
1.2: How reliable would an answer provided by the algorithm be?
Being a deterministic algorithm it was already expected to be
100% reliable. To ensure this, we implemented tests for each task
in each scenario and asserted that out of 4000 executions, not a
single one outputted any invalid option.
To further ensure that the implemented algorithm performed as
expected, the core classes of the implementation were throughly
tested achieving 100% test coverage.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
31. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
1.3 and 1.4: How does the algorithm scale over the amount of
goals and contexts in the model in average?
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
32. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
1.5 and 1.6: How does the algorithm scale over the amount of
goals and contexts in the worst case scenario?
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
33. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Goal 2: Algorithm’s pinpointing unachievable context sets
capability
2.1: Can it cover all context sets for models increasingly large
models?
0 2 5 0 0 5 0 0 0 7 5 0 0 1 0 0 0 0
0 %
2 5 %
5 0 %
7 5 %
1 0 0 %
0 %
2 5 %
5 0 %
7 5 %
1 0 0 %
ContextSetsCoverage
M o d e l s i z e ( # o f n o d e s )
Fixed amount of 15 contexts
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
34. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Conclusions and Future Work
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
35. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Conclusions
In this paper we have:
Proposed the utilization of a Pragmatic CGM in which the
goals’ context-dependent interpretation is an integral part of
the model;
Shown why hard goals and soft goals are not enough to grasp
some of the real-world peculiarities and context-dependent
goal interpretations;
Defined the pragmatic goals’ achievability property;
Proposed, implemented and evaluated an algorithm to decide
on the achievability of a goal and lay out an execution plan
and;
Performed a scalability analysis on it and shown that it scales
linearly over the amount of goals and context amount
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
36. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Future work
For future work, we plan to:
1 Integrate this algorithm into a CGM modelling tool;
2 Study the possibility of the algorithm to return all task sets
instead of a single one and
3 Study the enhancement of the CGM model to integrate task
dependencies so that it may represent a context-dependent
runtime GM with QoS constraints.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
37. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Acknowledgements
This work has been partially supported also by Finatec/UnB under
call 04/2015, CEPE resolution number 171/2006 and
CAPES/PROCAD-grant number 183794.
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems:
38. Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion
Thank you
Questions?
Felipe P. Guimar˜aes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista
Pragmatic Requirements for Adaptive Systems: