Functional and Non Functional Specification Notes
Functional and Non Functional Specification Notes
Functional and Non Functional Specification Notes
Software Requirements
Topics covered
Functional and non-functional requirements
User requirements
System requirements
The software requirements document
Requirements engineering
The process of establishing the services that the customer
requires from a system and the constraints under which it
operates and is developed.
The requirements themselves are the descriptions of the
system services and constraints that are generated during the
requirements engineering process.
What is a requirement?
It may range from a high-level abstract statement of a service
or of a system constraint to a detailed mathematical functional
specification.
This is inevitable as requirements may serve a dual function
◦ May be the basis for a bid for a contract - therefore must be open
to interpretation;
◦ May be the basis for the contract itself - therefore must be defined
in detail;
◦ Both these statements may be called requirements.
Requirements abstraction (Davis)
“If a comp any w ishes to le t a cont ract for a la rge software deve lopmen t project, it
must define its need s in a suffi cien tly ab stract way that a solution is no t pre-defined.
The requi remen ts must be written so that several cont ractors can b id for the con tract,
offering, pe rhap s, different ways of me eting the c lien t organi sation ’s need s. Once a
contract has been a warded, the cont ractor must write a system definition for the client
in more detail so that the c lient und erstand s and c an val idate what the software will
do. Both o f these docu ment s may be ca lled the requirements document for the
system. ”
Types of requirement
User requirements
Statements in natural language plus diagrams of the services the
system provides and its operational constraints. Written for
customers.
System requirements
A structured document setting out detailed descriptions of the
system’s functions, services and operational constraints. Defines what
should be implemented so may be part of a contract between client
and contractor.
Definitions and specifications
User requir emen t definition
Non-functi onal
requir ement s
Product requirement
The user interface for LIBSYS shall be implemented as simple HTML
without frames or Java applets.
Organisational requirement
The system development process and deliverable documents shall conform
to the process and deliverables defined in XYZCo-SP-STAN-95.
External requirement
The system shall not disclose any personal information about customers
apart from their name and reference number to the operators of the
system.
Goals and requirements
Non-functional requirements may be very difficult to state precisely
and imprecise requirements may be difficult to verify.
Goal
A general intention of the user such as ease of use.
Verifiable non-functional requirement
A statement using some measure that can be objectively tested.
Goals are helpful to developers as they convey the intentions of the
system users.
Examples
A system goal
The system should be easy to use by experienced controllers and should be
organised in such a way that user errors are minimised.
A verifiable non-functional requirement
Experienced controllers shall be able to use all the system functions after a
total of two hours training. After this training, the average number of errors
made by experienced users shall not exceed two per day.
Requirements measures
Property Measure
Speed Processed transactions/second
User/Event response time
Screen refresh time
Size M Bytes
Numb er of ROM chips
Ease of use Training time
Numb er of help frames
Reliability Mean time to failure
Probability of unavailability
Rate of failure occurrence
Availability
Robustness Time to restart after failure
Percentage of events causing failure
Probability of data corruption on failure
Portability Percentage of target dependent statements
Numb er of target systems
Requirements interaction
Conflicts between different non-functional requirements are
common in complex systems.
Spacecraft system
◦ To minimise weight, the number of separate chips in the system
should be minimised.
◦ To minimise power consumption, lower power chips should be
used.
◦ However, using low power chips may mean that more chips have to
be used. Which is the most critical requirement?
Domain requirements
Derived from the application domain and describe system
characteristics and features that reflect the domain.
Domain requirements be new functional requirements,
constraints on existing requirements or define specific
computations.
If domain requirements are not satisfied, the system may be
unworkable.
Library system domain requirements
There shall be a standard user interface to all databases which
shall be based on the Z39.50 standard.
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 manually forwarding to the user or
routed to a network printer.
Domain requirements problems
Understandability
Requirements are expressed in the language of the application
domain;
This is often not understood by software engineers developing the
system.
Implicitness
Domain specialists understand the area so well that they do not
think of making the domain requirements explicit.
User requirements
Should describe functional and non-functional requirements in
such a way that they are understandable by system users who
don’t have detailed technical knowledge.
User requirements are defined using natural language, tables
and diagrams as these can be understood by all users.
Problems with natural language
Lack of clarity
Precision is difficult without making the document difficult to read.
Requirements confusion
Functional and non-functional requirements tend to be mixed-up.
Requirements amalgamation
Several different requirements may be expressed together.
LIBSYS requirement
LIBSYS shall provide a financial accounting system that
maintains records of all payments made by users of the
system. System managers may configure this system so that
regular users may receive discounted rates.
Editor grid requirement
Grid facilities
To assist in the positioning of entities on a diagram, the user may turn
on a grid in either centimetres or inches, via an
option on the control panel. Initially, the grid is off. The grid may be
turned on and off at any time during an editing session and can be
toggled between inches and centimetres at any time. A grid option
will be provided on the reduce-to-fit view but the number of grid lines
shown will be reduced to avoid filling the smaller diagram
with grid lines.
Requirement problems
Database requirements includes both conceptual and detailed
information
Describes the concept of a financial accounting system that is to be included in
LIBSYS;
However, it also includes the detail that managers can configure this system -
this is unnecessary at this level.
Grid requirement mixes three different kinds of requirement
Conceptual functional requirement (the need for a grid);
Non-functional requirement (grid units);
Non-functional UI requirement (grid switching).
Structured presentation
Notation Description
Structured natural This approach depends on defi ning standard forms or templates to exp ress the
language requirements specifi cation.
Design This approach uses a la nguage li ke a programmi ng langu age but with more abstract
description features to specif y the requir ements by defining an op erationa l m odel of the system.
language s This approach is not now widely used although it can be us eful for interface
specification s.
Graphical A graph ic al languag e, supp lemented by text anno tations is used to defi ne the
notations func tiona l requir ements for the system. An early exa mple of such a graphical
language was SADT. Now, use-case descriptions and sequence d iagrams are
comm only u sed .
Mathematical These are no tations based on mathematical concep ts such as finite-state machines or
specification s sets. These una mbiguous specifications reduce the argu ments between customer and
contractor about system func tiona lit y. Howeve r, most cus tomers don’t unde rstand
formal specifications and a re reluctant to accept it as a system contract.
Structured language specifications
The freedom of the requirements writer is limited by a
predefined template for requirements.
All requirements are written in a standard way.
The terminology used in the description may be limited.
The advantage is that the most of the expressiveness of
natural language is maintained but a degree of uniformity is
imposed on the specification.
Form-based specifications
Definition of the function or entity.
Description of inputs and where they come from.
Description of outputs and where they go to.
Indication of other entities required.
Pre and post conditions (if appropriate).
The side effects (if any) of the function.
Form-based node specification
Condition Action
Sugar le vel falling (r2 < r1) CompDose = 0
Sugar le vel stable (r2 = r1) CompDose = 0
Sugar le vel increasing and rate of CompDose = 0
increase decreasing ((r2-r1)<(r1-r0))
Sugar le vel increasing and rate of CompDose = round ((r2-r1)/4)
increase stable or increasing. ((r2-r1) • If rounded result = 0 then
(r1-r0)) CompDose = MinimumD ose
Graphical models
Graphical models are most useful when you need to show
how state changes or where you need to describe a sequence
of actions.
Different graphical models are explained under System Models.
The requirements document
The requirements document is the official statement of what is
required of the system developers.
Should include both a definition of user requirements and a
specification of the system requirements.
It is NOT a design document. As far as possible, it should set of
WHAT the system should do rather than HOW it should do it
Users of a requirements document
IEEE requirements standard
Defines a generic structure for a requirements document that
must be instantiated for each specific system.
Introduction.
General description.
Specific requirements.
Appendices.
Index.
Requirements document structure
Preface
Introduction
Glossary
User requirements definition
System architecture
System requirements specification
System models
System evolution
Appendices
Index
Key points
Requirements set out what the system should do and define
constraints on its operation and implementation.
Functional requirements set out services the system should provide.
Non-functional requirements constrain the system being developed
or the development process.
User requirements are high-level statements of what the system
should do. User requirements should be written using natural
language, tables and diagrams.
Key points
System requirements are intended to communicate the
functions that the system should provide.
A software requirements document is an agreed statement
of the system requirements.
The IEEE standard is a useful starting point for defining
more detailed specific requirements standards.
Requirements Engineering Processes
Topics covered
Feasibility studies
Requirements elicitation and analysis
Requirements validation
Requirements management
Requirements engineering processes
The processes used for RE vary widely depending on the
application domain, the people involved and the organisation
developing the requirements.
However, there are a number of generic activities common to
all processes
Requirements elicitation;
Requirements analysis;
Requirements validation;
Requirements management.
The requirements engineering process
Requirements engineering
Requiremen t s
sp ecifi cat io n
Sy st em requiremen t s
sp ecifi cat io n an d
m odelin g
Sy st em
requi rem ent s Feasibilit y
User st udy
elicit at io n requi rem ent s
elicit at io n
Pro t ot y pi ng
Requiremen t s
elicit at io n Requiremen t s
Rev iews
v al idat i on
Sy s te m re qui re me nts
docum ent
Feasibility studies
A feasibility study decides whether or not the proposed
system is worthwhile.
A short focused study that checks
If the system contributes to organisational objectives;
If the system can be engineered using current technology and within
budget;
If the system can be integrated with other systems that are used.
Feasibility study implementation
Based on information assessment (what is required), information
collection and report writing.
Questions for people in the organisation
What if the system wasn’t implemented?
What are current process problems?
How will the proposed system help?
What will be the integration problems?
Is new technology needed? What skills?
What facilities must be supported by the proposed system?
Elicitation and analysis
Sometimes called requirements elicitation or requirements
discovery.
Involves technical staff working with customers to find out about
the application domain, the services that the system should provide
and the system’s operational constraints.
May involve end-users, managers, engineers involved in maintenance,
domain experts, trade unions, etc. These are called stakeholders.
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.
Organisational and political factors may influence the system
requirements.
The requirements change during the analysis process. New
stakeholders may emerge and the business environment change.
The requirements spiral
All VPs
Syst em
St udent s St aff Ex t ern al Cat aloguers
m an agers
Techniques
Interviews
Questionnaires
Observation
Document / Procedure Analysis
JAD
Prototyping
Exercise
Rate each of the following techniques based on these
criteria (high, medium or low):
Degree of participation with user
Information "richness" (depth)
Breadth of information (scope)
Cost (Analysts' Time)
Cost (Users’ Time)
Ability to integrate information
User involvement w/ system design
Interviews -- Five Basic Steps
Selecting Interviewees
Designing the Interview Guide
Preparing for the Interview
Conducting the Interview
Post-Interview Follow-up
Requirement Description
Type
Mutable Requirements that change because of changes to the environme nt in which the
requirements organisation is operating. For example, in hospital systems , the funding of patient
care ma y change and thus require different treatment information to be collected.
Emergent Requirements that emerge as the customer's understanding of the system develops
requirements during the system development. The design process may reveal new emergent
requirements.
Consequential Requirements that result from the introduction of the comp uter system. Introducing
requirements the computer system may change the organisations processes and open up new ways
of working which generate new system requirements
Compatibility Requirements that depend on the particular systems or b usiness processes within an
requirements organisation. As these change, the comp atibility requirements on the commissioned
or delivered system m ay also have to evolve.
Requirements management planning
During the requirements engineering process, you have to plan:
Requirements identification
How requirements are individually identified;
A change management process
The process followed when analysing a requirements change;
Traceability policies
The amount of information about requirements relationships that is maintained;
CASE tool support
The tool support required to help manage requirements change;
Requirements change management
Should apply to all proposed changes to the requirements.
Principal stages
Problem analysis. Discuss requirements problem and propose
change;
Change analysis and costing. Assess effects of change on other
requirements;
Change implementation. Modify requirements document and other
documents to reflect change.
Change management
Key points
The requirements engineering process includes a feasibility
study, requirements elicitation and analysis, requirements
specification and requirements management.
Requirements elicitation and analysis is iterative involving
domain understanding, requirements collection, classification,
structuring, prioritisation and validation.
Systems have multiple stakeholders with different
requirements.
Key points
Social and organisation factors influence system requirements.
Requirements validation is concerned with checks for validity,
consistency, completeness, realism and verifiability.
Business changes inevitably lead to changing requirements.
Requirements management includes planning and change
management.
System models
Topics covered
Data Flow Models (Data Flow Diagrams)
Data Dictionaries
Semantic Data Models (Entity-Relationship Diagrams)
Object Models
CASE workbenches
System modelling
System modelling helps the analyst to understand the functionality
of the system and models are used to communicate with customers.
Different models present the system from different perspectives
External perspective showing the system’s context or environment;
Behavioural perspective showing the behaviour of the system;
Structural perspective showing the system or data architecture.
What is a Data Flow Diagram?
Known as DFDs
A way to model a real world situation
They are the interface between the real world activities
and an understanding of how this can be converted into a
computer system.
Why do we use DFDs?
It is a way of taking the physical view and converting it
into a logical view.
The physical view - all documents involved
The logical view - the data they contain
Their main purpose is to communicate with the user,
the analyst’s understanding of the scope of the
required system
Levelling
Name
Process Number
Data Stores
Can be M for manual or D for Name of Store
M1
computer base data stores.
Outside Entity
Customer
a
Rule of Thumb
If there are more than 8 data flows break it
Constructing DFD’s
Sketch a document flow diagram of the current situation
Draw a system boundary around the agencies that are part of
the system
Draw a context diagram
Identify processes in the system
Complete the level 1 current physical DFD
The Document Flow Diagram
modelling a Delivery
business situation Production
Plan
Note
Purchase
can be daunting at
Order
something simple
such as a Stock
Withdrawal
document flow
Note Bill of
Materials
diagram. Design
Factory
The Context (Level 0) Diagram
are examining
Production Deliv ery
Plan Note
c
Bill of Materials Deliv ery Note
Design Maintain Material Requirements List Purchasing
Stock
received by a process
All data flows going out
of the system must be 2 St oc k c lerk
Prepare
m at erial reqm nt s
lis t
Draw the External Entities and Data Stores
1 Stock clerk
a
M1 Bill of materials
Production Maintain
Planning planned call-of f
M2 Stock cards
b
Supplier
c 2 Stock clerk
Factory Maintain
stock cards
3 Stock clerk
d
Prepare
Purchasing
material reqmnts
list
Level 1 Physical DFD - Complete
Finally draw in the data flows to give a complete diagram. Note that a
data flow must have a process at the end
1 Stock clerk
a B O M details
Production
M1 Bill of materials
Production Maintain
Planning Plan
planned call-of f
Planned call-of f
details M2 Stock cards
b
Supplier
Deliv ery note Stock details
c 2 Stock clerk
Factory Maintain
Stock stock cards
withdrawal note
Stock details
Updated
supply details
Confirmation of
a
arrival
Client Appointm ent
details 2 Receptionist
Change of
hairstyle etc.
3 Hairdresser/Rcptnst
Conduct
appointment
Process 3 Level 2
3 Hair/Reception
Client
a Clie
a 3.1 Hairdresser
Appointment Details
Conduct Appointment
Hair Details M2 Diary
3.2 Hairdresser
Inform Reception
3.3 Receptionist
Complete Appointment M3 Client Card
Naming of DFD processes
Level 0 Level 1 Level 2 Level 3 Level 4
2 2.2 2.1.1
1
Process Elementary
Man 2.1 2.1.1 process
Sub Sub - Sub descriptions.
Process Process
Decision trees
Overall 2 Decision table
Process Process
Process 2.2 Structured
English
Sub 2.1.2
Process
3 Sub - Sub
Process
Process
Man 2.3
Sub
Process
There must be consistency between levels, with all the data appearing
on the higher level DFD. If a data store is used only for one process it
is placed with that process. Outside entities are always shown outside
the boundary of a lower level DFD process, even if they only
communicate with that one process
Data modelling vs Process modelling
Process modelling (i.e. DFD) shows data stores, how, where, n
when data r used or changed in an IS
Data modelling (i.e ER) shows d’definition, structure, n
relationship within d’data
Why data model is the most important
part of the statement of SW requirement?
Characteristics of data captured during data modelling are crucial in
the design of DB, program, computer screen, and reports
Data rather than processes are the most complex aspects of many
modern IS so require a central role in structuring system
requirement
The characteristics of data (length, format, relationship) are
reasonably permanent. The paths of data flow are quite dynamic
Structural information about data is essential for automatic
generation of programs
Conceptual Data Modeling and the E-R Diagram
Goal
Capture as much of the meaning of the data as possible
If you know the rules of normalization, referential integrity, foreign
keys, etc., this is good but not as important now. It is much more
important to get the organizational data model correct, i.e. to
understand the actual data requirements for the organization.
Result
A better design that is scalable and easier to maintain
Introduction to Entity-Relationship (E-R)
Modeling
Notation uses three main constructs
Data entities
Attributes
Relationships
Entity-Relationship (E-R) Diagram
A detailed, logical representation of the entities, associations and
data elements for an organization or business
Entity-Relationship (E-R) Modeling
Entity
A person, place, object, event or concept in the user environment
about which the organization wishes to maintain data
Represented by a rectangle in E-R diagrams
Entity Type
A collection of entities that share common properties or
characteristics
Attribute
A named property or characteristic of an entity that is of interest to
an organization
Entity-Relationship (E-R) Modeling
Candidate keys and identifiers
Each entity type must have an attribute or set of attributes that
distinguishes one instance from other instances of the same type
Candidate key
Attribute (or combination of attributes) that uniquely identifies each
instance of an entity type
Entity-Relationship (E-R) Modeling
Identifier
A candidate key that has been selected as the unique identifying
characteristic for an entity type
Selection rules for an identifier
1. Choose a candidate key that will not change its value
2. Choose a candidate key that will never be null
3. Avoid using intelligent keys
4. Consider substituting single value surrogate keys for large
composite keys
Notation Guide
ENTITY TYPE
RELATIONSHIP TYPE
IDENTIFYING
RELATIONSHIP TYPE
Notation Guide
ATTRIBUTE
MULTIVALUED ATTRIBUTE
DERIVED ATTRIBUTE
E1 R E2 TOTAL PARTICIPATION OF E2 IN R
Entity
sname
Store Locations
Relationship
manager
qty Keeps
Attributes
pname
Product price
descrip
Entity
EMPLOYEES
Age M-sal
B-days Y-sal
EMPLOYEE
Derived Vs. Stored Attributes
Order Total-Value
Some attribute values can
be derived from attributed
values of related entities
total-value ® sum (qty *
price) qty
Item price
Representing Attributes
Ternary
Part
Entity Roles
Departments
Each entity type that
participates in a relationship employer
type plays a particular role
in the relationship type
Role
Works_In
Names
The role name signifies the
role that a participating
worker
entity from the entity type
plays in each relationship
instance, i.e. it explains what Employees
the relationship means
Recursive Relationships
Same entity type can participate more than once in the same relationship
type under different “roles”
Employees
Supervision
Relationship Constraints
N Works_In 1
Employees Departments
1 Manages 1
N Works_In 1
Employees Departments
1 Manages 1
Library i t em
Bo ok Magazin e Fi lm Co mp ut er
pro gram
Aut ho r Year Direct o r
Edit io n Dat e of release Version
Issue
Pub licat io n da t e Dist ribut or Plat for m
ISBN
User class hierarchy
Library user
Name
Address
Ph on e
Reg ist rat io n #
Reg ist er ()
De-reg ist er ()
Reader Bo rrower
Affili at io n It ems on lo an
Max . lo ans
St aff St udent
Depar t m en t Majo r subject
Depar t m en t p ho ne Hom e ad dress
Multiple inheritance
Rather than inheriting the attributes and services from a single
parent class, a system which supports multiple inheritance allows
object classes to inherit from several super-classes.
This can lead to semantic conflicts where attributes/services with
the same name in different super-classes have different semantics.
Multiple inheritance makes class hierarchy reorganisation more
complex.
Multiple inheritance
Talki ng boo k
# Tapes
Object aggregation
An aggregation model shows how classes that are collections
are composed of other classes.
Aggregation models are similar to the part-of relationship in
semantic data models.
Object aggregation
CASE workbenches
A coherent set of tools that is designed to support related
software process activities such as analysis, design or testing.
Analysis and design workbenches support system modelling
during both requirements engineering and system design.
These workbenches may support a specific design method or
may provide support for a creating several different types of
system model.
An analysis and design workbench