1 / 25

Presenter : g9102 黃培智

Presenter : g9102 黃培智. Outline. Motivation and Background GXL Overview Exchange Graphs Exchange Graph Schemas Conclusion. source code. extract. view. repository. abstract. visualizer: graph and diagram visualizer, code browser. extractor: parser, scanner. abstractor:

golda
Download Presentation

Presenter : g9102 黃培智

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. Presenter : g9102 黃培智

  2. Outline • Motivation and Background • GXL Overview • Exchange Graphs • Exchange Graph Schemas • Conclusion

  3. sourcecode extract view repository abstract visualizer: graph and diagram visualizer, code browser extractor: parser, scanner abstractor: structure recognition GXL Background • Tools in Software Reengineering

  4. GXL Simple Example

  5. GXL History

  6. Requirements of Exchange Formats • Independence • application independence • language independence (C/C++, Cobol, Java, JCL, SQL, multi-language etc.) • abstraction level independence (AST, "middle level", Architecture) • aspect independence (data flow, control flow, code structure, etc.) • tool independence • data structure independence (syntax trees, various types of graphs, relational databases, object oriented databases, file and directory structures)

  7. Requirements of Exchange Formats • Efficiency • efficiency in time • efficiency in space • efficiency in "building tools" • Extensibility • extensible for further applications (CASE tools, visualization tools, etc) • Universality • used by others • standardized format

  8. Outline • Motivation and Background • GXL Overview • Exchange Graphs • Exchange Graph Schemas • Conclusion

  9. GXL Objective • Exchanged Data • Instance data • Schemas data • Mathematical Model • Typed, attributed, ordered, directed graphs • Expanded by hypergraphs and hierarchical graphs • Notation • eXtensible Markup Language (XML) • Unified Modeling Language (UML)

  10. typedgraphs attributedgraphs directedgraphs hierarchicalgraphs hyper-graphs orderedgraphs GXL Graph Model

  11. <!ENTITY % *-extension "" > <!ENTITY % *-attr-extension "" > <!ELEMENTgxl (graph* %gxl-extension; ) > <!ATTLISTgxl xmlns:xlink CDATA #FIXED "www.w3.org/1999/xlink" %gxl-attr-extension> <!ELEMENTtype EMPTY> <!ATTLIST type xlink:type (simple) #FIXED "simple" xlink:href CDATA #REQUIRED> <!ELEMENTgraph (type? , attr* , ( node | edge | rel )* %graph-extension; ) > <!ATTLISTgraph id ID #REQUIRED role NMTOKEN #IMPLIED edgeids ( true | false ) "false" hypergraph ( true | false ) "false" edgemode ( directed | undirected | defaultdirected | defaultundirected) "directed" %graph-attr-extension;> <!ELEMENTnode (type? , attr*, graph* %node-extension; ) > <!ATTLISTnode id ID #REQUIRED %node-attr-extension;> <!ELEMENTedge (type?, attr*, graph* edge-extension; ) > <!ATTLIST edge id ID #IMPLIED from IDREF #REQUIRED to IDREF #REQUIRED fromorder CDATA #IMPLIED toorder CDATA #IMPLIED isdirected ( true | false ) #IMPLIED %edge-attr-extension;> GXL Document Type Definition (1.0) <!ELEMENTrel (type? , attr*, graph*, relend* %rel-extension;) > <!ATTLISTrel id ID #IMPLIED isdirected ( true | false ) #IMPLIED %rel-attr-extension;> <!ELEMENTrelend (attr* %relend-extension; ) > <!ATTLISTrelend target IDREF #REQUIRED role NMTOKEN #IMPLIED direction ( in | out | none ) #IMPLIED startorder CDATA #IMPLIED endorder CDATA #IMPLIED%relend-attr-extension; > <!ELEMENTattr (type?, attr*, (%val;)) > <!ATTLIST attr id IDREF #IMPLIED name NMTOKEN #REQUIRED kind NMTOKEN #IMPLIED > <!ENTITY % val " locator | bool | int | float | string | enum | seq | set | bag |tup %value-extension; "> <!ELEMENTlocator EMPTY > <!ATTLIST locator xlink:type (simple) #FIXED "simple" xlink:href CDATA #IMPLIED > <!ELEMENTbool |int | float | string (#PCDATA) > <!ELEMENTenum (#PCDATA) > <!ELEMENTseq | set | bag | tup (%val;)* >

  12. Outline • Motivation and Background • GXL Overview • Exchange Graphs • Exchange Graph Schemas • Conclusion

  13. Supported Graph Type • Typed Graphs • Attributed Graphs • Directed Graphs • Undirected Graphs • Ordered Graphs • Hypergraphs • Hierarchical Graphs • …..

  14. Directed Graphs

  15. Directed Typed Graphs

  16. Typed, Attributed, Directed Graphs

  17. Typed, Attributed, Directed, Ordered Graphs

  18. Hypergraphs <node id="u"><type xlink:href=“s.gxl#U"/></node><node id="v"><type xlink:href="s.gxl#V"/></node> <node id="w"><type xlink:href="s.gxl#W"/></node><rel id="r"><type xlink:href="s.gxl#R"/><relend target="v" role="theV" direction="in"/><relend target="w" role="theW" direction="out"/><relend target="u" role="theFirstU" direction="out" endorder="1"/><relend target="u" role="theSecondU" direction="out" endorder="2"/></rel>

  19. Hierarchical Graphs • Nodes, edges, and hyperedges contain further graphs

  20. Outline • Motivation and Background • GXL Overview • Exchange Graphs • Exchange Graph Schemas • Conclusion

  21. Exchange Schemas with GXL • Graph Schema Definition with UML Class Diagrams • Representing UML Class Diagrams by Graphs (Schema Graphs) • Exchanging Schemas Graphs by GXL Documents

  22. Graph Graph Class(UML class diagram) p : Proc Proc file="main.c" file : string e : refs refs line = 42 line : int v : Var Var line = 27 line : int Exchange Schemas with GXL

  23. UML class diagram Schema Graph a1:Attribute s : String Proc:NodeClass has Domain has Attribute name="Proc" name="file" Proc file:string comesFrom refs refs: EdgeClass has Attribute line : int name="refs" a2:Attribute i : Integer has Domain goesTo Var name="line" line : int var:NodeClass has Attribute name="Var" GXL Schema Representation

  24. <node id = "n2"><type xlink:href = "gxl.gxl#nodeClass"/> <attr name = "name"> <string>Var</string> </attr> </node> ... <edge from = "e" to = "n1"><type xlink:href = "gxl.gxl#comesFrom"/> </edge> <edge from = "e" to = "n2"><type xlink:href = "gxl.gxl#goesTo"/> </edge> <graph> </gxl> <?xml version="1.0"?><!DOCTYPE gxl SYSTEM "gxl.dtd"> <gxl> <graph id="simpleSchema"> <type xlink:href = "gxl.gxl"/> <node id = "n1"><type xlink:href = "gxl.gxl#NodeClass"/> <attr name = "name"> <string>Proc</string> </attr> </node> <node id = "e"><type xlink:href = "gxl.gxl#edgeClass"/> <attr name = "name"> <string>refs</string> </attr> </node> GXL Schema Representation

  25. Conclusion • GXL : uniform language for • Exchanging graphs • Exchanging graph schemas • GXL : ratified as standard exchange format • Software Reengineering community (Dagstuhl, January 26. 2001) • Usage within GTXL Graph Transformation Exchange Language systems (APPLIGRAPH Subgroup Meeting, Bremen, March, 1-2. 2001)

More Related