Chapter 21
Chapter 21
All copyright information MUST appear if these slides are posted on a website for student
use.
System
Engineering increment#2
BoxStructure Formal Correctness Code
Specification Design Verification Inspection Statistical Cerfification
Requirements Use
Gathering Testing
TestPlanning
increment#n
BoxStructure Formal Correctness Code
Specification Design Verification Inspection Statistical Cerfification
Requirements Use
Gathering Testing
TestPlanning
black box
clear box
BB1.1.1 SB1.1.1 CB1.1.1.2
BB1.1 BB1.1.2
CB1.1.1.3
BB1 BB1.1.3
BB1.2
state box
BB1.n
S f:S* R R
S black box,g R
black box
state box
State
T
g12
S g11 cg1 R
g13
clear box
These slides are designed to accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by
Roger Pressman. 7
Design Refinement &
Verification
If a function f is expanded into a sequence g and h, the
correctness condition for all input to f is:
• Does g followed by h do f?
When a function f is refined into a conditional (if-then-else),
the correctness condition for all input to f is:
• Whenever condition <c> is true does g do f and
whenever <c> is false, does h do f?
When function f is refined as a loop, the correctness
conditions for all input to f is:
• Is termination guaranteed?
• Whenever <c> is true does g followed by f do f, and
whenever <c> is false, does skipping the loop still do f?
persons
LP1 ftax
LP2 newdata
LAS1
LAS2 exres
Limits Size
*A discussion of sets and constructive specification (slides 20 - 24) is no longer included within
SEPA, 7/e, but is included here for those who are unfamiliar with the basic concepts.
B l o c k
B l o c k S e t
e l e m e n t s
n u m b e r
* *
* b l o c k Q u e u e
f r e e
u s e d
{ o r d e r e d }
a l l B l o c k s
{ s u b s e t }
{ s u b s e t }
1 1 1
B l o c k H a n d l e r
a d d B l o c k ( )
r e m o v e B l o c k ( )
The collection of used blocks and blocks that are unused will be the total
collection of blocks that make up files.
• context BlockHandler inv:
• allBlocks = used->union(free)
The collection of unused blocks will have no duplicate block numbers.
• context BlockHandler inv:
• free->isUnique(aBlock | aBlock.number)
The collection of used blocks will have no duplicate block numbers.
• context BlockHandler inv:
• used->isUnique(aBlock | aBlock.number)
These slides are designed to accompany Software Engineering: A
Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by
Roger Pressman. 30
The Z
Language
organized into schemas
defines variables
establishes relationships between
variables
the analog for a “module” in
conventional languages
notation described in Table 21.2
———BlockHandler——————————————
used, free : P BLOCKS
BlockQueue : seq P BLOCKS
———————————————————————
used > free = \
used < free = AllBlocks
i: dom BlockQueue BlockQueue i # used
i, j : dom BlockQueue i ≠ j => BlockQueue i > BlockQueue j = \
————————————————————————