Computations and Interaction Jos Baeten Systems Engineering (Dept. - - PowerPoint PPT Presentation

computations and interaction
SMART_READER_LITE
LIVE PREVIEW

Computations and Interaction Jos Baeten Systems Engineering (Dept. - - PowerPoint PPT Presentation

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


slide-1
SLIDE 1
slide-2
SLIDE 2

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

slide-3
SLIDE 3

3

What is a computation?

My first computer program, 1973. Hand in stack of punched cards at counter Wait 2 hours Find dump in pigeon hole

slide-4
SLIDE 4

3

What is a computation?

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

slide-5
SLIDE 5

4

Nowadays: interaction

Input: one click. Immediate reaction from computer: reactive systems. Not an input string

slide-6
SLIDE 6

4

Nowadays: interaction

Input: one click. Immediate reaction from computer: reactive systems. Not an input string One Google query has different answers all the time: non-determinism

slide-7
SLIDE 7

4

Nowadays: interaction

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.

slide-8
SLIDE 8

5

Foundations of computing is automata theory and formal languages.

slide-9
SLIDE 9

5

Foundations of computing is automata theory and formal languages. Finite automaton, pushdown automaton, Turing machine: languages.

slide-10
SLIDE 10

5

Foundations of computing is automata theory and formal languages. Finite automaton, pushdown automaton, Turing machine: languages. Interaction: from concurrency theory, process theory.

slide-11
SLIDE 11

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.

slide-12
SLIDE 12

6

Related Work

Gurevich – Abstract State Machines (from early 90s) Wegner and Goldin – Persistent Turing Machine (from 97) Van Leeuwen and Wiedermann – interactive transducers (from 00)

slide-13
SLIDE 13

7

Differences

◮ 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.

slide-14
SLIDE 14

8

Finite automaton

c a a a a b b

◮ Reachable nodes, unnamed nodes, layout ◮ Language equivalence throws away a lot of information.

slide-15
SLIDE 15

9

An algebra, for calculation

a b a 1 a.0 + b.a.1

slide-16
SLIDE 16

10

Structural Operational Semantics

1 ↓ a.x

a

− → x x

a

− → x′ x + y

a

− → x′ y + x

a

− → x′ x ↓ x + y ↓ y + x ↓ x

a

− → x′ x · y

a

− → x′ · y x ↓ y

a

− → y′ x · y

a

− → y′ x ↓ y ↓ x · y ↓

slide-17
SLIDE 17

11

Structural Operational Semantics

x∗ ↓ x

a

− → x′ x∗

a

− → x′ · x∗ x ↓ y ↓ x y ↓ x

a

− → x′ x y

a

− → x′ y and v.v. x

c!d

− → x′ y c?d − → y′ x y c!

?d

− → x′ y′ and v.v. x

a

− → x′ a = c!d, c?d ∂c(x)

a

− → ∂c(x′) x ↓ ∂c(x) ↓ x c!

?d

− → x′ τc(x)

τ

− → τc(x′) x

a

− → x′ a = c! ?d τc(x)

a

− → τc(x′) x ↓ τc(x) ↓

slide-18
SLIDE 18

12

Presentation of a Grammar

S T U V W R a a b b b a a b

slide-19
SLIDE 19

12

Presentation of a Grammar

S T U V W R a a b b b a a b S = a.T + a.W T = a.U + b.W U = b.V + b.R V = W = a.R R = b.W + 1

◮ From automaton to recursive specification

slide-20
SLIDE 20

13

From Recursive Specification to Automaton

t

a

− → x P = t P

a

− → x t ↓ P = t P ↓

slide-21
SLIDE 21

14

Algebraic Laws

x + y ∼ = y + x (x + y) + z ∼ = x + (y + z) x + x ∼ = x x + 0 ∼ = x ax + ay ≈ a(x + y) a0 ≈

◮ First four laws: isomorphic automata. But not a congruence! ◮ Distributive law: language preserving, removing non-determinism ◮ 0 is right-zero: only successful termination counts

slide-22
SLIDE 22

15

Definition of Bisimulation

a a a a(1 + 0) + a1 ∼ = a1 + a1 Bisimulation is the strongest congruence containing isomorphism. Every congruence on automata containing isomorphism must contain bisimilarity.

slide-23
SLIDE 23

16

Process Algebra

◮ 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.

slide-24
SLIDE 24

16

Process Algebra

◮ 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.

slide-25
SLIDE 25

17

Removing non-determinism and totalizing

LNCS 5065, Montanari festschrift. S U V W S U + V S + W X a b b b a a a b a b b a

slide-26
SLIDE 26

18

Removing non-determinism and totalizing

S = aU + aV U = bS V = bW + 1 W = 0. S ≈ aU + aV ≈ a(U + V ) + bX U + V ≈ bS + bW + 1 ≈ b(S + W) + 1 + aX S + W ≈ aU + aV + 0 ≈ a(U + V ) + bX X = aX + bX

slide-27
SLIDE 27

19

Removing silent steps

S T W U V S W U V τ a b a a b τ a a τ

slide-28
SLIDE 28

20

Removing silent steps

S = aW + τT T = aU U = τU + bV + τT V = W = 1 S ≈ aW + τT ≈ aW + T ≈ aW + aU U ≈ τU + bV + τT ≈ U + bV + T ≈ bV + aU V = W = 1

slide-29
SLIDE 29

21

Regular expressions

S T a b S ≈ aT + 1 ≈ a(bS + 1) + 1 ≈ abS + a1 + 1 ≈ (ab1)∗ · (a1 + 1) T ≈ bS + 1 ≈ b(aT + 1) + 1 ≈ baT + b1 + 1 ≈ (ba1)∗ · (b1 + 1)

slide-30
SLIDE 30

22

Regular Process

A regular language is a language equivalence class of a finite (non-deterministic) automaton.

slide-31
SLIDE 31

22

Regular Process

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.

slide-32
SLIDE 32

22

Regular Process

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.

slide-33
SLIDE 33

22

Regular Process

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.)

slide-34
SLIDE 34

23

Regular expressions revisited

s t a 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 , ∂.

slide-35
SLIDE 35

24

Pushdown Process

a[ε/1] b[1/ε] a[1/11] b[1/ε] a a a b b b b b a b

slide-36
SLIDE 36

25

Stack, can only terminate when empty

i?0

  • !0

i?1

  • !1

i?0

  • !0

i?1

  • !1

i?0

  • !0

i?1

  • !1

Stack io = 1 +

  • d∈D

i?d.Stack io · o!d.Stack io

slide-37
SLIDE 37

26

Infinite branching

Example: X = 1 + X · a1 has infinite branching. Has head recursion. a a a a a a a a a

slide-38
SLIDE 38

26

Infinite branching

Example: X = 1 + X · a1 has infinite branching. Has head recursion. a a a a a a a a a τ[ε/1] τ[1/11] τ[1/ε] a[1/ε] τ[ε/ε] a[1/ε]

slide-39
SLIDE 39

27

Unbounded branching

X = aX · Y + b1 Y = 1 + c1 Variable Y is transparent. a a a b b b b c c c c c c a c

slide-40
SLIDE 40

28

Pop choice

a[ε/1] a[1/11] b[1/ε] c[ε/ε] c[1/1] b[1/ε] τ[ε/ε] This push-down automaton has no sequential recursive specification.

slide-41
SLIDE 41

28

Pop choice

a[ε/1] a[1/11] b[1/ε] c[ε/ε] c[1/1] b[1/ε] τ[ε/ε] This push-down automaton has no sequential recursive specification. Using parallel composition, it has: X = c.1 + a.(X b.1)

slide-42
SLIDE 42

29

Theorem

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.

slide-43
SLIDE 43

30

Removing restrictions

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) b[z/z] a[z/1z] c[1/ε] τ[z/z] τ[1/ε] B, Pieter Cuijpers, Paul van Tilburg, CONCUR 2008.

slide-44
SLIDE 44

31

Find a different grammar

Stack = Top Stack Top Stack i

  • j

p Stack io = τjp(∂jp(Topio

jp∅ Stack jp))

slide-45
SLIDE 45

32

Specification of always terminating stack

Stack io = 1 + o!∅.Stack io +

  • d∈D

i?d.τjp(∂jp(Topio

jpd Stack jp))

Topio

jpd = 1 + o!d.

  • f∈D∪{∅}

p?f.Topio

jpf +

  • e∈D

i?e.j!d.Topio

jpe

(d ∈ D) Topio

jp∅ = 1 + o!∅.Topio jp∅ +

  • e∈D

i?e.Topio

jpe

slide-46
SLIDE 46

33

Theorem

For every pushdown automaton M there is a regular process p and for every regular process p there is an pushdown automaton M such that the transition system of M is branching bisimilar with the transition system of τi,o(∂i,o(p Stack io))

slide-47
SLIDE 47

33

Theorem

For every pushdown automaton M there is a regular process p and for every regular process p there is an pushdown automaton M such that the transition system of M is branching bisimilar with the transition system of τi,o(∂i,o(p Stack io)) The (always terminating) stack is the prototypical pushdown process. Constitutes a grammar for pushdown processes.

slide-48
SLIDE 48

34

Basic Parallel Process

A parallel pushdown automaton gives a parallel pushdown process. A process p is parallel pushdown iff there is a regular process q with p ↔b τi,o(∂i,o(q Bag)) Bag is given by Bag = 1 +

  • d∈D

i?d.(Bag o!d.1). A basic parallel process is given by a rec.spec. over 1, 0, +, a_, (only interleaving) Any basic parallel process is a parallel pushdown process.

slide-49
SLIDE 49

35

Example

X = c.1 + a.(X b.1) is basic parallel, parallel pushdown and pushdown but not sequential. c c c c b b b b a a a b b b a b

slide-50
SLIDE 50

35

Example

X = c.1 + a.(X b.1) is basic parallel, parallel pushdown and pushdown but not sequential. c c c c b b b b a a a b b b a b The bag is basic parallel, parallel pushdown but not pushdown, not sequential. The stack is sequential and pushdown but not basic parallel, parallel pushdown.

slide-51
SLIDE 51

36

Example

b c a b c b c a b c b c a b c Pushdown and parallel pushdown process that is not basic parallel or sequential. Can be adapted to become pushdown and not parallel pushdown, or parallel pushdown and not pushdown.

slide-52
SLIDE 52

37

Process Classes

regular sequential unbounded PDP BPP PPDP executable

slide-53
SLIDE 53

38

Reactive Turing Machine

τ[/]L τ[/]R a[/1]R b[1/]L a a a τ τ τ b b τ a τ b

slide-54
SLIDE 54

39

Queue that can always terminate

i?0[n/n]L

  • !n[n/]L

i?1[n/n]L τ[n/n]L τ[n/n]L τ[n/n]R τ[/0]R τ[/1]R τ[/]L i?n[/n]R

slide-55
SLIDE 55

40

Executable Process

An executable process is the branching bisimulation equivalence class

  • f a transition system of a Reactive Turing Machine.
slide-56
SLIDE 56

40

Executable Process

An executable process is the branching bisimulation equivalence class

  • f a transition system of a Reactive Turing Machine.

The queue is executable but not push-down.

slide-57
SLIDE 57

40

Executable Process

An executable process is the branching bisimulation equivalence class

  • f a transition system of a Reactive Turing Machine.

The queue is executable but not push-down. A transition system is computable iff it is finitely branching and (with some coding) the set of final states is decidable and for each state, we can determine the set of outgoing transitions.

slide-58
SLIDE 58

40

Executable Process

An executable process is the branching bisimulation equivalence class

  • f a transition system of a Reactive Turing Machine.

The queue is executable but not push-down. A transition system is computable iff it is finitely branching and (with some coding) the set of final states is decidable and for each state, we can determine the set of outgoing transitions. A transition system is effective if its set of transitions and set of final states are recursively enumerable.

slide-59
SLIDE 59

41

Results

The transition system defined by a Reactive Turing Machine is computable. Every effective transition system is branching bisimilar with a transition system of a Reactive Turing Machine. For every RTM M there is a regular process p and for every regular process p there is an RTM M such that the transition system of M is branching bisimilar with the transition system of τi,o(∂i,o(p Queueio))

slide-60
SLIDE 60

42

One queue is two chained queues

Queue Queue i l

slide-61
SLIDE 61

43

Specification of the queue

Queueio = 1 +

  • d∈D

i?d.τl(∂l(Queueil (1 + o!d.Queuelo))) Queueil = 1 +

  • d∈D

i?d.τo(∂o(Queueio (1 + l!d.Queueol))) Queuelo = 1 +

  • d∈D

l?d.τi(∂i(Queueli (1 + o!d.Queueio))) Queueol = 1 +

  • d∈D
  • ?d.τi(∂i(Queueoi (1 + l!d.Queueil)))

Queueli = 1 +

  • d∈D

l?d.τo(∂o(Queuelo (1 + i!d.Queueoi))) Queueoi = 1 +

  • d∈D
  • ?d.τl(∂l(Queueol (1 + i!d.Queueli)))
slide-62
SLIDE 62

44

Conclusion

Integration of automata theory and process theory is beneficial for both theories.

slide-63
SLIDE 63

44

Conclusion

Integration of automata theory and process theory is beneficial for both theories. This integrated theory can be a first-year course in any academic bachelor program in computer science (or related subjects).

slide-64
SLIDE 64

44

Conclusion

Integration of automata theory and process theory is beneficial for both theories. This integrated theory can be a first-year course in any academic bachelor program in computer science (or related subjects). Syllabus available.

slide-65
SLIDE 65

44

Conclusion

Integration of automata theory and process theory is beneficial for both theories. This integrated theory can be a first-year course in any academic bachelor program in computer science (or related subjects). Syllabus available. This provides a basic course in theoretical computer science as always, but at the same time gives a foundation for later courses on formal methods and model checking.

slide-66
SLIDE 66

44

Conclusion

Integration of automata theory and process theory is beneficial for both theories. This integrated theory can be a first-year course in any academic bachelor program in computer science (or related subjects). Syllabus available. This provides a basic course in theoretical computer science as always, but at the same time gives a foundation for later courses on formal methods and model checking. We defined a grammar for all executable processes.

slide-67
SLIDE 67

45

Definition

Informatics is the science and engineering of discrete behavior of interacting information processing agents.