Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

38
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:

Transcript of Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Page 1: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Pragmatic Requirements for Adaptive Systems:A Goal-Driven Modeling and Analysis Approach

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali andDaniel M. Batista

October 19, 2015

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 2: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 3: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Introduction

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 4: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 anddynamic environment of a system

For goal models, context is defined as a partial state of the worldrelevant to an actor’s goals.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 5: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Variability

The variability of goal achievement strategies is the baseline foran actor to adapt by deciding which alternative to adopt as aresponse to certain triggers, such as a context change.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 6: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Traditional CGM

[p] is notified about emergency

medical care reaches [p]

emergency is detected

ambulance is dispatched to [p]

locationcentral

receives [p] info

setup automated [p]

info

and

processes sensors data

notifies [p] by mobile vibration

or

[p] info is sent to emergency

and

[p] location is identified

access [p] location [l] from

triangulation

send [p] info by SMS

acess data from

database

C2

C2

c5

Mobile Personal

Emergency Response

C2

Ambulance Dispatching

System

situations are identified

identifies situation

notifies [p] by light alert

centralscalls [p]

vital signs are monitored

and

collects data from sensors

persists data to database

and [p] situation data is recovered

and

identifies [p] location [l]

by voice call

send [p] info by internet

C3 v C4

respond to emergency

or

notifies [p] by sound alert

C8C1

C7C6[p] call for help is accepted

receives emergency button call

notify central by SMS

notify central by Internet

C3 v C4

confirms emergency

by call

false alarm is checked

accepts emergency

and

C2¬C2access [p] location

[l] from aGPS

or

C2or

or

or

[p] is contacted

Consider last known location [l] of [p]

[p] info is prepared

get info from responsible for [p]

contact responsible for

[p]

or

C1: C2:C3:C4:C5:C6:C7:C8:

Quiet AmbientGSM CoverageInternet is availableMobile Connection is configuredData CoverageLocation tolerate phone ringPatient is in a dim areaA staff is available to call

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 7: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal Interpretation

However, we advocate another effect of context on CGMs andrequirements in general:

The interpretation of a goal achievement is context dependent.

The mere achievement of the sub-goals in a goal model does notimply that the parent goal has been achieved.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 8: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal Interpretation

However, we advocate another effect of context on CGMs andrequirements in general:

The interpretation of a goal achievement is context dependent.

The mere achievement of the sub-goals in a goal model does notimply that the parent goal has been achieved.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 9: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal Interpretation

However, we advocate another effect of context on CGMs andrequirements in general:

The interpretation of a goal achievement is context dependent.

The mere achievement of the sub-goals in a goal model does notimply that the parent goal has been achieved.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 10: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Our proposal

In this paper, we present the following contributions to thestate-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 contextof operation.

Algorithm:We also develop and implement an algorithm to compute theexecution plan which is likely to achieve a pragmatic goal in acertain context

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 11: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Pragmatic Requirements

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 12: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 fromthe provided QoS level which can itself be context-dependent.

What about softgoals?

This is not a matter of achieving a goal with higher or lowerquality, but achieving it at all.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 13: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 fromthe provided QoS level which can itself be context-dependent.

What about softgoals?

This is not a matter of achieving a goal with higher or lowerquality, but achieving it at all.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 14: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 fromthe provided QoS level which can itself be context-dependent.

What about softgoals?

This is not a matter of achieving a goal with higher or lowerquality, but achieving it at all.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 15: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 fromthe provided QoS level which can itself be context-dependent.

What about softgoals?

This is not a matter of achieving a goal with higher or lowerquality, but achieving it at all.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 16: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal Interpretation

A pragmatic goal describes the means to achieve it and also theinterpretation of that achievement.

Goal Interpretation

Context-dependent set of mandatory and crisp, thereforequantifiable, quality constraints (QCs).

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 17: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal Interpretation

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 18: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Traditional CGM

[p] is notified about emergency

medical care reaches [p]

emergency is detected

ambulance is dispatched to [p]

locationcentral

receives [p] info

setup automated [p]

info

and

processes sensors data

notifies [p] by mobile vibration

or

[p] info is sent to emergency

and

[p] location is identified

access [p] location [l] from

triangulation

send [p] info by SMS

acess data from

database

C2

C2

c5

Mobile Personal

Emergency Response

C2

Ambulance Dispatching

System

situations are identified

identifies situation

notifies [p] by light alert

centralscalls [p]

vital signs are monitored

and

collects data from sensors

persists data to database

and [p] situation data is recovered

and

identifies [p] location [l]

by voice call

send [p] info by internet

C3 v C4

respond to emergency

or

notifies [p] by sound alert

C8C1

C7C6[p] call for help is accepted

receives emergency button call

notify central by SMS

notify central by Internet

C3 v C4

confirms emergency

by call

false alarm is checked

accepts emergency

and

C2¬C2access [p] location

[l] from aGPS

or

C2or

or

or

[p] is contacted

Consider last known location [l] of [p]

[p] info is prepared

get info from responsible for [p]

contact responsible for

[p]

or

C1: C2:C3:C4:C5:C6:C7:C8:

Quiet AmbientGSM CoverageInternet is availableMobile Connection is configuredData CoverageLocation tolerate phone ringPatient is in a dim areaA staff is available to call

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 19: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Pragmatic CGM

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 20: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Pragmatic Goal Model and Achievability

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 21: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 22: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Achievability Evaluation Method - Requirements

cgm.getRoot()

isApplicable(current)?

NULL

myType?

TaskAchievability Process

GoalAchievability Process

Yes

No

Goal/Delegation

Task

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 23: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Task Achievability Process

canFulfill(qualReq)?

new Plan(root)

NULL

No

Yes

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 24: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal Achievability Process

stricterQC(root.qualReq, qualReq)

Plancomplete = NULL

for each Refinement d inroot.getRefinements()

plan =d.isAchievable(. . . )

plan is NULL?

AND-decomposition?

NULL

Decomposition?

Add tocomplete plan

plan

More dependencies?

complete

No

Yes

Yes

And

OrNo

Yes

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 25: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Evaluation

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 26: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 answers1.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. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 27: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal 1:

1.1: How long would the algorithm take to come up with ananswer?

Less than 1 millisecond for the presented CGM 1

1average execution time of 4000 algorithm iterations over the 4 scenariosFelipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 28: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal 1:

1.1: How long would the algorithm take to come up with ananswer?

Less than 1 millisecond for the presented CGM 1

1average execution time of 4000 algorithm iterations over the 4 scenariosFelipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 29: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 be100% reliable. To ensure this, we implemented tests for each taskin each scenario and asserted that out of 4000 executions, not asingle one outputted any invalid option.

To further ensure that the implemented algorithm performed asexpected, the core classes of the implementation were throughly

tested achieving 100% test coverage.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 30: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 be100% reliable. To ensure this, we implemented tests for each taskin each scenario and asserted that out of 4000 executions, not asingle one outputted any invalid option.

To further ensure that the implemented algorithm performed asexpected, the core classes of the implementation were throughly

tested achieving 100% test coverage.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 31: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

1.3 and 1.4: How does the algorithm scale over the amount ofgoals and contexts in the model in average?

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 32: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

1.5 and 1.6: How does the algorithm scale over the amount ofgoals and contexts in the worst case scenario?

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 33: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Goal 2: Algorithm’s pinpointing unachievable context setscapability

2.1: Can it cover all context sets for models increasingly largemodels?

0 2 5 0 0 5 0 0 0 7 5 0 0 1 0 0 0 00 %

2 5 %

5 0 %

7 5 %

1 0 0 %

0 %

2 5 %

5 0 %

7 5 %

1 0 0 %

Conte

xt Se

ts Co

verag

e

M o d e l s i z e ( # o f n o d e s )

Fixed amount of 15 contexts

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 34: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Conclusions and Future Work

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 35: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Conclusions

In this paper we have:

Proposed the utilization of a Pragmatic CGM in which thegoals’ context-dependent interpretation is an integral part ofthe model;

Shown why hard goals and soft goals are not enough to graspsome of the real-world peculiarities and context-dependentgoal interpretations;

Defined the pragmatic goals’ achievability property;

Proposed, implemented and evaluated an algorithm to decideon the achievability of a goal and lay out an execution planand;

Performed a scalability analysis on it and shown that it scaleslinearly over the amount of goals and context amount

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 36: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

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 setsinstead of a single one and

3 Study the enhancement of the CGM model to integrate taskdependencies so that it may represent a context-dependentruntime GM with QoS constraints.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 37: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Acknowledgements

This work has been partially supported also by Finatec/UnB undercall 04/2015, CEPE resolution number 171/2006 andCAPES/PROCAD-grant number 183794.

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems:

Page 38: Pragmatic requirements for adaptive systems a goal driven modeling and analysis approach

Introduction Pragmatic Requirements Pragmatic GM Evaluation Conclusion

Thank you

Questions?

Felipe P. Guimaraes, Genaina N. Rodrigues, Raian Ali and Daniel M. Batista

Pragmatic Requirements for Adaptive Systems: