- 55 Views
- Uploaded on
- Presentation posted in: General

Mapping Fusion and Synchronized Hyperedge Replacement into Logic Programming

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Dagstuhl Seminar #05081, 20-25 February 2005

Mapping Fusion and Synchronized Hyperedge Replacement into Logic Programming

Ivan Lanese

Dipartimento di Informatica

Università di Pisa

joint work with

Ugo Montanari

To be published on a special issue of Theory and Practice of Logic Programming

- Lot of background
- Fusion Calculus
- Synchronized Hyperedge Replacement
- Logic programming

- From Fusion Calculus to Hoare SHR
- From Hoare SHR to logic programming
- Conclusions

- Many models proposed for global computing systems
- Each model has its strengths and its weaknesses
- Comparing different models
- To understand the relationships among them
- To devise new (hybrid) models

- Cannot analyze all the models, naturally…

- Lot of background
- Fusion Calculus
- Synchronized Hyperedge Replacement
- Logic programming

- From Fusion Calculus to Hoare SHR
- From Hoare SHR to logic programming
- Conclusions

- Process calculus that is an evolution of -calculus
- Simpler and more symmetric but also more expressive
- Introduces fusions of names

- Agents:
S::=i i.Pi

P::=0 | S | P1|P2 | (x)P | rec X. P | X

Processes are agents up to a standard structural

congruence

- Follows the approach of graph transformation
- (Hyper)edges are systems connected through common nodes
- Productions describe the evolution of single edges
- Local effect, easy to implement

- Productions are synchronized via constraintson nodes
- Global constraint solving algorithm to find allowed transitions
- Productions applied indipendently
- Allows to define complex transformations

- A production describes how the hyperedge L is transformed into the graph R

L

R

H

H

3

3

4

4

2

2

1

1

L

R

H

3

3

4

4

2

2

1

1

1

1

2

2

3

3

R’

L’

- A production describes how the hyperedge L is transformed into the graph R

H

Many concurrent rewritings are allowed

- Productions associate actions to nodes
- A transition is allowed iff thesynchronization constraints imposed on actions are satisfied
- Many synchronization models are possible (Hoare, Milner, ...)

a

a

a

a

B1

A1

3

3

B2

A2

- Hoare synchronization: all the edges must perform the same action

- Milner synchronization:pairs of edges do complementary actions

- We use name mobility

- Actions carry tuples of references to nodes (new or already existent)
- References associated to synchronized actions are matched and corresponding nodes are merged

a<x>

a<x>

a<y>

B1

A1

a<y>

(x)

(y)

x=y

B2

A2

Very quickly…

- Syntax
- Semantics

- Lot of background
- Fusion Calculus
- Synchronized Hyperedge Replacement
- Logic programming

- From Fusion Calculus to Hoare SHR
- From Hoare SHR to logic programming
- Conclusions

- We separate the topological structure (graph) from the behaviour (productions)
- We give a visual representation to processes
- Processes translated into graphs
- Sequential processes become hyperedges
- Names become structures called amoeboids

- Our approach deals only with closed processes

- We take agents in standard form
- restrictions with inside parallel composition of sequential agents

- We transform it into a linear agent + substitution

- We translate the process into a graph
- Each linear agent becomes an edge labelled with a copy of the agent with standard names
- Q(x1,y1,z1) becomes an edge labelled by Q(x1,x2,x3) attached to x1,y1,z1

- σ transformed into amoeboids
- Each amoeboid connects a group of names merged by σ

- Each linear agent becomes an edge labelled with a copy of the agent with standard names

x1x2x3.R(x4,x5)

x

x1

z1

Q(x1,x2,x3)

y1

z

x2

x3

y

y2

z2

z3

u2

u1

w1

u3

x1x2x3.S(x4,x5)

u

w2

w

- We have actions for input and output prefixes
- Productions for process edges
- Correspond to executions of prefixes of normalized linear agents
- Prefixes modeled by corresponding SHR actions
- RHS contains the translation of the resulting sequential process
- Fusions implemented by connecting nodes via amoeboids

x2

x3

x1x2x3.R(x4,x5)

y2

R(x1,x2)

u2

u1

x2

x3

y2

u2

u1

out2x2y2

in x

out y

P

Q

y

x

- Amoeboids must allow two complementary actions on the interface and create new amoeboids connecting corresponding names
- Connected amoeboids are merged

P

Q

=

- Amoeboids implemented as networks of edges with a particular structure
- composed essentially by edges that act as routers
- each internal node is shared by two edges
- some technical conditions

- Satisfy the desired properties but…
- interleaving must be imposed from the outside
- produce some garbage (disconnected from the system)

- Reductions of fusion processes correspond to (interleaving) HSHR transitions
- up to garbage
- up to equivalence of amoeboids that does not change the behaviour

- The correspondence can be extended to computations

x1x2x3.R(x4,x5)

x

Q(x1,x2,x3)

z

y

out x2 y2

x1x2x3.S(x4,x5)

u

in z2 w1

w

x

Q(x1,x2,x3)

z

y

R(x1,x2)

S(x1,x2)

u

w

FusionHoare SHR

Closed processGraph

Sequential processHyperedge

NameAmoeboid

PrefixAction

Prefix executionProduction

Reduction Transition

- Lot of background
- Fusion Calculus
- Synchronized Hyperedge Replacement
- Logic programming

- From Fusion Calculus to Hoare SHR
- From Hoare SHR to logic programming
- Conclusions

- Useful for implementation purposes
- Logic programming as goal rewriting engine
- Very similar syntax (with the textual representation for HSHR)
- Logic programming allows for many execution strategies and data structures we need some restrictions
- limited function nesting
- synchronized execution

- We define Synchronized Logic Programming (SLP)

- A transactional version of logic programming (in the zero-safe nets style)
- Safe states are goals without function symbols (goal-graphs)
- Transactions are sequences of SLD steps
- During a transaction each atom can be rewritten at most once
- Transactions begin and end in safe states
- Transactions are called big-steps
- A computation is a sequence of big-steps

- Clauses with syntactic restrictions
- bodies are goal-graphs
- heads are A(t1,…,tn) where ti is either a variable or a single function symbol applied to variables

- Graphs translated to goal-graphs
- edges modeled by predicates applied to the attachment nodes

- Productions are synchronized clauses
- Transitions are matched by big-steps
- Actions are implemented by function symbols
- the constraint that all function symbols have to be removed corresponds to the condition for Hoare synchronization
- names are the arguments of the function symbol
- we choose the first one to represent the new name for the node where the interaction is performed (needed since substitutions are idempotent)
- fusions performed by unification

- Correspondence between HSHR transitions and big-steps
- An injective (at each step) substitution keeps track of the correspondence between HSHR nodes and logic programming variables

y

y

C

C

x

z

C

x

C(x,y)←C(x,z),C(z,y)

r <w>

y

y

C(r(x,w),r(y,w))←S(y,w)

C

S

(w)

x

x

r <w>

S

S

S

C

C

C

x

C

S

C

C

C

C

C

C

S

S

S

C

C

C

x

C

S

C

C

C

C

C

C

Hoare SHR SLP

GraphGoal

HyperedgeAtom

NodeVariable

Parallel comp.AND comp.

ActionFunction sym.

ProductionClause

TransitionBig-step

- Lot of background
- Fusion Calculus
- Synchronized Hyperedge Replacement
- Logic programming

- From Fusion Calculus to Hoare SHR
- From Hoare SHR to logic programming
- Conclusions

- Many relations among the three models
- similar underlying structure (e.g. parallel composition)
- name generations ability
- fusions

- Distinctive features
- Fusion: same structure for system and elementary actions, interleaving semantics, Milner synchronization, restriction
- HSHR: distributed parallel computations, Hoare synchronization, synchronous execution
- SLP: Hoare synchronization, asynchronous execution engine

- Analyzing different name-handling mechanisms
- In π calculus bound names are guarenteed distinct
- Useful for analyzing protocols (nonces, key generation)

- Hybrid models
- Different synchronizations for Fusion or logic programming
- Process calculi with unification (of terms)
- Logic programming with restriction

- Logic programming for implementation purposes
- For HSHR systems
- For Fusion Calculus

Thanks

Questions?

w

z

Ring Example

x,y,w,z C(x,w) | C(w,y) | C (y,z) | C(z,x)

- Transitions

G1 ,,I G2

: (A x N* ) (x, a , y) if (x) = (a , y)

is the set of new names that are used in synchronization

= {z | x. (x) = (a , y), z , z set(y)}

I contains new internal names

- Computations

1

2

n

0 G0 1 G1 … n Gn

- Productions

x1,…,xn L(x1,…,xn) x1,…,xn , , IG

Names can be merged (and new names can be added)

Identity productions are always available

- Transitions
are generated from the productions by applying the transition rules

for the chosen synchronization model

e <>

y

y

C

C

x

z

e <>

C

x

(x,ε,<>)(y,ε,<>)

x, y

C(x,y)

x, y, z

.C(x,z) | C(z,y)

r <w>

y

y

C

S

(w)

x

x

r <w>

,

(x,r,<w>)(y,r,<w>)

x, y

x, y

S(w,y)

C(x,y)

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)(P|Q) if x not free in P
- rec X.P=P[rec X.P/X]