Administrivia. Wednesday: Requirements and Specification. CS169 Lecture 4. We assign teams and you start on Monday. Determining Stakeholders and Needs

Similar documents
Administrivia. Added 20 more so far. Software Process. Only one TA so far. CS169 Lecture 2. Start thinking about project proposal

Requirements Engineering process

Requirements Engineering. Contents. Functional requirements. What is a requirement?

CS350 Lecture 2 Requirements Engineering. Doo-Hwan Bae

Software Engineering Prof.N.L.Sarda IIT Bombay. Lecture-11 Data Modelling- ER diagrams, Mapping to relational model (Part -II)

Software Engineering - I

Lecture 8 Requirements Engineering

CS3500: Object-Oriented Design Fall 2013

Requirements. Chapter Learning objectives of this chapter. 2.2 Definition and syntax

1: Specifying Requirements with Use Case Diagrams

Human Error Taxonomy

CS 4349 Lecture August 21st, 2017

System Analysis & design

Ch 4: Requirements Engineering. What are requirements?

Requirements. Requirements. Types of Requirement. What Is a Requirement?

Natural Language Specification

Applying ISO/IEC Quality Model to Quality Requirements Engineering on Critical Software

Chapter 4 Objectives

Data Process Modeling: Context Diagrams & Data Flow Diagrams (DFDs)

Structured Analysis and Design

Requirements Validation and Negotiation

UNIT-II REQUIREMENTS ANALYSIS AND SPECIFICATION

1. i. What are the 3 major components of a information system and show their relationship input output

CS 307: Software Engineering. Lecture 10: Software Design and Architecture

(Murlidhar Group of Institutions,Bhavnagar Road, Rajkot) by:-assit. Prof. Vijay Vora (SOOADM) MCA-III

3. Introduction to Algorithm and Flowchart

Object-Oriented Analysis and Design Prof. Partha Pratim Das Department of Computer Science and Engineering Indian Institute of Technology-Kharagpur

SOFTWARE ENGINEERING Prof.N.L.Sarda Computer Science & Engineering IIT Bombay. Lecture #10 Process Modelling DFD, Function Decomp (Part 2)

The Specification Phase

Requirements Engineering. Materials: Pressman (chapters 8,9, 10, 11) Sommerville (Chapters 4, 5)

CS3205: Task Analysis and Techniques

Lecture 9 Requirements Engineering II

Hardware versus software

*ANSWERS * **********************************

The software lifecycle and its documents

CS187 - Science Gateway Seminar for CS and Math

(Refer Slide Time: 1:27)

proj 3B intro to multi-page layout & interactive pdf

Introduction to Software Specifications and Data Flow Diagrams. Neelam Gupta The University of Arizona

CS 451 Software Engineering

Requirement Analysis

Lesson 06. Requirement Engineering Processes

UNIT II Requirements Analysis and Specification & Software Design

Introduction to Formal Methods

Requirements Elicitation

Rules of Writing Software Requirement Specifications

Fundamentals: Software Engineering. Objectives. Last lectures. Unit 2: Light Introduction to Requirements Engineering

Lecture 6: Requirements Engineering

Slide Hard real-time constraints must be satisfied Copyright 2011 by The McGraw-Hill Companies, Inc. All rights reserved.

SFU CMPT week 11

VANCOUVER Chapter Study Group. BABOK Chapter 9 Techniques

TASKS IN THE SYSTEMS DEVELOPMENT LIFE CYCLE

Recalling the definition of design as set of models let's consider the modeling of some real software.

SE 1: Software Requirements Specification and Analysis

Usable Privacy and Security Introduction to HCI Methods January 19, 2006 Jason Hong Notes By: Kami Vaniea

By: Chaitanya Settaluri Devendra Kalia

Up and Running Software The Development Process

Software Requirements Specification. <Project> for. Version 1.0 approved. Prepared by <author(s)> <Organization> <Date created>

1. The narratives, diagrams, charts, and other written materials that explain how a system works are collectively called

Object-Oriented and Classical Software Engineering

SOFTWARE REQUIREMENTS ENGINEERING LECTURE # 7 TEAM SKILL 2: UNDERSTANDING USER AND STAKEHOLDER NEEDS REQUIREMENT ELICITATION TECHNIQUES-IV

Authors: Andrei Kapustin, Vadim Chirikov, Marina Farr Cybernetic Intelligence GmbH, Zug, Switzerland Requirement analysis: Methodology

CITS5501 Software Testing and Quality Assurance Formal methods

This exam is open book / open notes. No electronic devices are permitted.

SE 2730 Final Review

CIS 890: Safety Critical Systems

Scenario-Based Analysis. Scenario-Based Analysis (example) Form analysis

Business Process Modelling

Recommended Practice for Software Requirements Specifications (IEEE)

Software Verification and Validation (VIMMD052) Introduction. Istvan Majzik Budapest University of Technology and Economics

Flow Chart & Algorithms

SE Assignment III. 1. List and explain primitive symbols used for constructing DFDs. Illustrate the use of these symbols with the help of an example.

Business Analysis for Practitioners - Requirements Elicitation and Analysis (Domain 3)

Working with Health IT Systems is available under a Creative Commons Attribution-NonCommercial- ShareAlike 3.0 Unported license.

The Analysis and Proposed Modifications to ISO/IEC Software Engineering Software Quality Requirements and Evaluation Quality Requirements

The requirements engineering process

SIF8035. Events and System Requirements

06. Analysis Modeling

Software Applications What Are they? enterprise software accounting software office suites graphics software media players Databases Graphical user

Game keystrokes or Calculates how fast and moves a cartoon Joystick movements how far to move a cartoon figure on screen figure on screen

Requirements Analysis. SE 555 Software Requirements & Specification

Introduction to User Stories. CSCI 5828: Foundations of Software Engineering Lecture 05 09/09/2014

Darshan Institute of Engineering & Technology for Diploma Studies

Lecture 5: Requirements Specifications

SOFTWARE ENGINEERING : A MCQ BOOK CODE : RBMCQ0602. Second Edition

Marking Guidelines for MVK Projects. MVK12. Version 6.2 (PPD, URD, RURD, ADD and software demo)

Chapter 3. Describing Syntax and Semantics

User Stories. Wednesday, January 23, 13

Final Exam CISC 475/675 Fall 2004

Computer Science 520/620 Spring 2013 Prof. L. Osterweil" Use Cases" Software Models and Representations" Part 4" More, and Multiple Models"

Computer Science 520/620 Spring 2013 Prof. L. Osterweil" Software Models and Representations" Part 4" More, and Multiple Models" Use Cases"

2014 Intelliware Development Inc.

Introducing Computer Programming

Guide to IREE Certification

UML for Managers Chapter 2 UML for Managers. Jason Gorman. Chapter 2. February 11, Jason Gorman 2005

(Refer Slide Time: 00:01:30)

Software Design Fundamentals. CSCE Lecture 11-09/27/2016

Foundations, Reasoning About Algorithms, and Design By Contract CMPSC 122

Human-Centred Interaction Design

Sample Exam Syllabus

Transcription:

Administrivia Requirements and Specification CS169 Lecture 4 Wednesday: Groups and one-sentence idea(s) due at class One per group If you have a small group, still submit so that you will be kept together. (better to find 6 people) We assign teams and you start on Monday Prof. Brewer CS 169 Lecture 4 1 Prof. Brewer CS 169 Lecture 4 2 Requirements Engineering The hardest single part of building a software system is deciding what to build Cripples the process if done wrong Costly to rectify later Must be adopted to the software process Elaborate requirements/specs for waterfall Partial set of user stories for iterative processes Determining Stakeholders and Needs Must determine stakeholders anyone who benefits from the system developed E.g., who s client and who s user? Try to understand what their needs are Reconcile different needs/points of view Prof. Brewer CS 169 Lecture 4 3 Prof. Brewer CS 169 Lecture 4 4 Techniques Interviewing User stories Strawmen Prototypes 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, emails on process These may support, fill in, or contradict what the user said Prof. Brewer CS 169 Lecture 4 5 Prof. Brewer CS 169 Lecture 4 6 1

Extreme Programming User Stories Recall: client writes user stories Using client vocabulary Describe usage scenarios of software Title, short description Each user story has acceptance tests Clarify the story Will tell you when the customer things story is done User Story Example Title: Delete account Actors: trusted operator Preconditions: account must be empty Trigger: operator selects menu option Scenario:, confirmation dialog box, Exceptions: account not empty, unknown user Priority: important, but not for first release Frequency of use: rare Prof. Brewer CS 169 Lecture 4 7 Prof. Brewer CS 169 Lecture 4 8 Disadvantages of Talking Interviews are useful, but 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! 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 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! Good idea to gather requirements in other ways, too Prof. Brewer CS 169 Lecture 4 9 Prof. Brewer CS 169 Lecture 4 10 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. Brewer CS 169 Lecture 4 12 2

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 Summary of Requirements Find out what users/clients need Not necessarily what they say they want Use Interviews User stories Strawmen Rapid prototyping As appropriate... Prof. Brewer CS 169 Lecture 4 13 Prof. Brewer CS 169 Lecture 4 14 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 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. Brewer CS 169 Lecture 4 15 Prof. Brewer CS 169 Lecture 4 16 Informal Specifications Written in natural language E.g., English Example and actual sales for the current month is under 5% 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. Brewer CS 169 Lecture 4 17 Prof. Brewer CS 169 Lecture 4 18 3

Informal Specifications Revisited Informal Specifications Revisited and actual sales for the current month is under 5% 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. Brewer CS 169 Lecture 4 19 Prof. Brewer CS 169 Lecture 4 20 Informal Specifications Revisited Informal Specifications Revisited 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. Brewer CS 169 Lecture 4 21 and actual sales for the current month is under 5% 5% of the target sales, or of the actual sales? Prof. Brewer CS 169 Lecture 4 22 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? 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. Brewer CS 169 Lecture 4 23 Prof. Brewer CS 169 Lecture 4 24 4

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! 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. Brewer CS 169 Lecture 4 25 Prof. Brewer CS 169 Lecture 4 26 Example: Data Flow Diagrams Step 1: Draw the DFD Show logical data flow what happens, not how it happens DOUBLE SQUARE Source or destination of data 1 st refinement (infinite # of implementations) PACKAGE DATA package details arrow Flow of data CUSTOMER order process orders rounded rectangle Process which transforms a flow of data invoice credit status OPEN-ENDED Store of data RECTANGLE Prof. Brewer CS 169 Lecture 4 27 CUSTOMER DATA Prof. Brewer CS 169 Lecture 4 28 Step 1: 2 nd refinement of DFD Step 1: Draw the DFD CUSTOMER PACKAGE DATA package details order verify order is valid credit status details of package to be ordered SOFTWARE SUPPLIER address or telephone number place order at software supplier batched order Final DFD gets larger & larger (pages) hopefully it can be understood by client Larger DFDs use hierarchy a box becomes DFD at lower level invoice CUSTOMER DATA PENDING ORDERS details of package on hand assemble orders Prof. Brewer CS 169 Lecture 4 29 Prof. Brewer CS 169 Lecture 4 30 5

Step 2: Decide What to Computerize Step 3: Refine Data Flows 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 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. Brewer CS 169 Lecture 4 31 Prof. Brewer CS 169 Lecture 4 32 Step 4: Refine Logic of Processes Step 6: Define Physical Resources 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 For each file figure out names Organization Sequential Indexed Database tables storage medium <= 4 packages: 10% Educational institution Other: 0% > 4 packages: 15% Prof. Brewer CS 169 Lecture 4 33 Prof. Brewer CS 169 Lecture 4 34 Step 7: Determine Input/Output Specs Specify UI Screens/Windows/Buttons/Menus Interactions output files created printed reports 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. Brewer CS 169 Lecture 4 35 Prof. Brewer CS 169 Lecture 4 36 6

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 Author Finite State Machines Formal method State transitions Set of states Rules for moving between states Designated start and final states Safe Locked 1L 3R 2L A B Safe Unlocked 1 to many relationships 1 writes n Autobiography any other dial movement any other dial movement any other dial movement n reads n owns many to many relationships Initial state m m Reader Prof. Brewer CS 169 Lecture 4 37 Final state Prof. Brewer CS 169 Lecture 4 38 Finite State Machines Write out state transition tables Current State Safe Locked A B Dial Movement 1L 1R 2L 2R 3L 3R A B Safe Unlocked Prof. Brewer CS 169 Lecture 4 39 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. Brewer CS 169 Lecture 4 40 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 Example of Formal Specification Title: delete account named A by user U Precondition: A Accounts and U Trusted and Balance(A) = 0 Postcondition: if ConfirmDeleteDialogBox(A,U) then Accounts@after = Accounts { A } else Accounts@after = Accounts Notes: no need to consider the case when precondition is not true Prof. Brewer CS 169 Lecture 4 41 Prof. Brewer CS 169 Lecture 4 42 7

Comparison of Specification Techniques Formal methods powerful and precise difficult to learn & use could be useful where cost/safety/reliability is important computers can assist in the spec./code reviews Informal methods little power easy to learn and use Testing/Validating the Specification Specification inspection inspectors use a checklist of items to look for Are requirements clear? Can they be misinterpreted? Are all the cases handled? Are there inconsitencies? Is the requirement testable? Is the requirement traceable to project objectives? 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. Brewer CS 169 Lecture 4 43 Prof. Brewer CS 169 Lecture 4 44 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 Prof. Brewer CS 169 Lecture 4 45 8