Top Banner
Slide 11C.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach [email protected]
26

Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Jan 03, 2016

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.1

© The McGraw-Hill Companies, 2005

Object-Oriented and Classical Software

Engineering

Sixth Edition, WCB/McGraw-Hill, 2005

Stephen R. [email protected]

Page 2: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.2

© The McGraw-Hill Companies, 2005

CHAPTER 11 — Unit C

CLASSICAL ANALYSIS

Page 3: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.3

© The McGraw-Hill Companies, 2005

Continued from Unit 11B

Page 4: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.4

© The McGraw-Hill Companies, 2005

11.9 Z

Z (pronounced “zed”) is a formal specification language

There is a high squiggle factor

Page 5: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.5

© The McGraw-Hill Companies, 2005

11.9.1 Z: The Elevator Problem Case Study

A Z specification consists of four sections:1. Given sets, data types, and constants2. State definition3. Initial state4. Operations

Page 6: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.6

© The McGraw-Hill Companies, 2005

1. Given sets

Given sets are sets that need not be defined in detail

Names appear in brackets

Here we need the set of all buttons

The specification therefore begins [Button]

Page 7: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.7

© The McGraw-Hill Companies, 2005

2. State Definition

Z specification consists of a number of schemataA schema consists of a group of variable declarations,

plusA list of predicates that constrain the values of variables

Figure 11.25

Page 8: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.8

© The McGraw-Hill Companies, 2005

Z: The Elevator Problem Case Study (contd)

In this problem there are four subsets of Button

The floor buttonsThe elevator buttons buttons (the set of all buttons in the elevator problem) pushed (the set of buttons that have been pushed)

Page 9: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.9

© The McGraw-Hill Companies, 2005

Schema Button_State

Figure 11.26

Page 10: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.10

© The McGraw-Hill Companies, 2005

3. Initial State

The state when the system is first turned on

Button_Init ^= [Button_State' | pushed' = ]

(The caret ^ should be on top of the first equals sign =. Unfortunately, this is hard to type in PowerPoint!)

Page 11: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.11

© The McGraw-Hill Companies, 2005

4. Operations

A button pushed for the first time is turned on, and added to set pushed

Without the third precondition, the results would be unspecified

Figure 11.27

Page 12: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.12

© The McGraw-Hill Companies, 2005

Z: The Elevator Problem Case Study (contd)

If an elevator arrives at a floor, the corresponding button(s) must be turned off

The solution does not distinguish between up and down floor buttons

Figure 11.28

Page 13: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.13

© The McGraw-Hill Companies, 2005

11.9.2 Analysis of Z

Z is the most widely used formal specification language

It has been used to specifyCICS (part)An oscilloscopeA CASE toolMany large-scale projects (especially in Europe)

Page 14: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.14

© The McGraw-Hill Companies, 2005

Analysis of Z (contd)

Difficulties in using ZThe large and complex set of symbolsTraining in mathematics is needed

Page 15: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.15

© The McGraw-Hill Companies, 2005

Analysis of Z (contd)

Reasons for the great success of Z It is easy to find faults in Z specificationsThe specifier must be extremely preciseWe can prove correctness (we do not have to)Only high-school math needed to read ZZ decreases development timeA “translation” of a Z specification into English (or

another natural language) is clearer than an informal specification

Page 16: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.16

© The McGraw-Hill Companies, 2005

11.10 Other Formal Techniques

Anna For Ada

Gist, RefineKnowledge-based

VDM Uses denotational semantics

CSP CSP specifications are executableLike Z, CSP has a high squiggle factor

Page 17: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.17

© The McGraw-Hill Companies, 2005

11.11 Comparison of Classical Analysis Techniques

Formal methods arePowerful, butDifficult to learn and use

Informal methods haveLittle power, but areEasy to learn and use

There is therefore a trade-off Ease of use versus power

Page 18: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.18

© The McGraw-Hill Companies, 2005

Comparison of Classical Analysis Techniques (contd)

Figure 11.29

Page 19: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.19

© The McGraw-Hill Companies, 2005

Newer Methods

Many are untested in practice

There are risks involvedTraining costsAdjustment from the classroom to an actual projectCASE tools may not work properly

However, possible gains may be huge

Page 20: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.20

© The McGraw-Hill Companies, 2005

Which Analysis Technique Should Be Used?

It depends on theProjectDevelopment teamManagement teamMyriad other factors

It is unwise to ignore the latest developments

Page 21: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.21

© The McGraw-Hill Companies, 2005

11.12 Testing during Classical Analysis

Specification inspectionAided by fault checklist

Results of Doolan [1992]2 million lines of FORTRAN1 hour of inspecting saved 30 hours of execution-based

testing

Page 22: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.22

© The McGraw-Hill Companies, 2005

11.13 CASE Tools for Classical Analysis

A graphical tool is exceedingly useful

So is a data dictionary Integrate them

An analysis technique without CASE tools to support it will failThe SREM experience

Page 23: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.23

© The McGraw-Hill Companies, 2005

CASE Tools for Classical Analysis (contd)

Typical toolsAnalyst/DesignerSoftware through PicturesSystem Architect

Page 24: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.24

© The McGraw-Hill Companies, 2005

11.14 Metrics for CASE Tools

Five fundamental metrics

QualityFault statisticsThe number, type of each faultThe rate of fault detection

Metrics for “predicting” the size of a target productTotal number of items in the data dictionaryThe number of items of each typeProcesses vs. modules

Page 25: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.25

© The McGraw-Hill Companies, 2005

11.15 Software Project Management Plan: The Osbert Oglesby Case Study

The Software Project Management Plan is given in Appendix F

Page 26: Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.

Slide 11C.26

© The McGraw-Hill Companies, 2005

11.16 Challenges of Classical Analysis

A specification document must be Informal enough for the client; butFormal enough for the development team

Analysis (“what”) should not cross the boundary into design (“how”)

Do not try to assign modules to process boxes of DFDs until the classical design phase