Convergence in Infinitary Term Graph Rewriting Systems is Simple - - PowerPoint PPT Presentation

convergence in infinitary term graph rewriting systems is
SMART_READER_LITE
LIVE PREVIEW

Convergence in Infinitary Term Graph Rewriting Systems is Simple - - PowerPoint PPT Presentation

Convergence in Infinitary Term Graph Rewriting Systems is Simple Patrick Bahr paba@diku.dk University of Copenhagen Department of Computer Science 7th International Workshop on Computing with Terms and Graphs Rome, Italy, March 23rd, 2013


slide-1
SLIDE 1

Convergence in Infinitary Term Graph Rewriting Systems is Simple

Patrick Bahr paba@diku.dk

University of Copenhagen Department of Computer Science

7th International Workshop on Computing with Terms and Graphs Rome, Italy, March 23rd, 2013

slide-2
SLIDE 2

Term Graph Rewriting vs. Infinitary Rewriting

Pick one to avoid the other.

Pick term graph rewriting finite representation of infinite terms (via cycles) finite representation of infinite rewrite sequences

f g b h

Pick infinitary rewriting avoid dealing with term graphs work on the unravelling instead

f g b h g b f g b h g b

2

slide-3
SLIDE 3

Infinitary Term Graph Rewriting – What is it for?

A common formalism study correspondences between infinitary TRSs and finitary GRSs Lazy evaluation infinitary term rewriting only covers non-strictness however: lazy evaluation = non-strictness + sharing towards infinitary lambda calculi with letrec Ariola & Blom. Skew confluence and the lambda calculus with letrec. the calculus is non-confluent but there is a notion of infinite normal forms

3

slide-4
SLIDE 4

Our Previous Approach [RTA ’11]

Profile weak convergence two modes of convergence: metric & partial order result:

◮ correspondence between metric & partial order convergence ◮ soundness w.r.t. infinitary term rewriting (sorta kinda)

problem: complicated; difficult to analyse; lack of completeness Term graph rewriting with from(x) → x :: from(s(x))

from :: from s :: :: s from s :: ⊥ :: ⊥ :: ⊥

4

slide-5
SLIDE 5

Our New Approach

Less restrictive structures dR(g, h) ≥ dS(g, h) coarser topology (i.e. more sequences converge) g ≤R

⊥ h =

⇒ g ≤S

⊥ h

sequences converge to term graphs “with fewer ⊥’s” Term graph rewriting with from(x) → x :: from(s(x))

from :: from s :: :: s from s :: ⊥ :: ⊥ :: ⊥

5

slide-6
SLIDE 6

Outline

1

Introduction Goals A Different Approach

2

Weak Convergence

3

Strong Convergence

6

slide-7
SLIDE 7

Metric Infinitary Term Graph Rewriting

Complete metric on terms d(g, h) = 2−sim(g,h) sim(g, h) = maximum depth d s.t. truncated at depth d, g and h are equal Example

1 level

f e f b c f e e a g h d( , ) = 2−1

2 levels

f e e a f e e b g′ h′ d( , ) = 2−2

7

slide-8
SLIDE 8

Partial Order Infinitary Term Rewriting

Partial order on terms partial terms: terms with additional constant ⊥ (read as “undefined”) partial order ≤⊥ reads as: “is less defined than” ≤⊥ is a complete semilattice (= cpo + glbs of non-empty sets) Convergence formalised by the limit inferior: lim inf

ι→α tι =

  • β<α
  • β≤ι<α

tι intuition: eventual persistence of nodes of the terms

8

slide-9
SLIDE 9

A Partial Order on Term Graphs

Specialise on terms Consider terms as term trees (i.e. term graphs with tree structure) How to define the partial order ≤⊥ on term trees? ⊥-homomorphisms φ: g →⊥ h homomorphism condition suspended on ⊥-nodes allow mapping of ⊥-nodes to arbitrary nodes same mechanism describing matching in term graph rewriting Definition (Simple partial order ≤S

⊥ on term graphs)

For all g, h ∈ G∞(Σ⊥), let g ≤S

⊥ h iff there is some φ: g →⊥ h.

9

slide-10
SLIDE 10

Properties of Completions

Term graph rewriting with from(x) → x :: from(s(x))

from :: from s :: :: s from s :: ⊥ :: ⊥ :: ⊥

Theorem (metric completion of term graphs) The metric completion of (GC(Σ), dS) is the metric space (G∞

C (Σ), dS).

Theorem (ideal completion of term graphs) The ideal completion of (GC(Σ⊥), ≤S

⊥) is order isomorphic to

(G∞

C (Σ⊥), ≤S ⊥).

10

slide-11
SLIDE 11

Metric vs. Partial Order Convergence

Partial order convergence f c c f c f c c f c f c c Why??? Because f c c f c ≤S

Theorem Let S be a reduction in a GRS R: S : g ֒ →

m R h

= ⇒ ⇐ = ✦ ✪ S : g ֒ →

p R h total

11

slide-12
SLIDE 12

Outline

1

Introduction Goals A Different Approach

2

Weak Convergence

3

Strong Convergence

12

slide-13
SLIDE 13

Strong Convergence

Intuition behind strong convergence syntactic restriction of convergence pretend that the root of the left-hand side and the right-hand side of each rule are distinct Strong metric convergence additional restriction: depth of contracted redexes must tend to infinity Strong partial order convergence modify limit formation: replace each redex with ⊥

13

slide-14
SLIDE 14

Consequences

Partial order convergence f c c f c f c c f c ⊥ Rules that produce this rewrite sequence f c c f c ρ1 : f c f c c ρ2 : Theorem Let S be a reduction in a GRS R: S : g ։

m R h

⇐ ⇒ S : g ։

p R h total

14

slide-15
SLIDE 15

Examples

Term graph rewriting with from(x) → x :: from(s(x))

from ⊥ :: ⊥ s :: :: s ⊥ s :: :: s :: s

Term graph rewriting with h(x, y) → h(y, x) f ⊥ g c f ⊥ g c f ⊥ g c f ⊥ g c

15

slide-16
SLIDE 16

Metric vs. Partial Order Approach

Theorem (Soundness of partial order convergence) For every left-linear, left-finite GRS R we have g h

p

s U (·) U (R) R t

p

U (·) Theorem (Completeness of partial order convergence) For every orthogonal, left-finite GRS R we have s t

p

g U (·) t′ h

p

U (·)

p

U (R) R

16

slide-17
SLIDE 17

Conclusions

Simple structures formalising convergence on term graphs intuitive & simple generalisation of term rewriting counterparts the structures are “complete” “soundness” of limit & limit inferior (i.e. commutes with unravelling) But: weak partial order convergence is somewhat odd Strong convergence regain correspondence between metric and partial order convergence soundness and completeness w.r.t. infinitary term rewriting

17