Download presentation
Presentation is loading. Please wait.
Published byLucy Reed Modified over 8 years ago
1
C. Varela1 Chapter 6: Ambient Calculus Programming Distributed Computing Systems: A Foundational Approach Carlos Varela Rensselaer Polytechnic Institute
2
Mobile Ambients Locations represented by a topology of boundaries –Not identified with globally vague names Process mobility represented as crossing of boundaries –Not as communication of processes or process names over channels Security represented as ability/inability to cross boundaries Interaction between processes is by shared location within a common boundary C. Varela2
3
Mobile Ambients n names P,Q ::= processes (n)P 0 P | Q !P n[P] M.P M::= capabilities in n out n open n C. Varela3
4
Entry Capability n[ in m.P | Q] | m[ R ] m[ n[ P | Q ] | R ] nm m | C. Varela4 in m.P | QRn P| Q | R
5
Exit Capability m[ n [ out m.P | Q ] | R ] n [ P | Q ] | m[ R ] m n m C. Varela5 n | R out m.P | Q P | Q | R
6
Open Capability open m.P | m[ Q ] P | Q open m.P | P | Q C. Varela6 Q m
7
Subjective/Objective Moves Subjective moves: n[ in m.P | Q ] | m[ R ] m[ n[ P | Q] | R m[ n[ out m.P | Q ] | R ] m[ R ] | n[ P | Q ] open m.P | m[ Q ] P | Q Objective moves: mv in m.P | m[ R ] m[ P | R ] m[ mv out m.P | R ] P | m[ R ] Ambient I/O: (x).Pinput output C. Varela7 (x).P | P{M/x} [or P{x m}
8
Encoding Objective Moves With Subjective Moves allow n = !open n mv in n.P = (k) k[ in n.enter[ out k.open k.P ] ] mv out n.P = (k) k[ out n.exit[ out k.open k.P ] ] n [ P ] = n[ P | allow enter ] n [ P ] = n[ P ] | allow exit n [ P ] = n[ P | allow enter ] | allow exit C. Varela8
9
Exercises Prove: 1.mv in n.P | n [ Q ] * n [ P | Q ] 2.n [ mv out n.P | Q ] * n [ Q ] | P C. Varela9
10
Reference Cell cell c w = c [ ] get c (x).P = mv in c.(x).( | mv out c.P) set c.P = mv in c.(x).( | mv out c.P) C. Varela10
11
Mutual Exclusion acquire n.P = open n.P release n.P = n[] | P acquire l.P | release l.Q = open l.P | l[] | Q P | 0 | Q ≡ P | Q C. Varela11
12
Dining Philosophers phil l r = !(acquire l.acquire r.(release l | release r)) fork f = release f 2-table = phil f1 f2 | phil f2 f1 | fork f1 | fork f2 2-table-nd = phil f1 f2 | phil f1 f2 | fork f1 | fork f2 3-table = phil f1 f2 | phil f2 f3 | phil f3 f1 | fork f1 | fork f2 | fork f3 C. Varela12
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.