uconn hydra 12/4/11 turing machines, transition systems, and interaction dina goldin, u.connecticut

34
UCONN HYDRA 12/4/1 1 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

Post on 20-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 1

Turing Machines,Transition Systems,

and Interaction

Dina Goldin, U.Connecticut

Page 2: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 2

Algorithmic vs. Interactive Computation

computation: finite transformation of input to outputinput: finite-size (string or number)

closed system: all input available at start, all output generated at end Church-Turing thesis: captures this notion of computation

computation: ongoing process which performs a task or delivers a service dynamically generated stream of input tokens (requests, percepts, messages)later inputs depend on earlier outputs (lack of modularity) and vice versa (history dependence)objects, processes, components,control devices, reactive systems, intelligent agents

Page 3: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 3

Example: Driving home from work

Output: a sequence of pairs of #s (time-series data)- for turning the wheel- for pressing gas/break(similar to classical AI search/planning problems)

Algorithmic input: a description of the world (a static “map”)

Page 4: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 4

But… the output depends on every grain of sand in the road (chaotic behavior).

Can we possibly have a map that’s detailed enough?

Worse yet… the domain is dynamic. The output depends on weather conditions, and on other drivers and pedestrians.

We can’t possibly be expected to predict that in advance!

Nevertheless the problem is solvable – interactively!

Interactive input: stream of video camera (eye) images.

Driving home from work (cont.)

?

Page 5: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 5

• Persistent Turing Machines (PTMs)an interactive extension of the TM model

• Interactive Transition Systems (ITSs)effective transition systems induced by PTMs

• Unbounded non-determinismexhibited by ITSs

• It pays to be persistentexpressiveness of persistent vs. amnesic computation

• Summary and future work

Outline

Page 6: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 6

Nondeterministic 3-tape TMs

s - current state

w1 - contents of input tape

w2 - contents of work tape

w3 - contents of output tape

n1 , n2 , n3 - tape head posns

321321 ,,,,,, nnnwwws

'CC |

• Configurations:

input

work

outputS

• Computation is a sequence of transitions:

Page 7: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 7

N3TM macrosteps

win, wNotation:

win

So

w

win

Sh

w’

wout

M

|< s0, win, w, , 1, 1, 1 > < sh, win, w’, wout, 1, 1, 1 >

w’, wout

Page 8: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 8

Divergent Computation

win, w M

< s0, win, w, , 1, 1, 1 >

sdiv,

If computation diverges starting in configuration

corresponding macrostep notation is:

For all win *,

win, sdiv Msdiv,

Page 9: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 9

Extending N3TM computations

• Inputs are dynamic streams of tokens (strings). For each input token, there is an N3TM computation generating a corresponding output token.

• The contents w of the work tape at the beginning of each N3TM computation is the same as at the end of the previous one.

fM (inputk, wk-1) = (outputk, wk)

Page 10: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 10

• Persistent Stream Language of a PTM: set of streams

• Conductive stream semantics:

Persistent Stream Languages

,...},,,{ 2211 outinoutin

SS *)*(

in1

S0

Shout1

w1

in1 in2

S0

w1

Shout2

w2

in2

...

Persistent Turing Machine (PTM): N3TM with persistent stream-based computational semantics

Page 11: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 11

Formal Definition

))}'(('

,',

wMPSL

wwww oi

))(()( MPSLMPSL

}3an is )({ TMNMMPSL |PSL

21 MM PSL:eequivalenc PSL

(Coinductive definition, relative to N3TM M and memory w)

PSL(M(w)) = { (wi, wo), ’ S | w’*:

Page 12: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 12

• inputs in1; outputs 1

• inputs in2; outputs 1st bit of in1

• inputs in3; outputs 1st bit of in2

• ...

• Example:

PTM Example: LatchM

),...}0,1(),0,0(),1,0(),1,1{(io

#

1

0

(1*,1)

(0*,1)

(0*,1) (1*,0)

(1*,1)

(0*,0)

)( LatchMPSL

Page 13: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 13

Interactive Transition Systemsover

• S is set of states• r is initial state (root)• m is transition relation

** SSmRequired to be recursively enumerable

< S, m, r >

Page 14: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 14

From PTMs to ITSs

reach(M), m,ξ(M)

oMiwssw ,',m

oiwsws ,',, iff

Reachable memories of a PTM M:

Set of words (work-tape contents) w encountered after zero or more macrosteps.

where

*reach(M)

Page 15: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 15

ITS Isomorphism

s.t.bijectionif : 2121 SSTT iso

21)( rr

2

1

1

),'(,),(,',,

:',*,,

mwswsmwsws

Sssww

oi

oi

oi

iff

1.

2.

iiii rmST ,,,Let be ITSs, i=1,2

Page 16: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 16

ITS Bisimulation

iiii rmST ,,,

21 rRr

Let be ITSs, i=1,2

21 SSR is a (strong) interactive bisimulation if:

'',',,s.t.',',,

2

1

tRsmwtwttmwswstRs

oi

oi

1.

2.

3. Clause 2. with roles of s and t reversed

T1 =bisim T2 if an interactive bisim. between them

Page 17: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 17

• Infinite sequences of input/output token-pairs emanating from a particular ITS state

• For an ITS T and state s, ISL(T(s)) [and ISL(T)] are defined similarly to PSL(M(s)) [and PSL(M)]

Interactive Stream Equivalence

T1 =ISL T2 if ISL(T1) = ISL(T2)

Page 18: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 18

Theorem:

isomorphic are andstructures The isoms ,, TM

Proof:

)()( 21

21

MMMM

iso

ms

iff:preserving-structure

) obvious the choose recursive; is( :onto

MmMTMT )(:, MT

) for the to for the (set msiso

Page 19: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 19

PTMs

ITSs

=ms

=iso=bisim=ISL

=PSL

Equivalence Relationsfor PTMs vs. ITSs

Page 20: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 20

• Persistent Turing Machines (PTMs)an interactive extension of the TM model

• Interactive Transition Systems (ITSs)effective transition systems induced by PTMs

• Unbounded non-determinismexhibited by ITSs

• It pays to be persistentexpressiveness of persistent vs. amnesic computation

• Summary and future work

Outline

Page 21: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 21

Infinite Equivalence Hierarchy

• Lk(M) = stream prefix language of PTM Mset of prefixes of length k for streams in PSL(M).

• L (M) = Uk Lk(M)

• Corresponding notion of equivalence:

M1 =k M2 : Lk(M1) = Lk ( M2 )

==2=1 ...

Page 22: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 22

Equivalence Hierarchy Gap

• Proof: construct PTMs M1 and M2 where L(M1) = L (M2 ) but PSL (M1 ) = PSL (M2 )

• Note: M2 exhibits unbounded non-determinism

/

=PSL==2=1 ...

Page 23: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 23

Example of Unbounded Nondeterminism

MUD ignores inputs, output 0 or 1 with each macrostep. On 1st macrostep, initializes a persistent string n of 1’s:

while true do write ‘1’ on the work tape, move head to the right; nondeterministically choose to exit loop or continue

The output at every macrostep is determined as follows:

if n > 0 then decrement n by 1 and output ‘1’; else output ‘0’

Page 24: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 24

ITS for MUD

(*, 1)

n = 0 n = 1 n = 2 n = 3(*, 1)(*, 1) (*, 1) (*, 1)

(*, 1) (*, 1) (*, 1)(*, 1)

(*, 0)

...

(*, )sdiv

(*, )

...

Page 25: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 25

• Persistent Turing Machines (PTMs)an interactive extension of the TM model

• Interactive Transition Systems (ITSs)effective transition systems induced by PTMs

• Unbounded non-determinismexhibited by ITSs

• It pays to be persistentexpressiveness of persistent vs. amnesic computation

• Summary and future work

Outline

Page 26: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 26

Amnesic PTM Computation:

stream-based but not persistent

:*'),,({)( wwwMASL oi |S

))}'(('

,

wMPSL

wi

w', wo

}3an is )({ TMNMMASL |ASL

21 MM ASL:eequivalenc ASL

Page 27: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 27

Amnesic PTM Computation

in1

S0

Shout1

w1

in1 in2

S0

Shout2

w2

in2

Example: outi = ini2

PTM M is amnesic if PSL(M) ASL

...

Page 28: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 28

Proof:: Given an N3TM M, construct M’ such that

PSL(M') = ASL(M)

: Consider 3rd elem. (0,0) of io for Mlatch!For any M with io in ASL(M), there will also be a stream in ASL(M) with (0,0) as 1st element.Therefore, for all M, ASL(M) PSL(Mlatch).

It pays to be Persistent

ASL PSL

Page 29: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 29

Functions or objects?

• Functions (side-effect-free) or objects: does it matter for modeling programs?

• Objects contain persistent values:

x1 = foo(args 1) y1 = cntr(add 1)x2 = foo(args 2) y2 = cntr(get ttl)x3 = foo(args 3) y3 = cntr(add 2)x4 = foo(args 2) y4 = cntr(get ttl)

_________________________________________________ x2 = x4 y2 y4

• History dependence (emerges in the context of multiple invocations).

Page 30: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 30

Summary of Results

ASL PSL

PTMs

ITSs

=

==2=1 =ms

=iso=bisim=ISL

=PSL ...

=ASL

Page 31: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 31

• Reactive and embedded systems

• Dataflow, process algebra, I/O automata, synchronous languages, finite/pushdown automata over infinite words, interaction games, online algorithms

• Concurrency theory

• Sequential Interaction Machines [Wegner&Goldin]

Modeling Interactive Computation: Related Work

Page 32: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 32

• Interactive computability

• Interactive complexity

• Where are the ports?

http://www.cse.uconn.edu/~dqg/papers/

Scott Smolka, SUNY at Stony BrookPaul Attie, Northeastern Univ.Peter Wegner, Brown Univ.

Future Work

Page 33: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 33

• A stream language L is interactively computable if L PSL

(properties of L expressed in Temporal Logic)

• A behavior B is interactively computable if B is interaction bisimilar to an ITS T T

Interactive Computability

Page 34: UCONN HYDRA 12/4/11 Turing Machines, Transition Systems, and Interaction Dina Goldin, U.Connecticut

UCONN HYDRA 12/4/1 34

M1

M2

M4

M3t1

t2

in1 in4

in3

in2

out2

out1

out3

out4

Systems of Concurrent PTMs