Negotiation Programs

We introduce a global specification language for distributed negotiations, a recently introduced concurrent computation model with atomic negotiations combining synchronization of participants and choice as primitive. A token game on distributed negotiations determines reachable markings which enable possible next atomic negotiations. In a deterministic distributed negotiation, each participant can always be engaged in at most one next atomic negotiation. In a sound distributed negotiation, every atomic negotiation is enabled at some reachable marking, and from every reachable marking the final marking of the distributed negotiation can be reached. We prove that our specification language has the same expressive power as sound and deterministic negotiations, i.e., every program can be implemented by an equivalent sound and deterministic negotiation and every sound and deterministic negotiation can be specified by an equivalent program, where a program and a negotiation are equivalent if they have the same Mazurkiewicz traces and thus the same concurrent runs. The translations between negotiations and programs require only linear time.