231
Ambiguity in Natural Language Requirements Documents Daniel M. Berry, CSCS & SE Program University of Waterloo 2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 1

University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

  • Upload
    vokien

  • View
    215

  • Download
    2

Embed Size (px)

Citation preview

Page 1: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Ambiguity inNatural LanguageRequirementsDocuments

Daniel M. Berry, CSCS & SE ProgramUniversity of Waterloo

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 1

Page 2: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Outline of Talk

g Natural Language is Key in REg Overview of Dangerous Constructionsg Overview of Toolsg Definitions and Examples of Ambiguityg Why is Ambiguity Bad in RSs?g Avoiding or Detecting Ambiguityg Lessons Learned about Ambiguity in REg AI for RE?g Requirements for Toolsg Conclusions

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 2

Page 3: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Natural Language is Key in RE

Natural Language (NL) RequirementsSpecifications (RSs):

Overwhelming majority of RSs are written inNLs.

Virtually every initial conception for a systemis written in NL.

Virtually every RFP is written in NL.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 3

Page 4: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

1996 Estimates

Osborne and MacNish reported JohnMcDermid’s estimates [Osborne1996] that

g about 90% of SRSs are written in solely NLg less than 10% of SRSs are written in NL

plus formal languageg less than 1% of SRSs are written in solely

formal language

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 4

Page 5: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

2003 Data

Data at eprints.biblio.unitn.it [Mich2003,Mich2004] show that a majority of documentsavailable for requirements analysis are fromusers, either directly or by interviews, and ofthese documents

g 71.8% are written in common NL,g 15.9% are written in structured NL, andg only 5.3% are written in formalized

language.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 5

Page 6: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

But...

We all know that...

NL is so ambiguous, and so inherently so!

No wonder RSs are such messes!

There is that old tradeoff: RSs written ing NLs org Mathematics-Based (MB) Formal

Languages (FLs)

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 6

Page 7: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

NL:

− inherently ambiguous

+ always someone who can write it

+ always more or less understood by allstakeholders,albeit somewhat differently by each

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 7

Page 8: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

MB FL:

+ inherently unambiguous

- not always someone who can write it

- not understood by most stakeholders,although all that do understand itunderstand it the same

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 8

Page 9: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Focus of Research

A lot of research in RE is directed at solvingthe problem of ambiguous RSs by

g convincing people to use MB FLs and

g addressing the negatives of FLs

...

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 9

Page 10: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Addressing Negatives of FLs

by making FLs generally more accessible by

g coming up with simpler FLs, e.g.f Parnas’s [Henninger1978] tabular form

g building tools that take the drudgery out ofusing FLs, e.g.,f smart editorsf theorem proversf model checkersf code generators

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 10

Page 11: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Addressing Negatives, Cont’d

g building tools that help people understandFL specifications, e.g.,f simulators

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 11

Page 12: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Stark Reality

But, the reality is that there is no escaping NLRSs.

Michael Jackson [Jackson1995] reminds usthat

Requirements engineering is where theinformal meets the formal.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 12

Page 13: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Stark Reality, Cont’d

Therefore, NLs are inevitable, even if it is onlyfor the initial conception.

(Unless the client is some really weird math-type nerd who thinks in first-order predicatecalculus, and how many of these are there?)

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 13

Page 14: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Stark Reality, Cont’d

Even if one moves immediately to FLs, theinherent ambiguity of the NL initial conceptioncan strike as the transition is made.

What the formalizer understands of theconception may be different from what theconceiver meant.

The phenomenon of subconsciousdisambiguation strikes! [Gause2000]

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 14

Page 15: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Subconscious Disambiguation

In subconscious disambiguation (SD), thereader of an ambiguous phrase is not evenaware that there is an interpretation other thanthe one that came first to his or her mind.

The reader understands an interpretation andthinks that it is the only one.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 15

Page 16: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

SD, Cont’d

In fact, here is where it’s most important tocatch ambiguity: right up front when therequirements analyst (RA) is getting rawinformation, be it goals, business rules, orrequirements, from the clients and users.

The RA must find each ambiguity and ask theclients and users what they mean with it!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 16

Page 17: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

SD, Cont’d

Don Gause and Jerry Weinberg’s originalformulation of SD [Gause1989] was at a fairlyhigh level:

Create a means for protecting a small group ofhumans from the hostile elements of theirenvironment.

If the client was thinking of an igloo, but theRA immediately thought of a space station,then SD has struck again.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 17

Page 18: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

SD, Cont’d

We now realize that SD can strike at low-leveldetails,

e.g., The spam filter only marks the e-mail itconsiders to be spam.

What does it really mean?

More on the problems with only later!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 18

Page 19: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Semi-Formal Languages?

What about semi-formal languages like UMLnotations?

Double whammy

Ambiguity can still strike when go fromconception to model.

And

The model itself is not unambiguous.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 19

Page 20: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Research in NLs in RE

Therefore, there is a group of researchersfocusing on solving the problem of ambiguousRSs by trying to improve our writing,understanding, and processing of NLs.

There are several approaches to avoiding theambiguity of NLs:

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 20

Page 21: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Problem-Avoiding Approaches:

1. Learn to write less ambiguously.2. Learn to detect ambiguity.3. Use a restricted NL which is inherently

unambiguous.

The first two reduce the disadvantage ofexisting NLs.

The third restricts the NLs to disallow thedisadvantages.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 21

Page 22: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Processing Restricted NL RSs

By restricting the NL (but then it is not sonatural!), it becomes possible to ascribeprecise semantics to the sentences.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 22

Page 23: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Restricted NL RSs, Cont’dHowever, the questions always arise:

g How expressible is the language? Have welost something valuable in the restrictions?

g How convenient is it for humans to writethe language?

g Is writing in such a language reallydifferent from writing in MB FLs?

g Is it really unambiguous? Suppose thelanguage has features enabling structuralambiguities.

More later!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 23

Page 24: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Avoiding or Detecting Ambiguityand Other Problems in NL RSs

Some are focusing on the actual writing of theNL RS by the human writers, with an aim thatthey produce more complete, consistent, andless ambiguous NL RSs.

Some are focusing on improving inspectionsof NL RSs to more reliably detectincompleteness, inconsistencies andambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 24

Page 25: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Avoiding or Detecting Overview

Rupp & Rolf Gotz [Rupp1997], Berry &Kamsties [Berry2000, Berry2005], and Berry,Kamsties, & Krieger [Berry2003] identifydangerous constructs to avoid.

Kovitz [Kovitz1998] and Dupre [Dupre1998]explain how to write requirements andtechnical material less ambiguously.

Kamsties [Kamsties2001a, Kamsties2001b]explains how to inspect RSs for ambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 25

Page 26: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Avoiding or Detecting, Cont’d

Osborne & MacNish [Osborne1996],Wilson, Rosenberg, & Hyatt [Wilson1996,Wilson1997],Mich, Garigliano, et al [Mich2000, Mich2001,Kiyavitskaya2007],Bucchiarone & Gnesi [Bucchiarone2005,Berry2006b],and Tjong [Tjong2006b, Tjong2006a,Tjong2007] have built or are building tools thatfind instances of potential ambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 26

Page 27: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Constructions

Christine Rupp and Rolf Gotz detail commonproblems in NL RSs that lead to ambiguities,incompletenesses, and inconsistencies[Rupp1997].

g Writers can use this list to avoid problems.g Inspectors can use this list as a checklist

in inspections.g RAs can use this list to find questions to

ask of clients and users.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 27

Page 28: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”

Erik Kamsties and I have sharpened one ofthese items, the recommendation thatuniversal quantifier equivalents, e.g., all,never, etc. are often wrong [Berry2000].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 28

Page 29: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural

Erik Kamsties and I have gone further andhave determined that all and plural, in general,are hopelessly ambiguous … [Berry2005],

so much so that I have nearly stopped usingplural subjects in my writing.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 29

Page 30: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Guide for Writing NL RSs

There is at least one book out there on thewriting of NL RSs, by Benjamin Kovitz[Kovitz1998].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 30

Page 31: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Guide for Technical Writing

There is a very good guide for technicalwriting, by Lynn Dupre [Dupre1998]

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 31

Page 32: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

One Bit of Bad Advice

One bit of advice common to a lot of writingstyle guides and subscribed to by everywriting teacher I had,

Vary your words; use synonyms to avoidboring repetition!

is bad advice for RSs writing.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 32

Page 33: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Bad Advice, Cont’d

It creates what I call unnecessary synonymy(US) that leaves the reader wondering if thereis an intended technical difference betweentwo terms that generally mean the same thing,e.g.

data item and data element and datum.

I’d rather be bored by a RS than left wonderingif these terms mean different things.

This is sort of the opposite of ambiguity!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 33

Page 34: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Contracts, Laws, and RSs

Legal contracts, laws, and software RSs aresimilar in that

g both are written in NLs andg both have to anticipate all possible

contingencies, i.e., exceptions.

They share the same kind of ambiguityproblems.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 34

Page 35: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Contracts and RSs, Cont’d

A team was formed of two lawyers and tworequirement engineers.

g Mickey Krieger, a lawyer who is amathematician and computer scientist;

g David Kay, a lawyer who is a softwareengineer; and

g Kamsties and I, two software engineerswho are requirements engineers.

Kay dropped out.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 35

Page 36: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Still Other Documents

The same ambiguity problems are shared byall kinds of documents with the samerequirement of precision in specifying what isdone and of covering all possiblecontingencies, e.g.:

g business goalsg business rulesg standard procedures

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 36

Page 37: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Writing Unambiguously

This lawyers–requirement-engineers team haswritten a handbook on writing unambiguousNL legal contracts and software RSs[Berry2003].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 37

Page 38: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Writing Unambiguously, Cont’d

The handbook focuses on ambiguitiesstemming from

g incorrect placement of only and words likeit, and

g incorrect uses off grammatical numberf logical connectivesf universal and existential quantifier

equivalents, etc.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 38

Page 39: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Surfacing Ambiguity

Kamsties has studied ambiguity in NL RSsand has come up with experimentallyvalidated methods to detect them ininspections [Kamsties2001a, Kamsties2001b].

More details about this work later, after thedefinitions and examples.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 39

Page 40: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Ambiguity Detecting Tools for RSs

Several researchers have built or proposedbuilding tools for detecting ambiguoussentences in RSs.

g Miles Osborne and Craig MacNish[Osborne1996] have built a tool thatdisplays parses of any sentence in acontrolled NL, so that the user can spotmultiple or surprising parses and thusdetect and eliminate ambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 40

Page 41: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Tools, Cont’d

g William Wilson, Linda Rosenberg, andLawrence Hyatt [Wilson1996, Wilson1997]have developed ARM, a NASA-validatedtool that finds in any English RS instancesof specific indicators of ambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 41

Page 42: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Tools, Cont’d

g Luisa Mich, Roberto Garigliano, et al[Mich2000, Mich2001, Kiyavitskaya2007]have built tools based on the LOLITA NLPsystem for detecting syntactic (in CSsense) ambiguities in RSs.

LOLITA uses a parser implemented withlazy functional programming [Frost2006].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 42

Page 43: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Tools, Cont’d

g Antonio Bucchiarone and Stefania Gnesi[Bucchiarone2005, Berry2006b] have builtQuARS, a RS-quality-model based andcase-study validated tool that finds in anyEnglish RS instances of specific indicatorsof ambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 43

Page 44: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Tools, Cont’d

g Sri Tjong [Tjong2006b, Tjong2006a,Tjong2007] is building a tool that finds inany English RS instances of specificindicators of ambiguities farmed from acorpus of industrial RSs.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 44

Page 45: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Definitions and Examples

Let’s now focus on what is ambiguity inrequirements specifications.

There are several sources of additionalinformation [Berry2000, Berry2003, Berry2004,Berry2005].

First, a taxonomy of ambiguities inrequirements specification

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 45

Page 46: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Requirements A.

Vagueness

Generality

Linguistic A.

SoftwareEngineering A.

LanguageError A.

Pragmatic A.

Lexical A.

Syntactic A.

Semantic A.

RequirementsDocument A.

ApplicationDomain A.

SystemDomain A.

DevelopmentDomain A.

Homonymy

Polysemy

Attachment A.

Coordination A.

Scope A.

Legend:A. = Ambiguity

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 46

Page 47: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Definitions of Ambiguity

g Dictionaryg Linguisticg Software Engineering

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 47

Page 48: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dictionary Definition

The Merriam-Webster English Dictionary[Merriam-Webster1998] defines “ambiguity” as

1a. the quality or state of being ambiguousespecially in meaning,

1b. an ambiguous word or expression, or

2. uncertainty,

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 48

Page 49: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dictionary Definition, Cont’d

where “ambiguous” means

1a. doubtful or uncertain especially fromobscurity or indistinctness < eyes of anambiguous color >,

1b. inexplicable, or

2. capable of being understood in two ormore possible senses or ways.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 49

Page 50: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lack of Ambiguity

We need an easily pronounced term for “lackof ambiguity”, i.e., the property of beingunambiguous.

I propose “uniguity” since “unambiguity”sounds yucky!

Also, “Uniguous” sounds better than“unambiguous”.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 50

Page 51: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Multiguity

Strictly speaking, the word that means“capable of being understood in two or morepossible senses or ways” should be“multiguous”.

But, something which is multiguous is alsoambiguous.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 51

Page 52: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

In a Defining Mood

In place of “etc.” = “et cetera”, we sometimesneed a word that means “or others” to end an“or”-separated list.

I propose:

“velc.” = “vel cetera”, for inclusive-“or”-separated lists, and

“autc.” = “aut cetera”, for exclusive-“or”-separated lists.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 52

Page 53: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Linguistic Definitions

Linguistic ambiguity is investigated inlinguistics [Lyons1977] and in related fields,namely, computational linguistics [Hirst1987,Allen1995] and philosophy [Levinson1983,Walton1996].

I give examples of these shortly, but first, let’sdispense of the third definition.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 53

Page 54: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Software Engineering Definition

There is no single comprehensive definition ofambiguity in SE literature.

Each gives some key aspects and missesothers.

Most are operational.

I give only two here, but there are others[Schneider1992, Gause1989].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 54

Page 55: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

IEEE Definition

The IEEE Recommended Practice for SRSs[IEEE1993] says that “An SRS is unambiguousif, and only if, every requirement stated thereinhas only one interpretation.”

Presumably, an SRS is ambiguous if it is notunambiguous.

The problem with this definition is that there isno such thing as an unambiguousspecification.

There are useful [Parnas2002] specifications!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 55

Page 56: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Davis’s Definition

Alan Davis [Davis1993] has suggested a testfor ambiguity to serve as a definition:

“Imagine a sentence that is extracted from anSRS, given to ten people who are asked for aninterpretation. If there is more than one inter-pretation, then that sentence is probablyambiguous.”

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 56

Page 57: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Davis’s Definition, Cont’d

The problem with this test is that, as insoftware testing, there is no guarantee that theeleventh person will not find another interpre-tation.

However, this test does capture the essenceof a useful SRS, which is unambiguous formost practical purposes.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 57

Page 58: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Linguistic Ambiguities

g Lexical Ambiguityg Syntactic Ambiguityg Semantic Ambiguityg Pragmatic Ambiguityg Generality & Vaguenessg Language Error (NEW!)

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 58

Page 59: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lexical Ambiguity

Lexical ambiguity occurs when a word hasseveral meanings.

There are several kinds:

g homonymy,g polysemy, andg systematic polysemy

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 59

Page 60: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lexical Ambiguity, Cont’d

Homonymy occurs when two different wordshave the same written and phoneticrepresentation, but unrelated meanings anddifferent etymologies, e.g.,

bank

Polysemy occurs when a word has severalrelated meanings but one etymology, e.g.,

drunk, green

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 60

Page 61: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lexical Ambiguity, Cont’d

Systematic polysemy occurs when the reasonfor the polysemy is confusion betweenclasses, e.g., between unit and type, e.g.,

I like this jacket.

and between process and product, e.g.,

I like writing.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 61

Page 62: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Syntactic Ambiguity

Syntactic ambiguity, also called structuralambiguity, occurs when a given sequence ofwords can be given more than onegrammatical structure, and each has adifferent meaning.

There are several kinds, including:

g attachment ambiguity andg coordination ambiguity.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 62

Page 63: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Syntactic Ambiguity, Cont’d

Attachment ambiguity occurs when aparticular syntactic constituent of a sentence,such as a prepositional phrase or a relativeclause, can be legally attached to two parts ofa sentence, e.g.,

The police shot the rioters with guns.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 63

Page 64: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Syntactic Ambiguity, Cont’d

Coordination ambiguity occurs

g when more than one conjunction, and or or,is used in a sentence, e.g.,

I saw Peter and Paul and Mary saw me.

g or when one conjunction is used with amodifier,

young man and woman.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 64

Page 65: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Semantic Ambiguity

Semantic ambiguity occurs when a sentencehas more than one way of reading it within itscontext although it contains no lexical orstructural ambiguity.

These include

1. coordination ambiguity (see above)2. referential ambiguity (e.g, of pronouns,

also is pragmatic ambiguity), and3. scope ambiguity, e.g.,

All linguists prefer a theory.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 65

Page 66: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Pragmatic Ambiguity

Pragmatic ambiguity occurs when a sentencehas several meanings in the context in whichit is uttered, e.g.,

Every student thinks she is a genius.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 66

Page 67: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Generality & Vagueness

Cousin is general w.r.t. gender in English. So,

Sue is visiting her cousin.

is general.

fast has no clear boundary between fast andnot fast. So,

fast response time

is vague.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 67

Page 68: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Language Error

Our experience has identified anothercategory of ambiguity, language error.

As with all other categories, language errormay not be mutually exclusive of othercategories.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 68

Page 69: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Language Error, Cont’d

A language error ambiguity occurs when agrammatical, punctuation, word choice, orother mistake in using the language ofdiscourse leads to text that is interpreted by areceiver as having a meaning other than thatintended by the sender.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 69

Page 70: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Examples

The most common language errors are:

g onlyg all and pluralg pronouns

They are certainly the most difficult to detect ifyou are not aware of the problem.

For a complete discussion of these errors andothers, see our handbook [Berry2003]

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 70

Page 71: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerously Misplaced “Only”

A very common mistake in English writing andspeaking is the misplaced only.

To be correct, an only should be immediatelypreceding the word or phrase that it limits.

The typical native English speaker puts onlyalways before the main verb of its sentence,no matter what is limited by only.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 71

Page 72: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

E.g., if it is desired to say that the only e-mailthat a spam filter delivers to the user is e-mailthat the user wants, one properly says:

The spam filter delivers only the e-mail that theuser wants.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 72

Page 73: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

Many a native English speaker says instead:

The spam filter only delivers the e-mail that theuser wants.

The meaning of this alternative sentence isthat the only thing the spam filter does to thee-mail that the user wants is to deliver it; itdoes not forward, eat, modify, or anything elsethe e-mail that the user wants.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 73

Page 74: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

It does not promise to deliver only the e-mailthat the user wants.

This incorrect sentence is understood by mostnative English speakers as it is probablymeant to be understood, because what thesentence really means does not make muchsense.

While the error can be made in other naturallanguages, in practice, speakers of otherlanguages make the mistake far less often.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 74

Page 75: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

However, there are sentences of this form inwhich what the sentence really means is asmeaningful as what it probably means, and thecareful reader is left wondering what the writerreally means.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 75

Page 76: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

E.g.,

It only illustrates the concepts.

To most native English speakers, the sentencemeans:

It illustrates only the concepts and notreasons for them.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 76

Page 77: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

But, it really means:

It only illustrates the concepts and does notdefine them.

The correct sentence for the first is:

It illustrates only the concepts.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 77

Page 78: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

Another example:

I only nap after lunch.

To most native English speakers, the sentencemeans:

The only time I nap is after lunch.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 78

Page 79: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

But, it really means:

The only thing I do after lunch is nap.

The correct sentence for the first meaning is:

I nap only after lunch.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 79

Page 80: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

Another example:

The spam filter only marks the e-mail itconsiders to be spam.

Each of (1) the correct meaning, (2) what mostnative English speakers think it means, and (3)yet another meaning is a reasonable utteranceabout spam filters:

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 80

Page 81: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

1. The spam filter only marks, and does notdelete, the e-mail it considers to be spam.

2. The spam filter marks only the e-mail itconsiders to be spam.

3. The spam filter only marks only the e-mail itconsiders to be spam.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 81

Page 82: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

Peter Neumann, in his short elegant essay ononly, “Only His Only Grammarian Can OnlySay Only What Only he Only Means”[Neumann1984] gives 15 variations of thesentence,

I said he thought secret users may write secretdata.

by migrating only through different places inthe sentence and inserting commas and that.

There’s an “only” missing in the title.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 82

Page 83: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

Each of the 15 variations has a differentmeaning, which can be relevant in the securitydomain.

e.g.,

Only, I said he thought secret users may writesecret data.Only I said he thought secret users may writesecret data.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 83

Page 84: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

I said only (that) he thought secret users maywrite secret data.I said only he thought secret users may writesecret data.I said he only thought secret users may writesecret data.I said he thought only (that) secret users maywrite secret data.I said he thought only secret users may writesecret data.I said he thought only secret users may writesecret data.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 84

Page 85: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

I said he thought secret users only may writesecret data.I said he thought secret users only may writesecret data.I said he thought secret users may only writesecret data.I said he thought secret users may write onlysecret data.I said he thought secret users may write secretdata only.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 85

Page 86: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

A California Proposition

Only marriage between a man and a woman isvalid in California.

instead of the intended:

The only marriage that is valid in California isthat between a man and a woman.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 86

Page 87: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

California Proposition, Cont’d

Hmmm, so are all relationships between a manand a woman other than marriage, e.g.friendship, dating, engagement, sex,separation, divorce, parental, grandparental,sibling, etc., not valid in California?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 87

Page 88: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Misplaced “Only”, Cont’d

There are other words that have the sameproblem as only. Among these words arealmost, also, even, hardly, just, merely, mostly,nearly, and really.

In other words, it is common to misplace alsoalso, not only only. (Thanks go Jo Atlee for thepun effects.)

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 88

Page 89: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Other Languages

These syntactic problems with only are notrestricted to English.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 89

Page 90: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Other Languages, Cont’d

Each of the above examples using only can beduplicated with the same meanings

g in French with seulement or ne … que,g in German with nur,g in Hebrew with ,רקg in Italian with soltanto,g in Portuguese with somente, andg in Spanish with solamente,

respectively.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 90

Page 91: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Syntactically Dangerous “All”

Consider the sentence,

All the lights in any room have a single on-offswitch.

The question to be asked is “How manyswitches does any room have, one or one perlight?”

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 91

Page 92: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

The problem with this sentence is that it is notclear whether

1. each light in any room has its own singleon-off switch that isn’t shared with anyother light, or

2. all lights in any room share a commonsingle on-off switch.

The sentence is ambiguous.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 92

Page 93: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Even a Third Meaning

There is yet another, more obscure, meaning,that …

3. each light in any room has its own singleon-off switch that may be shared withanother light.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 93

Page 94: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

If one writes

Each light in any room has a single on-offswitch.

or

Each light in any room has its own on-offswitch.

then the first meaning is clearly intended.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 94

Page 95: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

If he writes

All lights in any room share a single on-offswitch.

then the second meaning is clearly intended.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 95

Page 96: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

The ambiguous sentence

All the lights in any room have a single on-offswitch.

is a classic example of scope ambiguity; it isnot clear which quantifier equivalent, all, for“∀”, or a, for “∃!” (there exists a unique), takesprecedence over the other.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 96

Page 97: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

Mathematics shows the problem clearly. Thetwo meanings are:

1. ∀y ∈ the lights in a room, ∃!x such that x isthe on-off switch of y

2. ∃!x such that ∀y ∈ the lights in a room, x isthe on-off switch of y

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 97

Page 98: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Surprise and Embarrassment!

Erik and I had looked over the contents last 6slides many times. I had explained the last 6slides to others many times, and …

we never noticed a lurking ambiguity.

Finally, when we published a paper[Berry2005] including this information, BobMcCloskey at U. of Scranton, PA, wrote us aletter [Berry2006a] pointing out that …

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 98

Page 99: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Embarrassment, Cont’d

(1) Each light in any room has a single on-offswitch.

and

(2) Each light in any room has its own on-offswitch.

are different!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 99

Page 100: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Embarrassment, Cont’d

Bob pointed out that:

(1) Each light in any room has a single on-offswitch.

means only that each light has a single on-offswitch and says nothing about how manylights each switch controls and

allows the interpretation that all lights in anyroom share a single common on-off switch.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 100

Page 101: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Embarrassment, Cont’d

To mean

(2) Each light in any room has its own on-offswitch.,

(1) can be changed to

Each light in any room has a single on-offswitch in the room, and each on-off switch inany room controls a single light in the room.

(2) avoids the problem by using the word own.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 101

Page 102: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lessons Learned

Hard lessons learned:

g humility and

g ambiguities are hard to catch even whenyou are looking for them and you areattuned to them.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 102

Page 103: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

Many times the same ambiguity is hidden bydomain knowledge.

E.g., consider ambiguous sentence (that isstructurally similar to the “lights” sentence),

All persons have a unique national insurancenumber.

There is another, semantic danger in the sentence: it ain’t true,

Therefore, the software should not depend on it!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 103

Page 104: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

Domain knowledge tells the reader that theintended meaning of the sentence is that

g each person has his or her own uniquenational insurance number,

and not the ridiculous idea that

g all persons share a common uniquenational insurance number.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 104

Page 105: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “All”, Cont’d

The second option is so ridiculous that mostreaders of the sentence would not even thinkthat there is another option and that thesentence is ambiguous.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 105

Page 106: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Syntactically Dangerous Plural

Closely related to the syntactically dangerousall, is the syntactically dangerous plural.

The use of plural to describe a property ofelements of a set or of sets makes it difficultto determine whether the property is that ofeach element or of the whole set.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 106

Page 107: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

Consider the two structurally identicalsentences:

Students enroll in six courses per term.

Students enroll in hundreds of courses perterm.

Domain knowledge tells us that the firstsentence is talking about each student whilethe second is talking about the whole set ofstudents.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 107

Page 108: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

Without this domain knowledge, there isnothing in either sentence to indicate whetherenrollment in the stated number of coursesper term is a property of each student or of theset of all students.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 108

Page 109: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

The first sentence is talking about eachstudent; it should be written in singular form:

Each student enrolls in six courses per term.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 109

Page 110: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

Using a singular formulation for talking aboutproperties of each or any student reserves theplural formulation:

Students enroll in hundreds of courses perterm.

for talking about properties of the collection ofstudents.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 110

Page 111: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

Alternatively, you could insist on singulareven for sets, by introducing some setequivalent to hold the elements of the set:

The student body enrolls in hundreds of coursesper term.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 111

Page 112: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

The same syntactic problem exists with other,non-universal quantifier equivalents, e.g.,some, many, which are all plural.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 112

Page 113: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Even in Math or Tech Writing

Plural ambiguity is particularly problematic inmathematical or technical writing, althoughthere are occasionally nearby formulae thatdisambiguate.

E.g., Systems contain subsystems.

Is containment one–one, one–many,many–one, or many–many?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 113

Page 114: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Math or Tech Writing, Cont’d

Domain knowledge tells us what makes sensein this case, …

but if you are trying to learn new mathematicswith a sentence like this, then what?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 114

Page 115: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Formal Treatment of Plural

We discovered that Uta Schwertel hadpublished a Ph.D. thesis thoroughlyresearching the semantics of plural for thepurpose of extending ACE to include plural[Schwertel2003].

Her example illustrating the inherentambiguity of plural is:

Three girls lift a table.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 115

Page 116: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Schwertel’s Thesis

The thesis explored the semantics of pluralusing a computational proof-theoreticapproach.

ACE had outlawed plural because it washopelessly ambiguous [Schwertel2000].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 116

Page 117: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Schwertel’s Thesis, Cont’d

The thesis was a study to see if this restrictioncould be unambiguously relaxed.

She thinks, “Yes!”.

I think, “No!”.

We agreed to differ.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 117

Page 118: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Guilt and My Writing

I began to feel guilty about using plural in myown writing.

Could I in good conscience write any sentencewith an ambiguous use of plural?

These sentences amount to almost everysentence with plural.

Would I be able to sleep nights?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 118

Page 119: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Guilt, Cont’d

I finally decided to banish sentences with theplural ambiguity from my writing, using pluralonly when I am talking about a property of theset of objects denoted by a plural construct,or rarely, when ambiguity is totally innocuous[Chantree2005].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 119

Page 120: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Banishing Plural

Implementing this decision meant findingsingular equivalents for many, some, few, etc.…

e.g. in Many people like to eat their lunch witha cold drink.

or Many people like to eat their lunches withcold drinks.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 120

Page 121: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Singular Substitutes

Like each is a singular substitute for all.

For many, I use many a or the typical.

For some, I use the occasional.

For few, I use the rare.

e.g. Many a person likes to eat his or her lunchwith a cold drink.

and definitely not Many a person likes to eattheir lunch with a cold drink.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 121

Page 122: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

My Recent Writing

For the past 3 years I have been careful in mywriting to avoid ambiguous plural and otherproblems mentioned in these slides,especially misplaced onlys and alsos.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 122

Page 123: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

My Recent Writing, Cont’d

Sometimes the wording is strange.

My coauthors notice it and complain, buteventually accept it.

An occasional reviewer complains that wehave English errors all over or that we need tohave an English editor clean up the paper.

The typical reviewer nevertheless says thatthe paper is well-written and clear, even whenoccasionally rejecting it!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 123

Page 124: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

My Recent Writing, Cont’d

I have had trouble with the typical copy editorwho rewrites sentences into plural and movesthe onlys and alsos to their normal soundingplaces, even in an article about the pluralproblem or about ambiguities, including thatof misplaced onlys and alsos.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 124

Page 125: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Other Languages

These syntactic problems with plural universalquantifier equivalents and with pluralsentences are not restricted to English.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 125

Page 126: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Other Languages, Cont’d

Each of the above examples using all or eachcan be duplicated with the same meanings

g in French with tous or chaque,g in German with alles or jeder,g in Hebrew with col or col ekhad,g in Italian with tutti or ogni, andg in Portuguese and Spanish with todo or

cada,

respectively.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 126

Page 127: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Plural, Cont’d

Mathematics has adopted a convention thatmakes intent very clear.

In mathematics, the universal quantifier ∀,read as for all is singular as in,

∀ x ∈ Int, x < x+1

For all Integers x, x is less than x+1

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 127

Page 128: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Pronouns

With each pronoun, to which noun it refers isproblematic, e.g.,

Every student thinks she is a genius.

One must be careful in writing to make surethat the referent of a pronoun is what isintended.

When one is writing text, she has no difficultyunderstanding a pronoun’s referent.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 128

Page 129: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Pronouns, Cont’d

However, the poor reader must often guess.

The grammatical rules say that the referent ofa pronoun must be the previous noun or thenon-pronoun sentence subject.

This rule alone is ambiguous.

Moreover, sometimes the writer does notfollow this rule in her thinking.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 129

Page 130: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous Pronouns, Cont’d

The best defense is to use nouns instead ofpronouns, but that can sound funny.

Another good defense is to introduce formalnames:

Consider the switch s1. … s1 is turned off.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 130

Page 131: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “This”

The most insidious problem is that of This. (Icapitalize it because it usually comes at thebeginning of a sentence.)

The writer says, e.g.:

This prevents security breaches.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 131

Page 132: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “This”, Cont’d

To what does This refer?

to the previous noun?to the previous sentence subject?to the idea of the previous sentence?to the idea of the previous n sentences?to the idea of the current paragraph?to the idea of the previous paragraph?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 132

Page 133: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “This”, Cont’d

I have seen all these possibilities, and …

I have seen situations in which more than oneof these makes sense.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 133

Page 134: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Dangerous “This”, Cont’d

The defense:

Always follow this by a noun that restricts thereferent

e.g,

This encoding scheme prevents securitybreaches.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 134

Page 135: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Other Languages

These problems with This are not restricted toEnglish.

Certainly, each language other than Englishhas pronouns, which can have uncertainreferents.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 135

Page 136: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Other Languages, Cont’d

Moreover, each of the above examples usingThis can be duplicated with the samemeanings

g in French with Ceci,g in German with Dieses,g in Hebrew with Zehu,g in Italian with Cio,g in Portuguese with Isto, andg in Spanish with Esto,

respectively.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 136

Page 137: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Ambiguity, Details

g Why is Ambiguity Bad in RSs?g Why Ambiguity is Tough to Find?g Not All Ambiguity is Linguisticg Poor Writing Causes Ambiguitiesg Lexicons and Unnecessary Synonymyg Avoiding or Detecting Ambiguities with

Inspection Drivers

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 137

Page 138: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Why is Ambiguity Bad in RSs?

Ambiguity in requirements specification isdangerous because stakeholders (customers,users, developers) can disagree on themeaning of a requirements specificationwithout being aware of the disagreement.

This disagreement can result in disastrousfailures as the software is not prepared to dealwith expected situations or deals with them inunexpected ways.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 138

Page 139: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Why Ambiguity Bad?, Cont’d

On the other hand, ambiguity can be quiteacceptable provided that contextualinformation is available, because humans arenaturally skilled in resolving ambiguities,sometimes without even knowing it.

Often disambiguation is subconscious andtacit, as the reader of an ambiguous phrase isnot even aware that there is an interpretationother than the one that came first to his or hermind.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 139

Page 140: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Why Ambiguity is Tough to Find?

Many ambiguities are not noticed because ofSD mentioned earlier.

The reader understands an interpretation andthinks that it is the only one.

This understanding is why an inspectionchecklist with one ambiguity-relevant item, “Isdocument ambiguous?” is ludicrous.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 140

Page 141: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Not All Ambiguity is Linguistic

Some ambiguities are due specifically tocomputing and do not appear ambiguous fromthe linguistic point of view, e.g.

If X happens then raise an alert.

is clear to the reader (assuming that X isclear), but gives rise to three different UMLState Machine models, each with slightlydifferent semantics.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 141

Page 142: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Not All Ambiguity, Cont’d

StateA

StateB

[X]/alert

StateA

StateB

StateA

StateB

[X]

entry/ alert

do/ alert

[X]

At implementation and run times, which one ismeant can be critical.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 142

Page 143: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Poor Writing Causes Ambiguities

People write appallingly poorly andambiguously when it comes to words like

g onlyg allg eachg not | no | noneg pronounsg plural

We have seen some examples.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 143

Page 144: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Poor Writing, Cont’d

These people include even lawyers andrequirements engineers who should knowbetter, because their documents have a heavyrequirement for lack of ambiguity!

Even more appalling is the fact that neitherlaw degree nor SE degree programs teachpeople how to write clearly.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 144

Page 145: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Poor Writing, Cont’d

Each program focuses on using its field’stechnology to solve problems to which poorwriting is a major contributor.

It’s like teaching SE without teaching RE,because it’s in poor RE that about 80% of theerrors are introduced.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 145

Page 146: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Knowing How to Write Well →Knowing how to write well is important foravoiding ambiguities as well as for every otherbenefit of good writing.

Moreover, knowing where the pitfalls aremakes it easier to detect ambiguities in bothpolished SRSs and in initial client-supplieddocuments about a system the client desires.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 146

Page 147: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Knowing, Cont’d

The most important documents in which todetect ambiguities are these initial client-supplied documents about a system the clientdesires.

Each potential ambiguity should give rise to aquestion asked of the client.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 147

Page 148: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Unnecessary Synonymy

Unnecessary Synonymy is the use of severaldifferent terms to mean the same concept,data or process, within one RS.

The synonymy is unnecessary because use ofone term suffices.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 148

Page 149: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lexicons and US

Julio Leite et al remind us that it is necessaryto build a lexicon of the domain-specific termsused in any RS [Leite2000, Cysneiros2001].

This lexicon not only helps to avoid US, butalso supports the elicitation of requirementsand the construction of scenarios.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 149

Page 150: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lexicons and US, Cont’d

In Leite’s Language Extended Lexicon (LEL),the terms are defined in terms of each other.

Even though the LEL’s definition graph iscyclic, the LEL serves the purpose of avoidingUS in domain-specific terms.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 150

Page 151: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Avoiding other US

LA Scheinholtz addresses the problem ofunnecessary synonymy (US)[Scheinholtz2006].

We tend to be pretty good about avoiding USin domain-specific terms by the use ofacronyms, glossaries, and lexicons, but weare positively sloppy when it comes to non-domain-specific terms.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 151

Page 152: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Avoiding other US, Cont’d

Scheinholtz describes an iterative process foridentifying US among non-domain terms in acollection of RSs, a procedure which quicklydrills down to one stakeholder-agreed-uponterm for each concept, creating a lexicon ofterms and phrases to be used throughout RSs.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 152

Page 153: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Avoiding or Detecting Ambiguity

We are reducing the disadvantages of existingNLs by

g helping the specification writer to avoidambiguities, and

g helping the specification reviewer to detectambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 153

Page 154: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Surfacing Ambiguities

Erik Kamsties recently completed his PhDdissertation, Surfacing Ambiguity in NaturalLanguage Requirements [Kamsties2001b].

Kamsties observes that ambiguity is morecomplex than is often recognized in REliterature.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 154

Page 155: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Surfacing Ambiguities, Cont’d

The emphasis of his work is on reducingambiguity during modeling and analysis of therequirements, instead of only trying to identifythem later only after the requirements arespecified.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 155

Page 156: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Surfacing Ambiguities, Cont’d

Kamsties suggests techniques, based onindustrially proven inspection and modelingtechniques, that enable a requirementsengineer to spot dangerous ambiguities, i.e.,ones that are misinterpreted.

1. Checklists2. Modeling3. Scenario-Based Reading

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 156

Page 157: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Checklists

The core of the checklist approach is acomprehensive set of definitions of both kindsof ambiguity that occur in NL RSs:

g linguistic (syntactic and semantic)ambiguity and

g conceptual (requirements and computingrelevant) ambiguity.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 157

Page 158: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Checklists, Cont’d

The definition of linguistic ambiguity wasborrowed from linguistics; nu?.

These definitions of ambiguity can be used asa checklist for inspections of NL RSs.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 158

Page 159: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Modeling

He developed a procedure for derivingambiguity-surfacing guidelines from anarbitrary modeling technique to be appliedduring application of the technique.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 159

Page 160: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Modeling, Cont’d

He used this procedure to develop ambiguitysurfacing guidelines that are tailored to themodeling techniques,

g for SCR (Software Cost Reduction) and

g for UML (Unified Modeling Language)

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 160

Page 161: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Modeling, Cont’d

The guidelines are normally applied during themodeling of requirements.

These guidelines are adaptable for use also ininspections.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 161

Page 162: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Scenario-Based Reading

The scenario-based reading techniques, basedon ideas of Victor Basili [Basili1997]

provides the inspector with an operationalscenario (of something to do to thespecification) that requires him or her tocreate an abstraction of the requirements andthen to answer questions based on ananalysis of the abstraction, e.g.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 162

Page 163: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Scenario-Based Reading, Cont’d

g abstraction = test cases

question = “Do you have all the informationneeded to develop a test case?”

and

g abstraction = matrix of interactingrequirements

question = “Is there only one relationbetween requirements A and B?”

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 163

Page 164: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Experimental Validation

He experimentally validated and compared theeffectiveness of the techniques in controlledexperiments at Fraunhofer IESE with SEstudents and professionals on problems ofindustrial size.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 164

Page 165: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Experimental Validation, Cont’d

These techniques led to

g reduced numbers of ambiguitiesmisinterpreted during requirementsmodeling and

g higher numbers of detected ambiguities ininspections.

over previous unfocused techniques.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 165

Page 166: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Experimental Validation, Cont’d

Moreover, he was able to rank the techniquesaccording to effectiveness.

1. Scenario-Based Reading2. Modeling3. Checklists

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 166

Page 167: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Lessons Learned aboutAmbiguity in RE

g Restricted NLsg AI for RE?g Too Much Automation is Bad for REg RS Text vs. Ordinary Textg Tools for Dealing with Ambiguity

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 167

Page 168: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Restricted NLs

There are several restricted NLs out there forwriting RSs:

Comer’s early effort [Comer1983]

TELL [Enomoto1984b]

Attempto Controlled English (ACE)[Fuchs1999]

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 168

Page 169: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

James Comer’s Early Work

James Comer described an interactive systemconverting descriptions of data structuresgiven in a restricted subset of English intoalgebraic axiomatic data type specifications[Comer1983].

Comer’s work was followed by other efforts,e.g., …

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 169

Page 170: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

TELL

Hajime Enomoto et al developed TELL.

TELL translates specifications written inrestricted NL, NSL, into formulae of modallogic [Enomoto1984b].

TELL is used to specify a network protocolthat is then verified to be the alternating bitprotocol [Enomoto1984a]

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 170

Page 171: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Attempto

Norbert Fuchs et al have developed Attempto,a restricted English and a tool forunderstanding it [Fuchs1999].

It has been used for a variety of medium-sizedexamples and as the input language for atheorem prover.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 171

Page 172: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Restricted NLs, Cont’d

Assume that a restricted NL is expressive,usable, and readable enough.

The question remains:

Is it truly unambiguous?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 172

Page 173: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Restricted NLs, Cont’d

It probably avoids lexical and syntacticambiguities.

However, if it uses only, all, plural, andpronouns, it can still have ambiguities, of thekind I have shown in these slides.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 173

Page 174: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

ACE and Ambiguity

As a matter of fact, …

ACE disallows plural.

ACE has no only.

ACE has very strict rules about pronounreference which occasionally determines anunnatural referent.

ACE has very strict rules about theprecedence of conjunctions and the use ofcommas to control these precedences.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 174

Page 175: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Unrestricted NL inAnalysis and Design

Russ Abbott described the use of unrestrictednatural language as part of an object-orientedrequirements analysis and program designmethod [Abbott1983].

This approach became a key element of GradyBooch’s approach to object-oriented programdesign [Booch1991].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 175

Page 176: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Extracting Information fromGrammatical Structure

Motoshi Saeki, Hisayuki Horai, et al considerwhat semantics they can learn from the syntaxstructures of unrestricted NL RSs [Saeki1987].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 176

Page 177: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Grammatical Structure, Cont’d

Miles Osborne and Craig MacNish[Osborne1996] have built a tool that displaysparses of any sentence in a controlled NL, sothat the user can spot multiple or surprisingparses and thus detect and eliminateambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 177

Page 178: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Grammatical Structure, Cont’d

Colette Rolland and Christophe Proix exploredthe relationship between grammatical cases ofwords in NL RSs and ER models and use whatthey learned to build a tool, OICSI[Rolland1992].

These and other similar approaches aresummarized in a survey [Denger2001].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 178

Page 179: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Model Building fromUnrestricted NL RSs

As mentioned above, Rolland and Croix built atool that builds ER models from thegrammatical case tagging given to nouns in aNL RS [Rolland1992]

Julio Leite and Ana Paula Franco considered atechnique for deriving a conceptual modelfrom a lexicon, which is in turn derived fromNL RSs [Leite1993].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 179

Page 180: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Model Building, Cont’d

Yasunori Ishihara et al developed a tool thattranslates NL specifications of networkprotocols into algebraic specifications[Ishihara1993].

Stephane Some et al developed a tool forelicitation of scenarios written in NL and thento derive complete RSs from them[Some1996].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 180

Page 181: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Gervasi’s Work

Most recently, Vincenzo Gervasi hasdeveloped CIRCE, a complete environment forinteractive parsing and understanding NL RSsand for deriving a number of models of thespecified system [Gervasi2000a,Ambriola2000].

He and Bashar Nuseibeh have applied CIRCEto an industrial strength example, i.e., theInternational Space Station’s Node ControlSystem [Gervasi2000b].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 181

Page 182: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Popescu’s Approach

Daniel Popescu’s idea is that the differencebetween a model generated automaticallyfrom a NL SRS and what the client expects is asign of ambiguity that should be explored withthe client.

He built a tool called Dowser for generating anobject-oriented analysis model from a NL SRS[Popescu2006, Popescu2007].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 182

Page 183: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Popescu’s Approach, Cont’d

However, the input language is notunrestricted NL.

The user must rewrite a SRS into a moderatelyrestricted NL.

One could argue that this rewriting itself isbeneficial to the understanding of the SRS bythe rewriter.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 183

Page 184: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Everyone Wants Tools

One thing about computer scientists:

Given any problem in SE or RE, we want tobuild a tool that solves the problem or at leasthelps solve it!

Given any process in SE or RE, we want tobuild a tool that does the process or at leasthelps carry it out!

And the ambiguity-in-RE area is no different!

But, is it such a good idea?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 184

Page 185: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

AI for RE?

Kevin Ryan wondered if AI approaches to NLunderstanding had any chance of working forRE [Ryan1993].

His conclusion was basically, “No!”.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 185

Page 186: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Kevin Ryan’s Observations onAI in RE

Back in 1993, Kevin Ryan put the role of NLPin RE into perspective [Ryan1993].

He noted the importance of NL to RE, thatindeed RE is firmly based in NL, as spokenand written by humans.

He observed:

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 186

Page 187: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Kevin Ryan’s Observations, Cont’dThe history of natural language processing (NLP), inrelation to the specification of systems and programshas been bedevilled with many unrealistic suppositionsand presumptions. Given the critical and expensivenature of the current approaches to requirementsengineering (RE) the prospect of a support system thatwould automatically understand a user’s needs is,naturally, very appealing. Numerous research projectshave proposed to derive and validate systemrequirements knowledge by means of a natural or “nearnatural” conversation with the prospective client [e.g.citations].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 187

Page 188: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Kevin Ryan’s Observations, Cont’dThis facility, it is fondly believed, is both feasible anddesirable and would make specification of systemsboth easier and more accurate. Unfortunately thisbelief is incorrect on both counts. In this brief paper, Iwish to assert that natural language processing doesnot now, nor will it in the forseeable [sic] future, providea level of understanding that could be relied upon, andeven if it could, it is highly questionable that theresulting system would be of great use in requirementsengineering.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 188

Page 189: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Kevin Ryan’s Observations, Cont’d

I would add that such a system would noteven be desirable, because it would take thethinking requirements analyst out of the loop,making it less likely that he or she wouldnotice serious omissions and questionable,albeit logically okay, requirements.

While full understanding is out of the realm ofpossibility or desires, there are ways that NLPtools can help the practicing, thinkingrequirements analyst.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 189

Page 190: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Kevin Ryan’s Observations, Cont’d

Such tools can help scan, search, browse, andtag early textual descriptions of therequirements to assist in the analysis andsocial processes that are necessary toproduce full and accurate requirementsspecification.

Such tools can help maintain fully tracedrequirement specifications throughout the fulllifecycle of the required system.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 190

Page 191: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

AI for RE, Cont’d

Artificial intelligence approaches to languageunderstanding do not work well enough for REwork.

The mistakes are annoying.

Too much good stuff is missed.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 191

Page 192: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

AI for RE, Cont’d

We prefer naturally dumb clericality פקידותיות)(picky-duty-ut)) to artificial intelligence.

Real stupidity is preferable to artificialintelligence if the artificial intelligence canlose information as a result of it’s not everbeing perfect.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 192

Page 193: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Too Much Automation isBad for RE

I regard with suspicion any tool that is soautomatic that it takes the human requirementengineer out of the loop.

The most powerful RE tool ever is the good ol’human brain.

Tools that require human intervention bringthe human into the loop and promote thinkingabout the results.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 193

Page 194: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Too Much Automation, Cont’d

It is in this thinking that omissions andquestionable, albeit logically okay,requirements are noticed.

Tools that run by themselves to producerequirements take the human out of the loopand make it less likely that a human will thinkabout the results.

This lack of thinking is very, very dangerous.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 194

Page 195: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

RS Text vs. Ordinary Text

The NL used in RSs is quite different from theNL used in ordinary, garden variety or evenhighly literary text.

RS text is highly explicit, over a restricteddomain, using a reduced vocabulary, withwell-defined terms.

The other kind of text is much more elliptical,over arbitrary domains, using an unlimitedvocabulary, with fuzzily defined terms.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 195

Page 196: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Tools

g grep vs. Eyesg Requirements for Toolsg Tools for Ambiguity Identification

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 196

Page 197: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

grep vs. Eyes

grep is a lot better at finding all instances of aword or a pattern than is the human eye.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 197

Page 198: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Requirements for Tools

The total amount of information to deal withfor any real problem is HUGE andrepetitititive.

We desire assistance in extracting usefulinformation from this mass of information.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 198

Page 199: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Requirements for Tools, Cont’d

We would like the extracted information to be

g summarizing (got less stuff),g meaningful (precision) (got only good

stuff), andg covering (recall) (got all good stuff).

From 500 pages, we want 5 pages containingall and only the meaningful information in the500 pages.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 199

Page 200: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Requirements for Tools, Cont’d

We prefer less summarization and occasionalmeaningless stuff than to lose any meaningfulstuff, because in any case, a human will haveto read the output and at that time can filterout the meaningless stuff.

I.e.,g 100% recall,g not too bad precision, andg good summarization.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 200

Page 201: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Imprecision a Boon?

Actually, a little nonburdensome imprecisionmay help keep the human RA engaged, …

especially if the instances of imprecision arefunny examples of the stupidity of computersand algorithms!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 201

Page 202: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Information Retrieval (IR)

Particularly indexing, keyword identification,and thesaurus generation

Mostly batch processing on large collectionsof documents, e.g., for Library of Congress

The work goes way, way back, but issummarized by [Salton1989, Frakes1992,Srinivasan1992].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 202

Page 203: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Differences between IR and RE

Both IR and RE deal with extracting smallpieces of information from large texts.

However, there are key differences between IRand RE that impact the requirements for toolsused for their extraction processes.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 203

Page 204: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Differences, Cont’d

IR tends to work with continually growinglarge collections of unchanging texts.

RE works with small collections of rapidlychanging texts.

Thus, rapid, off-line, batch processing isessential for IR.

Thus, slower, interactive, on-line processing isacceptable for RE.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 204

Page 205: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Differences, Cont’d

The tools for IR cannot make mistakes. Theymust be summarizing, meaningful (precise),and covering (recalling) without any humanintervention.

The tools for RE can afford to be less thanmeaningful (precise) because a human beingis watching the output and can filtermeaningless stuff, provided that there is nottoo much of it.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 205

Page 206: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Differences, Cont’d

In RE, you may err on the side ofmeaninglessness (imprecision) provided thatyou lose no coverage (recall).

In RE, it doesn’t matter if it takes 3 hours toextract desired information; 3 hours ismeaningless in the lifecycle; you can take theclient out for lunch during the 3 hours.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 206

Page 207: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Differences, Cont’d

These differences affect requirements andimplementation choices for tools for IR andRE.

We cannot use standard IR tools for extractionin RE without rethinking their applicability.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 207

Page 208: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Ambiguity Identification Tools

Some are trying to use languageunderstanding tools to find ambiguities[Mich2000, Mich2001, Kiyavitskaya2007].

These tools certainly do find ambiguities; infact, ambiguities in NLs are the tools’ biggestenemies.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 208

Page 209: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Identification Tools, Cont’d

They certainly will find all

g lexical ambiguities, by use of dictionariesg syntactic ambiguities, by attempting to

parse

But will these be useful?

I am not so sure.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 209

Page 210: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Identification Tools, Cont’d

In one case, the tool found dozens ofambiguities that were NOT ambiguities to me[Kiyavitskaya2007].

My understanding of the contextdisambiguated all that it did find.

However, what’s worse, the tool did not findany of the only, all, plural, and referentialambiguities.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 210

Page 211: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Identification Tools, Cont’d

So maybe dumb tools [Wilson1996,Wilson1997, Bucchiarone2005, Tjong2006b,Tjong2006a] that find all occurrences of only,all, and other problematic words might bemore helpful?

Can we build a tool that finds possiblereferents of pronouns accurately enough to behelpful?

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 211

Page 212: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Main Tool Requirements

Suppose the ambiguity A is one for which Imust find every instance, to be sure that thereare no lurking problems.

Suppose the ambiguity A is one for which Iexpect that I could find every instancemanually, except for the fact, that I get tired orsloppy and overlook instances.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 212

Page 213: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Then, I Want!

Then, I want a tool that searches instances ofA to have 100% recall, even at the the expenseof imprecision and poor summarization.

If I even feel that the tool is not finding everyinstance of A in a document D, then I cannottrust the tool, and I have to read the whole ofD myself.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 213

Page 214: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

I want, Cont’d

I don’t even want to see the output of the toolbefore I have looked at D myself, because I amafraid that the output will lull me intocomplacency.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 214

Page 215: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

But I Am Not Perfect

Of course, I am not perfect myself, so maybe aless-than-perfect-recall tool would be useful tocomplement me, but not to replace me.

My lack of perfection is in fatigue andcomplacency, not in recall or precision.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 215

Page 216: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

100% Recall by Design

Testing a tool’s recall is problematic becauseyou need perfect output against which tocompare the tool’s output.

So, I mean 100% recall by design rather thanby testing.

For example, suppose A is “misplaced only”.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 216

Page 217: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Parser-Based Tool

One might say:

Hmm…, an only that is not immediatelypreceding the main verb of a sentence isprobably not misplaced; since the only wasput in a non-conventional place, it is probablyin the right place.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 217

Page 218: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Parser-Based Tool, Cont’d

So, maybe I should build a smart tool, TP,based on a parser that tags each word with itspart of speech so that it can check whetherany only it finds is immediately preceding themain verb of the containing sentence.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 218

Page 219: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

grep-Based Tool

No! No parser and no tagger has 100% recall.So, any TP would have less than 100% recall.

Instead, build a dumb tool, TG, based on grepthat simply displays each sentence (any stringof words ending in a . ; ; ? or !) that containsonly.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 219

Page 220: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Smart vs. Dumb

TG has 100% recall, …

but it is less precise and less summarizingthan TP; in this case, lack of summarization iscaused by lack of precision.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 220

Page 221: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Smart vs. Dumb, Cont’d

On the other hand, the imprecision ismanageable:

g I can easily spot the OK sentences.

g Probably, the OK sentences arestatistically rare, because the typicalEnglish writer misplaces his or her onlys;so there will not be much imprecision.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 221

Page 222: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Missing Semantic Ambiguity

All this syntax-based work misses semanticambiguity (using “syntax” and “semantic” inthe CS sense).

Daniel Popescu’s work addresses semanticambiguities [Popescu2006].

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 222

Page 223: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Conclusions

NL is unavoidable in RSs, even if only at thevery beginning when you are talking with theclient.

SD strikes in writing.

SD strikes in reading.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 223

Page 224: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Conclusions, Cont’d

Ambiguity abounds in places you never eventhought of, e.g., in only, in all, and in plural.

Any tool must have 100% recall and goodsummarization at the expense of someimprecision.

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 224

Page 225: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

Most Important Lesson

In reality, we are never going to preventambiguity.

So we must learn to spot it, not only inpolished RSs, …

but also, and especially, in goals, businessrules, and INITIAL RSs, in whose reading SDfirst strikes!

AND ASK THE CLIENT WHAT HE OR SHEMEANS!

2007 Daniel M. Berry Requirements Enginering: Ambiguity in NL Requirements Documents Pg. 225

Page 226: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

[Abbott1983] R.J. Abbott, “Program Design by Informal English Descriptions”, CACM 26(11)(November 1983).

[Allen1995] J. Allen, Natural Language Understanding, Second Edition, Addison-Wesley, Reading,MA (1995).

[Ambriola2000] V. Ambriola and V. Gervasi, “Supporting Multiple Views on Requirements”, pp.321–330 in Proceedings of the Sixth Maghrebian Conference on Computer Sciences,Fes, Morocco (November 2000).

[Basili1997] V.R. Basili, “Evolving and Packaging Reading Technologies”, Journal of Systems andSoftware 38(1), pp. 3–12 (1997).

[Berry2000] D.M. Berry and E. Kamsties, “The Dangerous ‘All’ in Specifications”, pp. 191–194 inProceedings of 10th International Workshop on Software Specification & Design,IWSSD-10, IEEE CS Press (2000).

[Berry2003] D.M. Berry, E. Kamsties, and M.M. Krieger, “From Contract Drafting to SoftwareSpecification: Linguistic Sources of Ambiguity”, Technical Report, University of Water-loo, Waterloo, ON, Canada (2003),http://se.uwaterloo.ca/˜dberry/handbook/ambiguityHandbook.pdf.

[Berry2004] D.M. Berry and E. Kamsties, “Ambiguity in Requirements Specification”, pp. 7–44 inPerspectives on Requirements Engineering, ed. J.C.S.P. Leite and J. Doorn, Kluwer,Boston, MA (2004).

[Berry2005] D.M. Berry and E. Kamsties, “The Syntactically Dangerous All and Plural inSpecifications”, IEEE Software 22(1), pp. 55–57 (January+ February 2005).

[Berry2006a] D.M. Berry and E. Kamsties, “Clarifying Ambiguity”, IEEE Software 23(4), pp. 8–9(July/August 2006).

[Berry2006b] D.M. Berry, A. Bucchiarone, S. Gnesi, G. Lami, and G. Trentanni, “A New QualityModel for Natural Language Requirements Specifications”, in Proceedings of theTwelfth International Workshop on Requirements Engineering: Foundation for SoftwareQuality (REFSQ), Luxembourg (5–6 June 2006).

[Booch1991] G. Booch, Object Oriented Design, Benjamin/Cummings, Redwood City, CA (1991).

[Bucchiarone2005] A. Bucchiarone and S. Gnesi, “Quality Analysis of NL Requirements: An IndustrialCase Study”, pp. 390–394 in Proceedings of the Thirteenth IEEE International Confer-ence on Requirements Engineering (RE’05), Paris, France (29 August–2 September2005).

[Chantree2005] F. Chantree, B. Nuseibeh, A. De Roeck, and A. Willis, “Nocuous Ambiguities inRequirements Specifications”, Technical Report No. 2005/03, Department of Comput-ing, The Open University, Milton Keynes, UK (3 March 2005).

[Comer1983] J.R. Comer, “An Experimental Natural-Language Processor for Generating Data TypeSpecifications”, SIGPLAN Notices 18(12), pp. 25–33 (December 1983).

1

Page 227: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

[Davis1993] A. Davis, Software Requirements: Objects, Functions, and States, Prentice-Hall, Engle-wood Cliffs, NJ (1993).

[Denger2001] C. Denger, J. Dorr, and E. Kamsties, “A Survey on Approaches for Writing PreciseNatural Language Requirements”, IESE-Report, Fraunhofer IESE (2001).

[Dupre1998] L. Dupre, Bugs in Writing: A Guide to Debugging Your Prose, Second Edition,Addison-Wesley, Reading, MA (1998).

[Enomoto1984a] H. Enomoto, N. Yonezaki, M. Saeki, and H. Armata, “Formal Specification andVerification for Concurrent Systems by TELL”, pp. 732–745 in Advances in ArtificialIntelligence, ECAI’84, ed. T. O’Shea, Elsevier North-Holland (1984).

[Enomoto1984b] H. Enomoto, N. Yonezaki, M. Saeki, K. Chiba, T. Takizuka, and T. Yokoi, “NaturalLanguage Based Software Development System TELL”, pp. 721–731 in Advances inArtificial Intelligence, ECAI’84, ed. T. O’Shea, Elsevier North-Holland (1984).

[Frakes1992] W.B. Frakes and R. Baeza-Yates, Information Retrieval: Data Structures and Algo-rithms, Prentice-Hall, Englewood Cliffs, NJ (1992).

[Frost2006] R.A. Frost, “Realization of Natural Language Interfaces Using Lazy Functional Pro-gramming”, ACM Computing Surveys 38(4), pp. 1 (December 2006).

[Fuchs1999] N.E. Fuchs, U. Schwertel, and R. Schwitter, “Attempto Controlled English (ACE)Language Manual Version 3.0”, Technical Report Nr. 99.03, Institut fur Informatik derUniversitat Zurich, Zurich, Switzerland (1999).

[Gause1989] D.C. Gause and G.M. Weinberg, Exploring Requirements: Quality Before Design, Dor-set House, New York, NY (1989).

[Gause2000] D.C. Gause, “User DRIVEN Design—The Luxury that has Become a Necessity, AWorkshop in Full Life-Cycle Requirements Management”, ICRE 2000 Tutorial T7,Schaumberg, IL (23 June 2000).

[Gervasi2000a] V. Gervasi, “Environment Support for Requirements Writing and Analysis”, Ph.D.Dissertation, TD-3/00, Dipartamento di Informatica, Universita di Pisa, Pisa, Italy(2000).

[Gervasi2000b] V. Gervasi and B. Nuseibeh, “Lightweight Validation of Natural Language Require-ments”, pp. 140–148 in Proceedings of Fourth IEEE International Conference onRequirements Engineering (ICRE’2000), IEEE Computer Society Press, Schaumburg, IL(19–23 June 2000).

[Henninger1978] K.L. Henninger, J.W. Kallander, J.E. Shore, and D.L. Parnas, “Software Requirementsfor the A-7E Aircraft”, NRL Memorandum Report 3876, Naval Research Laboratory,Washington, DC (1978).

[Hirst1987] G. Hirst, Semantic Interpretation and the Resolution of Ambiguity, Studies in NaturalLanguage Processing, Cambridge University Press, Cambridge, UK (1987).

2

Page 228: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

[IEEE1993] IEEE, IEEE Recommended Practice for Software Requirements Specifications,ANSI/IEEE Standard 830-1993, Institute of Electrical and Electronics Engineering, NewYork, NY (1993).

[Ishihara1993] Y. Ishihara, H. Seki, and T. Kasami, “A Translation Method from Natural LanguageSpecifications into Formal Specifications Using Contextual Dependencies”, pp. 232–239in Proceedings of the IEEE International Symposium on Requirements Engineering,IEEE Computer Society Press, San Diego, CA (January 1993).

[Jackson1995] M.A. Jackson, “Problems and Requirements”, pp. 2–8 in Proceedings of the SecondIEEE International Symposium on Requirements Engineering, IEEE Computer SocietyPress, York, UK (March 1995).

[Kamsties2001a] E. Kamsties, D.M. Berry, and B. Paech, “Living with Ambiguity in Industrial Require-ments Specifications”, Technical Report, Computer Science, University of Waterloo(2001).

[Kamsties2001b] E. Kamsties, “Surfacing Ambiguity in Natural Language Requirements”, Ph.D. Disserta-tion, Fachbereich Informatik, Universitat Kaiserslautern, Germany, also Volume 5 ofPh.D. Theses in Experimental Software Engineering, Fraunhofer IRB Verlag, Stuttgart,Germany (2001).

[Kiyavitskaya2007] N. Kiyavitskaya, N. Zeni, L. Mich, and D.M. Berry, “Requirements for Tools for Ambi-guity Identification and Measurement in Natural Language RequirementsSpecifications”, in Proceedings of Workshop in Requirements Engineering (WER),Toronto, ON, Canada (May 2007),http://wer.inf.puc-rio.br/index.html.

[Kovitz1998] B.L. Kovitz, Practical Software Requirements: A Manual of Content and Style, Man-ning, Greenwich, CT (1998).

[Leite1993] J.C.S.P. Leite and A.P.M. Franco, “A Strategy for Conceptual Model Acquisition”, pp.243–246 in Proceedings of the IEEE International Symposium on RequirementsEngineering, IEEE Computer Society Press, San Diego, CA (January 1993).

[Levinson1983] S. Levinson, Pragmatics, Cambridge University Press, Cambridge, UK (1983).

[Lyons1977] J. Lyons, Semantics I and II, Cambridge University Press, Cambridge, UK (1977).

[Merriam-Webster1998] Merriam-Webster, “Merriam-Webster’s Collegiate Dictionary”, Tenth Edition,Merriam-Webster, Springfield, MA (1998),http://www.m-w.com/dictionary.htm.

[Mich2000] L. Mich and R. Garigliano, “Ambiguity Measures in Requirements Engineering”, inProceedings of the International Conference on Software Theory and Practice(ICS2000), Sixteenth IFIP World Computer Conference, Beijing, China (21–24 August2000).

[Mich2001] L. Mich, “On the use of Ambiguity Measures in Requirements Analysis”, in Applica-tions of Natural Language to Information Systems, Sixth International WorkshopNLDB’01, ed. A.M. Moreno and R.P. van de Riet, Madrid, Spain (28–29 June 2001).

3

Page 229: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

[Mich2003] L. Mich, M. Franch, and P. Novi Inverardi, “Requirements Analysis using LinguisticTools: Results of an On-line Survey”, to appear in Requirements Engineering Journal2003 or 2004, Technical Report 66, Department of Computer and Management Sciences,Unversita di Trento, Trento, Italy (2003),http://eprints.biblio.unitn.it/view/department/informaticas.html.

[Mich2004] L. Mich, M. Franch, and P. Novi Inverardi, “Market Research for RequirementsAnalysis Using Linguistic Tools”, Requirements Engineering Journal 9(1 & 2), pp.40–56 (in No. 1) 151 (in No. 2) (2004),No. 1 has full article with inverted names, No. 2 has correction of names and referenceto full article in Issue 1.

[Neumann1984] P.G. Neumann, “Only His Only Grammarian Can Only Say Only What Only he OnlyMeans”, ACM SIGSOFT Software Engineering Notes 9(1), pp. 6 (January 1984).

[Osborne1996] M. Osborne and C.K. MacNish, “Processing Natural Language Software RequirementSpecifications”, pp. 229–236 in Proceedings of the International Conference on Require-ments Engineering (ICRE), Colorado, Springs, CO, USA (1996).

[Parnas2002] D.L. Parnas, personal communication via electronic mail, November 2002.

[Popescu2006] D. Popescu, “Quality Improvement of Requirements Specifications via AutomaticallyCreated Object-Oriented Models”, M.Sc. Thesis, SCS Technical Report; GIT-CSS-06-07, School of Computer Science, Georgia Institute of Technology, Altanta, GA, USA(2006),http://smartech.gatech.edu/dspace/bitstream/1853/14345/1/GT-CSS-06-07.pdf.

[Popescu2007] D. Popescu, S. Rugaber, N. Medvidovic, and D.M. Berry, “Improving the Quality ofRequirements Specifications via Automatically Created Object-Oriented Models”, inProceedings of the Fourteenth Monterey Workshop, Wor kshop on Innovations forRequirements Analysis: From Stakeholders Needs to Formal Designs, Monterey, CA,USA (10–12 September 2007).

[Rolland1992] C. Rolland and C. Proix, “A Natural Language Approach for Requirements Engineer-ing”, pp. 257–277 in Proceedings of Conference on Advanced Information SystemsEngineering, CAiSE 1992, Manchester, UK (12–15 May 1992).

[Rupp1997] C. Rupp and R. Gotz, “Sprachliche Methoden des Requirements Engineering (NLP)”, inProceedings of CONQUEST-1, First Conference on Quality Engineering in SoftwareTechnology, Nurnberg, Germany (25–26 September 1997).

[Ryan1993] K. Ryan, “The Role of Natural Language in Requirements Engineering”, pp. 240–242 inProceedings of the IEEE International Symposium on Requirements Engineering, IEEEComputer Society Press, San Diego, CA (January 1993).

[Saeki1987] M. Saeki, H. Horai, K. Toyama, N. Uematsu, and H. Enomoto, “Specification Frame-work Based on Natural Language”, pp. 87–94 in Proceedings of the Fourth InternationalWorkshop on Software Specification and Design, Monterey, CA (April 1987).

4

Page 230: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

[Salton1989] G. Salton, Automatic Text Processing: The Translation, Analysis, and Retrieval of Infor-mation by Computer, Addison Wesley, Reading, MA (1989).

[Schneider1992] G.M. Schneider, J. Martin, and W.T. Tsai, “An Experimental Study of Fault Detection inUser Requirements Documents”, ACM Transactions on Software Engineering andMethodology 1(2), pp. 188–204 (April 1992).

[Schwertel2000] U. Schwertel, “Controlling Plural Ambiguities in Attempto Controlled English”, pp.120–133 in Proceedings Third International Workshop on Controlled Language Appli-cations, Seattle, WA, USA (29–30 April 2000),http://unizh.ch/attempto/publications/papers/claw2000.pdfl.

[Schwertel2003] U. Schwertel, “Plural Semantics for Natural Language Understanding—A Computa-tional Proof-Theoretic Approach”, Ph.D. Thesis, Faculty of Arts, University of Zurich(2003).

[Some1996] S. Some, R. Dssouli, and J. Vaucher, “Toward an Automation of RequirementsEngineering Using Scenarios”, Journal of Computing and Information 2(1), pp.1110–1132 (1996).

[Srinivasan1992] R. Srinivasan, “Thesaurus Construction”, pp. 161–218 in Information Retrieval: DataStructures and Algorithms, ed. W.B. Frakes and R. Baeza-Yates, Prentice-Hall, Engle-wood Cliffs, NJ (1992).

[Tjong2006a] S.F. Tjong, “Elaborated Natural Language Patterns for Requirements Specifications”,Faculty of Engineering and Computer Sciences, University of Nottingham, MalaysiaCampus, Selangor Darul Ehsan, Malaysia (August 2006),http://sepang.nottingham.edu.my/˜kcx4sfj/.

[Tjong2006b] S.F. Tjong, “Improving the Quality of Natural Language Requirements Specificationsthrough Natural Language Requirements Patterns”, Faculty of Engineering and Com-puter Sciences, University of Nottingham, Malaysia Campus, Selangor Darul Ehsan,Malaysia (March 2006),http://sepang.nottingham.edu.my/˜kcx4sfj/.

[Tjong2007] S.F. Tjong, M. Hartley, and D.M. Berry, “Extended Disambiguation Rules for Require-ments Specifications”, in Proceedings of Workshop in Requirements Engineering (WER),Toronto, ON, Canada (May 2007),http://wer.inf.puc-rio.br/index.html.

[Walton1996] D. Walton, Fallacies Arising from Ambiguity, Applied Logic Series, Kluwer Academic,Dordrecht, NL (1996).

[Wilson1996] W.M. Wilson, L.H. Rosenberg, and L.E. Hyatt, “Automated Quality Analysis of NaturalLanguage Requirements Specifications”, NASA Software Assurance TechnologyCenter, The Software Assurance Technology Center (SATC), NASA Goddard SpaceFlight Center (GSFC), Greenbelt, MD (1996),http://satc.gsfc.nasa.gov/support/PNSQC_OCT96/pnq.html.

5

Page 231: University of Waterloo Documents Requirements Natural ...dberry/HTML.documentation/AmbiguityTalk.pdf · Languages (FLs) 2007 Daniel M ... Ambiguity in NL Requirements Documents Pg

[Wilson1997] W.M. Wilson, L.H. Rosenberg, and L.E. Hyatt, “Automated Analysis of RequirementsSpecifications”, in Proceedings of the International Conference on Software Engineering(ICSE), Boston, MA (May 1997).

6