D. Harel, Statecharts: A visual formalism for complex systems, Science of Computer Programming 8, 1987, pp

Similar documents
Minimal DFA. minimal DFA for L starting from any other

GNFA GNFA GNFA GNFA GNFA

STATECHARTS: A Visual Formalism for Complex Systems

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Designing finite automata II

2.4 Linear Inequalities and Interval Notation

CS103B Handout 18 Winter 2007 February 28, 2007 Finite Automata

Special Numbers, Factors and Multiples

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

Surface maps into free groups

List all of the possible rational roots of each equation. Then find all solutions (both real and imaginary) of the equation. 1.

1. For each of the following theorems, give a two or three sentence sketch of how the proof goes or why it is not true.

Math Lecture 23

Bases for Vector Spaces

Homework 3 Solutions

CS 310 (sec 20) - Winter Final Exam (solutions) SOLUTIONS

Section 6: Area, Volume, and Average Value

1 Nondeterministic Finite Automata

Let's start with an example:

Basic Derivative Properties

Chapter Five - Eigenvalues, Eigenfunctions, and All That

Properties of Integrals, Indefinite Integrals. Goals: Definition of the Definite Integral Integral Calculations using Antiderivatives

Lecture 2e Orthogonal Complement (pages )

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

State Minimization for DFAs

Chapter 2 Finite Automata

3 Regular expressions

Convert the NFA into DFA

Vidyalankar S.E. Sem. III [CMPN] Discrete Structures Prelim Question Paper Solution

Ch. 24 Molecular Reaction Dynamics 1. Collision Theory 2. Diffusion-Controlled Reaction

APPENDIX. Precalculus Review D.1. Real Numbers and the Real Number Line

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

If we have a function f(x) which is well-defined for some a x b, its integral over those two values is defined as

Finite Automata-cont d

NFA DFA Example 3 CMSC 330: Organization of Programming Languages. Equivalence of DFAs and NFAs. Equivalence of DFAs and NFAs (cont.

More on automata. Michael George. March 24 April 7, 2014

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

Designing Information Devices and Systems I Discussion 8B

Math 211A Homework. Edward Burkard. = tan (2x + z)

VII. The Integral. 50. Area under a Graph. y = f(x)

Lecture 08: Feb. 08, 2019

Infinite Geometric Series

Consolidation Worksheet

The Fundamental Theorem of Calculus. The Total Change Theorem and the Area Under a Curve.

How do we solve these things, especially when they get complicated? How do we know when a system has a solution, and when is it unique?

5.1 How do we Measure Distance Traveled given Velocity? Student Notes

Definite Integrals. The area under a curve can be approximated by adding up the areas of rectangles = 1 1 +

Assignment 1 Automata, Languages, and Computability. 1 Finite State Automata and Regular Languages

AT100 - Introductory Algebra. Section 2.7: Inequalities. x a. x a. x < a

EECS 141 Due 04/19/02, 5pm, in 558 Cory

Lecture 2: January 27

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

CSE : Exam 3-ANSWERS, Spring 2011 Time: 50 minutes

5.2 Exponent Properties Involving Quotients

Strong Bisimulation. Overview. References. Actions Labeled transition system Transition semantics Simulation Bisimulation

378 Relations Solutions for Chapter 16. Section 16.1 Exercises. 3. Let A = {0,1,2,3,4,5}. Write out the relation R that expresses on A.

Simplifying Algebra. Simplifying Algebra. Curriculum Ready.

13: Diffusion in 2 Energy Groups

AP Calculus AB First Semester Final Review

Linear Systems with Constant Coefficients

CS 373, Spring Solutions to Mock midterm 1 (Based on first midterm in CS 273, Fall 2008.)

4.4 Areas, Integrals and Antiderivatives

CS 2204 DIGITAL LOGIC & STATE MACHINE DESIGN SPRING 2014

Math 231E, Lecture 33. Parametric Calculus

Formal Methods in Software Engineering

The area under the graph of f and above the x-axis between a and b is denoted by. f(x) dx. π O

Necessary and sufficient conditions for some two variable orthogonal designs in order 44

CISC 4090 Theory of Computation

Nondeterminism and Nodeterministic Automata

Fault Modeling. EE5375 ADD II Prof. MacDonald

SUMMER KNOWHOW STUDY AND LEARNING CENTRE

Section 4: Integration ECO4112F 2011

Situation Calculus. Situation Calculus Building Blocks. Sheila McIlraith, CSC384, University of Toronto, Winter Situations Fluents Actions

Lecture 3: Equivalence Relations

Conservation Law. Chapter Goal. 6.2 Theory

Introduction to Electrical & Electronic Engineering ENGG1203

Math 4310 Solutions to homework 1 Due 9/1/16

CS 573 Automata Theory and Formal Languages

p-adic Egyptian Fractions

4.5 THE FUNDAMENTAL THEOREM OF CALCULUS

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

CHAPTER 1 Regular Languages. Contents. definitions, examples, designing, regular operations. Non-deterministic Finite Automata (NFA)

Year 11 Matrices. A row of seats goes across an auditorium So Rows are horizontal. The columns of the Parthenon stand upright and Columns are vertical

Interpreting Integrals and the Fundamental Theorem

expression simply by forming an OR of the ANDs of all input variables for which the output is

NFAs and Regular Expressions. NFA-ε, continued. Recall. Last class: Today: Fun:

Reverse Engineering Gene Networks with Microarray Data

NON-DETERMINISTIC FSA

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

Sturm-Liouville Theory

CM10196 Topic 4: Functions and Relations

CS:4330 Theory of Computation Spring Regular Languages. Equivalences between Finite automata and REs. Haniel Barbosa

2 b. , a. area is S= 2π xds. Again, understand where these formulas came from (pages ).

x dx does exist, what does the answer look like? What does the answer to

CS 301. Lecture 04 Regular Expressions. Stephen Checkoway. January 29, 2018

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Formal Languages and Automata

g i fφdx dx = x i i=1 is a Hilbert space. We shall, henceforth, abuse notation and write g i f(x) = f

SUPPLEMENTARY NOTES ON THE CONNECTION FORMULAE FOR THE SEMICLASSICAL APPROXIMATION

Transcription:

Sttechrts y Kenr ooper ontents Introuction Stte igrms epth (hierrchy) Orthogonlity (concurrency) rocst ommuniction Exmple Prolems Introuction Sttechrts were introuce y vi Hrel in 1987. Hrel, Sttechrts: visul formlism for complex systems, Science of omputer Progrmming 8, 1987, pp. 231-274. Sttechrts re useful for escriing lrge, complex, rective systems rective system is one which must continuously rect to externl n internl stimuli They re grphic nottion ( visul ) Sttechrt = stte-igrms + epth (lso known s strction) + orthogonlity (lso known s concurrency) + rocst communiction The Sttechrt nottion is kin of extene FSM with strction, concurrency, n communiction Stte igrms ompose of sttes, trnsitions trnsitions from one stte to nother hppen when the event tht is lele on the rc (if ny) occurs n the conition (if ny) is true n output cn e ssocite with the trnsition o In the igrm elow, the stte chnges from to when event occurs n the conition P is true; the output is c o c is glol (cn e seen everywhere in the Sttechrt moel) c cn e use s n input on trnsition

this supports communiction in the moel (P)/c epth (hierrchy) sttechrts exten this with: o refinement, clustering o N, OR ecomposition of sttes (ctully XOR, not OR) Exmple (clustering, ottom up pproch) e(p) n e clustere like this: e(p) is clle superstte. The semntics (k mening) of superstte is: o xor The rc lele is common property to the superstte

Exmple (refinement, top-own pproch) in this exmple, we strt with sttes n Stte is refine to inclue sttes n The events, re unerspecifie (which one goes where?) - nees to e fixe The trnsition from to lso nees to e specifie for the exmple e(p)

efult stte If we hve susttes,, n n we wnt to enter stte y efult, we specify this using smll rrow: or History Stte n use history entrnce (H). The stte entere is the lst stte the level ws in when it existe. The H entrnce overries efult stte The scope of the H entrnce is the current level of the igrm The scope of the H* entrnce is to the lowest level of the igrm. H Exmple: timer tht continues to count own s the stte is entere n exite (the timer oes not get reset when the stte is entere)

Orthogonlity (concurrency) N Exmple Y is the orthogonl prouct of n Y E u g G F From the efult sttes: If event occurs, then the igrm moves from sttes,f into stte,g t the sme time ( is synchronize with ) If event u occurs, then only is ffecte n the igrm moves from,f into stte, E ( is inepenent from ) igrms cn e much smller, simpler thn those rwn in equivlent form using XORs Smller n simpler men the igrm is esier to write, review, correct, n mintin. rocst ommuniction n event is seen everywhere in the igrm t the sme time. Exmple Specify the ehvior of n lrm clock using sttechrts. ssumptions: The lrm clock hs 2 uttons. We cn strt with setting the current time. Nee to set hours, minutes, secons Nee to ecie which uttons (one, oth together) o wht

Set urrent Time &2 link Hours utton 2 utton 2 &2 link Minutes utton 2 utton 2 &2 link Secons utton 2 Hours Minutes Secons urrenttime Set

Now, consier setting the lrm time. Set lrm Time &2 link Hours utton 2 utton 2 &2 link Minutes utton 2 utton 2 &2 link Secons utton 2 Hours Minutes Secons lrm Time Set Now, consier how these supersttes relte to one nother? xor lock isply Time isply lrm Time utton 2 Set urrent Time Set lrm Time Now, exten the sttechrt to escrie the lrm going off.

lock isply Time lrm Time lrm On utton 2 Set urrent Time Set lrm Now, vlite the ehvior of the sttechrt (i.e., oes the sttechrt specify the system the wy we wnt it to work) Question: Wht hppens if the lrm goes off for 5 minutes? isply vs. Mintin the time? Mintining the time nees to occur concurrently with: the lrm going off setting the lrm time Question: Is it possile to isply n mintin the current time concurrently? Next step is to fix the sttechrt. fter it is fixe, nee to re-vlite the sttechrt. Other things to consier: Is there rio? Is there snooze utton? Is there ttery ckup?. HW Exercise: complete the sttechrt.

Prolems 1. Wht is sttechrt? 2. escrie 3 types of systems tht woul e suitle for escriing in sttechrts. 3. In softwre engineering, we use the principle of strction. How oes sttechrts support this principle? 4. rw sttechrt tht specifies the functionlity of igitl wtch tht hs n lrm feture (i.e., you cn set the time for eeping lrm to go off). 2. rw sttechrt tht specifies the functionlity of four function clcultor. 3. rw Sttechrt tht represents the ining Philosophers Prolem. The ining Philosophers Prolem Five philosophers sit t roun tle. t ny given time, philosopher my either et or meitte. When they et, they nee to pick up two chopsticks (one on their left n one on their right). When they meitte, they o not nee ny chopsticks. There re totl of five chopsticks ville.