nominal rewriting and types
play

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


  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

  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

  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

  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 �∈ fv( M )) ( λ x . Mx ) M α -conversion is implicit, but (fun a → M ) � = α (fun b → M ) since a may occur in M . Maribel Fern´ andez Nominal Rewriting and Types

  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 �∈ fv( M )) ( λ x . Mx ) 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

  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 �∈ fv( M )) ( λ x . Mx ) 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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

  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

Recommend


More recommend