2 Computations and Interaction Jos Baeten Systems Engineering (Dept. of Mech. Eng.) and Theory of Computing (Dept. of Math. & Comp. Sci.) – Joint work with Bas Luttik and Paul van Tilburg March 4, 2011
What is a computation? 3 My first computer program, 1973. Hand in stack of punched cards at counter Wait 2 hours Find dump in pigeon hole
What is a computation? 3 My first computer program, 1973. Hand in stack of punched cards at counter Wait 2 hours Find dump in pigeon hole Modeled by a Turing machine. Input separated from output Fixed input string
Nowadays: interaction 4 Input: one click. Immediate reaction from computer: reactive systems. Not an input string
Nowadays: interaction 4 Input: one click. Immediate reaction from computer: reactive systems. Not an input string One Google query has different answers all the time: non-determinism
Nowadays: interaction 4 Input: one click. Immediate reaction from computer: reactive systems. Not an input string One Google query has different answers all the time: non-determinism A Turing machine cannot fly an airplane, but a computer can.
5 Foundations of computing is automata theory and formal languages.
5 Foundations of computing is automata theory and formal languages. Finite automaton, pushdown automaton, Turing machine: languages.
5 Foundations of computing is automata theory and formal languages. Finite automaton, pushdown automaton, Turing machine: languages. Interaction: from concurrency theory, process theory.
5 Foundations of computing is automata theory and formal languages. Finite automaton, pushdown automaton, Turing machine: languages. Interaction: from concurrency theory, process theory. Parallel composition (Milner). Transition systems.
Related Work 6 Gurevich – Abstract State Machines (from early 90s) Wegner and Goldin – Persistent Turing Machine (from 97) Van Leeuwen and Wiedermann – interactive transducers (from 00)
Differences 7 ◮ Final state, termination, in concurrency ◮ Transition systems not necessarily finite ◮ Language equivalence cannot capture interaction. a.b + a.c � = a. ( b + c ) (lady and the tiger) Branching bisimulation.
Finite automaton 8 a a a c a b b ◮ Reachable nodes, unnamed nodes, layout ◮ Language equivalence throws away a lot of information.
An algebra, for calculation 9 a b a a. 0 + b.a. 1 0 1
Structural Operational Semantics 10 1 ↓ a a.x − → x a → x ′ x ↓ x − a a x + y ↓ y + x ↓ → x ′ → x ′ x + y − y + x − a a → y ′ → x ′ x ↓ y − x ↓ y ↓ x − → x ′ · y a a x · y ↓ → y ′ x · y − x · y −
Structural Operational Semantics 11 a x ↓ y ↓ → x ′ − x x ∗ ↓ a → x ′ · x ∗ x � y ↓ x ∗ − c ! d y c ? d → x ′ → y ′ a → x ′ x − − x − → x ′ � y a x � y c ! ? d → x ′ � y ′ and v.v. x � y − − and v.v. a → x ′ x − a � = c ! d, c ? d x ↓ a ∂ c ( x ) ↓ → ∂ c ( x ′ ) ∂ c ( x ) − a x c ! ? d → x ′ − a � = c ! x ↓ → x ′ x ? d − τ a → τ c ( x ′ ) → τ c ( x ′ ) τ c ( x ) ↓ τ c ( x ) − τ c ( x ) −
Presentation of a Grammar 12 a b T U V a S b b a a W R b
Presentation of a Grammar 12 S = a.T + a.W a b T = a.U + b.W T U V a U = b.V + b.R S b b V = 0 a a W = a.R W R R = b.W + 1 b ◮ From automaton to recursive specification
From Recursive Specification to Automaton 13 a t ↓ P = t t − → x P = t a P ↓ − → x P
Algebraic Laws 14 ∼ x + y y + x = ∼ ( x + y ) + z = x + ( y + z ) ∼ x + x x = ∼ x + 0 = x ax + ay ≈ a ( x + y ) a 0 ≈ 0 ◮ First four laws: isomorphic automata. But not a congruence! ◮ Distributive law: language preserving, removing non-determinism ◮ 0 is right-zero: only successful termination counts
Definition of Bisimulation 15 a a a a ( 1 + 0 ) + a 1 �∼ = a 1 + a 1 Bisimulation is the strongest congruence containing isomorphism. Every congruence on automata containing isomorphism must contain bisimilarity.
Process Algebra 16 ◮ 0 inaction, unsuccessful termination, deadlock ◮ 1 empty process, skip, successful termination ◮ a. _ action prefix ◮ _ + _ alternative composition, choice ◮ _ · _ sequential composition ◮ _ ∗ iteration, Kleene star ◮ _ � _ parallel composition, merge, with communication ◮ ∂ c ( _ ) encapsulation ◮ τ c ( _ ) abstraction ◮ Recursive specifications, guarded ◮ Axiomatizations B, Twan Basten, Michel Reniers, Process Algebra , CUP 2009/2010.
Process Algebra 16 ◮ 0 inaction, unsuccessful termination, deadlock ◮ 1 empty process, skip, successful termination ◮ a. _ action prefix ◮ _ + _ alternative composition, choice ◮ _ · _ sequential composition ◮ _ ∗ iteration, Kleene star ◮ _ � _ parallel composition, merge, with communication ◮ ∂ c ( _ ) encapsulation ◮ τ c ( _ ) abstraction ◮ Recursive specifications, guarded ◮ Axiomatizations B, Twan Basten, Michel Reniers, Process Algebra , CUP 2009/2010. Supersedes CCS, CSP, ACP.
Removing non-determinism and totalizing 17 LNCS 5065, Montanari festschrift. a b a S U S U + V S + W a b a a b b b V W b X a
Removing non-determinism and totalizing 18 S = aU + aV U = bS V = bW + 1 W = 0 . ≈ aU + aV ≈ a ( U + V ) + bX S U + V ≈ bS + bW + 1 ≈ b ( S + W ) + 1 + aX ≈ aU + aV + 0 ≈ a ( U + V ) + bX S + W X = aX + bX
Removing silent steps 19 τ a a τ a S T U S U τ a a b b W V W V
Removing silent steps 20 S = aW + τT T = aU U = τU + bV + τT V = 0 W = 1 S ≈ aW + τT ≈ aW + T ≈ aW + aU U ≈ τU + bV + τT ≈ U + bV + T ≈ bV + aU V = 0 W = 1
Regular expressions 21 a S T b S ≈ aT + 1 ≈ a ( bS + 1 ) + 1 ≈ abS + a 1 + 1 ≈ ( ab 1 ) ∗ · ( a 1 + 1 ) T ≈ bS + 1 ≈ b ( aT + 1 ) + 1 ≈ baT + b 1 + 1 ≈ ( ba 1 ) ∗ · ( b 1 + 1 )
Regular Process 22 A regular language is a language equivalence class of a finite (non-deterministic) automaton.
Regular Process 22 A regular language is a language equivalence class of a finite (non-deterministic) automaton. A regular process is a bisimulation equivalence class of a finite, non-deterministic automaton.
Regular Process 22 A regular language is a language equivalence class of a finite (non-deterministic) automaton. A regular process is a bisimulation equivalence class of a finite, non-deterministic automaton. A regular process is given by a recursive specification over the signature 0 , 1 , a. _ , + . So right-linear but not left-linear.
Regular Process 22 A regular language is a language equivalence class of a finite (non-deterministic) automaton. A regular process is a bisimulation equivalence class of a finite, non-deterministic automaton. A regular process is given by a recursive specification over the signature 0 , 1 , a. _ , + . So right-linear but not left-linear. Processes given by deterministic automata, and by regular expressions, form a subclass. (B, Flavio Corradini, Clemens Grabmayer, JACM 2007.)
Regular expressions revisited 23 a s t b s = ( ts ? b. ( st ! a. 1 + 1 )) ∗ t = ( st ? a. ( ts ! b. 1 + 1 )) ∗ ∂ st,ts (( st ! a. 1 + 1 ) · s � 1 · t ) New Kleene theorem: all finite automata can be given by reg.exp. plus � , ∂ .
Pushdown Process 24 a [ ε/ 1] a [1 / 11] b [1 /ε ] b [1 /ε ] a a a a b b b b b b
Stack, can only terminate when empty 25 o !0 i ?1 i ?0 o !1 o !0 i ?1 o !0 i ?1 o !1 o !1 i ?0 i ?0 i ? d. Stack io · o ! d. Stack io Stack io = 1 + � d ∈D
Infinite branching 26 Example: X = 1 + X · a 1 has infinite branching. Has head recursion. a a a a a a a a a
Infinite branching 26 Example: X = 1 + X · a 1 has infinite branching. Has head recursion. a a a a a a a a a τ [ ε/ 1] τ [1 / 11] a [1 /ε ] a [1 /ε ] τ [ ε/ε ] τ [1 /ε ]
Unbounded branching 27 X = aX · Y + b 1 Y = 1 + c 1 Variable Y is transparent. a a a a b b b b c c c c c c c
Pop choice 28 a [ ε/ 1] a [1 / 11] c [ ε/ε ] c [1 / 1] τ [ ε/ε ] b [1 /ε ] b [1 /ε ] This push-down automaton has no sequential recursive specification.
Pop choice 28 a [ ε/ 1] a [1 / 11] c [ ε/ε ] c [1 / 1] τ [ ε/ε ] b [1 /ε ] b [1 /ε ] This push-down automaton has no sequential recursive specification. Using parallel composition, it has: X = c. 1 + a. ( X � b. 1 )
Theorem 29 A process is a popchoice-free pushdown process terminating only on empty iff it is definable by a transparency-restricted sequential recursive specification without head recursion.
Removing restrictions 30 When there is head recursion, can still find a push-down automaton in some cases. When there is transparency, we cannot. However, can get rid of both restrictions when we move to contra-simulation . ax + ay = a ( τx + τy ) a [ z/ 1 z ] c [1 /ε ] b [ z/z ] τ [1 /ε ] τ [ z/z ] B, Pieter Cuijpers, Paul van Tilburg, CONCUR 2008.
Find a different grammar 31 Stack = Top � Stack j i Top Stack o p Stack io = τ jp ( ∂ jp ( Top io jp ∅ � Stack jp ))
Recommend
More recommend