What Is A Requirement?: Descriptions and Specifications of A System
What Is A Requirement?: Descriptions and Specifications of A System
Example Example
ECLIPSE/Workstation/Tools/DE/FS/3.5.1
1
System requirements readers Software specification readers
• System end-users • Client engineers (maybe)
• Client engineers • System architects
• System architects • Software developers
• Software developers
Functional requirements
• Statements of services the system
should provide, how the system
We will come back to user should react to particular inputs
and how the system should behave
and system requirements
in particular situations.
Examples of functional
Functional requirements
requirements
• Describe functionality or system services 1.
1. The
The user
user shall
shall be
be able
able to
to search
search either
either
• Depend on the type of software, all
all of
of the
the initial
initial set
set of
of databases
databases oror
expected users and the type of system select
select aa subset
subset from
from it.
it.
where the software is used 2.
2. The
The system
system shall
shall provide
provide appropriate
appropriate
• Functional user requirements may be viewers
viewers forfor the
the user
user to
to read
read documents
documents
high-level statements of what the in
in the
the document
document store.
store.
system should do but functional system 3.
3. Every
Every order
order shall
shall be
be allocated
allocated aa unique
unique
requirements should describe the system identifier
identifier (ORDER_ID)
(ORDER_ID) which which the
the user
user
services in detail shall
shall be
be able
able toto copy
copy to
to the
the account’s
account’s
permanent
permanent storage
storage area.
area.
2
Requirements completeness and
Requirements imprecision
consistency
• Problems arise when requirements are • In principle, requirements should be both
not precisely stated complete and consistent
• Ambiguous requirements may be • Complete
interpreted in different ways by – They should include descriptions of all
facilities required
developers and users
• Consistent
• Consider the term ‘appropriate viewers’ – There should be no conflicts or
– User intention - special purpose viewer for contradictions in the descriptions of the
each different document type system facilities
– Developer interpretation - Provide a text • In practice, it is difficult (?impossible?)
viewer that shows the contents of the to produce a complete and consistent
document requirements document
3
Non-functional requirement Non-functional requirements
types examples
Non-functional
Requirements • Product requirement
– 4.C.8 It shall be possible for all necessary
Product
Requirements
Organizational
Requirements
External
Requirements
communication between the APSE and the user to
be expressed in the standard Ada character set
Usability Delivery Interoperability • Organizational requirement
Requirements Requirements Requirements
– 9.3.2 The system development process and
Efficiency Implementation Ethical deliverable documents shall conform to the
process and deliverables defined in XYZCo-SP-
Requirements Requirements
Performance Space
Standards Legislative STAN-95
Requirements Requirements
Requirements Requirements
• External requirement
Reliability Privacy Safety – 7.6.5 The system shall not disclose any personal
Requirements Requirements Requirements
information about customers apart from their
Portability name and reference number to the operators of
Requirements
the system
4
Domain requirements Domain requirements
• Requirements that come from the • Derived from the application domain and
application domain of the system describe system characteristics and
and that reflect characteristics of features that reflect the domain
that domain • May be new functional requirements,
constraints on existing requirements or
define specific computations
• If domain requirements are not
satisfied, the system may be unworkable
User requirements
• Should describe functional and non-
functional requirements so that
Back to user and system they are understandable by system
requirements users who don’t have detailed
technical knowledge
• User requirements are defined using
natural language, tables and
diagrams
5
Database requirement Requirement problems
• Database requirements includes
both conceptual and detailed
……
…… information
4.A.5
4.A.5 The
Thedatabase
databaseshall
shallsupport
supportthethegeneration
generationand
andcontrol
controlof
of – Describes the concept of configuration
configuration
configurationobjects;
objects;that
thatis,
is,objects
objectswhich
whichare
arethemselves
themselvesgroupings
groupings control facilities
of
ofother
otherobjects
objectsin
inthe
thedatabase.
database.The
Theconfiguration
configurationcontrol
controlfacilities
facilities
shall
shallallow
allowaccess
accesstotothe
theobjects
objectsininaaversion
versiongroup
groupby
bythe
theuse
useofofanan – Includes the detail that objects may
incomplete
incompletename.
name. be accessed using an incomplete name
……
……
6
Structured presentation Detailed user requirement
7
Structured language
Form-based specifications
specifications
• A limited form of natural language • Definition of the function or entity
may be used to express • Description of inputs and where
requirements they come from
• This removes some of the problems • Description of outputs and where
resulting from ambiguity and they go to
flexibility and imposes a degree of • Indication of other entities required
uniformity on a specification • Pre and post conditions (if
• Often best supported using a appropriate)
forms-based approach • The side effects (if any)
PDL-based requirements
Form-based node specification
definition
• Requirements may be defined using a
ECLIPSE/Workstation/Tools/DE/FS/3.5.1
language like a programming language but
Function Add node
with more flexibility of expression
Description Adds a node to an existing design. The user selects the type of node, and its position.
When added to the design, the node becomesthe current selection. The user chooses the node position by
moving the cursor to the area where the node is added.
• Most appropriate in two situations
Inputs Node type, Node position, Design identifier.
• Where an operation is specified as a sequence of
actions and the order is important
Source Node type and Node position are input by the user, Design identifier from the database.
Outputs Design identifier.
• When hardware and software interfaces have to be
specified
Destination The design database. The design is committed to the database on completion of the
operation. • Disadvantages are
– The program definition language (PDL) may
Requires Design graph rooted at input design identifier.
domain concepts
Post-condition The design is unchanged apart from the addition of a node of the specified type
at the given position.
Side-effects None – The specification will be taken as a design
Definition: ECLIPSE/Workstation/Tools/DE/RD/3.5.1
rather than a specification
8
Interface specification PDL interface description
• Most systems must operate with other
systems and the operating interfaces
must be specified as part of the interface PrintServer {
requirements // defines an abstract printer server
• Three types of interface may have to be // requires: interface Printer, interface PrintDoc
// provides: initialize, print, displayPrintQueue, cancelPrintJob, switchPrinter
defined
void initialize ( Printer p ) ;
– Procedural interfaces void print ( Printer p, PrintDoc d ) ;
9
External viewpoints Method-based analysis
• Natural to think of end-users as • Widely used approach to requirements
receivers of system services analysis. Depends on the application of a
structured method to understand the
• Viewpoints are a natural way to system
structure requirements elicitation • Methods have different emphases. Some
• It is relatively easy to decide if a are designed for requirements elicitation,
viewpoint is valid others are close to design methods
• Viewpoints and services may be • A viewpoint-oriented method (VORD) is
used to structure non-functional used as an example here. It also
illustrates the use of viewpoints
requirements
10
Viewpoint service information Viewpoint data/control
Account Holder Foreign Customer Bank Teller
Service List Service List Service List
Account Control Input Data Input
1. Withdraw cash 1. Withdraw cash 1. Run diagnostics Holder
2. Query balance 2. Query balance 2. Add cash 1. Start transaction 1. Card details
3. Order checks 3. Add paper 2. Cancel transaction 2. PIN
4. Send message 4. Send Message 3. End transaction 3. Amount required
5. Transaction list 4. Select service 4. Message
6. Order statement
7. Transfer funds
Customer/cash withdrawal
Viewpoint hierarchy templates
•• Reference
Reference
Services All VPs •• Reference
Reference
–– Cash
Cash withdrawal
withdrawal
–– Customer •• Rationale
Rationale
Customer
Withdraw cash –– To
To improve
improve customer
customer service
•• Attributes
Attributes and
service
Query balance
Customer Bank staff and reduce
reduce paperwork
paperwork
–– Account
Account number
number •• Specification
Specification
–– PIN
PIN –– Users
Users choose
choose this
this service
service byby
Account Foreign Teller Manager Engineer –– Start transaction pressing
pressing the
the cash
cash withdrawal
Services Start transaction withdrawal
holder customer button.
button. They
They then
then enter
enter the
•• Events
Events amount
the
Order checks amount required.
required. ThisThis isis
–– Select
Select service
service confirmed
confirmed and,
and, ifif the
the funds
funds
Send message –– Cancel
Cancel transaction
transaction
are
are low,
low, the
the balance
balance isis
delivered
Transaction list –– End transaction
End transaction
delivered
•• VPs
VPs
Order statement •• Services
Services –– Customer
Customer
Transfer funds –– Cash
Cash withdrawal
withdrawal •• Non-functional
Non-functional requirements
requirements
–– Balance
Balance enquiry –– Deliver
enquiry Deliver cash
cash within
within 11 minute
minute
•• Sub-VPs of
of amount
amount being
being confirmed
confirmed
Sub-VPs
–– Account •• Provider
Account holder
holder Provider
–– Foreign –– Filled
Filled inin later
later
Foreign customer
customer
11
Event scenario - start
Event scenarios
transaction
Ellipses.
Ellipses. data
data provided
provided from
from
• Event scenarios may be used to Card
Card presentor
or delivered
delivered to
to aa viewpoint
viewpoint
describe how a system responds to Request Valid card
Request PIN
PIN
the occurrence of some particular PIN User OK
event such as ‘start transaction’ Account
Account Select
Select
Number Validate
Validate user
• VORD includes a diagrammatic PIN
user number service
service
convention for event scenarios. Timeout
Timeout Control
Control information
information enters
enters and
and
– Data provided and delivered
Return
Return card
card leaves
leaves at
at the top
thePIN
Incorrect
Incorrect top of
PIN of each
each box
box
Re-enter PIN
– Control information Invalid
Invalid card
card
Re-enter PIN
Name
Name of of next
next event
event is
is in
in
Data leaves
Datashaded
leaves from
from the
– Exception processing Return
Return card
card shaded box box the
– The next expected event right of each
right Incorrect
of eachPIN
Incorrect box
box
PIN
Stolen
Stolen card Exceptions are
card Exceptions
Return
Return card
cardare shown
shown at
at
Retain
Retain card
card the
the bottom
bottom of of each
each box
box
User administration
Library
staff
Supplier
Catalog Services
12
Catalogue management: Requirements engineering
Sequence Diagram processes
Item:
Item:
Library
Books:
Books: • The processes used for RE vary widely
Library catalog
item
item
catalog depending on the application domain, the
Bookshop Cataloguer:
supplier Library staff
people involved and the organization
developing the requirements
Acquire New
• However, there are a number of generic
activities common to all processes
Catalog item – Requirements elicitation
– Requirements analysis
Dispose – Requirements validation
– Requirements management
Uncatalog item
13
Elicitation Requirements Analysis
• Sometimes called requirements elicitation • Stakeholders don’t know what they really
or requirements discovery want
• Involves technical staff working with • Stakeholders express requirements in
customers to find out about the their own terms
application domain, the services that the • Different stakeholders may have
system should provide and the system’s conflicting requirements
operational constraints • Organizational and political factors may
• May involve end-users, managers, influence the system requirements
engineers involved in maintenance, domain • The requirements change during the
experts, trade unions, etc. These are analysis process. New stakeholders may
called stakeholders emerge and the business environment
change
Classification
Classification
Requirements validation
Requirements Validation
techniques
• Validity. Does the system provide the • Requirements reviews
functions that best support the – Systematic manual analysis of the
customer’s needs? requirements
• Consistency. Are there any requirements • Prototyping
conflicts? – Using an executable model of the system to
• Completeness. Are all functions required check requirements.
by the customer included? • Test-case generation
• Realism. Can the requirements be – Developing tests for requirements to check
testability
implemented given available budget and
technology • Automated consistency analysis
– Checking the consistency of a structured
• Verifiability. Can the requirements be requirements description
checked?
14
Requirements reviews Review checks
• Regular reviews should be held while the • Verifiability. Is the requirement
requirements definition is being realistically testable?
formulated
• Comprehensibility. Is the
• Both client and contractor staff should
be involved in reviews
requirement properly understood?
• Reviews may be formal (with completed • Traceability. Is the origin of the
documents) or informal. Good requirement clearly stated?
communications between developers, • Adaptability. Can the requirement
customers and users can resolve problems be changed without a large impact
at an early stage
on other requirements?
15
Enduring and volatile
CASE tool support
requirements
• Requirements storage • Enduring requirements. Stable
– Requirements should be managed in a secure, requirements derived from the core
managed data store activity of the customer organisation.
E.g. a hospital will always have doctors,
• Change management
nurses, etc. May be derived from domain
– The process of change management is a models
workflow process whose stages can be
defined and information flow between these • Volatile requirements. Requirements
stages partially automated which change during development or when
the system is in use. In a hospital,
• Traceability management requirements derived from health-care
– Automated retrieval of the links between policy
requirements
Revised requirements
16
Users of a requirements
The requirements document
document
• The requirements document is the – System customers
• Specify the requirements and read them to check
official statement of what is that they meet their needs
required of the system developers – Managers
• Use the requirements document to plan a bid for the
• Should include both a definition and system and to plan the system
Requirements document
IEEE requirements standard
requirements
• Specify external system behaviour • Introduction
• Specify implementation constraints • General description
• Easy to change
• Specific requirements
• Serve as reference tool for maintenance
• Appendices
• Record forethought about the life cycle
of the system i.e. predict changes • Index
• Characterise responses to unexpected • This is a generic structure that
events must be instantiated for specific
systems
17