**(C) Ralf LĂ¤mmel, Andrei Varanovich, University of Koblenz Landau**

# Logistics

- Course site
- Date published: 6 Dec 2011
- Deadline SVN: 13 Dec 2011 (End of day)
- SVN: https://svn.uni-koblenz.de/softlang/main/courses/plt1112/students + group name
- Present your solution with your own system.
- Lab assistant calls up teams.

# Assignment

The following positions can be approached independently.

**Presentations by student teams would also just show ONE position.**

(You may want to solve several positions to increase chances of presenting.)

If some of the positions are not sufficiently discussed in the next lab, they can also be carried over to the next week. Indeed, some positions of previous assignments may still need to be covered this time around.

## 1. Baseline semantics for the Pi-calculus

Implement the dynamic semantics for the Pi-calculus far enough so that you can run the following trivial example:

**out** *c* *n*; **0** | **in** *c* (*x*); **0**

Please make sure to implement the semantics in a way that the matching in/out channels and the corresponding exchanged names are aggregated by the Prolog program. For instance, the simulation of the aforementioned process should return a list like the following:

[(c,n)]

## 2. Hello World with Pi-calculus

Consider the following "hello world" process:

**in** *stdin* (*name*); **out** *stdout* *hello*; **out** *stdout* *name*; **0**

Please note that, for purposes of demoing, you need to compose this process with one that actually sends some name over *stdin*. Also, you need to compose the process with one that actually consumes the output on *stdout*. Otherwise, the process simulation gets stuck.

Present the corresponding composition.

Run the composition with the aformentioned semantics. What list is aggregated?

## 3. Alpha conversion for the Pi-calculus

(Please make sure you understand how alpha conversion is an assumed part of the semantics.)

What could be the rules for alpha-conversion for the Pi-calculus?

Implement your favorite rules in Prolog.

Demonstrate your approach with suitable examples for applying conversion.