31
.lu software verification & validation V V S Change Impact Analysis for Natural Language Requirements: Chetan Arora, Mehrdad Sabetzadeh, Arda Goknil, Lionel Briand Frank Zimmer University of Luxembourg, Luxembourg SES TechCom, Luxembourg An NLP Approach

Change Impact Analysis for Natural Language Requirements

Embed Size (px)

Citation preview

Page 1: Change Impact Analysis for Natural Language Requirements

.lusoftware verification & validationVVS

Change Impact Analysis for Natural Language Requirements:

Chetan Arora, Mehrdad Sabetzadeh, Arda Goknil, Lionel Briand

Frank Zimmer

University of Luxembourg, Luxembourg

SES TechCom, Luxembourg

An NLP Approach

Page 2: Change Impact Analysis for Natural Language Requirements

Problem Definition

• Requirements change frequently

• Large number of requirements and interdependencies

• Consistency must be maintained

• Handling change is expensive

• Support is required for impact analysis among requirements

2

Page 3: Change Impact Analysis for Natural Language Requirements

3

Scope

Requirements

Architecture & Design Source Code

TestCases

SoftwareDocumentation

Majority of Research

Page 4: Change Impact Analysis for Natural Language Requirements

Challenges

Page 5: Change Impact Analysis for Natural Language Requirements

Example

• R1: The mission operation controller shall transmit satellite status reports to the user help desk.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

5

Page 6: Change Impact Analysis for Natural Language Requirements

What Changed?

• R1: The mission operation controller shall transmit satellite status reports to the user help desk document repository.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

6

user help desk? operator help desk?

station maintenance crew help desk?

Page 7: Change Impact Analysis for Natural Language Requirements

What Changed?

• R1: The mission operation controller shall transmit satellite status reports to the user help desk document repository.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

7

user help desk

Page 8: Change Impact Analysis for Natural Language Requirements

Why Was the Change Made?

• R1: The mission operation controller shall transmit satellite status reports to the user help desk document repository.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

8

Possible Reason : Replace (user help desk) with (user document repository)

Page 9: Change Impact Analysis for Natural Language Requirements

Why Was the Change Made?

• R1: The mission operation controller shall transmit satellite status reports to the user help desk document repository.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

9

Another Possible Reason : No communication between (user help desk) and

(mission operation controller)

Page 10: Change Impact Analysis for Natural Language Requirements

Approach

Page 11: Change Impact Analysis for Natural Language Requirements

Approach

11

Apply Change

Identify Differences

Specify Propagation

Condition Propagation Condition

Process Requirements

2

6666664

s11 · · · s1n... . . . ...sn1 · · · snn

3

7777775

PhrasesSimilarity

Matrix

Requirements Document

SortRequirements

SortedRequirements

Syntactic Similarity: satellite transmission licence

license of satellite transmission

Semantic Similarity: transmittransfer

Propagation Condition as a Boolean Query:

(user help desk) AND

(mission operation controller) AND

(transmit)

Page 12: Change Impact Analysis for Natural Language Requirements

Approach

Apply Change

Identify Differences

Specify Propagation

Condition Propagation Condition

Process Requirements

2

6666664

s11 · · · s1n... . . . ...sn1 · · · snn

3

7777775

PhrasesSimilarity

Matrix

Requirements Document

SortRequirements

SortedRequirements

Page 13: Change Impact Analysis for Natural Language Requirements

Processing Requirements Statements

• R1: The mission operation controller shall transmit satellite status reports to the user help desk.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

13

Page 14: Change Impact Analysis for Natural Language Requirements

Processing Requirements Statements

• R1: The mission operation controller shall transmit satellite status reports to the user help desk.

• R2: The satellite management system shall provide users with the ability to transfer maintenance and service plans to the user help desk.

• R3: The mission operation controller shall transmit any detected anomalies to the user help desk.

14

Phrase Detection Similarity Calculation

1.0transmit

transfer

Noun Phrase (NP)Verb Phrase (VP)

Page 15: Change Impact Analysis for Natural Language Requirements

Approach

Apply Change

Identify Differences

Specify Propagation

Condition Propagation Condition

Process Requirements

2

6666664

s11 · · · s1n... . . . ...sn1 · · · snn

3

7777775

PhrasesSimilarity

Matrix

Requirements Document

SortRequirements

SortedRequirements

Page 16: Change Impact Analysis for Natural Language Requirements

16

NAtural language Requirements Change Impact Analyzer

https://sites.google.com/site/svvnarcia/

Demo

Page 17: Change Impact Analysis for Natural Language Requirements
Page 18: Change Impact Analysis for Natural Language Requirements

monitoring desk

user help desk

Requirement Phrases

Impact Likelihood Computation

18

user priority list of his help desk

PropagationCondition

Page 19: Change Impact Analysis for Natural Language Requirements

19

Sorted Requirements

Using the Sorted List

Page 20: Change Impact Analysis for Natural Language Requirements

Inspect till the point after which the quantitative measure loses the capability to sufficiently differentiate the impacted requirements

20

When to Stop Inspecting?Graph Builder

MembershipDifference

Membership & Difference vs. %Inspected

%Inspected0,00 0,05 0,10 0,15 0,20 0,25 0,30 0,35 0,40 0,45 0,50 0,55 0,60 0,65 0,70 0,75 0,80 0,85 0,90 0,95 1,00

Mem

bers

hip

0,000,200,400,600,80

Diff

eren

ce

0,00

0,10

0,20

0,30

Where(40160 rows excluded)

h

Del

ta

% of requirements traversed in the sorted list

h

0 20 40 60 80 1000.0

0.1

0.2

0.30.0

1.0

0.8

0.6

0.4

0.2

Mat

chin

g sc

ore

max

h /3 max last

Graph Builder

MembershipDifference

Membership & Difference vs. %Inspected

%Inspected0,00 0,05 0,10 0,15 0,20 0,25 0,30 0,35 0,40 0,45 0,50 0,55 0,60 0,65 0,70 0,75 0,80 0,85 0,90 0,95 1,00

Mem

bers

hip

0,000,200,400,600,80

Diff

eren

ce

0,00

0,10

0,20

0,30

Where(40160 rows excluded)

h

Del

ta

% of requirements traversed in the sorted list

h

0 20 40 60 80 1000.0

0.1

0.2

0.30.0

1.0

0.8

0.6

0.4

0.2

Mat

chin

g sc

ore

max

h /3 max last

Impa

ct Li

kelih

ood

Page 21: Change Impact Analysis for Natural Language Requirements

Inspect till the point after which the quantitative measure loses the capability to sufficiently differentiate the impacted requirements

Impa

ct Li

kelih

ood

Delta

When to Stop Inspecting?Graph Builder

MembershipDifference

Membership & Difference vs. %Inspected

%Inspected0,00 0,05 0,10 0,15 0,20 0,25 0,30 0,35 0,40 0,45 0,50 0,55 0,60 0,65 0,70 0,75 0,80 0,85 0,90 0,95 1,00

Mem

bers

hip

0,000,200,400,600,80

Diff

eren

ce

0,00

0,10

0,20

0,30

Where(40160 rows excluded)

h

Del

ta

% of requirements traversed in the sorted list

h

0 20 40 60 80 1000.0

0.1

0.2

0.30.0

1.0

0.8

0.6

0.4

0.2

Mat

chin

g sc

ore

max

h /3 max last

Recommended point in sorted requirements to stop inspecting

Page 22: Change Impact Analysis for Natural Language Requirements

Empirical Evaluation

Page 23: Change Impact Analysis for Natural Language Requirements

Research Questions

• Which similarity measures perform best?

• How effective is our approach, using the guidelines?

23

Page 24: Change Impact Analysis for Natural Language Requirements

Case Studies

24

Case-A

• 160 Requirements• 9 Change Scenarios

Case-B

• 72 Requirements• 5 Change Scenarios

Page 25: Change Impact Analysis for Natural Language Requirements

Change Scenarios

25

ID Propagation Condition Pattern Size of Impact SetA.1 ⟨NP⟩ AND ⟨NP⟩ 4

A.2 ⟨NP⟩ OR ⟨NP⟩ 8A.3 ⟨NP⟩ 39A.4 (⟨NP⟩ OR ⟨NP⟩) AND ⟨NP⟩ 5A.5 ⟨NP⟩ OR ⟨NP⟩ 10A.6 ⟨NP⟩ AND ⟨NP⟩ 3A.7 ⟨NP⟩ AND ⟨NP⟩ 7A.8 ⟨NP⟩ OR ⟨NP⟩ 5A.9 ⟨verbatim-text⟩ AND ⟨NP⟩ 3B.1 ⟨NP⟩ AND ⟨NP⟩ 2B.2 ⟨NP⟩ 9B.3 ⟨NP⟩ AND ⟨NP⟩AND ⟨NP⟩ 1B.4 ⟨NP⟩ AND ⟨NP⟩ 1B.5 (⟨NP⟩ OR ⟨NP⟩) AND (⟨NP⟩ OR ⟨NP⟩) 9

Page 26: Change Impact Analysis for Natural Language Requirements

26

Syntactic MeasuresBlock Distance

Cosine SimilarityDice’s coefficient

EuclideanJaccard

Jaro Jaro WinklerLevenstein

Monge Elkan SOFTTFIDF

Semantic MeasuresHSO JCNLCHLESK

LESK_TANIMLIN

PATHRESWUP

Which Similarity Measures Perform Best?

RecommendedBest inCase-A Best in

Case-B

Page 27: Change Impact Analysis for Natural Language Requirements

“touristic attraction” is a

“point of interest”

Reason: Lack of a Domain Model

1 impacted requirement missed out of a total of 106 impacted

requirements.

Effectiveness of Our Approach

27

Futil

e Ins

pect

ion Ef

fort

1% - 7% 6% - 8%

45%

Page 28: Change Impact Analysis for Natural Language Requirements

Key Points from Evaluation

28

Choice of Similarity Measures Effectiveness Execution Time

Page 29: Change Impact Analysis for Natural Language Requirements

Related Work

• A. Goknil et. al. 2014 - Change Impact Analysis in requirements using dependency model with formal semantics

• J. Cleland-Huang et. al. (2005) - Soft goal dependencies for analysing the impact of changes in functional requirements to non-functional requirements

• Yang et. al. (2011) - Use of NLP (text chunking) for resolving ambiguities in requirements

• J. Cleland-Huang, “Traceability in agile projects,” in Software and Systems Traceability, J. Cleland-Huang, O. Gotel, and A. Zisman, Eds. Springer, 2012.

29

Just-In-Time Traceability

Page 30: Change Impact Analysis for Natural Language Requirements

Future Work

• Address the limitation concerning tacit dependencies between the requirements

• More empirical studies - especially user studies - relations between other NL artefacts, such as test cases

30

Page 31: Change Impact Analysis for Natural Language Requirements

31

Additional Artefacts

Guidelines

https://sites.google.com/site/svvnarcia/