Presentation is loading. Please wait.

Presentation is loading. Please wait.

Weakly endochronous systems Dumitru Potop-Butucaru IRISA, France Joint work with A. Benveniste and B. Caillaud.

Similar presentations


Presentation on theme: "Weakly endochronous systems Dumitru Potop-Butucaru IRISA, France Joint work with A. Benveniste and B. Caillaud."— Presentation transcript:

1 Weakly endochronous systems Dumitru Potop-Butucaru IRISA, France Joint work with A. Benveniste and B. Caillaud

2 Outline Introduction (the distribution problem) Weakly endochronous systems Applications –Weak isochrony –Main result Conclusion

3 module M: input A,B,R; relation A#R,B#R; abort loop await A || await B end when R end module 02 3 1 R R R A,B AB BA

4  A  B   BAR  input Synchrony –Global clock, reactions –Can test the absence –Composition: synchronized product (unification on reactions) 02 3 1 R R R A,B AB BA

5  A  B   BAR  input Asynchrony –No global clock –No reaction, no absence –Composition: unification of FIFO histories 02 3 1 R R R A,B AB BA

6 A B BA R input 02 3 1 R R R A,B AB BA executive  A  B   BAR  Good executions  BAR   BA Asynchrony –No global clock –No reaction, no absence –Composition: unification of FIFO histories

7 A B BA R input 02 3 1 R R R A,B AB BA executive R  Bad executions Asynchrony –No global clock –No reaction, no absence –Composition: unification of FIFO histories  A R 

8 Model Components = synchronous automatons no causality Synchronous composition (automaton product) Σ 1  Σ 2 Desynchronization operator Asynchronous composition (on traces) abcdabc

9 Model Correct resynchronization (Benveniste):  ( L (Σ 1  Σ 2 )) =  ( L (Σ 1 ))||  ( L (Σ 2 )) Intuition: –the asynchronous observations do not change when changing FIFO size and delay Condition on infinite traces…

10 Previous work Latency-insensitivity (Carloni et al., 1999) –Hardware-directed (handle long wires) –Use all channels in each reaction (transmit  values) Monoclock – not efficient Difficult to re-configure the communication scheme –Extension: Singh and Theobald, 2003 Endo/Isochrony (Benveniste et al., 2000)

11 Endo/Isochrony An endochronous component decides itself how to read its inputs –No event-driven, no real concurrency, determinism! –Comparable to Kahn processes (but no causality) –Executive = state machine and blocking reads A pair of components is isochronous if no incorrect synchronization takes place Compositionality problem –Endochrony is not compositional –Difficult to generalize isochrony to >2 components

12 A B BA R input 02 3 1 R R R A,B AB BA executive R  Bad executions  A R 

13 A B BA R input Event-executive 0 0 1 0 0 1 02 3 1 R,E=1 A,D=0 B,E=0 A,D=0 A,B,D=E=0 R,D=E=1 R,D=1 What I want –Non-determinism (Event-driven execution)

14 Weak endochrony Independent reactions = non-overlapping, fully commuting Weak endochrony = allow online re-synchronization in any environment without restricting concurrency between independent reactions: –Choice between non-independent reactions is visible on a channel –Causal ordering of reactions is visible on a channel

15 Non-independent reactions share a common support variable with different value Non-independent causally ordered reactions share a common variable 02 3 1 R,E=1 A,D=0 B,E=0 A,D=0 A,B,D=E=0 R,D=E=1 R,D=1 Weak endochrony

16 1.Determinism: s  s 1, s  s 2  r 1 =r 2 2.Commutation: if r 1,r 2 do not share present values s  s 1, s  s 2  s’:s  s’ s  s 1  s 2  s’:s  s 2 3.Decomposition: if s  s 1, s  s 2 and r 1, r 2 do not share present variables with different values Weak endochrony axioms r1r1 r2r2 r1r1 r2r2 r1r2r1r2 r1r1 r2r2 r2r2  s’:s  s’ r1r1 r2r2 r1r2r1r2 s1s1 s2s2 r 1 \r 2 r 2 \r 1

17 All reactions are composed of atoms Disjoint atoms in a state fully commute and can be freely combined 02 3 1 R,E=1 A,D=0 B,E=0 A,D=0 A,B,D=E=0 R,D=E=1 R,D=1 Properties State 0 atoms: (A,D=0),(B,E=0), (R,D=E=1) State 1 atoms: (B,E=0),(R,E=1)

18 Mazurkiewicz traces over atoms –The letters are the atoms, disjoint atoms are independent –Normal form trace equivalence upto commutation of atoms take at each reaction the maximal reaction (unique) –Confluence for a given history Tetris-like heaps (gravity => normal form) Generalization of endochrony, latency- insensitivity Related models

19 Consequences Accept concurrency between independent behaviors –non-determinism –support event-driven implementations Compositionality: Σ 1,Σ 2 weakly endochronous  Σ 1  Σ 2 weakly endochronous

20 Simpler correctness criterion  (s 1,s 2 )  RSS(Σ 1  Σ 2 ),  i  Σ i (s i ),i=1,2:  1 ||  2 exists   1,  2 are both void traces or Σ 1  Σ 2 can perform a common transition Still not an online correctness criterion!

21 Weak isochrony  (s 1,s 2 )  RSS(Σ 1  Σ 2 ),  a i atom in Σ i (s i ), i=1,2,  A i reaction in Σ i (s i ) such that A 1 ||A 2 maximal a i  A i,i=1,2  i reaction in Σ i (s i ), i=1,2 such that a i   i  A i,i=1,2  1 ||  2 exists

22 Correct desynchronization Theorem If Σ 1,Σ 2 weakly endochronous, (Σ 1,Σ 2 ) weakly isochronous then:  ( L (Σ 1  Σ 2 )) =  ( L (Σ 1 ))||  ( L (Σ 2 ))

23 Methodology 1.Make components weakly endochronous by deciding which signals are missing 2.Incrementally build communication protocols that insure the weak isochrony 3.Remove the useless variables created at point (1)

24 Conclusion Weak endochrony/isochrony –Compositional –Supports the development of communication protocols that minimize communication –Not yet effective (not efficiently) –No causality Future: –Define appropriate algorithms –Extend with causality

25

26

27

28 Weak isochrony  (s 1,s 2 )  RSS(Σ 1  Σ 2 ),  a i atom in Σ i (s i ), i=1,2,  A i reaction in Σ i (s i ) such that A 1 ||A 2 maximal a i  A i,i=1,2  i reaction in Σ i (s i ), i=1,2 such that a i   i  A i,i=1,2  1 ||  2 exists

29

30 Synchrony and asynchrony Composition: –Synchronous composition –Asynchronous composition Σ1Σ1 Σ2Σ2 1   2  1 Σ 1 ||Σ 2 : Σ1Σ2:Σ1Σ2: Σ1Σ1 Σ2Σ2 1 2 2 1 rejected accepted

31 Desynchronization Stuttering-invariant synchronous specification, distributed architecture (FIFOs) Two aspects: –Correct re-synchronization –Causality, full asynchrony Σ1Σ1 Σ2Σ2 1   2  1 FIFO WRONG

32 Correct resynchronization Model –labeled synchronous transition systems –synchronous, n-place bidirectional buffers –no causality Correctness criterion: –the traces accepted with empty buffers do not change from n=0 to n=  Σ1Σ1 Σ2Σ2 1   2  1 BnBn BnBn

33 Correct resynchronization Equivalent formulation (Benveniste):  ( L (Σ 1  Σ 2 )) =  ( L (Σ 1 ))||  ( L (Σ 2 ))  = desynchronization operator || = composition of asynchronous traces (equality on interface  union )

34 Previous work Latency-insensitivity (Carloni et al., 1999) –Hardware-directed (handle long wires) –A component reads/emits all its inputs, or none –Monoclock –Endochrony-like extensions (Singh and Theobald, 2003) Endo/Isochrony (Benveniste et al., 2000)

35 Endo/Isochrony An endochronous component decides itself how to read its inputs Kahn!!! –Determinism, no real concurrency A pair of components is isochronous if non- contradictory reactions can be fully unified Compositionality problem –Endochrony is not compositional –Difficult to generalize isochrony to >2 components

36 Weakly endochronous systems Allow online re-synchronization in any environment without restricting concurrency: –Each computation choice is visible on an interface variable –Causally ordered reactions share a common variable 11 22 1010 2020 22 11 2121 1010 or after

37 Weakly endochronous systems Example Not weakly endochronous. 02 3 1 R module M: input A,B,R; relation A#R,B#R; abort loop await A || await B end when R end module R R A,B AB BA

38 Weakly endochronous systems Example 02 3 1 R,E=1 A,D=0 B,E=0 A,D=0 A,B,D=E=0 R,D=E=1 R,D=1 module M: input A,B,R; relation A#R,B#R; abort loop await A || await B end when R end module

39 Weakly endochronous systems All reactions are composed of atoms Disjoint atoms in a state fully commute and can be freely combined A reaction can be decomposed into its atoms 02 3 1 R,E=1 A,D=0 B,E=0 A,D=0 A,B,D=E=0 R,D=E=1 R,D=1 State 0 atoms: (A,D=0),(B,E=0), (R,D=E=1) State 1 atoms: (B,E=0),(R,E=1)

40 Related models Mazurkiewicz traces over atoms –The letters are the atoms, disjoint atoms are independent –Normal form trace equivalence upto commutation of atoms take at each reaction the maximal reaction (unique) –Confluence for a given history Tetris-like heaps (gravity => normal form) Generalization of endochrony

41 Consequences Accept concurrency between independent behaviors –non-determinism –support event-driven implementations Normal form Compositionality: Σ 1,Σ 2 weakly endochronous  Σ 1  Σ 2 weakly endochronous

42 Simpler correctness criterion  (s 1,s 2 )  RSS(Σ 1  Σ 2 ),  i  Σ i (s i ),i=1,2:  1 ||  2 exists   1,  2 are both void traces or Σ 1  Σ 2 can perform a common transition Weak endochrony  online correctness criterion!

43 Weak isochrony  (s 1,s 2 )  RSS(Σ 1  Σ 2 ),  a i atom in Σ i (s i ), i=1,2,  A i reaction in Σ i (s i ) such that A 1 ||A 2 maximal a i  A i,i=1,2  i reaction in Σ i (s i ), i=1,2 such that a i   i  A i,i=1,2  1 ||  2 exists

44 Weak isochrony  (s 1,s 2 )  RSS(Σ 1  Σ 2 ),  a i atom in Σ i (s i ), i=1,2,  A i reaction in Σ i (s i ) such that A 1 ||A 2 maximal a i  A i,i=1,2  i reaction in Σ i (s i ), i=1,2 such that a i   i  A i,i=1,2  1 ||  2 exists

45 Correct desynchronization Theorem If Σ 1,Σ 2 weakly endochronous, (Σ 1,Σ 2 ) weakly isochronous then:  ( L (Σ 1  Σ 2 )) =  ( L (Σ 1 ))||  ( L (Σ 2 ))

46 Conclusion Weak endochrony/isochrony –Compositional –Supports the development of communication protocols that minimize communication –Not yet effective (not efficiently) –No causality Future: –Define appropriate algorithms –Extend with causality

47 Methodology 1.Make components weakly endochronous by deciding which signals are missing 2.Incrementally build communication protocols that insure the weak isochrony 3.Remove the useless variables created at point (1)

48

49 Weakly endochronous systems Composition –Weak endochrony is compositional –Weak endochrony insures the equivalence between C1 and C2 –Re-synchrhronize a atome pres –Confluence, unique etat pour une histoire donnee

50 Correct resynchronization Correctness criterion, revisited: L 0 (Σ 1  Σ 2  B 0  B 0 ) = L 0 (Σ 1  Σ 2  B   B  ) Equivalent formulation (Benveniste):  ( L (Σ 1  Σ 2 )) =  ( L (Σ 1 ))||  ( L (Σ 2 ))  = desynchronization operator || = composition of asynchronous traces (equality on interface  union )

51 Weakly endochronous systems Example module M: input A,B,R; output E,F:integer; relation A#R,B#R; abort await immediate A;emit E(0) || await immediate B;emit F(0) when R;emit E(1);emit F(1) end module emit A; emit C; await immedia te await immediate C; emit R; FIFO A R C A

52 Weakly endochronous systems Example module M: input A,B,R; relation A#R,B#R; abort await immediate A || await immediate B when R end module emit A; emit R FIFO R A B

53 Weakly endochronous systems Example emit A;assert ?D=1; emit R;assert ?D=0; module M: input A,B,R;output D,E:int; relation A#R,B#R; abort await immediate A;emit D(1) || await immediate B;emit E(1) when R do emit D(0);emit E(0) end end module A B R D


Download ppt "Weakly endochronous systems Dumitru Potop-Butucaru IRISA, France Joint work with A. Benveniste and B. Caillaud."

Similar presentations


Ads by Google