Slide 11.1 CHAPTER 11 SPECIFICATION PHASE. Slide 11.2 Overview l The specification document l Informal specifications l Structured systems analysis l.

Slides:



Advertisements
Similar presentations
Software Engineering - Specifications 1 Specifications Specification document must be clear, complete and correct.
Advertisements

Classic Analysis CS524 – Software Engineering I Azusa Pacific University Professor Dr. Sheldon X. Liang.
10 Software Engineering Foundations of Computer Science ã Cengage Learning.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
CHAPTER 1: AN OVERVIEW OF COMPUTERS AND LOGIC. Objectives 2  Understand computer components and operations  Describe the steps involved in the programming.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Chapter 4 Enterprise Modeling.
Chapter 4.
Systems Analysis and Design 9th Edition
Informal Specifications BV If the sales for the current month are below the target sales, then a report is to be printed, unless the difference.
Functional Specification. Overview The specification document Informal specifications Structured systems analysis Other semiformal techniques Entity-relationship.
Slide 11.1 CHAPTER 11 SPECIFICATION PHASE. Slide 11.2 Overview l The specification document l Informal specifications l Structured systems analysis l.
Chapter 9 Describing Process Specifications and Structured Decisions
System Design and Analysis
Slide 11.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
Computers: Tools for an Information Age
Requirements Techniques, cont. Brief review Formal Requirements Techniques –Finite State Machines –Petri Nets.
© Copyright 2011 John Wiley & Sons, Inc.
UHD-CMS-CH101 Specification Phase Chapter Ten. UHD-CMS-CH102 SPECIFICATION DOCUMENT The specification document must be Informal enough for client Formal.
Chapter 4.
August 1, August 1, 2015August 1, 2015August 1, 2015 Azusa, CA Sheldon X. Liang Ph. D. Software Engineering in CS at APU Azusa Pacific University,
[ §4 : 1 ] 4. Requirements Processes II Overview 4.1Fundamentals 4.2Elicitation 4.3Specification 4.4Verification 4.5Validation Software Requirements Specification.
Welcome to CMPE003 Personal Computer Concepts: Hardware and Software Winter 2003 UC Santa Cruz Instructor: Guy Cox.
Lecture 9 & 10: Finite Machines Anita S. Malik Adapted from Schach (2004) Chapter 11.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Kendall & KendallCopyright © 2014 Pearson Education, Inc. Publishing as Prentice Hall 9 Kendall & Kendall Systems Analysis and Design, 9e Process Specifications.
Systems Analysis and Design 10th Edition
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 14 Systems Analysis and Design: The Big Picture.
Introduction to Systems Analysis and Design Trisha Cummings.
CS540 Software Design Lecture 6 & 7 1 Lecture 6 & 7: Structured Analysis Anita S. Malik Adapted from Schach (2004) Chapter 11.
Data and Process Modeling
OBJECT-ORIENTED ANALYSIS PHASE
Section 02Systems Documentation1 02 Systems Documentation And Franchise Colleges By MANSHA NAWAZ.
IS 320 Notes for Chapter 8. ClassX Problems: Low-Tech Fix Use last year's videos on ClassX  Select "Semesters" tab  Select IS 320  Select the week/lecture.
Chapter 9 Describing Process Specifications and Structured Decisions
Phase 2: Systems Analysis
Database Design - Lecture 2
Chapter 14 Information System Development
CSC 213 – Large Scale Programming Lecture 3: Object-Oriented Analysis.
Requirements Definition and Specification. Outline Definition and specification Natural language Semi-formal techniques –Program description languages.
1 Analysis Extracting from Use Cases to Create Diagrams.
Lecture 14 & 15: Object- Oriented Analysis Anita S. Malik Adapted from Schach (2004) Chapter 12.
Slide 11C.104 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Structured Analysis.
CSC 395 – Software Engineering Lecture 28: Classical Analysis -or- Do You Really Want to Do That?
Slide 11.1 © The McGraw-Hill Companies, 2007 CHAPTER 11 CLASSICAL ANALYSIS.
Chapter 12: Design Phase n 12.1 Design and Abstraction n 12.2 Action-Oriented Design n 12.3 Data Flow Analysis n Data Flow Analysis Example n
5 - 1 Copyright © 2006, The McGraw-Hill Companies, Inc. All rights reserved.
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
Slide 12.1 Copyright © 2011 by The McGraw-Hill Companies, Inc. All rights reserved. Object-Oriented and Classical Software Engineering Eighth Edition,
Slide 12A.1 © The McGraw-Hill Companies, 2005 Object-Oriented and Classical Software Engineering Sixth Edition, WCB/McGraw-Hill, 2005 Stephen R. Schach.
Capabilities of Software. Object Linking & Embedding (OLE) OLE allows information to be shared between different programs For example, a spreadsheet created.
Chapter 4 enterprise modeling
Petri Nets Invented by Carl Adam Petri in 1962 Concurrent systems with timing problems  Synchronization, race problem, deadlock A petri net consists of.
Prof. Aiken CS 169 Lecture 31 Requirements and Specification CS169 Lecture 3.
Slide 13.1 © The McGraw-Hill Companies, 2002 Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach.
CHAPTER 5 1 DATA AND PROCESS ANALYSIS. Chapter Objectives Describe data and process modeling concepts and tools, including data flow diagrams, a data.
Submitted To: Rutvi sarang Submitted By: Kushal Bhagat.
Systems Analysis and Design 8th Edition
Systems Analysis and Design 8th Edition
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach 1.
Tools Of Structured Analysis
Object-Oriented and Classical Software Engineering Seventh Edition, WCB/McGraw-Hill, 2007 Stephen R. Schach
Object-Oriented and Classical Software Engineering Eighth Edition, WCB/McGraw-Hill, 2011 Stephen R. Schach.
CHAPTER 12 CLASSICAL ANALYSIS.
An Introduction to Structured Program Design in COBOL
Object-Oriented and Classical Software Engineering Fifth Edition, WCB/McGraw-Hill, 2002 Stephen R. Schach
COSC 4506/ITEC 3506 Software Engineering
Chapter 11 Describing Process Specifications and Structured Decisions
Presentation transcript:

Slide 11.1 CHAPTER 11 SPECIFICATION PHASE

Slide 11.2 Overview l The specification document l Informal specifications l Structured systems analysis l Other semiformal techniques l Entity-relationship modeling l Finite state machines l Other formal techniques

Slide 11.3 Overview (contd) l Comparison of specification techniques l Testing during the specification phase l CASE tools for the specification phase l Metrics for the specification phase l Air Gourmet Case Study: structured systems analysis l Air Gourmet Case Study: software project management plan l Challenges of the specifications phase

Slide 11.4 Specification Phase l Specification document must be –Informal enough for client –Formal enough for developers –Free of omissions, contradictions, ambiguities

Slide 11.5 Specification Document l Constraints –Cost –Time –Parallel running –Portability –Reliability –Rapid response time

Slide 11.6 Specification Document (contd) l Acceptance criteria –Vital to spell out series of tests –Product passes tests, deemed to satisfy specifications –Some are restatements of constraints

Slide 11.7 Solution Strategy l General approach to building the product l Find strategies without worrying about constraints l Modify strategies in the light of constraints, if necessary l Keep a written record of all discarded strategies, and why they were discarded –To protect the specification team –To prevent unwise new “solutions” during the maintenance phase

Slide 11.8 Informal Specifications l Example “If sales for current month are below target sales, then a report is to be printed, unless difference between target sales and actual sales is less than half of difference between target sales and actual sales in previous month, or if difference between target sales and actual sales for the current month is under 5%”

Slide 11.9 Meaning of Specification l Sales target for January was $100,000, actual sales were only $64,000 (36% below target) –Print report l Sales target for February was $120,000, actual sales were only $100,000 (16.7% below target) –Percentage difference for February (16.7%) less than half of previous month’s percentage difference (36%), do not print report l Sales target for March was $100,000, actual sales were $98,000 (2% below target) –Percentage difference < 5%, do not print

Slide But Specifications Do Not Say This l “[D]ifference between target sales and actual sales” –There is no mention of percentage difference l Difference in January was $36,000, difference in February was $20,000 –Not less than half of $36,000, so report is printed l “[D]ifference … [of] 5%” –Again, no mention of percentage l Ambiguity—should the last clause read “percentage difference … [of] 5%” or “difference … [of] $5,000” or something else entirely? l Style is poor

Slide Informal Specifications (contd) l Claim –This cannot arise with professional specifications writers l Refutation –Text Processing case study (Section )

Slide Informal Specifications l Conclusion –Natural language is not a good way to specify product l Fact –Many organizations still use natural language, especially for commercial products l Reasons –Uninformed management –Undertrained computer professionals –Management gives in to client pressure –Management is unwilling to invest in training

Slide Structured Systems Analysis l Three popular graphical specification methods of ’70s –DeMarco –Gane and Sarsen –Yourdon l All equivalent l All equally good l Many U.S. corporations still use them for commercial products

Slide Gane and Sarsen’s 9-step Specification Method 1.Draw the data flow diagram 2.Decide what sections to computerize and how 3.Determine the details of the data flows 4.Define the logic of the processes 5.Define the data stores 6.Determine the physical resources 7.Determine the input-output specifications 8.Perform the sizing 9.Determine the hardware requirements

Slide Structured Systems Analysis Case Study Sally’s Software Store buys software from various suppliers and sells it to the public. Popular software packages are kept in stock, but the rest must be ordered as required. Institutions and corporations are given credit facilities, as are some members of the public. Sally’s Software Store is doing well, with a monthly turnover of 300 packages at an average retail cost of $250 each. Despite her business success, Sally has been advised to computerize. Should she? l Better question –What sections? l Still better –How? Batch, or online? In-house or out-service?

Slide Case Study (contd) l Fundamental issue –What is Sally’s objective in computerizing her business? l Because she sells software? –She needs an in-house system with sound and light effects l Assume: Computerization “in order to make more money” –Cost/benefit analysis for each section of business

Slide Data Flow Diagram (DFD) l DFD shows logical data flow –“what happens, not how it happens”

Slide Step 1. Draw the DFD l First refinement l Infinite number of possible interpretations

Slide Step 1 (contd) l Second refinement l pending orders scanned daily

Slide Step 1 (contd) l Portion of third refinement

Slide Step 1 (contd) l Final DFD –Larger, but easily understood by client l Larger DFDs –Hierarchy –Box becomes DFD at lower level l Frequent problem –Process P at level L, expanded at level L+1 –Correct place for sources and destinations of data for process P is level L+1 –Clients cannot understand DFD—sources and destinations of data for P are “missing” l Solution –Draw “correct” DFD, modify by moving sources and destinations of data one or more levels up

Slide Step 2. Decide What Parts to Computerize l Depends on how much client is prepared to spend l Large volumes, tight controls –Batch l Small volumes, in-house microcomputer –Online l Cost/benefit analysis

Slide Step 3. Refine Data Flows l Determine data items for each data flow l Refine each flow stepwise l Refine further – each of the preceding components is refined further l Need a data dictionary

Slide Sample data dictionary entries (Fig. 11.5)

Slide Step 4. Refine Logic of Processes Have process give educational discount –Sally must explain discount for educational institutions –10% on up to 4 packages, 15% on 5 or more l Translate into decision tree

Slide Step 4 (contd) l Advantage of decision tree –Missing items are quickly apparent l Can also use decision tables –CASE tools for automatic translation

Slide Step 5. Refine Data Stores l Define exact contents and representation (format) –COBOL: specify to pic level –Ada: specify digits or delta l Specify where immediate access is required –Data immediate access diagram (DIAD)

Slide Step 6. Define Physical Resources l For each file, specify –File name –Organization (sequential, indexed, etc.) –Storage medium –Blocking factor –Records (to field level) l If DBMS is to be used, then specify –The relevant information for each table

Slide Step 7. Determine Input/Output Specs l Specify input forms, input screens, printed output

Slide Step 8. Perform Sizing l Numerical data for Step 9 to determine hardware requirements –Volume of input (daily or hourly) –Size, frequency, deadline of each printed report –Size, number of records passing between CPU and mass storage –Size of each file

Slide Step 9. Hardware Requirements l DASD (Direct Access Storage Disk) requirements l Mass storage for back-up l Input needs l Output devices l Is existing hardware adequate? l If not, recommend buy or lease

Slide However l Response times cannot be determined l Number of I/O channels can only be guessed l CPU size and timing can only be guessed l Nevertheless, no other method provides these data for arbitrary products l The method of Gane and Sarsen, DeMarco, Yourdon has resulted in major improvements in the software industry

Slide Entity-Relationship (Modeling) Diagrams l A semi-formal data-oriented (as opposed to structured systems analysis’ action-oriented) technique for specifying a product l Widely used for specifying databases l One element of object-oriented analysis l One-to-Many relationship

Slide Entity-Relationship Diagrams (contd) l Many-to-many relationship l Many-to-many-to-many relationship

Slide Formality versus Informality l Informal method –English (or other natural language such as 한글 ) l Semiformal methods –Structured Systems Analysis (Gane & Sarsen/DeMarco/Yourdon) –Entity-Relationship Diagrams –Jackson/Orr/Warnier, –SADT, PSL/PSA, SREM, etc. l Formal methods –Finite State Machines (section 11.6) –Petri Nets (section 11.7) –Z (section 11.8) –ANNA, VDM, CSP, etc. (section 11.9)

Slide Finite State Machines l Case study A safe has a combination lock that can be in one of three positions, labeled 1, 2, and 3. The dial can be turned left or right (L or R). Thus, there are six possible dial movements, namely 1L, 1R, 2L, 2R, 3L, and 3R. The combination to the safe is 1L, 3R, 2L; any other dial movement will cause the alarm to go off State Transition Diagram (STD)

Slide Finite State Machines (contd) Transition table

Slide Extended Finite State Machines l Extend FSM with global predicates (condition or state) l EFSM transition rules have form: current state and event and predicate  new state

Slide Elevator Problem A product is to be installed to control n elevators in a building with m floors. The problem concerns the logic required to move elevators between floors according to the following constraints: 1.Each elevator has a set of m buttons, one for each floor. These illuminate when pressed and cause elevator to visit corresponding floor. Illumination is canceled when corresponding floor is visited by elevator. 2.Each floor, except the first and the top floor, has 2 buttons, one to request an up-elevator, one to request a down-elevator. These buttons illuminate when pressed. The illumination is canceled when an elevator visits the floor, then moves in the desired direction. 3.If an elevator has no requests, it remains at its current floor with its doors closed.

Slide Elevator Problem: FSM l Two sets of buttons –Elevator buttons—in each elevator, one for each floor –Floor buttons—two on each floor, one for up-elevator, one for down-elevator EB(e, f): Elevator Button in elevator e pressed to request floor f

Slide Elevator Buttons (contd) l Two states EBON(e, f): Elevator Button (e, f) ON EBOFF(e, f):Elevator Button (e, f) OFF –If button is on and elevator arrives at floor f, then light is turned off –If light is off and button is pressed, then light comes on

Slide Elevator Buttons (contd) l Two events EBP(e,f):Elevator Button (e,f) Pressed EAF(e,f):Elevator e Arrives at Floor f l Global predicate V(e,f): Elevator e is Visiting (stopped at) floor f l Transition Rules EBOFF(e,f) and EBP(e,f) and not V(e,f)  EBON(e,f) EBON(e,f) and EAF(e,f)  EBOFF(e,f)

Slide Floor Buttons l Floor buttons FB(d, f): Floor Button on floor f that requests elevator traveling in direction d l States FBON(d, f):Floor Button (d, f) ON FBOFF(d, f):Floor Button (d, f) OFF –If floor button is on and an elevator arrives at floor f, traveling in correct direction d, then light is turned off –If light is off and a button is pressed, then light comes on

Slide Floor Buttons (contd) l Events FBP(d, f): Floor Button (d, f) Pressed EAF(1..n, f): Elevator 1 or … or n Arrives at Floor f l Predicate S(d, e, f):elevator e is visiting floor f and the direction of motion is up (d = U), down (d = D), or no requests are pending (d = N) l Transition rules FBOFF(d, f) and FBP(d, f) and not S(d, 1..n, f)  FBON(d, f) FBON(d, f) and EAF(1..n, f) and S(d, 1..n, f)  FBOFF(d, f), d = U or D

Slide Elevator Problem: FSM (contd) l State of elevator consists of component substates, including: –Elevator slowing –Elevator stopping –Door opening –Door open with timer running –Door closing after a timeout

Slide Elevator Problem: FSM (contd) l Assume elevator controller moves elevator through substates –Three elevator states M(d, e, f):Moving in direction d (floor f is next) S(d, e, f):Stopped (d-bound) at floor f W(e, f):Waiting at floor f (door closed) –For simplicity, three stopped states S(U, e, f), S(N, e, f), and S(D, e, f) are grouped into one larger state

Slide Elevator Problem: FSM (contd) l Events DC(e,f):Door Closed for elevator e, floor f ST(e,f):Sensor Triggered as elevator e nears floor f RL:Request Logged (button pressed) l Transition Rules If elevator e is in state S(d, e, f) (stopped, d-bound, at floor f), and doors close, then elevator e will move up, down, or go into wait state DC(e,f) and S(U, e, f)  M(U, e, f+1) DC(e,f) and S(D, e, f)  M(D, e, f-1) DC(e,f) and S(N, e, f)  W(e,f)

Slide Elevator Problem: FSM (contd)

Slide Power of FSM to Specify Complex Systems l No need for complex preconditions and postconditions l Specifications take the simple form current state and event and predicate  next state

Slide Power of FSM to Specify Complex Systems l Using an FSM, a specification is –Easy to write down –Easy to validate –Easy to convert into design –Easy to generate code automatically –More precise than graphical methods –Almost as easy to understand –Easy to maintain l However –Timing considerations are not handled

Slide Who Is Using FSMs? l Commercial products –Menu driven –Various states/screens –Automatic code generation a major plus l System software –Operating system –Word processors –Spreadsheets l Real-time systems –Statecharts are a real-time extension of FSMs »CASE tool: Rhapsody

Slide Comparison of Specification Techniques l We must always choose the appropriate specification method l Formal methods –Powerful –Difficult to learn and use l Informal methods –Little power –Easy to learn and use l Trade-off – Ease of use versus power

Slide Comparison of Specification Techniques (contd)

Slide Which Specification Method to Use? l Depends on the –Project –Development team –Management team –Myriad other factors

Slide Testing during the Specification Phase l Specification inspection –A team of inspectors reviews the specifications against a checklist »Have all the required functions been specified? »Have the required hardware resources been specified? »Have the acceptance criteria been specified?

Slide CASE Tools for the Specification Phase l Graphical tool –DFD tool –ER Diagram tool –STD tool l Data dictionary –Usually provided in a case tool l Specification method without CASE tools can easily fail

Slide CASE Tools for the Specification Phase l Typical tools –Analyst/Designer –Software through Pictures –System Architect

Slide Metrics for the Specification Phase l Size –Number of pages in the specification document l Quality –Fault statistics –Number, type of each fault –Rate of detection l Metrics for “predicting” size of target product –Total number of items in data dictionary –Number of items of each type –Number of files, processes

Slide Air Gourmet Case Study: Structured Sys. Anal. l Data flow diagram reflects centrality of SPECIAL MEAL DATA l See Appendix E for remainder of structured systems analysis

Slide Air Gourmet Case Study: SPMP l The Software Project Management Plan is given in Appendix F

Slide Challenges of the Specification Phase l A specification document must be –Informal enough for the client; and –Formal enough for the development team l The specification phase (“what”) should not cross the boundary into the design phase (“how”) l Read Chapter 11