23
System Requirements
• More detailed descriptions of user requirements
• May serve as the basis for a contract
• Starting point for system design & implementation
• May utilize different system models such as object or
dataflow
System Requirements And Design Information
• In principle, system requirements should state
w ha t
the
system should do, and
not how
it should be designed.
• In practice, however, some design info may be incorporated,
since:
Sub-systems may be defined to help structure the requirements.
Interoperability requirements may constrain the design.
Use of a specific design model may be a requirement
More Potential Problems With Using Natural
Language
• Ambiguity : the readers and writers of a requirement must
interpret the same words in the same way. NL is naturally
ambiguous so this is very difficult.
• Over-flexibility : the same requirement may be stated in a
number of different ways. The reader must determine when
requirements are the same and when they are different.
• Lacks of modularisation : NL structures are inadequate to
structure system requirements sufficiently.
Alternatives to NL Specification
1RWDWLRQ 'HVFULSWLRQ
6WUXFWXUHG
QDWXUDO
ODQJXDJH
7KLVDSSURDFKGHSHQGVRQGHILQLQJVWDQGDUGIRUPVRU
WHPSODWHVWRH[SUHVVWKHUHTXLUHPHQWVVSHFLILFDWLRQ
'HVLJQ
GHVFULSWLRQ
ODQJXDJHV
7KLVDSSURDFKXVHVDODQJXDJHOLNHDSURJUDPPLQJ
ODQJXDJHEXWZLWKPRUHDEVWUDFWIHDWXUHVWRVSHFLI\WKH
UHTXLUHPHQWVE\GHILQLQJDQRSHUDWLRQDOPRGHORIWKH
V\VWHP
*UDSKLFDO
QRWDWLRQV
$JUDSKLFDOODQJXDJHVXSSOHPHQWHGE\WH[WDQQRWDWLRQVLV
XVHGWRGHILQHWKHIXQFWLRQDOUHTXLUHPHQWVIRUWKHV\VWHP
$QHDUO\H[DPSOHRIVXFKDJUDSKLFDOODQJXDJHZDV6$'7
5RVV 6FKRPDQDQG5RVV 0RUHUHFHQWO\
XVHFDVHGHVFULSWLRQV-DFREVHQ&KULVWHUVRQHWDO
KDYHEHHQXVHG,GLVFXVVWKHVHLQWKHIROORZLQJFKDSWHU
0DWKHPDWLFDO
VSHFLILFDWLRQV
7KHVHDUHQRWDWLRQVEDVHGRQPDWKHPDWLFDOFRQFHSWV
VXFKDVILQLWHVWDWHPDFKLQHVRUVHWV7KHVHXQDPELJXRXV
VSHFLILFDWLRQVUHGXFHWKHDUJXPHQWVEHWZHHQFXVWRPHU
DQGFRQWUDFWRUDERXWV\VWHPIXQFWLRQDOLW\+RZHYHUPRVW
FXVWRPHUVGRQ¶WXQGHUVWDQGIRUPDOVSHFLILFDWLRQVDQGDUH
UHOXFWDQWWRDFFHSWLWDVDV\VWHPFRQWUDFW,GLVFXVVIRUPDO
VSHFLILFDWLRQLQ&KDSWHU
Program Description Languages (PDLs)
• Requirements are specified operationally using pseudo-code.
• Shows what is required by illustrating how the requirements
could be satisfied.
• Especially useful when specifying a process that involves an
ordered sequence of actions, or when describing hardware
and software interfaces.
Part of an ATM Specification
FODVV$70^
GHFODUDWLRQVKHUH
SXEOLFVWDWLFYRLGPDLQ6WULQJDUJV>@WKURZV,QYDOLG&DUG^
WU\^
WKLV&DUGUHDGPD\WKURZ,QYDOLG&DUGH[FHSWLRQ
SLQ .H\3DGUHDG3LQDWWHPSWV
ZKLOHWKLV&DUGSLQHTXDOVSLQDWWHPSWV
^ SLQ .H\3DGUHDG3LQDWWHPSWV DWWHPSWV
`
LIWKLV&DUGSLQHTXDOVSLQ
WKURZQHZ,QYDOLG&DUG%DG3,1
WKLV%DODQFH WKLV&DUGJHW%DODQFH
GR^6FUHHQSURPSW3OHDVHVHOHFWDVHUYLFH
VHUYLFH 6FUHHQWRXFK.H\
VZLWFKVHUYLFH^
FDVH6HUYLFHVZLWKGUDZDO:LWK5HFHLSW
UHFHLSW5HTXLUHG WUXH
PDL Disadvantages
• PDL may not be sufficiently expressive to illustrate
requirements in a concise an understandable way.
• Notation is only understandable to people with
programming language knowledge.
• The specification may be taken as a design prescription rather
than a model to facilitate requirements understanding.
Interface Specification
• Used to specify operating interfaces with other systems.
Procedural interfaces
Data structures that are exchanged
Data representations
• Also used to specify functional behaviour.
• Formal notations are effective for interface specification – e.g.,
pre- and post-conditions
PDL Interface Description
Example: Interface and Operational Specifications of a
Function
LQWHUIDFH3ULQW6HUYHU^
GHILQHVDQDEVWUDFWSULQWHUVHUYHU
UHTXLUHVLQWHUIDFH3ULQWHULQWHUIDFH3ULQW'RF
SURYLGHVLQLWLDOL]HSULQWGLVSOD\3ULQW4XHXHFDQFHO3ULQW-REVZLWFK3ULQWHU
YRLGLQLWLDOL]H3ULQWHUS
YRLGSULQW3ULQWHUS3ULQW'RFG
YRLGGLVSOD\3ULQW4XHXH3ULQWHUS
YRLGFDQFHO3ULQW-RE3ULQWHUS3ULQW'RFG
YRLGVZLWFK3ULQWHU3ULQWHUS3ULQWHUS3ULQW'RFG
`3ULQW6HUYHU
Function: Set BIG to the largest value in array A [1.. N]
Interface Specification
Pre-condition: N > 1
Post-condition: there exists an i in [1,N] such that BIG=A [i]
& for every in [1,N], BIG >
A [j] & A is unchanged