340 likes | 457 Views
Turing Machines, Transition Systems, and Interaction. Dina Goldin, U.Connecticut. computation : finite transformation of input to output input : finite-size (string or number) closed system : all input available at start, all output generated at end
E N D
Turing Machines,Transition Systems,and Interaction Dina Goldin, U.Connecticut UCONN HYDRA 12/4/1
computation: finite transformation of input to output input: 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 Algorithmic vs. Interactive Computation UCONN HYDRA 12/4/1
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”) UCONN HYDRA 12/4/1
? Driving home from work (cont.) 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. UCONN HYDRA 12/4/1
Outline • 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 UCONN HYDRA 12/4/1
input work S output Nondeterministic 3-tape TMs • Configurations: s - current state w1- contents of input tape w2- contents of work tape w3- contents of output tape n1 , n2 , n3- tape head posns • Computation is a sequence of transitions: UCONN HYDRA 12/4/1
® | < s0, win, w, e, 1, 1, 1 > < sh, win, w’, wout, 1, 1, 1 > N3TM macrosteps win win w w’ So e Sh wout Þ < win, w > < w’, wout > Notation: M UCONN HYDRA 12/4/1
Divergent Computation If computation diverges starting in configuration corresponding macrostep notation is: For all winS*, < s0, win, w, e, 1, 1, 1 > Þ < win, w > < sdiv, t > M Þ < win, sdiv > < sdiv, t > M UCONN HYDRA 12/4/1
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) UCONN HYDRA 12/4/1
in1 in1 w1 e e out1 S0 Sh Persistent Stream Languages Persistent Turing Machine (PTM): N3TM with persistent stream-based computational semantics • Persistent Stream Language of a PTM: set of streams • Conductive stream semantics: in2 in2 w1 w2 ... e out2 S0 Sh UCONN HYDRA 12/4/1
Formal Definition (Coinductive definition, relative to N3TM M and memory w) PSL(M(w)) = { (wi, wo), s’ S | $w’S*: > Ù < w > Þ < w ' , w w , o i s Î ' PSL ( M ( w ' ))} UCONN HYDRA 12/4/1
Î PSL ( M ) Latch 1 (1*,1) (1*,1) # (1*,0) (0*,1) (0*,1) 0 (0*,0) PTM Example: • inputs in1; outputs 1 • inputs in2; outputs 1st bit of in1 • inputs in3; outputs 1st bit of in2 • ... • Example: UCONN HYDRA 12/4/1
Interactive Transition Systemsover S < S, m, r > • S is set of states • ris initial state (root) • m is transition relation Required to be recursively enumerable UCONN HYDRA 12/4/1
ξ(M) = < reach(M), m, e > > Þ < > < >Îm s , w , s ' , w s ' , w < w , s i o o M i From PTMs to ITSs Reachable memories of a PTM M: Set of words (work-tape contents) w encountered after zero or more macrosteps. where iff UCONN HYDRA 12/4/1
ITS Isomorphism Let be ITSs, i=1,2 1. 2. UCONN HYDRA 12/4/1
T1 =bisim T2 if $ an interactive bisim. between them ITS Bisimulation Let be ITSs, i=1,2 is a (strong) interactive bisimulation if: 1. 2. 3. Clause 2. with roles of s and t reversed UCONN HYDRA 12/4/1
Interactive Stream Equivalence • 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)] T1 =ISLT2 if ISL(T1) = ISL(T2) UCONN HYDRA 12/4/1
Theorem: Proof: UCONN HYDRA 12/4/1
=PSL =ms PTMs ITSs =ISL =bisim =iso Equivalence Relationsfor PTMs vs. ITSs UCONN HYDRA 12/4/1
Outline • 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 UCONN HYDRA 12/4/1
Infinite Equivalence Hierarchy • Lk(M) = stream prefix language of PTM Mset of prefixes of length k for streams in PSL(M). • L (M) = UkLk(M) • Corresponding notion of equivalence: M1 =k M2 : Lk(M1) = Lk ( M2 ) =1 =2 = ... UCONN HYDRA 12/4/1
=PSL =1 =2 = ... 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 / UCONN HYDRA 12/4/1
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’ UCONN HYDRA 12/4/1
(S*, 1) (S*, 1) (S*, 1) (S*, 1) ITS for MUD sdiv (S*, t) (S*, t) e ... (S*, 1) (S*, 1) (S*, 1) (S*, 1) (S*, 1) (S*, 0) ... n = 0 n = 1 n = 2 n = 3 UCONN HYDRA 12/4/1
Outline • 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 UCONN HYDRA 12/4/1
Amnesic PTM Computation:stream-based but not persistent > Þ < w', wo > Ù < e w , i s Î ' PSL ( M ( w ' ))} UCONN HYDRA 12/4/1
in1 in1 e w1 e out1 S0 Sh Amnesic PTM Computation in2 in2 e w2 ... e out2 S0 Sh Example: outi = ini2 PTM M is amnesic if PSL(M)ASL UCONN HYDRA 12/4/1
It pays to be Persistent ASL PSL Proof: Given an N3TM M, construct M’such that PSL(M') = ASL(M) Consider 3rd elem. (0,0) of sio for Mlatch!For any M with sio 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). UCONN HYDRA 12/4/1
Functions or objects? • Functions (side-effect-free) or objects: does it matter for modeling programs? • Objects contain persistentvalues: 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). UCONN HYDRA 12/4/1
Summary of Results =ASL = =PSL =1 =2 = ... =ms PTMs ITSs =ISL =bisim =iso UCONN HYDRA 12/4/1
Modeling Interactive Computation: Related Work • 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] UCONN HYDRA 12/4/1
Future Work • Interactive computability • Interactive complexity • Where are the ports? http://www.cse.uconn.edu/~dqg/papers/ Scott Smolka, SUNY at Stony Brook Paul Attie, Northeastern Univ.Peter Wegner, Brown Univ. UCONN HYDRA 12/4/1
Interactive Computability • A stream languageLis interactively computable if LPSL (properties of L expressed in Temporal Logic) • A behaviorBis interactively computable if B is interaction bisimilar to an ITST T UCONN HYDRA 12/4/1
M1 M2 M4 M3 Systems of Concurrent PTMs in3 out3 t1 in1 in4 out1 out4 t2 out2 in2 UCONN HYDRA 12/4/1