interactive systems with registers and voices
play

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


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

  2. Rv-systems 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 2/88 Rv-systems / Stefanescu / Pisa, 2007

  3. History 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 3/88 Rv-systems / Stefanescu / Pisa, 2007

  4. ST-Dual picture space High level: x:Int, y:Array[1..10] of Int; ST-Dual picture time tape High level: temporal data memory state stream job requirement Software new job component new state Slide 4/88 Rv-systems / Stefanescu / Pisa, 2007

  5. Processes and transactions Processes and transactions Proc 1 Proc 2 Proc 3 Trans 1 Trans 2 Trans 3 Slide 5/88 Rv-systems / Stefanescu / Pisa, 2007

  6. High level temporal structures sLinkedList 2001 2002 2003 data with usual ( spatial ) 2003 2001 2002 representation: tLinkedList sArray I will be sBool, sInt, sArray, next week sLinkedList, etc. sInt tArray and their time dual 7 3 5 3 on Moon I will be (i.e., data with temporal sBool representation ): 1 tInt next week on Moon tBool, tInt, tArray, 7 3 tLinkedList, etc. tBool 5 3 1 Slide 6/88 Rv-systems / Stefanescu / Pisa, 2007

  7. ..High level temporal structures 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 o 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 o 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 7/88 Rv-systems / Stefanescu / Pisa, 2007

  8. Space-time converters; computation in space ... n x y − in time space-to-time ... ... ... and ... ... y time-to-space ... converters 2 y space−to−time time−to−space may be used to ... change n x y − computed in space n y computation in time ... ... into a y computation in space paradigm ... ... y 2 y ... n y n y ... Slide 8/88 Rv-systems / Stefanescu / Pisa, 2007

  9. Rv-systems 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 9/88 Rv-systems / Stefanescu / Pisa, 2007

  10. Srv-programs for perfect numbers A specification for perfect numbers: 3 components C x , C y , C z where: • C x : read n from north and write n ⌢ ⌊ n / 2 ⌋ ⌢ ( ⌊ n / 2 ⌋− 1 ) ⌢ ... ⌢ 2 ⌢ 1 on east; • C y : 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”]; read n ⌢ φ ( ⌊ n / 2 ⌋ ) ⌢ ... ⌢ φ ( 2 ) ⌢ φ ( 1 ) from west and • C z : subtract from the first the other numbers. These components are composed horizontally . The global input-output specification: if the input number in C x is n, then the output number in C z is 0 iff n is perfect . Slide 10/88 Rv-systems / Stefanescu / Pisa, 2007

  11. ..Srv-programs for perfect numbers Two scenarios for perfect numbers: x=6 X tx=6 Y tx=6 Z x=5 X tx=5 Y tx=5 Z x=3 y=6 z=6 tx=3 V tx=3W x=2 y=5 z=5 U tx=2 V tx=0W x=2 y=6 z=3 U tx=2 V tx=2W x=1 y=5 z=5 U tx=1 V tx=1W x=1 y=6 z=1 U tx=1 V tx=1W x=0 y=4 z=4 U x=0 y=6 z=0 (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 11/88 Rv-systems / Stefanescu / Pisa, 2007

  12. ..Srv-programs for perfect numbers 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 12/88 Rv-systems / Stefanescu / Pisa, 2007

  13. ..Srv-programs for perfect numbers 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 13/88 Rv-systems / Stefanescu / Pisa, 2007

  14. Rv-systems 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 14/88 Rv-systems / Stefanescu / Pisa, 2007

  15. Grids (or planar words) A grid (or planar word ) is • a rectangular two-dimensional area • filled in with letters from a given alphabet Example: aabbabb (not used here: aabb... ) abbcdbb ..bc..b bbabbca bbabbca ccccaaa ..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 15/88 Rv-systems / Stefanescu / Pisa, 2007

  16. ..Grids (or planar words) Causality in a grid/scenario: a b c d e f g h Action vs. inter-action: a a b b X Y X Y Z Z a b a b (a) (b) • a two-ways interaction [in (a)] • ... and its grid/scenario representation [in (b)] Slide 16/88 Rv-systems / Stefanescu / Pisa, 2007

  17. The flattening operator The flattening operator ♭ : LangGrids ( V ) → LangWords ( V ) maps sets of grids to sets of strings representing their topological sorting. Example: —start with efgh ; there is one minimal element a ; after its abcd deletion we get efgh ; bcd —the minimal elements are b and e ; suppose we choose b ; what remains is efgh ; and so on; cd —finally a usual word, say abecfgdh , is obtained. Actually, ♭ ( efgh ) = abcd { abcdefgh , abcedfgh , abcefdgh , abcefgdh , abecdfgh , abecfdgh , abecfgdh , abefcdgh , abefcgdh , aebcdfgh , aebcfdgh , aebcfgdh , aebfcdgh , aebfcgdh } Slide 17/88 Rv-systems / Stefanescu / Pisa, 2007

  18. Composition and identities on grids • horizontal composition v ⊲ w 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 v —it is defined only if s ( v ) = n ( w ) 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 18/88 Rv-systems / Stefanescu / Pisa, 2007

  19. Two-dimensional regular expressions 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 2 RegExp ( V ) ): E :: = a ( ∈ V ) | 0 | E + E | E ∩ E | E · E | E ⋆ | | | E ⊲ E | E † | − Theorem: 2 RegExp ( V ) enriched with letter-to-letter homomorphisms are equivalent with FIS ’s (finite interactive systems). Slide 19/88 Rv-systems / Stefanescu / Pisa, 2007

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend