Presentation is loading. Please wait.

Presentation is loading. Please wait.

09.04.2005Foundations of Interaction ETAPS `05 0 Ex nihilo: a reflective higher- order process calculus The  -calculus L.G. Meredith 1 & Matthias Radestock.

Similar presentations


Presentation on theme: "09.04.2005Foundations of Interaction ETAPS `05 0 Ex nihilo: a reflective higher- order process calculus The  -calculus L.G. Meredith 1 & Matthias Radestock."— Presentation transcript:

1 09.04.2005Foundations of Interaction ETAPS `05 0 Ex nihilo: a reflective higher- order process calculus The  -calculus L.G. Meredith 1 & Matthias Radestock 2 1 Djinnisys Corporation 2 LShift, Ltd

2 109.04.2005Foundations of Interaction ETAPS `05 Agenda  Motivations   -calculus  Syntax  Structural equivalence  Operational semantics  A warm-up: replication  Encoding the  -calculus  Conclusions and future work  Motivations   -calculus  Syntax  Structural equivalence  Operational semantics  A warm-up: replication  Encoding the  -calculus  Conclusions and future work

3 209.04.2005Foundations of Interaction ETAPS `05 Motivations   -calculus is not a closed theory  dependent upon a theory of names  such a theory will at least dictate computation of name-equality  Name-equality is a computation  nowhere is there an infinite set of atomic elements available to the computer scientist  all countably infinite sets available to the computer scientist are generated from a finite presentation  perforce the elements of these sets have structure -- and this structure is used to compute equality   -calculus is not a closed theory  dependent upon a theory of names  such a theory will at least dictate computation of name-equality  Name-equality is a computation  nowhere is there an infinite set of atomic elements available to the computer scientist  all countably infinite sets available to the computer scientist are generated from a finite presentation  perforce the elements of these sets have structure -- and this structure is used to compute equality

4 309.04.2005Foundations of Interaction ETAPS `05 Motivations  If interaction is to provide a foundational theory of computation, then this computation must be accounted for, too!  All realizations (e.g., implementations) of mobile process calculi face this fact  Would our theory better serve our practitioners therefore if it accounted for name structure as well?  Synchronization and Substitution play very different roles in  -like mobile process calculi:  requiring different computations  If interaction is to provide a foundational theory of computation, then this computation must be accounted for, too!  All realizations (e.g., implementations) of mobile process calculi face this fact  Would our theory better serve our practitioners therefore if it accounted for name structure as well?  Synchronization and Substitution play very different roles in  -like mobile process calculi:  requiring different computations

5 409.04.2005Foundations of Interaction ETAPS `05 Motivations: potential applications  Biology: sites in molecular biology are decidedly not atomic locations:  Ligand-binding receptors, phosphorylation sites, etc, have extension and behavior  modeling these as atomic names may miss important behavior  Security: concrete realizations of a naming scheme will have names with structure,  subject to guessing attacks  theory of interaction with a structural account of names can facilitate reasoning about this  Biology: sites in molecular biology are decidedly not atomic locations:  Ligand-binding receptors, phosphorylation sites, etc, have extension and behavior  modeling these as atomic names may miss important behavior  Security: concrete realizations of a naming scheme will have names with structure,  subject to guessing attacks  theory of interaction with a structural account of names can facilitate reasoning about this

6 509.04.2005Foundations of Interaction ETAPS `05 The  -calculus syntax  Grammar P, Q ::=0null process x(y).Pinput x ^ P _ lift P|Qparallel composition _ x ^ drop x,y::= ^ P _ quote  PROC denotes the set of processes generated by this grammar;  ^ PROC _ denotes the set of names generated by this grammar  Syntactic sugar: x[y] @ x ^ _ y ^ _  Grammar P, Q ::=0null process x(y).Pinput x ^ P _ lift P|Qparallel composition _ x ^ drop x,y::= ^ P _ quote  PROC denotes the set of processes generated by this grammar;  ^ PROC _ denotes the set of names generated by this grammar  Syntactic sugar: x[y] @ x ^ _ y ^ _

7 609.04.2005Foundations of Interaction ETAPS `05 The  -calculus syntax - examples 0 ^ 0 _ ^ 0 _ [ ^ 0 _ ] ^ 0 _ ( ^ 0 _ ).0 ^ ^ 0 _ [ ^ 0 _ ] _, ^ ^ 0 _ ( ^ 0 _ ).0 _ 0 ^0_ ^0_ ^0_[^0_] ^0_[^0_] ^ 0 _ ( ^ 0 _ ).0 ^ ^ 0 _ [ ^ 0 _ ] _, ^ ^ 0 _ ( ^ 0 _ ).0 _ the ur-process, everything literally comes ex nihilo, out of nothing! the first name the first output process the first input process some new names Looks remarkably like machine code !

8 709.04.2005Foundations of Interaction ETAPS `05 Structural equivalence,  -equivalence and name equivalence  Clearly, we want 0 7 0|0 7 0|0|0 7 … should ^ 0 _ 7 N ^ 0|0 _ 7 N ^ 0|0|0 _ 7 N … ?  Name equivalence,  N  ^ PROC _  ^ PROC _, is the smallest equivalence relation respecting x  N ^_ x ^_ P 7 Q  ^ P _ 7 N ^ Q _  Structural equivalence,   PROC  PROC, is the smallest equivalence relation, containing  -equivalence, respecting P | 0 7 P 7 0 | P P | Q 7 Q | P (P | Q) | R 7 P | (Q | R )  Clearly, we want 0 7 0|0 7 0|0|0 7 … should ^ 0 _ 7 N ^ 0|0 _ 7 N ^ 0|0|0 _ 7 N … ?  Name equivalence,  N  ^ PROC _  ^ PROC _, is the smallest equivalence relation respecting x  N ^_ x ^_ P 7 Q  ^ P _ 7 N ^ Q _  Structural equivalence,   PROC  PROC, is the smallest equivalence relation, containing  -equivalence, respecting P | 0 7 P 7 0 | P P | Q 7 Q | P (P | Q) | R 7 P | (Q | R )

9 809.04.2005Foundations of Interaction ETAPS `05 Structural equivalence,  -equivalence and name equivalence  First subtlety -- a cycle in Structural equivalence  structural equivalence depends on  -equivalence   -equivalence depends on name equality  name equality depends on structural equivalence!  Each ‘ recursive call ’ is one level of quotes fewer  Quote Depth  #( ^ P _ ) = 1+#(P)  #(P) = max({ #( ^ Q _ ) | ^ Q _  N (P)})  Grammar enforces strict alternation of quoting and process constructor  Calculation of structural equivalence terminates by easy induction on quote depth  First subtlety -- a cycle in Structural equivalence  structural equivalence depends on  -equivalence   -equivalence depends on name equality  name equality depends on structural equivalence!  Each ‘ recursive call ’ is one level of quotes fewer  Quote Depth  #( ^ P _ ) = 1+#(P)  #(P) = max({ #( ^ Q _ ) | ^ Q _  N (P)})  Grammar enforces strict alternation of quoting and process constructor  Calculation of structural equivalence terminates by easy induction on quote depth

10 909.04.2005Foundations of Interaction ETAPS `05 Substitution Syntactic substitution A substitution is a partial map,  : ^ PROC _  ^ PROC _ ; { ^ Q _ / ^ P _ } denotes the map which sends ^ P _ to ^ Q _ ; we write x  for  (x) x{ ^ Q _ / ^ P _ } = ^ Q _ if x  N ^ P _, x otherwise. A substitution, , is uniquely extended to a map, _  ^ : PROC  PROC by the following recursive definition 0 _ { ^ Q _ / ^ P _ } ^ @ 0 ( R|S ) _ { ^ Q _ / ^ P _ } ^ @ ( R _ { ^ Q _ / ^ P _ } ^ ) | ( S _ { ^ Q _ / ^ P _ } ^ ) ( x(y).R ) _ { ^ Q _ / ^ P _ } ^ @ x{ ^ Q _ / ^ P _ } (z). (( R _ {z/y} ^ ) _ { ^ Q _ / ^ P _ } ^ ) ( x ^ R _ ) _ { ^ Q _ / ^ P _ } ^ @ x { ^ Q _ / ^ P _ } ^ R{ ^ Q _ / ^ P _ } ^ _ ( _ x ^ ) _ { ^ Q _ / ^ P _ } ^ @ ^ Q _ if x  N ^ P _, _ x ^ otherwise where z is chosen distinct from the names in R, ^ P _ and ^ Q _ Syntactic substitution A substitution is a partial map,  : ^ PROC _  ^ PROC _ ; { ^ Q _ / ^ P _ } denotes the map which sends ^ P _ to ^ Q _ ; we write x  for  (x) x{ ^ Q _ / ^ P _ } = ^ Q _ if x  N ^ P _, x otherwise. A substitution, , is uniquely extended to a map, _  ^ : PROC  PROC by the following recursive definition 0 _ { ^ Q _ / ^ P _ } ^ @ 0 ( R|S ) _ { ^ Q _ / ^ P _ } ^ @ ( R _ { ^ Q _ / ^ P _ } ^ ) | ( S _ { ^ Q _ / ^ P _ } ^ ) ( x(y).R ) _ { ^ Q _ / ^ P _ } ^ @ x{ ^ Q _ / ^ P _ } (z). (( R _ {z/y} ^ ) _ { ^ Q _ / ^ P _ } ^ ) ( x ^ R _ ) _ { ^ Q _ / ^ P _ } ^ @ x { ^ Q _ / ^ P _ } ^ R{ ^ Q _ / ^ P _ } ^ _ ( _ x ^ ) _ { ^ Q _ / ^ P _ } ^ @ ^ Q _ if x  N ^ P _, _ x ^ otherwise where z is chosen distinct from the names in R, ^ P _ and ^ Q _

11 1009.04.2005Foundations of Interaction ETAPS `05 Substitution  Semantic substitution -- same as above except for drop where the process is instantiated at substitution time ( _ x ^ ) _ { ^ Q _ / ^ P _ } ^ @ Q if x  N ^ P _, _ x ^ otherwise  Examples w ^ y[z] _ {u/z} = w ^ y[u] _ w[ ^ y[z] _ ] {u/z} = w[ ^ y[z] _ ] w ^ _ x ^ _ { ^ Q _ /x} = w ^ Q _  Semantic substitution -- same as above except for drop where the process is instantiated at substitution time ( _ x ^ ) _ { ^ Q _ / ^ P _ } ^ @ Q if x  N ^ P _, _ x ^ otherwise  Examples w ^ y[z] _ {u/z} = w ^ y[u] _ w[ ^ y[z] _ ] {u/z} = w[ ^ y[z] _ ] w ^ _ x ^ _ { ^ Q _ /x} = w ^ Q _

12 1109.04.2005Foundations of Interaction ETAPS `05 Operational semantics The operational semantics is given by a reduction relation   PROC  PROC recursively specified by the following rules. comm: x src  N x trgt x src ^ P _ | x trgt (y).Q  Q _ { ^ P _ /y} ^ par: P  P P | Q  P | Q equiv: P  P, P  Q, Q  P P  Q The operational semantics is given by a reduction relation   PROC  PROC recursively specified by the following rules. comm: x src  N x trgt x src ^ P _ | x trgt (y).Q  Q _ { ^ P _ /y} ^ par: P  P P | Q  P | Q equiv: P  P, P  Q, Q  P P  Q

13 1209.04.2005Foundations of Interaction ETAPS `05 Replication  Replication is defined by the following equation D(x) = x(y).( _ y ^ | x[y] ) ! x P = D(x) | x ^ P | D(x) _ x(y).( _ y ^ | x[y] ) | x ^ P | D(x) _  P | D(x) | x[ _ P | D(x) ^ ] =P | D(x) | x ^ P | D(x) _  Replication is defined by the following equation D(x) = x(y).( _ y ^ | x[y] ) ! x P = D(x) | x ^ P | D(x) _ x(y).( _ y ^ | x[y] ) | x ^ P | D(x) _  P | D(x) | x[ _ P | D(x) ^ ] =P | D(x) | x ^ P | D(x) _  Replication is defined by the following equation D(x) = x(y).( _ y ^ | x[y] ) ! x P = D(x) | x ^ P | D(x) _ x(y).( _ y ^ | x[y] ) | x ^ P | D(x) _  P | D(x) | x[ _ P | D(x) ^ ] =P | D(x) | x ^ P | D(x) _  Replication is defined by the following equation D(x) = x(y).( _ y ^ | x[y] ) ! x P = D(x) | x ^ P | D(x) _ x(y).( _ y ^ | x[y] ) | x ^ P | D(x) _  P | D(x) | x[ _ P | D(x) ^ ] =P | D(x) | x ^ P | D(x) _  Replication is defined by the following equation D(x) = x(y).( _ y ^ | x[y] ) ! x P = D(x) | x ^ P | D(x) _ x(y).( _ y ^ | x[y] ) | x ^ P | D(x) _ x[ _ P | D(x) ^ ]  P | D(x) | x[ _ P | D(x) ^ ] x ^ P | D(x) _ =P | D(x) | x ^ P | D(x) _  Replication is defined by the following equation D(x) = x(y).( _ y ^ | x[y] ) ! x P = D(x) | x ^ P | D(x) _ x(y).( _ y ^ | x[y] ) | x ^ P | D(x) _ x[ _ P | D(x) ^ ]  P | D(x) | x[ _ P | D(x) ^ ] x ^ P | D(x) _ =P | D(x) | x ^ P | D(x) _

14 1309.04.2005Foundations of Interaction ETAPS `05 Encoding the  -calculus  Paper presents a ‘distributed’ encoding in which par-ands are mapped to separate namespaces  Below we present a centralized encoding (due to Radestock) in which there is a single resource against which all  -requests are synchronized  Both encodings use a trick for free names: build a  -calculus with the name set ^ PROC _ Let h be a name not in fn( P ), e.g. h = ^  m  fn( P ) m[ ^ 0 _ ] _ [ P ] = [ P ] (h) | h [ ^ h[ ^ 0 _ ] _ ] [ (  x)P ] (h) = h(x). ( h ^ x[ ^ 0 _ ] _ | [ P ] (h) ) [ ! x(y).P ] (h) = h(z). ( h ^ z[ ^ 0 _ ] _ | z ^ x(y). ( D(z) | [ P ] (h)) _ | D(z) ) where z  fn( P ) and D(z) as in replication  Paper presents a ‘distributed’ encoding in which par-ands are mapped to separate namespaces  Below we present a centralized encoding (due to Radestock) in which there is a single resource against which all  -requests are synchronized  Both encodings use a trick for free names: build a  -calculus with the name set ^ PROC _ Let h be a name not in fn( P ), e.g. h = ^  m  fn( P ) m[ ^ 0 _ ] _ [ P ] = [ P ] (h) | h [ ^ h[ ^ 0 _ ] _ ] [ (  x)P ] (h) = h(x). ( h ^ x[ ^ 0 _ ] _ | [ P ] (h) ) [ ! x(y).P ] (h) = h(z). ( h ^ z[ ^ 0 _ ] _ | z ^ x(y). ( D(z) | [ P ] (h)) _ | D(z) ) where z  fn( P ) and D(z) as in replication

15 1409.04.2005Foundations of Interaction ETAPS `05 Correctness of the encoding names are global in the  -calculus…   -calculus contexts can make observations that  -calculus contexts cannot  to prove correctness of the encoding one must restrict to name-sets visible in  -calculus contexts an observation relation,  N, parameterized in a set of names, N, is given by x  N yP  N x or Q  N x y[v]  N x P | Q x an P  N x if there is a Q s.t. P  * Q and Q  N x an N -barbed bisimulation, S N, is a symmetric relation s.t. P  P implies Q  * Q, P S N Q P  N x implies Q  N x P 3 N Q if there is an N -barbed bisimulation, S N, P S N Q THM: P 1  Q iff [ P ] 3 FN (P)  FN (Q) [ Q ] names are global in the  -calculus…   -calculus contexts can make observations that  -calculus contexts cannot  to prove correctness of the encoding one must restrict to name-sets visible in  -calculus contexts an observation relation,  N, parameterized in a set of names, N, is given by x  N yP  N x or Q  N x y[v]  N x P | Q x an P  N x if there is a Q s.t. P  * Q and Q  N x an N -barbed bisimulation, S N, is a symmetric relation s.t. P  P implies Q  * Q, P S N Q P  N x implies Q  N x P 3 N Q if there is an N -barbed bisimulation, S N, P S N Q THM: P 1  Q iff [ P ] 3 FN (P)  FN (Q) [ Q ]

16 1509.04.2005Foundations of Interaction ETAPS `05 Operational semantics revisited An alternative operational semantics may be given by comm annihil :  R.(P chan | P cochan  * R)  R  * 0 ^ P chan _ ^ P _ | ^ P cochan _ (y).Q  Q _ { ^ P _ /y} ^ An alternative operational semantics may be given by comm annihil :  R.(P chan | P cochan  * R)  R  * 0 ^ P chan _ ^ P _ | ^ P cochan _ (y).Q  Q _ { ^ P _ /y} ^ 1806x10 4 6x10 10

17 1609.04.2005Foundations of Interaction ETAPS `05 Conclusions and future work  Presented a higher-order asynchronous message-passing calculus built on a notion of quoting  Provides an account of structured names  Eliminates  and replication  Work underway on  Abstract data types  Destructuring on input  Hennessy-Milner style logic  ‘Silent’  -calculus  Fully abstract encoding of Ambient calculus  Presented a higher-order asynchronous message-passing calculus built on a notion of quoting  Provides an account of structured names  Eliminates  and replication  Work underway on  Abstract data types  Destructuring on input  Hennessy-Milner style logic  ‘Silent’  -calculus  Fully abstract encoding of Ambient calculus


Download ppt "09.04.2005Foundations of Interaction ETAPS `05 0 Ex nihilo: a reflective higher- order process calculus The  -calculus L.G. Meredith 1 & Matthias Radestock."

Similar presentations


Ads by Google