Requirement Analysis
Requirement Analysis
Requirement Analysis
UNIT II
REQUIREMENTS ANALYSIS AND SPECIFICATION
1
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
c) The user shall be able to search either all of the initial set of databases or select a subset from
it.
d) The system shall provide appropriate viewers for the user to read documents in the document
store.
e) Every order shall be allocated a unique identifier (ORDER_ID) which the user shall be able to
copy to the account‘s permanent storage area.
f) Non-Functional requirements:
Requirements that are not directly concerned with the specific functions delivered by the system
Typically relate to the system as a whole rather than the individual system features
Often could be deciding factor on the survival of the system (e.g. reliability, cost, response time)
g) Non-Functional requirements classifications:
2
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
o Performance
o Capacity
Others are more difficult to quantify and, consequently, are often stated informally
o Usability
i) Organisational requirements
Process requirements are constraints placed upon the development process of the system
Process requirements include:
o Performance
o Capacity
Others are more difficult to quantify and, consequently, are often stated informally
o Usability
j) Organisational requirements
Process requirements are constraints placed upon the development process of the system
Process requirements include:
3
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
4
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Most software defines two sets of system requirements: minimum and recommended.
With increasing demand for higher processing power and resources in newer versions of software,
system requirements tend to increase over time. Industry analysts suggest that this trend plays a
bigger part in driving upgrades to existing computer systems than technological advancements.
A second meaning of the term of System requirements is a generalization of this first definition,
giving the requirements to be met in the design of a system or sub-system.
Typically an organization starts with a set of Business requirements and then derives the System
requirements from there.
2.2 SOFTWARE REQUIREMENT DOCUMENT
Should provide for communication among team members
Should act as an information repository to be used by maintenance engineers
Should provide enough information to management to allow them to perform all program
management related activities
Should describe to users how to operate and administer the system
specify external system behavior
Specify implementation constraints
Easy to change
Serve as reference tool for maintenance
Record forethought about the life cycle of the system i.e. predict changes
Characterize responses to unexpected events.
5
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
6
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
May involve end-users, managers, engineers involved in maintenance, domain experts, trade
unions, etc.
• These are called stakeholders
a) Problems of requirements analysis
Stakeholders don‘t know what they really want
Stakeholders express requirements in their own terms
Different stakeholders may have conflicting requirements
Organizational and political factors may influence the system requirements
The requirements change during the analysis process
• New stakeholders may emerge and the business environment change.
b) System models
Different models may be produced during the requirements analysis activity
Requirements analysis may involve three structuring activities which result in these different
models
• Partitioning – Identifies the structural (part-of) relationships between entities
• Abstraction – Identifies generalities among entities
• Projection – Identifies different ways of looking at a problem
c) Scenarios
Scenarios are descriptions of how a system is used in practice
They are helpful in requirements elicitation as people can relate to these more readily than abstract
statement of what they require from a system
Scenarios are particularly useful for adding detail to an outline requirements description
d) Ethnography
A social scientists spends a considerable time observing and analyzing how people actually work
People do not have to explain or articulate their work
Social and organizational factors of importance may be observed
Ethnographic studies have shown that work is usually richer and more complex than suggested by
simple system models.
2.3.3 Requirements validation
Concerned with demonstrating that the requirements define the system that the customer really
wants.
Requirements error costs are high so validation is very important.
• Fixing a requirements error after delivery may cost up to 100 times the cost of fixing an
implementation error.
Requirements checking
• Validity
• Consistency
• Completeness
• Realism
8
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
9
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Rapid, iterative development of the prototype is essential so that costs are controlled and system
stakeholders can experiment with the prototype early in the software process.
A software prototype can be used in a software development process in several ways:
1. In the requirements engineering process, a prototype can help with the elicitationand validation of
system requirements.
2. In the system design process, a prototype can be used to explore particular softwaresolutions and
to support user interface design.
3. In the testing process, a prototype can be used to run back-to-back tests withthe system that will
be delivered to the customer.
System prototypes allow users to see how well the system supports their work.
They may get new ideas for requirements and find areas of strength and weakness in the software.
They may then propose new system requirements. Furthermore, as the prototype is developed, it
may reveal errors and omissions in the requirements that have been proposed.
A system prototype may be used while the system is being designed to carry out design
experiments to check the feasibility of a proposed design.
For example,
A database design may be prototyped and tested to check that it allows for the most efficient data
access for the most common user queries.
Prototyping is also an essential part of the user interface design process.
Because of the dynamic nature of user interfaces, textual descriptions and diagrams are not good
enough for expressing the user interface requirements.
When a system prototype is available, we can reduce the effort involved in result checking by
running back-to-back tests figure Back-to back testing. The same test cases are submitted to the
prototype and to the system under test. If both systems give the same result, the test case has
probably not detected a fault. If the results differ, it may mean that there is a system fault and the
reasons for the difference should be investigated.
Finally, as well as supporting software process activities, prototypes can be used to reduce the time
required to develop user documentation and to train users with the system.
11
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
i) The UML does not include a specific notation for this database modelling, as it assumes an object-
oriented development process and models data using objects and their relationships. However, you
can use the UML to represent a semantic data model. You can think of entities in an ERA model
as simplified object classes (they have no operations), attributes as class attributes and named
associations between the classes as relations.
ii) Like all graphical models, data models lack detail, and you should maintain more detailed
descriptions of the entities, relationships and attributes that are included in the model. You may
collect these more detailed descriptions in a repository or data dictionary.
The advantages of using a data dictionary are:
1. It is a mechanism for name management. Many people may have to invent names for entities
and relationships when developing a large system model. These names should be used consistently
and should not clash. The data dictionary software can check for name uniqueness where necessary
and warn requirements analysts of name duplications.
2. It serves as a store of organisational information.
As the system is developed, information that can link analysis, design, implementation and
evolution is added to the data dictionary, so that all information about an entity is in one place.
The data dictionary entries shown in Figure 2.8(Examples of data dictionary entries) define the
names in the semantic data model for LIBSYS.
2.3.6 Functional Model
Information is transformed as it flows through a computer-based system.
The system accepts input in a variety of forms; applies hardware, software, and human elements
to transform it; and produces output in a variety of forms.
14
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
In addition, the PSPEC indicates restrictions and limitations imposed on the process (function),
performance characteristics that are relevant to the process, and design constraintsthat may
influence the way in which the process will be implemented.
a) Extensions for Real-Time Systems
A real-time system must interact with the real world in a time frame dictated by the real world.
Aircraft avionics, manufacturing process control, consumer products, andindustrial
instrumentation are but a few of hundreds of real-time software applications.
To accommodate the analysis of real-time software, a number of extensions to the basic Notation
for structured analysis have been defined.
These extensions, developed by Ward and Mellor and Hatley and Pirbhai and illustrated.
b) Ward and Mellor Extensions
Ward and Mellor extend basic structured analysis notation to accommodate the following
demands imposed by a real-time system:
• Information flow is gathered or produced on a time-continuous basis.
• Control information is passed throughout the system and associated controlprocessing.
• Multiple instances of the same transformation are sometimes encountered in multitasking
situations.
• Systems have states and a mechanism causes transition between states.
In a significant percentage of real-time applications, the system must monitor
timecontinuousinformation generated by some real-world process.
For example, a real time test monitoring system for gas turbine engines might be required to
monitor turbine speed, combustor temperature, and a variety of pressure probes on a continuous
basis.
One extension to basic structured analysis notation, shown in Figure 2.10 above, provides a
mechanism for representing time-continuous data flow.
The double headed arrow is used to represent time-continuous flow while a single headed arrow
is used to indicate discrete data flow.
In the figure 2.10, monitored temperature is measured continuously while a single value for
temperature set point is also provided.
The process shown in the figure 2.10produces a time-continuous output, corrected value.
A process that handles only control flows, called a control process, is similarly represented using
a dashed bubble.
Control flow can be input directly to a conventional process or into a control process.
Figure 2.12 illustrates control flow and processing as it would be represented using Ward and
Mellor notation.
The figure 2.12 illustrates a top-level view of a data and control flow for a manufacturing cell.
As components to be assembled by a robot are placed on fixtures, a status bit is set within a parts
status buffer (a control store) that indicates the presence or absence of each component.
16
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
In essence, the solid bar can be viewed as a "Window" into an "executive" (the CSPEC) that
controls the processes (functions) represented in the DFD based on the event that is passed through
the window.
A process specification is used to describe the inner workings of a process represented in a flow
diagram.
Data flow diagrams are used to represent data and the processes that manipulate it.
Control flow diagrams show how events flow among processes and illustrate those external events
that cause various processes to be activated.
The interrelationship between the process and control models is shown schematically in Figure
2.12.
The process model is "connected" to the control model through data conditions.
The control model is "connected" to the process model through process activation information
contained in the CSPEC.
A data condition occurs whenever data input to a process result in control output.
This situation is illustrated in Figure 2.12, part of a flow model for an automated monitoring and
control system for pressure vessels in an oil refinery.
The process check and convert pressure implements the algorithm described in the PSPEC pseudo
code shown.
When the absolute tank pressure is greater than an allow able maximum, an above pressure
event is generated.
Note that when Hatley and Pirbhai notation is used, the data flow is shown as part of a DFD, while
the control flow is noted separately as part of a control flow diagram.
As we noted earlier, the vertical solid bar into which the above pressure event flows is a pointer
to the CSPEC.
Therefore, to determine what happens when this event occurs, we must check the CSPEC.
The control specification (CSPEC) contains a number of important modeling tools.
A process activation table is used to indicate which processes are activated by a given event.
For example, a process activation table (PAT)for Figure 2.12might indicate that the above
pressure event would cause a process reduce tank pressure (not shown) to be invoked.
17
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
The STD is a behavioral model that relies on the definition of a set of system states and is described
as following section.
Figure 2.24 Level 2 DFD that refines the monitor sensors process
• List all sensors that are "read" by the software.
• List all interrupt conditions.
• List all "switches" that are actuated by an operator.
• List all data conditions.
• Recalling the noun/verb parse that was applied to the processing narrative,review all "control
items" as possible CSPEC inputs/outputs.
• Describe the behaviour of a system by identifying its states; identify how each
state is reached; and define the transitions between states.
• Focus on possible omissions—a very common error in specifying control;
Forexample, ask: "Is there any other way I can get to this state or exit from it?"
A level 1 CFD for SafeHomesoftware is illustrated.
Among the events and control items noted are sensor event ,blink flag and start/stop switch.
When the event flows into the CSPEC window from the outside world, it implies that the CSPEC
will activate one or more of the processes shown in the CFD.
When a control item emanates from a process and flows into the CSPEC window, control and
activation of some other process or an outside entity is implied.
2.4.4 The Control Specification
The control specification (CSPEC) represents the behaviour of the system in two different ways.
The CSPEC contains a state transition diagram that is a sequential specification of behaviour. It
can also contain a program activation table—a combinatorial specification of behaviour.
The labelled transition arrows indicate how the system responds to events as it traverses the four
states defined at this level
For example, in the figure STD indicates that the only transition from the reading user input state
occurs when the start/stop switch is encountered and a transition to the monitoring system status
state occurs.
This is an error in specification and would, we hope, be uncovered during review and corrected.
25
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
26
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
28
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Connections are directed and between a place and a transition, or a transition and a place(e.g.
Between “p1 and t1” or “t1 and p2” above)Tokens(.) are the dynamic objects.Another (equivalent)
notation is to use a solid bar for the transitions:
We may use either notation since they are equivalent, sometimes one makes the diagram easier to
read than the other.
The state of a Petri net is determined by the distribution of tokens over the places (we could
represent the above state as (1,2,1,1) for (p1,p2,p3,p4))
29
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
Transition t1 has three input places (p1, p2 and p3) and two output places (p3 and p4).
Place p3 is both an input and an output place of t1.
Enabling Condition:
Transitions are the active components and places and tokens are passive components.
A transition is enabled if each of the input places contains tokens.
Firing is atomic (only one transition fires at a time, even if more than one is enabled)
Name Description
Name The primary name of the data or control item, the data store or
an external entity.
Alias other names used for the first entry
Where-used/how- a listing of the processes that use the data or control item and
used how itis used (e.g., input to the process, output from the process
process, as a store, as an external entity.
30
2020-2021 Jeppiaar Institute of Technology
CS8484-SOFTWARE ENGINEERING Department of CSE
When a dictionary entry is created, the CASE tool scans DFDs and CFDs to determine which
processes use the data or control information and how it is used.
For large projects, it is often quite difficult to determine the impact of a change.
Many a software engineer has asked, "Where is this data object used? What else will have to
change if we modify it? What will the overall impact of the change be?" Because the data
dictionary can be treated as a database, the analyst can ask "where used/how used" questions, and
get answers to these queries.
The notation used to develop a content description is noted in the following table:
The notation enables a software engineer to represent composite data in one of the three
fundamental ways that it can be constructed:
1. As a sequence of data items.
2. As a selection from among a set of data items.
3. As a repeated grouping of data items. Each data item entry that is representedas part of a
sequence, selection, or repetition may itself be another compositedata item that needs further
refinement within the dictionary.
The use of the data dictionary:
The data dictionary provides us with a precise definition of telephone number for the DFD in
question.
It indicates where and how this data item is used and any supplementary information that is
relevant to it.
Advantages:
1. Data dictionary support name management and avoid duplication.
2. It is a store of organisational knowledge linking analysis,design and implementation.
Important questions:
Difference between Functional and Non-functional Requirements
Functional Requirements Non-functional Requirements
The functional requirements specify the The non-functional requirements specify the
features of the software system properties of the software system.
Functional Requirements describe what the Non-functional Requirements describe how
product must do. he product should perform
The functional requirements specify the The non-functional requirements specify the
actions with which the work is concerned. experience of the user while using the
system.
Example: For a library management system Example: For a library management system,
allowing user to read the article online is a for a user who wishes to read the article
functional requirement. online must be authenticated first.
Difference between Functional and Behavioural models:
Functional model Behavioural model
The functional model depicts all the The behavioral model represents how system
essential functionalities of the system behaves
The DFDS can be represented by levels The state diagram has some number of states
and transitions
The functional diagram gives detailed The behavioral model gives the abstract
scenario of system which has to be representation of the system.
developed.
Difference between Data flow diagram and state transition diagram
Data flow diagram State Transition Diagram
Data flow diagram is graphical representation for State transition diagram is a graphical
representing the information flow and the transforms representation for representing the
that are applied as data move from input to output behavior of a system by depicting its states
and the events that cause the system, to
change state
The data flow diagram is a collection of The State transition diagram is a collection
process data store, flow of data of states and events.
The data flow diagrams are used to represent the The state transition diagrams are typically
system at any level of abstractions and the increasing drawn at single level .They intended to
levels are used to expose more and more expose the overall behavior of the system.
functionalities in the system.
2020 - 2021 1 Jeppiaar Institute of Technology
CS8484-Software Engineering Department of CSE