Introduction to the calculus - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Introduction to the calculus

Description:

Name creation is internal to the calculus ... other bisimulations: barbed, early, open,... also: weak bisimilation, i.e. making unobservable ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 27
Provided by: SMK86
Category:

less

Transcript and Presenter's Notes

Title: Introduction to the calculus


1
Introduction to the ?-calculus
  • Stefan Kahrs
  • source Joachim Parrows chapter in the Handbook
    of Process Algebra

2
What is it?
  • In short a process algebra, invented by Robin
    Milner around 1990. Process algebra are like toy
    programming languages for parallel programming
  • Special features
  • Name creation is internal to the calculus
  • Orthogonality names serve both as data and as
    channels (mobility)

3
Syntax
  • P P1 P2 parallel
  • P1 P2 n.d. choice
  • (?x)P new name
  • x1(x2). P input
  • x1 x2 . P output
  • 0 stop
  • ? . P silent action
  • A(x1,,xn) defined process
  • if x1x2 then P match
  • if x1?x2 then P mismatch

4
Slight Variations
  • the original paper by Milner et.al. had match but
    not mismatch some papers omit both
  • instead of (recursively) defined agents, some
    papers have replication (!P) instead of recursion
  • at least one paper omits non-det. choice
  • syntactic variants xyP, (x)P, ?x.P

5
Standard Process Algebra Stuff
  • communication on a channel a
  • notice this is synchronous, but...
  • aside substitution avoids name capture

6
...and also
  • process descriptions of A(x1,...,xn)
  • note the xi are just name parameters
  • can be (mutually) recursive
  • no renaming operator

7
Names
  • The distinguishing feature of the ?-calculus!
  • originated in Standard ML semantics
    (implementations)
  • type checking (for datatypes or abstract types)
  • exception constructors
  • not fundamentally different from object creation
    in OO-programming

8
Eh?
  • the ? operator generates a new name
  • or if you prefer hides a free name
  • however these names are mobile communication
    can move them into other areas that seemingly
    were outside the scope
  • this is achieved by the congruence relation which
    equates (some) equivalent processes

9
Example of moving scope
  • on the left ? inside parallel composition
  • on the right it has moved outside

10
Congruence ? (note Parrow)
  • ? is the smallest congruence such that
  • both and form commutative monoids with
    neutral element 0
  • it includes ?-conversion
  • ...and the unfolding of definitions
  • ...and most importantly, the scope extension laws

11
Scope Extension Laws
garbage collection
12
Consequences and non-Consequences
  • all binders can be moved to the top only
    recursive descriptions are in the way
  • we do not have
  • it should be clear why however, for we do not
    have this either and there it is less clear

13
Operational Semantics
  • defines a labelled transition relation
  • when we have
  • ...then t can evolve to u, and the outside world
    can observe the action ?
  • three actions
  • input a(x)
  • output
  • silent ?
  • one of many presentations...

14
Rules I
15
Comments
  • because of the input prefix (also ?x labels, but
    they play only a minor rule) there are bound
    names in labels
  • non-deterministic choice commits by making a
    transition (which can be silent), and this is the
    only thing it can do

16
Rules II
17
Comments
  • because of the side-condition on the RES rule,
    any attempt to immediately send or receive on a
    fresh name will deadlock
  • the CLOSE rule is not really necessary, because
    its effect can be achieved through the other
    rules, but without it the OPEN rule would fire
    blanks

18
Bisimulation
  • ...cannot quite be defined as usual, because we
    have two problems
  • bound names in labels
  • even if we take care of them, we do not get a
    congruence relation

19
Reminder Standard Definition
  • a (strong) bisimulation is a symmetric binary
    relation ? such that if and P?Q
    then ?Q. and P ? Q.
  • modification for input prefix (?a(x))
  • assume x is fresh and
  • write P?Q if it holds for some bisimulation

20
Input Prefix
  • may not preserve strong bisimilarity
  • because ? is not preserved by (arbitrary)
    substitutions an aliasing problem
  • ...and input prefix can introduce aliasing

21
Example
  • is bisimilar to
  • but the substitution b/a would break the
    equivalence since the left could silently evolve
    to 0, the right cannot
  • therefore, the input prefix c(a) breaks
    bisimilarity as well

22
Getting out of jail
  • two agents P and Q are (strongly) congruent if
    and only if P? ? Q? for all substitutions ?.
  • note strong congruence is the largest congruence
    relation in bisimilarity
  • other bisimulations barbed, early, open,...
  • also weak bisimilation, i.e. making ?
    unobservable

23
Asynchronous ?-calculus
  • As most process algebras, the ?-calculus is
    essentially synchronous.
  • However, when we constrain the agents we can
    write in a certain way, we end up with an
    asynchronous calculus.
  • What are the constraints?

24
Constraints for asynchronous calculus
  • Only 0 can follow an output prefix
  • an output prefix may not occur as an unguarded
    operand of
  • Rationale the agent ?.(ax.0 P) is essentially
    asynchronously outputting on a and continuing as P

25
Recover...
  • it is possible to recover from these constraints
    by using acknowledgements, e.g.
  • the binder protects the name b and thus protects
    the acknowledgement

26
Lots of other stuff
  • if others are willing to continue that theme...
  • PICT, a programming language based on the
    asynchronous ?-calculus
  • proving (various) bisimilarities
  • applications
  • higher-order ?-calculus
  • action semantics
Write a Comment
User Comments (0)
About PowerShow.com