UNIT V STATES, STATE GRAPHS, AND TRANSITION TESTING STATE GRAPHS

Slides:



Advertisements
Similar presentations
Recognising Languages We will tackle the problem of defining languages by considering how we could recognise them. Problem: Is there a method of recognising.
Advertisements

Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Finite Automata with Output
Lecture 6 & 7 System Models.
© 2005 by Prentice Hall Chapter 9 Structuring System Requirements: Logic Modeling Modern Systems Analysis and Design Fourth Edition.
 A data processing system is a combination of machines and people that for a set of inputs produces a defined set of outputs. The inputs and outputs.
Software Testing Techniques By Sudhakar yadav Compiled with reference from: Software Testing Techniques: Boris Beizer Software Testing Techniques: Boris.
Mechanics Copyright © Software Carpentry 2010 This work is licensed under the Creative Commons Attribution License See
Computer Systems Week 10: File Organisation Alma Whitfield.
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 3 Windows File Management 1 Morrison / Wells / Ruffolo.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
System software operating system 1.
Finite-State Machines with No Output Longin Jan Latecki Temple University Based on Slides by Elsa L Gunter, NJIT, and by Costas Busch Costas Busch.
Finite-State Machines with No Output
程建群 博士(Dr. Jason Cheng) 年03月
Chapter Four UNIX File Processing. 2 Lesson A Extracting Information from Files.
What is software testing? 1 What are the problems of software testing? 2 Time is limited Applications are complex Requirements are fluid.
Relational Databases (MS Access)
File System Interface. File Concept Access Methods Directory Structure File-System Mounting File Sharing (skip)‏ File Protection.
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
Software Engineering Lecture 8 Object-Oriented Analysis.
CSCI 115 Chapter 8 Topics in Graph Theory. CSCI 115 §8.1 Graphs.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
Chapter - 11 STATES, STATE GRAPHS, AND TRANSITION TESTING.
Domain Testing Overview The domain-testing strategy is simple, and possibly tedious. 1. Domains are defined by their boundaries; therefore, domain testing.
1 Test Coverage Coverage can be based on: –source code –object code –model –control flow graph –(extended) finite state machines –data flow graph –requirements.
9NL Ayomi Hasenclever.  You cant touch a software  It is stored in a computer or laptop  Allows the hardware to do something useful, without the software.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Decoder Chapter 12 Subject: Digital System Year: 2009.
Lecture 14: Theory of Automata:2014 Finite Automata with Output.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Department of Software & Media Technology
1 Team Skill 3 Defining the System Part 1: Use Case Modeling Noureddine Abbadeni Al-Ain University of Science and Technology College of Engineering and.
Identify internal hardware devices (e. g
Capabilities, Minimization, and Transformation of Sequential Machines
CompSci 280 S Introduction to Software Development
3.3 Fundamentals of data representation
BİL711 Natural Language Processing
Application: Digital Logic Circuits
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
Chapter - 12 GRAPH MATRICES AND APPLICATIONS.
Finite State Machines Dr K R Bond 2009
ANALYSIS OF SEQUENTIAL CIRCUITS
ISP Coverage Criteria CS 4501 / 6501 Software Testing
Signals and systems By Dr. Amin Danial Asham.
5 Systems of Linear Equations and Matrices
Winners Cheque Analysis
STATES, STATE GRAPHS, AND TRANSITION TESTING
Process & Logic Modeling
A First Course on Kinetics and Reaction Engineering
Equivalence, DFA, NDFA Sequential Machine Theory Prof. K. J. Hintz
Some slides by Elsa L Gunter, NJIT, and by Costas Busch
Chapter 9 Structuring System Requirements: Logic Modeling
Chapter 14 Normalization – Part I Pearson Education © 2009.
SME1013 PROGRAMMING FOR ENGINEERS
Chapter 1 Introduction(1.1)
ISP Coverage Criteria CS 4501 / 6501 Software Testing
SME1013 PROGRAMMING FOR ENGINEERS
Dynamic Modeling Lecture # 37.
Test Case Test case Describes an input Description and an expected output Description. Test case ID Section 1: Before execution Section 2: After execution.
DESIGN OF SEQUENTIAL CIRCUITS
CSE 370 – Winter Sequential Logic-2 - 1
Chapter 9 Structuring System Requirements: Logic Modeling
Copyright © Cengage Learning. All rights reserved.
EGR 2131 Unit 12 Synchronous Sequential Circuits
Chapter5: Synchronous Sequential Logic – Part 3
Presentation transcript:

UNIT V STATES, STATE GRAPHS, AND TRANSITION TESTING STATE GRAPHS 5.1 States: A combination of circumstances or attributes belonging for the time being to a person or thing

A program that detects the character sequence ―ZCZC can be in the following states: 1. Neither ZCZC nor any part of it has been detected. 2. Z has been detected. 3. ZC has been detected. 4. ZCZ has been detected. 5. ZCZC has been detected

A moving automobile whose engine is running can have the following states with respect to its transmission: 1. Reverse gear 2. Neutral gear 3. First gear 4. Second gear 5. Third gear 6. Fourth gear

A person‘s cheque book can have the following states with respect to the bank balance: 1. Equal 2. Less than 3. Greater than A word processing program menu can be in the following states with respect to file manipulation: 1. Copy document 2. Delete document 3. Rename document 4. Create document 5. Compress document 6. Copy disc 7. Format disc 8. Backup disc 9. Recover from backup

States are represented by nodes. States are numbered or may be identified by or whatever else is convenient. A state graph and its associated state table are useful models for describing software (program) behavior A state graph is a graphical representation of the program (its FSM) in terms of states, transitions, inputs and outputs (erroneous or normal).

5.2 Inputs and Transitions: Whatever is being modeled is subjected to inputs. As a result of those inputs, the state changes, or is said to have made a transition. Transitions are denoted by links that join the states. The input that causes the transition are marked on the link; that is, the inputs are link weights. There is one outlink from every state for every input.

A finite-state machine is an abstract device that can be represented by a state graph having a finite number of states and a finite number of transitions between states. The ZCZC detection example can have the following kinds of inputs: 1. Z 2. C 3. Any character other than Z or C, which we‘ll denote by A

5.3Outputs An output can be associated with any link. Outputs are denoted by letters or words and are separated from inputs by a slash as follows: ―input/output.

GOOD STATE GRAPHS AND BAD The total number of states is equal to the product of the possibilities of factors that make up the state. 2. For every state and input there is exactly one transition specified to exactly one, possibly the same state.

3. For every transition there is one output action specified 3. For every transition there is one output action specified. That output could be trivial, but at least one output does something sensible. 4. For every state there is a sequence of inputs that will drive the system back to the same state.

State Bugs i)Number of States The number of states in a state graph is the number of states we choose to recognize or model 1. Identify all the component factors of the state. 2. Identify all the allowable values for each factor. 3. The number of states is the product of the number of allowable values of all the factors.

ii) Impossible States Some combinations of factors may appear to be impossible. Say that the factors are: GEAR R, N, 1, 2, 3, 4 = 6 factors DIRECTION Forward, reverse, stopped = 3 factors ENGINE Running, stopped = 2 factors TRANSMISSION Okay, broken = 2 factors ENGINE Okay, broken = 2 factors TOTAL = 144 states

But broken engines can‘t run, so the combination of factors for engine condition and engine operation yields only 3 rather than 4 states. Therefore, the total number of states is at most 108 iii) Equivalent States Two states are equivalent if every sequence of inputs starting from one state produces exactly the same sequence of outputs when started from the other state

Transition Bugs Unspecified and Contradictory Transitions 1.Every input-state combination must have a specified transition. If the transition is impossible, then there must be a mechanism that prevents that input from occurring in that state—look for it 2.Exactly one transition must be specified for every combination of input and state