Professional Documents
Culture Documents
Tutorial 3 A
Tutorial 3 A
Exercise 1
Give the reductions corresponding to the execution of the following processes:
1. send(5).0 | recv(x).0
2. send(5).0 | recv(x).send(x).0
3. n[send(5).0 | recv(x).0]
4. m[send(5).0 | recv(x).send(x).0]
5. n[m :: send(5).0] | m[n :: recv(x).0]
Exercise 2
1. The following process sends a hello message and receives an acknowledgement:
send(hello).recv(x).0 | P
Exercise 3
Description
• m and n are sibling ambients.
• u is child ambient to n.
• w is child ambient to m.
• u sends a message hi to w.
1
Questions
1. Specify n, m, u, and w for this communication to take place.
2. Simulate your program and show the communication graph.
3. Modify the program to allow w to send an acknowledgement thanks to u upon receiving the message.
4. Simulate your program and show the communication graph.
Exercise 4
Description
• n is the parent ambient of m.
• m is the parent ambient of u,.
Exercise 5
Description
• m, n, and u are sibling ambients.
• w is a child ambient of m.
• w can move from m to n and then to u.
Questions
1. Specify n, m, u, and w.
2. Simulate your program and show the behaviour graph.
Exercise 6
Description
• m is parent to the ambient n.
• n is parent to u.
• u is parent to w.
2
Exercise 7
Description
• m is sibling to the ambient n.
• u is child to n.
• w is child to u.
• w can move into m.
Questions
1. Specify n, m, u, and w.
Exercise 8
• Specify in ccaPL a server that receives a service request, invokes the requested service, and sends the
output to the requester. Services can be modelled as process abstractions.
• Simulate your program and show the execution output.
Exercise 9
Description
A network hub is a multiport device that forwards the signal it receives on one port, out all other ports
except the incoming port.
Questions
3
Exercise 10
Description
A network switch is a multiport device that forwards the signal it receives on one port, out the destination
port.
Questions