SPECIFYING WITH NATURAL LANGUAGE
How can we specify requirements with natural language effectively?
Lecture 8
Some slides in this lecture adapted from https://www.ifi.uzh.ch/en/rerg/courses/hs23/re-i.html
Announcements
Text questions to (562) 684-8307
2
Canvas Quiz
Lecture 8: Lecture 7 Review
Text questions to (562) 684-8307
3
Last Time – How do we document what the SW should do?
Text questions to (562) 684-8307
4
Text questions to (562) 684-8307
5
Source: “Requirements Engineering for Software and Systems” by Phillip A. LaPlante, p. 95
Free documentation in �unrestricted natural language (NL)
Text questions to (562) 684-8307
Today’s Lecture – How can we specify requirements with natural language effectively?
7
Today’s Lecture – How can we specify requirements with natural language effectively?
8
RE Natural Language Tips
Text questions to (562) 684-8307
Use shall/will/should carefully
Examples
Text questions to (562) 684-8307
Avoid Imprecise Terminology
Text questions to (562) 684-8307
Verifiability: usability example
13
Verifiability: usability example
14
Make it Measurable!
Text questions to (562) 684-8307
Source Sommerville, 2004
Canvas Quiz
Lecture 8: Poorly-written Requirements
Text questions to (562) 684-8307
16
More natural language tips
17
Today’s Lecture – How can we specify requirements with natural language effectively?
18
ISO/IEC/IEEE 29148 Standard
19
[ISO/IEC/IEEE (2018). Systems and Software Engineering — Life Cycle Processes — Requirements
Engineering. ISO/IEC/IEEE Standard 29148.]
Requirement Statement Patterns
20
Source: “The Unplanned Journey of a Requirements Engineer” by Sarah Gregory, IEEE Software, 34 (5), 2017.
Requirements Statement Template (Functional)
Text questions to (562) 684-8307
21
Source Robertson and Robertson (1999)
Requirements Statement Template (Non-functional)
Text questions to (562) 684-8307
22
Source Robertson and Robertson (1999)
Today’s Lecture – How can we specify requirements with natural language effectively?
23
User Stories
Text questions to (562) 684-8307
24
Today’s Lecture
Text questions to (562) 684-8307
Text questions to (562) 684-8307
Sample user story
28
Source: system vision document
Sample acceptance criteria
29
Source: interview with resort manager 7/23/23
User stories should be INVEST
Text questions to (562) 684-8307
Example: Amazon User Stories
Text questions to (562) 684-8307
Example: Facebook User Stories
Text questions to (562) 684-8307
32
More Examples
33
Application | User Story |
Chemical tracking system | As a chemist, I want to request a chemical so that I can perform experiments. |
Airport check-in kiosk | As a traveler, I want to check in for a flight so that I can fly to my destination. |
Accounting system | As a small business owner, I want to create an invoice so that I can bill a customer. |
Online bookstore | As a customer, I want to update my customer profile so that future purchases are billed to a new credit card number. |
Common user story pitfalls
Text questions to (562) 684-8307
34
“Activity” part not an activity of the system
“As a store manager, I want GGSM to facilitate communication and collaboration among employees, allowing us to share updates, ask questions, and coordinate our actions to efficiently run the store.”
Text questions to (562) 684-8307
35
“Activity” part not an activity of the system
“As a store manager, I want GGSM to facilitate communication and collaboration among employees, allowing us to share updates, ask questions, and coordinate our actions to efficiently run the store.”
“As a store manager, I want to message my employees so I can quickly share important updates about store operations.”
Text questions to (562) 684-8307
36
X
“Role” not a user of the system
“As the IRS, we want to make sure the store’s accounting is accurate so that Granny’s Goodies pays us the correct amount of taxes.”
Text questions to (562) 684-8307
37
“Role” not a user of the system
“As the IRS, we want to make sure the store’s accounting is accurate so that Granny’s Goodies pays us the correct amount of taxes.”
Text questions to (562) 684-8307
38
X
Acceptance criteria not detailed enough
“As a store manager, I want to view the profits for a previous time period so that I can see trends in our store’s successfulness.
Text questions to (562) 684-8307
39
Acceptance criteria not detailed enough
“As a store manager, I want to view the profits for a previous time period so that I can see trends in our store’s successfulness.
Text questions to (562) 684-8307
40
X
Missing a “so that” part (business value)
“As a GGSM customer, I want to sign up for the rewards program.”
41
Missing a “so that” part (business value)
“As a GGSM customer, I want to sign up for the rewards program.”
“As a GGSM customer, I want to sign up for the rewards program so that I can earn savings on future purchases.”
42
X
Trying to make NF requirements user stories
“As the GG owner, I want to ensure that GGSM is accessible across all platforms including mobile devices and non-mobile devices so that all employees can easily engage with the system regardless of their device, increasing user convenience and participation.”�
Text questions to (562) 684-8307
43
Trying to make NF requirements user stories
“As the GG owner, I want to ensure that GGSM is accessible across all platforms including mobile devices and non-mobile devices so that all employees can easily engage with the system regardless of their device, increasing user convenience and participation.”
“GG shall be developed as a web app, iOS mobile app, and Android mobile app.”
Text questions to (562) 684-8307
44
X
Summary – How can we specify requirements with natural language effectively?
45
Homework 4
46
For Next Time
47