Nominal Rewriting and Types Maribel Fern andez Kings College - - PowerPoint PPT Presentation

nominal rewriting and types
SMART_READER_LITE
LIVE PREVIEW

Nominal Rewriting and Types Maribel Fern andez Kings College - - PowerPoint PPT Presentation

Nominal Rewriting and Types Maribel Fern andez Kings College London Joint work with M.J. Gabbay and I. Mackie Maribel Fern andez Nominal Rewriting and Types Motivations Rewrite rules can be used to define equational theories, and


slide-1
SLIDE 1

Nominal Rewriting and Types

Maribel Fern´ andez

King’s College London

Joint work with M.J. Gabbay and I. Mackie

Maribel Fern´ andez Nominal Rewriting and Types

slide-2
SLIDE 2

Motivations

Rewrite rules can be used to define

  • equational theories, and theorem provers;
  • algebraic specifications of operators and data structures;
  • operational semantics of programs;
  • a theory of functions;
  • a theory of processes;
  • etc.

Maribel Fern´ andez Nominal Rewriting and Types

slide-3
SLIDE 3

Motivations

Specifying binding operations — informal presentations:

  • Operational semantics:

let a = N in M − → (fun a → M)N α-conversion is implicit, but (fun a → M) =α (fun b → M) since a may occur in M.

Maribel Fern´ andez Nominal Rewriting and Types

slide-4
SLIDE 4

Motivations

Specifying binding operations — informal presentations:

  • Operational semantics:

let a = N in M − → (fun a → M)N

  • β and η-reductions in the λ-calculus:

(λx.M)N → M[x/N] (λx.Mx) → M (x ∈ fv(M)) α-conversion is implicit, but (fun a → M) =α (fun b → M) since a may occur in M.

Maribel Fern´ andez Nominal Rewriting and Types

slide-5
SLIDE 5

Motivations

Specifying binding operations — informal presentations:

  • Operational semantics:

let a = N in M − → (fun a → M)N

  • β and η-reductions in the λ-calculus:

(λx.M)N → M[x/N] (λx.Mx) → M (x ∈ fv(M))

  • π-calculus:

P | νa.Q → νa.(P | Q) (a ∈ fv(P)) α-conversion is implicit, but (fun a → M) =α (fun b → M) since a may occur in M.

Maribel Fern´ andez Nominal Rewriting and Types

slide-6
SLIDE 6

Motivations

Specifying binding operations — informal presentations:

  • Operational semantics:

let a = N in M − → (fun a → M)N

  • β and η-reductions in the λ-calculus:

(λx.M)N → M[x/N] (λx.Mx) → M (x ∈ fv(M))

  • π-calculus:

P | νa.Q → νa.(P | Q) (a ∈ fv(P))

  • Logic equivalences:

P and (∀x.Q) ⇔ ∀x(P and Q) (x ∈ fv(P)) α-conversion is implicit, but (fun a → M) =α (fun b → M) since a may occur in M.

Maribel Fern´ andez Nominal Rewriting and Types

slide-7
SLIDE 7

Formally: Rewrite Systems

There are several alternatives.

  • First-order rewrite systems.

append(nil, x) → x append(cons(x, z), y) → cons(x, append(z, y))

Maribel Fern´ andez Nominal Rewriting and Types

slide-8
SLIDE 8

Formally: Rewrite Systems

There are several alternatives.

  • First-order rewrite systems.

append(nil, x) → x append(cons(x, z), y) → cons(x, append(z, y))

⇒ No binders. (-)

Maribel Fern´ andez Nominal Rewriting and Types

slide-9
SLIDE 9

Formally: Rewrite Systems

There are several alternatives.

  • First-order rewrite systems.

append(nil, x) → x append(cons(x, z), y) → cons(x, append(z, y))

  • No binders. (-)

⇒ First-order matching: we need to ’specify’ α-conversion. (-)

Maribel Fern´ andez Nominal Rewriting and Types

slide-10
SLIDE 10

Formally: Rewrite Systems

There are several alternatives.

  • First-order rewrite systems.

append(nil, x) → x append(cons(x, z), y) → cons(x, append(z, y))

  • No binders. (-)
  • First-order matching: we need to ’specify’ α-conversion. (-)

⇒ Simple notion of substitution. (+)

Maribel Fern´ andez Nominal Rewriting and Types

slide-11
SLIDE 11

Formally: Rewrite Systems

There are several alternatives.

  • First-order rewrite systems.

append(nil, x) → x append(cons(x, z), y) → cons(x, append(z, y))

  • No binders. (-)
  • First-order matching: we need to ’specify’ α-conversion. (-)
  • Simple notion of substitution. (+)
  • Algebraic λ-calculi: First-order rewriting + β-rule.

Maribel Fern´ andez Nominal Rewriting and Types

slide-12
SLIDE 12

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

Maribel Fern´ andez Nominal Rewriting and Types

slide-13
SLIDE 13

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

Maribel Fern´ andez Nominal Rewriting and Types

slide-14
SLIDE 14

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

⇒ Terms with binders. (+)

Maribel Fern´ andez Nominal Rewriting and Types

slide-15
SLIDE 15

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

  • Terms with binders. (+)

⇒ Implicit α-equivalence. (+)

Maribel Fern´ andez Nominal Rewriting and Types

slide-16
SLIDE 16

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

  • Terms with binders. (+)
  • Implicit α-equivalence. (+)

⇒ We targeted α but now we have to deal with β too. (-)

Maribel Fern´ andez Nominal Rewriting and Types

slide-17
SLIDE 17

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

  • Terms with binders. (+)
  • Implicit α-equivalence. (+)
  • We targeted α but now we have to deal with β too. (-)

⇒ Substitution is a meta-operation using β. (-)

Maribel Fern´ andez Nominal Rewriting and Types

slide-18
SLIDE 18

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

  • Terms with binders. (+)
  • Implicit α-equivalence. (+)
  • We targeted α but now we have to deal with β too. (-)
  • Substitution is a meta-operation using β. (-)

⇒ Unification is undecidable in general. (-)

Maribel Fern´ andez Nominal Rewriting and Types

slide-19
SLIDE 19

Higher-order frameworks

  • Higher-order rewrite systems (CRS, HRS, etc.)

β-rule: app(lam([a]Z(a)), Z ′) → Z(Z ′) Then app(lam([a]f (a, g(a)), b) → f (b, g(b)) using higher-order matching.

  • Higher-Order Abstract Syntax:

let a = N in M(a) − → (fun a → M(a))N

  • Terms with binders. (+)
  • Implicit α-equivalence. (+)
  • We targeted α but now we have to deal with β too. (-)
  • Substitution is a meta-operation using β. (-)
  • Unification is undecidable in general. (-)

⇒ Leaving name dependencies implicit is convenient (e.g. ∀x.P).

Maribel Fern´ andez Nominal Rewriting and Types

slide-20
SLIDE 20

Nominal Rewriting

Inspired by the work on Nominal Logic (Pitts et al.) Key ideas: Freshness conditions a#t, name swapping (a b) · t. Example: β and η rules as NRS: app(lam([a]Z), Z ′) → subst([a]Z, Z ′) a#M ⊢ (λ([a]app(M, a)) → M ⇒ Terms with binders.

Maribel Fern´ andez Nominal Rewriting and Types

slide-21
SLIDE 21

Nominal Rewriting

Inspired by the work on Nominal Logic (Pitts et al.) Key ideas: Freshness conditions a#t, name swapping (a b) · t. Example: β and η rules as NRS: app(lam([a]Z), Z ′) → subst([a]Z, Z ′) a#M ⊢ (λ([a]app(M, a)) → M

  • Terms with binders.

⇒ Built-in α-equivalence.

Maribel Fern´ andez Nominal Rewriting and Types

slide-22
SLIDE 22

Nominal Rewriting

Inspired by the work on Nominal Logic (Pitts et al.) Key ideas: Freshness conditions a#t, name swapping (a b) · t. Example: β and η rules as NRS: app(lam([a]Z), Z ′) → subst([a]Z, Z ′) a#M ⊢ (λ([a]app(M, a)) → M

  • Terms with binders.
  • Built-in α-equivalence.

⇒ Simple notion of substitution (first order).

Maribel Fern´ andez Nominal Rewriting and Types

slide-23
SLIDE 23

Nominal Rewriting

Inspired by the work on Nominal Logic (Pitts et al.) Key ideas: Freshness conditions a#t, name swapping (a b) · t. Example: β and η rules as NRS: app(lam([a]Z), Z ′) → subst([a]Z, Z ′) a#M ⊢ (λ([a]app(M, a)) → M

  • Terms with binders.
  • Built-in α-equivalence.
  • Simple notion of substitution (first order).

⇒ Dependencies of terms on names are implicit.

Maribel Fern´ andez Nominal Rewriting and Types

slide-24
SLIDE 24

Nominal Rewriting

Inspired by the work on Nominal Logic (Pitts et al.) Key ideas: Freshness conditions a#t, name swapping (a b) · t. Example: β and η rules as NRS: app(lam([a]Z), Z ′) → subst([a]Z, Z ′) a#M ⊢ (λ([a]app(M, a)) → M

  • Terms with binders.
  • Built-in α-equivalence.
  • Simple notion of substitution (first order).
  • Dependencies of terms on names are implicit.

⇒ Easy to express conditions such as a ∈ fv(M)

Maribel Fern´ andez Nominal Rewriting and Types

slide-25
SLIDE 25

Nominal Syntax

  • Function symbols: f , g . . .

Variables: M, N, X, Y , . . . Atoms: a, b, . . . Swappings: (a b)

  • Def. (a b)a = b, (a b)b = a, (a b)c = c

Permutations: lists of swappings, denoted π (Id empty).

Maribel Fern´ andez Nominal Rewriting and Types

slide-26
SLIDE 26

Nominal Syntax

  • Function symbols: f , g . . .

Variables: M, N, X, Y , . . . Atoms: a, b, . . . Swappings: (a b)

  • Def. (a b)a = b, (a b)b = a, (a b)c = c

Permutations: lists of swappings, denoted π (Id empty).

  • Nominal Terms:

s, t ::= a | π · X | [a]t | f t | (t1, . . . , tn) Id · X written as X.

Maribel Fern´ andez Nominal Rewriting and Types

slide-27
SLIDE 27

Nominal Syntax

  • Function symbols: f , g . . .

Variables: M, N, X, Y , . . . Atoms: a, b, . . . Swappings: (a b)

  • Def. (a b)a = b, (a b)b = a, (a b)c = c

Permutations: lists of swappings, denoted π (Id empty).

  • Nominal Terms:

s, t ::= a | π · X | [a]t | f t | (t1, . . . , tn) Id · X written as X.

  • Example (ML): var(a), app(t, t′), lam([a]t), let(t, [a]t′),

letrec[f ]([a]t, t′), subst([a]t, t′) Syntactic sugar: a, (tt′), λa.t, let a = t in t′, letrec fa = t in t′, t[a → t′]

Maribel Fern´ andez Nominal Rewriting and Types

slide-28
SLIDE 28

α-equivalence

We use freshness to avoid name capture. a#X means a ∈ fv(X) when X is instantiated. a ≈α a ds(π, π′)#X π · X ≈α π′ · X s1 ≈α t1 · · · sn ≈α tn (s1, . . . , sn) ≈α (t1, . . . , tn) s ≈α t fs ≈α ft s ≈α t [a]s ≈α [a]t a#t s ≈α (a b) · t [a]s ≈α [b]t where ds(π, π′) = {n|π(n) = π′(n)}

  • a#X, b#X ⊢ (a b) · X ≈α X

Maribel Fern´ andez Nominal Rewriting and Types

slide-29
SLIDE 29

α-equivalence

We use freshness to avoid name capture. a#X means a ∈ fv(X) when X is instantiated. a ≈α a ds(π, π′)#X π · X ≈α π′ · X s1 ≈α t1 · · · sn ≈α tn (s1, . . . , sn) ≈α (t1, . . . , tn) s ≈α t fs ≈α ft s ≈α t [a]s ≈α [a]t a#t s ≈α (a b) · t [a]s ≈α [b]t where ds(π, π′) = {n|π(n) = π′(n)}

  • a#X, b#X ⊢ (a b) · X ≈α X
  • b#X ⊢ λ[a]X ≈α λ[b](a b) · X

Maribel Fern´ andez Nominal Rewriting and Types

slide-30
SLIDE 30

Freshness

Also defined by induction: a#b a#[a]s π−1(a)#X a#π · X a#s1 · · · a#sn a#(s1, . . . , sn) a#s a#fs a#s a#[b]s

Maribel Fern´ andez Nominal Rewriting and Types

slide-31
SLIDE 31

Nominal Matching [Urban, Pitts, Gabbay 2003]

  • s = t has solution (∆, θ)

if ∆ ⊢ sθ ≈α t

Maribel Fern´ andez Nominal Rewriting and Types

slide-32
SLIDE 32

Nominal Matching [Urban, Pitts, Gabbay 2003]

  • s = t has solution (∆, θ)

if ∆ ⊢ sθ ≈α t

  • Examples:

λ([a]X) = λ([b]b) ?? λ([a]X) = λ([b]X) ??

Maribel Fern´ andez Nominal Rewriting and Types

slide-33
SLIDE 33

Nominal Matching [Urban, Pitts, Gabbay 2003]

  • s = t has solution (∆, θ)

if ∆ ⊢ sθ ≈α t

  • Examples:

λ([a]X) = λ([b]b) ?? λ([a]X) = λ([b]X) ??

  • Solutions: (∅, [X → a]) and ({a#X, b#X}, Id) resp.

Maribel Fern´ andez Nominal Rewriting and Types

slide-34
SLIDE 34

Nominal Matching [Urban, Pitts, Gabbay 2003]

  • s = t has solution (∆, θ)

if ∆ ⊢ sθ ≈α t

  • Examples:

λ([a]X) = λ([b]b) ?? λ([a]X) = λ([b]X) ??

  • Solutions: (∅, [X → a]) and ({a#X, b#X}, Id) resp.
  • Nominal matching is decidable, and

linear in time [Calves, Fernandez 07].

Maribel Fern´ andez Nominal Rewriting and Types

slide-35
SLIDE 35

Nominal Matching [Urban, Pitts, Gabbay 2003]

  • s = t has solution (∆, θ)

if ∆ ⊢ sθ ≈α t

  • Examples:

λ([a]X) = λ([b]b) ?? λ([a]X) = λ([b]X) ??

  • Solutions: (∅, [X → a]) and ({a#X, b#X}, Id) resp.
  • Nominal matching is decidable, and

linear in time [Calves, Fernandez 07].

  • A solvable problem has a unique most general solution

[Urban, Pitts, Gabbay 04].

Maribel Fern´ andez Nominal Rewriting and Types

slide-36
SLIDE 36

Nominal Rewrite Rules

∆ ⊢ l → r V (r) ∪ V (∆) ⊆ V (l)

  • Examples:

(λ[a]X)Y → X[a→Y ] (XX ′)[a→Y ] → X[a→Y ]X ′[a→Y ] a[a→X] → X a#Y ⊢ Y [a→X] → Y b#Y ⊢ (λ[b]X)[a→Y ] → λ[b](X[a→Y ])

Maribel Fern´ andez Nominal Rewriting and Types

slide-37
SLIDE 37

Nominal Rewrite Rules

∆ ⊢ l → r V (r) ∪ V (∆) ⊆ V (l)

  • Examples:

(λ[a]X)Y → X[a→Y ] (XX ′)[a→Y ] → X[a→Y ]X ′[a→Y ] a[a→X] → X a#Y ⊢ Y [a→X] → Y b#Y ⊢ (λ[b]X)[a→Y ] → λ[b](X[a→Y ])

  • Equivariance: Rules are defined modulo permutative

renamings of atoms. Equivariant nominal matching is exponential... BUT

Maribel Fern´ andez Nominal Rewriting and Types

slide-38
SLIDE 38

Nominal Rewrite Rules

∆ ⊢ l → r V (r) ∪ V (∆) ⊆ V (l)

  • Examples:

(λ[a]X)Y → X[a→Y ] (XX ′)[a→Y ] → X[a→Y ]X ′[a→Y ] a[a→X] → X a#Y ⊢ Y [a→X] → Y b#Y ⊢ (λ[b]X)[a→Y ] → λ[b](X[a→Y ])

  • Equivariance: Rules are defined modulo permutative

renamings of atoms. Equivariant nominal matching is exponential... BUT

  • if rules are CLOSED then it is linear. Intuitively, closed means

no free atoms. The example above is closed.

Maribel Fern´ andez Nominal Rewriting and Types

slide-39
SLIDE 39

Confluence Properties

Critical Pair Lemma: If all critical pairs of a nominal rewrite system are joinable, then it is locally confluent. If the rules are closed then it is sufficient that non-trivial critical pairs be joinable. Orthogonality: If all the rules are closed, left-linear, and without superpositions nominal rewriting is confluent.

Maribel Fern´ andez Nominal Rewriting and Types

slide-40
SLIDE 40

A polymorphic type system for nominal rewriting

Types built from

  • a set of base data sorts δ (e.g. Nat, Bool, Exp, . . . )
  • type variables α, and
  • type constructors C (e.g. List, ×, →, . . . )

Types and type schemes: τ ::= δ | α | (τ1 × . . . × τn) | C τ | [τ]τ ′ σ ::= ∀α.τ Type declarations (arity): ρ ::= (τ ′)τ E.g. succ: (Nat)Nat Instantiation: σ ≤ τ E.g. ∀α.α ≤ Nat, (α)α ≤ (Nat)Nat

Maribel Fern´ andez Nominal Rewriting and Types

slide-41
SLIDE 41

Typing Rules

Typing judgement: Γ; ∆ ⊢ s : τ where Γ is a typing context, ∆ a freshness context, s a term and τ a type. σ ≤ τ Γ, a : σ; ∆ ⊢ a : τ σ ≤ τ Γ; ∆ ⊢ π · X : ⋄ Γ, X : σ; ∆ ⊢ π · X : τ Γ, a : τ; ∆ ⊢ t : τ ′ Γ; ∆ ⊢ [a]t : [τ]τ ′ Γ; ∆ ⊢ ti : τi (1 ≤ i ≤ n) Γ; ∆ ⊢ (t1, . . . , tn) : τ1 × . . . × τn Γ; ∆ ⊢ t : τ ′ f : ρ ≤ (τ ′)τ Γ; ∆ ⊢ f t : τ Γ; ∆ ⊢ π · X : ⋄ holds if for any a such that π · a = a, ∆ ⊢ a#X

  • r for some σ, a: σ, π · a: σ ∈ Γ.
  • Every term has a principal type.

Maribel Fern´ andez Nominal Rewriting and Types

slide-42
SLIDE 42

Typing Rules

Typing judgement: Γ; ∆ ⊢ s : τ where Γ is a typing context, ∆ a freshness context, s a term and τ a type. σ ≤ τ Γ, a : σ; ∆ ⊢ a : τ σ ≤ τ Γ; ∆ ⊢ π · X : ⋄ Γ, X : σ; ∆ ⊢ π · X : τ Γ, a : τ; ∆ ⊢ t : τ ′ Γ; ∆ ⊢ [a]t : [τ]τ ′ Γ; ∆ ⊢ ti : τi (1 ≤ i ≤ n) Γ; ∆ ⊢ (t1, . . . , tn) : τ1 × . . . × τn Γ; ∆ ⊢ t : τ ′ f : ρ ≤ (τ ′)τ Γ; ∆ ⊢ f t : τ Γ; ∆ ⊢ π · X : ⋄ holds if for any a such that π · a = a, ∆ ⊢ a#X

  • r for some σ, a: σ, π · a: σ ∈ Γ.
  • Every term has a principal type.
  • Type inference is decidable.

Maribel Fern´ andez Nominal Rewriting and Types

slide-43
SLIDE 43

Typing Rules

Typing judgement: Γ; ∆ ⊢ s : τ where Γ is a typing context, ∆ a freshness context, s a term and τ a type. σ ≤ τ Γ, a : σ; ∆ ⊢ a : τ σ ≤ τ Γ; ∆ ⊢ π · X : ⋄ Γ, X : σ; ∆ ⊢ π · X : τ Γ, a : τ; ∆ ⊢ t : τ ′ Γ; ∆ ⊢ [a]t : [τ]τ ′ Γ; ∆ ⊢ ti : τi (1 ≤ i ≤ n) Γ; ∆ ⊢ (t1, . . . , tn) : τ1 × . . . × τn Γ; ∆ ⊢ t : τ ′ f : ρ ≤ (τ ′)τ Γ; ∆ ⊢ f t : τ Γ; ∆ ⊢ π · X : ⋄ holds if for any a such that π · a = a, ∆ ⊢ a#X

  • r for some σ, a: σ, π · a: σ ∈ Γ.
  • Every term has a principal type.
  • Type inference is decidable.
  • Typable rules preserve types.

Maribel Fern´ andez Nominal Rewriting and Types

slide-44
SLIDE 44

Examples

a : ∀α.α, X : β ⊢ (a, X) : β × β ⊢ [a]a : [α]α a : β ⊢ [a]a : [α]α a : α, b : α, X : τ ⊢ (a b) · X : τ X : τ; a#X, b#X ⊢ (a b) · X : τ X : τ, a : α, b : α ⊢ [a]((a b) · X, b) : [α](τ × α) Generalisation of Hindley-Milner’s type system:

  • atoms (can be abstracted or unabstracted),
  • variables (cannot be abstracted but can be instantiated, with

non-capture-avoiding substitutions),

  • suspended permutations.

Maribel Fern´ andez Nominal Rewriting and Types

slide-45
SLIDE 45

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

Maribel Fern´ andez Nominal Rewriting and Types

slide-46
SLIDE 46

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.

Maribel Fern´ andez Nominal Rewriting and Types

slide-47
SLIDE 47

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.
  • Nominal matching is decidable; equivariant matching is linear

with closed rules.

Maribel Fern´ andez Nominal Rewriting and Types

slide-48
SLIDE 48

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.
  • Nominal matching is decidable; equivariant matching is linear

with closed rules.

  • Closed NRSs have the expressive power of higher-order

rewriting.

Maribel Fern´ andez Nominal Rewriting and Types

slide-49
SLIDE 49

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.
  • Nominal matching is decidable; equivariant matching is linear

with closed rules.

  • Closed NRSs have the expressive power of higher-order

rewriting.

  • Closed NRSs have the properties of first-order rewriting

(critical pair, lemma, orthogonality).

Maribel Fern´ andez Nominal Rewriting and Types

slide-50
SLIDE 50

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.
  • Nominal matching is decidable; equivariant matching is linear

with closed rules.

  • Closed NRSs have the expressive power of higher-order

rewriting.

  • Closed NRSs have the properties of first-order rewriting

(critical pair, lemma, orthogonality).

  • To model name generation, locality or scope constraints: add

a new construct N and a scope relation a@t.

Maribel Fern´ andez Nominal Rewriting and Types

slide-51
SLIDE 51

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.
  • Nominal matching is decidable; equivariant matching is linear

with closed rules.

  • Closed NRSs have the expressive power of higher-order

rewriting.

  • Closed NRSs have the properties of first-order rewriting

(critical pair, lemma, orthogonality).

  • To model name generation, locality or scope constraints: add

a new construct N and a scope relation a@t.

  • To model general constraints on the applicability of rules:

generalise ’contexts’ in rules with other predicates: e.g.’is-in’, ’is-closed’, etc.

Maribel Fern´ andez Nominal Rewriting and Types

slide-52
SLIDE 52

Conclusion

  • Nominal Terms: first-order syntax, with a notion of matching

modulo α.

  • Higher-order substitutions are easy to define using freshness.
  • Nominal matching is decidable; equivariant matching is linear

with closed rules.

  • Closed NRSs have the expressive power of higher-order

rewriting.

  • Closed NRSs have the properties of first-order rewriting

(critical pair, lemma, orthogonality).

  • To model name generation, locality or scope constraints: add

a new construct N and a scope relation a@t.

  • To model general constraints on the applicability of rules:

generalise ’contexts’ in rules with other predicates: e.g.’is-in’, ’is-closed’, etc.

  • Types are not sufficient for termination: adapt results from

algebraic λ calculi.

Maribel Fern´ andez Nominal Rewriting and Types

slide-53
SLIDE 53

That’s all!

Questions ?

Maribel Fern´ andez Nominal Rewriting and Types