Prof. Aiken CS 169 Lecture 31 Requirements and Specification CS169 Lecture 3.

Slides:



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

Software Requirements
Classic Analysis CS524 – Software Engineering I Azusa Pacific University Professor Dr. Sheldon X. Liang.
Systems Analysis & IT Project Management Pepper. System Life Cycle BirthDeathDevelopmentProduction.
CPSC 439/539 Spring Join us at the Yale CEID (15 Prospect Street) for a day exploring the variety of opportunities in the growing field of computing!
Slide 10.1 CHAPTER 10 REQUIREMENTS PHASE. Slide 10.2 Overview l Requirements elicitation l Requirements analysis l Rapid prototyping l Human factors l.
Introduction to Software Engineering Dr. Basem Alkazemi
Functional Specification. Overview The specification document Informal specifications Structured systems analysis Other semiformal techniques Entity-relationship.
Software Engineering COMP 201
The Unified Software Development Process - Workflows Ivar Jacobson, Grady Booch, James Rumbaugh Addison Wesley, 1999.
Introduction to Software Engineering
CSC 402 Requirements Engineering 1. 2 Problem Definition Requirements Definition informal statement of need for system natural language statement of what.
Software Requirements
CS351 © 2003 Ray S. Babcock Requirements What not How “The Pizza Experiment” 1994, 350 companies, 8000 software projects. 31% were canceled before they.
Software Requirements
Computers: Tools for an Information Age
1 Lecture 5 Introduction to Software Engineering Overview  What is Software Engineering  Software Engineering Issues  Waterfall Model  Waterfall Model.
UHD-CMS-CH101 Specification Phase Chapter Ten. UHD-CMS-CH102 SPECIFICATION DOCUMENT The specification document must be Informal enough for client Formal.
Lead Black Slide. © 2001 Business & Information Systems 2/e2 Chapter 13 Developing and Managing Information Systems.
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Requirements engineering l The process of establishing the services that the.
The Project AH Computing. Functional Requirements  What the product must do!  Examples attractive welcome screen all options available as clickable.
Copyright © 2003 by Prentice Hall Computers: Tools for an Information Age Chapter 14 Systems Analysis and Design: The Big Picture.
The Software Development Cycle Defining and understanding the problem.
The Software Development Life Cycle: An Overview
CS540 Software Design Lecture 6 & 7 1 Lecture 6 & 7: Structured Analysis Anita S. Malik Adapted from Schach (2004) Chapter 11.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
INFORMATION SYSTEM APPLICATIONS System Development Life Cycle.
LESSON 8 Booklet Sections: 12 & 13 Systems Analysis.
Managing the development and purchase of information systems (Part 1)
1 BTEC HNC Systems Support Castle College 2007/8 Systems Analysis Lecture 9 Introduction to Design.
Chapter 8: Systems analysis and design
Unit B065 – Coding a solution PREP WORK 1)Make sure you keep a work log / diary. Use the table on page 16 of the hand book as a template 2)Keep a bibliography.
The Structured Specification. Why a Structured Specification? System analyst communicates the user requirements to the designer with a document called.
ITEC224 Database Programming
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 6 Slide 1 Software Requirements.
Chapter 14 Information System Development
Requirements Definition and Specification. Outline Definition and specification Natural language Semi-formal techniques –Program description languages.
OBJECT ORIENTED SYSTEM ANALYSIS AND DESIGN. COURSE OUTLINE The world of the Information Systems Analyst Approaches to System Development The Analyst as.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
CSC 395 – Software Engineering Lecture 28: Classical Analysis -or- Do You Really Want to Do That?
Computers Are Your Future Tenth Edition Chapter 13: Systems Analysis & Design Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall1.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
CORE 1: PROJECT MANAGEMENT Designing. This stage is where the actual solution is designed and built. This includes describing information processes and.
Task Analysis Methods IST 331. March 16 th
L To identify the services that the customer requires from a system and the constraints under which it operates and is developed.
The Software Development Process
Systems Development Life Cycle
CHAPTER 5 1 DATA AND PROCESS ANALYSIS. Chapter Objectives Describe data and process modeling concepts and tools, including data flow diagrams, a data.
Connecting with Computer Science2 Objectives Learn how software engineering is used to create applications Learn some of the different software engineering.
UML’s StateChart FSM, EFSM in UML Concurrent states Tool support.
Week 3: Requirement Analysis & specification
Requirements Analysis
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
Software Requirements. Objectives: l To introduce the concepts of user and system requirements l To describe functional / non-functional requirements.
Software Engineering, COMP201 Slide 1 Software Requirements BY M D ACHARYA Dept of Computer Science.
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
CMSC 2021 Software Development. CMSC 2022 Software Development Life Cycle Five phases: –Analysis –Design –Implementation –Testing –Maintenance.
The information systems lifecycle Far more boring than you ever dreamed possible!
Requirement Specification SRS document is a contract between the development team and the customer How do we communicate the Requirements to others? Firm.
Unit F451 Computer Fundamentals Components of a Computer System Software Data: Its representation, structure and management in information.
1 Software Requirements Descriptions and specifications of a system.
Getting Ready for the NOCTI test April 30, Study checklist #1 Analyze Programming Problems and Flowchart Solutions Study Checklist.
 System Requirement Specification and System Planning.
Requirements Specification
INTRODUCTION TO PROBLEM SOLVING
System Requirements Specification
COSC 4506/ITEC 3506 Software Engineering
Subject Name: SOFTWARE ENGINEERING Subject Code:10IS51
Presentation transcript:

Prof. Aiken CS 169 Lecture 31 Requirements and Specification CS169 Lecture 3

Prof. Aiken CS 169 Lecture 32 What are Requirements? Major misconception – determining what client wants “I know you believe you understood what you think I said, but I am not sure you realize that what you heard is not what I meant!”

Prof. Aiken CS 169 Lecture 33 Determining Needs Must determine client’s needs Must determine user’s needs Little hope for success if you don’t do this! Note client and user may be different –Client pays for the software –User forced to use it –Source of lots of bad software...

Prof. Aiken CS 169 Lecture 34 Techniques Interviewing Strawmen Prototypes

Prof. Aiken CS 169 Lecture 35 Interviewing One path is obvious –Sit down with client/user and ask questions –Listen to what they say, and don’t say A less obvious path –Master-apprentice relationship –Have them teach you what they do –Go to workplace and watch them do the task In all types of interviews, get details –Ask for copies of reports, logs, s on process –These may support, fill in, or contradict what the user said

Prof. Aiken CS 169 Lecture 36 Requirements as Anthropology “Take the attitude that nothing any person does is done for no reason; if you think it’s for no reason, you don’t yet understand the point of view from which it makes sense. Take the attitude that nothing any person does is unique to them, it always represents an important class of customers whose needs will not be met if you don’t figure out what’s going on.” -- p. 63, Contextual Design, by Beyer & Holtzblatt

Prof. Aiken CS 169 Lecture 37 Disadvantages of Talking Interviews are useful, but Users/clients may not –Have the vocabulary to tell you what they need –Know enough about computer science to understand what is possible Or impossible Good idea to gather requirements in other ways, too

Prof. Aiken CS 169 Lecture 38 Strawmen Sketch the product for the user/client –Storyboards –Flowcharts –HTML mock-ups –Illustrate major events/interfaces/actions Anything to convey ideas without writing code!

Prof. Aiken CS 169 Lecture 310 Rapid Prototyping Write a prototype –Major functionality, superficially implemented –Falls down on moderate-to-extreme examples No investment in scaling, error handling, etc. Show prototype to users/clients –Users have a real system – more reliable feedback –Refine requirements –But, significant investment

Prof. Aiken CS 169 Lecture 311 Pitfalls of Rapid Prototyping Needs to be done quickly –Remember, this is just the requirements phase! –Danger of spending too long refining prototype The prototype becomes the product –Prototype deliberately not thoroughly thought-out –Product will inherit the sub-optimal architecture Prototype serves as the spec –Prototype is incomplete, maybe even contradictory When done well, extremely useful

Prof. Aiken CS 169 Lecture 312 Metrics Measuring the requirements phase is not so easy Convergence metric –Say we are done when requirements stop changing –Measure rate of change, watch for drop below some threshold History metric –Look at how many requirements changes came after the requirements phase is “done”

Prof. Aiken CS 169 Lecture 313 Summary of Requirements Find out what users/clients need –Not necessarily what they say they want Use –Interviews –Strawmen –Rapid prototyping –As appropriate...

Prof. Aiken CS 169 Lecture 314 Specifications Describe the functionality of the product –Precisely –Covering all circumstances Move from the finite to the infinite –Finite examples (requirements) to infinite set of possible computations –This is not easy

Prof. Aiken CS 169 Lecture 315 Views of Specifications Developer’s –Specification must be detailed enough to implement –Unambiguous –Self-consistent Client’s/user’s –Specifications must be comprehensible –Usually means: not too technical Legal –Specification can be a contract –Should include acceptance criteria If the software passes tests X, Y, and Z, it will be accepted

Prof. Aiken CS 169 Lecture 316 Views of Specifications (Cont.) Specifications must serve –Multiple purposes –Multiple audiences Specifications are the first interface –between the developers and users –before the software exists at all

Prof. Aiken CS 169 Lecture 317 Informal Specifications Written in natural language –E.g., English Example “If sales for current month are below target sales, then 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%”

Prof. Aiken CS 169 Lecture 318 Problems with Informal Specs Informal specs of any size inevitably suffer from serious problems –Omissions Something missing –Ambiguities Something open to multiple interpretations –Contradictions Spec says “do A” and “do not do A” These problems will be faithfully implemented in the software unless found in the spec

Prof. Aiken CS 169 Lecture 319 Informal Specifications Revisited “If sales for current month are below target sales, then 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%”

Prof. Aiken CS 169 Lecture 320 Informal Specifications Revisited “If sales for current month are below target sales, then 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%” What are sales? Orders received but not yet paid for? Only orders paid for?

Prof. Aiken CS 169 Lecture 321 Informal Specifications Revisited “If sales for current month are below target sales, then 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%” Specification implies, but does not say, that there are monthly sales targets. Are there separate monthly targets, or is the monthly target e.g., 1/3 of the quarterly target?

Prof. Aiken CS 169 Lecture 322 Informal Specifications Revisited “If sales for current month are below target sales, then 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%” 5% of the target sales, or of the actual sales?

Prof. Aiken CS 169 Lecture 323 Comments on Informal Specification Informal specification is universally reviled –By academics –By “how to” authors –By respectable pundits Informal specification is also widely practiced –Why?

Prof. Aiken CS 169 Lecture 324 Why Do People Use Informal Specs? The common language is natural language –Customers can’t read formal specs –Neither can most programmers –Or most managers –A least-common denominator effect takes hold Truly formal specs are very time-consuming –And hard to understand –And overkill for most projects

Prof. Aiken CS 169 Lecture 325 Semi-Formal Specs Best current practice is “semi-formal” specs –Allows more precision than natural language where desired Usually a boxes-and-arrows notation –Must pay attention to: –What boxes mean –What arrows mean –Different in different systems!

Prof. Aiken CS 169 Lecture 326 Example 1: Dataflow Diagrams Old ideas –Several competing models from the ’70s –Called “Structured Systems Analysis” –We present one Others are similar 9 step procedure –With refinements of each step Example: automating a software store –Only show key steps

Prof. Aiken CS 169 Lecture 327 Example: Data Flow Diagrams Show logical data flow –“what happens, not how it happens”

Prof. Aiken CS 169 Lecture 328 Step 1: Draw the DFD 1 st refinement (infinite # of implementations)

Prof. Aiken CS 169 Lecture 329 Step 1: 2 nd refinement of DFD CUSTOMER PACKAGE DATA CUSTOMER DATA package details credit status order invoice verify order is valid PENDING ORDERS place order at software supplier details of package to be ordered batched order assemble orders details of package on hand SOFTWARE SUPPLIER address or telephone number

Prof. Aiken CS 169 Lecture 330 Step 1: Draw the DFD Final DFD –gets larger & larger (pages) –hopefully it can be understood by client Larger DFDs –use hierarchy –a box becomes DFD at lower level

Prof. Aiken CS 169 Lecture 331 Step 2: Decide What to Computerize Spec so far says nothing about how steps are done –could be a person looking up info on a card file Cost/benefit analysis could help decide this

Prof. Aiken CS 169 Lecture 332 Step 3: Refine Data Flows Further specify data items for each data flow Refine each flow stepwise order: order identification customer details package details Refine further –this creates the “data dictionary”

Prof. Aiken CS 169 Lecture 333 Step 4: Refine Logic of Processes Have process give educational discount –explain what this means –10% on up to 4 packages, 15% on 5 or more Translate into decision tree –makes it easy to see what is missing give educational discount Educational institution Other: 0% <= 4 packages: 10% > 4 packages: 15%

Prof. Aiken CS 169 Lecture 334 Step 6: Define Physical Resources For each file figure out –names –Organization Sequential Indexed Database tables –storage medium (This is very ’70’s...)

Prof. Aiken CS 169 Lecture 335 Step 7: Determine Input/Output Specs Specify –UI Screens Interactions –output files created –printed reports

Prof. Aiken CS 169 Lecture 336 Steps 8 & 9: Perform Sizing & Hardware Requirements Look at –volume of input (daily/hourly) –size / frequency of reports –size / number of records moving between CPU & storage –size of files –back-up requirements –input needs –output devices –is existing hardware adequate?

Prof. Aiken CS 169 Lecture 337 Entity-Relationship Diagrams Semi-formal technique Focuses on data rather than actions –In contrast to dataflow diagrams Really comes out of database world Has crossed over into object-oriented analysis 1 to many relationships Author 1 Reader Autobiography n 11 n writes n readsowns Part is supplied by Supplier m n many to many relationships

Prof. Aiken CS 169 Lecture 338 Finite State Machines Formal method State transitions –Set of states –Rules for moving between states –Designated start and final states

Prof. Aiken CS 169 Lecture 339 Finite State Machines Write out state transition tables Current State Dial Movement Safe Locked A B 1L 1R 2L 2R 3L 3R A Sound Alarm B Safe Unlocked Sound Alarm

Prof. Aiken CS 169 Lecture 340 Finite State Machines Advantages –more precise than DFDs –easy to write down, validate, & convert into code some CASE tools directly generate code from FSMs makes maintenance easy -> changes spec & regenerate Disadvantages –Lack of structure leads huge numbers of states fixed by Harel’s Statecharts –does not deal with timing issues Could use Petri nets

Prof. Aiken CS 169 Lecture 341 Z (“zed”) Notation Formal specification language –Most successful one –Real skill required: set theory, functions & discrete math Z specifications consists of 4 sections –given sets, data types, and constants sets that get defined in detail –state definition variable declarations & predicates that constrain values –initial state –operations

Prof. Aiken CS 169 Lecture 342 Comparison of Specification Techniques Formal methods –powerful and precise –difficult to learn & use –could be useful where cost/safety/reliability is important Informal methods –little power –easy to learn and use

Prof. Aiken CS 169 Lecture 343 Testing the Specification Specification inspection –inspectors use a checklist of items to look for Especially: check for handling of all cases –can also trace items back to requirements doc –record faults found & rate of finding faults Can also measure convergence –Have changes in the spec dropped below some threshold?

Prof. Aiken CS 169 Lecture 344 Metrics for Specification Phase Five standard metrics –Size –Cost –Duration –Effort –Quality The usefulness of these is a bit suspect –At best, depends on skilled user

Prof. Aiken CS 169 Lecture 345 Summary Specification document ? –explicitly defines functionality & constraints Ranges from informal to formal –informal e.g., NL very ambiguous, but easy to understand –semi-formal e.g., DFD, E-RDs easy to understand, but more precise –formal e.g., FSMs, Z very precise & powerful, but hard to learn useful where safety or reliability is a concern