π@: a π-based Process Calculus for the
Implementation of Compartmentalised
Bio-inspired Calculi
Cristian Versari
versari(at)cs.unibo.it
joint work with Roberto Gorrieri
Department of Computer Science
University of Bologna
International School on Formal Methods for
the Design of Computer, Communication and Software Systems:
Computational Systems Biology
Versari (UniBO)
π@ calculus
SFM08-Bio
1 / 42
Outline
Introduction
Biochemical modelling with the π-Calculus
Modelling compartments in π-Calculus
Two biologically inspired calculi: Bioambients, Brane
π@: a core calculus
Encodings of bio-calculi into π@
Conclusion
Versari (UniBO)
π@ calculus
SFM08-Bio
2 / 42
Introduction
The π-Calculus
Biochemical modelling with the π-Calculus
Main ideas
free floating biochemical elements (e.g. molecules) m1 , m2 , . . .
=⇒ parallel processes M1 , M2 , . . .;
I/O channel =⇒ reaction capability;
reaction =⇒ synchronisation/communication;
Example
S
Versari (UniBO)
π@ calculus
, M 1 M1
M2 M2
··· ···
SFM08-Bio
3 / 42
Introduction
The π-Calculus
Biochemical modelling with the π-Calculus
Binary reactions
Chemical reaction
π-Calculus system
M1 , r .M3
R:
m1 + m2 → m3 + m4
M2 , r .M4
=⇒
M1 |M2 → M3 |M4
Example
→
M1 |M1 | · · · |M2 |M2 | · · ·
Versari (UniBO)
M3 |M1 | · · · |M4 |M2 | · · ·
π@ calculus
SFM08-Bio
4 / 42
Introduction
The π-Calculus
Biochemical modelling with the π-Calculus
Mutually exclusive reactions
Chemical reaction
R1 :
R2 :
m1 + m2 → m4
m1 + m3 → m5
Example
π-Calculus system
M1 , r1 .M4 + r2 .M5
M2 , r1 .0
M3 , r2 .0
=⇒
Example
M1 |M2 |M3 → M4 M3
Versari (UniBO)
M1 |M2 |M3 → M5 M2
π@ calculus
SFM08-Bio
5 / 42
Introduction
The π-Calculus
Biochemical modelling with the π-Calculus
Molecular binding
Chemical reaction
R1 :
R1− :
R11 :
−
R11
:
...
π-Calculus system
M(bl ) , r hbl i.Ml (bl ) + r (br ).Mr (bl , br )
m1 + m1 → m11
m11 → m1 + m1
Ml (bl ) , r (br ).Mlr (bl , br ) + b l .M
m11 + m1 → m111 =⇒ Mr (bl , br ) , r hbl i.Mlr (bl , br ) + bl .M
m111 → m11 + m1
Mlr (bl , br ) , b l .Mr (br )
Example
νa M(a) | νb M(b) | νc M(c) → · · · → νabc (Mr |Mlr |Ml )
Versari (UniBO)
π@ calculus
SFM08-Bio
6 / 42
Introduction
Limits
Compartments
Biological compartments
systems organised into complex
spatial and functional
configurations (organelles, cells,
tissues, organs, . . . )
partial mobility of simple
elements but also of whole
structures (membrane channels,
vesicular transport, . . . )
Versari (UniBO)
π@ calculus
SFM08-Bio
7 / 42
Introduction
Limits
Static Compartment Modelling
Main ideas
distinct names for same chemical species in different compartments
transport as “renaming” reaction
Example
Compartments A, B
R : m1 + m2 → m3 + m4
Inter-compartment transport:
Versari (UniBO)
RA :
RB :
=⇒
TAB :
π@ calculus
m1a + m2a → m3a + m4a
m1b + m2b → m3b + m4b
m1a → m1b
SFM08-Bio
8 / 42
Introduction
Limits
Dynamic Compartment Modelling
Example
Exocytosis:
Problems
how to grant that all processes are properly renamed?
how to avoid overlapping of compartment operations?
Versari (UniBO)
π@ calculus
SFM08-Bio
9 / 42
Introduction
Bio-calculi
Bio-inspired Process Calculi with Compartments
BioAmbients
Brane Calculi
Beta-binders
Compartments
explicitly formalised
used at different levels of abstraction
represented by ambients/membranes/boxes
may be nested
dynamical (created, merged/split, . . . )
Versari (UniBO)
π@ calculus
SFM08-Bio
10 / 42
Introduction
Bio-calculi
Overview of BioAmbients
BioAmbients: Mobile Ambients added with communication
primitives
compartments are represented by ambients
ambients contain processes or nested ambients =⇒ tree structure
special primitives allow π-Calculus-like name communication
ambients may exit from, move inside, or merge with other ambients
Example
n[ P Q m[ R ] ]
Versari (UniBO)
π@ calculus
SFM08-Bio
11 / 42
Introduction
Bio-calculi
Ambient capabilities
Example
Merge:
m[merge + c.P|Q] n[merge − c.R|S] → m[P|Q|R|S]
Versari (UniBO)
π@ calculus
SFM08-Bio
12 / 42
Introduction
Bio-calculi
Ambient capabilities
Example
Enter/accept:
m[enter c.P|Q] | n[accept c.R|S] → n[ R | S | m[P|Q] ]
Exit/expel:
n[m[exit c.P|Q] | expel c.R|S] → m[P|Q] | n[R|S]
Versari (UniBO)
π@ calculus
SFM08-Bio
13 / 42
Introduction
Bio-calculi
Ambient communications
Example
Local (intra-ambient):
m[local c!{a}.P|local c?{x}.Q] → m[P|Q{a/x}]
Sibling-to-sibling (inter-ambient):
m[s2s c!{a}.P] | n[s2s c?{x}.Q] → m[P] | n[Q{a/x}]
Versari (UniBO)
π@ calculus
SFM08-Bio
14 / 42
Introduction
Bio-calculi
Ambient communications
Example
Parent-to-child/child-to-parent (inter-ambient, between nested ambients):
m[p2c c!{a}.P | n[c2p c?{x}.Q] ] → m[P | n[Q{a/x}] ]
Child-to-parent/parent-to-child (inter-ambient, between nested ambients):
m[p2c c?{x}.P | n[c2p c!{a}.Q] ] → m[P{a/x} | n[Q] ]
Versari (UniBO)
π@ calculus
SFM08-Bio
15 / 42
Introduction
Bio-calculi
Overview of Brane Calculi
Brane Calculi: membranes as active sites of computation
compartments are represented by membranes
membranes may contain other membranes in a tree structure
processes are located on membranes
membranes transformations preserve bitonality
Example
r |r ′ (| P ◦ s(| Q |) |) ◦ t|t ′ (| R |)
Versari (UniBO)
π@ calculus
SFM08-Bio
16 / 42
Introduction
Bio-calculi
Bitonal operations
Example
Exocytosis:
(| exo ⊥ .t t ′ (|exo.s s ′ (|P|) ◦ Q|) |)
Versari (UniBO)
→
π@ calculus
(| P ◦ s s ′ t t ′ (|Q|) |)
SFM08-Bio
17 / 42
Introduction
Bio-calculi
Bitonal operations
Example
Phagocytosis:
phago.s|s ′ (|P|) ◦ phago ⊥ (r ).t|t ′ (|Q|)
Versari (UniBO)
π@ calculus
→
t|t0 (|r (|s|s ′ (|P|)|) ◦ Q|)
SFM08-Bio
18 / 42
Introduction
Bio-calculi
Motivation
Bio-inspired process calculi:
Pros
faithful modelling
Cons
specialised
easy to use (hopefully...)
no easy cross coding
need to develop new
theoretical analyses
software tools
Motivation
what common compartment-related features?
what the simplest/minimal language primitives to express all of (most
of) them?
Versari (UniBO)
π@ calculus
SFM08-Bio
19 / 42
π@
π@ (paillette): a Conservative Core Calculus
Aim
To provide a core calculus
simple, general purpose
embedding the key features of bio-inspired calculi
The π@ Calculus [Versari, ESOP’07]
π@
::=
π-Calculus + polyadic synchronisation + priority
π@ features
conservative π-Calculus extension
polyadic synchronisation for modeling compartment scoping
priority for gaining atomicity of sequences of operations
Versari (UniBO)
π@ calculus
SFM08-Bio
20 / 42
π@
Localisation by means of Polyadic Synchronisation
Polyadic synchronisation: channels are identified by one or more names
π@
π-Calculus
P ≡ c1 @c2 .P ′
P ≡ c.P ′
Compartments may be represented by one of the names of each channel:
P ≡ c@compartmentP .P ′
Q ≡ c@compartmentQ .Q ′
P and Q may share free names
P and Q may interact iff compartmentP = compartmentQ
Versari (UniBO)
π@ calculus
SFM08-Bio
21 / 42
π@
Atomicity by means of Priority
Priority: high-priority reactions happen before lower-priority ones
Example
S ≡ l.P1 l.P2 h.Q1 h.Q2
/
→
T ≡ P1 S ≡ l.P1 l.P2 h.Q1 h.Q2
→
S2 ≡ l.P1 l.P2 S3 ≡ P1 P2 →
P2 h.Q1 h.Q2
Q1 Q1 Q2
Q2
Each atomic sequence of operations may be encoded as a low priority
reaction followed by an unlimited number of high priority reactions:
P1 ≡ seq1 .op11 .op12 .op13
P2 ≡ seq2 .op21 .op22 .op23
The executions of P1 and P2 never overlap
Versari (UniBO)
π@ calculus
SFM08-Bio
22 / 42
π@
π@ Syntax
π@ syntax
P
π
::=
::=
P
i∈I
τ
πi .Pi
P Q
µ1 @ · · · @µn : k(x)
!P
(ν x)P
µ1 @ · · · @µn : khxi
each channel is represented by a vector of one or more names
µ1 , . . . , µn
each input or output action has a priority k
higher priority actions are executed first
priority is static
Versari (UniBO)
π@ calculus
SFM08-Bio
23 / 42
π@
π@ Semantics
π@ reduction semantics
π@ semantics
S
τ∈
/ i<k I i (M)
τ : k.P + M →k P
P →k P ′
(ν x)P →k (ν x)P ′
S
τ ∈
/ i<k I i (M N)
(µ : k(y ).P + M) (µ : khzi.Q + N) →k P{z/y } Q
S
P →k P ′ τ∈
/ i<k I i (P Q)
P Q →k P ′ Q
P ≡Q
P →k P ′ P ′ ≡ Q ′
Q →k Q ′
the only difference from π-Calculus semantics is the side condition in
red: no additional rules required;
the I k (P) function represents the set of actions of priority k ready to
be executed by the process P.
Versari (UniBO)
π@ calculus
SFM08-Bio
24 / 42
π@
Encodings into π@
Encodings
π@
Parallel-preserving encodings of
BioAmbients, Brane Calculi [Versari, ESOP’07]
some P systems (with maximal parallelism!) [Versari, MECBIC’07]
Beta-binders [Cappello, Quaglia, to appear]
into π@ have been provided.
Versari (UniBO)
π@ calculus
SFM08-Bio
25 / 42
π@
Encoding requirements
Definition
Reasonable encoding:
P1 P2 = P1 P2
renaming preserving: σ permutation of names, σ(P) = θ( P );
termination invariance: P ⇓ iff P ⇓, P ⇑ iff P ⇑;
operational correspondence:
parallel-preserving
∗ ′ ′
if P
P →
P ,
→P then
if P →∗ Q then ∃P ′ : P →∗ P ′ ∧ Q →∗ P ′ .
Versari (UniBO)
π@ calculus
SFM08-Bio
26 / 42
π@
Encodings
Encoding Bioambients
Example
n[ P Q m[ R ] ]
Encoding specifies compartment and parent compartment names:
P c,pc
≡
P
Basic operators
are homomorphically coded P c,pc Q c,pc
P Q c,pc
≡
(new x)P c,pc
≡ (ν x) P c,pc
Nested compartments are represented by private names
[ P ] c,pc
≡ (ν cmp) P cmp,c
Versari (UniBO)
π@ calculus
SFM08-Bio
27 / 42
π@
Encodings
Encoding Bioambients Communications
Local communication:
local c!{a}.P
,
local c?{x}.Q
,
m,pm
m,pm
local@c@mhai. P m,pm
local@c@m(x). Q m,pm
Example
m[local c!{a}.P|local c?{x}.Q] → m[P|Q{a/x}]
Versari (UniBO)
π@ calculus
SFM08-Bio
28 / 42
π@
Encodings
Encoding Bioambients Communications
Sibling-to-sibling communication:
s2s c!{a}.P
s2s c?{x}.Q
m,pm
,
,
n,pn
s2s@c@pmhai. P m,pm
s2s@c@pn(x). Q n,pn
Example
m[s2s c!{a}.P] | n[s2s c?{x}.Q] → m[P] | n[Q{a/x}]
Versari (UniBO)
π@ calculus
SFM08-Bio
29 / 42
π@
Encodings
Encoding Bioambients Communications
Parent-to-child communication:
p2c c!{a}.P
c2p c?{x}.P
m,pm
,
,
n,pn
p2c@c@mhai. P m,pm
p2c@c@pn(x). P n,pn
Example
m[p2c c!{a}.P | n[c2p c?{x}.Q] ] → m[P | n[Q{a/x}] ]
Versari (UniBO)
π@ calculus
SFM08-Bio
30 / 42
π@
Encodings
Encoding Bioambients Capabilities
Merge:
merge + c.P m,pm ,
merge − c.P n,pn ,
merge@c@pmhmi. P m,pm
merge@c@pn(x).bcasthmerge, n, xi. P x,pn
Example
m[merge + c.P|Q] n[merge − c.R|S] → m[P|Q|R|S]
Versari (UniBO)
π@ calculus
SFM08-Bio
31 / 42
π@
Encodings
Encoding Bioambients Capabilities
Enter/accept:
accept c.R n,pn ,
enter c.P m,pm ,
enter @c@pnhni. R n,pn
enter @c@pm(x).bcasthenter , m, xi. P m,x
Example
m[enter c.P|Q] | n[accept c.R|S] → n[ R | S | m[P|Q] ]
Versari (UniBO)
π@ calculus
SFM08-Bio
32 / 42
π@
Encodings
Encoding Bioambients Capabilities
Exit/expel:
expel c.R n,pn ,
exit c.P m,pm ,
expel@c@nhpni. R n,pn
expel@c@pm(x).bcasthexit, m, xi. P m,x
Example
n[m[exit c.P|Q] | expel c.R|S] → m[P|Q] | n[R|S]
Versari (UniBO)
π@ calculus
SFM08-Bio
33 / 42
Encodings
π@
Encoding Brane
Basic Encodings
Example
r |r ′ (| P ◦ s(| Q |) |) ◦ t|t ′ (| R |)
,
P ◦ Q pc
s(|P|) pc
s r c,pc
,
Q
(ν c)( s c,pc
s c,pc r
Versari (UniBO)
P
,
,
P
P
pc
pc
π@ calculus
pc
P )
c
c,pc
SFM08-Bio
34 / 42
π@
Encodings
Encoding Brane Actions
Exocytosis
exon⊥ .t c,pc ,
exon .s c ′ ,pc ′ ,
exo@n@chpci. t c,pc
exo@n@pc ′ (x).bcasthexo, c ′ , xi. s pc ′ ,x
Example
(| exo ⊥ .t t ′ (|exo.s s ′ (|P|) ◦ Q|) |)
Versari (UniBO)
→
π@ calculus
(| P ◦ s s ′ t t ′ (|Q|) |)
SFM08-Bio
35 / 42
π@
Encodings
Encoding Brane Actions
Phagocytosis
phagon⊥ (r ).t c,pc ,
phagon .s c ′ ,pc ′ ,
(ν x) phago@n@pchxi.( t c,pc r x,c )
phago@n@pc ′ (x).bcasthphago, c ′ , xi. s c ′ ,x
Example
phago.s|s ′ (|P|) ◦ phago ⊥ (r ).t|t ′ (|Q|)
Versari (UniBO)
π@ calculus
→
t|t0 (|r (|s|s ′ (|P|)|) ◦ Q|)
SFM08-Bio
36 / 42
π@
Encodings
Encoding Comparison
Example
exit c.P m,pm ,
exon .s c ′ ,pc ′ ,
expel@c@pm(x).bcasthexit, m, xi. P m,x
exo@n@pc ′ (x).bcasthexo, c ′ , xi. s pc ′ ,x
The encodings of BioAmbients and Brane Calculi
reflect the similar tree structure of compartments:
the difference is the scope of the name of compartments
reflect the atonality/bitonality of operations:
the difference is the name broadcasted to the involved processes
show that the key mechanisms for handling the compartment
structure are the same (scoping of communication, broadcast-like
messages to notify changes in the structure)
Versari (UniBO)
π@ calculus
SFM08-Bio
37 / 42
Conclusion
Conclusion
π@ Features
simple (very close to π-Calculus syntax)
conservative (almost same π-Calculus semantics)
concise (reactions are specified once, additional information on
compartments and volumes are specified only if required)
little implementation effort as extension of current implementations of
the π-Calculus
compartments with dynamical structure
cross-compartment elements are straightforwardly and consistently
specified
almost unlimited compartment semantics (able to encode
BioAmbients, Brane Calculi, Projective Brane, . . . )
Versari (UniBO)
π@ calculus
SFM08-Bio
38 / 42
Conclusion
Future Work
Future work
further encodings of bio-inspired calculi into π@
or in stochastic π@ by preserving stochastic semantics
further investigation on the expressiveness of priority
non-interleaving semantics for π@
Versari (UniBO)
π@ calculus
SFM08-Bio
39 / 42
Conclusion
C. Ene and T. Muntean.
Expressiveness of point-to-point versus broadcast communications.
In G. Ciobanu and G. Paun, editors, FCT, volume 1684 of Lecture
Notes in Computer Science, pages 258–268. Springer, 1999.
D. T. Gillespie.
Exact stochastic simulation of coupled chemical reactions.
J. Phys. Chem., 81(25):2340–2361, 1977.
R. Milner.
Communicating and mobile systems: the π-calculus.
Cambridge University Press, New York, NY, USA, 1999.
A. Phillips and L. Cardelli.
A correct abstract machine for the stochastic pi-calculus.
In Bioconcur’04. ENTCS, August 2004.
Versari (UniBO)
π@ calculus
SFM08-Bio
40 / 42
Conclusion
I. Phillips.
Ccs with priority guards.
In K. G. Larsen and M. Nielsen, editors, CONCUR, volume 2154 of
Lecture Notes in Computer Science, pages 305–320. Springer, 2001.
C. Versari.
A core calculus for a comparative analysis of bio-inspired calculi.
In R. D. Nicola, editor, ESOP, volume 4421 of Lecture Notes in
Computer Science, pages 411–425. Springer, 2007.
C. Versari.
Encoding catalytic p systems in pi@.
Electr. Notes Theor. Comput. Sci., 171(2):171–186, 2007.
C. Versari and N. Busi.
Stochastic simulation of biological systems with dynamical
compartment structure.
In M. Calder and S. Gilmore, editors, CMSB, volume 4695 of Lecture
Notes in Computer Science, pages 80–95. Springer, 2007.
Versari (UniBO)
π@ calculus
SFM08-Bio
41 / 42
Conclusion
C. Versari, N. Busi, and R. Gorrieri.
On the expressive power of global and local priority in process calculi.
In L. Caires and V. T. Vasconcelos, editors, CONCUR, volume 4703 of
Lecture Notes in Computer Science, pages 241–255. Springer, 2007.
I. Cappello and P. Quaglia.
A translation of Beta-binders in a prioritized pi-calculus.
To appear.
Versari (UniBO)
π@ calculus
SFM08-Bio
42 / 42
© Copyright 2026 Paperzz