an algebra of hierarchical graphs
play

An Algebra of Hierarchical Graphs Roberto Bruni (joint-work with - PowerPoint PPT Presentation

An Algebra of Hierarchical Graphs Roberto Bruni (joint-work with Fabio Gadducci and Alberto Lluch) Department of Computer Science, University of Pisa Software Engineering for Service-Oriented Overlay Computers TGC 2010 5th Symposium on


  1. An Algebra of Hierarchical Graphs Roberto Bruni (joint-work with Fabio Gadducci and Alberto Lluch) Department of Computer Science, University of Pisa Software Engineering for Service-Oriented Overlay Computers TGC 2010 5th Symposium on Trustworthy Global Computing Munich (Germany), February 24-26, 2010.

  2. Outline Introduction A Running Example Hierarchical Graphs An Algebra of Hierarchical Graphs Conclusion

  3. Graphs are pervasive to Computer Science Some advantages of graphs (up to isomorphism): ◮ names are helpful but inessential; ◮ element placement is helpful but inessential; ◮ connections between elements are essential

  4. Algebras vs Graphs in distributed systems Goal Flexible Graph-based representation of Service oriented systems Mobile systems (names in π -calculus vs nodes in graphs) Service oriented systems sessions, transactions, ambients: which graphs for containment?

  5. Calculi vs Graphs Algebraic Graph-based elements ◮ Terms ◮ Graphs (diagrams) a | b flat, hierarchical, etc.

  6. Calculi vs Graphs Algebraic Graph-based elements ◮ Terms ◮ Graphs (diagrams) a | b flat, hierarchical, etc. ◮ Operations vocabulary ◮ Graph compositions ·|· : W × W → W Union, tensor, etc.

  7. Calculi vs Graphs Algebraic Graph-based elements ◮ Terms ◮ Graphs (diagrams) a | b flat, hierarchical, etc. ◮ Operations vocabulary ◮ Graph compositions ·|· : W × W → W Union, tensor, etc. ◮ Axioms ◮ Homomorphisms equivalence x | y ≡ y | x isomorphism, etc.

  8. Calculi vs Graphs Algebraic Graph-based elements ◮ Terms ◮ Graphs (diagrams) a | b flat, hierarchical, etc. ◮ Operations vocabulary ◮ Graph compositions ·|· : W × W → W Union, tensor, etc. ◮ Axioms ◮ Homomorphisms equivalence x | y ≡ y | x isomorphism, etc. ◮ Rewrite rules ◮ Transformation rules dynamics a − → b

  9. Which graphs?

  10. Which graphs?

  11. Which graphs?

  12. Which graphs?

  13. Main technical problem: representation distance grammar, structural congruence, etc. adjacency matrix, tuples, sets, morphisms

  14. Main technical problem: representation distance solution: graph algebras

  15. Main result: a flexible, general intermediate language workflow nested language graphs process gs-graphs calculus architecture bigraphs description language etc. etc.

  16. Main result: a flexible, general intermediate language workflow nested language graphs process gs-graphs calculus suitable graph algebra architecture bigraphs description language etc. etc.

  17. Outline Introduction A Running Example Hierarchical Graphs An Algebra of Hierarchical Graphs Conclusion

  18. Running Example: Long running transactions We shall consider a simple language for transactions with ◮ sequential composition; ◮ parallel (split-join) composition; ◮ compensating activity; ◮ scope of compensation. Analogous to the Nested Sagas of [BMM05].

  19. Process terms and their graphical representations task1 ; task2 ; task3

  20. Process terms and their graphical representations task1 ; task2 ; task3 task1 | task2 | task3

  21. Process terms and their graphical representations task1 ; task2 ; task3 task1 | task2 | task3 ordinary flow % compensation flow

  22. Process terms and their graphical representations task1 ; task2 ; task3 task1 | task2 | task3 ordinary flow % [ nested flow ] compensation flow

  23. Main technical goal: mapping coherent wrt. equivalence graph1 flow1 a | b | [ c % d ]

  24. Main technical goal: mapping coherent wrt. equivalence graph1 flow1 a | b | [ c % d ] flow2 b | [ c % d ] | a

  25. Main technical goal: mapping coherent wrt. equivalence graph1 flow1 a | b | [ c % d ] flow2 graph2 b | [ c % d ] | a

  26. Outline Introduction A Running Example Hierarchical Graphs An Algebra of Hierarchical Graphs Conclusion

  27. Graph layers N universe of nodes A = A E ⊎ A D universe of edges The set L of graph layers is the set of tuples G = � N G , E G , t G , F G � where 1. E G ⊆ A is a (finite) set of edges, 2. N G ⊆ N a (finite) set of nodes, 3. t G : E G → N ∗ G a tentacle function, and 4. F G ⊆ N G a set of free nodes. The set P ⊆ L of plain graphs contains those graph layers G such that E G ⊆ A E . (standard notion of hypergraph plus a chosen set of free nodes)

  28. Hierarchical graphs The set H of hierarchical graphs is the least set containing all the tuples G = � N G , E G , t G , i G , x G , r G , F G � where 1. � N G , E G , t G , F G � is a graph layer; 2. i G : E G ∩ A D → H (embedding function); 3. x G : E G ∩ A D → N ∗ (exposure function), s.t. for all e ∈ E G ∩ A D 3.1 ⌊ x G ( e ) ⌋ ⊆ N i G ( e ) \ F i G ( e ) , (free nodes of inner graphs not exposed) 3.2 | x G ( e ) | = | t G ( e ) | , (same arity for exposure and tentacle func.) 3.3 ∀ n , m ∈ N , x G ( e )[ n ] = x G ( e )[ m ] iff t G ( e )[ n ] = t G ( e )[ m ]; 4. r G : E G ∩ A D → ( N G ֒ → N ) is a renaming function, s.t. for all e ∈ E G ∩ A D , r G ( e )( N G ) = F i G ( e ) . (for this talk, we can assume r G ( e ) is the ordinary inclusion)

  29. A hierarchical graph and its simplified representation a graph layer (free nodes x and y )

  30. A hierarchical graph and its simplified representation embedding function i G

  31. A hierarchical graph and its simplified representation exposure function x G

  32. A hierarchical graph and its simplified representation renaming function r G

  33. A hierarchical graph and its simplified representation informal notation (free nodes x and y )

  34. Hierarchical graph isomorphism The actual model of hierarchical graphs has a suitable notion of isomorphism.

  35. Hierarchical graph isomorphism The actual model of hierarchical graphs has a suitable notion of isomorphism.

  36. Hierarchical graph morphism (formally) Let G , H be graphs such that F G ⊆ F H . A graph morphism φ : G − → H is a tuple � φ N , φ E , φ I � where 1. φ N : N G → N H is a node morphism, 2. φ E : E G → E H an edge morphism, and 3. φ I = { φ e | e ∈ E G ∩ A D } a family of graph morphisms φ e : i G ( e ) − → i H ( φ E ( e )) such that 3.1 ∀ e ∈ E G , φ N ( t G ( e )) = t H ( φ E ( e )), i.e. the tentacle function is respected; 3.2 ∀ e ∈ E G ∩ A D , φ e N ( x G ( e )) = x H ( φ E ( e )), i.e. the exposure function is respected; 3.3 ∀ e ∈ E G ∩ A D , ∀ n ∈ N G , φ e N ( r G ( e )( n )) = r H ( φ E ( e ))( φ N ( n )), i.e. the renaming function is respected; 3.4 ∀ n ∈ F G , φ N ( n ) = n , i.e. the free nodes are preserved.

  37. Outline Introduction A Running Example Hierarchical Graphs An Algebra of Hierarchical Graphs Conclusion

  38. The syntax of the graph algebra G , H ::= 0 the empty graph

  39. The syntax of the graph algebra G , H ::= 0 | x a node called x

  40. The syntax of the graph algebra G , H ::= 0 | x | l � x � an (hyper)edge labelled with l attached to x for instance, a � p,q,r �

  41. The syntax of the graph algebra G , H ::= 0 | x | l � x � | G | H parallel composition: disjoint union up to common nodes for instance, a � p,q,r � | a � p,q,r �

  42. The syntax of the graph algebra G , H ::= 0 | x | l � x � | G | H parallel composition: disjoint union up to common nodes for instance, a � p,q,r � | a � p,q,r �

  43. The syntax of the graph algebra G , H ::= 0 | x | l � x � | G | H | ( ν x ) G declaration of a new node x for instance, ( ν s) (a � p,s,r � | b � s,q,r � )

  44. The syntax of the graph algebra D ::= L x [ G ] G , H ::= 0 | x | l � x � | G | H | ( ν x ) G graph G with interface of type L exposing x for instance, S p , q , s [( ν r ) flow � p , q , r , q , s � ]

  45. The syntax of the graph algebra D ::= L x [ G ] G , H ::= 0 | x | l � x � | G | H | ( ν x ) G | D � y � a nested graph attached to y for instance, D � a,b,c �

  46. The syntax of the graph algebra D ::= L x [ G ] G , H ::= 0 | x | l � x � | G | H | ( ν x ) G | D � y � a nested graph attached to y for instance, D � a,b,c � , with D = S p , q , s [( ν r ) flow � p , q , r , q , s � ]

  47. Structural congruence axioms Isomorphism is elegantly captured by structural axioms. G | H ≡ H | G (DA1) G | ( H | I ) ≡ ( G | H ) | I (DA2) G | 0 ≡ (DA3) G

  48. Structural congruence axioms Isomorphism is elegantly captured by structural axioms. G | H ≡ H | G (DA1) G | ( H | I ) ≡ ( G | H ) | I (DA2) G | 0 ≡ (DA3) G ( ν x )( ν y ) G ≡ ( ν y )( ν x ) G (DA4) ( ν x ) 0 ≡ 0 (DA5) G | ( ν x ) H ≡ ( ν x )( G | H ) if x �∈ fn ( G ) (DA6)

  49. Structural congruence axioms Isomorphism is elegantly captured by structural axioms. G | H ≡ H | G (DA1) G | ( H | I ) ≡ ( G | H ) | I (DA2) G | 0 ≡ (DA3) G ( ν x )( ν y ) G ≡ ( ν y )( ν x ) G (DA4) ( ν x ) 0 ≡ 0 (DA5) G | ( ν x ) H ≡ ( ν x )( G | H ) if x �∈ fn ( G ) (DA6) L y [ G { y / x } ] ≡ if ⌊ y ⌋ ∩ fn ( G ) = ∅ L x [ G ] (DA7) ( ν y ) G { y / x } ( ν x ) G ≡ if y �∈ fn ( G ) (DA8)

Recommend


More recommend