Requirements Techniques, cont. Brief review Formal Requirements Techniques –Finite State Machines –Petri Nets.

Slides:



Advertisements
Similar presentations
Techniques to analyze workflows (design-time)
Advertisements

Based on: Petri Nets and Industrial Applications: A Tutorial
Interaction Modeling for Testing We would generate the test cases based on our understanding of the interactions that may happen. The source is, again,
Network Protocols Dr. Eng Amr T. Abdel-Hamid NETW 703 Winter 2006 Finite State Machines (FSMs)
IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
Introduction to Software Engineering Dr. Basem Alkazemi
Petri Nets Overview 1 Definition of Petri Net C = ( P, T, I, O) Places P = { p 1, p 2, p 3, …, p n } Transitions T = { t 1, t 2, t 3, …, t n } Input.
Software Testing and Quality Assurance
1 CS 501 Spring 2008 CS 501: Software Engineering Lecture 10 Requirements 3.
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.
Capturing the requirements
CSC 402 Requirements Engineering 1 Requirements Techniques, cont. Formal requirements analysis techniques include: – DFD (covered) – ERD (covered) – Finite.
1 Gas Station and Cruise Control Specifications Ronnie Apcar Edwin Chiu Hasmik Jerejian November 2, 2000 CSCI 599 Formal Methods November 2, 2000 Concurrency.
Lecture 6 & 7 System Models.
Software Requirements
1 To introduce the concepts of user and system requirements To introduce the concepts of user and system requirements To describe functional and non- functional.
Software Engineering I 1 Formal Methods: Requirements Techniques Formal Requirements Techniques – Finite State Machines – Petri Nets.
UHD-CMS-CH101 Specification Phase Chapter Ten. UHD-CMS-CH102 SPECIFICATION DOCUMENT The specification document must be Informal enough for client Formal.
CS CS 5150 Software Engineering Lecture 10 Requirements 3.
CS CS 5150 Software Engineering Lecture 10 Requirements 3.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 5 Slide 1 Requirements engineering l The process of establishing the services that the.
S R S S ystem R equirements S pecification Specifying the Specifications.
Lecture 9 & 10: Finite Machines Anita S. Malik Adapted from Schach (2004) Chapter 11.
[ §6 : 1 ] 6. Basic Methods II Overview 6.1 Models 6.2 Taxonomy 6.3 Finite State Model 6.4 State Transition Model 6.5 Dataflow Model 6.6 User Manual.
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
UML Unified Markup Language Ziya Karakaya Atılım University, Computer Engineering
Chapter 5: Specification Yuanfang Cai CS751 Jan 29, 2003.
System Models Hoang Huu Hanh, Hue University hanh-at-hueuni.edu.vn Lecture 6 & 7.
Requirements Definition and Specification. Outline Definition and specification Natural language Semi-formal techniques –Program description languages.
Introduction to Formal Methods Based on Jeannette M. Wing. A Specifier's Introduction to Formal Methods. IEEE Computer, 23(9):8-24, September,
Ch. 51 Specification. Ch. 52 Outline Discussion of the term "specification" Types of specifications –operational Data Flow Diagrams (Some) UML diagrams.
CS CS 5150 Software Engineering Lecture 10 Requirements 3.
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
CSC 395 – Software Engineering Lecture 28: Classical Analysis -or- Do You Really Want to Do That?
7 Systems Analysis and Design in a Changing World, Fifth Edition.
1 Qualitative Reasoning of Distributed Object Design Nima Kaveh & Wolfgang Emmerich Software Systems Engineering Dept. Computer Science University College.
Petri Nets Invented by Carl Adam Petri in 1962 Concurrent systems with timing problems  Synchronization, race problem, deadlock A petri net consists of.
Week 7 - Systems Engineering and Analysis
Week 3: Requirement Analysis & specification
1 CS 501 Spring 2004 CS 501: Software Engineering Lecture 9 Requirements 3.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Requirements Analysis
Requirement Analysis SOFTWARE ENGINEERING. What are Requirements? Expression of desired behavior Deals with objects or entities, the states they can be.
1 Specification A broad term that means definition Used at different stages of software development for different purposes Generally, a statement of agreement.
Daniel Amyot, University of Ottawa Based on Powerpoint slides by Gunter Mussbacher (2009) with material from: Jo Atlee, Dan Berry (both University of Waterloo);
1 CEN 4020 Software Engineering PPT4: Requirement analysis.
CS 5150 Software Engineering Lecture 9 Requirements 3.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 11 Requirements III.
CS 501: Software Engineering Fall 1999 Lecture 15 Object-Oriented Design I.
1 7 Systems Analysis and Design in a Changing World, 2 nd Edition, Satzinger, Jackson, & Burd Chapter 7 The Object-Oriented Approach to Requirements.
1 Software Requirements Descriptions and specifications of a system.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 6 Slide 1 Software Requirements (utvalgte foiler fra Kap 6 og 7 i Sommerville)
Winter-Spring 2001Codesign of Embedded Systems1 Essential Issues in Codesign: Models Part of HW/SW Codesign of Embedded Systems Course (CE )
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Requirements Specification
Modeling for Testing Interactions
Requirements Techniques, cont.
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
1.3 Finite State Machines.
CSS 496 Business Process Re-engineering for BS(CS)
Dr. Eng Amr T. Abdel-Hamid
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
System Requirements Specification
UML Activity Diagrams & State Charts
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Essential Issues in Codesign: Models
Petri Nets Laurie Frazier.
Presentation transcript:

Requirements Techniques, cont. Brief review Formal Requirements Techniques –Finite State Machines –Petri Nets

Requirements Describe the “What” not the “How” –about phenomena of the appl. domain (not the machine) Requirements documents –Serve as a contract between client and developer –Identify functional capabilities of a system –Identify non-functional and environmental constraints A variety of techniques can be used to develop requirements specifications –natural language, data-flow diagrams, ER diagrams, etc...

Finite State Machines A requirements technique for modeling the states and transitions of a software system Finite state machines are used in other contexts –automata theory and compilers, for example More precise than data-flow diagrams –since data-flow diagrams specify only the nature of a system’s data flow (e.g. the what and the where) –whereas finite state machines provide information on how a system progresses from state to state

Formal Definition The definition of a finite state machine (FSM) consists of five parts –a set of states –a set of inputs –a transition function –the initial state –a set of final states

Simple Example States of a combination lock for a safe –Safe has a dial with three positions (1, 2, & 3) –The dial can be turned in two possible directions At any point six possible motions –Turn left to 1 (1L) –Turn right to 1 (1R) –etc... –Combination is 1L, 3R, 2L –The possible states include the safe being locked and unlocked, sounding the alarm, and the steps along the combination (e.g. 1L and 3R)

Example, cont. Set of States (Locked, A, B, Unlocked, Alarm) Set of Inputs (1L, 1R, 2L, 2R, 3L, 3R) Transition Function (next two slides) Initial State (Locked) Final States (Unlocked, Alarm)

Transition Table Input 1L 1R 2L 2R 3L 3R Locked A Alarm A B B Unlocked

Finite State Machine Wrap-Up More advanced examples in other textbooks –The infamous “Elevator Example” is a good one (Schach) Demonstrates –The specification power of FSMs Typical Problem –The number of states and transitions grows rapidly in large systems –Approach: decompose problem into smaller subsystems Tool support exists for this and related techniques (e.g. statecharts)

Petri Nets A formal technique suited for specifying the properties of concurrent or multithreaded systems Typical concurrency problems –race conditions X accesses Y before Z updates it –deadlock X is waiting on Y which is waiting on X Petri nets can be used to help avoid ambiguity in specifications that can lead to this class of problems in multithreaded systems

Formal Definition of Petri Nets A Petri net consists of four parts –A set of places –A set of transitions –An input function –An output function In the subsequent diagrams, the input and output functions are represented by arrows

Petri Net Parts Place Transition Token

Firing a transition A transition fires when it has a token at each input place; as a result a token is placed at each output place.

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server Three events; one being received

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server An event gets generated

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server An event gets processed; waiting event must wait since “Send Event” cannot fire.

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server Another event gets generated

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server The client notifies the server

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server An event is sent...

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server Second event is processed...

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server The client notifies the server

Example, cont. Event GeneratorEvent WaitingEvent ReceivedEvent Processed Client Ready Generate Event Send Event Process Event Notify Server Final event is sent...and eventually processed (ghost token)

Petri Net Wrap-Up Clean notation for specifying concurrent properties Graphical notation hides underlying formalism –Makes it easier to understand Tool support and execution engines exists for this technique –The latter can help in testing how well a Petri net specifies a property by running it on test cases