G raph E x change L anguage - PowerPoint PPT Presentation

g raph e x change l anguage n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
G raph E x change L anguage PowerPoint Presentation
Download Presentation
G raph E x change L anguage

play fullscreen
1 / 23
G raph E x change L anguage
135 Views
Download Presentation
megan
Download Presentation

G raph E x change L anguage

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Graph Exchange Language Andreas Winter joint work with Ric Holt (University of Waterloo) Susan Elliott Sim (University of Toronto) Andy Schürr (Universität BW München) (and many more)

  2. Contents Motivation and Idea GXL Overview • Exchanging graphs with GXL • Exchanging schemas with GXL GXL current work • GXL Tools Conclusion

  3. sourcecode extract view repository abstract extract:parser and fact extractorsfor multi-languagesystems, Ada, C/C++, Cobol, Java, SQL ... abstract:analysis techniqueslike querying, browsing,data flow analysis, architecture recovery, cluster analysis ... view:visualizationcharts, diagrams,graphs, tables, source code, ... GXL Background Tools in Software Reengineering

  4. History

  5. GXL Partners

  6. typed nodes attributed nodes 1 function main (){ ... 8 a := max(a,b); ... 19 b := min(b,a); ... } typededges attributededges directededges ordered incidences GXL Example

  7. Requirements of Exchange Formats (1) 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)

  8. Requirements of Exchange Formats (2) 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

  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 graph part

  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. Exchanging Graphs with GXL Attributed, typed, directed Graphs Undirected Graphs Ordered Graphs Hypergraphs Hierarchical Graphs

  13. <gxl> <graph id="example"> <type xlink:href = "schema.gxl"/> <node id = "p"> </node> <node id = "v"> </node> <edge from = "p" to = "v"> </edge><graph></gxl> graph typed attributed p : Proc <type xlink:href = "schema.gxl#Proc"/> file = "main.c" <attr name = "file"><string>main.c</string></attr> refs <type xlink:href = "schema.gxl#Var"/> <attr name = "line"><int>27</int></attr> v : Var <type xlink:href = "schema.gxl#refs"/> line = 27 Exchanging Graphs with GXL r : id = "r"

  14. Exchanging Schemas with GXL Graph Schema Definition with UML Class Diagrams • attributed, typed, directed, ordered graphs • hypergraphs • hierarchical graphs GXL Representation of class diagrams GXL Metaschema

  15. Graph(UML object diagram) 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 Exchanging Schemas with GXL

  16. Representing Schemas • Schemas (graph classes) are represented as graphs as well • Schemas are exchanged as GXL documents suiting a metaschema for graph classes • only one common and simple DTD for exchanging • graphs matching different graph schemas • graph classes matching a metaschema

  17. 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

  18. <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

  19. GXL Metaschema (Graph Part)

  20. GXL Current Work GXL Usage • Software Reengineering • Graph Transformation Systems (GTXL) GXL Standard Schemas • Ferenc, Gyimothy, Holt, Koschke, Sim: C++-Reference-Schema • Lethbridge, Tichelaar et al.:Dagstuhl Middle Level Model • Jahnke, Mylopoulos, Wadsack, Hainaut, Henrard: Data Reverse Engineering Reference-Schema (DRE)

  21. GXL Tools and Applications • CPPX (C++ AST Extractor), U Waterloo • Columbus/CAN(C++ Extractor and Analyzer), U Szeged • ECW (Edinburgh Concurrency Workbench), U Edinburgh • Fujaba (Roundtrip Engineering for UML diagrams) U Paderborn • GenSet(simple graph transformations), U Oregon • GRAS (Graph Data Base) U Aachen • GXL reader/writer for Bauhaus Resource Graphs, U Stuttgart • GXL2RPA, RPA2GXL, Philips, Eindhoven • GXL2G, G2GXL, U Koblenz • GXL2Progres, Progres2GXL, U Aachen • GXLQuery, U Koblenz • GXL2RSF, RSF2GXL, U Victoria, Nokia • GXL2XMI, U BW München • GXLFramework, U BW München • GXL2TA, TA2GXL, U Waterloo, U Toronto • Royere (graph visualization), CWI Amsterdam • SugiBib (UML diagram layout), U Würzburg • UPGRADE (visual languages), RWTH Aachen • yFiles (graph visualization), U Tübingen

  22. GXL Change Requests XML Schema • instead of XML DTD • more powerful extension mechanism Packages • attributes - structure (GXL) - GTXL - GraphML/GD ... Hierarchical Graphs • graph valued attributes Additional Attribute Types • free type attributes • structs References to GXL Schemas • textual attributes instead of XLINK-References Additional features • implicit node definition by edges

  23. more information http: www.gupro.de/GXL mailto: gxl@uni-koblenz.de Conclusion GXL: uniform language for • exchanging graphs • exchanging graph schemas GXL: ratified as standard exchange format • Software Reengineering community (Dagstuhl, January 26. 2001) • Graph Transformation Systems community (APPLIGRAPH Subgroup Meeting, Bremen, March, 1.-2., 2001) GXL: standards activities • cited in XML OASIS Cover Pages and XML.org XML Standards Report • planed to become an IEEE Software Engineering Standard • will be introduced to OMG