a double pushout approach for modeling pointer redirection
play

A double-pushout approach for modeling pointer redirection - PowerPoint PPT Presentation

A double-pushout approach for modeling pointer redirection Dominique Duval, Rachid Echahed, Fr ed eric Prost University of Grenoble IFIP WG1.3 meeting, Sierra Nevada, January 18., 2008 Outline Introduction Basic examples The


  1. A double-pushout approach for modeling pointer redirection Dominique Duval, Rachid Echahed, Fr´ ed´ eric Prost University of Grenoble IFIP WG1.3 meeting, Sierra Nevada, January 18., 2008

  2. Outline Introduction Basic examples The categorical framework The left handside The right handside Conclusion etc

  3. The problem Data-structure rewriting, including cyclic data-structures with pointers such as circular lists, doubly-linked lists, etc. Required: ◮ Local pointer redirection, for redirecting some specific pointers. ◮ Global pointer redirection, for redirecting all pointers with some specific target to another target.

  4. The method Define a graph rewriting system for dealing with this pointer redirection issue: nodes cells ↔ edges ↔ pointers Set-theoretic approach: untractable. Categorical approach: YES the DPO (double pushout) method works, BUT with non-classical assumptions on rules and matchings.

  5. � The DPO approach to graph rewriting In a relevant category of graphs: ◮ A rewrite rule is a span ( ℓ, r ) : r ℓ � R L K

  6. � � � � � � The DPO approach to graph rewriting In a relevant category of graphs: ◮ A rewrite rule is a span ( ℓ, r ) : r ℓ � R L K ◮ A rewrite step is a double pushout (DPO): ℓ r � R L K m d m ′ ℓ ′ r ′ � H G D which rewrites G as H , according to the rule ( ℓ, r ) applied to the matching m : L → G .

  7. The classical DPO approach ◮ Intuitively: K is the intersection of L and R , ie., K is the subgraph common to both handsides. ℓ ◮ Categorically: the morphism L ← K is a monomorphism. ◮ Consequence: nice confluence theorems. A. Corradini et al. Algebraic approaches to graph transformation Part I: Basic concepts and double pushout approach. In Handbook of Graph Grammars, p.163-246 (1997).

  8. Our DPO approach ◮ Intuitively: (local redirection) some vertices of L are disconnected in K , then they get reconnected (differently) in R . ℓ ◮ Categorically: the morphism L ← K is an epimorphism. ◮ Consequence: NO kind of confluence theorem. The intended applications have NO confluence property. D. Duval, R. Echahed, F . Prost. Modeling pointer redirection as cyclic term-graph rewriting. In Proceedings of TERMGRAPH’06. ENTCS 176, p.65-84 (2007).

  9. Some related papers On cyclic term graph rewriting – some papers use categories, others do not. ◮ H. Barendregt et al. (1987) ◮ J.R. Kennaway et al. (1994) ◮ R. Banach (1994) ◮ R. Echahed, J.-C. Janodet (1998) ◮ E. Barendsen, S. Smetsers (1999) ◮ A. Corradini, F . Gadducci (1999) ◮ S. Antoy et al. (2000) ◮ C. Bertolissi et al. (2005) ◮ . . . . . .

  10. Outline Introduction Basic examples The categorical framework The left handside The right handside Conclusion etc

  11. � � � Local redirection � x � h f f f ℓ r � � ������ a a a b

  12. � � � � � � � � � � � � � � � Local redirection � x � h f f f ℓ r � � ������ a a a b m d m ′ � x � h g g g f f f r ′ � � ℓ ′ � � � � � � ������ � � � � � � � � � � � � a a a b

  13. � � � � Global redirection f f f ℓ r � a y c a a

  14. � � � � � � � � � � � � � � � � � Global redirection f f f ℓ r � a y c a a m d m ′ g g g f f f r ′ � � ℓ ′ � � � � � a y c a a

  15. � � � Local and global redirection � x � h f f f ℓ r � � ������ a y a c a b

  16. � � � � � � � � � � � � � � � Local and global redirection � x � h f f f ℓ r � � ������ a y a c a b m d m ′ � x � h g g g f f f r ′ � � ℓ ′ � � ������ � � � � a y a c a b

  17. Outline Introduction Basic examples The categorical framework The left handside The right handside Conclusion etc

  18. � � The graphs A signature Ω is fixed, ie., a set of operations with arity. A graph G is made of: ◮ a set of nodes N , ◮ a subset of labeled nodes N Ω ⊆ N , ◮ a labeling function : N Ω → Ω , written n : f , otherwise n : • , ◮ a successor function : N Ω → N ∗ , written ( s ( n , 1 ) , . . . , s ( n , k ) ) , where n : f and k is the arity of f . Example, with a ternary operation f and a constant a : n : f � � � � � 1 3 � � � 2 � � � � � � � p : • q : a r : •

  19. � � � � The category of graphs A graph morphism Φ : G → H is: ◮ a map Φ : N G → N H ◮ which preserves labeled nodes, labels and successors. Example: n ′ : f n : f � Φ � � � � � � � 3 1 1 � � � � 2 � � 2 3 � � � � � � � � � � p ′ : b q ′ : a p : • q : a r : • Hence, the category of graphs Gr .

  20. The node functor is faithful The node functor N : Gr → Set maps: ◮ each graph G to its set of nodes, ◮ each graph morphism Φ : G → H to its underlying map. Proposition. The node functor N : Gr → Set is faithful. About proof. A graph morphism Φ is entirely defined by the map N (Φ) , because the successors of each node are totally ordered.

  21. Pushouts of graphs In our category of graphs: ◮ pushouts do not always exist: n : • → n : a ↓ ↓ → ? n : b

  22. � � � Pushouts of graphs In our category of graphs: ◮ pushouts do not always exist: n : • → n : a ↓ ↓ → ? n : b ◮ complement pushouts, when they do exist, are not unique: n 1 : a n 2 : • n : a ← ↓ ↓ p : f p : f ← ? ? n : a n 1 : a n 2 : •

  23. � � � The node functor does not preserve PO’s a PO in Gr : a PO in Set : • • → f f • • → • • • • • • • • • • ↓ ↓ ↓ ↓ • • • → → f • • • • • • •

  24. � � The PO theorem Our framework relies on the following result. PO theorem. Let Γ be a commutative square of graphs: G 0 � � � � � � � � � G 1 G 2 � � � � � � � � � G 3 such that: ◮ N (Γ) is a pushout of sets, ◮ and each labeled node in G 3 is the image of a labeled node in G 1 or in G 2 , then Γ is a pushout of graphs.

  25. � � The PO theorem (2) About proof. Let Γ ′ be any commutative square of graphs on the same base as Γ : G 0 � � � � � � � � � G 1 G 2 � � � � � � � � � G ′ 3 ◮ Since N (Γ) is a pushout of sets, there is a unique map f : N ( G 3 ) → N ( G ′ 3 ) such that f ◦ · · · = · · · in Set . ◮ Since each labeled node in G 3 is the image of a labeled node in G 1 or in G 2 , f = N (Φ) for a graph morphism Φ : G 3 → G ′ 3 . ◮ Since the functor N : Gr → Set is faithful, we have Φ ◦ · · · = · · · and Φ is unique.

  26. Outline Introduction Basic examples The categorical framework The left handside The right handside Conclusion etc

  27. Disconnection of a graph In a graph L , let: ◮ E be a set of edges, to be locally disconnected, ◮ V a set of nodes, to be globally disconnected.

  28. Disconnection of a graph In a graph L , let: ◮ E be a set of edges, to be locally disconnected, ◮ V a set of nodes, to be globally disconnected. The disconnection of L with respect to E and V is ℓ : K → L : ◮ K has all the nodes of L , with the same label, and it has additional unlabeled nodes: ◮ n [ i ] for each edge ( n → s L ( n , i )) ∈ E , (with “actual local redirections”) ◮ n [ 0 ] for each node n ∈ V . The successors of a node are the same in K and L , except: s K ( n , i ) = n [ i ] for each edge ( n → s L ( n , i )) ∈ E .

  29. Disconnection of a graph In a graph L , let: ◮ E be a set of edges, to be locally disconnected, ◮ V a set of nodes, to be globally disconnected. The disconnection of L with respect to E and V is ℓ : K → L : ◮ K has all the nodes of L , with the same label, and it has additional unlabeled nodes: ◮ n [ i ] for each edge ( n → s L ( n , i )) ∈ E , (with “actual local redirections”) ◮ n [ 0 ] for each node n ∈ V . The successors of a node are the same in K and L , except: s K ( n , i ) = n [ i ] for each edge ( n → s L ( n , i )) ∈ E . ◮ ℓ : K → L is such that ℓ ( n ) = n for all n ∈ N L , and: ◮ ℓ ( n [ i ]) = s L ( n , i ) for each edge ( n → s L ( n , i )) ∈ E , ◮ ℓ ( n [ 0 ]) = n for each node n ∈ V .

  30. Disconnection of a graph In a graph L , let: ◮ E be a set of edges, to be locally disconnected, ◮ V a set of nodes, to be globally disconnected. The disconnection of L with respect to E and V is ℓ : K → L : ◮ K has all the nodes of L , with the same label, and it has additional unlabeled nodes: ◮ n [ i ] for each edge ( n → s L ( n , i )) ∈ E , (with “actual local redirections”) ◮ n [ 0 ] for each node n ∈ V . The successors of a node are the same in K and L , except: s K ( n , i ) = n [ i ] for each edge ( n → s L ( n , i )) ∈ E . ◮ ℓ : K → L is such that ℓ ( n ) = n for all n ∈ N L , and: ◮ ℓ ( n [ i ]) = s L ( n , i ) for each edge ( n → s L ( n , i )) ∈ E , ◮ ℓ ( n [ 0 ]) = n for each node n ∈ V . Then, the graph morphism ℓ : K → L is an epimorphism.

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend