EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review.

Slides:



Advertisements
Similar presentations
CSE 311 Foundations of Computing I
Advertisements

CSC 361NFA vs. DFA1. CSC 361NFA vs. DFA2 NFAs vs. DFAs NFAs can be constructed from DFAs using transitions: Called NFA- Suppose M 1 accepts L 1, M 2 accepts.
CMPS 3223 Theory of Computation
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Decomposing Refinement Proofs using Assume-Guarantee Reasoning Tom Henzinger (UC Berkeley) Shaz Qadeer (Compaq Research) Sriram Rajamani (Microsoft Research)
CSE 311: Foundations of Computing Fall 2013 Lecture 23: Finite state machines and minimization.
1 1 CDT314 FABER Formal Languages, Automata and Models of Computation Lecture 3 School of Innovation, Design and Engineering Mälardalen University 2012.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
EECS 20 Lecture 14 (February 16, 2001) Tom Henzinger Nondeterminism.
© Janice Regan, CMPT 102, Sept CMPT 102 Introduction to Scientific Computer Programming The software development method algorithms.
1 Introduction to Computability Theory Lecture12: Decidable Languages Prof. Amos Israeli.
Transparency No. 2-1 Formal Language and Automata Theory Chapter 2 Deterministic Finite Automata (DFA) (include Lecture 3 and 4)
EECS 20 Lecture 15 (February 21, 2001) Tom Henzinger Simulation.
EECS 20 Lecture 13 (February 14, 2001) Tom Henzinger Minimization.
Finite Automata Finite-state machine with no output. FA consists of States, Transitions between states FA is a 5-tuple Example! A string x is recognized.
Overview Finite State Machines - Sequential circuits with inputs and outputs State Diagrams - An abstraction tool to visualize and analyze sequential circuits.
EECS 20 Lecture 16 (February 26, 2001) Tom Henzinger Determinization.
EECS 20 Lecture 1 (January 17, 2001) Tom Henzinger Motivation.
EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger State Machines.
EECS 20 Lecture 9 (February 5, 2001) Tom Henzinger Transition Diagrams.
EECS 20 Lecture 6 (January 29, 2001) Tom Henzinger Transducive Systems.
Computation Engines: BDDs and SAT (part 2) 290N: The Unknown Component Problem Lecture 8.
EECS 20 Lecture 7 (January 31, 2001) Tom Henzinger Reactive Systems.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
Week 4 1.More examples 2.Nondeterminism, equivalence, simulation (Ch 3) 3.Composition (Ch 4)
1 Turing Machines. 2 The Language Hierarchy Regular Languages Context-Free Languages ? ?
01/27/2005 Combinationality of cyclic definitions EECS 290A – Spring 2005 UC Berkeley.
EECS 20 Chapter 4 Sections Connecting State Machines Last time we Introduced the nondeterministic state machine Highlighted differences between.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
EECS 20 Lecture 4 (January 24, 2001) Tom Henzinger Block Diagrams.
EECS 20 Lecture 36 (April 23, 2001) Tom Henzinger Safety Control.
EECS 20 Lecture 37 (April 25, 2001) Tom Henzinger Progress Control.
EECS 20 Chapter 3 Sections State Machines Continued Last time we Introduced the deterministic finite state machine Discussed the concept of state.
EECS 20 Lecture 12 (February 12, 2001) Tom Henzinger Equivalence.
CSE 311: Foundations of Computing Fall 2014 Lecture 23: State Minimization, NFAs.
Signals and Systems March 25, Summary thus far: software engineering Focused on abstraction and modularity in software engineering. Topics: procedures,
Rosen 5th ed., ch. 11 Ref: Wikipedia
Zvi Kohavi and Niraj K. Jha 1 Capabilities, Minimization, and Transformation of Sequential Machines.
Sequential Circuits. Combinational Circuits + Storage element output depends both on previous state and input Fig. 5-1.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
1 Sequential Machine Theory Prof. K. J. Hintz Department of Electrical and Computer Engineering Lecture 1 Adaptation to this.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Turing Machines Chapter 17. Languages and Machines SD D Context-Free Languages Regular Languages reg exps FSMs cfgs PDAs unrestricted grammars Turing.
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 3 Mälardalen University 2010.
1 Lecture 13 Overview of sequential logic  Basic concepts  An example.
1 Linear Bounded Automata LBAs. 2 Linear Bounded Automata (LBAs) are the same as Turing Machines with one difference: The input string tape space is the.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Finite State Machines 1.Finite state machines with output 2.Finite state machines with no output 3.DFA 4.NDFA.
UNIT - I Formal Language and Regular Expressions: Languages Definition regular expressions Regular sets identity rules. Finite Automata: DFA NFA NFA with.
R. Johnsonbaugh Discrete Mathematics 5 th edition, 2001 Chapter 10 Automata, Grammars and Languages.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Chapter 5 Finite Automata Finite State Automata n Capable of recognizing numerous symbol patterns, the class of regular languages n Suitable for.
1 Introduction to Turing Machines
1 CD5560 FABER Formal Languages, Automata and Models of Computation Lecture 12 Mälardalen University 2007.
Nondeterministic Finite State Machines Chapter 5.
June 13, 2016 Prof. Abdelaziz Khamis 1 Chapter 2 Scanning – Part 2.
Turing Machines. The next level of Machine… PDAs improved on FSAs by adding memory. We make the memory more flexible to do more complicated tasks.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Capabilities, Minimization, and Transformation of Sequential Machines
Hardware Verification
Deterministic FA/ PDA Sequential Machine Theory Prof. K. J. Hintz
CSE 311 Foundations of Computing I
Recognizer for a Language
CSE 311 Foundations of Computing I
Discrete Controller Synthesis
State Machines EECS 20 Lecture 8 (February 2, 2001) Tom Henzinger.
Instructor: Aaron Roth
Mealy and Moore Machines
Presentation transcript:

EECS 20 Lecture 38 (April 27, 2001) Tom Henzinger Review

Transducive System Input ValueOutput Value transduciveSystem : Values  Values Reactive System Input SignalOutputSignal reactiveSystem : [ Time  Values ]  [ Time  Values ]

Discrete time:Time = Nats 0 = { 0, 1, 2, … } Continuous time:Time = Reals + = { x  Reals | x  0 }

A reactive system F : [ Time  Values ]  [ Time  Values ] is memory-free iff there exists a transducive system f : Values  Values such that  x  [ Time  Values ],  y  Time, ( F (x) ) (y) = f ( x (y) ).

A reactive system F : [ Time  Values ]  [ Time  Values ] is causal iff  x, y  [ Time  Values ],  z  Time, if (  t  Time, t  z  x (t) = y (t) ) then ( F (x) ) (z) = ( F (y) ) (z).

The Delay System Delay c : [ Time  Values ]  [ Time  Values ] such that  x  [ Time  Values ],  y  Time, ( Delay (x) ) (y) = c if y < 1 x (y-1) if y  1 {

Discrete-time delay over finite set of values : finite memory Continuous-time delay, or infinite set of values: infinite memory

Legal Transducive Block Diagrams -all components are transducive systems -no cycles e.g., combinational circuits Legal Reactive Block Diagrams -all components are memory-free or delay systems -every cycle contains at least one delay e.g., sequential circuits

Discrete-time reactive systems with finite memory are naturally implemented as finite state machines.

A Discrete-Time Reactive System Nats 0  InputsNats 0  Outputs F : [ Nats 0  Inputs ]  [ Nats 0  Outputs ] F

State Machine Implementation Nats 0  InputsNats 0  Outputs D initialState Update Nats 0  States update : States  Inputs  States  Outputs initialState  States F memory-free delay stores state

Deterministic State Machine Inputs ( set of possible input values ) Outputs ( set of possible output values ) States ( set of states ) initialState  States update : States  Inputs  States  Outputs

Any block diagram of N state machines with the state spaces States1, States2, … StatesN can be implemented by a single state machine with the state space States1  States2  …  StatesN. This is called a “product machine”. Product of State Machines

Deterministic Reactive System: for every input signal, there is exactly one output signal. DetSys : [ Time  Inputs ]  [ Time  Outputs ] Function:

Nondeterministic Reactive System: for every input signal, there is one or more output signals. NondetSys  [ Time  Inputs ]  [ Time  Outputs ] such that  x  [ Time  Inputs ],  y  [ Time  Outputs ], (x,y)  NondetSys Binary relation: Every pair (x,y)  NondetSys is called a behavior.

System S1 refines system S2 iff 1. Time [S1] = Time [S2], 2. Inputs [S1] = Inputs [S2], 3. Outputs [S1] = Outputs [S2], 4. Behaviors [S1]  Behaviors [S2]. S1 is a more detailed description of S2; S2 is an abstraction or property of S1.

Systems S1 and S2 are equivalent iff 1. Time [S1] = Time [S2], 2. Inputs [S1] = Inputs [S2], 3. Outputs [S1] = Outputs [S2], 4. Behaviors [S1] = Behaviors [S2].

Nondeterministic State Machine Inputs Outputs States possibleInitialStates  States possibleUpdates : States  Inputs  P( States  Outputs ) \ Ø receptiveness (i.e., machine must be prepared to accept every input)

State Machines Deterministic   Output-deterministic   Nondeterministic X X

A state machine is deterministic iff 1.there is only one initial state, and 2.for every state and every input, there is only one successor state. A state machine is output-deterministic iff 1.there is only one initial state, and 2.for every state and every input-output pair, there is only one successor state.

For deterministic M2 : M1 is simulated by M2 iff M1 is equivalent to M2. For output-deterministic M2 : M1 is simulated by M2 iff M1 refines M2. For nondeterministic M2 : M1 is simulated by M2 implies M1 refines M2. condition on infinitely many behaviors relation between finitely many states

A binary relation S  States [M1]  States [M2] is a simulation of M1 by M2 iff 1.  p  possibleInitialStates [M1],  q  possibleInitialStates [M2], ( p, q )  S and 2.  p  States [M1],  q  States [M2], if ( p, q )  S, then  x  Inputs,  y  Outputs,  p’  States [M1], if ( p’, y )  possibleUpdates [M1] ( p, x ) then  q’  States [M2], ( q’, y )  possibleUpdates [M2] ( q, x ) and ( p’, q’ )  S.

To check if M1 refines M2, check if M1 is simulated by det(M2): M1 refines M2 iff M1 refines det(M2) iff M1 is simulated by det(M2). output-deterministic

If M2 is an output-deterministic state machine, then a simulation S of M1 by M2 can be found as follows: 1. If p  possibleInitialStates [M1] and possibleInitialStates [M2] = { q }, then (p,q)  S. 2. If (p,q)  S and (p’,y)  possibleUpdates [M1] (p,x) and possibleUpdates [M2] (q,x) = { q’ }, then (p’,q’)  S.

Output-Determinization Given: nondeterministic state machine M Find: output-deterministic state machine det(M) that is equivalent to M Inputs [det(M)] = Inputs [M] Outputs [det(M)] = Outputs [M]

The Subset Construction Let initialState [ det(M) ] = possibleInitialStates [M] ; Let States [ det(M) ] = { initialState [det(M)] } ; Repeat as long as new transitions can be added to det(M) : Choose P  States [det(M)] and (x,y)  Inputs  Outputs ; Let Q = { q  States [M] |  p  P, (q,y)  possibleUpdates [M] (p,x) } ; If Q  Ø then Let States [det(M)] = States [det(M)]  {Q} ; Let update [det(M)] (P,x) = (Q,y).

Minimization Algorithm Input : nondeterministic state machine M Output : minimize (M), the state machine with the fewest states that is bisimilar to M (the result is unique up to renaming of states)

A binary relation B  States [M1]  States [M2] is a bisimulation between M1 and M2 iff A1.  p  possibleInitialStates [M1],  q  possibleInitialStates [M2], ( p, q )  B, and A2.  p  States [M1],  q  States [M2], if ( p, q )  B, then  x  Inputs,  y  Outputs,  p’  States [M1], if ( p’, y )  possibleUpdates [M1] ( p, x ) then  q’  States [M2], ( q’, y )  possibleUpdates [M2] ( q, x ) and ( p’, q’ )  B, and

B1.  q  possibleInitialStates [M2],  p  possibleInitialStates [M1], ( p, q )  B, and B2.  p  States [M1],  q  States [M2], if ( p, q )  B, then  x  Inputs,  y  Outputs,  q’  States [M2], if ( q’, y )  possibleUpdates [M2] ( q, x ) then  p’  States [M1], ( p’, y )  possibleUpdates [M1] ( q, x ) and ( p’, q’ )  B. and

For nondeterministic state machines M1 and M2, M1 is equivalent to M2   M1 simulates M2 and M2 simulates M1   M1 and M2 are bisimilar. X For output-deterministic state machines M1 and M2, M1 is equivalent to M2   M1 and M2 are bisimilar. X

1. Let Q be set of all reachable states of M. 2. Maintain a set P of state sets: Initially let P = { Q }. Repeat until no longer possible: split P. 3. When done, every state set in P represents a single state of the smallest state machine bisimilar to M. Minimization Algorithm

Split P If there exist two state sets R  P and R’  P two states r1  R and r2  R an input x  Inputs an output y  Outputs such that  r’  R’, ( r’, y )  possibleUpdates ( r1, x ) and  r’  R’, ( r’, y )  possibleUpdates ( r2, x ) then let R1 = { r  R |  r’  R’, ( r’, y )  possibleUpdates ( r, x ) } ; let R2 = R \ R1 ; let P = ( P \ { R } )  { R1, R2 }.

The Finite-State Safety Control Problem Given finite-state machine Plant set Error of states of Plant Find finite-state machine Controller such that the composite system never enters a state in Error

The Finite-State Progress Control Problem Given finite-state machine Plant set Target of states of Plant Find finite-state machine Controller such that the composite system is guaranteed to enter a state in Target

Compute the safety-uncontrollable states of Plant 1.Every state in Error is safety-uncontrollable. 2.For all states s, if for all inputs i there exist a safety-uncontrollable state s’ and an output o such that (s’,o)  possibleUpdates (s,i) then s is safety-uncontrollable.

Compute the progress-controllable states of Plant 1.Every state in Target is progress-controllable. 2.For all states s, if there exists an input i for all states s’ and outputs o if (s’,o)  possibleUpdates (s,i) then s’ is progress-controllable then s is progress-controllable.

Typical Exam Questions A. Convert between the following system representations: 1. Mathematical input-output definition 2. Transition diagram 3. Block diagram B.Apply the following algorithms on state machines: 1. Product construction 2. Subset construction 3. Check for existence of a simulation 4. Minimization 5. Compute controllable states C.Explain the following concepts: 1. Memory-free vs. finite-state vs. infinite-state 2. Equivalence/refinement vs. simulation vs. bisimulation 3. Safety vs. progress control