Software Engineering

Similar documents
UML TUTORIALS THE USE CASE MODEL

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Sofware Requirements Engineeing

Software Engineering

Requirements engineering

Scenario-based Requirements Engineering and User-Interface Design

Use Cases. Massimo Felici. Massimo Felici Use Cases c

Using Use Cases on Agile Projects

Example Use Case Specification:

Requirements Document for the Banking System. Lecture # 40

What is a requirement? Software Requirements. Descriptions and specifications of a system

Course Outline. Foundation of Business Analysis Course BA30: 4 days Instructor Led

Writing Use Case Scenarios for Model Driven Development

The ProB Animator and Model Checker for B

System Modeling / Class Diagra Diagr m a Week 6

Exercises Engenharia de Software (cod & 6633 )

Use-Case Analysis. ! What is it? ! From where did it come? ! Now part of UML

Interactive system specification. Interactive system definition. Issues to be taken into account for interactive systems

Why Data Flow Diagrams?

Use Cases. Reference: Craig Larman, Applying UML and Patterns, Ch. 6

Announcements. SE 1: Software Requirements Specification and Analysis. Review: Use Case Descriptions

Take Charge of Your Own Checking Account ASSESSMENT ONE: Assessment #1

TECH. Requirements. Why are requirements important? The Requirements Process REQUIREMENTS ELICITATION AND ANALYSIS. Requirements vs.

Engineering Process Software Qualities Software Architectural Design

Introducing Formal Methods. Software Engineering and Formal Methods

Roadmap. Software Engineering. Software Engineering. Project Life Cycle. Database. Project Lifecycle

The Software Process. The Unified Process (Cont.) The Unified Process (Cont.)

Model Simulation in Rational Software Architect: Business Process Simulation

UML-based Test Generation and Execution

Quality Ensuring Development of Software Processes

The Role of Use Cases in Requirements and Analysis Modeling

Software Engineering

Menouer Boubekeur, Gregory Provan

Course Registration Case Study

Contents. Introduction and System Engineering 1. Introduction 2. Software Process and Methodology 16. System Engineering 53

Principles of integrated software development environments. Learning Objectives. Context: Software Process (e.g. USDP or RUP)

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT SYSTEMS ANALYSIS & DESIGN EXAMINERS REPORT

Checking Account. Money Smarts for Kids. Money Skills for Life. Member FDIC. Welcome! What Is a Checking Account? Why Is a Checking Account So Great?

Evaluation of a Use-Case-Driven Requirements Analysis Tool Employing Web UI Prototype Generation

Budapest University of Technology and Economics Department of Measurement and Information Systems. Business Process Modeling

Budget Planner SOFTWARE REQUIREMENT SPECIFICATION. Professor: Dr. Doan Nguyen. Team Members: Bindu Madhavi K Khambam Suganya Srinivasan

Card & Intesa Sanpaolo Bank Albania Network Frequently Asked Questions

Execution of A Requirement Model in Software Development

Policy Modeling and Compliance Verification in Enterprise Software Systems: a Survey

Requirement engineering Exercise the POS System solution

Software Engineering/Courses Description Introduction to Software Engineering Credit Hours: 3 Prerequisite: (Computer Programming 2).

1. Process Modeling. Process Modeling (Cont.) Content. Chapter 7 Structuring System Process Requirements

VDM vs. Programming Language Extensions or their Integration

A CSPm Model for the Procure to Pay Case Study

Software Engineering Reference Framework

Quick Guide Business Process Modeling Notation (BPMN)

OVERVIEW OF THE PROJECT...

Questions? Assignment. Techniques for Gathering Requirements. Gathering and Analysing Requirements

Software Specification and Architecture 2IW80

Total Quality Management (TQM) Quality, Success and Failure. Total Quality Management (TQM) vs. Process Reengineering (BPR)

Internal Revenue Service Number: Release Date: 08/13/2004 Index Number:

Use Case Modeling. Software Development Life Cycle Training. Use Case Modeling. Set A: Requirements Analysis Part 3: Use Case Modeling

Job Streaming User Guide

Solutions for Quality Management in a Agile and Mobile World

Architectural Design Structured Design. Xin Feng

THE BCS PROFESSIONAL EXAMINATION Diploma October 2014 EXAMINERS REPORT Systems Analysis and Design

Using Use Cases for requirements capture. Pete McBreen McBreen.Consulting

Chapter 8 The Enhanced Entity- Relationship (EER) Model

ELECTRONIC FUND TRANSFER AGREEMENT AND DISCLOSURE PERSONAL CHECK and/or ATM CARD

Requirements Engineering Processes. Ian Sommerville 2006 Software Engineering, 8th edition. Chapter 7 Slide 1

Software Requirements Specification of A University Class Scheduler

ipayu TM Prepaid MasterCard FREQUENTLY ASKED QUESTIONS

Requirements Engineering Processes. Feasibility studies. Elicitation and analysis. Problems of requirements analysis

UML TUTORIALS THE COMPONENT MODEL

Kirsten Sinclair SyntheSys Systems Engineers

Lesson Description. Texas Essential Knowledge and Skills (Target standards) Texas Essential Knowledge and Skills (Prerequisite standards)

Analysis of Software Architectures

Software Requirements Specification

Personal Schedule of Fees for SafeBalance Banking

FI to FI Transfer Frequently Asked Questions

An Automatic Tool for Checking Consistency between Data Flow Diagrams (DFDs)

CPS122 Lecture: State and Activity Diagrams in UML

Introduction to Savings and Checking Accounts

Lesson Description. Texas Essential Knowledge and Skills (Target standards) Texas Essential Knowledge and Skills (Prerequisite standards)

Lecture # 06 Introducing abstract Machines Saima Zareen

Modeling the User Interface of Web Applications with UML

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

COSC 3351 Software Design. Recap for the first quiz. Edgar Gabriel. Spring For the 1 st Quiz

EXAM FOR INFOTECH SOFTWARE ENGINEERING FOR REAL-TIME SYSTEMS. Suggested Solution WS 13/14. - Without Engagement -

The Software Lifecycle. Software Lifecycles

Software Requirements. Objectives

Case Study Solutions. This appendix contains the solutions to the Acme Mining Company Case Study.

Glossary of Accounting Terms

Part I. Introduction

How does the EMV Travel Prepaid Card work?

Large Scale Systems Design G52LSS

FEDERAL ELECTRONIC FUND TRANSFER DISCLOSURES

YOUR GUIDE TO THE iphone MOBILE APP WITH 1st SOURCE

ATM Case Study Part 1

New York University Computer Science Department Courant Institute of Mathematical Sciences

Process Modeling. Chapter 6. (with additions by Yale Braunstein) Slide 1

Communication Diagrams

Requirements Definition and Management Processes

Software Requirements

Transcription:

Software Engineering Lecture 03: From Requirements to Definition Peter Thiemann University of Freiburg, Germany SS 2014 Peter Thiemann (Univ. Freiburg) Software Engineering SWT 1 / 48

Requirements Engineering comprises methods, means of description, and tools to discover, analyze, and formulate requirements of software systems requirements analysis (Systemanalyse) requirements specification (Produktdefinition) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 2 / 48

Requirements Functional requirements inputs and their constraints functions of the system outputs (reactions) Nonfunctional requirements run time memory standards Peter Thiemann (Univ. Freiburg) Software Engineering SWT 3 / 48

Requirements Requirements on realization software / hardware devices interfaces facilities (OS, computers,... ) documentation Requirements on testing, installation, support Requirements on construction of the system approach resources (personal, cost, deadlines) rules, standards Peter Thiemann (Univ. Freiburg) Software Engineering SWT 4 / 48

Systematic Investigation of Functional Requirements Inside-out methods modeling starts from product internals (rarely applicable for new products) Outside-in methods modeling starts from environment of product actors and use cases (use case diagram, UML) interfaces and data flows (context diagram, SA/SD) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 5 / 48

Requirements Engineering: Four Activities Elicit Manage Analyze Guide Peter Thiemann (Univ. Freiburg) Software Engineering SWT 6 / 48

Use Cases and Use Case Diagrams Jacobson, UML Actor participates directly in a process stands for a role natural person unit of organization external system Peter Thiemann (Univ. Freiburg) Software Engineering SWT 7 / 48

Use Cases Use case Definition two forms: Create Account a sequence of actions performed by one actor to achieve a particular goal graphical (UML diagram) textual (with templates) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 8 / 48

Example Use Case Diagram Source: http://www.agilemodeling.com/images/models/usecasediagram.jpg Peter Thiemann (Univ. Freiburg) Software Engineering SWT 9 / 48

Generalization generalization concrete and abstract use cases concrete and abstract actors Peter Thiemann (Univ. Freiburg) Software Engineering SWT 10 / 48

Use Case Textual Template Use case: name Goal: achieved by successful execution Category: primary, secondary, optional Precondition: Postcondition/success: Postcondition/failure: Actors: Trigger: Description: numbered tasks Extensions: wrt previous tasks Alternatives: wrt tasks Peter Thiemann (Univ. Freiburg) Software Engineering SWT 11 / 48

Use Case Guidelines Outside view System as black box No implementation specifics No UI specifics Primarily text Peter Thiemann (Univ. Freiburg) Software Engineering SWT 12 / 48

Tools http://www.umlet.com/ UML diagram drawing standalone and in Eclipse http://yuml.me/ online drawing of use case and class diagrams (UML) http://www.gliffy.com/flowchart-software/ flowcharts and DFD Peter Thiemann (Univ. Freiburg) Software Engineering SWT 13 / 48

Related Approaches User Stories A user story is a very high-level definition of a requirement, containing just enough information so that the developers can produce a reasonable estimate of the effort to implement it. [Scott Ambler http://www.agilemodeling.com/artifacts/userstory.htm] Very slim, very high-level, often just one sentence. Informal, but proposed formal style [Mike Cohn]: As a (role) I want (something) so that (benefit). Peter Thiemann (Univ. Freiburg) Software Engineering SWT 14 / 48

Example User Stories Students can purchase monthly parking passes online. Parking passes can be paid via credit cards. Professors can input student marks. Students can obtain their current seminar schedule. Students can order official transcripts. Students can only enroll in seminars for which they have prerequisites. As a student I want to purchase a monthly parking pass so that I can drive to school. As a student I want to obtain my current seminar schedule so that I can follow my classes. Peter Thiemann (Univ. Freiburg) Software Engineering SWT 15 / 48

User Stories Guidelines Authors Tools Size Priority Traceability Peter Thiemann (Univ. Freiburg) Software Engineering SWT 16 / 48

Related Approaches Usage Scenarios A usage scenario, or scenario for short, describes a real-world example of how one or more people or organizations interact with a system. They describe the steps, events, and/or actions which occur during the interaction. Usage scenarios can be very detailed, indicating exactly how someone works with the user interface, or reasonably high-level describing the critical business actions but not the indicating how they are performed. [Scott Ambler http://www.agilemodeling.com/artifacts/usagescenario.htm] Further elaboration of a use case. Scenario path through a use case. Peter Thiemann (Univ. Freiburg) Software Engineering SWT 17 / 48

Example High-Level Scenario Scenario: ATM banking for the week 1. Sally Jones places her bank card into the ATM. 2. Sally successfully logs into the ATM using her personal identification number. 3. Sally deposits her weekly paycheck of $350 into her savings account. 4. Sally pays her phone bill of $75, her electricity bill of $145, her cable bill of $55, and her water bill of $85 from her savings account. 5. Sally attempts to withdraw $100 from her savings account for the weekend but discovers that she has insufficient funds. 6. Sally withdraws $40 and gets her card back. Source: agilemodeling.com Peter Thiemann (Univ. Freiburg) Software Engineering SWT 18 / 48

Example Detailed Scenario Scenario: A successful withdrawal attempt at an automated teller machine (ATM) 1. John Smith presses the Withdraw Funds button 2. The ATM displays the preset withdrawal amounts ($20, $40,... ) 3. John chooses the option to specify the amount of the withdrawal 4. The ATM displays an input field for the withdrawal amount 5. John indicates that he wishes to withdraw $50 dollars 6. The ATM displays a list of John s accounts, a checking and two savings accounts 7. John chooses his checking account 8. The ATM verifies that the amount may be withdrawn from his account 9. The ATM verifies that there is at least $50 available to be disbursed from the machine 10. The ATM debits John s account by $50 11. The ATM dispenses $50 in cash 12. The ATM displays the Do you wish to print a receipt options 13. John indicates Yes 14. The ATM prints the receipt Source: agilemodeling.com Peter Thiemann (Univ. Freiburg) Software Engineering SWT 19 / 48

Perspective on Changing Requirements Produce high quality requirements (see checklist in CC2) Advertize the cost of requirements changes Establish a change-control procedure Anticipate changes Consider the business value of requirements Cancel a project with bad or frequently changing requirements Peter Thiemann (Univ. Freiburg) Software Engineering SWT 20 / 48

General Approach to Formal Requirements Analysis Ideas - System Natural Language Document Formal Document Peter Thiemann (Univ. Freiburg) Software Engineering SWT 21 / 48

The Analysis Problem Soundness, completeness? Consistent contradictory? Degree of abstraction? Peter Thiemann (Univ. Freiburg) Software Engineering SWT 22 / 48

Formal Methods for Analysis What are Formal Methods? Formal = Mathematical Methods = Structured Approaches Peter Thiemann (Univ. Freiburg) Software Engineering SWT 23 / 48

Useful Mathematics for Requirements Set theory Functions and relations First-order predicate logic Before-after predicates Peter Thiemann (Univ. Freiburg) Software Engineering SWT 24 / 48

Set Theory All dogs are male or female Dogs = Male Female No dog is male and female at once Male Female = Male Female Peter Thiemann (Univ. Freiburg) Software Engineering SWT 25 / 48

Functions and Relations Every customer must have a personal assistant attendants : Customers Employees Every customer has a set of accounts accountsof : Customers P(Accounts) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 26 / 48

First-Order Predicate Logic Everybody who works on a Sunday must have a permit p Employees. workonsunday(p) haspermit(p) Every customer must have at least one account c Customers. a Accounts. a accountsof(c) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 27 / 48

Before-After Predicates People who enter the building must carry their ID. When entering, they have to leave their ID at the registration desk. INVARIANT peopleinbuilding carriespassport = enterbuilding(p) PRE hasauthorization(p) p carriespassport THEN peopleinbuilding := peopleinbuilding { p } passportsatdesk := passportsatdesk { p } carriespassport := carriespassport { p } END Peter Thiemann (Univ. Freiburg) Software Engineering SWT 28 / 48

Advantanges of Using Mathematics Short notation Forces precision Identifies ambiguity Clean form of communication Makes you ask the right questions Peter Thiemann (Univ. Freiburg) Software Engineering SWT 29 / 48

Mathematical Notation is Concise For every ticket that is issued, there has to be a single person that is allowed to enter. This person is called the owner of the ticket. vs. ticketowner : IssuedTickets Persons Peter Thiemann (Univ. Freiburg) Software Engineering SWT 30 / 48

Mathematical Notation Enforces Precision On red traffic lights, people normally stop their cars. What is the meaning of normally? Is it possible to build a system on this statement? What happens when people do not stop their cars? No basis for formalization. Peter Thiemann (Univ. Freiburg) Software Engineering SWT 31 / 48

Mathematical Notation Avoids Ambiguity When the temperature is too high, the ventilation has to be switched on or the maintenance staff has to be informed. Is it ok to switch on ventilation and inform the maintenance staff? or temperaturehigh informstaff or ventilationon temperaturehigh informstaff xor ventilationon Peter Thiemann (Univ. Freiburg) Software Engineering SWT 32 / 48

Mathematical Communication Mathematical notation has precise semantics New concepts can be defined in terms of old ones Mathematical notation is international: no language skills required Peter Thiemann (Univ. Freiburg) Software Engineering SWT 33 / 48

Completeness Every customer is either billed or prepaid. c Customers. billed(c) xor prepaid(c) For a purchase through the internet, a person is automatically registered as a new customer. internetpurchase(c) Customers := Customers { c } Is the new customer billed or prepaid? Peter Thiemann (Univ. Freiburg) Software Engineering SWT 34 / 48

Remarks Modeling is not Programming Programming is constructive Programming describes a solution Modeling is not Design Description of the entire system No description of the software No distinction between software and environment Incremental approach Goal: understanding the system Peter Thiemann (Univ. Freiburg) Software Engineering SWT 35 / 48

Different Notations Starting Point: Formal Document Transform to natural language Transform to graphical notation Objectives for Choosing a (Graphical) Notation Well-defined semantics? Is it helpful? Does it make things clearer? Peter Thiemann (Univ. Freiburg) Software Engineering SWT 36 / 48

Graphical Notation Sets and Subset / Classes and Subclasses Dogs Male Female Peter Thiemann (Univ. Freiburg) Software Engineering SWT 37 / 48

Graphical Notation Function f : A B A f B Peter Thiemann (Univ. Freiburg) Software Engineering SWT 38 / 48

Example Problem The system should control the temperature of the room. It can read the current temperature from a thermometer. If the temperature falls below a lower limit, then the heater should be switched on to raise the temperature. If it rises above an upper limit, then the air condition system should be switched on to lower the temperature. Safety condition The heater and the air condition should never be switched on at the same time. Peter Thiemann (Univ. Freiburg) Software Engineering SWT 39 / 48

Specification roomtemperature INTEGER lowerlimit INTEGER upperlimit INTEGER Peter Thiemann (Univ. Freiburg) Software Engineering SWT 40 / 48

Specification (cont) aircondition { on, off } heater { on, off } (aircondition = on) (heater = off) (heater = on) (aircondition = off) Peter Thiemann (Univ. Freiburg) Software Engineering SWT 41 / 48

Specification (cont) Turn on AC startcooling PRE aircondition = off roomtemperature > upperlimit THEN aircondition := on END Peter Thiemann (Univ. Freiburg) Software Engineering SWT 42 / 48

Tools Pretty printer, Editor Syntax checker Type checker Execizers Model checkers Interactive provers Automatic provers Peter Thiemann (Univ. Freiburg) Software Engineering SWT 43 / 48

Languages The Z Notation Developed in the late 1970 at Oxford ISO Standard since 2002 (ISO/IEC 13568:2002) Support of large user community Large number of tools available Peter Thiemann (Univ. Freiburg) Software Engineering SWT 44 / 48

Languages The B Method Simplified version of Z Goal: Provability Introduction of Refinement Industrial strength proof tools Methodological Approach Can also be used for Design and Implementation Peter Thiemann (Univ. Freiburg) Software Engineering SWT 45 / 48

Languages Other Languages... numerous! Most tools come with their own language Nearly all based on same underlying concepts Main difference: syntax... Peter Thiemann (Univ. Freiburg) Software Engineering SWT 46 / 48

ProB ProB is an animator and model checker for the B-Method Fully automatic animation of many B specifications Systematically checks a specification for a range of errors Supports model finding, deadlock checking and test-case generation Further languages supported: Event-B, CSP-M, TLA+, and Z. Developed by Michael Leuschel (Uni Düsseldorf) http://www.stups.uni-duesseldorf.de/prob/index.php5/ Main_Page Peter Thiemann (Univ. Freiburg) Software Engineering SWT 47 / 48

Summary Requirements Engineering Using Formal Methods Advantanges Clear and precise notation Makes you understand you problem Discoveres contradictions Helps you to merge requirements Makes you ask the right questions Disadvantages Notation requires some skills to master Only suitable for functional requirements Peter Thiemann (Univ. Freiburg) Software Engineering SWT 48 / 48