The document discusses requirements analysis and specification. It begins by explaining why requirements analysis is important and outlines the goals of the requirements analysis phase, which are to fully understand user requirements, remove inconsistencies from requirements, and properly document requirements in a Software Requirements Specification (SRS) document. The document then discusses requirements gathering, analysis, and specification. It provides examples of how to represent requirements using decision trees and decision tables and outlines the necessary components and properties of a good SRS document.
2. 2
Organization of this Lecture
โ Introduction
โ Requirements analysis
โ Requirements specification
โ SRS document
โ Decision table
โ Decision tree
โ Summary
3. 3
Requirements Analysis and
Specification
โ Many projects fail:
โ Because they start
implementing the system.
โ Without determining whether
they are building what the
customer really wants.
5. 5
Requirements Analysis and
Specification
โ Goals of requirements analysis and
specification phase:
โ Fully understand the user requirements.
โ Remove inconsistencies, anomalies, etc.
from requirements.
โ Document requirements properly in an
SRS document.
7. 7
Who Carries Out Requirements
Analysis and Specification?
โ The person who undertakes requirements
analysis and specification:
โ Known as systems analyst:
โ Collects data pertaining to the product
โ Analyzes collected data:
โ To understand what exactly needs to be done.
โ Writes the Software Requirements
Specification (SRS) document.
8. 8
Requirements Analysis and
Specification
โ Final output of this phase:
โ Software Requirements Specification
(SRS) Document.
โ The SRS document is reviewed by the
customer.
โ Reviewed SRS document forms the basis
of all future development activities.
10. 10
Requirements Analysis
โ Analyst gathers requirements through:
โ Observation of existing systems,
โ Studying existing procedures,
โ Discussion with the customer and end-
users,
โ Analysis of what needs to be done, etc.
11. 11
Requirements Gathering
โ Also known as requirements elicitation.
โ If the project is to automate some existing
procedures
โ e.g., automating existing manual accounting
activities,
โ The task of the system analyst is a little easier
โ Analyst can immediately obtain:
โ input and output formats
โ accurate details of the operational procedures
13. 13
Requirements Gathering (CONT.)
โ In the absence of a working
system,
โ Lot of imagination and creativity
are required.
โ Interacting with the customer
to gather relevant data:
โ Requires a lot of experience.
14. 14
Requirements Gathering (CONT.)
โ Some desirable attributes of
a good system analyst:
โ Good interaction skills,
โ Imagination and creativity,
โ Experience.
15. 15
Case Study: Automation of
Office Work at CSE Dept.
โ The academic, inventory, and financial
information at the CSE department:
โ Being carried though manual processing by two
office clerks, a store keeper, and two
attendants.
โ Considering the low budget he had at his
โ Disposal:
โ The HoD entrusted the work to a team of
student volunteers.
16. 16
Case Study: Automation of
Office Work at CSE Dept.
โ The team was first briefed by the HoD
about the specific activities to be
automated.
โ The analyst first discussed with the two
clerks:
โ Regarding their specific responsibilities
(tasks) that were to be automated.
โ The analyst also interviewed student and
faculty representatives who would also
use the software.
17. 17
Case Study: Automation of
Office Work at CSE Dept.
โ For each task, they asked:
โ About the steps through which
these are performed.
โ They also discussed various
scenarios that might arise for
each task.
โ The analyst collected all types of
forms that were being used.
18. 18
Analysis of the Gathered
Requirements
โ Main purpose of requirements analysis:
โ Clearly understand the user requirements,
โ Detect inconsistencies, ambiguities, and
incompleteness.
โ Incompleteness and inconsistencies:
โ Resolved through further discussions with
the end-users and the customers.
19. 19
Inconsistent Requirement
โ Some part of the requirement:
โ contradicts with some other part.
โ Example:
โ One customer says turn off heater and
open water shower when temperature >
100 C
โ Another customer says turn off heater
and turn ON cooler when temperature >
100 C
20. 20
Incomplete Requirement
โ Some requirements have been
omitted:
โ Possibly due to oversight.
โ Example:
โ The analyst has not recorded:
when temperature falls below 90 C
โ heater should be turned ON
โ water shower turned OFF.
21. 21
Analysis of the Gathered
Requirements (CONT.)
โ Requirements analysis involves:
โ Obtaining a clear, in-depth
understanding of the product to
be developed,
โ Remove all ambiguities and
inconsistencies from the initial
customer perception of the
problem.
22. 22
Analysis of the Gathered
Requirements (CONT.)
โ It is quite difficult to obtain:
โ A clear, in-depth
understanding of the problem:
โ Especially if there is no working
model of the problem.
23. 23
Analysis of the Gathered
Requirements (CONT.)
โ Experienced analysts take
considerable time:
โ To understand the exact
requirements the customer has in
his mind.
24. 24
Analysis of the Gathered
Requirements (CONT.)
โ Experienced systems analysts know -
often as a result of painful
experiences ---
โ Without a clear understanding of the
problem, it is impossible to develop a
satisfactory system.
25. 25
Analysis of the Gathered
Requirements(CONT.)
โ Several things about the project should
be clearly understood by the analyst:
โ What is the problem?
โ Why is it important to solve the problem?
โ What are the possible solutions to the
problem?
โ What complexities might arise while solving
the problem?
26. 26
Analysis of the Gathered
Requirements(CONT.)
โ Some anomalies and inconsistencies
can be very subtle:
โ Escape even most experienced eyes.
โ If a formal model of the system is
constructed,
โ Many of the subtle anomalies and
inconsistencies get detected.
27. 27
Analysis of the Gathered
Requirements(CONT.)
โ After collecting all data regarding
the system to be developed,
โ Remove all inconsistencies and
anomalies from the requirements,
โ Systematically organize requirements
into a Software Requirements
Specification (SRS) document.
28. 28
Software Requirements
Specification
โ Main aim of requirements
specification:
โ Systematically organize the
requirements arrived during
requirements analysis.
โ Document requirements properly.
29. 29
Software Requirements
Specification
โ The SRS document is useful in
various contexts:
โ Statement of user needs
โ Contract document
โ Reference document
โ Definition for implementation
30. 30
Software Requirements Specification:
A Contract Document
โ Requirements document is a reference
document.
โ SRS document is a contract between
the development team and the customer.
โ Once the SRS document is approved by the
customer,
โ Any subsequent controversies are settled by
referring the SRS document.
31. 31
Software Requirements Specification:
A Contract Document
โ Once customer agrees to the SRS
document:
โ Development team starts to develop the
product according to the requirements
recorded in the SRS document.
โ The final product will be acceptable to the
customer:
โ As long as it satisfies all the requirements
recorded in the SRS document.
32. 32
SRS Document (CONT.)
โ The SRS document is known as black-box
specification:
โ The system is considered as a black box whose
internal details are not known.
โ Only its visible external (i.e. input/output)
behavior is documented.
S
Input Data
Output Data
33. 33
SRS Document (CONT.)
โ SRS document concentrates on:
โ What needs to be done
โ Carefully avoids the solution (โhow to doโ)
aspects.
โ The SRS document serves as a contract
โ Between development team and the
customer.
โ Should be carefully written
34. 34
SRS Document (CONT.)
โ The requirements at this stage:
โ Written using end-user
terminology.
โ If necessary:
โ Later a formal requirement
specification may be developed
from it.
35. 35
Properties of a Good SRS
Document
โ It should be concise
โ and at the same time should not be
ambiguous.
โ It should specify what the system must do
โ and not say how to do it.
โ Easy to change.,
โ i.e. it should be well-structured.
โ It should be consistent.
โ It should be complete.
36. 36
Properties of a Good SRS
Document (cont...)
โ It should be traceable
โ You should be able to trace which
part of the specification
corresponds to which part of the
design, code, etc and vice versa.
โ It should be verifiable
โ e.g. โsystem should be user friendlyโ
is not verifiable
37. 37
SRS Document (CONT.)
โ SRS document, normally contains
three important parts:
โ Functional requirements,
โ Non-functional requirements,
โ Goals of Implementation.
38. 38
SRS Document (CONT.)
โ It is desirable to consider every
system:
โ Performing a set of functions {fi}.
โ Each function fi considered as:
โ Transforming a set of input data to
corresponding output data.
Input Data Output Data
fi
39. 39
Example: Functional
Requirement
โ F1: Search Book
โ Input:
โ an authorโs name:
โ Output:
โ details of the authorโs books and the locations
of these books in the library.
Author Name Book Details
f1
40. 40
Functional Requirements
โ Functional requirements describe:
โ A set of high-level requirements
โ Each high-level requirement:
โ takes in some data from the user
โ outputs some data to the user
โ Each high-level requirement:
โ might consist of a set of identifiable
functions
41. 41
Functional Requirements
โ For each high-level requirement:
โ Every function is described in terms
of:
โ Input data set
โ Output data set
โ Processing required to obtain the output
data set from the input data set.
43. 43
Nonfunctional Requirements
โ Nonfunctional requirements include:
โ Reliability issues,
โ Performance issues:
โ Example: How fast the system can produce results
โ so that it does not overload another system to
which it supplies data, etc.
โ Human-computer interface issues,
โ Interface with other external systems,
โ Security, maintainability, etc.
44. 44
Non-Functional Requirements
โ Hardware to be used,
โ Operating system
โ or DBMS to be used
โ Capabilities of I/O devices
โ Standards compliance
โ Data representations
โ by the interfaced system
45. 45
Goals of Implementation
โ Goals describe things that are desirable
of the system:
โ But, would not be checked for compliance.
โ For example,
โ Reusability issues
โ Functionalities to be developed in future
46. 46
Organization of the SRS
Document
โ Introduction.
โ Functional Requirements
โ Nonfunctional Requirements
โ External interface requirements
โ Performance requirements
โ Goals of implementation
47. 47
Functional Requirements
โ A high-level function is one:
โ Using which the user can get some useful piece
of work done.
โ Can the receipt printing work during
withdrawal of money from an ATM:
โ Be called a useful piece of work?
โ A high-level requirement typically involves:
โ Accepting some data from the user,
โ Transforming it to the required response, and
then
โ Outputting the system response to the user.
48. 48
High-Level Function
โ A high-level function:
โ Usually involves a series of interactions
between the system and one or more
users.
โ Even for the same high-level function,
โ There can be different interaction
sequences (or scenarios)
โ Due to users selecting different options or
entering different data items.
49. 49
Example Functional
Requirements
โ List all functional requirements
โ with proper numbering.
โ Req. 1:
โ Once the user selects the โsearchโ option,
โ he is asked to enter the key words.
โ The system should output details of all books
โ whose title or author name matches any of the key
words entered.
โ Details include: Title, Author Name, Publisher
name, Year of Publication, ISBN Number, Catalog
Number, Location in the Library.
50. 50
Example Functional Requirements
โ Req. 2:
โ When the โrenewโ option is selected,
โ The user is asked to enter his
membership number and password.
โ After password validation,
โ The list of the books borrowed by him
are displayed.
โ The user can renew any of the books:
โ By clicking in the corresponding renew
box.
51. 51
Req. 1:
โ R.1.1:
โ Input: โsearchโ option,
โ Output: user prompted to enter the key words.
โ R1.2:
โ Input: key words
โ Output: Details of all books whose title or author
name matches any of the key words.
โ Details include: Title, Author Name, Publisher name, Year
of Publication, ISBN Number, Catalog Number, Location in
the Library.
โ Processing: Search the book list for the keywords
52. 52
Req. 2:
โ R2.1:
โ Input: โrenewโ option selected,
โ Output: user prompted to enter his membership
number and password.
โ R2.2:
โ Input: membership number and password
โ Output:
โ list of the books borrowed by user are displayed. User
prompted to enter books to be renewed or
โ user informed about bad password
โ Processing: Password validation, search books issued
to the user from borrower list and display.
53. 53
Req. 2:
โ R2.3:
โ Input: user choice for renewal of the books
issued to him through mouse clicks in the
corresponding renew box.
โ Output: Confirmation of the books renewed
โ Processing: Renew the books selected by the
in the borrower list.
54. 54
Examples of Bad SRS
Documents
โ Unstructured Specifications:
โ Narrative essay --- one of the worst
types of specification document:
โ Difficult to change,
โ Difficult to be precise,
โ Difficult to be unambiguous,
โ Scope for contradictions, etc.
55. 55
Examples of Bad SRS
Documents
โ Noise:
โ Presence of text containing information
irrelevant to the problem.
โ Silence:
โ aspects important to proper solution of the
problem are omitted.
56. 56
Examples of Bad SRS
Documents
โ Overspecification:
โ Addressing โhow toโ aspects
โ For example, โLibrary member names should be stored
in a sorted descending orderโ
โ Overspecification restricts the solution space for the
designer.
โ Contradictions:
โ Contradictions might arise
โ if the same thing described at several places in different
ways.
57. 57
Examples of Bad SRS
Documents
โ Ambiguity:
โ Literary expressions
โ Unquantifiable aspects, e.g. โgood user interfaceโ
โ Forward References:
โ References to aspects of problem
โ defined only later on in the text.
โ Wishful Thinking:
โ Descriptions of aspects
โ for which realistic solutions will be hard to find.
59. 59
Decision Trees
โ Decision trees:
โ Edges of a decision tree represent conditions
โ Leaf nodes represent actions to be performed.
โ A decision tree gives a graphic view of:
โ Logic involved in decision making
โ Corresponding actions taken.
60. 60
Example: LMS
โ A Library Membership automation
Software (LMS) should support the
following three options:
โ New member,
โ Renewal,
โ Cancel membership.
61. 61
Example: LMS
โ When the new member option is
selected,
โ The software asks details about the
member:
โ name,
โ address,
โ phone number, etc.
62. 62
Example(cont.)
โ If proper information is entered,
โ A membership record for the member is
created
โ A bill is printed for the annual
membership charge plus the security
deposit payable.
63. 63
Example(cont.)
โ If the renewal option is chosen,
โ LMS asks the member's name and his
membership number
โ checks whether he is a valid member.
โ If the name represents a valid member,
โ the membership expiry date is updated and
the annual membership bill is printed,
โ otherwise an error message is displayed.
64. 64
Example(cont.)
โ If the cancel membership option is
selected and the name of a valid
member is entered,
โ The membership is cancelled,
โ A cheque for the balance amount due
to the member is printed
โ The membership record is deleted.
66. 66
Decision Table
โ Decision tables specify:
โ Which variables are to be tested
โ What actions are to be taken if
the conditions are true,
โ The order in which decision
making is performed.
67. 67
Decision Table
โ A decision table shows in a tabular
form:
โ Processing logic and corresponding actions
โ Upper rows of the table specify:
โ The variables or conditions to be evaluated
โ Lower rows specify:
โ The actions to be taken when the
corresponding conditions are satisfied.
68. 68
Decision Table
โ In technical terminology,
โ a column of the table is called a
rule:
โ A rule implies:
โ if a condition is true, then execute
the corresponding action.
69. 69
Example:
โ Conditions
Valid selection NO YES YES YES
New member -- YES NO NO
Renewal -- NO YES NO
Cancellation -- NO NO YES
โ Actions
Display error message -- -- --
Ask member's name etc.
Build customer record -- -- --
Generate bill -- --
Ask membership details --
Update expiry date -- -- --
Print cheque -- -- --
Delete record -- -- --
70. 70
Comparison
โ Both decision tables and decision trees
โ Can represent complex program logic.
โ Decision trees are easier to read and
understand
โ When the number of conditions are small.
โ Decision tables help to look at every
possible combination of conditions.
71. 71
Formal Specification
โ A formal specification
technique is a mathematical
method to:
โ Accurately specify a system.
โ Verify that implementation
satisfies specification.
โ Prove properties of the
specification.
72. 72
Formal Specification
โ Advantages:
โ Well-defined semantics, no
scope for ambiguity
โ Automated tools can check
properties of specifications
โ Executable specification
75. 75
Semiformal Specification
โ Structured specification languages
โ SADT (Structured Analysis and Design
Technique)
โ PSL/PSA (Problem Statement
Language/Problem Statement Analyzer)
โ PSL is a semi-formal specification
language
โ PSA can analyze the specifications
expressed in PSL
76. 76
Executable Specification
Language
โ If specification is expressed in
formal language:
โ it becomes possible to execute the
specification to provide a system
prototype.
โ However, executable
specifications are usually slow
and inefficient.
77. 77
Executable Specification
Language
โ Executable specifications only
test functional requirements:
โ If non-functional
requirements are important for
some product,
โ The utility of an executable
specification prototype is
limited.
78. 78
4GLs
โ 4GLs (Fourth Generation
Languages) are examples of
โ executable specification languages.
โ 4GLs are successful
โ because there is a lot of
commonality across data
processing applications.
79. 79
4GLs
โ 4GLs rely on software reuse
โ Where common abstractions have been
identified and parameterized.
โ Rewriting 4GL programs in higher
level languages:
โ Result in upto 50% lower memory
requirements
โ Also the programs run upto 10 times
faster.
80. 80
Summary
โ Requirements analysis and specification
โ An important phase of software
development:
โ Any error in this phase would affect all
subsequent phases of development.
โ Consists of two different activities:
โ Requirements gathering and analysis
โ Requirements specification
81. 81
Summary
โ The aims of requirements analysis:
โ Gather all user requirements
โ Clearly understand exact user requirements
โ Remove inconsistencies and incompleteness.
โ The goal of specification:
โ Systematically organize requirements
โ Document the requirements in an SRS
document.
82. 82
Summary
โ Main components of SRS document:
โ Functional requirements
โ Non-functional requirements
โ Constraints
โ Techniques to express complex
logic:
โ Decision tree
โ Decision table