Software Requirements and Specifications
Software Requirements and Specifications
◦ To study current techniques, notations, methods, processes and tools used in SRS.
Course Evaluation
◦ Assignments
◦ Discussion/Presentation
◦ Quizzes
Course Textbooks
Topics to be covered
Introduction
What is a Requirement?
Requirement Challenges
Challenges
◦ Cannot be automated
◦ Capability of the future system not clear, hence needs not clear
Requirement Task
Input
Output
Requirement Examples
◦ The system shall allow users to search for an item by title, author, or by International
Standard Book Number
◦ It is the process, which is used to determine the requirements for a software product
systematically.
◦ The development and use of technology effective to elicit, specify and analyse
requirements from stakeholders (clients/users) that shall be performed by a software
system
Importance of RE
◦ “56% of the errors in a software can be traced back to the requirements phase”
◦ The hardest part of building a software system is deciding precisely what to build.
◦ No other part of the conceptual work is as difficult as establishing the detailed technical
requirements, including all of the interfaces to people, to machines, and to other
software systems.
◦ No other part of the work so cripples the resulting system if done wrong.
Fred Brooks
◦ Software complexities
◦ Causes of failure
2. Valid
3. Unambiguous
4. Verifiable
5. Modifiable
6. Consistent
7. Complete and
8. Traceable
1- Requirement Feasibility
Example:
2- Requirement Validity
Requirement should be valid if and only if the requirement is one that system shall
meet.
Validity can be done by reviewing with key stakeholders who decide the success or
failure of project
Example
◦ Car rental prices shall show all applicable taxes (including 6% state tax).
References
3- Unambiguous Requirements
◦ Natural language
Example:
◦ Ambiguous statement:
◦ Unambiguous statement:
◦ The data complex shall be capable of withstanding a severe fire. It shall also be capable
of withstanding a flood
4- Verifiable requirements
Example:
◦ The car shall come to a full stop from 60 miles per hour within 5 seconds.
5- Requirements Modifiability
References
◦ IBM press
6- Consistent Requirements
Example:
7- Complete Requirements
◦ Its because user can add new requirements at the end of the requirement engineering
phase.
8- Traceable requirements
◦ Why tractability:
References
◦ IBM press
1- Functional Requirements
Example
◦ The user shall be able to search either the entire database of patients or select a subset
from it (admitted patients, or patients with asthma, etc.)
3- Domain Requirements
◦ Requirements that come from the application domain and reflect fundamental
characteristics of that application domain
◦ Example
◦ Most banks do not allow over-draw on most accounts, however, most banks allow some
accounts to be over-drawn
4- Inverse Requirements
Example
◦ The system shall not use red color in the user interface, whenever it is asking for inputs
from the end-user
◦ They are development guidelines within which the designer must work
Example
◦ The system shall be developed using the Microsoft Dot Net platform
◦ The system shall be developed using open source tools and shall run on Linux operating
system
References
What is process?
Why process?
Example
Software Processes
◦ Examples
◦ Design process
References
What is RE process?
depends on:
◦ application domain
◦ Requirements elicitation
◦ Requirements analysis
◦ Requirements validation
◦ Requirements management.
References
• Requirements Elicitation
Requirements Elicitation
• RE is a complex process
• Procedures to obtain user requirements, implement in the system to fulfill user’s requirements.
• Factor ( Business procedures, resources available, project type, individual preference etc )
• Type of Application
• 1) Traditional Technique
• 2) Contextual Techniques
• 3) Collaborative/Group Techniques
4) Cognitive Techniques
Interviews
Basic concepts
General characteristics
◦ predefined questions ,
◦ quantitative data,
◦ No generation of new idea,
Pros:
• No biasing ,Few additional questions may be added to further add clarification, Interview can be
repeated
Cons:
Semi-structured Interviews:
Pros:
• Consistency,
Cons:
Pros:
• Due to informal approach interviewer may feel ease to properly answer questions.
Cons:
Summary: Interviews
• Advantages: Good for complex topic, Rich in information, Ambiguities are clarified. Interviewer
can analyze emotions .Non-responsiveness remains low. Provides overview of the whole
system.
• Disadvantages: Small number of people involved, Information cannot be gathered from large
population, Quality of data gathered depends on the skills of interviewer,
Document Analysis
• An expert needs to study domain information thoroughly for the purpose of adapting when
existing system needs to be replaced or enhanced.
Pros:
• · Helps business analyst to get proper understanding of the organization before meeting the
stakeholders there.
• · Inexpensive technique.
Cons:
• · Sometimes valid information may not be available i.e. documents may be outdated.
Questionnaires/Surveys
• No face to face
• collect requirements from a larger group of population distributed over a large geographical
area and from different time zones
• Questionnaires must be clear, well-defined and precise besides including the domain knowledge
Pros:
• · No biasing occurs.
• · It is economical.
Cons:
• · Cannot get further clarification regarding the problem what analyst actually wants from the
user.
• · To get further information other techniques like interviews can be used as follow ups.
Introspection
• Analysts work for what they imagine and observe by themselves how a system design should be.
• This technique is effective with users who have a lot of experience of their own fields but have
less knowledge about the other fields as well as the new system.
Pros:
• · Easy to implement.
Cons:
• · It is hard for analysts to imagine the environment in which the new system works.
• · It doesn’t allow discussion with stakeholders and other experts. Therefore, it is not encouraged
if not used in combination with other techniques.
Contextual Techniques
Observation/Social Analysis:
• The requirements engineer observes the user’s environment without interfering in their work.
• Passive observation
• Active observation
Observation
Pros:
• Authentic and reliable because analysts by himself goes to observe the environment.
• Can be useful to confirm and validate requirements collected through other methods.
• It is inexpensive method.
• Gives idea about how users will interact with the system.
• Helpful in work measurements i.e. how long particular task takes to be done
Cons:
• All the requirements cannot be checked in just a single session; multiple sessions may be
required.
• Users can behave indifferently while they are interrupted for asking questions in active
observation.
• In passive observation, it is difficult for analyst to make out why some decisions are made.
• It is time consuming
Ethnography
• Used in combination with other elicitation techniques like interviews and questionnaires
Pros:
• Helps understand how people work in an organization and how they interact with each other.
Cons:
• There is no detailed guide on how to perform ethnographic technique effectively and therefore,
it all depends on the skills of the person performing it, the ethnographer.
• New and unique features added to the system might not be discovered.
Collaborative/Group Techniques
• Group elicitation techniques involve teams or groups of stakeholders who applying their
individual expertise on a particular issue agree upon a set of decisions
• Prototyping :
• An iterative process
Pros:
Cons:
• The disadvantage is that when users get used to particular kind of system they often resist
changes.
Pros:
• Visual aids and case tools used make the session interactive.
Cons:
• It is an expensive technique.
Brainstorming
• It is an informal discussion where free expression of ideas is given to every participant for a new
kind of system to be developed
Pros:
• Participants need not to be high qualified and each participant takes part actively in the process.
Cons:
• Can lead to repetition of ideas if participants are not paying proper attention.
• Some people due to extrovert nature may take over all the session and all the time sharing their
ideas and other people who are less outgoing will be afraid to take the time sharing their views.
Group Work
• In this technique, stakeholders are invited to attend a meeting to elicit requirements for projects
Pros:
Cons:
• It takes lot of effort to bring all the stakeholders on the same table at the same time because of
their busy schedule and political aspects
• Participants may have issues related to trust and may feel hesitate to discuss critical or sensitive
matters.
• Members may get influenced by dominant people in the meeting leading to biased results.
User Scenarios
• Scenarios are representation of user’s interaction with the system. It is a real world example of
how a system is used.
Pros:
• Well-developed scenario helps organizations to be proactive and work specifically for the
desired product.
• Gives good clarifications regarding an activity or event its normal flow, exceptional behavior,
alternative paths.
Cons:
• It is not suitable for all types of projects even if they capture more requirements.
• They do not cover all the processes i.e. not the complete view of future system.
Cognitive Techniques
• Laddering
Pros:
Cons:
• Maintaining requirements is a difficult task while adding or deleting any user requirement
anywhere in a hierarchy.
Card Sorting
• It is a knowledge elicitation technique in which stakeholders are asked to sort cards according to
domain entity names using index cards or some software packages.
Pros:
• It is accessible through internet so the participants that are geographically remote can take part
in it.
• It is an established technique.
Modeling
Why Modeling?
Visualization.
Requirements modeling
A requirements model is a set of these diagrams, each of which focuses on a different aspect of
the users' needs.
A requirements model provides greatest benefit if you use it to focus discussions with the users
or their representatives.
Usecase diagram
Use case diagram can identify the different types of users of a system and the different use
cases
One of the challenges faced by requirements analysts is the need to communicate the complex
behavior of systems in an understandable yet rigorous and verifiable way.
State machine captures information about states an object can go through during its lifecycle.
Summary
Modeling.
Benefits of Modeling.
Requirements Modeling.
Actor: Anyone or anything that needs to interact with the system to exchange information.
Includes
◦ You have a piece of behavior that is similar across many use cases
◦ Break this out as a separate use-case and let the other ones “include” it.
Extends
◦ Put the normal behavior in one use-case and the exceptional behavior somewhere else.
Summary
Searches flights/seats.
Actors
Passenger
Admin
?
Use cases
ViewNewsFlash
PrintSchedule
SearchSeat
AddFlight
ReserveSeat
EditReservation
CancelReservation
Use cases
SendEmail
EditFlight
CancelFlight
AddUser
EditUser
DeleteUser
Diagram 1:
Diagram 2:
Diagram 3:
Diagram 5:
Diagram 8:
Diagram 9:
Diagram 11:
Diagram 13:
Diagram 15:
Diagram 18:
Diagram 19:
Diagram 21:
Use cases should be named with a verb phrase specifying the goal of the actor (e.g. PlaceOrder)
State machines
Muhammad Summair Raza
Statemachine modeling
Many information systems deal with business objects that involve a series of possible states.
Describing a set of complex state changes in natural language creates a high probability of
overlooking a permitted state change or including a disallowed change.
State machines provide a concise, complete, and unambiguous representation of the states of
an object or system.
States - A state is denoted by a round-cornered rectangle with the name of the state written
inside it.
Transition - Transition from one state to the next is denoted by lines with arrowheads.
◦ A signal.
◦ An event.
Statemachine modeling
It allows an activity to be described at a high level, and then expanded at lower level by adding
details.
Car
◦ Ignition
◦ Transmission
◦ Accelerator
◦ Brakes
◦ Ignition: ON
◦ Transmission: Neutral
◦ Accelerator: On
◦ Ignition: ON
◦ Transmission: Reverse
◦ Accelerator: off
◦ Brakes: On
State machines
Statemachine modeling
Many information systems deal with business objects that involve a series of possible states.
State machines provide a concise, complete, and unambiguous representation of the states of
an object or system.
States - A state is denoted by a round-cornered rectangle with the name of the state written
inside it.
• Initial and Final States - The initial state is denoted by a filled black circle and may be labeled
with a name. The final state is denoted by a circle with a dot inside and may also be labeled with
a name.
◦ A signal.
◦ An event.
State machine
Goal Oriented RE
Traditional RE:
Goals:
◦ Sub-goals
Why GORE?
Requirements Elicitation
Requirements completeness
Requirements traceability
Requirements negotiation
Summary
Limitations of traditional RE
Why GORE?
NFR framework
This construct allows representing goals concerning NFRs of the system as well as ill-defined and
high-level objectives of the stakeholders.
Framework Activities
Decomposing NFRs
1. The main modeling tool that the framework provides is the soft goal interdependency graph
(SIG).
2. The graphs can graphically represent soft goals, soft goal refinements (AND/OR), soft goal
contributions (positive/negative), soft goal operationalization and claims.
2. Operationalizing soft goals model lower-level (design) techniques for satisficing NFR soft goals
3. Claim soft goals allow the analyst to record design rationale for soft goal refinements, soft goal
prioritizations, soft goal contributions, etc.
Soft goals
Soft goals can be refined using AND or OR refinements with obvious semantics.
Also, soft goal interdependencies can be captured with positive (“+”) or negative (“–“)
contributions.
NFR framework
Framework activities
KAOS Ontology
• Objects are things of interest in the composite system whose instances may evolve from state to
state. Objects can be entities, relationships, or events.
• Operations are input-output relations over objects. Operation applications define state
transitions.
• An Agent is a kind of object that acts as a processor for operations. Agents are active
components that can be humans, devices, software, etc.
• A Goal in KAOS is prescriptive statement of intent about some system whose satisfaction in
general requires the cooperation of some of the agents forming that system.
o In KAOS, goals are organized in the usual AND/OR refinement abstraction hierarchies.
o Goal refinement ends when every sub goal is realizable by some individual agent
assigned to it. That means the goal must be expressible in terms of conditions that are
monitor able and controllable by the agent.
KAOS Models
2. Object model which is a UML model that can be derived from formal specifications of goals since
they refer to objects or their properties
Good Practices
Problem Statement: You’ve just been hired by an elevator design company to improve performance and
quality of software development within the company. You’ve directly pointed out a major weakness in
the way software is developed there is currently no formal requirements engineering method in use. As
a first challenge, you are asked to build a KAOS model for a new elevator system to be designed.
A Note on Terminology
Look at the previous figure and notice the way goals have been named: a word followed by verb
in its passive form. For instance, we have written “Service requested” instead of “Request
service” or “The passenger must request the service”.
The reason is to avoid confusion between goals and operations (agent behaviors). Goals
basically refer to system states we want to achieve or maintain, cease or avoid. They do not
refer to system state transitions.
Completeness criterion 1: A goal model is said to be complete with respect to the refinement
relationship ‘if and only if’ every leaf goal is either an expectation, a domain property or a
requirement.
Terminologies
Completeness criteria
Used to define and document concepts of the application domain that are relevant with respect
to the known requirements and provide static constraints on operational system.
Types of Objects
Entities:
◦ ‘Independent’ means that their descriptions needn’t refer to other objects of the model.
Agents:
◦ Operations usually imply state transitions on entities (for instance, the “Ring Alarm”
operation implies the following state transition on the entity “Alarm”: status attribute
changed from “Silent” to “Ringing”).
Associations:
Types of objects
Example
The KAOS operation model describes all the behaviors that agents need to fulfill their
requirements.
Operations work on objects (defined in the object model): they can create objects, trigger object
state transitions and activate other operations (by sending an event).
Concerned objects are connected to the operations by means of Input and Output links.
Events are represented as those traffic signs that are used to indicate directions.
Completeness criteria
◦ All operations are to be justified by the existence of some requirements (through the
use of operationalization links).
Example
A responsibility diagram describes for each agent, the requirements and expectations that he’s
responsible for, or that have been assigned to him.
To build a responsibility diagram, the analyst reviews the different requirements and
expectations in the goal model and assigns an agent to each of them.
After all requirements and expectations are assigned a responsible agent, a diagram is
generated for each agent, listing all requirements and expectations that he’s been assigned.
Requirements get changed during the course of development. It is almost impossible to stop the
requirements from changing. Different software development approaches tackle changing
requirement in different ways. Unlike Waterfall or document driven approaches of software
development, agile methodologies welcome change during the course of software development
but at the same time manage the changes in a systematic manner.
Agenda
Overview
Agile Manifesto
Tools
Overview
Importance/Significance
Inconsistent requirements
Agile Manifesto
Agile focus and prefer more on individuals capabilities and expertise and their interaction rather
than tools, techniques and processes.
Agile highly contemplate to have a very close relationship with customer in terms of continuous
and constant conversation rather than contract negotiation.
Agile assures to adopt and respond frequently over change request rather than following a plan.
Extreme Programming is the most famous agile technique. XP use story cards for elicitation. A
user story is the description that provides business value to the customer
Small Releases
Metaphor
Simple Design
Tests
Refactoring
Pair Programming
Collective Ownership
Continuous Integration
40-hour Week
On-site customer
Coding Standard
Scrum is another popular agile technique used to develop and manage software. The following
figure explains the activities performed in Scrum.
Strengths:
Weaknesses
Strengths:
• Short development cycle, Higher customer satisfaction, Low bug rates, Quick
adaptation to rapidly changing requirements
• Highest Priority Work ,Constant Feedback, Control over Cost and Schedule
Weaknesses
The agile change management process handles changes in the beginning of each iteration of the
development cycle. It may be a sprint in Scrum or iteration in XP and so on. The key
stakeholders in change management process are the managers, developing team and off course
customers or product owner.
This aspect of Agile shows a different picture from that of traditional development where
requirements are collected once and changes made in that requirement set are rare. Here agile
is welcoming the change even after every iteration. Therefore agile is gaining wide acceptance in
today’s development where we also have high speed development environments.
Start: In the start of each iteration, the team takes the highest priority requirement that can be
completed in the specified iteration period. This requirement which is now going to be
implemented is well understood with the help of customer and other related stakeholders and
documents etc. Necessary planning, documentation or modeling can also be done at this stage
so as to achieve the goal within the specified time and budget.
Middle: During development they may take help from customer as well as from other relevant
stakeholders to have better understanding of the requirement. The aim is to build the software
that best meets the requirement.
End: The working product developed can be deployed and it is preferable to deploy so as to take
the feedback from the end-users. The acceptance can also be run on the developed software so
that the necessary quality can also be ensured.
Internal tools
GenSpec (Hydro-Quebec)…
OSRMT: http://sourceforge.net/projects/osrmt
Bugzilla…
TWiki…
Both Agile and Document driven (companies following traditional approaches) companies face
similar issues with respect to requirements management but they use to handle it in different
ways. Some of the differences between these two approaches that have been identified as a
result of a study are explained below:
Embracing requirement changes in Agile does not mean that requirement could be changed at
any stage of the software development process. What it really means is that unlike traditional
approaches like waterfall model where you do not have the privilege to request requirement
changes after the start of development cycle, here in agile the customer or the product owner
have an opportunity to add, modify or remove any requirement from the requirement stack.
In fact Agile has laid down a process in every technique to accept change in an organized way for
next iteration instead of forcing to implement the new requirement in the current release.
XP and Open UP allows accepting change to a certain extent during the development iteration
but recommends suggesting the requirement for next iteration.
Requirements Prioritization
factors like market uncertainty, technical uncertainty, project duration and project budget that
demands that the requirements should be analyzed and re-prioritized
Many studies have been carried out to propose good and scientific methods of prioritization
One of the techniques for requirement prioritization was named as “Value Oriented
Prioritization”. This technique suggests that the company or the stakeholders should identify the
business value areas like Sales, Marketing, Strategic, Customer Retention etc. Then a positive
numeric value should be associated with each of these business value areas.
Along with identifying the business value areas, the associated risks should also be identified
and a certain negative value should also be assigned to each risk as shown in fig.
Then all the requirements are listed and given a numeric value against business value areas as
well as to the risk associated with that business value. In this way the weight of each
requirement can be calculated against each business value area and similarly the weight of risks
can also be identified. The final weight of a requirement can be calculated by subtracting the
sum of weights of the risks from the sum of weights of business values against each
requirement.
Example
Usability
Usability Evaluation
The process of systematically collecting data that informs us about what it is like for a particular
or group of users to use a product for a particular task in a certain type of environment.
Why: to check those users can use the product and that they like it.
What: Conceptual model, early prototypes of a new system and later, more complete
prototypes.
When: throughout design; finished products can be evaluated to collect information to inform
new products.
Usability
Usability has been defined by the International Standards Organization (ISO) as “the extent to which the
product can be used by specified users to achieve specified goals with
effectiveness
efficiency
satisfaction
Usability Evaluation
Testing
Inquiry
Introduction
What is traceability?
◦ “The degree to which a relationship can be established between two or more products
of the development process, especially products having a predecessor-successor or
master-subordinate relationship to one another.” [IEEE-610]
Requirements Traceability:
◦ The requirements traceability is the ability to describe and follow the life of a
requirement, in both a forward and backward direction.
◦ Maintenance and
◦ Matrix
Traceability matrix
A traceability matrix is a document that co-relates any two-baseline documents that require a
many-to-many relationship to check the completeness of the relationship.
It is used to track the requirements and to check the current project requirements are met.
Forward traceability
It shows the overall defects or execution status with a focus on business requirements
CASE Tools
Characteristics
◦ Hypertext linking
◦ Unique identifiers
Problems
Caliber-RM
Caliber-RM
◦ Centralized repository
◦ Impact analysis
DOORS
◦ Tele logic
References
James D. Palmer
Verification:
Validation:
Process in which we check expectations of the users who will be using it.
Defects
No, it is almost impossible to develop software without having any defect. Software and defects
go side-by-side during software development. It is impossible to build a product in first instance
without presence of any defects and these two cannot be separated.
In this type of testing, a component or system is treated as a black box and it is tested for the
required behavior. This type of testing is not concerned with how the inputs are transformed
into outputs. As the system’s internal implementation details are not visible to the tester. He
gives inputs using an interface that the system provides and tests the output. If the outputs
match with the expected results, system is fine otherwise a defect is found.
As opposed to black box testing, in structural or white box testing we look inside the system and
evaluate what it consists of and how is it implemented. The inner of a system consists of design,
structure of code and its documentation etc. Therefore, in white box testing we analyze these
internal structures of the program and devise test cases that can test these structures.
I will run the scenario as described in the bug report and try to reproduce the defect.
If the defect is reproduced in the development environment, I will identify the root cause, fix it
and send the patch to the testing team along with a bug resolution report.
E = Number of Edges
N = Number of Nodes
V(G) = E - N + 2
Introduction
Requirements includes:
Requirement document
◦ System customers
◦ Managers
◦ System engineers
US Department of Defense
NASA
Correct
Unambiguous
Complete
Consistent
Verifiable
Modifiable
Traceable
Introduction
General description
Specific requirements
Appendices
Index
Introduction:
General description
First two sections are introductory chapters about background and describe the system
in general terms
The third section is the main part of the documents and the standard recognizes that
this section varies considerably depending on the type of the system
References