Theory of Interaction Yuxi Fu BASICS, Shanghai Jiao Tong University - - PowerPoint PPT Presentation

theory of interaction
SMART_READER_LITE
LIVE PREVIEW

Theory of Interaction Yuxi Fu BASICS, Shanghai Jiao Tong University - - PowerPoint PPT Presentation

Foundation Model of Interaction Theory of Interaction Yuxi Fu BASICS, Shanghai Jiao Tong University Talk at BASICS 2009, Shanghai, 12-16 October, 2009 Foundation Model of Interaction Models for Modern Computing Modern computing is all about


slide-1
SLIDE 1

Foundation Model of Interaction

Theory of Interaction

Yuxi Fu

BASICS, Shanghai Jiao Tong University

Talk at BASICS 2009, Shanghai, 12-16 October, 2009

slide-2
SLIDE 2

Foundation Model of Interaction

Models for Modern Computing

Modern computing is all about interaction: Turing’s Computation

Closed systems of computation (interaction within)

Milner’s Interaction

Open systems of interaction (interaction without)

slide-3
SLIDE 3

Foundation Model of Interaction

Theory of Interaction aims to provide a model theory for both computation and interaction, in a model independent manner.

slide-4
SLIDE 4

Foundation Model of Interaction

The goal of this talk is to formulate the Thesis on Interaction that extends the Thesis on Computation (Church-Turing Thesis) that deals with computational completeness, which answers to the issue of interactional completeness.

slide-5
SLIDE 5

Foundation Model of Interaction

Synopsis

  • 1. Foundation
  • 2. Model of Interaction
  • 3. Theory of Equality
  • 4. Theory of Expressiveness
  • 5. Theory of Completeness
  • 6. Future Work
slide-6
SLIDE 6

Foundation Model of Interaction

  • I. Foundation
slide-7
SLIDE 7

Foundation Model of Interaction

Content

  • 1. Motivation
  • 2. Principle
  • 3. Number and Function
  • 4. Computation Model as Interaction Model
slide-8
SLIDE 8

Foundation Model of Interaction

  • 1. Motivation
slide-9
SLIDE 9

Foundation Model of Interaction

Motivation

  • 1. To define completeness, we need a universal expressiveness

relation;

  • 2. To define the universal expressiveness relation, everything

has to be model independent;

  • 3. To be able to talk model independently, we must assume

that all models share something in common;

  • 4. To assume that all models share something in common, we

lay down some principles.

slide-10
SLIDE 10

Foundation Model of Interaction

  • 2. Principle
slide-11
SLIDE 11

Foundation Model of Interaction

Object

  • I. Principle of Object.

There are two kinds of objects, the names and the interactants.

slide-12
SLIDE 12

Foundation Model of Interaction

Object

The names are the formalizations of the interfaces. All interactions are via interfaces. All models make use of the same set of interfaces.

slide-13
SLIDE 13

Foundation Model of Interaction

Object

Assumption on the names: N: the set of names, ranged over by a, b, c, d, e, f , g, h; Nv: the set of name variables, ranged over by u, v, w, x, y, z; N ∪ Nv: ranged over by l, m, n, o, p, q.

slide-14
SLIDE 14

Foundation Model of Interaction

Action

  • II. Principle of Action.

There are two aspects of the atomic actions, the internal aspect and the external aspect.

slide-15
SLIDE 15

Foundation Model of Interaction

Action

P

τ

− → P′ indicates that P evolves to P′ by performing an internal action. P

λ

− → P indicates that P evolves to P′ by performing the external action λ.

slide-16
SLIDE 16

Foundation Model of Interaction

Action

A computation is an internal action P

τ

− → P′ such that P = P′. A change of state is an internal action P

τ

− → P′ such that P = P′.

slide-17
SLIDE 17

Foundation Model of Interaction

Observation

The notion of observation is model independent.

slide-18
SLIDE 18

Foundation Model of Interaction

Observation

The only way to make an observation on an interactant is to interact with it. There is absolutely no other way. It follows that the observers and the observees must be in reciprocal positions in a closed model. Consequently the observers have the same observing power as the

  • bservees, no more, no less.
slide-19
SLIDE 19

Foundation Model of Interaction

Observation

Interaction is the reason for Composition. Composition enables Interaction.

slide-20
SLIDE 20

Foundation Model of Interaction

Observation

Non-Interaction is the reason for Localization. Localization disables Interaction.

slide-21
SLIDE 21

Foundation Model of Interaction

Observation

  • III. Principle of Observation.

There are two universal operators, the composition operator and the localization operator.

slide-22
SLIDE 22

Foundation Model of Interaction

Observation

The environment that makes the observation is of the form ( c)( | O) The composition operator allows the observer to observe. The localization operator forbid the observer to observe.

slide-23
SLIDE 23

Foundation Model of Interaction

Consistency

From the point of view of computation, what could be the sharpest difference between two interactants?

slide-24
SLIDE 24

Foundation Model of Interaction

Consistency

The difference can not be sharper than that

  • ne always terminates, and

the other does not always terminate.

slide-25
SLIDE 25

Foundation Model of Interaction

Consistency

From the point of view of interaction, what could be the sharpest difference between two interactants?

slide-26
SLIDE 26

Foundation Model of Interaction

Consistency

The difference can not be sharper than that

  • ne can interact, and

the other can not.

slide-27
SLIDE 27

Foundation Model of Interaction

Consistency

Classification in terms of Computation: An interactant P is terminating if it does not have any infinite internal action sequence P

τ

− →

τ

− → . . ., it is divergent

  • therwise.

Classification in terms of Interaction: An interactant P is observable if ∃λ.P = ⇒ λ − →, it is unobservable otherwise.

slide-28
SLIDE 28

Foundation Model of Interaction

Consistency

  • IV. Principle of Consistency.

A terminating interactant is never equal to a divergent interactant. An observable interactant is never equal to an unobservable interactant.

slide-29
SLIDE 29

Foundation Model of Interaction

Completeness

Since every model is a model of computation, every model must be computationally complete (Turing complete). Since every model is a model of interaction, every model must be interactionally complete.

slide-30
SLIDE 30

Foundation Model of Interaction

Completeness

  • V. Principle of Completeness.

There exists a least expressive model of interaction.

slide-31
SLIDE 31

Foundation Model of Interaction

Five Foundational Principles

  • I. Principle of Object. There are two kinds of objects.
  • II. Principle of Action. There are two kinds of actions.
  • III. Principle of Observation. There are two universal operators.
  • IV. Principle of Consistency. There are two unequal interactants.
  • V. Principle of Completeness. There is a least model.
slide-32
SLIDE 32

Foundation Model of Interaction

  • 3. Number and Function
slide-33
SLIDE 33

Foundation Model of Interaction

Content of Communication

By Principle of Object, there are only three possibilities: The contents of communications are processes The contents of communications are names Anything but processes/names

slide-34
SLIDE 34

Foundation Model of Interaction

Communication Based Process Calculi

Consequently, three kinds of communication based process calculi Process passing calculi Name passing calculi Value passing calculi

must refer to a theory of numbers and a theory of recursive functions

slide-35
SLIDE 35

Foundation Model of Interaction

First Order Logic

B P{r1(t1

1, . . . , t1 k1)/X1, . . . , rn(tn 1, . . . , tn kn)/Xn}

E1 t = t E2 s = t ⇒ t = s E3 r = s ∧ s = t ⇒ r = t S1 t1 = t′

1 ∧ . . . ∧ tk = t′ k ⇒ f(t1, . . . , tk) = f(t′ 1, . . . , t′ k)

S2 t1 = t′

1 ∧ . . . ∧ tk = t′ k ⇒ r(t1, . . . , tk) ⇒ r(t′ 1, . . . , t′ k)

FO1 ∀x.φ ⇒ φ{t/x} FO2 φ ⇒ ∀x.φ FO3 (∀x.(ϕ ⇒ ψ)) ⇒ (∀x.ϕ ⇒ ∀x.ψ)

slide-36
SLIDE 36

Foundation Model of Interaction

Peano Number Theory: PA

PA1 ∀x.(succ(x) = 0) PA2 ∀xy.(succ(x) = succ(y) ⇒ x = y) PA3 ∀x.(x = 0 ∨ ∃y.succ(y) = x) PA4 ∀x.(x < succ(x)) PA5 ∀xy.(x < y ⇒ succ(x) ≤ y) PA6 ∀xy.(¬(x < y) ⇔ y ≤ x) PA7 ∀xy.((x < y) ∧ (y < z) ⇒ x < z) The axioms that are missing: axioms for arithmetic operators, natural induction.

slide-37
SLIDE 37

Foundation Model of Interaction

Peano Number Theory: PA

  • Proposition. The theoremhood of the boolean expressions of PA

is decidable. This is important for the value passing calculi.

slide-38
SLIDE 38

Foundation Model of Interaction

Peano Number Theory: PA

The term model ({0, 1, 2, . . .}, 0, succ, <, =)

slide-39
SLIDE 39

Foundation Model of Interaction

Recursive Function Model: RF

Grammar: f( x) := s(x) ni( x) pj

i(

x) rec(f( x, x′, x′′), f′( x)) µz.f( x, z) f(f1( x), . . . , fl( x))

slide-40
SLIDE 40

Foundation Model of Interaction

Recursive Function Model: RF

Reductional Semantics: s(n) → n+1 nk(n1, . . . , ni) → n pj

i(n1, . . . , ni)

→ nj rec(f( x, x′, x′′), h( x))(n1, . . . , ni, 0) → h(n1, . . . , ni) rec(f( x, x′, x′′), h( x))(n1, . . . , ni, n+1) → R where R ≡ f(n1, . . . , ni, rec(f( x, x′, x′′), h( x))(n1, . . . , ni, n), n).

slide-41
SLIDE 41

Foundation Model of Interaction

Recursive Function Model: RF

Reductional Semantics: µf(n1,...,ni,i)[g] whose evaluation strategy is given by the following reduction rules: µf(n1,...,ni,i)[g] → µf(n1,...,ni,i)[g′] if g → g′ µf(n1,...,ni,i)[0] → i µf(n1,...,ni,i)[l+1] → µf(n1,...,ni,i+1)[f(n1, . . . , ni, i+1)] Now the evaluation of µx.f(n1, . . . , ni, x) is identified to the evaluation of µf(n1,...,ni,0)[f(n1, . . . , ni, 0)].

slide-42
SLIDE 42

Foundation Model of Interaction

Recursive Function Model: RF

Reductional Semantics: If gj → g′

j, where 1 ≤ j ≤ i, then

f(n1, . . . , nj−1, gj, . . . , gi) → f(n1, . . . , nj−1, g′

j, . . . , gi)

slide-43
SLIDE 43

Foundation Model of Interaction

Recursive Function Model: RF

The computational equality ≏ equates two i-ary recursive functions f(x1, . . . , xi), g(x1, . . . , xi) if, for all numerals n1, . . . , ni, the following statement is valid: f(n1, . . . , ni) →∗ n if and only if g(n1, . . . , ni) →∗ n. Some of us would call ≏ applicative bisimilarity.

slide-44
SLIDE 44

Foundation Model of Interaction

  • 4. Computation Model as Interaction Model
slide-45
SLIDE 45

Foundation Model of Interaction

From Computation Model to Interaction Model

How do we see RF as an interaction model? It is not just possible but also enlightening to see a computation model in an interactive framework.

slide-46
SLIDE 46

Foundation Model of Interaction

From Computation Model to Interaction Model

Recall that what made us to introduce the channels in the first place is precisely to internalize the actions like input-a-value and

  • utput-a-result.
slide-47
SLIDE 47

Foundation Model of Interaction

From Computation Model to Interaction Model

For the i-ary recursive function f(x1, . . . , xi) the intuition is that its

  • perational semantics should describe the following three stage

activities:

1 it picks up i numerals from the environment in a sequential

manner;

2 it then carries out the computation prescribed by the function;

and finally

3 it delivers the result to the targeted receivers.

slide-48
SLIDE 48

Foundation Model of Interaction

From Computation Model to Interaction Model

The I-Calculus T := F b

a1...ai(f(x1, . . . , xi)) | 0 | T | T ′ | (a)T

slide-49
SLIDE 49

Foundation Model of Interaction

From Computation Model to Interaction Model

Input F b

a1a2...ai(f(x1, . . . , xi)) a1(n)

− → F b

a2...ai(f(n, x2, . . . , xi))

Output F b(n)

b(n)

− → 0 Computation F b(f)

τ

− → F b(g) f → g Interaction S

a(n)

− → S′ T

a(n)

− → T ′ S | T

τ

− → S′ | T ′

slide-50
SLIDE 50

Foundation Model of Interaction

From Computation Model to Interaction Model

A complete action sequence of F b

a1...ai(f(x1, . . . , xi)) is either of the

form F b

a1...ai(f(x1, . . . , xi)) a1n1

− → . . .

aini

− → →∗

bn

− → 0 that outputs the result at b, or of the following divergent form F b

a1...ai(f(x1, . . . , xi)) a1n1

− → . . .

aini

− → → . . .

slide-51
SLIDE 51

Foundation Model of Interaction

From Computation Model to Interaction Model

Some properties: (i) F b(m) =I F b(n) if and only if m = n. (ii) F b(f) =I F b(n) if and only if f →∗ n. (iii) F b(f) diverges if and only if f diverges. (iv) (a1 . . . ai)(F b

a1...ai(f(

x)) | F a1(n1) | . . . | F ai(ni)) =I F b(f(n1, . . . , ni)) as long as b ∈ {a1 . . . ai}. (v) F b

a1...ai(f(

x)) =I F b

a1...ai(g(

x)) if and only if f( x) ≏ g( x), where f( x), g( x) are two i-ary functions.

slide-52
SLIDE 52

Foundation Model of Interaction

  • II. Model of Interaction
slide-53
SLIDE 53

Foundation Model of Interaction

Content

  • 1. Function Model
  • 2. Program Model
  • 3. Machine Model
slide-54
SLIDE 54

Foundation Model of Interaction

Function Model

What need be introduced to replace the Computation Rule of the I-Calculus by additional interaction rules?

slide-55
SLIDE 55

Foundation Model of Interaction

Function Model

The followings ought to be clear: To model the input actions the input term a(x).T is introduced. To provide the output actions the output term a( ) is

  • incorporated. More control can be achieved by the output

term with continuation a( ).T. To define the minimization function, the conditional term if ϕ then T is a must. To interpret the recursion function, the parametric definition is a choice.

slide-56
SLIDE 56

Foundation Model of Interaction

Function Model

Consider the following term M(x) = if ϕ(x) then a(f (t)) else M(x + 1) (1) Questions that can be asked about (1): What are ϕ(x) and t from? Is ϕ(x) decidable? Is f a decidable function? Who does the calculation of f (n)? What if ϕ(n) for no n?

slide-57
SLIDE 57

Foundation Model of Interaction

Function Model

The VPC model: T :=

  • 1≤i≤n

υi.Ti | if ϕ then T | D(a1, . . . , an) | T | T ′ | (a)T where the prefix υi is defined by the following grammar υ := a(x) | a(α) where α is a term of the Peano Theory.

slide-58
SLIDE 58

Foundation Model of Interaction

Function Model

Action

  • 1≤i≤n υi.Ti

a(n)

− → Ti{n/x} 1 ≤ i ≤ n and υi = a(x)

  • 1≤i≤n υi.Ti

a(n)

− → Ti 1 ≤ i ≤ n, υi = a(α) and ⊢ α = n Interaction S

a(n)

− → S′ T

a(n)

− → T ′ S | T

τ

− → S′ | T ′ S

a(n)

− → S′ T

a(n)

− → T ′ S | T

τ

− → S′ | T ′

slide-59
SLIDE 59

Foundation Model of Interaction

Function Model

Condition T

λ

− → T ′ if ϕ then T

λ

− → T ′ ⊢ ϕ Recursion T{ c/ x}

λ

− → T ′ D( c)

λ

− → T ′ D( x) = T

slide-60
SLIDE 60

Foundation Model of Interaction

Function Model

VPC is the process calculus version of the recursion theory.

slide-61
SLIDE 61

Foundation Model of Interaction

Program Model

The λ-terms are defined by the following grammar: M := x | λx.M | MM′ The β-reduction of the λ-terms is defined by the following rules: (λx.M)N → M{N/x} β M → M′ MN → M′N αL N → N′ MN → MN′ αR M → M′ λx.M → λx.M′ ξ

slide-62
SLIDE 62

Foundation Model of Interaction

Program Model

It appears at first sight that the interactive model of Deterministic λ-Calculus is straightforward. Its syntax is T := X | a(X).T | aT | T | T ′ | (a)T

slide-63
SLIDE 63

Foundation Model of Interaction

Program Model

It appears at first sight that the interactive model of Deterministic λ-Calculus is straightforward. Its syntax is T := X | a(X).T | aT | T | T ′ | (a)T As it turns out the model so defined is not a legal citizen in Theory

  • f Interaction.
slide-64
SLIDE 64

Foundation Model of Interaction

Program Model

A crucial paradigm shift from the functional scenario to the object

  • riented scenario was made by Milner, Parrow and Walker.

The original formulation of the π-calculus was troubled by its treatment of the names.

slide-65
SLIDE 65

Foundation Model of Interaction

Program Model

Instead of passing around processes, the π-Calculus send and receive names. T :=

  • 1≤i≤n

πi.Ti | [p=q]T | [p=q]T | !π.T | T | T ′ | (a)T where the prefix πi (π) is defined by the following grammar π := n(x) | nm

slide-66
SLIDE 66

Foundation Model of Interaction

Program Model

Action

  • 1≤i≤n πi.Ti

ac

− → Ti{c/x} 1 ≤ i ≤ n and πi = a(x)

  • 1≤i≤n πi.Ti

ac

− → Ti 1 ≤ i ≤ n and πi = ac Interaction S

ac

− → S′ T

ac

− → T ′ S | T

τ

− → S′ | T ′ S

ac

− → S′ T

a(c)

− → T ′ S | T

τ

− → (c)(S′ | T ′)

slide-67
SLIDE 67

Foundation Model of Interaction

Program Model

Condition T

λ

− → T ′ [c=c]T

λ

− → T ′ T

λ

− → T ′ [a=b]T

λ

− → T ′ Recursion !a(x).T

ac

− → T{c/x} | !a(x).T !ac.T

ac

− → T | !ac.T

slide-68
SLIDE 68

Foundation Model of Interaction

Program Model

Some variants:

  • 1. π− is obtained from π by removing the guarded choice operator.
  • 2. πM is obtained from π− by removing the match/mismatch
  • perators.
  • 3. Merro and Sangiorgi’s local π-calculus, denoted by πL:

π := a(x) | nm

  • 4. Dually we may define πR:

π := n(x) | am

slide-69
SLIDE 69

Foundation Model of Interaction

Program Model

Equalities for the π-calculus: early equivalence, late equivalence, barbed equivalence, open equivalence, quasi open equivalence, barbed open equivalence, . . . These equalities are not the same if we have the uniform treatment

  • f the names!
slide-70
SLIDE 70

Foundation Model of Interaction

Program Model

The difference disappears if we adopt the dichotomy on the names.

slide-71
SLIDE 71

Foundation Model of Interaction

Machine Model

The basic idea is to replace the input tapes, the work tapes and the output tapes of the Turing Machines by input channels, accumulators and output channels respectively.

slide-72
SLIDE 72

Foundation Model of Interaction

Machine Machine

An Atomic Interactive Machine M is a tuple (I, O, R0(n0), R1(n1), A(n), P, l) Diagrammatically n A P n0 R0 n1 R1

❚ ❚ ✔ ✔ ✦✦✦✦

a1 . . . am

PPP P q ✏✏✏ ✏ ✶

b1 bn

PPP P q

. . .

✏✏✏ ✏ ✶ ✲ l : . . .

slide-73
SLIDE 73

Foundation Model of Interaction

Machine Model

A program consists of a finite list of instructions: 1 : I1 2 : I2 . . . n : In n + 1 : Stop

slide-74
SLIDE 74

Foundation Model of Interaction

Machine Model

Instructions: (i) Input a, where a ∈ I, picks up a natural number at channel a and update the content of A by the received number. (o) Output b, where b ∈ O, fetches the number stored in A and delivers the number at channel b. (s) Stop is the instruction that terminates the machine. (r) Read i, where i is either 0 or 1, copies the content of the register Ri to the accumulator A. (w) Write i, where i is either 0 or 1, copies the content of the accumulator A to the register Ri. (a) instructions for arithmetic operation.

slide-75
SLIDE 75

Foundation Model of Interaction

Machine Model

P(l) = Input a (I, O, R0(n0), R1(n1), A(n), P, l)

a(m)

− → (I, O, R0(n0), R1(n1), A(m), P, l + 1) P(l) = Output b (I, O, R0(n0), R1(n1), A(n), P, l)

b(n)

− → (I, O, R0(n0), R1(n1), A(n), P, l + 1)

slide-76
SLIDE 76

Foundation Model of Interaction

Machine Model

P(l) = Read i and i ∈ {0, 1} (I, O, R0(n0), R1(n1), A(n), P, l)

τ

− → (I, O, R0(n0), R1(n1), A(ni), P, l + 1) P(l) = Write 0 (I, O, R0(n0), R1(n1), A(n), P, l)

τ

− → (I, O, R0(n), R1(n1), A(n), P, l + 1) P(l) = Write 1 (I, O, R0(n0), R1(n1), A(n), P, l)

τ

− → (I, O, R0(n0), R1(n), A(n), P, l + 1)

slide-77
SLIDE 77

Foundation Model of Interaction

Machine Model

The grammar of IM: M := AIM | M | M′ | (a)M And the interaction rule M

a(n)

− → M′ N

a(n)

− → N′ M | N

τ

− → M′ | N′

slide-78
SLIDE 78

Foundation Model of Interaction

Machine Model

From IM to INM.

slide-79
SLIDE 79

Foundation Model of Interaction

Summary

We have seen how to think of a computation model as an interaction model. We have seen a general method to define a model of interaction.

slide-80
SLIDE 80

Foundation Model of Interaction

Summary

Exercise: What are the relative expressive power of I, VPC, π and IM according to your favorite set of criteria?

slide-81
SLIDE 81

Foundation Model of Interaction

Thanks