Unit 1 Final
Unit 1 Final
2
REQUIREMENTS ANALYSIS AND
SPECIFICATION
INTRODUCTION
FUNCTIONAL & NON-FUNCTIONAL REQUIREMENTS
USER REQUIREMENTS
SYSTEM REQUIREMENTS
CLASSICAL ANALYSIS
2. 2 Software Engineering
2.1 INTRODUCTION
IEEE defines a requirement as
1. A condition or capability needed by a user to solve aproblem (or) achieve an
objective.
2. A condition (or) a capability that must be met (or) possessed by a system to
satisfy a contract.
The description of services and contraints are the requirements for the system and the
process of finding out, analysis, documenting and checking these services and constraints is
called requirement engineering.
Different types of requirements
User Requirements
User requirements are statements in a natural language plus diagrams of what service the
system is expected to provide and the constraints under which it must operate.
The readers of user requirements are client managers, system end - user, client
engineers, contractor managers and system architects.
System Requirements
System requirements set out the system services and constraints in detail. The system
requirement document (or) functional requirement should be precise. It may serve as a
contract between the system buyer and software developer.
The reader of the system requirements are system end users, client engineers, system
architects and software developers.
Software Design Specification
A software design specification is an abstract description of the software design which is
a basis for more detailed design and implementation.
The readers of software design specification requirements are system architects and
software developers.
Two kinds of Requirement Document
1. User Requirement Definition Document
2. System Requirement Specification Document
Requirements Analysis and Specification 2. 3
The requirement definition is a complete listing of everything the customer expects the
proposed system to do. It represents an understanding between the customer and developer.
For example: For a system printing weekly paychecks, the functional requirement must
answer the following questions:
1. What input is necessary for a paycheck to be printed?
3. External Requirements
These are all requirements which are derived from factors external to the system and its
development process.
Interoperability requirements defines how the system interacts with system in other
organisations.
Legistative requirements which must be followed to ensure that the system operates
within the law and ethical requirements
Ethical requirements are requirements placed on a system to ensure that it will be
acceptable to its users and the general public.
A common problem with non-functional requirement is that they are sometimes difficult
to verify. They may be written to reflect general goals of the customer such as ease of use, the
ability of the system to recover from failure (or) rapid user response.
A non-functional requirement should be expressed quantitatively using metrics that can
be objectively tested as followed:
Property Measure
Speed Proceed transactions / Event response time
Size k bytes, No. of RAM chips
Ease of use Training time, No. of help frames
Reliability Mean time to failure, rate of failure occurence
Robustness Time to restart after failure
Portability % of target dependent statements, No.of target systems.
1. There shall be a standard user interface to all databases that shall be based the Z39.50
standard.
2. Because of copyright restrictions, some documents must be deleted immediately on
arrival. Depending on the user’s requirements, these documents will either be printed
locally on the system server for manual forwarding to the user or routed to a network
printer.
The first requirement is a design constraint. It specifies that the user interface to the
database must be implemented according to a specific library standard. The developer
therefore have to find out about that standard before starting the interface design. The second
requirement has been introduced because of copyright laws that apply to material used in
libraries. It specifies that the system must include an automatic delete-on-print facility for
some classes of document. This means that users of library system cannot have their own
electronic copy of the document.
2.3 USER REQUIREMENTS
The user requirements for a system should describe the functional and non-functional
requirements so that they are understandable by system users who don’t have detailed
technical knowledge. It should specify the external behaviour of the system and should avoid
system design characteristics. The user requirements must be written using natural language,
forms and simple interactive diagram.
When user requirements are written in natural language they face several problems such
as:
a. Lack of Clarity: It is sometimes difficult to use language in a precise and
unambigious way without making the document word and difficult to read.
b. Requirements Confusion: Functional requirements, non-functional requirements,
system goals and design information may not be clearly distinguished.
3. Use text highlighting (bold and italic) to pickout key parts of the requirements.
4. Avoid the use of computer jargon as far as possible.
2.4 SYSTEM REQUIREMENTS
System requirements are more detailed descriptions of user requirements which is the
basis for implmentation of the system. It should be complete and consistent specification of
the whole system. The system requirement specification may include different models of the
system such as an object model (or) a data-flow model.
The system requirement should state what the system should do and not how it should be
implemented. However to specify the system completely, it is virutally impossible to exclude
all design information. There are several reasons for this:
1. An initial architecture of the system may be defined to help structure the requirements
specification. The system requirements are organised according to the different sub
system which make up the system.
2. The system must interoperate with other existing systems. These constrain the design and
these constraints generate requirements for the new system.
3. The use of a specific design may be an external system requirement.
Natural language is often used to write system requirement specification but there arises
problems as described in Section 2.3 so we suggest some of the alternatives to the use of
natural language which add structure to the specification and which help to reduce ambiguity.
1. Introduction
1.4 References
2. General Description
3. Specific Requirements:
involving functional, non-functional and interface requirements
4. Appendices
5. Bibliography and Index
The requirements document should be organised in such a manner that it aids validation
and system design. For different projects, many of the sections may not be needed and can be
omitted.
Users of Software Requirement Document
The requirements document has a diverse set of users as illustrated in Fig. 2.5.
System
Maintenance
Use the requirements to help understand the
Engineers system and the relationship between its parts.
Characteristics of an SRS
To properly satisfy the basic goals, an SRS should have certain properties and should
contain different types of requirements. A good SRS should be
1. Correct– if every requirement represents something required in the final system.
2. Complete– Ensures everything (ie.) every requirement is indeed specified.
3. Unambigious – Every requirement stated how one and only intrepretation.
4. Verifaible– If and only if every stated requirement verifiable.
5. Consistent– No Requirement conflicts with another.
7. Modifiable– An SRS is modifiable if its structure and style are such that any necessary
change can be made while preserving completeness and consistency
8. Traceable– All requirements are clear and facilitates referencing of other in future
development.
Components of an SRS
The basic issues all SRS must address are
1. Functionality
2. Performance
3. Design constraints imposed on an implementation
4. External Interfaces
Specification Languages
Some of the commonly used languages for requiements specification are
1. Standard English – Natural languages are widely used for specifing requirements
but sometimes it may be imprecise and ambigious.
2. Regular Expression – Used to specify the structure of symbol strings fromally. Used
in compiler construction for recognition of symbols and tokens.
Feasibility
elicitation &
Study
analysis
Feasibility
Specification
report
System Requirement
models Validation
User & System
requirements
Requirement
document
A feasibility study is a short, focussed study which aims answers to the following
questions:
1. Does the system contribute to the overall objectives of the organistion?
2. Can the system be implemented using current technology and within given cost and
schedule constraints?
3. Can the system be integrated with other systems which are already in place? If a
system does not support these objectives, it has no real value to the business. Carrying
a) Information Assessment
b) Information Collection
c) Report Writing
Information Assesment
This phase identifies the information which is required to answer the three questions set
out above. Once the information have been identified, the information sources has to be
questioned to answer the following:
1. How would the organisation cope if this system was not implemented?
2. What are the problems with current process and how would a new system
help allievate these problems?
3. What direct contribution will the system make to the business objectives?
4. Can information be transferred to and from other organisational systems?
5. Does the system require technology which has not previously been used in
the organisation?
6. What must be supported by the system and what need not be supported?
Information sources may include the managers of department where the system will be
used, software engineers who are familiar with the type of system that is proposed,
technology experts and end users of the system.
When the information is available, the feasibility study report is prepared. It should make
a recommendation about whether or not the system development should continue. It may
propose changes to the scope, budget and schedule of the system and suggest further high
level requirement for the system.
2. 14 Software Engineering
Requirement
Requirement Specification
Checking
Requirement
Domain Document
Prioritisation
Process Understanding
entry
Requirement Conflict
Collection resolution
Classification
Some suggest that a “standard template” should be developed and used for a system
specification, arguing that this leads to requirements that are presented in a consistent and
therefore more understandable manner. However, it is sometimes necessary to remain flexible
when a specification is to be developed. For large systems, a written document, combining
natural language descriptions and graphical models may be the best approach. However,
usage scenarios may be all that are required for smaller products or systems that reside within
well-understood technical environments.
The System Specification is the final work product produced by the system and
requirements engineer. It serves as the foundation for hardware engineering, soft ware
engineering, database engineering, and human engineering. It describes the function and
performance of a computer-based system and the constraints that will govern its
development. The specification bounds each allocated system element. The System
Specification also describes the information (data and control) that is input to and output from
the system.
2.10 REQUIREMENTS VALIDATION
Scenarios: Scenarios describe different situations of how the system will work once it is
operational. Constructing scnarios is good for clarifying misunderstandings in the human-
computer interaction area. They are of limited value for verifying the consistency and
completeness of requirements.
Reading: The goal in reading is to have something other than the author of the
requirements read the requirements specification document to identify potential problems.
Reading is effective only if the reader takes the job seriously and reads the requirements
carefully. Reading is limited in scope for completeness and consistency errors, particularly
for large software systems.
2.11 REQUIREMENTS MANAGEMENT
Requirements management is a set of activities that help the project team to identify,
control and track requirements and changes to requirements at any time as the project
proceeds.
Like SCM requirements management begins with identification. Each requirement is
assigned a unique identifier that might take the form
< requirement type > < requirement # >
Requirement type may be
F = Functional requirement D = Data requirement
B = Behavioural requirement I = Interface requirement
P = Output requirement
Requirements Classes
1. Enduring Requirements: Stable requirements which are derived from the core activity
of the organisation and which relate directly to the domain of the system.
2. Volatile Requirements: These requirements are likely to change during the system
development or after the system has been put into operation.
a. Mutable Requirment: Requirements which change because of changes to the
environment in which the organisation is operating.
b. Emergent Requirement: Requirements whcih emerge as the customers
understanding of the system develops during the system development.
c. Consequential Requirement: Requirements which result from the introduction of
the computer system which may change the organisations process and open up for
new system requirements.
2. 20 Software Engineering
3 . Design traceability information: links the requirements to the design modules where
these requirements are implemented.
❖ Case Tool Support: Requirements management involves the processing of large
amounts of information about the requirements (eg.) spread sheets and databases. Some
of the ease tools are need for automated support and for the following purposes:
Requirements Storage: Requirements should be maintained in a secure, managed data
store which is accessible to everyone involved in requirements engineering process.
During this stage, the problem or the change proposal is analysed to check whether it is
valid.
Change analysis and costing: The effect of the proposed change is assessed using
traceability information. The cost incurred by both modifications of requirements documents,
system design and implementation is analysed and a final decision is made.
Formal methods: Techniques such as Petri nets, Finite State Machines(FSMs) and
Z.
Requirements Analysis and Specification 2. 23
❖ Graphical Notation used to Describe how data flows between Processes in a System:
– Use Notation that Represents Functional Processing, Data Stores and Data
Movements (flows) Between Sequences of Functional Units.
– Focus is on ‘What’ Happens, Not ‘How’ It Happens.
– Development Proceeds Stepwise
– Start with “Context Level” diagram, and then refine.
Sally’s Software Shop Mini Case Study - An Example Using DFDs
❖ Sally’s Software Store buys software from various suppliers and sells it to the public.
Popular software packages are kept in stock, but the rest must be ordered
as required. Institutions and corporations are given credit facilities, as are some
members of the public. Sally’s Software Store is doing well, with a monthly turnover
of 300 packages at an average retail cost of $250 each. Despite her business success,
Sally has been advised to computerize. Should she?
❖ A better question
o What business functions should she computerize?
– Accounts payable
– Accounts receivable
– Inventory
• Still better
o How? Batch, or online? In-house or outsourcing?
• The fundamental issue
o What is Sally’s objective in computerizing her business?
2. 24 Software Engineering
• First refinement
o Infinite number of possible interpretations.
2. 26 Software Engineering
➢ Blocking factor
➢ Records (to field level)
➢ Table information, if a DBMS is to be used
Step 7: Determine input-output specifications
• Specify
➢ Input forms
➢ Input screens
➢ Printed output
Step 8: Determine sizing
• Obtain the numerical data needed in Step 9 to determine the hardware requirements
❖ As reflected in the DFD, the user can perform three different types of operations:
1. Update investment data, mortgage data, or operating expenses data:
• The USER enters an update_request
• To update investment data, process
perform_selected_update solicits the
updated_investment_details from the USER, and sends
then to the INVESTMENT_DATA store of data
• Updating mortgage data or expenses data is similar
2. 32 Software Engineering
• Composed of: Problem statement language (PSL) and problem statement analyzer
(PSA)
• Particularly used for documenting products
❖ SADT — Consists of structural analysis (SA) a box-and-arrow diagramming
technique and a design technique (DT)
• Used specially in complex, large-scale projects
Requirements Analysis and Specification 2. 33
For example, a student is an entity which relates to another entity course where each
entity has its own attributes as illustrated in Table 2.3(a).
Entity
Name Reg. No. Age Sex Grade
X 001 24 M S
Y 005 23 F A
Z 007 27 M B
Student
Table 2.3(a) Representation of Student Data Objects
2.34 Software Engineering
We use capital letters in naming an entity type and in an ER diagram the name is placed
inside a rectangle representing that entity as shown in Fig. 2.12.
Employee Department
Works
Employee Organisation
for
Degree Relationship
Degree of Relationship is the number of entity types that participate in that relationship.
Some of the common relationships are
Unary Relationship
Binary Relationship
Two different entities are related to one another by means of various relationship such
as
• One–to–One
1 Is 1
Car assigned Parking Place
One – to – One
• One–to–Many
1 N
Book Store Order Books
One – to – Many
2. 36 Software Engineering
• Many to Many
M N
Book Store Regosters Course
Many – to – Many
Works
for
Employee Department
Project
Sex
Attributes which are divided into subparts are called as composite attributes. For
example,
First Name
Emp. Name Middle Name Composite
Employee Attributes
SSN Last Name
Expanding the model, a simplified ERD model of an automobile is illustrated in Fig. 2.15
which denotes different objects, relationships, their cardinality and modality among them
with respect to the notations referred previously.
Modality (mandatory)
Cardinality
Cardinality (Single)
(Multiple)
Contracts Transports
Modality
(Optional)
I(t2) = {p2}
❖ Output functions:
O(t ) = {p }
1 1 Fig. 2.16 a) A Petri Net
O(t2) = {p3, p3}
❖ More formally, a Petri net is a 4-tuple C = (P, T, I, O)
• P = {p1, p2, .. pn} is a finite set of places, n 0
❖ Four tokens: one in p1, two in p2, none in p3, and one in p4
• Represented by the vector (1,2,0,1)
• If t1 fires, one token is removed from p2 and one from p4, and one new token is
placed in p1
• Transition t2 is also enabled
❖ Important:
• The number of tokens is not conserved
❖ Petri nets are indeterminate
• Suppose t1 fires
❖ More formally, a marking M of a Petri net C = (P, T, I, O) is a function from the set
of places P to the non-negative integers
M : P → {0, 1, 2, …}
❖ A marked Petri net is then a 5-tuple (P, T, I, O, M )
❖ Inhibitor arcs
• An inhibitor arc is marked by a small circle, not an arrowhead
❖ Transition t1 is enabled
❖ In general, a transition is enabled if there is at least one token on each (normal) input
arc, and no tokens on any inhibitor input arcs
❖ If button EBf is not illuminated, no token is in place and transition EBf pressed is enabled.
• The transition fires, a new token is placed in EB
❖ Now, no matter how many times the button is pressed, transition EBf pressed cannot
be enabled
❖ When the elevator reaches floor g
• A token is in place Fg
• Transition Elevator in action is enabled, and then fires
❖ The tokens in EBf and Fg are removed
• This turns off the light in button EBf
❖ A new token appears in F
• This brings the elevator from floor g to floor f
Requirements Analysis and Specification 2. 43
❖ The Petri net in the previous slide models the situation when an elevator reaches
floor Ff from floor Fg with one or both buttons illuminated.
❖ If both buttons are illuminated, only one is turned off
❖ A more complex model is needed to ensure that the correct light is turned off
Third constraint
3. If an elevator has no requests, it remains at its current floor with its doors closed
❖ If there are no requests, no Elevator in action transition is enabled
2. 44 Software Engineering
The data dictionary is an organised testing of all data elements that are relevant to the
system so that both the user and system analyst will have a common understanding inputs,
outputs, components of stores and intermediate calculations. It is proposed as quasi-formal
grammar during structured analysis and may contain the following information.
❖ Name of the data item.
❖ Aliases (Other names for items)
❖ Description/Purpose – a notation for representing its goal or content.
❖ Related data items
❖ Range of value
❖ Data structure definition / form
❖ Where used / how-used (eg.) input to the process, output from the process, as
a store and external entity.
❖ Supplementary information – data types, preset values, restrictions or limitations.
A data dictionary is simplistically an alphabetic list of names which are included in
different models of the system.
The mathetical operation used in data dictionary is defined in Table 2.7.
To illustrate the use of data dictionary, we refer to a data item telephone number which
consists of
1. 8 digit local number
2. 3 digit extension
3. 25 digit long distance carrier sequence
The data dictionary provides us with the precise definition of the telephone number as
follows.
Name : telephone number
aliases : none
where used/ how used: assess against set up (output) dial phone (input)
Description
telephone number = [local number / long distance number]
local number = prefix + access number
long distance number = 1 + area code + local number
area code = [800/888/561]
For large computer systems, the data dictionary grows rapidly in size and complexity. In
fact, it is extremely difficult to maintain a dictionary manually. For these reasons, CASE tools
should be used.
The data dictionary defines information items unambigiously. Most case tools which
support system modelling also include support for data dictionaries.
Advantages
1. Mechanism for name management. The data dictionary software can check for name
uniquenss and tell requirements analysts of name duplications. The names should be
used consisting and should not clash.
2. It serves as a store of organisational information that can link analysis, design,
implementation and evolution.
3. The data dictionary software might be integrated with other tools so that dictionary
creation is partially automated.
4. Design the software and test cases.
2. 46 Software Engineering
REVIEW QUESTIONS
PART - A
PART – B
1. Explain the function and non – functional requirements in detail.
2. Explain the SRS for a typical software project.
3. Explain the feasibility studies. What are the outcomes? Does it have either explicit or
implicit effects on software requirement collection.
4. Explain the requirement engineering process in detail.
5. Describe how software requirements and documented? State the importance of
documentation.
6. Write short notes on data modeling.
7. Draw an E-R diagram for the relationship of manufacturing and dealership. Also
specify the association, cardinality and modality.
8. Explain the semiformal method-structured systems analysis in detail.
9. Explain the Semiformal method - Entity Relationship Modelling in detail.
10. Write a short notes on Petri Nets.
11. Explain Gane and Sargen’s methods in detail.
12. Explain Petri Nets with an case study in detail.
13. Explain the Structured Systems Analysis with an case study in detail.
14. Write a short notes on Data Dictionary.