Interactive systems with registers and voices Gheorghe Stefanescu - - PowerPoint PPT Presentation

interactive systems with registers and voices
SMART_READER_LITE
LIVE PREVIEW

Interactive systems with registers and voices Gheorghe Stefanescu - - PowerPoint PPT Presentation

Rv-systems Interactive systems with registers and voices Gheorghe Stefanescu Faculty of Mathematics and Computer Science University of Bucharest Pisa, Italy, 4-th June, 2007 Slide 1/88 Rv-systems / Stefanescu / Pisa, 2007 Rv-systems


slide-1
SLIDE 1

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 1/88

Interactive systems with registers and voices

Gheorghe Stefanescu

Faculty of Mathematics and Computer Science University of Bucharest Pisa, Italy, 4-th June, 2007

slide-2
SLIDE 2

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 2/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-3
SLIDE 3

History

Rv-systems / Stefanescu / Pisa, 2007 Slide 3/88

History

  • space-time duality “thesis”

– Stefanescu, Network algebra, Springer 2000

  • finite interactive systems

– Stefanescu, Marktoberdorf Summer School 2001

  • rv-systems (interactive systems with registers and voices)

– Stefanescu, NUS, Singapore, summer 2004

  • structured rv-systems

– Stefanescu, Dragoi, fall 2006

slide-4
SLIDE 4

ST-Dual picture

Rv-systems / Stefanescu / Pisa, 2007 Slide 4/88

High level: x:Int, y:Array[1..10] of Int; tape space time High level: temporal data stream Software memory state job requirement new job new state component

ST-Dual picture

slide-5
SLIDE 5

Processes and transactions

Rv-systems / Stefanescu / Pisa, 2007 Slide 5/88

Processes and transactions

Proc 1 Proc 2 Proc 3 Trans 1 Trans 2 Trans 3

slide-6
SLIDE 6

High level temporal structures

Rv-systems / Stefanescu / Pisa, 2007 Slide 6/88

sLinkedList 2001 2002 2003 2001 2003 2002 next week I will be

  • n Moon

next week

  • n Moon

I will be 5 3 7 3 1 tBool 1 3 3 7 5 sArray tArray sInt tInt tLinkedList sBool

data with usual (spatial) representation: sBool, sInt, sArray, sLinkedList, etc. and their time dual (i.e., data with temporal representation): tBool, tInt, tArray, tLinkedList, etc.

slide-7
SLIDE 7

..High level temporal structures

Rv-systems / Stefanescu / Pisa, 2007 Slide 7/88

Three allocations of a temporal linked list on a stream: The 1st starts at time t = 10 and is

time : 910111213141516171819202122232425262728293031323334353637 .. I w i l l b e

  • n

M o o n n e x t w e e k .. ..1112131415161718192021222324252627282930313233343536⊥ ..

The 2nd allocation starts at time t = 19 and is

time : 910111213141516171819202122232425262728293031323334353637 .. n e x t w e e k I w i l l b e

  • n

M o o n .. ..1112131415161718⊥202122232425262728293031323334353610 ..

The 3rd allocation starts at time t = 21 and is

time : 910111213141516171819202122232425262728293031323334353637 .. b e e e e I i k l l M o o o n n n t w w x .. ..34162726323517123620231024⊥25112830293113141815221933 ..

slide-8
SLIDE 8

Space-time converters; computation in space

Rv-systems / Stefanescu / Pisa, 2007 Slide 8/88

space−to−time time−to−space n x y − computed in space n x y − in time n y 2 y y ... n y ... ... ... ... y ... ... ... ... ... ... y ... ... ... n y 2 y

space-to-time and time-to-space converters may be used to change computation in time into a computation in space paradigm

slide-9
SLIDE 9

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 9/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-10
SLIDE 10

Srv-programs for perfect numbers

Rv-systems / Stefanescu / Pisa, 2007 Slide 10/88

A specification for perfect numbers: 3 components Cx,Cy,Cz where:

  • Cx: read n from north and write

n⌢⌊n/2⌋⌢(⌊n/2⌋−1)⌢...⌢2⌢1 on east;

  • Cy: read n⌢⌊n/2⌋⌢(⌊n/2⌋−1)⌢...⌢2⌢1 from west and

write n⌢φ(⌊n/2⌋)⌢...⌢φ(2)⌢φ(1) on east [φ(k) = “if k divides n then k else 0”];

  • Cz:

read n⌢φ(⌊n/2⌋)⌢...⌢φ(2)⌢φ(1) from west and subtract from the first the other numbers. These components are composed horizontally. The global input-output specification: if the input number in Cx is n, then the output number in Cz is 0 iff n is perfect.

slide-11
SLIDE 11

..Srv-programs for perfect numbers

Rv-systems / Stefanescu / Pisa, 2007 Slide 11/88

Two scenarios for perfect numbers:

x=6 X tx=6 Y tx=6 Z x=3 U y=6 tx=3 V z=6 tx=3W x=2 U y=6 tx=2 V z=3 tx=2W x=1 U x=0 y=6 tx=1 V y=6 z=1 tx=1W z=0 x=5 X tx=5 Y tx=5 Z x=2 U y=5 tx=2 V z=5 tx=0W x=1 U x=0 y=5 tx=1 V y=4 z=5 tx=1W z=4

(a) (b) Types are denoted as west|north → east|south

Our (s)rv-scenarios are similar with the tiles of Bruni-Gadducci-Montanari, et.al.

slide-12
SLIDE 12

..Srv-programs for perfect numbers

Rv-systems / Stefanescu / Pisa, 2007 Slide 12/88

The 1st AGAPIA program Perfect1 (construction by rows): (X # Y # Z) % while t(x>0){U # V # W} Its type is Perfect1 : nil|sn;nil;nil → nil|sn;sn;sn. Modules:

X:: module{listen nil;}{read x:sn;}

{tx:tn; tx=x; x=x/2;}{speak tx;}{write x;}

Y:: module{listen tx:tn;}{read nil;}

{y:sn; y=tx;}{speak tx;}{write y;}

Z:: module{listen tx:tn;}{read nil;}

{z:sn; z=tx;}{speak nil;}{write z;}

U:: module{listen nil;}{read x:sn;}

{tx:tn; tx=x; x=x-1;}{speak tx;}{write x;}

V:: module{listen tx:tn;}{read y:sn;}

{if(y%tx != 0) tx=0;}{speak tx;}{write y;}

W:: module{listen tx:tn;}{read z:sn}

{z=z-tx;}{speak nil;}{write z;}

slide-13
SLIDE 13

..Srv-programs for perfect numbers

Rv-systems / Stefanescu / Pisa, 2007 Slide 13/88

The 2nd AGAPIA program Perfect2 (construction by columns): (X % while t(x>0){U} % U1) # (Y % while t(tx>-1){V} % V1) # (Z % while t(tx>-1){W} % W1) Its type is Perfect2 : nil|sn;nil;nil → nil|nil;nil;sn. New modules:

U1:: module{listen nil;}{read x:sn;}

{tx:tn; tx=-1;}{speak tx;}{write nil;}

V1:: module{listen tx:tn;}{read y:sn;}

{null;}{speak tx;}{write nil;}

W1:: module{listen tx:tn;}{read z:sn}

{null;}{speak nil;}{write z;}

slide-14
SLIDE 14

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 14/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-15
SLIDE 15

Grids (or planar words)

Rv-systems / Stefanescu / Pisa, 2007 Slide 15/88

A grid (or planar word) is

  • a rectangular two-dimensional area
  • filled in with letters from a given alphabet

Example:

aabbabb abbcdbb bbabbca ccccaaa

(not used here:

aabb... ..bc..b bbabbca ..c...a

) A grid p has a north (resp. south, west, east) border denoted as n(p) (resp. s(p),w(p),e(p))

Notice: The requirement to have a rectangular area may be weakened, e.g., one may require to have a connected area, not a rectangular one.

slide-16
SLIDE 16

..Grids (or planar words)

Rv-systems / Stefanescu / Pisa, 2007 Slide 16/88

Causality in a grid/scenario:

h g f e d c b a

Action vs. inter-action: (a)

Z Y X

b a b a

(b)

a b a b

X Y Z

  • a two-ways interaction [in (a)]
  • ... and its grid/scenario representation [in (b)]
slide-17
SLIDE 17

The flattening operator

Rv-systems / Stefanescu / Pisa, 2007 Slide 17/88

The flattening operator ♭ : LangGrids(V) → LangWords(V) maps sets of grids to sets of strings representing their topological

  • sorting. Example:

—start with

abcd efgh ; there is one minimal element a; after its

deletion we get

bcd efgh ;

—the minimal elements are b and e; suppose we choose b; what remains is

cd efgh ; and so on;

—finally a usual word, say abecfgdh, is obtained. Actually, ♭(

abcd efgh ) =

{abcdefgh,abcedfgh,abcefdgh,abcefgdh,abecdfgh, abecfdgh,abecfgdh,abefcdgh,abefcgdh,aebcdfgh, aebcfdgh,aebcfgdh,aebfcdgh,aebfcgdh}

slide-18
SLIDE 18

Composition and identities on grids

Rv-systems / Stefanescu / Pisa, 2007 Slide 18/88

. . .. w v v w

  • horizontal composition v⊲w

—it is defined only if e(v) = w(w) —v⊲w is the word obtained putting v on the left of w

  • vertical composition v·w

—it is defined only if s(v) = n(w) —v·w is the word obtained putting v on top of w

  • vertical identity εk:

—with w(εk) = e(εk) = 0 and n(εk) = s(εk) = k

  • horizontal identity λk:

—with w(λk) = e(λk) = k and n(λk) = s(λk) = 0

slide-19
SLIDE 19

Two-dimensional regular expressions

Rv-systems / Stefanescu / Pisa, 2007 Slide 19/88

Signature: two sets of regular algebra operators, sharing the additive part +, 0, ·, ⋆, |, ⊲, †, − —(+,0,·, ⋆, |) - a Kleene signature for the vertical dimension —(+,0,⊲, †,−) - a Kleene signature for the horizontal dimension Two-dimensional regular expressions (denoted 2RegExp(V)): E ::= a(∈ V) | 0 | E +E | E ∩E | E ·E | E⋆ | | | E ⊲E | E† | − Theorem: 2RegExp(V) enriched with letter-to-letter homomorphisms are equivalent with FIS’s (finite interactive systems).

slide-20
SLIDE 20

From expressions to sets of grids

Rv-systems / Stefanescu / Pisa, 2007 Slide 20/88

Interpretation (from expressions to sets of grids) | | : 2RegExp(V) → LangGrids(V)

  • |a| = {a}; |0| = /

0; |E +F| = |E|∪|F|

  • ||| = {ε0,...,εk,...}
  • |E ·F| = {v·w: v ∈ |E| & w ∈ |F|}
  • |E⋆| = {v1 ·...·vk : k ∈ IN & v1,...,vk ∈ |E|}∪|||
  • |−| = {λ0,...,λk,...}
  • |E ⊲F| = {v⊲w: v ∈ |E| & w ∈ |F|}
  • |E†| = {v1 ⊲...⊲vk : k ∈ IN & v1,...,vk ∈ |E|}∪|−|
slide-21
SLIDE 21

Finite interactive systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 21/88

Example (finite interactive system): A FIS S and its graphical representation:

❅ ❅ ❅

c

♥ ✒✑ ✓✏

2

✒✑ ✓✏

A

❅ ❅ ❅

a

♥ ✒✑ ✓✏

B

✒✑ ✓✏

1

❅ ❅ ❅

b

✲ ✛ ✛ ✲ ✻ ❄ ❄ ✻ ✲ ✲ ❄ ❄ ❄ ✲

“cross” representation:

  • 1

A a B 2

,

2 A c A 2

, and

1 B b B 1

  • A,1 are initial
  • B,2 final
  • r textual representation
  • a:<A|1>-><B|2>, etc.
slide-22
SLIDE 22

Scenarios, accepting criteria

Rv-systems / Stefanescu / Pisa, 2007 Slide 22/88

Example: A successful scenario for recognizing a grid:

  • Given a grid w =

abb cab cca

, start with initial states/classes on north/west borders;

  • parse the grid: w0 =

1 1 1 Aa b b Ac a b Ac c a

; w1 =

1 1 1 AaBb b 2 Ac a b Ac c a

; w2 =

1 1 1 AaBbBb 2 1 Ac a b Ac c a

; w3 =

1 1 1 AaBbBb 2 1 AcAa b 2 Ac c a

; ...; w9 =

1 1 1 AaBbBbB 2 1 1 AcAaBbB 2 2 1 AcAcAaB 2 2 2

  • The grid is recognized if, after parsing, only final states/classes

are on south/east borbers

L(S) = { a’s on the diagonal, top-right half of b’s, and bottom-left half of c’s}.

slide-23
SLIDE 23

State projection and class projection

Rv-systems / Stefanescu / Pisa, 2007 Slide 23/88

Familiar NFA’s (nondeterministic finite automata) are obtained ne- glecting one dimension

  • state projection nfa state(S)

—obtained neglecting the class transforming part

  • class projection nfa class(S)

—obtained neglecting the state transforming part projections may lose information

slide-24
SLIDE 24

Projections, example

Rv-systems / Stefanescu / Pisa, 2007 Slide 24/88

For the above this FIS, the grid language may be obtained from the languages of its projection nfa as follows: L(S) = L(state(S))† ∩L(class(S))⋆ Actually, L(S) = (b⋆ ·a·c⋆)† ∩(c† ⊲a⊲b†)⋆ Fact:

  • 1. Such a decomposition holds for all FIS’s with distinct labels on

their transitions.

  • 2. By enriching regular expressions with homomorphisms, one

gets a representation theorem for all FIS’s.

slide-25
SLIDE 25

FIS vs. 2-dimensional languages

Rv-systems / Stefanescu / Pisa, 2007 Slide 25/88

Theorem: The following are equivalent for a 2-dimensional language L (called recognizable two-dimensional language; their class is denoted by REC):

  • 1. L is recognized by a on-line tessellation automaton;
  • 2. L is defined by a tile systems (i.e., local lattice languages

closed to letter-to-letter homomorphisms);

  • 3. L is defined by an existential monadic second order for-

mula; etc. See: Giammarresi-Restivo (1997), or Lindgren-Moore-Nordahl (1998);

a useful web-page is B.Borchert’s page at

http://math.uni-heidelberg.de/logic/bb/2dpapers.html

Notice: 2-dimensional languages are also known as “picture” languages.

slide-26
SLIDE 26

..FIS vs. 2-dimensional languages

Rv-systems / Stefanescu / Pisa, 2007 Slide 26/88

Theorem: A set of grids is recognizable by a finite interactive system iff it is recognizable by a tiling system. This shows that the class of FIS recognizable grid languages co- incides with REC, so we may inherit many results known for 2- dimensional languages. Two important ones are: Corollaries:

  • 1. Context-sensitive word languages coincide with the projection
  • n the 1st row of the FIS recognizable grid languages.
  • 2. The emptiness problem for FIS’s is undecidable.
slide-27
SLIDE 27

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 27/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-28
SLIDE 28

Finite interactive systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 28/88

Finite interactive systems:

A B 1 a b c 2

  • states: 1,2 [1-initial; 2-final]
  • classes: A,B [A-initial; B-final]
  • transitions: a,b,c

Parsing procedure (to recognize grids): A parssing for

abb cab cca

:

1 1 1 Aa b b Ac a b Ac c a 1 1 1 AaBb b 2 Ac a b Ac c a 1 1 1 AaBbBb 2 1 Ac a b Ac c a 1 1 1 AaBbBb 2 1 AcAa b 2 Ac c a

...

1 1 1 AaBbBbB 2 1 1 AcAaBbB 2 2 1 AcAcAaB 2 2 2

slide-29
SLIDE 29

RV-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 29/88

RV-systems:

  • An rv-system (interactive system with registers and voices)

is a FIS enriched with: – registers associated to its states and voices associated to its classes; – appropriate spatio-temporal transformations for ac- tions. We study rv-systems specified by rv-programs (see below)

  • A computation is described by a scenario like in a FIS, but

with concrete data around each action.

slide-30
SLIDE 30

..RV-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 30/88

An rv-program (for perfect numbers):

in: A,1; out: D,2 X::

(A,1) x : sInt tx : tInt; tx = x; x = x/2; goto [B,3];

Y::

(B,1) y : sInt tx : tInt y = tx; goto [C,2];

Z::

(C,1) z : sInt tx : tInt z = tx; goto [D,2];

U::

(A,3) x : sInt tx : tInt; tx = x; x = x − 1; if (x > 0) goto [B,3] else goto [B,2];

V::

(B,2) y : sInt tx : tInt if(y%tx != 0) tx = 0; goto [C,2];

W::

(C,2) z : sInt tx : tInt z = z − tx; goto [D,2];

slide-31
SLIDE 31

..RV-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 31/88

Scenario:

1: x=4 A: X 1: y=nil B: tx=4 Y 1: z=nil C: Z D: 3: x=2 A: U 2: y=4 B: tx=2 V 2: z=4 C: W D: 3: x=1 A: U 2: x=0 2: B: tx=1 V 2: 2: z=2 C: W D: 2: z=1

Operational semantics:

  • defined in terms of scenarious

Relational semantics:

  • input-output relation generated by all possible scenarious
slide-32
SLIDE 32

..RV-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 32/88

Associating a FIS:

U2 V W B C D X Y Z 1 A 2 U1 3

  • r, equivalently,

1 A X B 3

,

1 B Y C 2

,

1 C Z D 2

,

3 A U1 B 3

,

3 A U2 B 2

,

2 B V C 2

,

2 C W D 2

slide-33
SLIDE 33

..RV-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 33/88

... and a grid language:

X Y Z U1 V W . . . U1 V W U2 V W

These grids may be decomposed:

  • by rows
  • by columns, then each column by rows

leading to various equivalent structured programming variants for this program.

slide-34
SLIDE 34

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 34/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-35
SLIDE 35

Structured rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 35/88

Syntax: X ::= module{listen t vars;}{read s vars;} {code;}{speak t vars;}{write s vars;} P ::= X | if(C)then{P}else{P}| P%P | P#P | P$P | while t(C){P} | while s(C){P}| while st(C){P} More general operators: Composition and iterated composition statements are instances of a unique, more general, but less “struc- tured” form (only the tv/sv parts of the connecting interfaces are to be matched):

  • P1 comp{tv}{sv} P2
  • while{tv}{sv}{C}{P}

a b c d p q a’ c’ b’ d’ q p a b p p d c q q

slide-36
SLIDE 36

AGAPIA

Rv-systems / Stefanescu / Pisa, 2007 Slide 36/88

Basic characteristics of AGAPIA

  • space-time invariant
  • high-level temporal data structures
  • computation extends both in time and space
  • a structural, compositional model
  • simple operational semantics (using scenarios)
  • simple relational semantics
slide-37
SLIDE 37

AGAPIA v0.1: Syntax

Rv-systems / Stefanescu / Pisa, 2007 Slide 37/88

Syntax of AGAPIA v0.1:

Interfaces SST ::= nil | sn | sb | (SST ∪SST) | (SST,SST) | (SST)∗ ST ::= (SST) | (ST ∪ST) | (ST;ST) | (ST;)∗ STT ::= nil | tn | tb | (STT ∪STT) | (STT,STT) | (STT)∗ TT ::= (STT) | (TT ∪TT) | (TT;TT) | (TT;)∗ Expressions V ::= x : ST | x : TT | V(k) | V.k | V.[k] | V@k | V@[k] E ::= n | V | E +E | E ∗E | E −E | E/E B ::= b | V | B&&B | B||B | !B | E < E Programs W ::= null | new x : SST | new x : STT | x := E | i f (B){W}else{W} | W;W | while(B){W} M ::= module{listen x : STT}{read x : SST} { W }{speak x : STT}{write x : SST} P ::= null | M | i f (B){P}else{P} | P%P | P#P | P$P | while t(B){P} | while s(B){P} | while st(B){P}

slide-38
SLIDE 38

Example: Termination detection

Rv-systems / Stefanescu / Pisa, 2007 Slide 38/88

Example: A program for distributed termination detection

P= I1# for s(tid=0;tid<tm;tid++){I2}# $ while st(!(token.col==white && token.pos==0)){ for s(tid=0;tid<tm;tid++){R}}

where:

I1= module{listen nil}{read m}{ tm=m; token.col=black; token.pos=0; }{speak tm,tid,msg[ ],token(col,pos)}{write nil} I2= module{listen tm,tid,msg[ ],token(col,pos)} {read nil}{ id=tid; c=white; active=true; msg[id]=null; }{speak tm,tid,msg[ ],token(col,pos)} {write id,c,active}

slide-39
SLIDE 39

..Example: Termination detection

Rv-systems / Stefanescu / Pisa, 2007 Slide 39/88

R= module{listen tm,tid,msg[ ],token(col,pos)} {read id,c,active}{ if(msg[id]!=emptyset){ //take my jobs msg[id]=emptyset; active=true;} if(active){ //execute code, send jobs, update color delay(random time); r=random(tm-1); for(i=0;i<r;i++){ k=random(tm-1); if(k!=id){msg[k]=msg[k]∪{id}}; if(k<id){c=black};} active=random(true,false);} if(!active && token.pos==id){ //termination if(id==0)token.col=white; if(id!=0 && c==black){token.col=black;c=white}; token.pos=token.pos+1[mod tm];} }{speak tm,tid,msg[ ],token(col,pos)} {write id,c,active}

slide-40
SLIDE 40

..Example: Termination detection

Rv-systems / Stefanescu / Pisa, 2007 Slide 40/88

P0 P1 Pk P3 P2

A run (for termintation detection program)

...

R R

... ... ...

I1 R R I2 I2 I1# for s(tid=0;tid<tm;tid++){I2}# $ while st(!(token.col==white && token.pos==0)){ for s(tid=0;tid<tm;tid++){R}}

slide-41
SLIDE 41

AGAPIA v0.1: Syntax

Rv-systems / Stefanescu / Pisa, 2007 Slide 41/88

Syntax of AGAPIA v0.1: Interface types We use two special separators “,” and “;” On spatial interfaces:

  • “,” separates the types used in a process
  • “;” separates the types used in different processes

On temporal interfaces:

  • “,” separates the types used within a transaction
  • “;” separates the types used in different transactions
slide-42
SLIDE 42

Interface types

Rv-systems / Stefanescu / Pisa, 2007 Slide 42/88

Simple spatial types are defined by: SST ::= nil | sn | sb | (SST ∪SST) | (SST,SST) | (SST)∗ (“,” - associative with “nil” neutral element; “∪” - associative) Example: ((((sn)∗)∗,sb,(sn,sb,sn)∗)∗,(sb∪sn)) represents the folowing data structure (for a process)

x: struc1[], where struc1 = ( a: Int[][], b: Bool, c: struc2[], where struc2 = (p:Int, q:Bool, r:Int) ), y: Bool or Int

Simple temporal types — similar

slide-43
SLIDE 43

Interface types

Rv-systems / Stefanescu / Pisa, 2007 Slide 43/88

Spatial types are defined by:: ST ::= nil | (SST) | (ST ∪ST) | (ST;ST) | (ST;)∗ (“;” - associative with “nil” neutral element; “∪” - associative) Example: ((sn)∗)∗;nil;sb;((sn)∗;)∗ represents a collection of processes (A,B,C,D), where – A is a process using an array of arrays of integers – B is a process with no starting spatial data – C is a process using a boolean variable – D is an array of processes, each process using an array of integers Temporal types — similar

slide-44
SLIDE 44

Interface types

Rv-systems / Stefanescu / Pisa, 2007 Slide 44/88

Reshaping types

  • interface types may be changed using special morphisms
  • examples (sn;)∗ → (sn)∗ and (tn;)∗ → (tn)∗ (left)

b1 b2 ... bn (b1,...,bn) a1 a2 ... am (a1,...,am)

a1 a1 a2 ... am b1 b2 ... bn a2 ... am ... (a1,...,am) (a1,...,am) Init_H Init_V X bn b2 b1 (b1,...,bn) (b1,...,bn) Test

slide-45
SLIDE 45

AGAPIA v0.1: Syntax

Rv-systems / Stefanescu / Pisa, 2007 Slide 45/88

Expressions Variables V ::= x : ST | x : TT | V(k)| V.k | V.[k] | V@k | V@[k] Arithmetic expressions E ::= n | V | E +E | E ∗E | E −E | E/E Boolean expressions B ::= b | V | B&&B | B||B | !B | E < E

slide-46
SLIDE 46

..AGAPIA v0.1: Syntax

Rv-systems / Stefanescu / Pisa, 2007 Slide 46/88

Programs Simple while programs W ::= null | new x : SST | new x : STT | x := E | if(B){W}else{W} | W;W | while(B){W} Modules M ::= module{listen x : STT}{read x : SST} { W }{speak x : STT}{write x : SST} Agapia v0.1 programs P ::= null | M | if(B){P}else{P} | P%P | P#P | P$P | while t(B){P} | while s(B){P} | while st(B){P}

slide-47
SLIDE 47

..AGAPIA v0.1: Syntax

Rv-systems / Stefanescu / Pisa, 2007 Slide 47/88

Temporal (or vertical) composition and while

  • denoted “%” and while t
  • composition
  • f

modules/programs via spatial interfaces (“usual” composition) Spatial (or horizontal) composition and while

  • denoted “#” and while s
  • composition of modules/programs via temporal interfaces

Spatio-temporal (or diagonal) composition and while

  • denoted “$” and while st
  • composition of modules/programs via both spatial and tempo-

ral interfaces

slide-48
SLIDE 48

Scenarios

Rv-systems / Stefanescu / Pisa, 2007 Slide 48/88

Scenarios:

1 1 1 AaBbBbB 2 1 1 AcAaBbB 2 2 1 AcAcAaB 2 2 2

1: x=4 A: X 1: B: tx=4 Y 1: C: Z D: 3: x=2 A: U 3: x=1 2: y=4 B: tx=2 V 2: 2: z=4 C: W D: 2: z=2 x=4 X tx=4 Y tx=4 Z x=2 U x=1 y=4 tx=2 V y=4 z=4 tx=2W z=2

(1) FIS’s scenario (2) rv-scenario (3) srv-scenario Srv-scenario operations:

X Y X Y X Y (d) (f) (g) (e) (a) (b) (c)

(4)

slide-49
SLIDE 49

..Operations on srv-scenarios

Rv-systems / Stefanescu / Pisa, 2007 Slide 49/88

..Srv-scenario operations:

  • Details for horizontal composition

g h i B e d f a b c A nil V W Z U B X Y A nil X Y A a b c e d f Z U B V W g h i nil nil

(a) (b) (c)

  • Similar procedures applies to the vertical and the diagonal srv-

scenario compositions

slide-50
SLIDE 50

Typing expressions

Rv-systems / Stefanescu / Pisa, 2007 Slide 50/88

Typing declarations Start from x : ST or x : TT and use (k) - the k-th element of an alternative choice (separated by “∪”) .k - the k-th element of a structure (separated by “,”) .[k] - the k-th element of an array (defined by (...)∗) @k - the k-th process/transaction (separated by “;”) @[k] - the k-th process/transaction of an array of processes/transac- tions (defined by “(...;)∗”) Examples:

  • w : ((((sn)∗)∗,sb,(sn,sb,sn)∗)∗,(sb∪sn))

w.1.[i].3.[j].2 (the 2nd sb)

  • w : ((sn)∗)∗;nil;sb;((sn∪sb)∗;)∗

w@3@[i].[j](1) (the last sn)

slide-51
SLIDE 51

Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 51/88

The typing morphism - defined by a mapping σ : P → (stσ(P),wσ(P)|nσ(P) → eσ(P)|sσ(P)) where:

  • st ∈ {ok,war0,war1,err} says the program is:

– ok - well-typed; – war0,war1 - partially well-typed with two levels of warn- ings; – err - wrongly typed

  • On each west, north, east, or south interface, the type wσ(P),

nσ(P), eσ(P), or sσ(P) consists of a set of variables with their types

slide-52
SLIDE 52

Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 52/88

Type matching on an interface:

  • 1. Check if the same set of variables is used;
  • 2. For each variable, its status flag is:
  • ok - if their types in these interfaces are equal and single-

ton;

  • war0 - if their types are equal, but not a singleton;
  • war1 - if their types are not equal, but have a nonempty

intersection;

  • err - if their types have an empty intersection;
  • 3. Finally, the overall status flag is the minimum of the status flags

for each variable in the interface set.

slide-53
SLIDE 53

..Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 53/88

Typing simple while programs and modules: Simple while programs:

  • usual typing, extended with {ok,war0,war1,err} flag

Modules:

  • take the type of the body program and export on the inter-

faces only the variables occurring in the listen/speak and read/write statements with their associated types.

slide-54
SLIDE 54

..Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 54/88

Typing structured rv-programs: On programs, the typing morphism is inductively defined by: Vertical composition:

σ(S1%S2) = (st,wσ(S1);wσ(S2)|nσ(S1) → eσ(S1);eσ(S2)|sσ(S2)), where st =        min(ok,stσ(S1),stσ(S2)) if sσ(S1) = nσ(S2) = singleton min(war0,stσ(S1),stσ(S2)) if sσ(S1) = nσ(S2) = ¬singleton min(war1,stσ(S1),stσ(S2)) if sσ(S1) ∩nσ(S2) = / err if sσ(S1) ∩nσ(S2) = /

Horizontal composition: - similar Diagonal composition: - similar

??

w1 w2 n1 e1 e2 s2

slide-55
SLIDE 55

..Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 55/88

If:

σ(if(B){S1}else{S2}) = (st,wσ(S1) ∪ wσ(S2)|nσ(S1) ∪ nσ(S2) → eσ(S1) ∪eσ(S2)|sσ(S1) ∪sσ(S2)) where st =                        min(ok,stB,stσ(S1),stσ(S2)) —if σ(B) ⊆ wσ(S1) ∪nσ(S1) ∪wσ(S2) ∪nσ(S2) = singleton min(war0,stB,stσ(S1),stσ(S2)) —if σ(B) ⊆ wσ(S1) ∪nσ(S1) ∪wσ(S2) ∪nσ(S2) = ¬singleton min(war1,stB,stσ(S1),stσ(S2)) —if σ(B)∩(wσ(S1) ∪nσ(S1) ∪wσ(S2) ∪nσ(S2)) = / err —if σ(B)∩(wσ(S1) ∪nσ(S1) ∪wσ(S2) ∪nσ(S2)) = /

??

n’ n" w’ w" e’ e" s" s’

slide-56
SLIDE 56

..Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 56/88

Temporal while:

σ(while t(B){S}) = (st,(wσ(S);)∗|nσ(S) ∪ sσ(S) → (eσ(S);)∗|nσ(S) ∪ sσ(S)) where denoting P1 := σB ⊆ wσ(S) ∪nσ(S) = singleton, Q1 := sσ(S) = nσ(S) = singleton, P2 := σB ⊆ wσ(S) ∪nσ(S) = ¬singleton, Q2 := sσ(S) = nσ(S) = ¬singleton, P3 := σB ∩(wσ(S) ∪nσ(S)) = / 0, Q3 := sσ(S) ∩nσ(S) = / 0, P4 := σB ∩(wσ(S) ∪nσ(S)) = / 0, Q4 := sσ(S) ∩nσ(S) = / we have st =        min(ok,stB,stσ(S)) if P1∧Q1 min(war0,stB,stσ(S)) if P2∧(Q1∨Q2)∨(P1∨P2)∧Q2 min(war1,stB,stσ(S)) if P3∧(Q1∨Q2∨Q3)∨(P1∨P2∨P3)∧Q3 err if P4∨Q4

slide-57
SLIDE 57

..Typing programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 57/88

Spatial while: σ(while s(B){S})

  • is similar to the temporal while

Spatio-temporal while: σ(while st(B){S})

  • similar to the temporal while
  • ...but slightly more complicate as 3 pairs of interfaces are

to be compared: – first, σB vs. wσ(S) ∪nσ(S); – then, nσ(S) vs. sσ(S); – and, finally, wσ(S) vs. eσ(S)

slide-58
SLIDE 58

Example

Rv-systems / Stefanescu / Pisa, 2007 Slide 58/88

Example (termination detection) Denote a = (tm,tid,msg[ ],token), b = (id,c,active), c = (m). Then: Init: I1 → (ok,nil|c → a|nil) I2 → (ok,a|nil → a|b) for s( ){I2} → (ok,a|nil → a|(b;)∗) I1#for s( ){I2} → (ok,nil|c → a|(b;)∗) Repeat: R → (ok,a|b → a|b) for s( ){R} → (ok,a|(b;)∗ → a|(b;)∗) while st{for s( ){R}} → (war0,a|(b;)∗ → a|(b;)∗) Full program: P → (war0,nil|c → a|(b;)∗)

slide-59
SLIDE 59

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 59/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-60
SLIDE 60

Compiling srv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 60/88

Implementation: Currently, we have

  • a simulator for running rv-programs
  • a translation from srv- to rv-programs and o proof of its cor-

rectness

  • a mechanical procedure based on the above translation

Currently, we do not have

  • an implementation of the translation
  • a study of the blow-up induced by the translation
  • optimization procedures
slide-61
SLIDE 61

..Compiling srv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 61/88

Example: The translation of if is based on the following component

a1 a1 a2 ... am b1 b2 ... bn a2 ... am ... (a1,...,am) (a1,...,am) Init_H Init_V X bn b2 b1 (b1,...,bn) (b1,...,bn) Test

whose implementation as a rv-program is rather tedious.

slide-62
SLIDE 62

..Compiling srv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 62/88

A much more challenging task:

  • extend assembly language like MIPS with interactive features

(voices)

  • design interactive processors
  • use such a setting as the target for compiling high-level interac-

tive programming languages including features from AGAPIA

Intermediary step: Add srv-programming features to certain mature programming languages as Eifel, Real Time Java, etc.

slide-63
SLIDE 63

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 63/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-64
SLIDE 64

Floyd’s method for flowchart programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 64/88

x = 0? START z = z−x x = x−1 y%x=0? STOP C T B (x,y,z) = (n/2,n,n) A F T F E2 E1

Floyd’s method for flowcharts:

  • a program for perfect numbers
  • cut-points and assertions, e.g.,

φB : “0 ≤ x∧y = n ≥ 2 ∧z = n−∑d|n,x<d<nd”

  • invariance conditions, e.g.,

φB ∧Cp(B,E1,B) ⇒ σ2(φB)

  • termination: no infinite

computation

slide-65
SLIDE 65

Grids and scenarios

Rv-systems / Stefanescu / Pisa, 2007 Slide 65/88

Grids:

aabbabb abbcdbb bbabbca ccccaaa

a a a b a b b b c b b a b c b c

h g f e d c b a

(a) (b) (c) Standard interpretation:

  • columns - processes
  • rows - process interactions (nonblocking message passing)
  • left-to-rigth and top-to-bottom causality

Contour-and-contents representation of grids: The grid in (b) is represented as:

  • Contour: e4s2e2n1e1s3w1n1w3s1w1n1w2n1e2n1w2n1
  • Contents: a2b3cb3ab2caca.
slide-66
SLIDE 66

..Grids and scenarios

Rv-systems / Stefanescu / Pisa, 2007 Slide 66/88

Scenarios: (a)

1 1 1 AaBbBbB 2 1 1 AcAaBbB 2 2 1 AcAcAaB 2 2 2

(b)

a

A 2 1 B

a

A 2 1 B

a

A 2 1 B

Scenario = Grid + Data [around its letters] Contour-and-contents representation of scenarios: The scenario in (b) is represented as:

  • Contour: e1sBe1sBe1sBw2nAw2nAw2nA

(or, shortly, (e1sB)3(w2nA)3)

  • Contents: aaa.
slide-67
SLIDE 67

Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 67/88

A framework for rv-program verification: Three steps:

  • find an appropriate set of contours and assertions (it

should be a finite and complete set); [complete = all scenarious of the associated FIS may be decomposed into such contours]

  • fill in the contours with all possible scenarios; and
  • prove the invariance condition, i.e., these scenarios re-

spect the border assertions.

Except for the guess of assertions, the proof is finite and fully automatic.

slide-68
SLIDE 68

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 68/88

Assertions:

  • contours with assertions on state and class variables;
  • example:

e1{x = x0}sDe2{z = x0 −1}... means: — go towards east having on left the state 1 satisfying condition x = x0; — then go towards south having on left the class D with no condition (i.e., True); — then go towards east having on left the state 2 with condition z = x0 −1; etc.

slide-69
SLIDE 69

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 69/88

Basic step (for contour C = e3e2e2sDw2w2w3nA, i.e., middle row):

D A D A D 2 2 A 3 2 U1 V W U1 V W U2 V W 2 X Y Z 1 1 1 D A 3 2 2 3 2 2 2 3 2 2

  • Assertion: ∃k. 0 < k ≤ ⌊x0/2⌋ such that

e3{x = k}e2{y = x0} ·e2{z = x0 −∑d|x0,k<d<x0 d}sD ·w2{z = x0 −∑d|x0,k−1<d<x0 d} ·w2{y = x0}w3{x = k −1}nA

  • Possible scenarious: U1⊲V ⊲W
  • Backwards substitution σ [south-east from north-west]
  • Invariance condition ψC ∧ ψW ∧ ψN ⇒ σ(ψE) ∧ σ(ψS) is

reduced to: z = x0 −∑d|x0,k<d<x0 d ⇒ z−φ(k) = x0 −∑d|x0,k−1<d<x0 d x = k ⇒ x−1 = k −1

slide-70
SLIDE 70

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 70/88

Partial correctness, using a row partition: Top row:

  • cut-contour: e1e1e1sDw2w2w3nA
  • assertion:

e1{x = x0}e1e1sD ·w2{z = x0}w2{y = x0}w3{x = ⌊x0/2⌋}nA

  • scenario: X ⊲Y ⊲Z
  • invariant condition: true
slide-71
SLIDE 71

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 71/88

(..Partial correctness, using a row partition)

Middle row:

  • cut-contour: e3e2e2sDw2w2w3nA
  • assertion:

∃k. 0 < k ≤ ⌊x0/2⌋ such that: e3{x = k}e2{y = x0} ·e2{z = x0 −∑d|x0,k<d<x0 d}sD ·w2{z = x0 −∑d|x0,k−1<d<x0 d} ·w2{y = x0}w3{x = k −1}nA

  • scenario: U1 ⊲V ⊲W, provided the condition k − 1 > 0 is

true

  • invariant condition: true
slide-72
SLIDE 72

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 72/88

(..Partial correctness, using a row partition)

Bottom row:

  • cut-contour: e3e2e2sDw2w2w2nA
  • assertion:

∃k. (0 < k ≤ ⌊x0/2⌋) such that: e3{x = k}e2{y = x0} ·e2{z = x0 −∑d|x0,k<d<x0 d}sD ·w2{z = x0 −∑d|x0,0<d<x0 d = 0}w2w3nA

  • scenario: U2⊲V ⊲W, provided the condition ¬(k−1 > 0)

is true

  • invariant condition: true
slide-73
SLIDE 73

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 73/88

(..Partial correctness, using a row partition)

Final step:

  • Partial correctness of this rv-program:

for each scenario (X ⊲Y ⊲Z)·(U1⊲V ⊲W)r ·(U2⊲V ⊲W) the assertion e1{x = x0}e1e1(sD)r ·w2{z = 0 iff x0 is a perfect number} ·w2w2(nA)r is true.

slide-74
SLIDE 74

..Verification of rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 74/88

Termination:

  • no infinite scenarious [the 1st column is finite]

Verification by column partition:

  • similar proof, but slightly more complicated
slide-75
SLIDE 75

Verification of structured rv-programs

Rv-systems / Stefanescu / Pisa, 2007 Slide 75/88

Hoare logics for structured rv-programs:

  • it has been partially developed
  • it was used to verify the correctness of the termination detec-

tion protocol

  • its rules are sound, but we have no claim on thier complete-

ness...

slide-76
SLIDE 76

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 76/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions
slide-77
SLIDE 77

Miscellaneous

Rv-systems / Stefanescu / Pisa, 2007 Slide 77/88

Contents:

  • State-explosion & flattening
  • Representing Message Sequence Charts
slide-78
SLIDE 78

State-explosion & flattening

Rv-systems / Stefanescu / Pisa, 2007 Slide 78/88

It looks that this

  • flattening operator is responsible for the well-known state-

explosion problem which occurs in the verification of concur- rent (object-oriented) systems We hope that

  • the lifting of the verification techniques from paths to grids

may avoid this problem

slide-79
SLIDE 79

State-explosion & flattening

Rv-systems / Stefanescu / Pisa, 2007 Slide 79/88

Suppose all actions of a grid w are distinct. Then Proposition: For any z ∈ ♭(w) there exist timing weights for actions such that the overall time provided by the schedule z is minimal.

[Rules for time analysis: —each action may start as soon as possible; —if two actions are completed at the same time, then they may be put in the flattening sequence in any order.]

This shows that

  • any static scheduling procedure (e.g., by rows, or by columns,
  • r by diagonals, etc.) does not provide the maximal speedup;
  • we need to consider all flattened words as possible execution

sequences

slide-80
SLIDE 80

State-explosion & flattening

Rv-systems / Stefanescu / Pisa, 2007 Slide 80/88

Experimental results (for a rectangular grid of type m×n): The number of sequential executions ϕ(m,n) associated to a (small) rectangular m×n grid:

m\n

2 3 4 5 6 7 2

2 5 14 42 132 429

3 −

42 462 6,006 87,516 1,385,670

4 − −

24,024 1,662,804 140,229,804 13,672,405,890

5 − − −

701,149,020 396,499,770,810 278,607,172,289,160

6 − − − −

1,671,643,033,734,960 9,490,348,077,234,178,440

7 − − − − −

475,073,684,264,389,879,228,560

slide-81
SLIDE 81

..State-explosion & flattening

Rv-systems / Stefanescu / Pisa, 2007 Slide 81/88

Theoretical results:

  • a partial grid is the part of a usual grid which remains after a

number of steps of the flattening procedure have been applied

  • a partial grid is of type (l1;l2;...;lm) if it has l1 elements in the

1st line, l2 in the 2nd line, etc., where l1 ≤ l2 ≤ ... ≤ lm

  • let ϕl1;l2;...;lm denotes the number of words associated by the

flattening operator to a partial grid of type (l1;l2;...;lm)

  • finally, assign to each cell ai of a partial grid a number ki rep-

resenting the sum of the distances (number of cells) from ai to the west and north borders, counting ai only ones

slide-82
SLIDE 82

..State-explosion & flattening

Rv-systems / Stefanescu / Pisa, 2007 Slide 82/88

Theorem: For a partial grid of type (l1;l2;...;lm) with p cells carrying the distances k1,...,kp, we have ϕl1;l2;...;lm = p! k1...kp An example is on right: —its type is (1;1;1;2;4) (9 cells); —the numbers in the cells show the sums of west plus north distances; —ϕl1;l2;...;lm =

9! (1)·(2)·(3)·(1·5)·(1·2·4·8) = 189 1 2 3 1 5 1 2 4 8

This is the famous Frame-Robinson-Thrall theorem; the formula in the theorem is known as “hook formula”.

slide-83
SLIDE 83

..State-explosion & flattening

Rv-systems / Stefanescu / Pisa, 2007 Slide 83/88

Corollaries

  • 1. ϕ(m,n) =

(m·n)! [1·2·...·n]·[2·3·...·(n+1)]·...·[m·(m+1)·...·(m+n−1)]

  • 2. The complexity of ϕ(n,n) is O (nn2).
slide-84
SLIDE 84

Miscellaneous

Rv-systems / Stefanescu / Pisa, 2007 Slide 84/88

Contents:

  • State-explosion & flattening
  • Representing Message Sequence Charts
slide-85
SLIDE 85

FIS vs. MSC

Rv-systems / Stefanescu / Pisa, 2007 Slide 85/88

Message sequence charts:

  • a model for specifying process interaction in a simple way us-

ing message passing and vertical time ordering

  • adopted in UML as a basic tool for system specification
  • possible extensions, e.g. LSC (live sequence charts)
slide-86
SLIDE 86

..FIS vs. MSC

Rv-systems / Stefanescu / Pisa, 2007 Slide 86/88

We use a particular alphabet whose letters are interpreted as: —(sendL) send a message to a left neighbor; —(sendR) send a message to a right neighbor; —(recL) receive a message from a left neighbor; —(recR) receive a message from a right neighbor; —(passL) pass a message from right to left; —(passR) pass a message from left to right; —(init) start a process; —(void) idle a process; —(end) end a process, respectively.

slide-87
SLIDE 87

..FIS vs. MSC

Rv-systems / Stefanescu / Pisa, 2007 Slide 87/88

Over this alphabet, finite interactive systems are more powerful than

  • MSC. With additional restrictions we may capture the power of

usual MSC’s: (α) each line has the following type: init† or end† or (sendR⊲ passR† ⊲recL+recR⊲ passL† ⊲sendL+void)†; (β) each column is of the type init ·(sendL+sendR+recL+recR+ passL+ passR)⋆ ·end A MSC-like FIS is a FIS over VMSC which satisfies (α) and (β). Theorem: Grid languages recognized by horizontally acyclic MSC-like

FIS’s over VMSC correspond to MSC’s.

slide-88
SLIDE 88

Rv-systems

Rv-systems / Stefanescu / Pisa, 2007 Slide 88/88

Contents:

  • Generalities
  • A glimpse on AGAPIA programming
  • Finite interactive systems ← [nfa]
  • Rv-programs ← [flowchart programs]
  • Structured rv-programs ← [while programs]
  • Compiling srv-programs
  • Floyd-Hoare logics for (s)rv-programs
  • Miscellaneous
  • Conclusions