1 / 15

Chapter 5: Join Calculus

Chapter 5: Join Calculus. Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute. Reflexive CHAM and Join Calculus. Attempt to overcome “distribution” issues in π -calculus, yet keeping formal investigation results.

rasul
Download Presentation

Chapter 5: Join Calculus

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5: Join Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute C. Varela

  2. Reflexive CHAMandJoin Calculus • Attempt to overcome “distribution” issues in π-calculus, yet keeping formal investigation results. • Bridge gap between theory and practice, and form the basics for a programming language. • Imposes locality and adds reflexion to generic CHAM of Boudol and Berry. • Combines restriction, reception, and replication (of π-calculus) into a single (joint) receptor definition. C. Varela

  3. Reflexive Chemical Abstract Machine x<y> atom M | M molecule e.g. ready<laser> ready<laser> | job<1> D or J P reaction e.g. ready<printer> | job<file> printer<file> C. Varela

  4. Printer Example 0 ├ ready<laser>, job<1>, job<2> 0 ├ ready<laser> | job<1> , job<2> Let D = ready<printer> | job<file> printer<file> D ├ ready<laser> | job<1>, job<2> D ├ laser<1>, job<2> C. Varela

  5. Reflection def D in P molecule 0 ├ def D in ready<laser> | job<1> | job<2> D ├ ready<laser> | job<1> | job<2> C. Varela

  6. Names, Processes, Definitions ~ def P = x<v> asynchronous polyadic message def D in P definition of new names P | P parallel composition J = x<v> join patterns J | J D = J P matching join D D patterns to processes ~ def def C. Varela

  7. Variable Types Received variables (join patterns) rv(x<v>) = {u in v} rv(J | J’) = rv(J) U rv(J’) Defined variables (join patterns and definitions) dv(x<v>) = {x} dv(J | J’) = dv(J) U dv(J’) dv(J P) = dv(J) dv(D D’) = dv(D) U dv(D’) ~ ~ def def ~ def def def def C. Varela

  8. Free Variables (processes and definitions) fv(J P) = dv(J) U (fv(P) – rv(J)) fv(D D’) = fv(D) U fv(D’) fv(x<v>) = {x} U {u in v} fv(def D in P) = (fv(P) U fv(D)) – dv(D) fv(P | P’) = fv(P) U fv(P’) def def ~ ~ def def def C. Varela

  9. Operational SemanticsStructural Equivalence (str-join) ├ P | Q ├ P,Q (“ “ heating, “ “ cooling) (str-and) D E ├ D,E├ (str-def) ├ def D in P D ├ P (red) J P ├ J J P ├ P σdv instantiates port variable dv(D) to fresh names. σrv substitutes transmitted names for distinct received variables rv(J). σdv σdv σrv σrv C. Varela

  10. Examples • def x<u> y<u> in P messages on local name x in P are forwarded to the outside as messages on y. • def y<u> x<u> in def x<u> y<u> in P messages on local name x are forwarded in two steps on the external name x (internal x needs renaming). • def x1<u> | x2<v> x<u,v> in P performs multiplexing of messages on x whose parts are supplied on x1 and x2. C. Varela

  11. Examples (continued) • def x<v> | y<k> k<v> in P models π-calculus-like channels, as values are sent on x and requests for values are sent on y. • def s<> P s<> Q in s<> express internal non-determinism P + Q • def once<> | y<v> x<v> in y<1> | y<2> | y<3> | once<> uses the message on once as a lock for non-determinism x<1> + x<2> + x<3> C. Varela

  12. Recursion Example def loop<> P | loop<> in loop<> replicates the process P (!P), starting a new copy each time the definition is used. C. Varela

  13. Reference Cell def mkcell<v0, k0> in P P = def c<g,s> s<w1,k> in mkcell <w0, c> def get<k> | s<v> k<v> | s<v> set<u,k> | s<v> k<> | s<u> in s<v0> | k0<get,set> C. Varela

  14. Mutual Exclusion def s<> P | s<> Q | s<> in s<> (semaphore) def in s<> (guarantees mutual exclusion) s<> def JP s<> in JP s<> def JQ s<> in JQ C. Varela

  15. Dining Philosophers def in P P = Π(phil<i, ci, c(i+1)mod n> | chopstick<ci>) phil<i,l,r> def l<> | r<> eat<i> | l<> | r<> in 0 chopstick<c> c<> 0 ≤ i < n C. Varela

More Related