1 / 13

Enhanced Graph Project Output with Improved Traversal

Solve information loss problem in graph traversal with colored visualization. Ensure all nodes and edges are selected without loss. Incorporate Demeter's Law for modular concerns.

kogut
Download Presentation

Enhanced Graph Project Output with Improved Traversal

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A B C U 0..1 D X R S E F Class Graph

  2. Project Output from A via X to F = {source:A -> X X ->target:F} A B C U 0..1 Problem: Information loss: A B D E F not allowed! D X R S E F

  3. Remember the copies in a traversal graph? Show them with colors. Better Project Output from A via X to F = {source:A -> XX ->target:F} A U B C 0..1 Problem: Information loss: A B D E F not allowed! But now we know that D is in two traversals D X R S E Dashed: multiple F

  4. Better Project Output from A via R to F = {source:A -> RR ->target:F} A U B C 0..1 No information loss D X R S E F

  5. Project Output A from A to F B C U Selects all Nodes and edges 0..1 D X R S E F

  6. A from A to S B C U 0..1 D X R S E F Project Output

  7. A B C U 0..1 D X R S E F object graph a1111 class graph new A( new B( new D( new E( new F(7)), new X( new F(9), new D( new E( new F(27)), new X( new F(35),null))))), new C( new R( new X( new F(15), null), new F(20))))

  8. A a:A :B B :C C U 0..1 D :D X :X R :S S E :E F f2:F f1:F ObjectGraph a class graph

  9. A U B C 0..1 D X R S E F S 1 object graph 4 way pattern matching class graph a1111 = new A( new B( new D( new E( new F(7)), new X( new F(9), new D( new E( new F(27)), new X( new F(35),null))))), new C( new R( new X( new F(15), null), new F(20)))) T1 = s2 t2 Visitor: A,B,C,D,E,F,X ( before ) after from A via X to F = {source:A -> XX ->target:F} after X after C after A

  10. A U B C 0..1 D X R S E F cg.gather(a,”from A via X to F”); Returns list of size 1!!! Object graph 3 way pattern matching a:A :B :C :D :X :S from A via X to F :E f2:F f1:F

  11. A cg.gather(a,”from A to F”); Returns list of size 2 Class graph B C U Object graph 3 way pattern matching a:A 0..1 D X R S :B :C E F :D :X :S But S is not a target :E f2:F f1:F

  12. cg.gather(a,”from A to S”); Returns list of size 1 A from A to S 3 way pattern matching a:A B C U 0..1 :B :C D X R S :D E :X :S F :E f2:F f1:F

  13. Law of Demeter for Concerns • Each module should only talk to its friends that share the same concerns. • Some concerns are inherently linked that it is not worthwhile separating them. • Each module deals with a small number of concerns.

More Related