SlideShare a Scribd company logo
1 of 95
Download to read offline
Ambiguity Problems in Software Engineering
Alessio Ferrari1
1ISTI-CNR, Pisa, Italy
alessio.ferrari@isti.cnr.it
25 Nov, 2016
A. Ferrari (ISTI) Ambiguity 1 / 95
Software Everywhere
A. Ferrari (ISTI) Ambiguity 2 / 95
Big Software
A. Ferrari (ISTI) Ambiguity 3 / 95
Big Failures
A. Ferrari (ISTI) Ambiguity 4 / 95
Software Engineering
Software engineering it the systematic design and development of
software products and the management of the software process.
Software engineering has as one of its primary objectives the
production of programs that meet specifications, and are demonstrably
accurate, produced on time, and within budget.
A. Ferrari (ISTI) Ambiguity 5 / 95
Software Engineering
A. Ferrari (ISTI) Ambiguity 6 / 95
Requirements
A. Ferrari (ISTI) Ambiguity 7 / 95
Requirements Engineering
Requirements engineering is the branch of software engineering
concerned with the real-world goals for, functions of, and
constraints on software systems.
It is also concerned with the relationship of these factors to
precise specifications of software behavior, and to their evolution
over time and across software families.
A. Ferrari (ISTI) Ambiguity 8 / 95
The Requirements Process (Requirements Definition)
Elicitation
Analysis
Documentation
Validation
Transcripts
of Meetings
with Customers
Models
Structured
Requirements
Document
Requirements
with
Defects
A. Ferrari (ISTI) Ambiguity 9 / 95
Examples of Requirements
Definitions: ETCS, driver, RBC, DMI, etc.
ETCS shall provide the driver with information to allow him to drive
the train safely.
If the supervision is performed by a RBC it shall be possible to
prevent movements of a traction unit in its area if not authorised
by the RBC.
In case the transition has to be acknowledged and the driver fails
to acknowledge as required, the ETCS shall initiate a brake
application.
Partial Supervision shall be indicated on the DMI.
Diagrams: to understand how requirements relate to each other
A. Ferrari (ISTI) Ambiguity 10 / 95
Observations
Requirements processes differ from company to company, and
from market type to market type
Safety-critical companies shall write requirements, in other cases
this is not required
Small companies might have a single customer asking for a
simple application, requirements might come from one person
Business-to-Business software might involve more stakeholders
(e.g., a system to assist doctors in diagnoses)
Consumer’s software (e.g., MS Word) is for the market,
requirements come from several people (that nevert asked for a
product)
Often, a product is already developed and requirements imply
changes to the product
Requirements belong to different classes
(functional/non-functional)
A. Ferrari (ISTI) Ambiguity 11 / 95
Concepts: Requirement, Specification, Domain Assertion
A. Ferrari (ISTI) Ambiguity 12 / 95
Michael Jackson’s Model
When we build a SYSTEM we make a change in a portion of the
WORLD that we call ENVIRONMENT
ENVIRONMENT SYSTEM
WORLD
INTERFACE
The SYSTEM and the ENVIRONMENT interact through an
INTERFACE (i.e., sensors and actuators)
A. Ferrari (ISTI) Ambiguity 13 / 95
Concepts
ENVIRONMENT SYSTEM
WORLD
INTERFACE
RD S P M
Domain
Assertion
Requirement Specification Program Machine
A. Ferrari (ISTI) Ambiguity 14 / 95
Concepts
Domain assertions (D): all the conditions over phenomena of the
environment that we know (or presume) to be true, regardless of
the system
Requirements (R): all the conditions over phenomena of the
environment that we want to make true by developing the system
Specifications (S): description of conditions and actions
occurring at the interface between the environment and the
system. Provides enough information for a programmer to build
the system
Program (P): implementation of the specifications
Machine (M): hardware, sensors and actuators that support the
program
A. Ferrari (ISTI) Ambiguity 15 / 95
Example: Patient Monitoring System
ENVIRONMENT
SYSTEM
D1: there is always a nurse close enough
to hear the buzzer
D2: the sound from the heart below a
threshold T indicates that the heart is
about to stop
R: the system shall notify the nurse if the patient's heartbeat stops
S: if the sound from the sensor falls below a
threshold T, the system shall actuate the buzzer
P: the program
M_v: the sensor and the buzzer
M_h: the rest of the harware
A. Ferrari (ISTI) Ambiguity 16 / 95
Objective of Requirements Engineering
Identify R, S and D, so that if a system whose behaviour satisfies S is
installed in the environment, and the environment has the properties
described in D, then the environment will exhibit the properties
described in R.
D, S ` R
Read it as: The Specification S, under the constraints expressed
in D, satisfies the Requirements R
Requirements speak the language of the environment (i.e., the
domain – medical, public administration, etc.)
Specifications speak the language of the interface, and are
expressed in terms of shared phenomena
A. Ferrari (ISTI) Ambiguity 17 / 95
Observation
The formalisation is useful if I am using a formal language to
define requirements and specifications
The formalisation is only a guideline in practice, because the R
and D speak about the world, which is not formal!
In practice, requirements and specifications are rarely formal
Requirements and specifications are often expressed in Natural
Language (NL)
The formalisation is still useful, and, even when expressing R, S
and D in NL, you should keep it in mind
A. Ferrari (ISTI) Ambiguity 18 / 95
Requirements or Specifications?
1 Only authorised people shall be able to enter the park
2 The system shall allow only authorised people to enter the park
3 Only people who has payed the fee shall be able to enter the park
4 The system shall release a receipt, after the user has inserted coins, if
the user has introduced 3 coins
5 The system shall open the barrier, if 3 coins have been introduced
6 The system shall enter in state COUNT_COINS, when the coin sensor
senses the introduction of 1 coin, and the system is in state
WAIT_COINS
7 The system shall enter in state RELEASE_RECEIPT, if the user has
introduced 3 coins
A. Ferrari (ISTI) Ambiguity 19 / 95
Rule of Thumb
If a Customer can read it, it’s a Requirement
If a Customer cannot read it, it’s a Specification
A. Ferrari (ISTI) Ambiguity 20 / 95
Adding some Confusion: System and Software Specifications
If I am defining System Specifications (S-SYS), then the hardware
elements are part of the system, and part of them appear in the
interface (as in the previous example)
If I am defining Software Specifications (S-SW), then the
hardware elements are part of the environment, and hence in the
specification I will speak about abstract variables to be set. These
variable are considered to be part of the interface (i.e., they are
the variables used by the drivers).
A. Ferrari (ISTI) Ambiguity 21 / 95
Example: Patient Monitoring System
ENVIRONMENT
SOFTWARE
D1: there is always a nurse close enough
to hear the buzzer
D2: the sound from the heart below a
threshold T indicates that the heart is
about to stop
R (S-SYS): if the sound from the sensor falls below a threshold T,
the system shall actuate the buzzer
S (S-SW): the software shall set BUZZER = ON,
if SOUND < T.
P: the program
M: see previous slide
A. Ferrari (ISTI) Ambiguity 22 / 95
This is just a practical solution!
This is just a practical solution to overcome the problem of
separating system and software specifications, as asked in the
context of embedded safety-critical systems.
In this lecture, we will mainly speak about system specifications.
If sensors and actuators are just keyboards and screens, then the
software specification is the system specification.
WARNING: in the literature, when you read software specification,
the authors often mean system specification.
A. Ferrari (ISTI) Ambiguity 23 / 95
Adding more Confusion: Software Requirements Specification
We have seen that Requirements and Specifications are different
So what the hell is a Software Requirements Specification (SRS)?
It is a document that specifies the Requirements OR the
Specification, OR both
It depends on who is going to read the document
A. Ferrari (ISTI) Ambiguity 24 / 95
So What to Do?
Keep in mind the distinction between R, S and D
When you write a statement, make an effort to place it in R, S or D
If a company has a single standard document to edit R and S,
follow that, and separate R, S, and D
If a company distinguishes between user/customer requirements
and system/software requirements, then place R and D in the
former, S in the latter, and trace them.
If a company further distinguishes between system and software
requirements, then follow the suggestion given in a previous slide.
If a company does not have a standard document to edit
requirements and specifications, then use the template in the
IEEE Std 830-1998(R2009), which is nice.
Consider who’s going to read the document! (Customer,
Developer, Tester, etc.)
A. Ferrari (ISTI) Ambiguity 25 / 95
Adding more and more Confusion: Goals
A requirement tells us WHAT the system shall do
A GOAL tells us WHY the system shall do that thing
Example
Requirement: the system shall notify the nurse if the patient’s
heartbeat stops
Goal: patients whose heartbeat is going to stop shall be saved
Expectation: when the nurse hears the buzzer, the nurse saves
the patient
Goals are useful in Requirements Analysis
(Completeness) Which other requirements are needed to address
the GOAL?
(Alternatives) Is there an alternative approach?
(Obstacles) What can be an obstacle for that GOAL?
A. Ferrari (ISTI) Ambiguity 26 / 95
Requirements Elicitation: Ambiguity Problems
A. Ferrari (ISTI) Ambiguity 27 / 95
Requirements Elicitation
Requirements Analyst
Customer
Other Stakeholders Existing Documentation
Legacy Software
REQUIREMENTS
A. Ferrari (ISTI) Ambiguity 28 / 95
Interviews
Requirements AnalystCustomer
A. Ferrari (ISTI) Ambiguity 29 / 95
Tacit Knowledge
Requirements AnalystCustomer
Tacit Knowledge
A. Ferrari (ISTI) Ambiguity 30 / 95
Ambiguity and Tacit Knowledge
During requirements elicitation interviews, ambiguity may hamper
communication with the customer
Ambiguity is also a resource to disclose tacit knowledge
The customer might use domain-specific terms, or might express
concepts that are complex to be communicated
The occurrence of an ambiguity might reveal the presence of
unexpressed, system-relevant knowledge that needs to be elicited
A. Ferrari (ISTI) Ambiguity 31 / 95
Ambiguity as a Resource to Disclose Tacit Knowledge
Requirements AnalystCustomer
Tacit Knowledge
≠
A. Ferrari (ISTI) Ambiguity 32 / 95
Definition of Ambiguity
Ambiguity in Interviews
An ambiguity occurs in a requirements elicitation interview when a
customer articulates a unit of information, and the meaning assigned
by the requirements analyst to such articulation differs from the
meaning intended by the customer.
Unit of information: system need or domain-related aspect
Articulation: any speech fragment
We include cases where the analyst cannot give any interpretation
A. Ferrari (ISTI) Ambiguity 33 / 95
Example: Ambiguity in Interviews
Web-based platform where the citizens can send suggestions for
laws to the parliament
Ambiguity: “I want a dashboard to show (to the representatives
of the parliament) what’s going on in specific areas” (thematic or
geographical?)
A. Ferrari (ISTI) Ambiguity 34 / 95
Context of the Analyst
INTERPRETATION
ACCEPTANCE
SPEECH
FRAGMENT
ACCESS
Requirements
Goals
Domain
Specification
k
k
k
kCONCEPT
ACCESSIBLEa, i(k) = interpretablea,i(k) ^ acceptablea,i(k)
A. Ferrari (ISTI) Ambiguity 35 / 95
Phenomenology of Ambiguity
A. Ferrari (ISTI) Ambiguity 36 / 95
Ambiguity
ambiguousi(k) = articulatedc,i(k) ^ ¬articulatedc,i(k0
)^
(¬ACCESSIBLEa,i(k) _ interpretablea,i(k0
))
The customer articulates a unit of information k
through a speech fragment i
The unit of information k cannot be accessed
or i is interpreted as k0
Let us focus on the second line of the equation, which is:
¬interpretablea,i(k) _ ¬acceptablea,i(k)_
interpretablea,i(k0
)
A. Ferrari (ISTI) Ambiguity 37 / 95
Categories of Ambiguity
k k0
Phenomenon
¬interpretable(k) ¬acceptable(k) ¬interpretable(k0
) - interpretation unclarity
interpretable(k) ¬acceptable(k) ¬interpretable(k0
) - acceptance unclarity
interpretable(k) acceptable(k) interpretable(k0
)
acceptable(k0
) multiple understanding
¬acceptable(k0
) correct disambiguation
- ¬acceptable(k) interpretable(k0
)
acceptable(k0
) undetected incorrect disambiguation
¬acceptable(k0
) detected incorrect disambiguation
Four Main Classes
Unclarity
Multiple Understanding
Incorrect Disambiguation
Correct Disambiguation
A. Ferrari (ISTI) Ambiguity 38 / 95
Ambiguity Types: Correct Disambiguation
Requirements AnalystCustomer
View of the
Problem
A. Ferrari (ISTI) Ambiguity 39 / 95
Ambiguity Types: Correct Disambiguation
What I hear has an interpretation
The interpretation is consistent
The interpretation is sufficient
In practice: what I hear does not rise any question
A. Ferrari (ISTI) Ambiguity 40 / 95
Ambiguity Types: Interpretation Unclarity
Requirements AnalystCustomer
?
A. Ferrari (ISTI) Ambiguity 41 / 95
Ambiguity Types: Acceptance Unclarity
Requirements AnalystCustomer
A. Ferrari (ISTI) Ambiguity 42 / 95
Example
Interpretation Unclarity
Use of domain jargon (e.g., “connoisseurship method” for History
of Arts expert)
Use of vague terms (e.g., “(The app changes the color of the wall)
taking light into account”)
Acceptance Unclarity
(Domain) “If you do not recycle a thing because the municipality
did not signal that it was recyclable, you will not get a fine”
A. Ferrari (ISTI) Ambiguity 43 / 95
Ambiguity Types: Detected Incorrect Disambiguation
Requirements AnalystCustomer
A. Ferrari (ISTI) Ambiguity 44 / 95
Ambiguity Types: Undetected Incorrect Disambiguation
Requirements AnalystCustomer
A. Ferrari (ISTI) Ambiguity 45 / 95
Example
Detected Incorrect Disambiguation: Fitness Tamagochi
“You can decide what type of character you want to create”
(Acceptance Unclarity - Domain) “So, you can choose the
character?”
“Actually you cannot [...] you can possibly become (a specific
character)”
Undetected Incorrect Disambiguation: Automated Baby-swinger
“I want something that can change. A component that relax her
(the daughter) is that she feels the novelty in the movement”
Incorrect disambiguation: change in frequency
“You can choose different sequences of movement, three in this
direction, two in this direction” (Acceptance Unclarity - Req)
Correct interpretation: change in direction
A. Ferrari (ISTI) Ambiguity 46 / 95
Ambiguity Types: Multiple Understanding
Requirements AnalystCustomer
A. Ferrari (ISTI) Ambiguity 47 / 95
Example
Multiple Understanding
Web-based platform where the citizens can send suggestions for
laws to the parliament
“A dashboard to show (to the representatives of the parliament)
what’s going on in specific areas” (thematic or geographical?)
“The application should be connected to a social network”
(internal or external?)
A. Ferrari (ISTI) Ambiguity 48 / 95
Which are the Triggers?
We have unpacked ambiguity from the point of view of the Analyst
Do we have specific terms/fragments in the words of the customer
that typically trigger the ambiguity?
Can we categorise them?
A. Ferrari (ISTI) Ambiguity 49 / 95
Term Triggers
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 into
account, based on, appropriate
I “The loading time shall be minimal”
Pronouns (P): he, she, it, this, those, which, that
I “The system sends a message to the receiver, and it sends an
acknowledge message”
Quantifiers (Q): all, for each, many, some, both
I “All lights have a switch”
Domain-specific terms (D-S): connoisseurship method, herpes
zoster, systemic disease, Program
A. Ferrari (ISTI) Ambiguity 50 / 95
Same Category of Trigger, but Different Ambiguity Type
Example 1 - Under-specified Term ! Multiple Understanding
Mobile application that monitors the use of the mobile phone
Example: “Maybe the system could give me also some
recommendations”
Interpretations: Positive (this app could be useful to you) or
negative recommendations (do not use this app)
Example 2 - Under-specified Term ! Undetected Incorrect
Disambiguation
A system to monitor the diet of patients for research purposes
Example: “We analyse a representative sample of the population”
representative sample == volunteers (Undetected incorrect
disambiguation)
“People tell lies about their diet” (Acceptance unclarity)
representative sample == randomly selected people
A. Ferrari (ISTI) Ambiguity 51 / 95
Quantitative View - Domain Experts (DE) set
term (U)	
32%	
term (V)	
4%	
term (Q)	
3%	
term (P)	
1%	
term (D-S)	
13%	
Fragment	
47%	
DE set	
A. Ferrari (ISTI) Ambiguity 52 / 95
Quantitative View - Software Engineers (SE) set
term (U)	
39%	
term (V)	
7%	
term (Q)	
3%	
term (P)	
3%	 term (D-S)	
8%	
Fragment	
40%	
SE set	
A. Ferrari (ISTI) Ambiguity 53 / 95
Observations
The majority of ambiguity cases were due to under-specified
terms and by fragments
Example: “What type of information would you like to search?”
“For example, the name of a street”
Current research concerning cues in NL requirements accounts
for about 10% of the ambiguity cases in interviews (pronouns,
quantifiers and vague terms)
The remaining 90% of the cases (under-specified, domain-specific
and fragments) require further research
A. Ferrari (ISTI) Ambiguity 54 / 95
Requirements Analysis (Pointers)
A. Ferrari (ISTI) Ambiguity 55 / 95
Requirements Analysis
Requirements analysis is what you do after you met the customer, to:
Reason on R and D, to write down a document that the customer
can read
Reason on R, D, and S to write down a (possibly separate)
document that your programmers can read
Often, you are going to write a single SRS with both R, S, and D
From now on, I will speak about writing a SRS, meaning a
document including R, S, and D
Several techniques exist, I will give you just some pointers, since this
lecture focuses on ambiguity
A. Ferrari (ISTI) Ambiguity 56 / 95
Example: Car Park System
I want to build a system to automate the payment for a private car
park
The typical scenario is:
1 a car enters from an entrance barrier and the driver takes an
entrance receipt from an entrance device
2 the driver parks the car
3 when the driver has to leave the park, he goes to a payment
machine and inserts the entrance receipt
4 the machine computes the amount of money due
5 the driver pays and the machine releases an exit receipt
6 the driver inserts the exit receipt in an exit device, and the driver
exits from the exit barrier
The system also monitors the number of free places in the park
A. Ferrari (ISTI) Ambiguity 57 / 95
Pointer 1: Context Diagram
System
Car
Barrier
Park
Coin
Customer
Shared Phenomena
A. Ferrari (ISTI) Ambiguity 58 / 95
Pointer 2: Prototyping and Mock-ups
Googlehttp:/carpark.it
My-Car Park Monitor
Select a date
30 329 1 23128
2421 23 25 272622
201814 17 191615
129 1187 10 13
S
6
F
5
T
4
W
3
T
21
M
30
S
December 2008
Select Today
Check Failed
Payment Machine
See Car Park
Occupation
A. Ferrari (ISTI) Ambiguity 59 / 95
Pointer 3: Use Case and UML
Enter Car Park
Car Driver
Car Park Surveillant
Monitor Car Park
Exit Car Park
Pay Parking
A. Ferrari (ISTI) Ambiguity 60 / 95
Pointer 4: Goal Modelling
Profits
Improved
Automatic Car
Park Defined
Car Entrance
Automated
Car Exit
Automated
Payment
Automated
Verification of
Payment
AchievedOpen Barrier
Achieved
Close After
Pass Achieved
Trigger to Open
Barrier
Achieved
Open Barrier if
Payment
Achieved
Button System
Implemented
Open Photocell
System
Implemented
Verify Money
Achieved
Release
Receipt
Achieved
AND
OR
Open Button
Controller
Photocell
Controller
Counter
Implemented
Close Photocell
System
Implemented
Payment MachineBarrier Controller Exit Controller
A. Ferrari (ISTI) Ambiguity 61 / 95
Documentation: Using NL Templates
A. Ferrari (ISTI) Ambiguity 62 / 95
Documentation: Using NL Templates
SRS are written in Natural Language (NL), because several
stakeholders with diverse skills have to interact with them
SRS are written in NL, because formalisation is not possible at
this stage of the development
As spoken language is ambiguous, so it is written language
In a conversation, I can ask clarifications, but when a document is
written, it is not always that easy
A. Ferrari (ISTI) Ambiguity 63 / 95
A. Ferrari (ISTI) Ambiguity 64 / 95
Rupp’s Template (more appropriate for R)
between. For an automated tool to deem R1 as conformant,
it has to correctly distinguish these three slots in the follow-
ing: “monitor system configuration changes posted to the
database”. A second important issue is that even when a
slot falls in between fixed elements, e.g., hwhom?i, and is
thus easy to delineate, there is no way to distinguish an
acceptable filler for the slot from an unacceptable one, e.g., a
grammatically-incorrect phrase. For instance, in R1, we may
accept “system administrator” as correctly filling hwhom?i,
but we may be unwilling to accept a grammatically-incor-
rect phrase such as “system administer” for the slot.
and define the glossary terms after the requirements have
sufficiently matured and are thus less likely to change. This
strategy avoids wasted effort at the glossary construction
stage, but it also means that the glossary will not be ready
in time to support activities such as template conformance
checking (TCC), which often take place during requirements
writing. Furthermore, the literature suggests that glossaries
may remain incomplete throughout the entire development
process [14], thus providing only partial coverage of the
glossary terms. This implies that automated techniques for
checking conformance to templates would have limited
effectiveness if such techniques rely heavily on the glossary
Fig. 1. Rupp’s template [5].
ARORA ET AL.: AUTOMATED CHECKING OF CONFORMANCE TO REQUIREMENTS TEMPLATES USING NATURAL LANGUAGE PROCESSING 945
A. Ferrari (ISTI) Ambiguity 65 / 95
EARS Template (more appropriate for S)
[16], [17], [18] and discussed in Section 2.1. In both of
the studies that use Rupp’s template, the require-
ments were written directly by professionals. As for
the two studies using EARS, one—which is the larg-
est case study reported in this article—was written
directly by professionals as well, while the remain-
ing study uses transformed requirements from one
of our two case studies based on Rupp’s template.
The results from our case studies indicate firstly, that
templates and NLP to the extent needed in our approac
Section 3 describes our approach for automation of TC
Section 4 discusses tool support. Sections 5 presents the ca
studies we have conducted to evaluate our approac
Section 6 identifies the limitations and analyzes threats
validity. Section 7 compares our approach with relat
work. Section 8 concludes the article with a summary a
directions for future work.
. 3. The EARS template [16].
6 IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 41, NO. 10, OCTOBER 2
A. Ferrari (ISTI) Ambiguity 66 / 95
Validation: Sins of the Requirements Engineer, and NL Ambiguity
A. Ferrari (ISTI) Ambiguity 67 / 95
9 Sins of the Requirements Engineer
Noise: Presence into the text of an element not adding problem
relevant information
“The car park has three elevators”
Silence: Existence of a characteristics of the problem not covered
by any text element
Have I though about the limit in the number of places
in the car park?
“If the user has inserted the correct amount of
money, the system shall release a receipt” (what if
the amount is not correct?)
Overspecification: Presence into the text of an element not
corresponding to any characteristic of the problem but to
possible implementation characteristics
“When a car enters the park, the system shall add
one to the car counter”
A. Ferrari (ISTI) Ambiguity 68 / 95
9 Sins of the Requirements Engineer (continue)
Contradiction: presence into the text of two or more elements
defining system characteristics in a inconsistent way
“Only when the red button is pressed, the system
shall release the receipt”
“The system shall release the receipt when the user
inserts coins”
Ambiguity: presence into the text of an element that makes possible
different interpretations of one characteristic of the system
“When the user presses the button, the system shall
release the receipt” - which button?
A. Ferrari (ISTI) Ambiguity 69 / 95
9 sins of the Requirements Engineer (continue)
Forward references: presence into the text of an element using
characteristics of the problem defined below
Consider the red button is defined after you tell how
to use it
Wishful thinking: presence into the text of an element defining a
characteristic of the problem so that a possible solution of
this problem cannot be realistically validated
“The car park receipt shall not be thrown away after
parking”
A. Ferrari (ISTI) Ambiguity 70 / 95
9 sins of the Requirements Engineer (continue)
Synthesis presence of a requirement that states more than one
functionality, and hence needs multiple-tests
“The system shall allow the car driver to enter and
exit from the park”
Repetition: presence of multiple statements expressing the same
requirement
“The system shall show the amount of money due,
after the user has inserted the entrance card”
“If the user provided the entrance card, the system
shall visualise the amount of money due”
A. Ferrari (ISTI) Ambiguity 71 / 95
9 Sins - Summary
1 Noise = irrelevant information
2 Silence = absence of relevant information
3 Overspecification = implementation-related information
4 Contradiction = contradictory information
5 Ambiguity = multiple interpretations possible
6 Forward references = wrong information sequence
7 Wishful thinking = potential validation problems
8 Synthesis = potential validation problems
9 Repetition = potential validation problems, and ambiguity
A. Ferrari (ISTI) Ambiguity 72 / 95
Ambiguity in NL Requirements
Templates are useful to reduce ambiguity, but ambiguity might still
be there
Moreover, templates are not always used in practice
We need more fine-grained lenses to reduce ambiguities
Previously, we have classified ambiguities depending on the way
they are perceived by a listener
The previous classes can be applied also for written text,
substituting the listener with the reader
Here, we classify the triggers of ambiguity in written language,
which can lead to different classes of ambiguities from the point of
view of the reader
These triggers can be applied also to spoken language, but they
are harder to detect (verba volant, scripta manent)
A. Ferrari (ISTI) Ambiguity 73 / 95
Categories of Ambiguity
Pure Ambiguities
Lexical: the terms used have different vocabulary meanings
Syntactic: the syntactic structure has more than one
interpretation
Semantic: no lexical or syntactic ambiguity, but the expression is
ambiguous
Quasi-Ambiguities
Vagueness: there are cases in which the meaning of the
expression cannot be established
Generality: the expression is too abstract
A. Ferrari (ISTI) Ambiguity 74 / 95
Lexical Ambiguities
Homonymy: words have unrelated meanings, but they have the
same written representations
Example: I went to the bank. (bank = ground close to a lake;
financial institution)
Polysemy: words have related different meanings, but they have
the same written representations
Example: There is a mole at work. (mole = animal; spy)
These types of ambiguity are rare in requirements, but it’s good to
know they exist, since they can occur during elicitation (e.g., “rilevato
sul piano cutaneo” - homonymy).
A. Ferrari (ISTI) Ambiguity 75 / 95
Syntactic Ambiguities
Analytical: a complex noun group with modifiers, and you do not
know which to which noun the modifiers refer
Example: The principal system administrator shall be able to
enter the data-base (principal = system or administrator?)
Attachment: a preposition (e.g., “with”, “for”, “by”) can be
attached to different parts of the sentence
Example: The system shall produce a resumee using a template
for the final assessment (for the final assessment: is the template,
or is it an objective?)
Coordination: complex combinations of AND/OR, or modifier +
AND/OR
Example: The system shall produce the plot or the data-log and
the legend.
Example: Novel employees and directors shall be provided with
a user-name and password
A. Ferrari (ISTI) Ambiguity 76 / 95
Syntactic Ambiguities (continues)
Elliptical: omission of words, which are expected to be deduced
from the context
Example: The system produces a positive notification in case of
success, and in case of failure doesn’t (does not produce any
notification at all?)
Anaphoric: usage of pronouns (e.g., he, it, his, this), which can
be referred to different nouns.
Example: “When the system sends a message to the receiver, it
shall provide an acknowledgement” (it = “system” or “receiver”?)
These are less frequent in spoken language, but rather frequent in
written requirements.
A. Ferrari (ISTI) Ambiguity 77 / 95
Semantic Ambiguities
These are due to ambiguous interactions of logical quantifiers (every,
each, all, any, some, none, a, etc.), and to the use of plurals.
Example: All lights have a switch (one for all, or one for each?)
Example: An alert shall be raised for each failure-mode (the
same alert?)
Example: The wrist-bands contain movement sensors (one-one,
one-many, many-one, many-many?)
Hint: do not use plurals, and be careful with quantifiers
These are also due to the usage of synonyms in requirements
Example: The system shall allow the car driver to insert coins
Example: The system shall release the receipt if the user has
payed
A. Ferrari (ISTI) Ambiguity 78 / 95
Generality
These cases are due to the usage of terms (names or verbs) that
are too abstract
They are not classified as ambiguities, because, depending on the
context, a more detailed description might not be required.
In requirements and specifications, generality can be reduced
through the vocabulary
Example: The system shall be able to produce the report
Example: The system shall be able to alert the user in case of
failure
Example: The system shall be able to produce a graph of the
workout of the customer
In the literature, generality problems are often marked as “pragmatic
ambiguities”. This often causes confusion. Pragmatic ambiguities are
concerned with the effect, while here we focus on triggers.
A. Ferrari (ISTI) Ambiguity 79 / 95
Vagueness
Vagueness occurs when an expression (often, adjective or
adverb) has not a uniquely quantifiable meaning.
Several vague expression can be listed (accurate, suitable,
appropriate, clearly, better, accordingly, depending on, if
necessary, if needed, etc.)
In general, avoid adjectives and adverbs
Example: The system shall be able to show the graph of the
workout if required
Example: The system shall be able to show a suitable
representation of the workout
Example: When appropriate, the system shall display low levels
of workout
A. Ferrari (ISTI) Ambiguity 80 / 95
Detecting Pragmatic Ambiguity (aka Generality, aka
Under-specification)
A. Ferrari (ISTI) Ambiguity 81 / 95
A Mole at Work
There is a
MOLE
at WORK
mh...
A. Ferrari (ISTI) Ambiguity 82 / 95
Pragmatic Ambiguity depends on the CONTEXT
Fe
-
+
Common Sense
Knowledge
Domain Knowledge
Other Requirements
Other Misterious Things
A. Ferrari (ISTI) Ambiguity 83 / 95
Pragmatic Ambiguity depends on the CONTEXT
Fe
-
+
Common Sense
Knowledge
Domain Knowledge
Other Requirements
Other Misterious Things
A. Ferrari (ISTI) Ambiguity 84 / 95
Approach for Pragmatic Ambiguity Detection
A. Ferrari (ISTI) Ambiguity 85 / 95
Domain knowledge acquisition for different readers
DOCUMENT SET 1 DOCUMENT SET 2
A. Ferrari (ISTI) Ambiguity 86 / 95
Different readers analyse the same requirement
REQUIREMENT
A. Ferrari (ISTI) Ambiguity 87 / 95
Different readers compare their interpretations
A. Ferrari (ISTI) Ambiguity 88 / 95
Overview
REQUIREMENT
DOMAIN
DOCUMENTS
Domain Knowledge
Graph Construction
Requirement Interpretation
Interpretation Comparison
A. Ferrari (ISTI) Ambiguity 89 / 95
Domain Knowledge Modelling
We model the domain knowledge as a weighted graph
Each node is a concept
Each edge represents a connection among concepts
The weight of the edge represent how close is the connection
between two concepts
The lower the weight, the closer the connection
The weight is derived from the number of co-occurrences
We build this weighted graph starting from Web pages
concerning the domain of the requirements document
A. Ferrari (ISTI) Ambiguity 90 / 95
Domain Knowledge Graphs
0.17
0.05
0.167
0.33
0.25
0.25
0.16 0.037
0.1
0.25
0.11 0.071
0.17
0.5
0.5
0.33
0.33
patient
observ
deathlocat
visit time
careinform
patient
risk
deathlocat
visit sourc
care
sign
contact
hospit
hospit
Lower weights indicate stronger connections
A. Ferrari (ISTI) Ambiguity 91 / 95
Requirements interpretation as a least-cost path search
Interpreting a requirement is activating the concepts of the
requirement in the knowledge graph
Activating two concepts in a requirement implies the activation of
other neighboring concepts
The concepts that are activated are those that are more closely
connected with the concepts in the requirement (i.e., their edges
have lower weight)
The interpretation of the requirement is a least-cost path search
within the domain knowledge graph
A. Ferrari (ISTI) Ambiguity 92 / 95
Requirements Interpretation
REQ. 1 - The system shall store patient data
system
store
patient
data
button
feedback
screen
database
retrieve
memory
content
location
vaccine
name
sickness
doctor
surname
ram
disk
A. Ferrari (ISTI) Ambiguity 93 / 95
Interpretation Comparison
system
storepatient
data
button
feedback screen
database
retrieve
memory
content
location
vaccine
name
sickness
doctor
noise
return
health
duration
care
9
10
5
9
9 + 10 + 5
σ = = 0.38 ="#< 0.5
AMBIGUITY
surname
ram
disk
A. Ferrari (ISTI) Ambiguity 94 / 95
Further Readings
Gunter, Carl, et al. “A reference model for requirements and specifications.” Requirements
Engineering, 2000. Proceedings. 4th International Conference on. IEEE, 2000.
Jackson, Michael. “The meaning of requirements.” Annals of Software Engineering 3.1
(1997): 5-21.
Zave, Pamela, and Michael Jackson. “Four dark corners of requirements engineering.”
ACM transactions on Software Engineering and Methodology (TOSEM) 6.1 (1997): 1-30.
Berry, Daniel M. "From contract drafting to software specification: Linguistic sources of
ambiguity-a handbook version 1.0." (2000).
Gleich, Benedikt, Oliver Creighton, and Leonid Kof. “Ambiguity detection: Towards a tool
explaining ambiguity sources.” Requirements Engineering: Foundation for Software
Quality. Springer Berlin Heidelberg, 2010. 218-232.
Van Lamsweerde, Axel. "Goal-oriented requirements engineering: A guided tour."
Requirements Engineering, 2001. Proceedings. Fifth IEEE International Symposium on.
IEEE, 2001.
Ferrari, Alessio, Paola Spoletini, and Stefania Gnesi. "Ambiguity and tacit knowledge in
requirements elicitation interviews." Requirements Engineering Journal (REJ), Springer,
2016.
Ferrari, Alessio, Stefania Gnesi. "Using collective intelligence to detect pragmatic
ambiguities." Requirements Engineering Conference (RE), 2012 IEEE 23rd International.
IEEE, 2012.
A. Ferrari (ISTI) Ambiguity 95 / 95

More Related Content

What's hot

Adbms 16 object definition language
Adbms 16 object definition languageAdbms 16 object definition language
Adbms 16 object definition languageVaibhav Khanna
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life CycleAbhishek Sur
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework Serhat Can
 
Buffer and scanner
Buffer and scannerBuffer and scanner
Buffer and scannerArif Ullah
 
Software architect design documentation template
Software architect design documentation templateSoftware architect design documentation template
Software architect design documentation templateSalim M Bhonhariya
 
Dependency Injection in iOS
Dependency Injection in iOSDependency Injection in iOS
Dependency Injection in iOSPablo Villar
 
Visibility control in java
Visibility control in javaVisibility control in java
Visibility control in javaTech_MX
 
Scope - Static and Dynamic
Scope - Static and DynamicScope - Static and Dynamic
Scope - Static and DynamicSneh Pahilwani
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in javaHrithikShinde
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbmssethu pm
 
Java Hibernate Programming with Architecture Diagram and Example
Java Hibernate Programming with Architecture Diagram and ExampleJava Hibernate Programming with Architecture Diagram and Example
Java Hibernate Programming with Architecture Diagram and Examplekamal kotecha
 
Dbms schema &amp; instance
Dbms schema &amp; instanceDbms schema &amp; instance
Dbms schema &amp; instancePapan Sarkar
 

What's hot (20)

3 tier architecture
3 tier architecture3 tier architecture
3 tier architecture
 
Adbms 16 object definition language
Adbms 16 object definition languageAdbms 16 object definition language
Adbms 16 object definition language
 
Srs
SrsSrs
Srs
 
SQL report
SQL reportSQL report
SQL report
 
Database Chapter 1
Database Chapter 1Database Chapter 1
Database Chapter 1
 
ASP.NET Page Life Cycle
ASP.NET Page Life CycleASP.NET Page Life Cycle
ASP.NET Page Life Cycle
 
Assemblies
AssembliesAssemblies
Assemblies
 
Python - Data Structures
Python - Data StructuresPython - Data Structures
Python - Data Structures
 
Introduction to Spring Framework
Introduction to Spring FrameworkIntroduction to Spring Framework
Introduction to Spring Framework
 
Buffer and scanner
Buffer and scannerBuffer and scanner
Buffer and scanner
 
Software architect design documentation template
Software architect design documentation templateSoftware architect design documentation template
Software architect design documentation template
 
Dependency Injection in iOS
Dependency Injection in iOSDependency Injection in iOS
Dependency Injection in iOS
 
Python-Encapsulation.pptx
Python-Encapsulation.pptxPython-Encapsulation.pptx
Python-Encapsulation.pptx
 
C# Overriding
C# OverridingC# Overriding
C# Overriding
 
Visibility control in java
Visibility control in javaVisibility control in java
Visibility control in java
 
Scope - Static and Dynamic
Scope - Static and DynamicScope - Static and Dynamic
Scope - Static and Dynamic
 
Access specifiers(modifiers) in java
Access specifiers(modifiers) in javaAccess specifiers(modifiers) in java
Access specifiers(modifiers) in java
 
Introduction & history of dbms
Introduction & history of dbmsIntroduction & history of dbms
Introduction & history of dbms
 
Java Hibernate Programming with Architecture Diagram and Example
Java Hibernate Programming with Architecture Diagram and ExampleJava Hibernate Programming with Architecture Diagram and Example
Java Hibernate Programming with Architecture Diagram and Example
 
Dbms schema &amp; instance
Dbms schema &amp; instanceDbms schema &amp; instance
Dbms schema &amp; instance
 

Similar to Ambiguity in Software Engineering

Requirements Engineering: focus on Natural Language Processing, Lecture 1
Requirements Engineering: focus on Natural Language Processing, Lecture 1Requirements Engineering: focus on Natural Language Processing, Lecture 1
Requirements Engineering: focus on Natural Language Processing, Lecture 1alessio_ferrari
 
Considerations in Verification of Safety Design for Complex Systems
Considerations in Verification of Safety Design for Complex SystemsConsiderations in Verification of Safety Design for Complex Systems
Considerations in Verification of Safety Design for Complex SystemsOak Systems
 
User manual tr dunning lev1
User manual tr dunning lev1User manual tr dunning lev1
User manual tr dunning lev1UF Technology
 
Contact management system
Contact management systemContact management system
Contact management systemSHARDA SHARAN
 
Workshop on requirements and modeling at HAE 2015
Workshop on requirements and modeling at HAE 2015Workshop on requirements and modeling at HAE 2015
Workshop on requirements and modeling at HAE 2015Olivier Béghain
 
Adapters and EAI
Adapters and EAIAdapters and EAI
Adapters and EAIRob Paok
 
Plan of Action and Milestones (POA&M)
Plan of Action and Milestones (POA&M)Plan of Action and Milestones (POA&M)
Plan of Action and Milestones (POA&M)GovCloud Network
 
ISD LECT 2and3upd.pptx
ISD LECT 2and3upd.pptxISD LECT 2and3upd.pptx
ISD LECT 2and3upd.pptxGamingMonster6
 
Lecture 11 understanding requirements (3)
Lecture 11   understanding requirements (3)Lecture 11   understanding requirements (3)
Lecture 11 understanding requirements (3)IIUI
 
Aspera ITAM Review Tools Day
Aspera ITAM Review Tools Day Aspera ITAM Review Tools Day
Aspera ITAM Review Tools Day Martin Thompson
 
Fitnesse Testing Framework
Fitnesse Testing Framework Fitnesse Testing Framework
Fitnesse Testing Framework Ajit Koti
 
Sap tr um_dm_meter reading entry screen_v1.0
Sap tr um_dm_meter reading entry screen_v1.0Sap tr um_dm_meter reading entry screen_v1.0
Sap tr um_dm_meter reading entry screen_v1.0UF Technology
 
Manual testing visonia
Manual testing   visoniaManual testing   visonia
Manual testing visoniaVisoniaTechlab
 

Similar to Ambiguity in Software Engineering (20)

Requirements Engineering: focus on Natural Language Processing, Lecture 1
Requirements Engineering: focus on Natural Language Processing, Lecture 1Requirements Engineering: focus on Natural Language Processing, Lecture 1
Requirements Engineering: focus on Natural Language Processing, Lecture 1
 
Considerations in Verification of Safety Design for Complex Systems
Considerations in Verification of Safety Design for Complex SystemsConsiderations in Verification of Safety Design for Complex Systems
Considerations in Verification of Safety Design for Complex Systems
 
Crm technology
Crm technologyCrm technology
Crm technology
 
User manual tr dunning lev1
User manual tr dunning lev1User manual tr dunning lev1
User manual tr dunning lev1
 
Contact management system
Contact management systemContact management system
Contact management system
 
Innoslate 4.5 and Sopatra
Innoslate 4.5 and SopatraInnoslate 4.5 and Sopatra
Innoslate 4.5 and Sopatra
 
Writing srs
Writing srsWriting srs
Writing srs
 
Workshop on requirements and modeling at HAE 2015
Workshop on requirements and modeling at HAE 2015Workshop on requirements and modeling at HAE 2015
Workshop on requirements and modeling at HAE 2015
 
Adapters and EAI
Adapters and EAIAdapters and EAI
Adapters and EAI
 
FMEA new.pptx
FMEA new.pptxFMEA new.pptx
FMEA new.pptx
 
Srs
SrsSrs
Srs
 
Plan of Action and Milestones (POA&M)
Plan of Action and Milestones (POA&M)Plan of Action and Milestones (POA&M)
Plan of Action and Milestones (POA&M)
 
ISD LECT 2and3upd.pptx
ISD LECT 2and3upd.pptxISD LECT 2and3upd.pptx
ISD LECT 2and3upd.pptx
 
Lecture 11 understanding requirements (3)
Lecture 11   understanding requirements (3)Lecture 11   understanding requirements (3)
Lecture 11 understanding requirements (3)
 
Aspera ITAM Review Tools Day
Aspera ITAM Review Tools Day Aspera ITAM Review Tools Day
Aspera ITAM Review Tools Day
 
Fitnesse Testing Framework
Fitnesse Testing Framework Fitnesse Testing Framework
Fitnesse Testing Framework
 
computer software
computer softwarecomputer software
computer software
 
Sap tr um_dm_meter reading entry screen_v1.0
Sap tr um_dm_meter reading entry screen_v1.0Sap tr um_dm_meter reading entry screen_v1.0
Sap tr um_dm_meter reading entry screen_v1.0
 
SECh910
SECh910SECh910
SECh910
 
Manual testing visonia
Manual testing   visoniaManual testing   visonia
Manual testing visonia
 

More from alessio_ferrari

Natural language processing for requirements engineering: ICSE 2021 Technical...
Natural language processing for requirements engineering: ICSE 2021 Technical...Natural language processing for requirements engineering: ICSE 2021 Technical...
Natural language processing for requirements engineering: ICSE 2021 Technical...alessio_ferrari
 
Systematic Literature Reviews and Systematic Mapping Studies
Systematic Literature Reviews and Systematic Mapping StudiesSystematic Literature Reviews and Systematic Mapping Studies
Systematic Literature Reviews and Systematic Mapping Studiesalessio_ferrari
 
Case Study Research in Software Engineering
Case Study Research in Software EngineeringCase Study Research in Software Engineering
Case Study Research in Software Engineeringalessio_ferrari
 
Survey Research In Empirical Software Engineering
Survey Research In Empirical Software EngineeringSurvey Research In Empirical Software Engineering
Survey Research In Empirical Software Engineeringalessio_ferrari
 
Qualitative Studies in Software Engineering - Interviews, Observation, Ground...
Qualitative Studies in Software Engineering - Interviews, Observation, Ground...Qualitative Studies in Software Engineering - Interviews, Observation, Ground...
Qualitative Studies in Software Engineering - Interviews, Observation, Ground...alessio_ferrari
 
Controlled experiments, Hypothesis Testing, Test Selection, Threats to Validity
Controlled experiments, Hypothesis Testing, Test Selection, Threats to ValidityControlled experiments, Hypothesis Testing, Test Selection, Threats to Validity
Controlled experiments, Hypothesis Testing, Test Selection, Threats to Validityalessio_ferrari
 
Requirements Engineering: focus on Natural Language Processing, Lecture 2
Requirements Engineering: focus on Natural Language Processing, Lecture 2Requirements Engineering: focus on Natural Language Processing, Lecture 2
Requirements Engineering: focus on Natural Language Processing, Lecture 2alessio_ferrari
 
Empirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an OverviewEmpirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an Overviewalessio_ferrari
 
Natural Language Processing (NLP) for Requirements Engineering (RE): an Overview
Natural Language Processing (NLP) for Requirements Engineering (RE): an OverviewNatural Language Processing (NLP) for Requirements Engineering (RE): an Overview
Natural Language Processing (NLP) for Requirements Engineering (RE): an Overviewalessio_ferrari
 

More from alessio_ferrari (9)

Natural language processing for requirements engineering: ICSE 2021 Technical...
Natural language processing for requirements engineering: ICSE 2021 Technical...Natural language processing for requirements engineering: ICSE 2021 Technical...
Natural language processing for requirements engineering: ICSE 2021 Technical...
 
Systematic Literature Reviews and Systematic Mapping Studies
Systematic Literature Reviews and Systematic Mapping StudiesSystematic Literature Reviews and Systematic Mapping Studies
Systematic Literature Reviews and Systematic Mapping Studies
 
Case Study Research in Software Engineering
Case Study Research in Software EngineeringCase Study Research in Software Engineering
Case Study Research in Software Engineering
 
Survey Research In Empirical Software Engineering
Survey Research In Empirical Software EngineeringSurvey Research In Empirical Software Engineering
Survey Research In Empirical Software Engineering
 
Qualitative Studies in Software Engineering - Interviews, Observation, Ground...
Qualitative Studies in Software Engineering - Interviews, Observation, Ground...Qualitative Studies in Software Engineering - Interviews, Observation, Ground...
Qualitative Studies in Software Engineering - Interviews, Observation, Ground...
 
Controlled experiments, Hypothesis Testing, Test Selection, Threats to Validity
Controlled experiments, Hypothesis Testing, Test Selection, Threats to ValidityControlled experiments, Hypothesis Testing, Test Selection, Threats to Validity
Controlled experiments, Hypothesis Testing, Test Selection, Threats to Validity
 
Requirements Engineering: focus on Natural Language Processing, Lecture 2
Requirements Engineering: focus on Natural Language Processing, Lecture 2Requirements Engineering: focus on Natural Language Processing, Lecture 2
Requirements Engineering: focus on Natural Language Processing, Lecture 2
 
Empirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an OverviewEmpirical Methods in Software Engineering - an Overview
Empirical Methods in Software Engineering - an Overview
 
Natural Language Processing (NLP) for Requirements Engineering (RE): an Overview
Natural Language Processing (NLP) for Requirements Engineering (RE): an OverviewNatural Language Processing (NLP) for Requirements Engineering (RE): an Overview
Natural Language Processing (NLP) for Requirements Engineering (RE): an Overview
 

Recently uploaded

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...RKavithamani
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 

Recently uploaded (20)

Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
Privatization and Disinvestment - Meaning, Objectives, Advantages and Disadva...
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 

Ambiguity in Software Engineering

  • 1. Ambiguity Problems in Software Engineering Alessio Ferrari1 1ISTI-CNR, Pisa, Italy alessio.ferrari@isti.cnr.it 25 Nov, 2016 A. Ferrari (ISTI) Ambiguity 1 / 95
  • 2. Software Everywhere A. Ferrari (ISTI) Ambiguity 2 / 95
  • 3. Big Software A. Ferrari (ISTI) Ambiguity 3 / 95
  • 4. Big Failures A. Ferrari (ISTI) Ambiguity 4 / 95
  • 5. Software Engineering Software engineering it the systematic design and development of software products and the management of the software process. Software engineering has as one of its primary objectives the production of programs that meet specifications, and are demonstrably accurate, produced on time, and within budget. A. Ferrari (ISTI) Ambiguity 5 / 95
  • 6. Software Engineering A. Ferrari (ISTI) Ambiguity 6 / 95
  • 8. Requirements Engineering Requirements engineering is the branch of software engineering concerned with the real-world goals for, functions of, and constraints on software systems. It is also concerned with the relationship of these factors to precise specifications of software behavior, and to their evolution over time and across software families. A. Ferrari (ISTI) Ambiguity 8 / 95
  • 9. The Requirements Process (Requirements Definition) Elicitation Analysis Documentation Validation Transcripts of Meetings with Customers Models Structured Requirements Document Requirements with Defects A. Ferrari (ISTI) Ambiguity 9 / 95
  • 10. Examples of Requirements Definitions: ETCS, driver, RBC, DMI, etc. ETCS shall provide the driver with information to allow him to drive the train safely. If the supervision is performed by a RBC it shall be possible to prevent movements of a traction unit in its area if not authorised by the RBC. In case the transition has to be acknowledged and the driver fails to acknowledge as required, the ETCS shall initiate a brake application. Partial Supervision shall be indicated on the DMI. Diagrams: to understand how requirements relate to each other A. Ferrari (ISTI) Ambiguity 10 / 95
  • 11. Observations Requirements processes differ from company to company, and from market type to market type Safety-critical companies shall write requirements, in other cases this is not required Small companies might have a single customer asking for a simple application, requirements might come from one person Business-to-Business software might involve more stakeholders (e.g., a system to assist doctors in diagnoses) Consumer’s software (e.g., MS Word) is for the market, requirements come from several people (that nevert asked for a product) Often, a product is already developed and requirements imply changes to the product Requirements belong to different classes (functional/non-functional) A. Ferrari (ISTI) Ambiguity 11 / 95
  • 12. Concepts: Requirement, Specification, Domain Assertion A. Ferrari (ISTI) Ambiguity 12 / 95
  • 13. Michael Jackson’s Model When we build a SYSTEM we make a change in a portion of the WORLD that we call ENVIRONMENT ENVIRONMENT SYSTEM WORLD INTERFACE The SYSTEM and the ENVIRONMENT interact through an INTERFACE (i.e., sensors and actuators) A. Ferrari (ISTI) Ambiguity 13 / 95
  • 14. Concepts ENVIRONMENT SYSTEM WORLD INTERFACE RD S P M Domain Assertion Requirement Specification Program Machine A. Ferrari (ISTI) Ambiguity 14 / 95
  • 15. Concepts Domain assertions (D): all the conditions over phenomena of the environment that we know (or presume) to be true, regardless of the system Requirements (R): all the conditions over phenomena of the environment that we want to make true by developing the system Specifications (S): description of conditions and actions occurring at the interface between the environment and the system. Provides enough information for a programmer to build the system Program (P): implementation of the specifications Machine (M): hardware, sensors and actuators that support the program A. Ferrari (ISTI) Ambiguity 15 / 95
  • 16. Example: Patient Monitoring System ENVIRONMENT SYSTEM D1: there is always a nurse close enough to hear the buzzer D2: the sound from the heart below a threshold T indicates that the heart is about to stop R: the system shall notify the nurse if the patient's heartbeat stops S: if the sound from the sensor falls below a threshold T, the system shall actuate the buzzer P: the program M_v: the sensor and the buzzer M_h: the rest of the harware A. Ferrari (ISTI) Ambiguity 16 / 95
  • 17. Objective of Requirements Engineering Identify R, S and D, so that if a system whose behaviour satisfies S is installed in the environment, and the environment has the properties described in D, then the environment will exhibit the properties described in R. D, S ` R Read it as: The Specification S, under the constraints expressed in D, satisfies the Requirements R Requirements speak the language of the environment (i.e., the domain – medical, public administration, etc.) Specifications speak the language of the interface, and are expressed in terms of shared phenomena A. Ferrari (ISTI) Ambiguity 17 / 95
  • 18. Observation The formalisation is useful if I am using a formal language to define requirements and specifications The formalisation is only a guideline in practice, because the R and D speak about the world, which is not formal! In practice, requirements and specifications are rarely formal Requirements and specifications are often expressed in Natural Language (NL) The formalisation is still useful, and, even when expressing R, S and D in NL, you should keep it in mind A. Ferrari (ISTI) Ambiguity 18 / 95
  • 19. Requirements or Specifications? 1 Only authorised people shall be able to enter the park 2 The system shall allow only authorised people to enter the park 3 Only people who has payed the fee shall be able to enter the park 4 The system shall release a receipt, after the user has inserted coins, if the user has introduced 3 coins 5 The system shall open the barrier, if 3 coins have been introduced 6 The system shall enter in state COUNT_COINS, when the coin sensor senses the introduction of 1 coin, and the system is in state WAIT_COINS 7 The system shall enter in state RELEASE_RECEIPT, if the user has introduced 3 coins A. Ferrari (ISTI) Ambiguity 19 / 95
  • 20. Rule of Thumb If a Customer can read it, it’s a Requirement If a Customer cannot read it, it’s a Specification A. Ferrari (ISTI) Ambiguity 20 / 95
  • 21. Adding some Confusion: System and Software Specifications If I am defining System Specifications (S-SYS), then the hardware elements are part of the system, and part of them appear in the interface (as in the previous example) If I am defining Software Specifications (S-SW), then the hardware elements are part of the environment, and hence in the specification I will speak about abstract variables to be set. These variable are considered to be part of the interface (i.e., they are the variables used by the drivers). A. Ferrari (ISTI) Ambiguity 21 / 95
  • 22. Example: Patient Monitoring System ENVIRONMENT SOFTWARE D1: there is always a nurse close enough to hear the buzzer D2: the sound from the heart below a threshold T indicates that the heart is about to stop R (S-SYS): if the sound from the sensor falls below a threshold T, the system shall actuate the buzzer S (S-SW): the software shall set BUZZER = ON, if SOUND < T. P: the program M: see previous slide A. Ferrari (ISTI) Ambiguity 22 / 95
  • 23. This is just a practical solution! This is just a practical solution to overcome the problem of separating system and software specifications, as asked in the context of embedded safety-critical systems. In this lecture, we will mainly speak about system specifications. If sensors and actuators are just keyboards and screens, then the software specification is the system specification. WARNING: in the literature, when you read software specification, the authors often mean system specification. A. Ferrari (ISTI) Ambiguity 23 / 95
  • 24. Adding more Confusion: Software Requirements Specification We have seen that Requirements and Specifications are different So what the hell is a Software Requirements Specification (SRS)? It is a document that specifies the Requirements OR the Specification, OR both It depends on who is going to read the document A. Ferrari (ISTI) Ambiguity 24 / 95
  • 25. So What to Do? Keep in mind the distinction between R, S and D When you write a statement, make an effort to place it in R, S or D If a company has a single standard document to edit R and S, follow that, and separate R, S, and D If a company distinguishes between user/customer requirements and system/software requirements, then place R and D in the former, S in the latter, and trace them. If a company further distinguishes between system and software requirements, then follow the suggestion given in a previous slide. If a company does not have a standard document to edit requirements and specifications, then use the template in the IEEE Std 830-1998(R2009), which is nice. Consider who’s going to read the document! (Customer, Developer, Tester, etc.) A. Ferrari (ISTI) Ambiguity 25 / 95
  • 26. Adding more and more Confusion: Goals A requirement tells us WHAT the system shall do A GOAL tells us WHY the system shall do that thing Example Requirement: the system shall notify the nurse if the patient’s heartbeat stops Goal: patients whose heartbeat is going to stop shall be saved Expectation: when the nurse hears the buzzer, the nurse saves the patient Goals are useful in Requirements Analysis (Completeness) Which other requirements are needed to address the GOAL? (Alternatives) Is there an alternative approach? (Obstacles) What can be an obstacle for that GOAL? A. Ferrari (ISTI) Ambiguity 26 / 95
  • 27. Requirements Elicitation: Ambiguity Problems A. Ferrari (ISTI) Ambiguity 27 / 95
  • 28. Requirements Elicitation Requirements Analyst Customer Other Stakeholders Existing Documentation Legacy Software REQUIREMENTS A. Ferrari (ISTI) Ambiguity 28 / 95
  • 30. Tacit Knowledge Requirements AnalystCustomer Tacit Knowledge A. Ferrari (ISTI) Ambiguity 30 / 95
  • 31. Ambiguity and Tacit Knowledge During requirements elicitation interviews, ambiguity may hamper communication with the customer Ambiguity is also a resource to disclose tacit knowledge The customer might use domain-specific terms, or might express concepts that are complex to be communicated The occurrence of an ambiguity might reveal the presence of unexpressed, system-relevant knowledge that needs to be elicited A. Ferrari (ISTI) Ambiguity 31 / 95
  • 32. Ambiguity as a Resource to Disclose Tacit Knowledge Requirements AnalystCustomer Tacit Knowledge ≠ A. Ferrari (ISTI) Ambiguity 32 / 95
  • 33. Definition of Ambiguity Ambiguity in Interviews An ambiguity occurs in a requirements elicitation interview when a customer articulates a unit of information, and the meaning assigned by the requirements analyst to such articulation differs from the meaning intended by the customer. Unit of information: system need or domain-related aspect Articulation: any speech fragment We include cases where the analyst cannot give any interpretation A. Ferrari (ISTI) Ambiguity 33 / 95
  • 34. Example: Ambiguity in Interviews Web-based platform where the citizens can send suggestions for laws to the parliament Ambiguity: “I want a dashboard to show (to the representatives of the parliament) what’s going on in specific areas” (thematic or geographical?) A. Ferrari (ISTI) Ambiguity 34 / 95
  • 35. Context of the Analyst INTERPRETATION ACCEPTANCE SPEECH FRAGMENT ACCESS Requirements Goals Domain Specification k k k kCONCEPT ACCESSIBLEa, i(k) = interpretablea,i(k) ^ acceptablea,i(k) A. Ferrari (ISTI) Ambiguity 35 / 95
  • 36. Phenomenology of Ambiguity A. Ferrari (ISTI) Ambiguity 36 / 95
  • 37. Ambiguity ambiguousi(k) = articulatedc,i(k) ^ ¬articulatedc,i(k0 )^ (¬ACCESSIBLEa,i(k) _ interpretablea,i(k0 )) The customer articulates a unit of information k through a speech fragment i The unit of information k cannot be accessed or i is interpreted as k0 Let us focus on the second line of the equation, which is: ¬interpretablea,i(k) _ ¬acceptablea,i(k)_ interpretablea,i(k0 ) A. Ferrari (ISTI) Ambiguity 37 / 95
  • 38. Categories of Ambiguity k k0 Phenomenon ¬interpretable(k) ¬acceptable(k) ¬interpretable(k0 ) - interpretation unclarity interpretable(k) ¬acceptable(k) ¬interpretable(k0 ) - acceptance unclarity interpretable(k) acceptable(k) interpretable(k0 ) acceptable(k0 ) multiple understanding ¬acceptable(k0 ) correct disambiguation - ¬acceptable(k) interpretable(k0 ) acceptable(k0 ) undetected incorrect disambiguation ¬acceptable(k0 ) detected incorrect disambiguation Four Main Classes Unclarity Multiple Understanding Incorrect Disambiguation Correct Disambiguation A. Ferrari (ISTI) Ambiguity 38 / 95
  • 39. Ambiguity Types: Correct Disambiguation Requirements AnalystCustomer View of the Problem A. Ferrari (ISTI) Ambiguity 39 / 95
  • 40. Ambiguity Types: Correct Disambiguation What I hear has an interpretation The interpretation is consistent The interpretation is sufficient In practice: what I hear does not rise any question A. Ferrari (ISTI) Ambiguity 40 / 95
  • 41. Ambiguity Types: Interpretation Unclarity Requirements AnalystCustomer ? A. Ferrari (ISTI) Ambiguity 41 / 95
  • 42. Ambiguity Types: Acceptance Unclarity Requirements AnalystCustomer A. Ferrari (ISTI) Ambiguity 42 / 95
  • 43. Example Interpretation Unclarity Use of domain jargon (e.g., “connoisseurship method” for History of Arts expert) Use of vague terms (e.g., “(The app changes the color of the wall) taking light into account”) Acceptance Unclarity (Domain) “If you do not recycle a thing because the municipality did not signal that it was recyclable, you will not get a fine” A. Ferrari (ISTI) Ambiguity 43 / 95
  • 44. Ambiguity Types: Detected Incorrect Disambiguation Requirements AnalystCustomer A. Ferrari (ISTI) Ambiguity 44 / 95
  • 45. Ambiguity Types: Undetected Incorrect Disambiguation Requirements AnalystCustomer A. Ferrari (ISTI) Ambiguity 45 / 95
  • 46. Example Detected Incorrect Disambiguation: Fitness Tamagochi “You can decide what type of character you want to create” (Acceptance Unclarity - Domain) “So, you can choose the character?” “Actually you cannot [...] you can possibly become (a specific character)” Undetected Incorrect Disambiguation: Automated Baby-swinger “I want something that can change. A component that relax her (the daughter) is that she feels the novelty in the movement” Incorrect disambiguation: change in frequency “You can choose different sequences of movement, three in this direction, two in this direction” (Acceptance Unclarity - Req) Correct interpretation: change in direction A. Ferrari (ISTI) Ambiguity 46 / 95
  • 47. Ambiguity Types: Multiple Understanding Requirements AnalystCustomer A. Ferrari (ISTI) Ambiguity 47 / 95
  • 48. Example Multiple Understanding Web-based platform where the citizens can send suggestions for laws to the parliament “A dashboard to show (to the representatives of the parliament) what’s going on in specific areas” (thematic or geographical?) “The application should be connected to a social network” (internal or external?) A. Ferrari (ISTI) Ambiguity 48 / 95
  • 49. Which are the Triggers? We have unpacked ambiguity from the point of view of the Analyst Do we have specific terms/fragments in the words of the customer that typically trigger the ambiguity? Can we categorise them? A. Ferrari (ISTI) Ambiguity 49 / 95
  • 50. Term Triggers 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 into account, based on, appropriate I “The loading time shall be minimal” Pronouns (P): he, she, it, this, those, which, that I “The system sends a message to the receiver, and it sends an acknowledge message” Quantifiers (Q): all, for each, many, some, both I “All lights have a switch” Domain-specific terms (D-S): connoisseurship method, herpes zoster, systemic disease, Program A. Ferrari (ISTI) Ambiguity 50 / 95
  • 51. Same Category of Trigger, but Different Ambiguity Type Example 1 - Under-specified Term ! Multiple Understanding Mobile application that monitors the use of the mobile phone Example: “Maybe the system could give me also some recommendations” Interpretations: Positive (this app could be useful to you) or negative recommendations (do not use this app) Example 2 - Under-specified Term ! Undetected Incorrect Disambiguation A system to monitor the diet of patients for research purposes Example: “We analyse a representative sample of the population” representative sample == volunteers (Undetected incorrect disambiguation) “People tell lies about their diet” (Acceptance unclarity) representative sample == randomly selected people A. Ferrari (ISTI) Ambiguity 51 / 95
  • 52. Quantitative View - Domain Experts (DE) set term (U) 32% term (V) 4% term (Q) 3% term (P) 1% term (D-S) 13% Fragment 47% DE set A. Ferrari (ISTI) Ambiguity 52 / 95
  • 53. Quantitative View - Software Engineers (SE) set term (U) 39% term (V) 7% term (Q) 3% term (P) 3% term (D-S) 8% Fragment 40% SE set A. Ferrari (ISTI) Ambiguity 53 / 95
  • 54. Observations The majority of ambiguity cases were due to under-specified terms and by fragments Example: “What type of information would you like to search?” “For example, the name of a street” Current research concerning cues in NL requirements accounts for about 10% of the ambiguity cases in interviews (pronouns, quantifiers and vague terms) The remaining 90% of the cases (under-specified, domain-specific and fragments) require further research A. Ferrari (ISTI) Ambiguity 54 / 95
  • 55. Requirements Analysis (Pointers) A. Ferrari (ISTI) Ambiguity 55 / 95
  • 56. Requirements Analysis Requirements analysis is what you do after you met the customer, to: Reason on R and D, to write down a document that the customer can read Reason on R, D, and S to write down a (possibly separate) document that your programmers can read Often, you are going to write a single SRS with both R, S, and D From now on, I will speak about writing a SRS, meaning a document including R, S, and D Several techniques exist, I will give you just some pointers, since this lecture focuses on ambiguity A. Ferrari (ISTI) Ambiguity 56 / 95
  • 57. Example: Car Park System I want to build a system to automate the payment for a private car park The typical scenario is: 1 a car enters from an entrance barrier and the driver takes an entrance receipt from an entrance device 2 the driver parks the car 3 when the driver has to leave the park, he goes to a payment machine and inserts the entrance receipt 4 the machine computes the amount of money due 5 the driver pays and the machine releases an exit receipt 6 the driver inserts the exit receipt in an exit device, and the driver exits from the exit barrier The system also monitors the number of free places in the park A. Ferrari (ISTI) Ambiguity 57 / 95
  • 58. Pointer 1: Context Diagram System Car Barrier Park Coin Customer Shared Phenomena A. Ferrari (ISTI) Ambiguity 58 / 95
  • 59. Pointer 2: Prototyping and Mock-ups Googlehttp:/carpark.it My-Car Park Monitor Select a date 30 329 1 23128 2421 23 25 272622 201814 17 191615 129 1187 10 13 S 6 F 5 T 4 W 3 T 21 M 30 S December 2008 Select Today Check Failed Payment Machine See Car Park Occupation A. Ferrari (ISTI) Ambiguity 59 / 95
  • 60. Pointer 3: Use Case and UML Enter Car Park Car Driver Car Park Surveillant Monitor Car Park Exit Car Park Pay Parking A. Ferrari (ISTI) Ambiguity 60 / 95
  • 61. Pointer 4: Goal Modelling Profits Improved Automatic Car Park Defined Car Entrance Automated Car Exit Automated Payment Automated Verification of Payment AchievedOpen Barrier Achieved Close After Pass Achieved Trigger to Open Barrier Achieved Open Barrier if Payment Achieved Button System Implemented Open Photocell System Implemented Verify Money Achieved Release Receipt Achieved AND OR Open Button Controller Photocell Controller Counter Implemented Close Photocell System Implemented Payment MachineBarrier Controller Exit Controller A. Ferrari (ISTI) Ambiguity 61 / 95
  • 62. Documentation: Using NL Templates A. Ferrari (ISTI) Ambiguity 62 / 95
  • 63. Documentation: Using NL Templates SRS are written in Natural Language (NL), because several stakeholders with diverse skills have to interact with them SRS are written in NL, because formalisation is not possible at this stage of the development As spoken language is ambiguous, so it is written language In a conversation, I can ask clarifications, but when a document is written, it is not always that easy A. Ferrari (ISTI) Ambiguity 63 / 95
  • 64. A. Ferrari (ISTI) Ambiguity 64 / 95
  • 65. Rupp’s Template (more appropriate for R) between. For an automated tool to deem R1 as conformant, it has to correctly distinguish these three slots in the follow- ing: “monitor system configuration changes posted to the database”. A second important issue is that even when a slot falls in between fixed elements, e.g., hwhom?i, and is thus easy to delineate, there is no way to distinguish an acceptable filler for the slot from an unacceptable one, e.g., a grammatically-incorrect phrase. For instance, in R1, we may accept “system administrator” as correctly filling hwhom?i, but we may be unwilling to accept a grammatically-incor- rect phrase such as “system administer” for the slot. and define the glossary terms after the requirements have sufficiently matured and are thus less likely to change. This strategy avoids wasted effort at the glossary construction stage, but it also means that the glossary will not be ready in time to support activities such as template conformance checking (TCC), which often take place during requirements writing. Furthermore, the literature suggests that glossaries may remain incomplete throughout the entire development process [14], thus providing only partial coverage of the glossary terms. This implies that automated techniques for checking conformance to templates would have limited effectiveness if such techniques rely heavily on the glossary Fig. 1. Rupp’s template [5]. ARORA ET AL.: AUTOMATED CHECKING OF CONFORMANCE TO REQUIREMENTS TEMPLATES USING NATURAL LANGUAGE PROCESSING 945 A. Ferrari (ISTI) Ambiguity 65 / 95
  • 66. EARS Template (more appropriate for S) [16], [17], [18] and discussed in Section 2.1. In both of the studies that use Rupp’s template, the require- ments were written directly by professionals. As for the two studies using EARS, one—which is the larg- est case study reported in this article—was written directly by professionals as well, while the remain- ing study uses transformed requirements from one of our two case studies based on Rupp’s template. The results from our case studies indicate firstly, that templates and NLP to the extent needed in our approac Section 3 describes our approach for automation of TC Section 4 discusses tool support. Sections 5 presents the ca studies we have conducted to evaluate our approac Section 6 identifies the limitations and analyzes threats validity. Section 7 compares our approach with relat work. Section 8 concludes the article with a summary a directions for future work. . 3. The EARS template [16]. 6 IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, VOL. 41, NO. 10, OCTOBER 2 A. Ferrari (ISTI) Ambiguity 66 / 95
  • 67. Validation: Sins of the Requirements Engineer, and NL Ambiguity A. Ferrari (ISTI) Ambiguity 67 / 95
  • 68. 9 Sins of the Requirements Engineer Noise: Presence into the text of an element not adding problem relevant information “The car park has three elevators” Silence: Existence of a characteristics of the problem not covered by any text element Have I though about the limit in the number of places in the car park? “If the user has inserted the correct amount of money, the system shall release a receipt” (what if the amount is not correct?) Overspecification: Presence into the text of an element not corresponding to any characteristic of the problem but to possible implementation characteristics “When a car enters the park, the system shall add one to the car counter” A. Ferrari (ISTI) Ambiguity 68 / 95
  • 69. 9 Sins of the Requirements Engineer (continue) Contradiction: presence into the text of two or more elements defining system characteristics in a inconsistent way “Only when the red button is pressed, the system shall release the receipt” “The system shall release the receipt when the user inserts coins” Ambiguity: presence into the text of an element that makes possible different interpretations of one characteristic of the system “When the user presses the button, the system shall release the receipt” - which button? A. Ferrari (ISTI) Ambiguity 69 / 95
  • 70. 9 sins of the Requirements Engineer (continue) Forward references: presence into the text of an element using characteristics of the problem defined below Consider the red button is defined after you tell how to use it Wishful thinking: presence into the text of an element defining a characteristic of the problem so that a possible solution of this problem cannot be realistically validated “The car park receipt shall not be thrown away after parking” A. Ferrari (ISTI) Ambiguity 70 / 95
  • 71. 9 sins of the Requirements Engineer (continue) Synthesis presence of a requirement that states more than one functionality, and hence needs multiple-tests “The system shall allow the car driver to enter and exit from the park” Repetition: presence of multiple statements expressing the same requirement “The system shall show the amount of money due, after the user has inserted the entrance card” “If the user provided the entrance card, the system shall visualise the amount of money due” A. Ferrari (ISTI) Ambiguity 71 / 95
  • 72. 9 Sins - Summary 1 Noise = irrelevant information 2 Silence = absence of relevant information 3 Overspecification = implementation-related information 4 Contradiction = contradictory information 5 Ambiguity = multiple interpretations possible 6 Forward references = wrong information sequence 7 Wishful thinking = potential validation problems 8 Synthesis = potential validation problems 9 Repetition = potential validation problems, and ambiguity A. Ferrari (ISTI) Ambiguity 72 / 95
  • 73. Ambiguity in NL Requirements Templates are useful to reduce ambiguity, but ambiguity might still be there Moreover, templates are not always used in practice We need more fine-grained lenses to reduce ambiguities Previously, we have classified ambiguities depending on the way they are perceived by a listener The previous classes can be applied also for written text, substituting the listener with the reader Here, we classify the triggers of ambiguity in written language, which can lead to different classes of ambiguities from the point of view of the reader These triggers can be applied also to spoken language, but they are harder to detect (verba volant, scripta manent) A. Ferrari (ISTI) Ambiguity 73 / 95
  • 74. Categories of Ambiguity Pure Ambiguities Lexical: the terms used have different vocabulary meanings Syntactic: the syntactic structure has more than one interpretation Semantic: no lexical or syntactic ambiguity, but the expression is ambiguous Quasi-Ambiguities Vagueness: there are cases in which the meaning of the expression cannot be established Generality: the expression is too abstract A. Ferrari (ISTI) Ambiguity 74 / 95
  • 75. Lexical Ambiguities Homonymy: words have unrelated meanings, but they have the same written representations Example: I went to the bank. (bank = ground close to a lake; financial institution) Polysemy: words have related different meanings, but they have the same written representations Example: There is a mole at work. (mole = animal; spy) These types of ambiguity are rare in requirements, but it’s good to know they exist, since they can occur during elicitation (e.g., “rilevato sul piano cutaneo” - homonymy). A. Ferrari (ISTI) Ambiguity 75 / 95
  • 76. Syntactic Ambiguities Analytical: a complex noun group with modifiers, and you do not know which to which noun the modifiers refer Example: The principal system administrator shall be able to enter the data-base (principal = system or administrator?) Attachment: a preposition (e.g., “with”, “for”, “by”) can be attached to different parts of the sentence Example: The system shall produce a resumee using a template for the final assessment (for the final assessment: is the template, or is it an objective?) Coordination: complex combinations of AND/OR, or modifier + AND/OR Example: The system shall produce the plot or the data-log and the legend. Example: Novel employees and directors shall be provided with a user-name and password A. Ferrari (ISTI) Ambiguity 76 / 95
  • 77. Syntactic Ambiguities (continues) Elliptical: omission of words, which are expected to be deduced from the context Example: The system produces a positive notification in case of success, and in case of failure doesn’t (does not produce any notification at all?) Anaphoric: usage of pronouns (e.g., he, it, his, this), which can be referred to different nouns. Example: “When the system sends a message to the receiver, it shall provide an acknowledgement” (it = “system” or “receiver”?) These are less frequent in spoken language, but rather frequent in written requirements. A. Ferrari (ISTI) Ambiguity 77 / 95
  • 78. Semantic Ambiguities These are due to ambiguous interactions of logical quantifiers (every, each, all, any, some, none, a, etc.), and to the use of plurals. Example: All lights have a switch (one for all, or one for each?) Example: An alert shall be raised for each failure-mode (the same alert?) Example: The wrist-bands contain movement sensors (one-one, one-many, many-one, many-many?) Hint: do not use plurals, and be careful with quantifiers These are also due to the usage of synonyms in requirements Example: The system shall allow the car driver to insert coins Example: The system shall release the receipt if the user has payed A. Ferrari (ISTI) Ambiguity 78 / 95
  • 79. Generality These cases are due to the usage of terms (names or verbs) that are too abstract They are not classified as ambiguities, because, depending on the context, a more detailed description might not be required. In requirements and specifications, generality can be reduced through the vocabulary Example: The system shall be able to produce the report Example: The system shall be able to alert the user in case of failure Example: The system shall be able to produce a graph of the workout of the customer In the literature, generality problems are often marked as “pragmatic ambiguities”. This often causes confusion. Pragmatic ambiguities are concerned with the effect, while here we focus on triggers. A. Ferrari (ISTI) Ambiguity 79 / 95
  • 80. Vagueness Vagueness occurs when an expression (often, adjective or adverb) has not a uniquely quantifiable meaning. Several vague expression can be listed (accurate, suitable, appropriate, clearly, better, accordingly, depending on, if necessary, if needed, etc.) In general, avoid adjectives and adverbs Example: The system shall be able to show the graph of the workout if required Example: The system shall be able to show a suitable representation of the workout Example: When appropriate, the system shall display low levels of workout A. Ferrari (ISTI) Ambiguity 80 / 95
  • 81. Detecting Pragmatic Ambiguity (aka Generality, aka Under-specification) A. Ferrari (ISTI) Ambiguity 81 / 95
  • 82. A Mole at Work There is a MOLE at WORK mh... A. Ferrari (ISTI) Ambiguity 82 / 95
  • 83. Pragmatic Ambiguity depends on the CONTEXT Fe - + Common Sense Knowledge Domain Knowledge Other Requirements Other Misterious Things A. Ferrari (ISTI) Ambiguity 83 / 95
  • 84. Pragmatic Ambiguity depends on the CONTEXT Fe - + Common Sense Knowledge Domain Knowledge Other Requirements Other Misterious Things A. Ferrari (ISTI) Ambiguity 84 / 95
  • 85. Approach for Pragmatic Ambiguity Detection A. Ferrari (ISTI) Ambiguity 85 / 95
  • 86. Domain knowledge acquisition for different readers DOCUMENT SET 1 DOCUMENT SET 2 A. Ferrari (ISTI) Ambiguity 86 / 95
  • 87. Different readers analyse the same requirement REQUIREMENT A. Ferrari (ISTI) Ambiguity 87 / 95
  • 88. Different readers compare their interpretations A. Ferrari (ISTI) Ambiguity 88 / 95
  • 89. Overview REQUIREMENT DOMAIN DOCUMENTS Domain Knowledge Graph Construction Requirement Interpretation Interpretation Comparison A. Ferrari (ISTI) Ambiguity 89 / 95
  • 90. Domain Knowledge Modelling We model the domain knowledge as a weighted graph Each node is a concept Each edge represents a connection among concepts The weight of the edge represent how close is the connection between two concepts The lower the weight, the closer the connection The weight is derived from the number of co-occurrences We build this weighted graph starting from Web pages concerning the domain of the requirements document A. Ferrari (ISTI) Ambiguity 90 / 95
  • 91. Domain Knowledge Graphs 0.17 0.05 0.167 0.33 0.25 0.25 0.16 0.037 0.1 0.25 0.11 0.071 0.17 0.5 0.5 0.33 0.33 patient observ deathlocat visit time careinform patient risk deathlocat visit sourc care sign contact hospit hospit Lower weights indicate stronger connections A. Ferrari (ISTI) Ambiguity 91 / 95
  • 92. Requirements interpretation as a least-cost path search Interpreting a requirement is activating the concepts of the requirement in the knowledge graph Activating two concepts in a requirement implies the activation of other neighboring concepts The concepts that are activated are those that are more closely connected with the concepts in the requirement (i.e., their edges have lower weight) The interpretation of the requirement is a least-cost path search within the domain knowledge graph A. Ferrari (ISTI) Ambiguity 92 / 95
  • 93. Requirements Interpretation REQ. 1 - The system shall store patient data system store patient data button feedback screen database retrieve memory content location vaccine name sickness doctor surname ram disk A. Ferrari (ISTI) Ambiguity 93 / 95
  • 95. Further Readings Gunter, Carl, et al. “A reference model for requirements and specifications.” Requirements Engineering, 2000. Proceedings. 4th International Conference on. IEEE, 2000. Jackson, Michael. “The meaning of requirements.” Annals of Software Engineering 3.1 (1997): 5-21. Zave, Pamela, and Michael Jackson. “Four dark corners of requirements engineering.” ACM transactions on Software Engineering and Methodology (TOSEM) 6.1 (1997): 1-30. Berry, Daniel M. "From contract drafting to software specification: Linguistic sources of ambiguity-a handbook version 1.0." (2000). Gleich, Benedikt, Oliver Creighton, and Leonid Kof. “Ambiguity detection: Towards a tool explaining ambiguity sources.” Requirements Engineering: Foundation for Software Quality. Springer Berlin Heidelberg, 2010. 218-232. Van Lamsweerde, Axel. "Goal-oriented requirements engineering: A guided tour." Requirements Engineering, 2001. Proceedings. Fifth IEEE International Symposium on. IEEE, 2001. Ferrari, Alessio, Paola Spoletini, and Stefania Gnesi. "Ambiguity and tacit knowledge in requirements elicitation interviews." Requirements Engineering Journal (REJ), Springer, 2016. Ferrari, Alessio, Stefania Gnesi. "Using collective intelligence to detect pragmatic ambiguities." Requirements Engineering Conference (RE), 2012 IEEE 23rd International. IEEE, 2012. A. Ferrari (ISTI) Ambiguity 95 / 95