 Dr. Vered Gafni 1 Modeling Real-Time Systems.  Dr. Vered Gafni 2 Behavioral Model (Signature, Time) Signature: v 1 :D 1, v 2 :D 2,…,v n :D n S = (D.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Peer-to-peer and agent-based computing Basic Theory of Agency (Contd)
Modeling Software Systems Lecture 2 Book: Chapter 4.
Modelos de Computação Básicos Prof. Dr. César Augusto Missio Marcon Parcialmente extraído de trabalhos de Axel Jantch, Edward Lee e Alberto Sangiovanni-Vincentelli.
Andrew C. Samuels, Information Technology Specialist Trainer c/o Ministry of Education Mona High School, Kingston, Jamaica 1 Problem Solving Section 2:
Vered Gafni – Formal Development of Real Time Systems 1 Statecharts Semantics.
Vered Gafni, The Design Language of Statecharts.
Dr. Vered Gafni – Real time systems development by the formal approach 1 The Design Language of Statecharts.
Formal Semantics of Programming Languages 虞慧群 Topic 6: Advanced Issues.
Parallel and Distributed Simulation
Hybrid System Verification Synchronous Workshop 2003 A New Verification Algorithm for Planar Differential Inclusions Gordon Pace University of Malta December.
Hybrid Systems Presented by: Arnab De Anand S. An Intuitive Introduction to Hybrid Systems Discrete program with an analog environment. What does it mean?
Timed Automata.
Software Requirements Engineering
Temporal Logics Express reactive properties (order of events in time)
More on Dynamic Models - Page L14-1 Full 2002M.E. Fayad Lesson 14: More about Dynamic Models Object- Oriented Modeling & Applications.
CSE 221: Probabilistic Analysis of Computer Systems Topics covered: Discrete random variables Probability mass function Distribution function (Secs )
1 CS 691z/791z Topics in Software Engineering Chapter 13: Activity Diagrams & Chapter 19: Basic Statecharts [Arlow and Neustadt, 2002] March 8, 2007.
Modeling Software Systems Lecture 2 Book: Chapter 4.
AR vs. CFSM Abdallah Tabbara. CFSM Overview 4 CFSM has: –a finite state machine part –a data computation part –a locally synchronous behavior transitions.
SATEL Semi Automatic TEsting Language University of Geneva Levi Lúcio VALID Meeting - Besançon 10/3/06.
Semantics with Applications Mooly Sagiv Schrirber html:// Textbooks:Winskel The.
EECE Hybrid and Embedded Systems: Computation T. John Koo, Ph.D. Institute for Software Integrated Systems Department of Electrical Engineering and.
SE-565 Software System Requirements More UML Diagrams.
Today’s Lecture Process model –initial & always statements Assignments –Continuous & procedural assignments Timing Control System tasks.
Lecture 4 Finite State Machine CS6133 Software Specification and Verification.
Timed UML State Machines Ognyana Hristova Tutor: Priv.-Doz. Dr. Thomas Noll June, 2007.
Spaces Dr. Samir Tartir Extracted from Principles of Concurrent and Distributed Programming, Second Edition By M. Ben-Ari.
1 Object-Oriented Modeling Using UML (2) CS 3331 Fall 2009.
Flow of Control. 2 Control Structures Control structure: An instruction that determines the order in which other instructions in a program are executed.
Benjamin Gamble. What is Time?  Can mean many different things to a computer Dynamic Equation Variable System State 2.
Software Verification 2 Automated Verification Prof. Dr. Holger Schlingloff Institut für Informatik der Humboldt Universität and Fraunhofer Institut für.
Modelling III: Asynchronous Shared Memory Model Chapter 9 by Nancy A. Lynch presented by Mark E. Miyashita.
Object-Oriented Modeling Using UML CS 3331 Section 2.3 of Jia 2003.
CS6133 Software Specification and Verification
Ch. 2. Specification and Modeling 2.1 Requirements Describe requirements and approaches for specifying and modeling embedded systems. Specification for.
Mahapatra-A&M-Fall'001 Co-design Finite State Machines Many slides of this lecture are borrowed from Margarida Jacome.
CS 367: Model-Based Reasoning Lecture 5 (01/29/2002) Gautam Biswas.
Internal Talk, Oct Executable Specifications using Message Sequence Charts Abhik Roychoudhury School of Computing National University of Singapore.
Fault-Tolerant Computing Systems #4 Reliability and Availability
Chapter 2 Fundamental Simulation Concepts
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
OMT Modeling 1. Object Model : presented by the object model and the data dictionary. 2. Dynamic Model: presented by the state diagrams and event flow.
CS3773 Software Engineering Lecture 06 UML State Machines.
Essentials of Visual Modeling w/ UML Instructor Notes
TELECOMMUNICATIONS Dr. Hugh Blanton ENTC 4307/ENTC 5307.
Dynamic Models - Page L M.E. Fayad Lesson 30: Dynamic Models Object- Oriented Modeling & Application s.
55:032 - Intro. to Digital DesignPage 1 VHDL and Processes Defining Sequential Circuit Behavior.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Controller Synthesis For Timed Automata Authors : Eugene Asarin, Oded Maler, Amir Pnueli and Joseph Sifakis Yean-Ru Chen Embedded System Laboratory of.
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
State Modeling. Introduction A state model describes the sequences of operations that occur in response to external stimuli. As opposed to what the operations.
Introduction to Simulation What is a simulation? A system that represents or emulates the behavior of another system over time; a computer simulation is.
Digital Signal Processing
Architecture Concept Documents
Lesson Outcomes Be able to identify differentiate between types of error in programs Be able to interpret error messages and identify, locate.
Finite State Machines and Statecharts
Embedded System Design Specifications and Modeling
Parallel and Distributed Simulation
Computers & Programming Languages
States.
SS 2018 Software Verification ML, state machines
Operating System Concepts
Finite State Machines and Statecharts
States.
Principles of Concurrent and Distributed Programming, Second Edition
Flow of Control.
Software design and architecture
UML State Diagrams (Ch. 29)
Presentation transcript:

 Dr. Vered Gafni 1 Modeling Real-Time Systems

 Dr. Vered Gafni 2 Behavioral Model (Signature, Time) Signature: v 1 :D 1, v 2 :D 2,…,v n :D n S = (D 1  …  D n ) (states’ space) Time: (T, , 0) Behavior:  : T  S Discrete, Continuous

 Dr. Vered Gafni 3 Signature: E - a finite set of events (env. & reactions) Time domain: T={ (R + )  |  (t 0 t 1 t 2 …): (a)t 0 =0, t i  t i+1, i=0,1,… (b)  t  R +.  i. t  t i } Timed trace over (E,T) is an  -sequence:  T = (  0,t 0 ) (  1,t 1 ) (  2,t 2 ) … where:  i  2 E, (t 0 t 1 t 2 …)  T Controller Behavioral Model: Timed Traces Controller – a set of timed traces over E and T. finite variability, non-Zenon t0t0 t1t1 t2t2 00 11 22 Event – Instantaneous occurrence

 Dr. Vered Gafni 4 Environment events Model : {P 1, P 2,…P N } where P i : {R +  D i }, i=1..N Event – Boolean relation on P i becomes true/false. E.g.,  = def tr( p j  K) then occur(  ) = {t | p j (t)  K becomes true}. Environment & Controller Events non-Zenon Controller events Model – a set of (parallel) tasks (transition systems) over a set of variables Event –Assignment of a certain variable (write memory location). TempHigh = def tr( Temp  30  )

Process properties: TrainLocation : {0..100}Km GatePosition : (0-90)  SemaphoreState : {pass, stop} Process events: Tin = def tr(TrainLocation=x I ) Tout = def tr(TrainLocation=x O ) Close! = def tr(GatePosition=0°) Open! = def tr(GatePosition=90°) Example: Railroad Crossing Controller actions: close = def GatePort:=1 open = def GatePort:=0 pass = def LightsPort:=1 stop = def LightsPort:=0 xIxI xOxO 5 E={ T in, T out, close, close!, open, open!, stop, pass }

 Dr. Vered Gafni 6 General reactive software: controller comprises a set of (concurrent) tasks. reactive behavior of a task concerns: initiation, synchronization, termination. About Controller Computations & Events Computations: Asynchronous – take observable duration (initiation<termination) Synchronous – instantaneous (initiation=termination) Simplified reactive model:  computation does not synchronize during execution  only initiation, termination are observable events

 Dr. Vered Gafni 7 Synchronous/Asynchronous Computations Formally, synchronous computation = executed in zero time, In practice, it is sufficient that the computation terminates before next environment event. Sequence of sync. computations is a sync. In practice, only finite sequences that respect “next event” rule. Finally, only the synchronous trace is of interest.

 Dr. Vered Gafni 8 System behavior: –Time step – time advances + an event set. –Reaction step – time freezes but new event set.  A trace always starts with: ( , 0)  A reaction step may follow only trace elements: ( , t) Super step – a sequence of reaction-steps (triggered actions) that follow a time step until stabilization (  =  ). Thus, a trace looks like: …  ( ,2.0)  ({p,q},3.1)  ({r},3.1)  ( ,3.1)  ({q,r},3.8)  … Synchronous trace time step reaction step time step super step

 Dr. Vered Gafni 9 Activation by occurrence of events (may occur simultaneously) t`tt`` {E 2 }{E 1 }{E 1, E 2, E 3 } In practice, observations are taken w.r.t. to a finite precision clock, hence  Discrete time (modeled by N),  Nearby events may get same time record, still order is preserved. …  ({p,q},53)  ({r},53)  ({u,w},62)  … So far: Event Driven Traces

 Dr. Vered Gafni 10 Global clock activation  signature includes periodic event ‘tick’. Events during (t i-1,t i ] considered at t i (order/repetition are lost). titi t i-1 t i+1 t i+2 E2E2 E3E3 E1E1 {E 1, E 2, E 3 } Time model N, but time-tag coincidences with index, hence represented by un-timed traces:  0  1  2 … where  i  2 E + ‘tick’ duration, Note:  k may consist of the event ‘tick’ solely. Clock Driven Execution Model

 Dr. Vered Gafni 11 Asynchronous Computation in Clock Driven Model

In practice …. 12 Clock driven synchronous model,  hence traces are untimed (time given by index) Clock + Event driven synchronous model, but external events are tagged with last RTC

 Dr. Vered Gafni 13 Hybrid Systems: continuous properties If 'pass' is accepted within 1 sec. then the speed remains steady till it exits the crossing. If 'pass' has not been accepted within 1 second then the train starts slowing down at a rate of 5m/s until 'pass' signal is accepted or otherwise until its speed zeroes. When the expected pass signal is accepted, the train accelerates again to 20m/s.

 Dr. Vered Gafni 14 Hybrid Systems: Time model & Variables Time model: T=[0,  ) - non-negative continuous (physical) time Variables Piecewise continuous (pwc)  Continuous range  Discrete range Events Non Zeno

 Dr. Vered Gafni 15 Hybrid models V = V d  V c (disjoint sets), S=D V (states, D unified domain)  E – set of events,  =2 E  flow={  |  : R   D Vc } s.t.: =  (t) is defined on interval [0,t  ] or [0,t  ), where t  >0. =  (t,v) is differentiable on (0,t  ) and lim t  t   (t,v)  D Vc trace: w 1 w 2 … s.t.:  k either: w k =((s k-1,t),,(s k,t)) -- , s k-1,s k  S, t  R  or: w k =((s k-1,t), ,(s k, t’)) -- s k-1,s k  S, t,t’  R ,  flow s.t.: s d k-1 =s d k, t’  t  t 