Optimization models for non-functional requirements validation - - PowerPoint PPT Presentation

optimization models for non functional requirements
SMART_READER_LITE
LIVE PREVIEW

Optimization models for non-functional requirements validation - - PowerPoint PPT Presentation

Optimization models for non-functional requirements validation Vittorio Cortellessa Computer Science and Engineering Department Universit dell'Aquila Italy vittorio.cortellessa@univaq.it http://www.di.univaq.it/cortelle/ Presentation


slide-1
SLIDE 1

Vittorio Cortellessa Computer Science and Engineering Department Università dell'Aquila – Italy vittorio.cortellessa@univaq.it http://www.di.univaq.it/cortelle/

Optimization models for non-functional requirements validation

slide-2
SLIDE 2

2 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Presentation roadmap

  • Software non-functional requirements (NFR)
  • Non-functional attribute (NFA) composition
  • Optimization models
  • Conclusions and perspectives
slide-3
SLIDE 3

3 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Software non-functional requirements

“Good enough” Non Functional Requirements (NFR) specification:

  • Quantification rather than qualification

The average response time of BrowseCatalog service must not be higher than 1.5 seconds… rather than The BrowseCatalog service must be quick

  • Workload specification

The average response time of BrowseCatalog service must not be higher than 1.5 seconds under a maximum workload of 50 requests/second

slide-4
SLIDE 4

4 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Software non-functional requirements

Non-functional requirements validation cannot be effectively carried out without these good practices But what is it expected from NF validation in general? Early artifacts (e.g. models) in the lifecycle – Quantitatively compare different software solutions vs requirements Late artifacts (e.g. code) in the lifecycle – Estimate realistic values of NF attributes

slide-5
SLIDE 5

5 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Non-functional attribute composition 1) On one NF attribute 2) On multiple NF attributes

slide-6
SLIDE 6

6 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Non-functional attribute composition

1) On one NF attribute Expressing (possibly in a closed form) the whole system attribute in terms of component/service attributes

C1 Ф(C1) C2 Ф(C2) Cn Ф(Cn)

Connectors

Ф(S) = Ф(C1) ⊗ Ф(C2) ⊗ … ⊗ Ф(Cn) Ф() : non functional attribute (e.g., reliability)

slide-7
SLIDE 7

7 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Non-functional attribute composition

2) Across different NF attributes Expressing (possibly in a closed form) the relationships/tradeoffs/dependencies among attributes

Requirement: <<data confidentiality>>

C2

sendData

C1 C2

sendData Encryption* Decryption*

C1

Throughput Workload

initial system secure system

λ t1 t2

slide-8
SLIDE 8

8 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013 ARCHITECTURAL PHASE

Cost vs reliability and delivery time DOMAIN Component-based Software Choice of components driven by non-functional properties We have introduced several optimization models… Cost vs satisfaction of requirements

REQUIREMENTS PHASE

Change management

MAINTENANCE PHASE

Optimization models

DEPLOYMENT PHASE

Cost vs reliability and performance Based on satisfaction functions [Filkenstein et al.] Closed-form of performance indices cannot capture waiting times on shared resources Opening to evolving/adaptive systems where new requirements come ofter deployment

slide-9
SLIDE 9

9 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

On the basis of an architectural design, for each software component we assume to have different COTS available to buy

  • r different in-house versions to build.

We also assume that all components are equivalent by a functional viewpoint. We intend to determine the combination of available COTS products and in-house developed components that minimizes the software costs under delivery time and reliability constraints. As a ”side effect”, we provide the amount of testing to be performed on each in-house component in order to achieve the required reliability level.

ARCHITECTURAL PHASE

slide-10
SLIDE 10

10 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

OPTIMIZATION MODEL

c

− ij(tij +τ ijNij tot)xij +

cijxij

j∈Ji

j∈Ji

_

$ % & & & ' ( ) ) )

i=1 n

max

i=1,..,n(

(tij +τ ij

j∈Ji

Nij

tot)xij +

dijxij

j∈Ji

) ≤ T e

−( θijsixij+ µijsixij )

j∈Ji

j∈Ji

i=1 n

≥ R xij

j∈JiJi

=1,∀i =1,...,n xij ∈ 0,1

{ },∀i =1,...,n,∀j ∈ Ji ∪ Ji

min

slide-11
SLIDE 11

11 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

The variables must fulfill the following constraints: In general, a “build-or-buy” decisional strategy can be described as a set of 0/1 variables defined as follows (∀i = 1,…,n):

if instance Cij is chosen

  • therwise

xij

j J J

i i

=

∈∑

1,

_

U

∀ = i n 1,...,

xij = ! " # 1

( ) j J

  • r j

J

i i

∈ ∈

For each component i, exactly one instance is either bought as COTS

  • r in-house developed.

VARIABLES

slide-12
SLIDE 12

12 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

We express the Cost Objective Function as follows:

c t N x c x

ij ij ij ij tot ij ij ij j J j J i n

i i

( ) + + ! " # # # $ % & & &

∈ ∈ =

∑ ∑ ∑

τ

1

Cost of a COTS component

cij be the buying cost

For each instance j and component i let:

COST OBJECTIVE FUNCTION

slide-13
SLIDE 13

13 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

A maximum threshold T has been given on the delivery time of the whole system.

Delivery time

  • f an in-house

instance. For each instance j and component i let:

tij be the estimated development time

τij be the average time required to perform a test case

The following expression represents the delivery time

  • f the component i:

( ) t N x d x

ij ij ij tot ij j J ij ij j J

i i

+ +

∈ ∈

∑ ∑

τ

DELIVERY TIME CONSTRAINT

slide-14
SLIDE 14

14 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

A maximum threshold T has been given on the delivery time of the whole system.

The following expression represents the delivery time

  • f the component i:

( ) t N x d x

ij ij ij tot ij j J ij ij j J

i i

+ +

∈ ∈

∑ ∑

τ

Delivery time of a COTS component For each instance j and component i let:

dij be the delivery time

DELIVERY TIME CONSTRAINT

slide-15
SLIDE 15

15 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

RELIABILITY CONSTRAINT

e

−( θijsixij+ µijsixij )

j∈Ji

j∈Ji

i=1 n

≥ R

A minimum reliability R is required for the whole system.

A closed-form expression represents the reliability of the whole system: Here is the requirement/testing joint point…

slide-16
SLIDE 16

16 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013 Probability that no failure occurs during the execution of the i-th component [Jung et al., 1999] :

θij = Testabij * pij(1−Testabij )

Nij

suc

(1− pij )+ pij(1−Testabij )

Nij

suc

φi

fnum

e

i

=

fnum s x s x

i ij j J i ij ij j J i ij

i i

= +

∈ ∈

∑ ∑

θ µ

average number of failures of a component instance

Nsucc

ij the number of succesful (i.e. failure free) tests

performed on an in-house instance

The probability of failure on demand θij of the in-house developed instance Cij [Bertolino et al., 1996] :

(other reliability growth models in closed forms can be adopted here)

RELIABILITY CONSTRAINT

probability of failure on-demand

slide-17
SLIDE 17

17 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

θi =

Just another (newer) example of closed-form reliability growth model that we are using now…

slide-18
SLIDE 18

18 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

An example: a distributed medical informatics system

It is a client/server system, where the AE Client subsystem is connected via a network (Network subsystem) to the AE Server subsystem. The communication between the entities of the system is performed using Digital Imaging and Communication in Medicine (DICOM) standard, which is typically used, for example, for producing, processing and exchanging medical images.

Static view

slide-19
SLIDE 19

19 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

An example: a distributed medical informatics system

First Scenario

Behavioral view

slide-20
SLIDE 20

20 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

An example: a distributed medical informatics system

Second Scenario

Behavioral view

slide-21
SLIDE 21

21 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

An example: a distributed medical informatics system

Third Scenario

Behavioral view

slide-22
SLIDE 22

22 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Parameters for COTS products Parameters for in-house developed components

slide-23
SLIDE 23

23 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Model Solutions

We have solved the optimization model for multiple values of bounds T and R. The former spans from 4 to 30 whereas the latter from 0.89 to 0.99.

slide-24
SLIDE 24

24 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

e

−( θijsixij+ µijsixij )

j∈Ji

j∈Ji

i=1 n

≥ R

Introducing stochastic programming

The reliability constraint only considers the average number of invocations of a component across different scenarios

slide-25
SLIDE 25

25 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

e

−( θijsixij+ µijsixij )

j∈Ji

j∈Ji

i=1 n

≥ R

Introducing stochastic programming

This does not avoid that, for some scenario, the system reliability can be lower than R (But how was the reliability requirement specified?) Different approaches can be taken to “fix” this “approximation”…

slide-26
SLIDE 26

26 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Introducing stochastic programming

We are working on a 2-stages programming approach

1) Find the optimal solution of the original problem:

where

slide-27
SLIDE 27

27 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Introducing stochastic programming

2) Then try to take “recourse actions” to compensate for possible inconsistencies in the original problem

where

slide-28
SLIDE 28

28 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

UML software model (Component Diagram, Sequence Diagram)

Model builder Model solver

Annotate Transform Optimization model

Model results

  • component

selection

  • amount of

testing on in-house comp.

CODER FRAMEWORK We have provided the CODER (Cost Optimization under DElivery and Reliability constraints) tool, which generates and solves the optimization model.

slide-29
SLIDE 29

29 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Conclusions

We have introduced several optimization models for non- functional requirement validation PROS

  • Easy representation of modular software (e.g. component-based,

service-oriented)

  • Flexibility in the definition of cost functions
  • Limited solution time for small/medium size problems (i.e. about

20 components and 10 instances for each component)

  • Easy exploration of multiple alternatives
  • Capability of embedding stochastic parameters
slide-30
SLIDE 30

30 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

We have introduced several optimization models for non- functional requirement validation CONS

  • Only closed-form expressions can be adopted, and they do not

capture all relevant aspects of non-functional attributes

  • Exponential solution time for growing size problems (possibly

mitigated with meta-heuristic approaches)

  • Borderline research topic between Optimization and Software

Engineering -> not the highest acceptance rate of papers J

Conclusions

slide-31
SLIDE 31

31 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Future perspectives

  • Application on real large scale problems

(metaheuristics)

  • Stochastic optimization
  • Optimization models as a support to runtime decisions

(need quick-and-dirty solution approahes)

slide-32
SLIDE 32

32 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Acknowledgments

The ideas and results presented in this talk have been achieved in collaboration with: Pasqualina Potena, Università di Bergamo Fabrizio Marinelli, Università Politecnica delle Marche Extra-credits also go to Pasqualina for sharing with me her large repository of slides J

slide-33
SLIDE 33

33 SEA Group

  • V. Cortellessa, Optimization models for non-functional requirement validation

CREST Workshop : Requirements and Test Optimization - UCL, February 11-12, 2013

Some references…

  • Vittorio Cortellessa, Raffaela Mirandola, Pasqualina Potena: Selecting Optimal

Maintenance Plans Based on Cost/Reliability Tradeoffs for Software Subject to Structural and Behavioral Changes. CSMR 2010:21-30

  • Vittorio Cortellessa, Fabrizio Marinelli, Pasqualina Potena: An optimization

framework for "build-or-buy" decisions in software architecture. Computers & OR (COR) 35(10):3090-3106 (2008)

  • Vittorio Cortellessa, Ivica Crnkovic, Fabrizio Marinelli, Pasqualina Potena:

Experimenting the Automated Selection of COTS Components Based on Cost and System Requirements. J. UCS (JUCS) 14(8):1228-1255 (2008)

  • Vittorio Cortellessa, Ivica Crnkovic, Fabrizio Marinelli, Pasqualina Potena: Driving

the selection of cots components on the basis of system requirements. ASE 2007:413-416

  • Vittorio Cortellessa, Fabrizio Marinelli, Pasqualina Potena: Automated Selection of

Software Components Based on Cost/Reliability Tradeoff. EWSA 2006:66-81