Professional Documents
Culture Documents
net/publication/228720630
CITATIONS READS
2 59
1 author:
Thomas Given-Wilson
Université Catholique de Louvain - UCLouvain
47 PUBLICATIONS 188 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Thomas Given-Wilson on 07 October 2014.
Thomas Given-Wilson
QCIS & School of Software, University of Technology, Sydney, Australia
Thomas.Given-Wilson@uts.edu.au
In concurrent pattern calculus two processes interact through pattern unification. This atomic interac-
tion supports input, output and tests for equality to be performed by both processes simultaneously, as
is natural when exchange or trade. The bondi programming language has been augmented to support
concurrent pattern calculus.
Introduction
The concurrent pattern calculus (CPC) [3] drives interaction by pattern unification. This allows input,
output and tests for equality for be performed simultaneously as an atomic interaction. Such interaction
is natural in trade where both parties exchange information. This paper presents an augmentation of the
bondi programming language [1] to support CPC.
The channel name n is translated into a protected name pnq that can only be checked for equality in
unification. The input x is translated into a binding name λ x that binds in unification. The output name y
is translated to a variable name y that may be bound or tested for equality in unification. The components
of patterns are combined into one using the compound •. The fresh name z prevents translated outputs
matching against other outputs.
More formally the patterns p, q and processes P, Q of CPC are given by
p, q ::= x | pxq | λ x | p • q
P, Q ::= 0 | P|Q | !P | (νx)P | p → P .
The unification of two patterns p and q seeks substitutions for the binding names in p and q to unify
them. A variable name x can be unified with x or pxq to generate empty substitutions. Similarly a
protected name pxq can be unified with x or pxq. A binding name λ x binds any pattern that contains
Submitted to:
YR-CONCUR 2010
2 Concurrent pattern calculus in bondi
no protected or binding names. Compounds are unified component wise. Otherwise the unification is
undefined.
The interaction rule is given by
p→P|q→Q 7−→ σ P | ρQ
where σ and ρ are substitutions generated by unifying p and q. If the patterns cannot be unified then no
interaction occurs.
A buyer who seeks a price to purchase 100 ABC shares with bank account information b, can be repre-
sented by
(pABCq • 100 • λ p • λ c • b) → B(p, c) .
Of course S(a) and B(p, c) represent successful completion for the seller and buyer respectively. Their
interaction is
The traders have matched the company name and number of shares, while exchanging information about
the price and certificates for the bank account.
All the names are represented by bondi variables with annotations to differentiate variable x, protected
~x, and binding \x status. Compounds are represented by application as this aligns with bondi’s support
for static patterns such as in | x y -> ... where x and y bind to the components of data structures [5].
Although CPC patterns are syntactically restricted to bondi variables, their value is used at unification
so any bondi value can be used in practice.
The processes of CPC are represented as follows
The parallel composition and replication syntax translate directly. The restriction is styled after let dec-
larations. CPC cases are denoted with the keyword cpc followed by the representations of the pattern
and body separated by the arrow. Any bondi program may be used as the body of a case, thus the null
process is represented by any bondi program that performs no interaction.
Conclusion
The concurrent pattern calculus uses pattern unification to drive interaction allowing for symmetric in-
formation exchange. The bondi programming language can be augmented to support CPC, allowing
support for applications that trade information. Future work may include using bondi to implement
larger scale solutions to concurrent applications, or expanding bondi to support distributed computation.
References
[1] (2010). bondi. Available at bondi.it.uts.edu.au. Retrieved 19 June 2010, from http://bondi.it.uts.edu.au/.
[2] David Gelernter (1985): Generative communication in Linda. ACM Trans. Program. Lang. Syst. 7(1), pp.
80–112.
[3] Thomas Given-Wilson, Daniele Gorla & Barry Jay (2010): Concurrent Pattern Calculus. In: C. Calude &
V. Sassone, editors: Proc. of 6th International IFIP Conference on Theoretical Computer Science (IFIP-TCS
2010), IFIP, Springer.
[4] A.D. Gordon & M. Abadi (1997): A calculus for cryptographic protocols: The spi calculus. 4th ACM Con-
ference on Computer and Communications Security , pp. 36 – 47.
[5] Barry Jay (2009): Pattern Calculus: Computing with Functions and Data Structures. Springer.
[6] Robin Milner, Joachim Parrow & David Walker (1992): A calculus of mobile processes, I–II. Information and
Computation 100(1), pp. 1–77.
[7] The Caml language (2010). The Caml language: Home. Retrieved 19 June 2010, from http://caml.inria.fr/.