SlideShare a Scribd company logo
Requirements 1
Software Requirements
Analysis and Specification
Requirements 2
Background
 Problem of scale is a key issue for SE
 For small scale, understand and specifying
requirements is easy
 For large problem - very hard; probably the
hardest, most problematic and error prone
 Input : user needs in minds of people
 Output : precise statement of what the future
system will do
Requirements 3
Background..
 Identifying and specifying req necessarily
involves people interaction
 Cannot be automated
 Requirement (IEEE)= A condition or capability
that must be possessed by a system
 Req. phase ends with a software requirements
specification (SRS) document
 SRS specifies what the proposed system
should do
Requirements 4
Background..
 Requirements understanding is hard
 Visualizing a future system is difficult
 Capability of the future system not clear, hence
needs not clear
 Requirements change with time
 …
 Essential to do a proper analysis and
specification of requirements
Requirements 5
Need for SRS
 SRS establishes basis of agreement
between the user and the supplier.
 Users needs have to be satisfied, but user
may not understand software
 Developers will develop the system, but
may not know about problem domain
 SRS is the medium to bridge the commn.
gap and specify user needs in a manner
both can understand
Requirements 6
Need for SRS…
 Helps user understand his needs.
 users do not always know their needs
 must analyze and understand the potential
 the goal is not just to automate a manual system,
but also to add value through IT
 The req process helps clarify needs
 SRS provides a reference for validation of the
final product
 Clear understanding about what is expected.
 Validation - “ SW satisfies the SRS “
Requirements 7
Need for SRS…
 High quality SRS essential for high Quality SW
 Requirement errors get manifested in final sw
 to satisfy the quality objective, must begin with
high quality SRS
 Requirements defects are not few
 25% of all defects in one case; 54% of all defects found
after UT
 80 defects in A7 that resulted in change requests
 500 / 250 defects in previously approved SRS.
Requirements 8
Need for SRS…
 Good SRS reduces the development cost
 SRS errors are expensive to fix later
 Req. changes can cost a lot (up to 40%)
 Good SRS can minimize changes and errors
 Substantial savings; extra effort spent
during req. saves multiple times that effort
 An Example
 Cost of fixing errors in req. , design ,
coding , acceptance testing and operation
are 2 , 5 , 15 , 50 , 150 person-months
Requirements 9
Need for SRS…
 Example …
 After req. phase 65% req errs detected in design ,
2% in coding, 30% in Acceptance testing, 3%
during operation
 If 50 requirement errors are not removed in the
req. phase, the total cost
32.5 *5 + 1*15 + 15*50 + 1.5*150 = 1152 hrs
 If 100 person-hours invested additionally in req to
catch these 50 defects , then development cost
could be reduced by 1152 person-hours.
 Net reduction in cost is 1052 person-hours
Requirements 10
Requirements Process
 Sequence of steps that need to be performed
to convert user needs into SRS
 Process has to elicit needs and requirements
and clearly specifies it
 Basic activities
 problem or requirement analysis
 requirement specification
 validation
 Analysis involves elicitation and is the hardest
Requirements 11
Requirements Process..
needs
Analysis
Specification
Validation
Requirements 12
Requirement process..
 Process is not linear, it is iterative and
parallel
 Overlap between phases - some parts
may be analyzed and specified
 Specification itself may help analysis
 Validation can show gaps that can lead
to further analysis and spec
Requirements 13
Requirements Process…
 Focus of analysis is on understanding the
desired systems and it’s requirements
 Divide and conquer is the basic strategy
 decompose into small parts, understand each part
and relation between parts
 Large volumes of information is generated
 organizing them is a key
 Techniques like data flow diagrams, object
diagrams etc. used in the analysis
Requirements 14
Requirements Process..
 Transition from analysis to specs is hard
 in specs, external behavior specified
 during analysis, structure and domain are
understood
 analysis structures helps in specification,
but the transition is not final
 methods of analysis are similar to that of
design, but objective and scope different
 analysis deals with the problem domain,
whereas design deals with solution domain
Requirements 15
Problem Analysis
 Aim: to gain an understanding of the needs,
requirements, and constraints on the software
 Analysis involves
 interviewing client and users
 reading manuals
 studying current systems
 helping client/users understand new possibilities
 Like becoming a consultant
 Must understand the working of the
organization , client and users
Requirements 16
Problem Analysis…
 Some issues
 Obtaining the necessary information
 Brainstorming: interacting with clients to
establish desired properties
 Information organization, as large amount
of info. gets collected
 Ensuring completeness
 Ensuring consistency
 Avoiding internal design
Requirements 17
Problem Analysis…
 Interpersonal issues are important
 Communication skills are very important
 Basic principle: problem partition
 Partition w.r.t what?
 Object - OO analysis
 Function - structural analysis
 Events in the system – event partitioning
 Projection - get different views
 Will discuss few different analysis techniques
Requirements 18
Characteristics of an SRS
 What should be the characteristics of a good
SRS? Some key ones are
 Complete
 Unambiguous
 Consistent
 Verifiable
 Ranked for importance and/or stability
Requirements 19
Characteristics…
 Correctness
 Each requirement accurately represents some
desired feature in the final system
 Completeness
 All desired features/characteristics specified
 Hardest to satisfy
 Completeness and correctness strongly related
 Unambiguous
 Each req has exactly one meaning
 Without this errors will creep in
 Important as natural languages often used
Requirements 20
Characteristics…
 Verifiability
 There must exist a cost effective way of checking
if sw satisfies requirements
 Consistent
 two requirements don’t contradict each other
 Ranked for importance/stability
 Needed for prioritizing in construction
 To reduce risks due to changing requirements
Requirements 21
Components of an SRS
 What should an SRS contain ?
 Clarifying this will help ensure
completeness
 An SRS must specify requirements on
 Functionality
 Performance
 Design constraints
 External interfaces
Requirements 22
Functional Requirements
 Heart of the SRS document; this forms the
bulk of the specs
 Specifies all the functionality that the system
should support
 Outputs for the given inputs and the
relationship between them
 All operations the system is to do
 Must specify behavior for invalid inputs too
Requirements 23
Performance Requirements
 All the performance constraints on the
software system
 Generally on response time ,
throughput etc => dynamic
 Capacity requirements => static
 Must be in measurable terms
(verifiability)
 Eg resp time should be xx 90% of the time
Requirements 24
Design Constraints
 Factors in the client environment that
restrict the choices
 Some such restrictions
 Standard compliance and compatibility with
other systems
 Hardware Limitations
 Reliability, fault tolerance, backup req.
 Security
Requirements 25
External Interface
 All interactions of the software with
people, hardware, and sw
 User interface most important
 General requirements of “friendliness”
should be avoided
 These should also be verifiable
Requirements 26
Specification Language
 Language should support desired char
of the SRS
 Formal languages are precise and
unambiguous but hard
 Natural languages mostly used, with
some structure for the document
 Formal languages used for special
features or in highly critical systems
Requirements 27
Structure of an SRS
 Introduction
 Purpose , the basic objective of the system
 Scope of what the system is to do , not to do
 Overview
 Overall description
 Product perspective
 Product functions
 User characteristics
 Assumptions
 Constraints
Requirements 28
Structure of an SRS…
 Specific requirements
 External interfaces
 Functional requirements
 Performance requirements
 Design constraints
 Acceptable criteria
 desirable to specify this up front.
 This standardization of the SRS was done by
IEEE.
Requirements 29
Use Cases Approach for
Functional Requirements
 Traditional approach for fn specs – specify
each function
 Use cases is a newer technique for specifying
behavior (functionality)
 I.e. focuses on functional specs only
 Though primarily for specification, can be
used in analysis and elicitation
 Can be used to specify business or org
behavior also, though we will focus on sw
 Well suited for interactive systems
Requirements 30
Use Cases Basics
 A use case captures a contract between
a user and system about behavior
 Basically a textual form; diagrams are
mostly to support
 Also useful in requirements elicitation as
users like and understand the story
telling form and react to it easily
Requirements 31
Basics..
 Actor: a person or a system that interacts with the
proposed system to achieve a goal
 Eg. User of an ATM (goal: get money); data entry operator;
(goal: Perform transaction)
 Actor is a logical entity, so receiver and sender actors
are different (even if the same person)
 Actors can be people or systems
 Primary actor: The main actor who initiates a UC
 UC is to satisfy his goals
 The actual execution may be done by a system or another
person on behalf of the Primary actor
Requirements 32
Basics..
 Scenario: a set of actions performed to
achieve a goal under some conditions
 Actions specified as a sequence of steps
 A step is a logically complete action performed
either by the actor or the system
 Main success scenario – when things go
normally and the goal is achieved
 Alternate scenarios: When things go wrong
and goals cannot be achieved
Requirements 33
Basics..
 A UC is a collection of many such
scenarios
 A scenario may employ other use cases
in a step
 I.e. a sub-goal of a UC goal may be
performed by another UC
 I.e. UCs can be organized hierarchically
Requirements 34
Basics…
 UCs specify functionality by describing
interactions between actors and system
 Focuses on external behavior
 UCs are primarily textual
 UC diagrams show UCs, actors, and dependencies
 They provide an overview
 Story like description easy to understand by
both users and analysts
 They do not form the complete SRS, only the
functionality part
Requirements 35
Example
Use Case 1: Buy stocks
Primary Actor: Purchaser
Goals of Stakeholders:
Purchaser: wants to buy stocks
Company: wants full transaction info
Precondition: User already has an account
Requirements 36
Example …
 Main Success Scenario
1. User selects to buy stocks
2. System gets name of web site from user for
trading
3. Establishes connection
4. User browses and buys stocks
5. System intercepts responses from the site and
updates user portfolio
6. System shows user new portfolio stading
Requirements 37
Example…
 Alternatives
 2a: System gives err msg, asks for new
suggestion for site, gives option to cancel
 3a: Web failure. 1-Sys reports failure to
user, backs up to previous step. 2-User
exits or tries again
 4a: Computer crashes
 4b: web site does not ack purchase
 5a: web site does not return needed info
Requirements 38
Example 2
 Use Case 2: Buy a product
 Primary actor: buyer/customer
 Goal: purchase some product
 Precondition: Customer is already
logged in
Requirements 39
Example 2…
 Main Scenario
1. Customer browses and selects items
2. Customer goes to checkout
3. Customer fills shipping options
4. System presents full pricing info
5. Customer fills credit card info
6. System authorizes purchase
7. System confirms sale
8. System sends confirming email
Requirements 40
Example 2…
 Alternatives
 6a: Credit card authorization fails
 Allows customer to reenter info
 3a: Regular customer
 System displays last 4 digits of credit card no
 Asks customer to OK it or change it
 Moves to step 6
Requirements 41
Example – An auction site
 Use Case1: Put an item for auction
 Primary Actor: Seller
 Precondition: Seller has logged in
 Main Success Scenario:
 Seller posts an item (its category, description, picture,
etc.) for auction
 System shows past prices of similar items to seller
 System specifies the starting bid price and a date when
auction will close
 System accepts the item and posts it
 Exception Scenarios:
 -- 2 a) There are no past items of this category
* System tells the seller this situation
Requirements 42
Example – auction site..
 Use Case2: Make a bid
 Primary Actor: Buyer
 Precondition: The buyer has logged in
 Main Success Scenario:
 Buyer searches or browses and selects some item
 System shows the rating of the seller, the starting bid, the
current bids, and the highest bid; asks buyer to make a bid
 Buyer specifies bid price, max bid price, and increment
 Systems accepts the bid; Blocks funds in bidders account
 System updates the bid price of other bidders where needed,
and updates the records for the item
Requirements 43
 Exception Scenarios:
 -- 3 a) The bid price is lower than the current
highest
* System informs the bidder and asks to rebid
 -- 4 a) The bidder does not have enough funds in
his account
* System cancels the bid, asks the user to get
more funds
Requirements 44
Example –auction site..
 Use Case3: Complete auction of an item
 Primary Actor: Auction System
 Precondition: The last date for bidding has been
reached
 Main Success Scenario:
 Select highest bidder; send email to selected bidder and seller
informing final bid price; send email to other bidders also
 Debit bidder’s account and credit seller’s account
 Transfer from seller’s account commission amount to
organization’s account
 Unblock other bidders funds
 Remove item from the site; update records
 Exception Scenarios: None
Requirements 45
Example – summary-level Use Case
 Use Case 0 : Auction an item
 Primary Actor: Auction system
 Scope: Auction conducting organization
 Precondition: None
 Main Success Scenario:
 Seller performs put an item for auction
 Various bidders make a bid
 On final date perform Complete the auction of
the item
 Get feed back from seller; get feedback from
buyer; update records
Requirements 46
Requirements with Use Cases
 UCs specify functional requirements
 Other req identified separately
 A complete SRS will contain the use
cases plus the other requirements
 Note – for system requirements it is
important to identify UCs for which the
system itself may be the actor
Requirements 47
Developing Use Cases
 UCs form a good medium for
brainstorming and discussions
 Hence can be used in elicitation and
problem analysis also
 UCs can be developed in a stepwise
refinement manner
 Many levels possible, but four naturally
emerge
Requirements 48
Developing…
 Step 1: Identify actors and goals
 Prepare an actor-goal list
 Provide a brief overview of the UC
 This defines the scope of the system
 Completeness can also be evaluated
 Step 2: Specify main Success Scenarios
 For each UC, expand main scenario
 This will provide the normal behavior of the
system
 Can be reviewed to ensure that interests of all
stakeholders and actors is met
Requirements 49
Developing…
 Step 3: Identify failure conditions
 List possible failure conditions for UCs
 For each step, identify how it may fail
 This step uncovers special situations
 Step 4: Specify failure handling
 Perhaps the hardest part
 Specify system behavior for the failure conditions
 New business rules and actors may emerge
Requirements 50
Other Approaches to Analysis
Requirements 51
Data Flow Modeling
 Widely used; focuses on functions
performed in the system
 Views a system as a network of data
transforms through which the data flows
 Uses data flow diagrams (DFDs) and
functional decomposition in modeling
 The SSAD methodology uses DFD to
organize information, and guide analysis
Requirements 52
Data flow diagrams
 A DFD shows flow of data through the
system
 Views system as transforming inputs to
outputs
 Transformation done through transforms
 DFD captures how transformation occurs
from input to output as data moves
through the transforms
 Not limited to software
Requirements 53
Data flow diagrams…
 DFD
 Transforms represented by named
circles/bubbles
 Bubbles connected by arrows on which
named data travels
 A rectangle represents a source or sink and
is originator/consumer of data (often
outside the system)
Requirements 54
DFD Example
Requirements 55
DFD Conventions
 External files shown as labeled straight lines
 Need for multiple data flows by a process
represented by * (means and)
 OR relationship represented by +
 All processes and arrows should be named
 Processes should represent transforms,
arrows should represent some data
Requirements 56
Data flow diagrams…
 Focus on what transforms happen , how
they are done is not important
 Usually major inputs/outputs shown,
minor are ignored in this modeling
 No loops , conditional thinking , …
 DFD is NOT a control chart, no
algorithmic design/thinking
 Sink/Source , external files
Requirements 57
Drawing a DFD
 If get stuck , reverse direction
 If control logic comes in , stop and restart
 Label each arrows and bubbles
 Make use of + & *
 Try drawing alternate DFDs
Leveled DFDs :
 DFD of a system may be very large
 Can organize it hierarchically
 Start with a top level DFD with a few bubbles
 then draw DFD for each bubble
 Preserve I/O when “ exploding”
Requirements 58
Drawing a DFD for a system
 Identify inputs, outputs, sources, sinks for the
system
 Work your way consistently from inputs to
outputs, and identify a few high-level
transforms to capture full transformation
 If get stuck, reverse direction
 When high-level transforms defined, then
refine each transform with more detailed
transformations
Requirements 59
Drawing a DFD for a system..
 Never show control logic; if thinking in
terms of loops/decisions, stop & restart
 Label each arrows and bubbles;
carefully identify inputs and outputs of
each transform
 Make use of + & *
 Try drawing alternate DFDs
Requirements 60
Leveled DFDs
 DFD of a system may be very large
 Can organize it hierarchically
 Start with a top level DFD with a few bubbles
 then draw DFD for each bubble
 Preserve I/O when “ exploding” a bubble so
consistency preserved
 Makes drawing the leveled DFD a top-down
refinement process, and allows modeling of
large and complex systems
Requirements 61
Data Dictionary
 In a DFD arrows are labeled with data items
 Data dictionary defines data flows in a DFD
 Shows structure of data; structure becomes
more visible when exploding
 Can use regular expressions to express the
structure of data
Requirements 62
Data Dictionary Example
 For the timesheet DFD
Weekly_timesheet – employee_name + id +
[regular_hrs + overtime_hrs]*
Pay_rate = [hourly | daily | weekly] +
dollar_amt
Employee_name = last + first + middle
Id = digit + digit + digit + digit
Requirements 63
DFD drawing – common errors
 Unlabeled data flows
 Missing data flows
 Extraneous data flows
 Consistency not maintained during
refinement
 Missing processes
 Too detailed or too abstract
 Contains some control information
Requirements 64
Prototyping
 Prototyping is another approach for
problem analysis
 Discussed it earlier with process – leads
to prototyping process model
Requirements 65
Requirements Validation
 Lot of room for misunderstanding
 Errors possible
 Expensive to fix req defects later
 Must try to remove most errors in SRS
 Most common errors
 Omission - 30%
 Inconsistency - 10-30%
 Incorrect fact - 10-30%
 Ambiguity - 5 -20%
Requirements 66
Requirements Review
 SRS reviewed by a group of people
 Group: author, client, user, dev team rep.
 Must include client and a user
 Process – standard inspection process
 Effectiveness - can catch 40-80% of req.
errors
Requirements 67
Summary
 Having a good quality SRS is essential for Q&P
 The req. phase has 3 major sub phases
 analysis , specification and validation
 Analysis
 for problem understanding and modeling
 Methods used: SSAD, OOA , Prototyping
 Key properties of an SRS: correctness,
completeness, consistency,unambiguousness
Requirements 68
Summary..
 Specification
 must contain functionality , performance ,
interfaces and design constraints
 Mostly natural languages used
 Use Cases is a method to specify the
functionality; also useful for analysis
 Validation - through reviews

More Related Content

PPT
Requirement specification
PPT
Chapter 3 requirements
PPTX
SE2023 0201 Software Analysis and Design.pptx
PPT
Chapter 2 SRS_241222135554.ppt
PPTX
software requirement specifcation.pptx
PPTX
Software Requirement Specification
PPTX
Software Engineering- Requirement Elicitation and Specification
PPT
LECT3.ppt on software development life cycle
Requirement specification
Chapter 3 requirements
SE2023 0201 Software Analysis and Design.pptx
Chapter 2 SRS_241222135554.ppt
software requirement specifcation.pptx
Software Requirement Specification
Software Engineering- Requirement Elicitation and Specification
LECT3.ppt on software development life cycle

Similar to 3-Requirements.ppt (20)

PPT
Requirment Engineering WITH SPECIAL EFFECTS
PPT
3.Requirements gathering and Analysis_SRS _Functional and Non Functional Requ...
PPT
chapter 4.ppt
PPT
3.Requirements gathering and Analysis_SRS _Functional and Non Functional Requ...
PPTX
Software_Requirements_SRS lovely professional university
PDF
Software Engineering .pdf
PPTX
Software Engineering Unit 2 Power Point Presentation AKTU University
PPTX
Soft requirement
PDF
SE_Module2.pdf
PPT
Sofyware Engineering
PPT
Requirement specification (SRS)
PPTX
Software Requirement Specification
PDF
Software Requirement Specification
PPTX
REQUIRMENT ENGINERRf3f02406b832ac5df6c7cc6-1678011872886.pptx
PPT
INTRODUCTION to software engineering requirements specifications
PDF
CSE2014 SE MODULE - 2 new.pdf CSE2014 SE MODULE - 2 new.pdfCSE2014 SE MODULE ...
PPTX
Software Requirement Specification
PPTX
Software Engineering.pptx
PPT
System requirements specification (srs)
PPTX
chapter 4.pptx
Requirment Engineering WITH SPECIAL EFFECTS
3.Requirements gathering and Analysis_SRS _Functional and Non Functional Requ...
chapter 4.ppt
3.Requirements gathering and Analysis_SRS _Functional and Non Functional Requ...
Software_Requirements_SRS lovely professional university
Software Engineering .pdf
Software Engineering Unit 2 Power Point Presentation AKTU University
Soft requirement
SE_Module2.pdf
Sofyware Engineering
Requirement specification (SRS)
Software Requirement Specification
Software Requirement Specification
REQUIRMENT ENGINERRf3f02406b832ac5df6c7cc6-1678011872886.pptx
INTRODUCTION to software engineering requirements specifications
CSE2014 SE MODULE - 2 new.pdf CSE2014 SE MODULE - 2 new.pdfCSE2014 SE MODULE ...
Software Requirement Specification
Software Engineering.pptx
System requirements specification (srs)
chapter 4.pptx
Ad

More from DuraisamySubramaniam1 (7)

PPT
Advanced_OS_Unit 1 & 2.ppt
PPT
6-Design.ppt
PPT
4-ProjectPlanning.ppt
PPT
5-Architecture.ppt
PPT
2-SoftwareProcess.ppt
PPT
7-CodingAndUT.ppt
PPT
Advanced_OS_Unit 1 & 2.ppt
6-Design.ppt
4-ProjectPlanning.ppt
5-Architecture.ppt
2-SoftwareProcess.ppt
7-CodingAndUT.ppt
Ad

Recently uploaded (20)

PPTX
Ethiopian Law of Contract short note.pptx
PDF
Notes to accompany the TMT and FRAND Overview Slides
PDF
Plausibility - A Review of the English and EPO cases
PDF
SUMMARY CASES-42-47.pdf tax -1 257++/ hsknsnd
PPTX
UDHR & OTHER INTERNATIONAL CONVENTIONS.pptx
PPTX
prenuptial agreement ppt my by a phd scholar
PPTX
Ethiopian Civil procedure short note.pptx
PDF
Analysis Childrens act Kenya for the year 2022
PDF
The Advocate, Vol. 34 No. 1 Fall 2024
PDF
Vinayaka Mission Law School Courses and Infrastructure.pdf
PPTX
Lecture Notes on Family Law - Knowledge Area 5
PPTX
ART OF LEGAL WRITING IN THE CBD [Autosaved].pptx
PPTX
BUSINESS LAW AND IT IN CONTRACT SIGNING AND MANAGEMENT
PPT
Over view on IPR and its components :ppt
PPTX
PART-3-FILIPINO-ADMINISTRATIVE-CULTURE.pptx
PDF
OpenAi v. Open AI Summary Judgment Order
PPT
Cyber-Crime-in- India at Present day and Laws
PDF
AHRP LB - Quick Look of the Newly-initiated Koperasi Merah Putih (KMP).pdf
PDF
Notes on Plausibility - A Review of the English and EPO Cases
PPTX
2.....FORMULATION OF THE RESEARCH PROBLEM.pptx
Ethiopian Law of Contract short note.pptx
Notes to accompany the TMT and FRAND Overview Slides
Plausibility - A Review of the English and EPO cases
SUMMARY CASES-42-47.pdf tax -1 257++/ hsknsnd
UDHR & OTHER INTERNATIONAL CONVENTIONS.pptx
prenuptial agreement ppt my by a phd scholar
Ethiopian Civil procedure short note.pptx
Analysis Childrens act Kenya for the year 2022
The Advocate, Vol. 34 No. 1 Fall 2024
Vinayaka Mission Law School Courses and Infrastructure.pdf
Lecture Notes on Family Law - Knowledge Area 5
ART OF LEGAL WRITING IN THE CBD [Autosaved].pptx
BUSINESS LAW AND IT IN CONTRACT SIGNING AND MANAGEMENT
Over view on IPR and its components :ppt
PART-3-FILIPINO-ADMINISTRATIVE-CULTURE.pptx
OpenAi v. Open AI Summary Judgment Order
Cyber-Crime-in- India at Present day and Laws
AHRP LB - Quick Look of the Newly-initiated Koperasi Merah Putih (KMP).pdf
Notes on Plausibility - A Review of the English and EPO Cases
2.....FORMULATION OF THE RESEARCH PROBLEM.pptx

3-Requirements.ppt

  • 2. Requirements 2 Background  Problem of scale is a key issue for SE  For small scale, understand and specifying requirements is easy  For large problem - very hard; probably the hardest, most problematic and error prone  Input : user needs in minds of people  Output : precise statement of what the future system will do
  • 3. Requirements 3 Background..  Identifying and specifying req necessarily involves people interaction  Cannot be automated  Requirement (IEEE)= A condition or capability that must be possessed by a system  Req. phase ends with a software requirements specification (SRS) document  SRS specifies what the proposed system should do
  • 4. Requirements 4 Background..  Requirements understanding is hard  Visualizing a future system is difficult  Capability of the future system not clear, hence needs not clear  Requirements change with time  …  Essential to do a proper analysis and specification of requirements
  • 5. Requirements 5 Need for SRS  SRS establishes basis of agreement between the user and the supplier.  Users needs have to be satisfied, but user may not understand software  Developers will develop the system, but may not know about problem domain  SRS is the medium to bridge the commn. gap and specify user needs in a manner both can understand
  • 6. Requirements 6 Need for SRS…  Helps user understand his needs.  users do not always know their needs  must analyze and understand the potential  the goal is not just to automate a manual system, but also to add value through IT  The req process helps clarify needs  SRS provides a reference for validation of the final product  Clear understanding about what is expected.  Validation - “ SW satisfies the SRS “
  • 7. Requirements 7 Need for SRS…  High quality SRS essential for high Quality SW  Requirement errors get manifested in final sw  to satisfy the quality objective, must begin with high quality SRS  Requirements defects are not few  25% of all defects in one case; 54% of all defects found after UT  80 defects in A7 that resulted in change requests  500 / 250 defects in previously approved SRS.
  • 8. Requirements 8 Need for SRS…  Good SRS reduces the development cost  SRS errors are expensive to fix later  Req. changes can cost a lot (up to 40%)  Good SRS can minimize changes and errors  Substantial savings; extra effort spent during req. saves multiple times that effort  An Example  Cost of fixing errors in req. , design , coding , acceptance testing and operation are 2 , 5 , 15 , 50 , 150 person-months
  • 9. Requirements 9 Need for SRS…  Example …  After req. phase 65% req errs detected in design , 2% in coding, 30% in Acceptance testing, 3% during operation  If 50 requirement errors are not removed in the req. phase, the total cost 32.5 *5 + 1*15 + 15*50 + 1.5*150 = 1152 hrs  If 100 person-hours invested additionally in req to catch these 50 defects , then development cost could be reduced by 1152 person-hours.  Net reduction in cost is 1052 person-hours
  • 10. Requirements 10 Requirements Process  Sequence of steps that need to be performed to convert user needs into SRS  Process has to elicit needs and requirements and clearly specifies it  Basic activities  problem or requirement analysis  requirement specification  validation  Analysis involves elicitation and is the hardest
  • 12. Requirements 12 Requirement process..  Process is not linear, it is iterative and parallel  Overlap between phases - some parts may be analyzed and specified  Specification itself may help analysis  Validation can show gaps that can lead to further analysis and spec
  • 13. Requirements 13 Requirements Process…  Focus of analysis is on understanding the desired systems and it’s requirements  Divide and conquer is the basic strategy  decompose into small parts, understand each part and relation between parts  Large volumes of information is generated  organizing them is a key  Techniques like data flow diagrams, object diagrams etc. used in the analysis
  • 14. Requirements 14 Requirements Process..  Transition from analysis to specs is hard  in specs, external behavior specified  during analysis, structure and domain are understood  analysis structures helps in specification, but the transition is not final  methods of analysis are similar to that of design, but objective and scope different  analysis deals with the problem domain, whereas design deals with solution domain
  • 15. Requirements 15 Problem Analysis  Aim: to gain an understanding of the needs, requirements, and constraints on the software  Analysis involves  interviewing client and users  reading manuals  studying current systems  helping client/users understand new possibilities  Like becoming a consultant  Must understand the working of the organization , client and users
  • 16. Requirements 16 Problem Analysis…  Some issues  Obtaining the necessary information  Brainstorming: interacting with clients to establish desired properties  Information organization, as large amount of info. gets collected  Ensuring completeness  Ensuring consistency  Avoiding internal design
  • 17. Requirements 17 Problem Analysis…  Interpersonal issues are important  Communication skills are very important  Basic principle: problem partition  Partition w.r.t what?  Object - OO analysis  Function - structural analysis  Events in the system – event partitioning  Projection - get different views  Will discuss few different analysis techniques
  • 18. Requirements 18 Characteristics of an SRS  What should be the characteristics of a good SRS? Some key ones are  Complete  Unambiguous  Consistent  Verifiable  Ranked for importance and/or stability
  • 19. Requirements 19 Characteristics…  Correctness  Each requirement accurately represents some desired feature in the final system  Completeness  All desired features/characteristics specified  Hardest to satisfy  Completeness and correctness strongly related  Unambiguous  Each req has exactly one meaning  Without this errors will creep in  Important as natural languages often used
  • 20. Requirements 20 Characteristics…  Verifiability  There must exist a cost effective way of checking if sw satisfies requirements  Consistent  two requirements don’t contradict each other  Ranked for importance/stability  Needed for prioritizing in construction  To reduce risks due to changing requirements
  • 21. Requirements 21 Components of an SRS  What should an SRS contain ?  Clarifying this will help ensure completeness  An SRS must specify requirements on  Functionality  Performance  Design constraints  External interfaces
  • 22. Requirements 22 Functional Requirements  Heart of the SRS document; this forms the bulk of the specs  Specifies all the functionality that the system should support  Outputs for the given inputs and the relationship between them  All operations the system is to do  Must specify behavior for invalid inputs too
  • 23. Requirements 23 Performance Requirements  All the performance constraints on the software system  Generally on response time , throughput etc => dynamic  Capacity requirements => static  Must be in measurable terms (verifiability)  Eg resp time should be xx 90% of the time
  • 24. Requirements 24 Design Constraints  Factors in the client environment that restrict the choices  Some such restrictions  Standard compliance and compatibility with other systems  Hardware Limitations  Reliability, fault tolerance, backup req.  Security
  • 25. Requirements 25 External Interface  All interactions of the software with people, hardware, and sw  User interface most important  General requirements of “friendliness” should be avoided  These should also be verifiable
  • 26. Requirements 26 Specification Language  Language should support desired char of the SRS  Formal languages are precise and unambiguous but hard  Natural languages mostly used, with some structure for the document  Formal languages used for special features or in highly critical systems
  • 27. Requirements 27 Structure of an SRS  Introduction  Purpose , the basic objective of the system  Scope of what the system is to do , not to do  Overview  Overall description  Product perspective  Product functions  User characteristics  Assumptions  Constraints
  • 28. Requirements 28 Structure of an SRS…  Specific requirements  External interfaces  Functional requirements  Performance requirements  Design constraints  Acceptable criteria  desirable to specify this up front.  This standardization of the SRS was done by IEEE.
  • 29. Requirements 29 Use Cases Approach for Functional Requirements  Traditional approach for fn specs – specify each function  Use cases is a newer technique for specifying behavior (functionality)  I.e. focuses on functional specs only  Though primarily for specification, can be used in analysis and elicitation  Can be used to specify business or org behavior also, though we will focus on sw  Well suited for interactive systems
  • 30. Requirements 30 Use Cases Basics  A use case captures a contract between a user and system about behavior  Basically a textual form; diagrams are mostly to support  Also useful in requirements elicitation as users like and understand the story telling form and react to it easily
  • 31. Requirements 31 Basics..  Actor: a person or a system that interacts with the proposed system to achieve a goal  Eg. User of an ATM (goal: get money); data entry operator; (goal: Perform transaction)  Actor is a logical entity, so receiver and sender actors are different (even if the same person)  Actors can be people or systems  Primary actor: The main actor who initiates a UC  UC is to satisfy his goals  The actual execution may be done by a system or another person on behalf of the Primary actor
  • 32. Requirements 32 Basics..  Scenario: a set of actions performed to achieve a goal under some conditions  Actions specified as a sequence of steps  A step is a logically complete action performed either by the actor or the system  Main success scenario – when things go normally and the goal is achieved  Alternate scenarios: When things go wrong and goals cannot be achieved
  • 33. Requirements 33 Basics..  A UC is a collection of many such scenarios  A scenario may employ other use cases in a step  I.e. a sub-goal of a UC goal may be performed by another UC  I.e. UCs can be organized hierarchically
  • 34. Requirements 34 Basics…  UCs specify functionality by describing interactions between actors and system  Focuses on external behavior  UCs are primarily textual  UC diagrams show UCs, actors, and dependencies  They provide an overview  Story like description easy to understand by both users and analysts  They do not form the complete SRS, only the functionality part
  • 35. Requirements 35 Example Use Case 1: Buy stocks Primary Actor: Purchaser Goals of Stakeholders: Purchaser: wants to buy stocks Company: wants full transaction info Precondition: User already has an account
  • 36. Requirements 36 Example …  Main Success Scenario 1. User selects to buy stocks 2. System gets name of web site from user for trading 3. Establishes connection 4. User browses and buys stocks 5. System intercepts responses from the site and updates user portfolio 6. System shows user new portfolio stading
  • 37. Requirements 37 Example…  Alternatives  2a: System gives err msg, asks for new suggestion for site, gives option to cancel  3a: Web failure. 1-Sys reports failure to user, backs up to previous step. 2-User exits or tries again  4a: Computer crashes  4b: web site does not ack purchase  5a: web site does not return needed info
  • 38. Requirements 38 Example 2  Use Case 2: Buy a product  Primary actor: buyer/customer  Goal: purchase some product  Precondition: Customer is already logged in
  • 39. Requirements 39 Example 2…  Main Scenario 1. Customer browses and selects items 2. Customer goes to checkout 3. Customer fills shipping options 4. System presents full pricing info 5. Customer fills credit card info 6. System authorizes purchase 7. System confirms sale 8. System sends confirming email
  • 40. Requirements 40 Example 2…  Alternatives  6a: Credit card authorization fails  Allows customer to reenter info  3a: Regular customer  System displays last 4 digits of credit card no  Asks customer to OK it or change it  Moves to step 6
  • 41. Requirements 41 Example – An auction site  Use Case1: Put an item for auction  Primary Actor: Seller  Precondition: Seller has logged in  Main Success Scenario:  Seller posts an item (its category, description, picture, etc.) for auction  System shows past prices of similar items to seller  System specifies the starting bid price and a date when auction will close  System accepts the item and posts it  Exception Scenarios:  -- 2 a) There are no past items of this category * System tells the seller this situation
  • 42. Requirements 42 Example – auction site..  Use Case2: Make a bid  Primary Actor: Buyer  Precondition: The buyer has logged in  Main Success Scenario:  Buyer searches or browses and selects some item  System shows the rating of the seller, the starting bid, the current bids, and the highest bid; asks buyer to make a bid  Buyer specifies bid price, max bid price, and increment  Systems accepts the bid; Blocks funds in bidders account  System updates the bid price of other bidders where needed, and updates the records for the item
  • 43. Requirements 43  Exception Scenarios:  -- 3 a) The bid price is lower than the current highest * System informs the bidder and asks to rebid  -- 4 a) The bidder does not have enough funds in his account * System cancels the bid, asks the user to get more funds
  • 44. Requirements 44 Example –auction site..  Use Case3: Complete auction of an item  Primary Actor: Auction System  Precondition: The last date for bidding has been reached  Main Success Scenario:  Select highest bidder; send email to selected bidder and seller informing final bid price; send email to other bidders also  Debit bidder’s account and credit seller’s account  Transfer from seller’s account commission amount to organization’s account  Unblock other bidders funds  Remove item from the site; update records  Exception Scenarios: None
  • 45. Requirements 45 Example – summary-level Use Case  Use Case 0 : Auction an item  Primary Actor: Auction system  Scope: Auction conducting organization  Precondition: None  Main Success Scenario:  Seller performs put an item for auction  Various bidders make a bid  On final date perform Complete the auction of the item  Get feed back from seller; get feedback from buyer; update records
  • 46. Requirements 46 Requirements with Use Cases  UCs specify functional requirements  Other req identified separately  A complete SRS will contain the use cases plus the other requirements  Note – for system requirements it is important to identify UCs for which the system itself may be the actor
  • 47. Requirements 47 Developing Use Cases  UCs form a good medium for brainstorming and discussions  Hence can be used in elicitation and problem analysis also  UCs can be developed in a stepwise refinement manner  Many levels possible, but four naturally emerge
  • 48. Requirements 48 Developing…  Step 1: Identify actors and goals  Prepare an actor-goal list  Provide a brief overview of the UC  This defines the scope of the system  Completeness can also be evaluated  Step 2: Specify main Success Scenarios  For each UC, expand main scenario  This will provide the normal behavior of the system  Can be reviewed to ensure that interests of all stakeholders and actors is met
  • 49. Requirements 49 Developing…  Step 3: Identify failure conditions  List possible failure conditions for UCs  For each step, identify how it may fail  This step uncovers special situations  Step 4: Specify failure handling  Perhaps the hardest part  Specify system behavior for the failure conditions  New business rules and actors may emerge
  • 51. Requirements 51 Data Flow Modeling  Widely used; focuses on functions performed in the system  Views a system as a network of data transforms through which the data flows  Uses data flow diagrams (DFDs) and functional decomposition in modeling  The SSAD methodology uses DFD to organize information, and guide analysis
  • 52. Requirements 52 Data flow diagrams  A DFD shows flow of data through the system  Views system as transforming inputs to outputs  Transformation done through transforms  DFD captures how transformation occurs from input to output as data moves through the transforms  Not limited to software
  • 53. Requirements 53 Data flow diagrams…  DFD  Transforms represented by named circles/bubbles  Bubbles connected by arrows on which named data travels  A rectangle represents a source or sink and is originator/consumer of data (often outside the system)
  • 55. Requirements 55 DFD Conventions  External files shown as labeled straight lines  Need for multiple data flows by a process represented by * (means and)  OR relationship represented by +  All processes and arrows should be named  Processes should represent transforms, arrows should represent some data
  • 56. Requirements 56 Data flow diagrams…  Focus on what transforms happen , how they are done is not important  Usually major inputs/outputs shown, minor are ignored in this modeling  No loops , conditional thinking , …  DFD is NOT a control chart, no algorithmic design/thinking  Sink/Source , external files
  • 57. Requirements 57 Drawing a DFD  If get stuck , reverse direction  If control logic comes in , stop and restart  Label each arrows and bubbles  Make use of + & *  Try drawing alternate DFDs Leveled DFDs :  DFD of a system may be very large  Can organize it hierarchically  Start with a top level DFD with a few bubbles  then draw DFD for each bubble  Preserve I/O when “ exploding”
  • 58. Requirements 58 Drawing a DFD for a system  Identify inputs, outputs, sources, sinks for the system  Work your way consistently from inputs to outputs, and identify a few high-level transforms to capture full transformation  If get stuck, reverse direction  When high-level transforms defined, then refine each transform with more detailed transformations
  • 59. Requirements 59 Drawing a DFD for a system..  Never show control logic; if thinking in terms of loops/decisions, stop & restart  Label each arrows and bubbles; carefully identify inputs and outputs of each transform  Make use of + & *  Try drawing alternate DFDs
  • 60. Requirements 60 Leveled DFDs  DFD of a system may be very large  Can organize it hierarchically  Start with a top level DFD with a few bubbles  then draw DFD for each bubble  Preserve I/O when “ exploding” a bubble so consistency preserved  Makes drawing the leveled DFD a top-down refinement process, and allows modeling of large and complex systems
  • 61. Requirements 61 Data Dictionary  In a DFD arrows are labeled with data items  Data dictionary defines data flows in a DFD  Shows structure of data; structure becomes more visible when exploding  Can use regular expressions to express the structure of data
  • 62. Requirements 62 Data Dictionary Example  For the timesheet DFD Weekly_timesheet – employee_name + id + [regular_hrs + overtime_hrs]* Pay_rate = [hourly | daily | weekly] + dollar_amt Employee_name = last + first + middle Id = digit + digit + digit + digit
  • 63. Requirements 63 DFD drawing – common errors  Unlabeled data flows  Missing data flows  Extraneous data flows  Consistency not maintained during refinement  Missing processes  Too detailed or too abstract  Contains some control information
  • 64. Requirements 64 Prototyping  Prototyping is another approach for problem analysis  Discussed it earlier with process – leads to prototyping process model
  • 65. Requirements 65 Requirements Validation  Lot of room for misunderstanding  Errors possible  Expensive to fix req defects later  Must try to remove most errors in SRS  Most common errors  Omission - 30%  Inconsistency - 10-30%  Incorrect fact - 10-30%  Ambiguity - 5 -20%
  • 66. Requirements 66 Requirements Review  SRS reviewed by a group of people  Group: author, client, user, dev team rep.  Must include client and a user  Process – standard inspection process  Effectiveness - can catch 40-80% of req. errors
  • 67. Requirements 67 Summary  Having a good quality SRS is essential for Q&P  The req. phase has 3 major sub phases  analysis , specification and validation  Analysis  for problem understanding and modeling  Methods used: SSAD, OOA , Prototyping  Key properties of an SRS: correctness, completeness, consistency,unambiguousness
  • 68. Requirements 68 Summary..  Specification  must contain functionality , performance , interfaces and design constraints  Mostly natural languages used  Use Cases is a method to specify the functionality; also useful for analysis  Validation - through reviews