Concurrent pattern calculus IFIP TCS 2010 Thomas Given-Wilson 1 - - PowerPoint PPT Presentation

concurrent pattern calculus
SMART_READER_LITE
LIVE PREVIEW

Concurrent pattern calculus IFIP TCS 2010 Thomas Given-Wilson 1 - - PowerPoint PPT Presentation

Concurrent pattern calculus IFIP TCS 2010 Thomas Given-Wilson 1 Daniele Gorla 2 Barry Jay 1 September 22, 2010 1 QCIS & SoS, University of Technology, Sydney 2 Dip. di Informatica, Univ. di Roma La Sapienza Thomas Given-Wilson , Daniele


slide-1
SLIDE 1

Concurrent pattern calculus

IFIP TCS 2010 Thomas Given-Wilson 1 Daniele Gorla 2 Barry Jay 1 September 22, 2010

1QCIS & SoS, University of Technology, Sydney

  • 2Dip. di Informatica, Univ. di Roma “La Sapienza”

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-2
SLIDE 2

Outline

Motivation Concurrent Pattern Calculus Trade Example Relation to other calculi Conclusions and Future work

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-3
SLIDE 3

Motivation I - Computation

Pattern calculus [Jay09] generalises lambda calculus by driving reduction by pattern matching. The key idea is intensional treatment of arguments: (x y → s)(d u) − → {d/x, u/y}s Pattern matching in process calculi: data structures (CSP)

  • ne channel name (π-calculus [MPW92])

arity (polyadic π-calculus) many names and arity (Linda [Gel85]) decompose pairs (Spi calculus [GA97])

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-4
SLIDE 4

Motivation II - Symmetry

Lambda calculus has function and argument based upon application, but parallel composition of processes is symmetric. So generalise from pattern matching, to pattern unification where both processes in an interaction as equal. Pattern unification needs to support: input

  • utput

equality of names structure all in a single interaction.

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-5
SLIDE 5

Motivation III - Trade

Trade is inherently symmetrical with two parties exchanging information in a single interaction. Consider stock trading. A buyer and seller wish to trade in a company’s stock. They must agree upon the company. The buyer exchanges payment information for the seller’s share certificates. Trade should be atomic, either the exchange succeeds or fails. It should not be possible for one party or the other to receive information without giving out their own.

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-6
SLIDE 6

Concurrent Pattern Calculus

Patterns to support: output, equality tests, input, and structure. p, q ::= x | x | λx | p • q Unification of two patterns {p| |q} seeks substitutions on their binding names: {x| |x} {x| | x} { x| |x} { x| | x}        = Some ({}, {}) {λx| |q} = Some ({q/x}, {}) ... {p| |λx} = Some ({}, {p/x}) ... {p1 • p2| |q1 • q2} = Some ((σ1 ∪ σ2), (ρ1 ∪ ρ2)) ... {p| |q} = undefined otherwise.

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-7
SLIDE 7

Concurrent Pattern Calculus II

Process generalised from π-calculus: P ::= 0 | P|P | !P | (νx)P | p → P with a single new prefix, the case p → P with pattern p body P. Interaction rule given by: p → P | q → Q − → σP | ρQ where {p| |q} = Some (σ, ρ).

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-8
SLIDE 8

Simple trade problem

Two traders interested in trading shares of the ABC company. A seller with desire to sell ABC number of shares to sell 100

  • ffer price $0.38

share certificate Cert requires billing account λa A buyer with desire to buy ABC

  • number of shares to buy 100

requires some price λp requires a certificate λc has bank account b

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-9
SLIDE 9

Simple trade solution

Represent the a seller: (ABC • 100 • $0.38 • Cert • λa) → S(a) . and the buyer ( ABC

  • 100 • λp • λc • b) → B(p, c) .

where S(a) and B(p, c) are successful completion. Their interaction is ABC • 100 • $0.38 • Cert • λa → S(a) | ABC

  • 100 •

λp • λc • b → B(c) − → {b/a}S(a) | {$0.38/p, Cert/c}B(p, c) = S(b) | B($0.38, Cert) .

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-10
SLIDE 10

Valid encodings

An encoding is valid if it satisfies five properties [Gor08]:

1 Compositionality 2 Name invariance 3 Operational correspondence 4 Divergence reflection 5 Success sensitiveness Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-11
SLIDE 11

Relation to π-calculus

Concurrent pattern calculus can encode π-calculus, the interesting process forms are: [ [n(x).P] ]

def

=

  • n • λx • z → [

[P] ] fresh z [ [nx.P] ]

def

=

  • n • x • λz → [

[P] ] fresh z The reverse is not possible, consider the self-matching process x → √ that interacts with itself x → √ | x → √ − → √ | √ There is no π-calculus process P that reduces in parallel with itself, but does not reduce alone.

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-12
SLIDE 12

Relation to Spi calculus

Concurrent pattern calculus can encode Spi calculus. Selected (for flavour) terms [ [ (M, N) ] ]

def

= pair • [ [ M ] ] • [ [ N ] ] [ [ {M}N ] ]

def

= encr • [ [ M ] ] • [ [ N ] ] and selected processes [ [ let (x, y) = M in P ] ]

def

= (νn)( n • (pair • λx • λy) → [ [ P ] ] | n • [ [ M ] ] → 0) [ [ case M of {x}N : P ] ]

def

= (νn)( n • (encr • λx • [ [ N ] ]) → [ [ P ] ] | n • [ [ M ] ] → 0) . The reverse is not possible, again consider the self-matching process.

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-13
SLIDE 13

Relation to fusion calculus

Concurrent pattern calculus and Fusion calculus [PV98] are unrelated. Theorem There exists no valid encoding of Fusion into CPC. Proof:[Sketch] Create a reduction in fusion calculus that requires three processes to cooperate, CPC interactions are binary.

  • Theorem

There exists no valid encoding of CPC into Fusion. Proof:[Sketch] CPC can match an infinite number of names in a single interaction, fusion is limited to one.

  • Thomas Given-Wilson , Daniele Gorla , Barry Jay 1

Concurrent pattern calculus

slide-14
SLIDE 14

Conclusions

Concurrent pattern calculus is an elegant model that supports input, output, and equality tests in an atomic interaction symmetric exchange of information lambda calculus computation (through encoding π-calculus) encodings of many popular calculi There is also an implementation of concurrent pattern calculus in bondi [cpc10].

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-15
SLIDE 15

Future Work

Many areas still to work on: Relation to computation: pattern calculus, SF-logic [JGW] Relation to other process calculi (many more out there) Security and encryption Develop applications Thank you for listening, any questions?

Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus

slide-16
SLIDE 16

Bibliography

CPC bondi, 2010. Retrieved 2 September 2010, from http://progsoc.uts.edu.au/˜sanguinev/files/bondi.tar. A.D. Gordon and M. Abadi. A calculus for cryptographic protocols: The spi calculus. 4th ACM Conference on Computer and Communications Security, pages 36 – 47, 1997. David Gelernter. Generative communication in Linda. ACM Trans. Program. Lang. Syst., 7(1):80–112, 1985.

  • D. Gorla.

Towards a unified approach to encodability and separation results for process calculi. In F. van Breugel and M. Chechik, editors, Proc. of 19th International Conference on Concurrency Theory (CONCUR’08), number 5201 in LNCS, pages 492–507. Springer, 2008. Barry Jay. Pattern Calculus: Computing with Functions and Data Structures. Springer, 2009. Barry Jay and Thomas Given-Wilson. A combinatory approach to internal structure. to appear in Journal of Symbolic Logic. Robin Milner, Joachim Parrow, and David Walker. A calculus of mobile processes, I–II. Information and Computation, 100(1):1–77, 1992.

  • J. Parrow and B. Victor.

The fusion calculus: expressiveness and symmetry in mobile processes. Logic in Computer Science, 1998. Proceedings. Thirteenth Annual IEEE Symposium on, pages 176–185, 1998. Thomas Given-Wilson , Daniele Gorla , Barry Jay 1 Concurrent pattern calculus