[LE,RO] red red red red red red red red red red red red red red red red red red red red [LE] 1 [RO] 1 [LO] [RE] plain
An Explicit Framework for Interaction Nets Marc de Falco Institut de Math´ ematiques de Luminy Marseille, France Rewriting Techniques and Applications 2009 Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 1 / 20
Background Interaction nets (Lafont): Model of computation derived from multiplicative proof-nets of linear logic relying on simple graph rewriting Turing complete. Strongly (one-step) confluent. Used when terms are too restrictive: optimal reduction for λ -calculus (sharing graphs) concurrency (differential interaction nets) Goal: explicit syntax for straightforward implementation Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 2 / 20
Usual presentation of interaction nets Two parts: statics (nets) and dynamics (reduction by means of rules) Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 3 / 20
Interaction Nets: Statics A B C Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 4 / 20
Interaction Nets: Statics ports A B C Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 4 / 20
Interaction Nets: Statics A B cells C free ports Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 4 / 20
Interaction Nets: Statics principal port auxiliary ports A B symbol C Arity of a symbol: number of auxiliary ports. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 4 / 20
Interaction Nets: Statics wire A B loop C Each port belong to exactly one wire ( Port invariant ). No loop from a cell port. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 4 / 20
Interaction Nets: Dynamics Rules of the form: �→ A B R Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 5 / 20
Interaction Nets: Dynamics Rules of the form: �→ A B R Derived reduction: → A B R Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 5 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? ⊗ ⊗ Take the rule: ` �→ ` Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? ⊗ ⊗ Take the rule: ` �→ ` And the net: ⊗ ` We should be able to apply the reduction. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? ⊗ ⊗ Take the rule: ` �→ ` And the net: ⊗ ` We should be able to apply the reduction. We pull apart the redex. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? Take the rule: ⊗ �→ ⊗ ` ` And the net: ⊗ ` We should be able to apply the reduction. We pull apart the redex. The reduced net being: s 1 s 2 Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? ⊗ ⊗ Take the rule: ` �→ ` And the net: ⊗ ` We should be able to apply the reduction. We pull apart the redex. The reduced net being: We fuse the unnecessary ports. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Hidden mechanism : port fusion Are interaction nets as simple as they look? ⊗ ⊗ Take the rule: ` �→ ` And the net: ⊗ ` We should be able to apply the reduction. We pull apart the redex. The reduced net being: We fuse the unnecessary ports. Reduction process: pulling apart substitution port fusion starting net − − − − − − − → not a net − − − − − − → not a net − − − − − − → final net Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 6 / 20
Approaches to compute port fusion Term syntax (Lafont,Fern´ andez-Mackie): cells as functional symbol and wires as paired occurences of variables. Port fusion computed via an equivalence on variables. implicit treatment. Calculus of interaction nets (Fern´ andez-Mackie): machine for reducing nets with concrete rules handling the equivalence. external treatment. We seek an explicit treatment of port fusion. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 7 / 20
Extending de Bruijn indices λ -calculus: integers for occurences + ad hoc techniques our proposition for interaction nets: integers for ports + Girard’s Geometry of Interaction Surprising concrete link between linear logic and interaction nets trough technical issues. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 8 / 20
Graph-Hypergraph presentation Usual structure to define the statics of nets over ports (Mazza,. . . ). Graph for wires + directed hypergraph for cells + disjointness property A B A B is encoded as Problems: Huge class of structures for very few nets. No graph-theoretic way to compute port-fusion. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 9 / 20
Towards actions Shift of perspective : group actions (i.e. permutations) on ports. Natural disjointness of orbits. Action induced by wires: unique neighbour along wires ⇒ order 2 action. Action induced by cells: get next port around a cell. Graph-Hypergraph restricted to representations of actions. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 10 / 20
Our proposition for statics Actions over N : partial permutations. σ labelled by L when ∃ l : Orbs( σ ) �→ L . σ has pointed orbits when labelled by dom ( σ ) with ∀ o ∈ Orbs( σ ) , l ( o ) ∈ o . Countable set of symbols S with arity function α . Definition An interaction net is an ordered pair R = ( σ w , σ c ) where: σ w w -permutation (order 2 partial permutation), we set dom ( σ w ) = P ( R ) ⊎ fix( σ w ). σ c partial permutation s.t. dom ( σ c ) ⊆ P ( R ), with pointed orbits and labelled by S in such a way that ∀ o ∈ Orbs( σ c ) , | o | = α ( l ( o )). Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 11 / 20
Example R = ( σ w , σ c ) with • • σ w = (1)(2 3)(4 5)(6 7)(8 9) and σ c = ( 4 3) A ( 5 6 7) B 8 7 2 3 4 5 1 A B 6 9 Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 12 / 20
Port fusion by composition Our original net R = ( σ w , σ c ) : 1 5 3 4 6 s 1 s 2 8 2 7 Right part of the rule R ′ = ( τ w , τ c ) 9 10 s 1 s 2 11 12 Correspondance f from dom ( σ w ) to dom ( τ w ). Computing the resulting action ρ w : 1 9 10 5 6 s 1 s 2 2 11 12 7 8 ρ w (6) = ( σ w f − 1 τ w f σ w f − 1 τ w f σ w )(6) = (( σ w + τ w )[( f + f − 1 )( σ w + τ w )] 4 )(6) A formula seems to appear. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 13 / 20
The Execution formula for pinjs Originally introduced by Girard with operators, here we work with partial injections of integers (pinjs). f : A ⊎ B ։ C ⊎ D and g : D ։ B are pinjs, we set ∞ A � [ f ( gf ) i ] ↾ Ex( f , g ) = C i =0 where f ↾ A C graph is f graph ∩ A × C . This is well-defined and bounded when dom ( f ) is finite. Property Ex(Ex( f , g ) , h ) = Ex( f , g + h ) = Ex(Ex( f , h ) , g ). Girard’s usual interpretation: localized Church-Rosser. Strong confluence should be a corollary. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 14 / 20
Ex-composition Definition Let σ and τ be disjoint w -permutations and let f be a partial injection with dom ( f ) ⊆ dom ( σ ) and codom ( f ) ⊆ dom ( τ ). We call the Ex 0 -composition of σ and τ along f the partial permutation f � τ = Ex( σ + τ, f + f − 1 ) σ f In the previous example we get ρ w = σ w � τ w . . . . but something is missing: 1 9 10 5 s 1 s 2 2 11 12 7 f σ w � τ w = 0, we can’t see loops! First solution: this is not a bug, this is a feature. f Second solution: we can detect them and define an extension σ w � + τ w . Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 15 / 20
Gluing and cutting Definition Let R = ( σ w , σ c ) and R ′ = ( σ ′ w , σ ′ c ) be two disjoint interaction nets, and f be a pinj from P f ( R ) to P f ( R ′ ). � R ′ = ( σ w We call gluing of R and R ′ along f the net R f f � + σ ′ w , σ c + σ ′ c ). Definition f Let R be a net, we call cutting of R a triple ( R 1 , f , R 2 ) such that R = R 1 � R 2 . Any net R ′ appearing in a cutting of R is called a subnet of R , noted R ′ ⊆ R . Gluing computes port fusion . Cutting pulls apart a subnet. Marc de Falco (IML) An Explicit Framework for Interaction Nets RTA’09 16 / 20
Recommend
More recommend