ambiguity in requirements engineering

25
Ambiguity in Requirements Engineering Alessio Ferrari 1 1 ISTI-CNR, Pisa, Italy [email protected] November 30, 2017 A. Ferrari (ISTI) Ambiguity 1 / 25

Upload: others

Post on 04-May-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Ambiguity in Requirements Engineering

Ambiguity in Requirements Engineering

Alessio Ferrari1

1ISTI-CNR, Pisa, [email protected]

November 30, 2017

A. Ferrari (ISTI) Ambiguity 1 / 25

Page 2: Ambiguity in Requirements Engineering

Scope

Ambiguity in written requirements (a little)Ambiguity in requirements elicitation interviews (a little more)I will not mention ambiguity in other phases (analysis, negotiation)Pointers to papers will be provided

(Sorry if you already saw part of the content of this presentation)

A. Ferrari (ISTI) Ambiguity 2 / 25

Page 3: Ambiguity in Requirements Engineering

Definition(s) of Ambiguity (from Berry, Kamsties and Krieger, 2003)

Focus on WRITTEN natural language (NL) requirementsDictionary Definition: (1) the capability of being understood intwo or more possible senses or ways; (2) uncertaintySoftware Engineering: There are two major types of ambiguities:

I Language ambiguities (lexical, syntactic, etc.)I Software engineering ambiguities – depend on the domain

involved, require domain knowledge to be identified

Some authors consider only expression inadequacy as source ofambiguityOthers consider missing information as an additional source –people leave out self-evident factsAmbiguity is related to incompleteness

“ambiguity” is ambiguous!

A. Ferrari (ISTI) Ambiguity 3 / 25

Page 4: Ambiguity in Requirements Engineering

Ambiguity in RE (from Berry, Kamsties and Krieger, 2003)

Property of an expression of being interpreted in multiple ways

Vagueness: the sentence admits borderline cases (e.g., Avoidlong C functions)Generality: the sentence/term needs to be specified more (e.g.,The interface shall be coded in Java)

Lexical ambiguity: term has different unrelated vocabularymeanings (e.g., bank)Syntactic ambiguity: sentence has more than one syntax tree(e.g., Structured approaches and tools)Semantic ambiguity: sentence can be translated into more thanone logic expression (e.g., All lights have a switch)

Pragmatic ambiguity: the meaning depends on the context – othersentences, domain knowledge, common-sense, viewpoint

A. Ferrari (ISTI) Ambiguity 4 / 25

Page 5: Ambiguity in Requirements Engineering

Pragmatic Ambiguity (RE’12, AIRE’14)

There is a MOLE

at WORK

mh...

A. Ferrari (ISTI) Ambiguity 5 / 25

Page 6: Ambiguity in Requirements Engineering

Towards Ambiguity in Interviews (RE’15)

Several automated procedures for other types of ambiguity(QuARS, ARM, SREE, etc.)We wanted to study pragmatic ambiguities, but we needed dataWith Paola Spoletini, we started to perform interviews, to get thedata we neededWe performed 34 unstructured interviewsWe annotated all the cases that the analyst perceived asambiguous (232)It became clear that a new classification was needed

A. Ferrari (ISTI) Ambiguity 6 / 25

Page 7: Ambiguity in Requirements Engineering

Example: Fitness Tamagochi

Requirements AnalystCustomer

You can decide what type of character you

want to create

So you can choose the character?

Actually, you cannot. You can possibly become a specific

character

Tamagochi does not let you choose

the character

A. Ferrari (ISTI) Ambiguity 7 / 25

Page 8: Ambiguity in Requirements Engineering

Example: Train Protection System

Requirements AnalystCustomer

I want the train to stop within 50 meters

if a red signal is passed

It may not be possible if you go at 130 km/h

I meant, in shunting mode [max: 30 km/h]

Trains going at full speed need

hundreds of meters to stop

A. Ferrari (ISTI) Ambiguity 8 / 25

Page 9: Ambiguity in Requirements Engineering

Ambiguity seemed to be connected toincompleteness and inconsistency!

A. Ferrari (ISTI) Ambiguity 9 / 25

Page 10: Ambiguity in Requirements Engineering

Definition of Ambiguity

Ambiguity in InterviewsAn ambiguity occurs in a requirements elicitation interview when acustomer articulates a unit of information, and the meaning assignedby the requirements analyst to this articulation differs from themeaning intended by the customer.

Unit of information: system need or domain-related aspectArticulation: any speech fragmentMeaning: contextual meaning

We include cases in which the analyst cannot give any interpretation

A. Ferrari (ISTI) Ambiguity 10 / 25

Page 11: Ambiguity in Requirements Engineering

The Context of the Analyst (REJ’16)

INTERPRETATION

ACCEPTANCE

SPEECHFRAGMENT

ACCESS

Requirements

Goals

Domain

Specification

D-Goals

D-Rules

D-Application

Context

A. Ferrari (ISTI) Ambiguity 11 / 25

Page 12: Ambiguity in Requirements Engineering

Ambiguity Types: Correct Disambiguation

Requirements AnalystCustomer

Context

A. Ferrari (ISTI) Ambiguity 12 / 25

Page 13: Ambiguity in Requirements Engineering

Ambiguity Types: Correct Disambiguation

What I hear has an interpretationThe interpretation matches with the one intended by the customerThe interpretation is consistent with the contextThe interpretation appears sufficiently complete

A. Ferrari (ISTI) Ambiguity 13 / 25

Page 14: Ambiguity in Requirements Engineering

Ambiguity Types: Interpretation Unclarity

Requirements AnalystCustomer

?

A. Ferrari (ISTI) Ambiguity 14 / 25

Page 15: Ambiguity in Requirements Engineering

Ambiguity Types: Acceptance Unclarity (Train)

Requirements AnalystCustomer

A. Ferrari (ISTI) Ambiguity 15 / 25

Page 16: Ambiguity in Requirements Engineering

Ambiguity Types: Detected Incorrect Disambiguation (Tamagochi)

Requirements AnalystCustomer

A. Ferrari (ISTI) Ambiguity 16 / 25

Page 17: Ambiguity in Requirements Engineering

Ambiguity Types: Undetected Incorrect Disambiguation

Requirements AnalystCustomer

A. Ferrari (ISTI) Ambiguity 17 / 25

Page 18: Ambiguity in Requirements Engineering

Ambiguity Types: Multiple Understanding

Requirements AnalystCustomer

A. Ferrari (ISTI) Ambiguity 18 / 25

Page 19: Ambiguity in Requirements Engineering

Which are the Triggers? (RE’16)

Under-specified terms (U): people, knowledge, movement, area,rule, data, category, interface, thing, detail

I “The interface shall be coded in Java”

Vague terms (V): minimal, as much as possible, later, taking intoaccount, based on, appropriate

I “The loading time shall be minimal”

Pronouns (P): he, she, it, this, those, which, thatI “The system sends a message to the receiver, and it sends an

acknowledge message”

Quantifiers (Q): all, for each, many, some, bothI “All lights have a switch”

Domain-specific terms (D-S): connoisseurship method, herpeszoster, systemic disease, Program

A. Ferrari (ISTI) Ambiguity 19 / 25

Page 20: Ambiguity in Requirements Engineering

Same Category of Trigger, but Different Ambiguity Type

Example 1 - Under-specified Term → Multiple UnderstandingMobile application that monitors the use of the mobile phoneExample: “Maybe the system could give me also somerecommendations”Interpretations: positive (this app could be useful to you) ornegative recommendations (do not use this app)

A. Ferrari (ISTI) Ambiguity 20 / 25

Page 21: Ambiguity in Requirements Engineering

Same Category of Trigger, but Different Ambiguity Type

Example 2 - Under-specified Term → Undetected IncorrectDisambiguation

A system to monitor the diet of patients for research purposesExample: “We analyse a representative sample of the population”representative sample == volunteers (Undetected incorrectdisambiguation)“People tell lies about their diet” (Acceptance unclarity)representative sample == randomly selected people

A. Ferrari (ISTI) Ambiguity 21 / 25

Page 22: Ambiguity in Requirements Engineering

Observations

The majority of ambiguity cases were due to under-specifiedterms and by fragmentsExample: “I want the train to stop within 15 meters if a red signalis passed” ; “I can go and ask for a product” (go WHERE?)

Current research concerning triggers in NL requirements accountsfor about 10% of the ambiguity cases in interviews (pronouns,quantifiers and vague terms)The remaining 90% of the cases (under-specified, domain-specificand fragments) require further research

A. Ferrari (ISTI) Ambiguity 22 / 25

Page 23: Ambiguity in Requirements Engineering

Current Research: Using Argumentation (RE’17)

I take a sample of the population to

survey

The sample is composed of volunteers

Volunteers do not liePeople lie

The sample is composed of

randomly selected people

A. Ferrari (ISTI) Ambiguity 23 / 25

Page 24: Ambiguity in Requirements Engineering

Current Research: Domain-specific Ambiguity (AIRE’17)

A. Ferrari (ISTI) Ambiguity 24 / 25

Page 25: Ambiguity in Requirements Engineering

References

Alessio Ferrari, Stefania Gnesi: Using collective intelligence to detect pragmaticambiguities. RE 2012: 191-200

Alessio Ferrari, Giuseppe Lipari, Stefania Gnesi, Giorgio Oronzo Spagnolo: Pragmaticambiguity detection in natural language requirements. AIRE 2014: 1-8

Alessio Ferrari, Paola Spoletini, Stefania Gnesi: Ambiguity as a resource to disclose tacitknowledge. RE 2015: 26-35

Alessio Ferrari, Paola Spoletini, Stefania Gnesi: Ambiguity Cues in RequirementsElicitation Interviews. RE 2016: 56-65

Alessio Ferrari, Paola Spoletini, Stefania Gnesi: Ambiguity and tacit knowledge inrequirements elicitation interviews. Requir. Eng. 21(3): 333-355 (2016)

Yehia Elrakaiby, Alessio Ferrari, Paola Spoletini, Stefania Gnesi, Bashar Nuseibeh: UsingArgumentation to Explain Ambiguity in Requirements Elicitation Interviews. RE 2017:51-60

Alessio Ferrari, Beatrice Donati, Stefania Gnesi: Detecting Domain-Specific Ambiguities:An NLP Approach Based on Wikipedia Crawling and Word Embeddings. AIRE 2017:393-399

A. Ferrari (ISTI) Ambiguity 25 / 25