- From: Assaf Arkin <arkin@intalio.com>
- Date: Mon, 14 Apr 2003 09:38:57 -0700
- To: Ricky Ho <riho@cisco.com>
- CC: public-ws-chor@w3.org
Ricky Ho wrote: > Assaf, thanks for your detail explanation of the Pi-C model. I have > some following questions. > > 1) Can a channel have more than one listening process ? Receiving a message over a channel is something an action does. So you may want to have different actions listening to the same channel at different points in times. If you are talking about broadcast, then you would model it differently by either talking to distinct listeners over different channels, or expressing infinite number of indistinct listeners using one channel. But these are all formalisms of a lower-level language. A lower-level language may take a multicast protocol like IP multicast and express it in terms of distinct channels, e.g. representing MAC addresses. In a higher-level language you'll simplify that by having a multicast capability which yields to that formalism but is easier to work with. > 2) How to do reduction when "condition" steps are involved ? Are the > following reducible ? > > Process placeorder > Send order > Receive orderResponse > > Process acceptOrder > Receive order > switch > case conditionX > Send orderResponse > default > Send errorResponse Nope. You end up at a point where one send can be reduced with one receive. But you have another send that can happen and nothing to reduce it with. > 3) So far, each steps within a process is sequential. Can a process > have multiple steps in parallel ? If so, can you give me an example > ? And how reduction will be done in this case ? Do you mean multiple different steps or multiple instances of the same step? If you mean different steps than I've already shown that. Remember that nothing interesting happens on its own, all the interesting things happen concurrently. To receive a message someone also have to send it. So the first example I gave contained two things that happen in parallel and you can extend it to 3, 4, etc. However complex it is, you can easily express it. If you mean the same step occuring n times in parallel, then #4 gives an example for that. As for showing the reduction, this is where pi-c becomes more complicated than elementary school algebra and you'll have to start looking into congruence, simulation, bi-simulation, etc. I'm not mathematically inclined, so I can't give you a much better explanation that you can find in Milner's book. > > 4) Can you give me a loop example ? I vaguely recall you can use a > recursive definition to achieve that. Reflexive. until = send:start | ! ( receive:start.doSomething.(send:start[x=y]0) ) The ! (bang) precedes a process that can happen n times (0 to infinity) whenever it's guard is able to receive a message. So !P = !P | P = !P | P | P = P | P | P ... It's also called replication and represents the ability to do the same thing n times. For example, a Web server that receives an HTTP request and sends back a response does the same thing n times. The [x=y] is some shorthand for evaluating a condition. If the condition is false you do the process on the left, if it's true you do the process on the right (kind of like if ... else ... ). So in this case you have a loop that is performed at least once, if x=y it ends, and if x!=y it repeats, essentially an until loop, and it repeats itself without recursion. arkin > > Best regards, > Ricky >
Received on Monday, 14 April 2003 12:40:54 UTC