Information System Design IT60105

Similar documents
Embedded Systems Development

Lecture 05: High-Level Design with SysML. An Introduction to SysML. Where are we? What is a model? The Unified Modeling Language (UML)

Design and Analysis of Distributed Interacting Systems

Nondeterminism. September 7, Nondeterminism

Slides for Chapter 14: Time and Global States

Embedded Systems 2. REVIEW: Actor models. A system is a function that accepts an input signal and yields an output signal.

A Sample State Machine

Logic and Computer Design Fundamentals. Chapter 8 Sequencing and Control

Object-Oriented Analysis and Design

Embedded Systems 5. Synchronous Composition. Lee/Seshia Section 6.2

Today. Vector Clocks and Distributed Snapshots. Motivation: Distributed discussion board. Distributed discussion board. 1. Logical Time: Vector clocks

416 Distributed Systems. Time Synchronization (Part 2: Lamport and vector clocks) Jan 27, 2017

State modeling. Marlon Dumas. Institute of Computer Science

The STATEMATE Semantics of Statecharts. Presentation by: John Finn October 5, by David Harel

Opus: University of Bath Online Publication Store

Figure 10.1 Skew between computer clocks in a distributed system

Description of the ED library Basic Atoms

Formalizing Non-Concurrent UML State Machines Using Colored Petri Nets

Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1)

Outline F eria AADL behavior 1/ 78

Research Article A Polyadic pi-calculus Approach for the Formal Specification of UML-RT

Simulation of Spiking Neural P Systems using Pnet Lab

Overview. 1 Lecture 1: Introduction. 2 Lecture 2: Message Sequence Charts. Joost-Pieter Katoen Theoretical Foundations of the UML 1/32

Agreement. Today. l Coordination and agreement in group communication. l Consensus

ECS 120 Lesson 15 Turing Machines, Pt. 1

Applied Thermodynamics for Marine Systems Prof. P. K. Das Department of Mechanical Engineering Indian Institute of Technology, Kharagpur

Overview. Discrete Event Systems Verification of Finite Automata. What can finite automata be used for? What can finite automata be used for?

TRANSITION CONFLICTS DETECTION IN BINARY MODULAR STATECHART DIAGRAMS 1. Grzegorz Łabiak

Introduction to Languages and Computation

Labeled Transition Systems

EECS 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization

Object Modeling Approach! Object Modeling Approach!

Embedded Systems 6 REVIEW. Place/transition nets. defaults: K = ω W = 1

Information System Desig

Lecture 14 Finite state machines

Semantics of UML state machines

Section 6 Fault-Tolerant Consensus

Varieties of Stochastic Calculi

Nondeterministic Finite Automata

Verification of Recursive Programs. Andreas Podelski February 8, 2012

An introduction to Uppaal and Timed Automata MVP5 1

September 11, Second Part of Regular Expressions Equivalence with Finite Aut

Finite State Machines. CS 447 Wireless Embedded Systems

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc.

Worst-Case Execution Time Analysis. LS 12, TU Dortmund

6.841/18.405J: Advanced Complexity Wednesday, February 12, Lecture Lecture 3

Unit 2: Chemical Kinetics Chemistry 30

Process Algebras and Concurrent Systems

Model Checking: An Introduction

Let s now begin to formalize our analysis of sequential machines Powerful methods for designing machines for System control Pattern recognition Etc.

TESTING is one of the most important parts of the

2017/08/29 Chapter 1.2 in Sipser Ø Announcement:

GRADE 6 Projections Masters

Physics 7B-1 (A/B) Professor Cebra. Winter 2010 Lecture 2. Simple Circuits. Slide 1 of 20

Formal Verification Techniques. Riccardo Sisto, Politecnico di Torino

Algorithmic verification

A Brief Introduction to Model Checking

Realizability of Interactions in Collaboration Diagrams

Johns Hopkins Math Tournament Proof Round: Automata

ELE2120 Digital Circuits and Systems. Tutorial Note 9

Lecture 4 Event Systems

Deterministic Finite Automaton (DFA)

On the Applicability of an Interval Time Structure for Protocol Verification

The Discrete EVent System specification (DEVS) formalism

2015 MPS Qualify Exam

Termination Problem of the APO Algorithm

Semantics of S.S.M. (Safe State Machine)

London Examinations IGCSE

CHAPTER 1 Regular Languages. Contents

Lecture Notes on DC Network Theory

Interface Automata with Complex Actions - Extended Version

Causal & Frequency Analysis

CS 154, Lecture 2: Finite Automata, Closure Properties Nondeterminism,

Generation of. Polynomial Equality Invariants. by Abstract Interpretation

Chapter 5. Finite Automata

COMPRESSED STATE SPACE REPRESENTATIONS - BINARY DECISION DIAGRAMS

Clock Synchronization

Hybrid Systems Modeling, Analysis and Control

Finite Automata. Seungjin Choi

Abstractions and Decision Procedures for Effective Software Model Checking

Logical Time. 1. Introduction 2. Clock and Events 3. Logical (Lamport) Clocks 4. Vector Clocks 5. Efficient Implementation

ENGG 225. David Ng. Winter January 9, Circuits, Currents, and Voltages... 5

Synthesizing Asynchronous Burst-Mode Machines without the Fundamental-Mode Timing Assumption

CS5371 Theory of Computation. Lecture 9: Automata Theory VII (Pumping Lemma, Non-CFL, DPDA PDA)

A Note on Turing Machine Design

Time and Schedulability Analysis of Stateflow Models

Asymmetric Communication Complexity and Data Structure Lower Bounds

An object-oriented design process. Weather system description. Layered architecture. Process stages. System context and models of use

Distributed Systems Principles and Paradigms. Chapter 06: Synchronization

Finite-State Model Checking

Theory of Computation Prof. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute Of Technology, Madras

A Foundation for Dynamic Workflow Patterns

CHAPTER 1: Graphs, Functions, and Models

Finite Automata. Mahesh Viswanathan

Requirements Validation. Content. What the standards say (*) ?? Validation, Verification, Accreditation!! Correctness and completeness

Double Header. Model Checking. Model Checking. Overarching Plan. Take-Home Message. Spoiler Space. Topic: (Generic) Model Checking

or 0101 Machine

Resultant Forces 1 of 17 Boardworks Ltd 2016

Chandy-Lamport Snapshotting

Transcription:

n IT60105 Lecture 13 Statechart Diagrams

Lecture #13 What is a Statechart diagram? Basic components in a state-chart diagram and their notations Examples: Process Order in OLP system

What is a Statechart Diagram? A state-chart diagram is used to model the dynamic aspects of the system. The basic idea is same as the state machine in Finite Automata We can draw state diagrams for each object involved in the system An object may be in several states of its life time. When a message arrives to an object (event) it undergoes certain operations (action) or changes its state A state diagram shows how an object will react to the arrival of an event Each reaction may be a sequence of actions, possibly accompanied by a transition from one named state to another An event represents the receipt of a signal, or the effect of an operation call An action represents the sending of a signal, or the call of an operation

General Structure of a Statechart Diagram A statechart diagram typically look like this s i m p l e s t a t e S t a t e 1 S t a t e 2 E v e n t 1 / A c t i o n A i n i t i a l s t a t e E v e n t 2 [ g u a r d ] / A c t i o n B E v e n t 3 S t a t e 3 c o m p o s i t e s t a t e f i n a l s t a t e

Basic Components in a Statechart Diagram Two basic elements are there Rounded rectangle box representing the state N a m e Labeled arrow indicating the transitions E v e n t [ g u a r d c o n d i t i o n ] [ / A c t i o n ] Here, event is the message that is sent guard condition is the Boolean expression of attribute values that allows a state transition only if the condition is true An action is the behavior that occurs when the state transition occurs

Detail State in a State-Chart Diagram Detail of state is shown below E v e n t / A c t i o n B N a m e S t a t e V a r i a b l e s E n t r y / A c t i o n A S t a t e 1 E x i t / A c t i o n C i n t e r n a l a c t i v i t i e s E n t r y / A c t i o n A E v e n t / A c t i o n B E x i t / A c t i o n C Entry actions: that are common to every incoming transition Exit actions: that are common to every outgoing transition Self-transition: action within the state itself If there is no guard or if the guard is true, then for the event the actions will be followed and it can enter [exit] to [from] a state or remain in the same state 14 September, 200

Example: Stack Machine

Example: Statechart Diagram In the Process Order use case, the object that is being manipulated is, namely, ORDER. So, a state diagram can be drawn to model how the object changes its state in this particular use case O r d e r a r r i v e s O r d e r i n q u e u e O r d e r c h e c k f a i l e d O r d e r c h e c k v a l i d R e j e c t e d o r d e r A c c e p t e d o r d e r O u t o f s t o c k W a i t i n g o r d e r I n s t o c k S u p p l y a r r i v e s O r d e r c o n f i r m e d

Statechart Diagram: Another Example Suppose, a COURSE is an object in a usual Course Registration use case (consider the SEIIT). Following is a state diagram to model the behavioral view of the object COURSE P r o p o s e C o u r s e o f f e r W i t h i n d e a d l i n e S c h e d u l e C o u r s e o p e n f o r r e g i s t r a t i o n C o u r s e a s s i g n e d D i s p a l y E n r o l l W i t h d r a w L a s t d a t e C o u r s e f u l l F u l l C l o s e c o u r s e r e g i s t r a t i o n S t u d e n t d r o p p e d V a c c a n c y e x i s t C o u r s e b e i n g t a u g h t S e s s i o n s t a r t e d E v a l u a t i o n / S e s s i o n e n d D i s p l a y m a r k s F e e d b a c k

Advantages of Statechart Diagram A statechart diagram is used to model how the state of an object changes in its life time Statechart diagrams are good describing how the behavior of an object change across several use case executions However, if we are interested in modeling some behavior that involves the several objects collaborating with each other, the statechart diagram is not appropriate

Example: Microwave Oven

More features in Statechart Diagram

Choice Pseudo-State A choice pseudo-state is shown as a diamond with one transition arriving and two or more transitions leaving. The following diagram shows that whichever state is arrived at after the choice pseudo-state is dependent on the message format selected during execution of the previous state

Choice Junction-State Junction pseudo-states are used to chain together multiple transitions. A single junction can have one or more incoming and one or more outgoing transitions and a guard can be applied to each transition. Junctions are semantic-free; a junction which splits an incoming transition into multiple outgoing transitions realizes a static conditional branch as opposed to a choice pseudo-state which realizes a dynamic conditional branch

History State A History State is used to remember the previous state of a state machine when it was interrupted. The following diagram illustrates the use of history states. The example is a state machine belonging to a washing machine

Concurrent State A state may be divided into regions containing sub-states that exist and execute concurrently. The example below shows that within the state "Applying Brakes", the front and rear brakes will be operating simultaneously and independently. Notice the use of fork and join pseudostates rather than choice and merge pseudo-states. These symbols are used to synchronize the concurrent threads