Graph rewriting with cloning Dominique Duval based on work with - - PowerPoint PPT Presentation

graph rewriting with cloning
SMART_READER_LITE
LIVE PREVIEW

Graph rewriting with cloning Dominique Duval based on work with - - PowerPoint PPT Presentation

Graph rewriting with cloning Dominique Duval based on work with Rachid Echahed and Fr ed eric Prost LJK-LIG, University of Grenoble February 28., 2012 Grenoble ANR CLIMT Outline Graph transformation Algebraic graph


slide-1
SLIDE 1

Graph rewriting with cloning

Dominique Duval based on work with Rachid Echahed and Fr´ ed´ eric Prost

LJK-LIG, University of Grenoble

February 28., 2012 – Grenoble – ANR CLIMT

slide-2
SLIDE 2

Outline

Graph transformation Algebraic graph transformation Double-pushout (DPO) Sesqui-pushout (SqPO) Polarized sesqui-pushout (PSqPO)

slide-3
SLIDE 3

Graph rewriting

L, R, G, H are graphs. For each rewrite rule: L

  • R

and each matching: L

  • G

a rewrite step builds H by replacing the occurrence of L in G by some occurrence of R in H: R

  • H
slide-4
SLIDE 4

Example: term rewriting

f

  • a
  • g
  • b

c

  • r
  • f
  • f
  • a

a

  • r
  • g
  • f
  • b

c a

slide-5
SLIDE 5

Some questions:

  • 1. What is a graph?
  • 2. What is a rule?
  • 3. What does replacing mean?
  • 4. Is there a rule G H?

In this talk:

  • 1. A graph is a directed multigraph.
  • 2. A rule is a span L ← K → R.
  • 3. Several answers for replacing: DPO, SqPO, PSqPO.
  • 4. G H is a rule G ← D → H.
slide-6
SLIDE 6

Subgraph classifier: What does replacing mean?

L, R are graphs. L = nL

eL

R = nR

eR

L ⊆ G. G = nL

  • eL

n′

e′

  • R ⊆ H, after rewriting.

H = nR

??

  • eR

??

n′

e′

  • ??
slide-7
SLIDE 7

Example: What does replacing mean?

f

  • a
  • g
  • b

c

  • r
  • f
  • a
  • r
  • g
  • b

c

  • r

r

  • g
  • b

c a

  • r. . . ?
slide-8
SLIDE 8

Outline

Graph transformation Algebraic graph transformation Double-pushout (DPO) Sesqui-pushout (SqPO) Polarized sesqui-pushout (PSqPO)

slide-9
SLIDE 9

Algebraic graph transformation

Algebraic graph rewriting is based on category theory especially on pushouts:

◮ Single-pushout: SPO ◮ Double-pushout: DPO ◮ Sesqui-pushout: SqPO

By: H. Ehrig, U. Montanari, M. L¨

  • we,
  • A. Corradini, B. K¨
  • nig, L. Ribeiro,
  • S. Lack, T. Heindel, P. Sobocinski, . . .
slide-10
SLIDE 10

Pushouts

Union X ∩ Y

Y

  • X

  • X ∪ Y

Pushout: a kind of generalized union (“amalgamated sum”) W

  • Y
  • X
  • Z

◮ When a pushout exists, it is unique (up to iso). ◮ Categories Set and Graph have pushouts.

slide-11
SLIDE 11

PO of graphs

There is a GRAPH OF GRAPHS: V E

s

  • t
  • ◮ Pushouts of graphs exist

and they can be computed pointwise.

slide-12
SLIDE 12

Example: a PO of graphs

f a

  • f
  • b

a c

  • r
  • f

a

  • r
  • f
  • b

a c

slide-13
SLIDE 13

DPO, SqPO, PSqPO

In this talk, every ??PO of graphs looks like: L

  • K

l

  • r

R

  • G

??

D

l1 r1

H

slide-14
SLIDE 14

Outline

Graph transformation Algebraic graph transformation Double-pushout (DPO) Sesqui-pushout (SqPO) Polarized sesqui-pushout (PSqPO)

slide-15
SLIDE 15

Double-pushout (DPO)

The LHS square is a pushout complement (POC) L

  • K

l

  • r

R

  • G

D

l1 r1

H

+ Easy to understand: symmetric + Easy to define + Sound categorical base: adhesive categories

slide-16
SLIDE 16

Example: DPO

f

  • a
  • f

a

  • f
  • b

a c

  • r
  • f
  • a
  • r
  • f

a

  • r
  • f
  • b

a c

slide-17
SLIDE 17

Adhesive categories

◮ Definition of adhesive categories

involves Van Kampen squares. . .

◮ Categories Set and Graph are adhesive.

In an adhesive category:

◮ pushouts of monos are monos ◮ pushouts along monos are pullbacks ◮ pushout complements of monos are unique (if they exist)

slide-18
SLIDE 18

Example: no POC

f

  • a
  • f
  • r
  • f
  • a
  • no POC
slide-19
SLIDE 19

Outline

Graph transformation Algebraic graph transformation Double-pushout (DPO) Sesqui-pushout (SqPO) Polarized sesqui-pushout (PSqPO)

slide-20
SLIDE 20

Sesqui-pushout (SqPO)

The LHS square is a final pullback complement (FPBC) L

  • K

l

  • r
  • R
  • G

D

l1 r1

H

+ FPBC of graphs exist and are unique (up to iso) + PBCs are more general than POCs

slide-21
SLIDE 21

Pullbacks

Intersection X ∩ Y

  • Y

  • X

Z

Pullback: a kind of generalized intersection (“fibered product”) W

  • Y
  • X

Z

◮ When a pullback exists, it is unique (up to iso). ◮ Categories Set and Graph have pullbacks.

slide-22
SLIDE 22

Example: a FPBC

f

  • a
  • f
  • r
  • f
  • a
  • r
  • f
slide-23
SLIDE 23

Example: a SqPO

f

  • a
  • f
  • f
  • b

c

  • r
  • f
  • a
  • r
  • f
  • r
  • f
  • b

c

slide-24
SLIDE 24

Example: cloning and deleting nodes with a SqPO

Goal: cloning and deleting some nodes and their incident edges. Node f is clone twice. Node a is deleted. f

  • a
  • f1

f2

  • f1
  • f2
  • b

c

  • r
  • f
  • a
  • r
  • f1

f2

  • r
  • f1
  • f2
  • b

c

slide-25
SLIDE 25

Outline

Graph transformation Algebraic graph transformation Double-pushout (DPO) Sesqui-pushout (SqPO) Polarized sesqui-pushout (PSqPO)

slide-26
SLIDE 26

Polarized graphs

There is a “GRAPH” OF POLARIZED GRAPHS: V +

  • V

E

s+

  • t−
  • V −
  • ◮ Pushouts of polarized graphs exist.

Graph → PolGraph n → n± PolGraph → Graph n±, n+, n−, n → n Graph is a reflective subcategory of PolGraph.

slide-27
SLIDE 27

L, K are polarized graphs. L = nL±

eL

  • K =

nK,1+

eK

nK,2− L ⊆ G. G = nL±

  • eL
  • n′±

e′

  • K ⊆ D.

D = nK,1+

  • eK

n′±

e′

  • nK,2−
slide-28
SLIDE 28

Polarized sesqui-pushout (PSqPO)

The LHS square is a final pullback complement of polarized graphs L

  • K

l

  • r
  • R
  • G

D

l1 r1

H

+ FPBC of polarized graphs exist and are unique (up to iso) + polarization allows more flexible cloning !!! In fact, only the interface is polarized!

slide-29
SLIDE 29

Example: PSqPO

f

  • a
  • f1+

f2− a±

  • f1
  • f2
  • b

a c

  • r
  • f
  • a
  • f1+
  • f2−

  • r
  • f1
  • f2
  • b

a

  • c
slide-30
SLIDE 30

“if ...then...else...”

“Destructive” rules: m : if

  • n : true

p q

  • m−

  • p = m

“Non-destructive” rules: m:if

  • n:true p q
  • m−

n± :true p± q±

  • p = m

n:true q

slide-31
SLIDE 31

Conclusion

+ SqPO and PSqPO exist and are unique (up to iso) + SqPO and PSqPO are more general than DPO

  • SqPO is not easy to define
  • PSqPO is still less easy to define

CLIMT:

◮ A better understanding of PSqPO ◮ . . . via a better understanding of SqPO? ◮ for various applications of “polarized” cloning ◮ . . . involving some “complexified” graphs in the interface?