Title: Foundations of Interaction
1Ex nihilo a reflective higher-order process
calculus
L.G. Meredith1 Matthias Radestock2
1Djinnisys Corporation 2LShift, Ltd
2Agenda
- Motivations
- ?-calculus
- Syntax
- Structural equivalence
- Operational semantics
- A warm-up replication
- Encoding the ?-calculus
- Conclusions and future work
3Motivations
- ?-calculus is not a closed theory
- dependent upon a theory of names
- such a theory will at least dictate computation
of name-equality - Name-equality is a computation
- nowhere is there an infinite set of atomic
elements available to the computer scientist - all countably infinite sets available to the
computer scientist are generated from a finite
presentation - perforce the elements of these sets have
structure -- and this structure is used to
compute equality
4Motivations
- If interaction is to provide a foundational
theory of computation, then this computation must
be accounted for, too! - All realizations (e.g., implementations) of
mobile process calculi face this fact - Would our theory better serve our practitioners
therefore if it accounted for name structure as
well? - Synchronization and Substitution play very
different roles in ?-like mobile process calculi
- requiring different computations
5Motivations potential applications
- Biology sites in molecular biology are decidedly
not atomic locations - Ligand-binding receptors, phosphorylation sites,
etc, have extension and behavior - modeling these as atomic names may miss important
behavior - Security concrete realizations of a naming
scheme will have names with structure, - subject to guessing attacks
- theory of interaction with a structural account
of names can facilitate reasoning about this
6The ?-calculus syntax
- Grammar
- P, Q 0 null process
- x(y).P input
- xP_ lift
- PQ parallel composition
- _x drop
-
- x,y P_ quote
-
- PROC denotes the set of processes generated by
this grammar - PROC_ denotes the set of names generated by
this grammar - Syntactic sugar xy _at_ x _y _
7The ?-calculus syntax - examples
the ur-process, everything literally comes ex
nihilo, out of nothing! the first name the first
output process the first input process some new
names
- 0
- 0_
- 0_0_
- 0_(0_).0
- 0_0_ _ , 0_(0_).0 _
Looks remarkably like machine code!
8Structural equivalence, ?-equivalence and name
equivalence
- Clearly, we want 0 7 00 7 000 7
- should 0_7N 00_ 7N 000_ 7N ?
- Name equivalence, ?N ? PROC_ ? PROC_ , is the
smallest equivalence relation respecting - x ?N _x_ P 7 Q ? P_7N Q_
- Structural equivalence, ? ? PROC ? PROC, is the
smallest equivalence relation, containing
?-equivalence, respecting - P 0 7 P 7 0 P
- P Q 7 Q P
- (P Q) R 7 P (Q R )
9Structural equivalence, ?-equivalence and name
equivalence
- First subtlety -- a cycle in Structural
equivalence - structural equivalence depends on ?-equivalence
- ?-equivalence depends on name equality
- name equality depends on structural equivalence!
- Each recursive call is one level of quotes
fewer - Quote Depth
- (P_) 1(P)
- (P) max( (Q_) Q_ ? N(P))
- Grammar enforces strict alternation of quoting
and process constructor - Calculation of structural equivalence terminates
by easy induction on quote depth
10Substitution
- Syntactic substitution
- A substitution is a partial map, ? PROC_ ?
PROC_ - Q_/P_ denotes the map which sends P_ to
Q_ we write x? for ?(x) - xQ_/P_ Q_ if x ?N P_, x otherwise.
- A substitution, ?, is uniquely extended to a
map, _? PROC ? PROC - by the following recursive definition
- 0 _Q_/P_ _at_ 0
- (RS) _Q_/P_ _at_ (R _Q_/P_ ) (S
_Q_/P_ ) - (x(y).R) _Q_/P_ _at_ xQ_/P_ (z). ((R
_z/y ) _Q_/P_ ) - (xR_) _Q_/P_ _at_ x Q_/P_RQ_/P_
_ - (_x) _Q_/P_ _at_ Q_ if x ?N P_ , _x
otherwise - where z is chosen distinct from the names in R,
P_ and Q_
11Substitution
- Semantic substitution -- same as above except for
drop where the process is instantiated at
substitution time - (_x) _Q_/P_ _at_ Q if x ?N P_ , _x
otherwise - Examples
- wyz_ u/z wyu_ wyz_ u/z
wyz_ - w_x_Q_ /x wQ_
12Operational semantics
- The operational semantics is given by a reduction
relation - ? ? PROC ? PROC
- recursively specified by the following rules.
- comm xsrc ?N xtrgt
- xsrcP_ xtrgt(y).Q ? Q _P_ /y
-
- par P ? P?
- P Q ? P? Q
-
- equiv P ? P?, P? ? Q?, Q? ? P
- P ? Q
13Replication
- Replication is defined by the following equation
- D(x) x(y).( _y xy )
- !xP D(x) xP D(x)_
- x(y).( _y xy ) xP D(x)_
- ? P D(x) x_P D(x)
- P D(x) xP D(x)_
-
- Replication is defined by the following equation
- D(x) x(y).( _y xy )
- !xP D(x) xP D(x)_
- x(y).( _y xy ) xP D(x)_
- ? P D(x) x_P D(x)
- P D(x) xP D(x)_
-
- Replication is defined by the following equation
- D(x) x(y).( _y xy )
- !xP D(x) xP D(x)_
- x(y).( _y xy ) xP D(x)_
- ? P D(x) x_P D(x)
- P D(x) xP D(x)_
-
14Encoding the ?-calculus
- Paper presents a distributed encoding in which
par-ands are mapped to separate namespaces - Below we present a centralized encoding (due to
Radestock) in which there is a single resource
against which all ?-requests are synchronized - Both encodings use a trick for free names build
a ?-calculus with the name set PROC_ - Let h be a name not in fn(P), e.g. h ?m ?
fn(P) m0_ _ - P P(h) h h0_ _
- (? x)P(h) h(x). (hx0__ P(h))
- ! x(y).P(h) h(z).(hz0__ zx(y).(D(z)
P(h))_ D(z)) -
- where z ? fn(P) and D(z) as in replication
-
15Correctness of the encoding
- names are global in the ?-calculus
- ?-calculus contexts can make observations that
?-calculus contexts cannot - to prove correctness of the encoding one must
restrict to name-sets visible in ?-calculus
contexts -
- an observation relation, ?N, parameterized in a
set of names, N, is given by - x ?N y P ?N x or Q ?N x
- yv ?N x P Q x
- an P ?N x if there is a Q s.t. P?Q and Q ?N x
- an N-barbed bisimulation, SN, is a symmetric
relation s.t. - P ? P? implies Q ? Q? , P? SN Q?
- P ?N x implies Q ?N x
- P 3N Q if there is an N-barbed bisimulation, SN
, P SN Q - THM P 1? Q iff P 3FN(P)?FN(Q)Q
-
16Operational semantics revisited
- An alternative operational semantics may be given
by - commannihil ?R.(Pchan Pcochan ? R)?R ?
0 - Pchan_P_ Pcochan_(y).Q ? Q _P_ /y
17Conclusions and future work
- Presented a higher-order asynchronous
message-passing calculus built on a notion of
quoting - Provides an account of structured names
- Eliminates ? and replication
- Work underway on
- Abstract data types
- Destructuring on input
- Hennessy-Milner style logic
- Silent ?-calculus
- Fully abstract encoding of Ambient calculus
-