Software (Unit2)
Software (Unit2)
Software (Unit2)
Software Requirements
Analysis and
Specification
Anoop M.B
Department of computer application
BCMCAV353
1
Problem of scale is a key issue for SE
2 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
Identifying and specifying req
3
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 understanding is hard
4 Visualizing a future system is difficult
…
system,
but also to add value through IT
The req process helps clarify needs
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
2) 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 Process..
11
needs
Analysis
Specification
Validation
Requirement process..
12
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
Problem Analysis…
17
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
5) Informal Approach
Informal methods of validation and
verification are some of the more
frequently used in modeling and
simulation. They are
called informal because they are more
qualitative than quantitative. ... In some
cases, informal methods offer the
convenience of quick testing to see if a
model can be validated.
There are several reasons why an informal
method might be chosen.
In some cases, informal methods offer the
convenience of quick testing to see if a
model can be validated.
Inspection is a verification method that is used
to compare how true the conceptual model
matches the executable model.
Depending on the resources available, the
members of the inspection team may or may
not be part of the model production team.
6) Structured Analysis
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
25 DFD Example
26
Data Dictionary
Requirements
7) Prototyping
27
Prototyping is another approach for problem
analysis
Throwaway prototyping
prototype only used as a demonstration of product
requirements
finished software is engineered using another paradigm
Evolutionary prototyping
prototype is refined to build the finished system
Customer resources must be committed to evaluation and
refinement of the prototype
Customer must be capable of making requirements decisions in a
timely manner.
8) Requirement Specification
A software requirements specification (SRS) is
a document that captures complete description
about how the system is expected to perform. It
is usually signed off at the end of requirements
engineering phase.
The below diagram depicts the various types of
requirements that are captured during SRS.
9)Characteristics of an SRS
30
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
10)Components of an SRS
33
Requirements
Functional Requirements
35
Requirements
External Interface
38
Requirements
12) structure of requirement
document
Requirements have to be specified using some
specification language
Though formal notations exist for specifying specific
properties of the system, natural languages are now
most often used for specifying requirements.
All the requirements for a system, stated using a
formal notation or natural language, have to be
included in a document that is clear and concise.
The IEEE standards recognize the fact that different
projects may require their requirements to be
organized differently, that is, there is no one method
that is suitable for all projects.
General structure of an SRS
Omission - 30%
Inconsistency - 10-30%
Incorrect fact - 10-30%
Ambiguity - 5 -20%
Requirements
43 14)Requirements Review
Requirements
14) Requirements Views
Essential view
presents the functions to be accomplished and the
information to be processed while ignoring
implementation
Implementation view
presents the real world realization of processing
functions and information structures
A v o i d the temptation to move directly to t
implementation view and assuming that the essence
of the problem is obvious.
Structure of an SRS
45
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
Structure of an SRS…
46
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
Functional Specification with Use
Cases
Requirements
55
developing Use Cases
Requirements
56
Developing Use Cases
Requirements
57
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
58
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
59 Data Flow Modeling
Requirements
64
Drawing a DFD for a system..
Requirements
65 Leveled DFDs
Requirements
66 Data Dictionary Example
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
67 DFD drawing – common errors
Software Architecture 68
Components
Units of computations or data stores
Has a name, which represents its role,
and provides it identity
A comp may have a type; diff types rep
by diff symbols in C&C view
Comps use ports (or
interfaces) to communicate
with others
An arch can use any symbols to rep
components; some common ones are
shown
69
Some Component examples…
Software Architecture 70
Connectors
Interaction between components happen
through connectors
A connector may be provided by the runtime
environment, e.g. procedure call
But there may be complex mechanisms for
interaction, e.g http, tcp/ip, ports,…; a lot of sw
needed to support them
Important to identify them explicitly; also
needed for programming comps properly
71
Connectors…
Connectors need not be binary, e.g. a
broadcast bus
Connector has a name (and a type)
Often connectors represented as
protocol –
i.e. comps need to follow some conventions
when using the connector
Best to use diff notation for diff types of
connectors; all connectors should not
be shown by simple lines
Software Architecture 72
Connector examples
Software Architecture 73
An Example
Design a system for taking online survey of
students on campus
Multiple choice questions, students submit
online
When a student submits, current result of the
survey is shown
Is best built using web; a 3-tier architecture
is proposed
Has a client, server, and a database
components
(each of a diff type)
Connector between them
Software are also of diff types
Architecture 74
Example…
Software Architecture 75
Example…
Software Architecture 78
Extension 2
Software Architecture 79
Extension 2…
Software Architecture 80
Preliminary design