Review n System dynamics : A sequence of state transition n model : A set of rules for state transition System S X Y Discrete event system FSM (Automata)

Slides:



Advertisements
Similar presentations
Embedded System, A Brief Introduction
Advertisements

Language and Automata Theory
1 SE-561 Formal Methods in Software Petri Nets - I.
An Introduction to Petri Nets
Principles of Engineering System Design Dr T Asokan
Introduction to Petri Nets Hugo Andrés López
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,
TOPIC : Finite State Machine(FSM) and Flow Tables UNIT 1 : Modeling Module 1.4 : Modeling Sequential circuits.
SOFTWARE TESTING. INTRODUCTION  Software Testing is the process of executing a program or system with the intent of finding errors.  It involves any.
Modeling & Simulation. System Models and Simulation Framework for Modeling and Simulation The framework defines the entities and their Relationships that.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
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.
CS447/ECE453/SE465 Prof. Alencar University of Waterloo 1 CS447/ECE453/SE465 Software Testing Tutorial Winter 2008 Based on the tutorials by Prof. Kontogiannis,
CP — Concurrent Programming 12. Petri Nets Prof. O. Nierstrasz Wintersemester 2005 / 2006.
Modeling Worldviews Activity Scanning – Petri Nets and Event Graphs Event Scheduling – Event Graphs State Machines Process Interaction –Block Flow Diagrams.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
Software Engineering, COMP201 Slide 1 Protocol Engineering Protocol Specification using CFSM model Lecture 30.
Models of Computation for Embedded System Design Alvise Bonivento.
Simulation Waiting Line. 2 Introduction Definition (informal) A model is a simplified description of an entity (an object, a system of objects) such that.
Lab 01 Fundamentals SE 405 Discrete Event Simulation
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
02/06/05 “Investigating a Finite–State Machine Notation for Discrete–Event Systems” Nikolay Stoimenov.
Review. A_DA_A Ball_A Ball_B player_A B_DB_A Ball_B Ball_A player_B Ball_A Ball_B A_A, B_DA_D, B_A Ball_A Ball_B CFSM Player_A  : X  S  S X A = {Ball_A}
Capacity analysis of complex materials handling systems.
An Introduction to Petri Nets Marjan Sirjani Formal Methods Laboratory University of Tehran.
Modeling with ordinary Petri Nets Events: Actions that take place in the system The occurrence of these events is controlled by the state of the system.
Modelling III: Asynchronous Shared Memory Model Chapter 9 by Nancy A. Lynch presented by Mark E. Miyashita.
An Ontological Framework for Web Service Processes By Claus Pahl and Ronan Barrett.
Stochastic Activity Networks ( SAN ) Sharif University of Technology,Computer Engineer Department, Winter 2013 Verification of Reactive Systems Mohammad.
Why building models? n Cannot experience on the real system of interest n Cost n Danger n The real system does not exist Why using simulation? n Reduced.
Submodule construction in logics 1 Gregor v. Bochmann, University of Ottawa Using First-Order Logic to Reason about Submodule Construction Gregor v. Bochmann.
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
Modelling by Petri nets
Chapter 3 System Performance and Models Introduction A system is the part of the real world under study. Composed of a set of entities interacting.
School of Computer Science, The University of Adelaide© The University of Adelaide, Control Data Flow Graphs An experiment using Design/CPN Sue Tyerman.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
OPERATING SYSTEMS CS 3530 Summer 2014 Systems and Models Chapter 03.
School of Computer Science & Software Engineering
Introduction to discrete event systems
DEVS-based Modeling and Simulation References: 1.B. P. Zeigler, Hessam S. Sarjoughian, Introduction to DEVS Modeling and Simulation with JAVA: Developing.
Approach and Techniques for Building Component-based Simulation Models Bernard P. Zeigler, Ph.D. Hessam S. Sarjoughian, Ph.D. Arizona Center for Integrative.
ECE 448 Lecture 6 Finite State Machines State Diagrams vs. Algorithmic State Machine (ASM) Charts.
High Performance Embedded Computing © 2007 Elsevier Lecture 4: Models of Computation Embedded Computing Systems Mikko Lipasti, adapted from M. Schulte.
Petri-Nets and Other Models
Introduction The objective of simulation – Analysis the system (Model) Analytically the model – a description of some system intended to predict the behavior.
A SUPPORT TOOL FOR THE REACHABILITY AND OTHER PETRI NETS- RELATED PROBLEMS AND FORMAL DESIGN AND ANALYSIS OF DISCRETE SYSTEMS Department of Computers and.
Simulation Examples And General Principles Part 2
Beyond Scenarios: Generating State Models from Use Cases An approach for the synthesis of State transition graphs from Use Cases Supporting Use Cases Based.
SOFTWARE TESTING LECTURE 9. OBSERVATIONS ABOUT TESTING “ Testing is the process of executing a program with the intention of finding errors. ” – Myers.
Turing Machine Model Are there computations that no “reasonable” computing machine can perform? –the machine should not store the answer to all possible.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Lecture #17: Clocked Synchronous State-Machine Analysis
Requirements Techniques, cont.
Introduction to Advanced Digital Design (14 Marks)
Dr. Eng Amr T. Abdel-Hamid
Introduction Introduction to VHDL Entities Signals Data & Scalar Types
2. Specification and Modeling
Clockless Computing COMP
Model-Based Testing Model the system
Discrete Event Simulation
Language and Automata Theory
Stochastic Activity Networks
CAP 4800/CAP 5805: Computer Simulation Concepts
CAP 4800/CAP 5805: Computer Simulation Concepts
Approach and Techniques for Building Component-based Simulation Models
Concepts In Discrete-Event Simulation
An Introduction to Petri Nets
CAP 4800/CAP 5805: Computer Simulation Concepts
Performance evaluation of manufacturing systems
Presentation transcript:

Review

n System dynamics : A sequence of state transition n model : A set of rules for state transition System S X Y Discrete event system FSM (Automata) Digital system Differential equation Continuous system Difference equation Discrete Time System(sampled-data circuit) DiscreteDiscrete ContinuousContinuous ContinuousDiscrete S T System dynamics paradigms

Simulator: Event Processor DEVS: discrete event System DEVS model time to next event, state at next event... DTSS: difference equation Simulator: Recursive Algorithm System DTSS model: q(t+1) = a*q(t)+ b*x(t) DESS: differential equation System Specification: System Simulator: Numerical Integrator DESS model: dq/dt = a*q +bx Dynamic Systems representations

Systems theoretical modelling n Behavioral models: ‘Black boxes’. Define input/output behavior. Representation of observable and non-observable variables. n Structural models: ‘White boxes’. Represent system structure. Decomposition and coupling. Refers to elements in a model as opposed to the behavior it generates. n Different formalisms derived from these ideas.

Component: viewed as a model with inputs and outputs. It has internal structure which dictates how inputs/states are transformed to outputs. states functions INTERNAL STRUCTURE inputsoutputs Components are coupled together to create models which themselves can be components in larger models Component definition

n To capture system’s dynamics, we need to represent states and how they change over time, autonomously and in response to external events: Inputs States Outputs Time it takes for an activity to be completed Internal Dynamics Component system dynamics

FSM = X : input set Y : output set S : state set , : functions with the following constrains –X, Y, S : finite sets –  : X * S  S – : S  Y : Moore machine : X * S  Y : Mealy machine S  x y * Untimed discrete event system Finite State Machines

n Banking-system (Queue+Server) Queue in Server out (1) Conceptual Model components descriptive variables - c.f) state variables dependency: interaction between components (i) Descriptive variable - Queue length: [0... N] ‘queue.length = n’ n customers in the waiting line - Tellers’s status: [Busy, Free] (ii) Interaction with outside world When a customer arrives: System puts it in the queue Serve customer (in some specified time) Send customer out Example : FSM modeling

(2) Formal model specification: M = From informal description, the following should be specified (i) Identify X, Y, S (ii) State transition (iii) Output function (3) Case I : state : Queue length M = X = {in} Y = {out} S = {queue.length in [0, N]}  : X * S  S  (in, n) = n+1 for all n<N (Notice there is no out in transition function!) : S  Y (n  0) = out Problem : Queue.length never decreases  solution : introduce a feedback to notify that a customer is leaving 012n in out FSM formal definition

M = X = {in, done} Y = {out} done = out S = {queue.length in [0,N]}  : X * S  S  (in, n) = n+1 for all 0  n <N  (done, n) = n-1 for all 0 < n  N : S  Y (n  0) = out Queuein out * Feedback * 012N in out done ‘done’ is introduced by feedback Modified formal definition: queue done

Case II : state : Server state M = X = {in, done} Y = {out} done= out S = server.status in [B,F]  : X * S  S  (in, B) = B  (in, F) = B  (done, B) = B if queue.length > 1 F if queue.length <= 1  (done, F) = N/A : S  Y (S=B) = out B F in done  (|q|  1) in done  (|q|>1) Formal definition: server out Queue in Server out * Feedback * done in done out

 : X * S  S S = {(queue.length, Server.status) | queue.length is in [0.. N] and Server.status  {B, F}} in done Server.status B F queue.length1230NN-1N-2N-3 out : undefined state CFSM. State set: server + queue

player_A = player_B = n X A = {Ball_B} n Y A = {Ball_A} n S A = {A_A, A_D}  A, A : exercise n X B = {Ball_A} n Y B = {Ball_B} n S B = {B_A, B_D}  B, B : exercise A_DA_A Ball_BBall_A Ball_B player_A B_DB_A Ball_A Ball_B Ball_A player_B Ex. Synchronous Machine of ping-pong players

A_DA_A Ball_A Ball_B player_A B_DB_A Ball_B Ball_A player_B Ball_A Ball_B A_A, B_DA_D, B_A Ball_A Ball_B CFSM Player_A  : X  S  S X A = {Ball_A}  {  }  : internal event A_AA_D /Ball_A A_AA_D  Ball_A feedback CFMS for the ping-pong example A_AA_D Ball_B Ball_A Ball_B 

Introduction to Petri Nets Bipartite graph: Two types of nodes: Places and Transitions. Links connecting nodes. Two basic concepts in PN modeling –Events (Transitions) – actions to be taken place by states of a system each event associated with pre-/post-condition –Conditions (Places) – predicates or logical expression of states of a system pre- and post-condition

Petri Nets (cont.) n Places: model system states. n Transitions: model events n Legal/illegal connections in the graph Legal connectionIllegal connection

Formal specification of PN PN = P ; a finite set of places T ; a finite set of transitions I : T  P  ; input function (ex: I(t i ) = {p 1, p 1, p 2 } ) O : T  P  ; output function (ex: O(t j ) = {p 2, p 3 } ) n Input / Output places p i  I(t j )=>p i is an input place of t j p l  O(t m )=>p l is an output place of t m

Example –PN = P = {p 1, p 2, p 3 } T = {t 1, t 2 } I(t 1 ) = {p 1, p 2, p 3 ) O(t 1 ) = {p 2, p 3, p 3 } I(t 2 ) = {p 3 } O(t 2 ) = {p 1, p 1 } p1p1 p2p2 p3p3 t2t2 t1t1

Petri nets execution n Dynamic properties analysis n New entity: token n Marked Petri net n Transition firing: enabled transition (instantaneous) n Simultaneously activated transitions: non-deterministic firing

–[ Notation ] # of inputs from P i to t j : #(P i, I(t j )) # of outputs from t j to P i : #(P i, O(t j )) Ex)#(P 5, I(t 2 )) = 1 #(P 2, O(t 2 )) = 0 #(P 2, I(t 2 )) = 2 n State representation : Marked PN –Formalism MPN =  : marking function  : P  N (Positive Integer) or defined as a vector (  1,  2,...,  |P| ) Ex) Marking  =  (P 1 ) =  (P 4 ) = 0  (P 2 ) =  (P 3 ) = 1  (P 5 ) = 3 t1t1 t2t2 t3t3 t4t4 Petri nets execution P1 P2 P3 P4 P5

Fire t j tjtj tjtj EnableNot Enable  = (2, 1, 3, 0)  = (2, 0, 1, 2)  (p)  ’(p)=  (p)  (p)  ’(p)=  (p)  (p)  ’(p)=  (p)+1  (p)  ’(p)=  (p)-1  (p)  ’(p)=  (p)-2  (p)  ’(p)=  (p)+1 Petri Net Dynamics (Example)

Modeling Example: A Simple Computer System p1p1 t1t1 p2p2 p4p4 t2t2 t3t3 p3p3 t4t4 [1,0,0,0] [1,1,0,0] [1,2,0,0][0,0,1,0] t1t1 t1t1 t2t2 [0,1,1,0][1,0,0,1] t1t1 t3t3 … …… (user req.) (CPU start) (CPU end) (CPU ans.)