Title: A graphical Fusion Calculus
1A graphical Fusion Calculus
Ivan Lanese Dipartimento di Informatica Università
di Pisa
Joint work with
Ugo Montanari
2Roadmap
- Aims
- Fusion Calculus
- Synchronized Hyperedge Replacement
- Mapping Fusion Calculus into SHR
- Beyond SHR logic programming
- Conclusion
3Aims of the work
- Give a more intuitive presentation for Fusion
Calculus - Applying process calculi to distributed systems
is not intuitive because of - Interleaving semantics
- The same operators describes topology and allowed
behaviours - Comparing two apparently quite different
formalisms Fusion Calculus and Synchronized
Hyperedge Replacement - Extending a similar work on p-calculus (Hirsch)
4Fusion Calculus vs SHR an overview
Fusion Calculus SHR
Process calculus Graph transformation
Algebraic model Graphical representation (but also algebraic notation...)
Interleaving Concurrent
Milner synchronization Different allowed synchronization models
5Fusion Calculus
- It is an evolution of ?-calculus
- Simpler and more symmetric but also more
expressive - Introduce fusion of names
6Syntax for Fusion Calculus
- Agents
- S?i ?i.Pi
- P0 S P1P2 (x)P rec X. P X
7Structural congruence
- Process agent up-to the following laws
- and are associative, commutative and with 0
as unit - ?-conversion
- (x)0 0, (x)(y)P(y)(x) P
- P(x)Q(x)(PQ) if x not free in P
- rec X.PPrec X.P/X
8SOS semantics
PREF
SUM
PAR
COM
SCOPE
PASS
OPEN
STRUCT
9Graph transformation
- Graphs naturally represent the topology of the
system - Synchronized Hyperedge Replacement for modeling
computation, synchronization, reconfiguration - Powerful metamodel
- Different process calculi Ambient, p, ...
- Software architecture
- ...
10SHR a 2 step approach
- Productions to describe the behaviour of single
hyperedges - Local effects (easyer to implement)
- Hyperedges rewritten into generic graphs
- Constraints on surrounding nodes
- Global constraint-solving algorithm
- Allows to define complex transformations
11Edge Replacement Systems
- A production describes how the hyperedge L is
rewritten into the graph R
L
R
H
3
3
4
4
2
2
1
1
12Edge Replacement Systems
- A production describes how the hyperedge L is
transformed into the graph R
Many concurrent rewritings are allowed
13Synchronized Hyperedge Replacement
- Synchronized rewritings we associate actions to
surrounding nodes. A rewriting is allowed iff the
synchronization constraints associated to nodes
are satisfied - Many synchronization models are possible (Hoare,
Milner, ...)
14Synchronized Hyperedge Replacement
- Milner synchronization pair of edges can
synchronize by doing complementary actions
15SHR with mobility
16Example
17Algebraic notation for graphs
18Rewritings as syntactic judgements
?,?
? G1 ?? ? G2
?
?
? ? ? (A x N ) (x, a , y) ?? if ?(x)
(a , y) Associate to each external node its
action and its tuple of names ???? is an
idempotent substitution (forces some merges on
nodes)
19Rewritings as syntactic judgements
- Rewritings
- generated from productions by applying a
suitable set of inference rules (determined by
the synchronization model)
20Fusion Calculus vs SHR
- Fusion SHR
- Processes Graphs
- Sequential processes Hyperedges
- Names Nodes
- Parallel comp. Parallel comp.
- Scope Restriction
- Transitions Rewritings
21Translation
Using structural congruence we can avoid
recursion at top-level
22Productions
- One for each possible action of a standard
process
23Correspondence theorem
- We use special rules to force an interleaving
behaviour in SHR - Bijective correspondence between transitions and
rewritings
24Example
With normal SHR we can execute both the steps at
the same time
25Beyond SHR logic programming
- Logic programming is a well developed programming
paradigm - Useful for implementation purposes
- Which logic programming?
- Not only refutations but general partial
computation - Limit logic programming to have a correspondence
between it and SHR systems Synchronized Logic
Programming - Can be meta-interpreted into standard logic
programming
26The correspondence
- Correspondence between SHR with Hoare
synchronization and Synchronized Logic
Programming - Do you remember last year presentation?
SHR SLP
Graphs Goals
Nodes Variables
Productions Clauses
Transitions Big-steps
Synchronization Unification
27Synchronized Logic Programming
- Graphs are goals without functional symbols and
constants - Big-steps sequence of SLD steps between graphs
- Functional symbols for modeling actions
(unification for synchronization) - Logic programming has no restriction operator we
can introduce it
28From fusion to logic programming
- One further step is needed
- Implementing Milner synchronization using Hoare
synchronization - Not so easy in a mobile environment
- Auxiliary structures for implementing Milner
nodes
29Conclusion
- Fusion Calculus a subcalculus of interleaving
Milner SHR - Essentially two kinds of actions
- One action at the time
- Graphical representation for Fusion Calculus
- Separation between topology of the system and
behaviour - Cross-fertilization between the two models
- Concurrent semantics for Fusion Calculus
- Extension of hyperequivalence to general SHR
rewritings - Changing the synchronization model of Fusion
Calculus
30Example
31Recursion example
Production
Corresponding rewriting