200 likes | 379 Views
Report on DMM (Dagstuhl Middle Model). Timothy C. Lethbridge SITE, University. of Ottawa tcl@site.uottawa.ca. DMM was Invented at The Dagstuhl Seminar on Interoperability of Reverse Engineering Tools. Jan 22-26, 2001 About 45 people. The Dagstuhl Middle Model (DMM).
E N D
Report on DMM(Dagstuhl Middle Model) Timothy C. Lethbridge SITE, University. of Ottawa tcl@site.uottawa.ca
DMM was Invented at The Dagstuhl Seminar on Interoperability of Reverse Engineering Tools • Jan 22-26, 2001 • About 45 people Timothy C. Lethbridge
The Dagstuhl Middle Model (DMM) • Represents relationships among program and source elements in a language-independent way • Key inputs • University of Ottawa (TA++) • Sander Tichelaar; Berne (Famix) • Erhard Plödereder; Stuttgart (Bauhaus) • See http://titan.cnds.unibe.ch:8080/Exchange/2 Timothy C. Lethbridge
Key Decisions • Non-pre-processed code preferred • Can represent procedural languages • References partly resolved • More study of this is needed • Allows several different levels of detail Timothy C. Lethbridge
The DMM schema • Represented as UML • Intended to be translated into a GXL schema Timothy C. Lethbridge
Other GXL Schemas for Reverse Engineering • Programming language level • Abstract syntax trees • Too much detail for many purposes • Architectural level • Connecting black boxes (e.g. pipe and filter) • Hard / not possible to generate automatically Timothy C. Lethbridge
Top level of the hierarchy Timothy C. Lethbridge
Modelelementhierarchy Timothy C. Lethbridge
Relationshiphierarchy Timothy C. Lethbridge
Source objecthierarchy Timothy C. Lethbridge
DMM Development Status • University of Ottawa • Have C++ parser that generates DMM • Used in SORTIE project • Others used the data our parser generated • Future work • Progress continuing steadily by email etc. Timothy C. Lethbridge
Issues • Multi-part references to members • a.b().c.d • Function pointers • Resolving correct references • Computed and aliased references • Templates Timothy C. Lethbridge
Possible extensions for traces and clusters Timothy C. Lethbridge
Extending the Relationship Hierarchy for Clusters Timothy C. Lethbridge
Useful URLs • My home page • http://www.site.uottawa.ca/~tcl • DMM • http://titan.cnds.unibe.ch:8080/Exchange/2 Timothy C. Lethbridge
Example code to demonstrate DMM int i; void main() { i = 1; } Timothy C. Lethbridge
Example DMM GXL (1/4) <?xml version="1.0"?> <!DOCTYPE gxl SYSTEM "gxl1.0.dtd"> <gxl> <graph> <type xlink:xref="dmmschema.dtd#dmm"/> <node id=1> <type xlink:xref="dmmschema.dtd#SourceFile"/> <attr name="name"> <string>example1.c</string> </attr> <attr name="path"> <string>C:\TEST\</string> </attr> </node> <node id=2> <type xlink:xref="dmmschema.dtd#SourcePart"/> <attr name="startLine"> <int>1</int> </attr> <attr name="startChar"> <int>4</int> </attr> <attr name="endLine"> <int>1</int> </attr> <attr name="endChar"> <int>5</int> </attr> </node> <node id=3> <type xlink:xref="dmmschema.dtd#GlobalVariable"/> <attr name="name"> <string>i</string> </attr> </node> Timothy C. Lethbridge
ExampleDMM GXLcont. (2/4) <node id=4> <type xlink:xref="dmmschema.dtd#SourcePart"/> <attr name="startLine"> <int>1</int> </attr> <attr name="startChar"> <int>4</int> </attr> <attr name="endLine"> <int>1</int> </attr> <attr name="endChar"> <int>5</int> </attr> </node> <node id=5> <type xlink:xref="dmmschema.dtd#Type"/> <attr name="name"> <string>int</string> </attr> </node> <node id=6> <type xlink:xref="dmmschema.dtd#SourcePart"/> <attr name="startLine"> <int>2</int> </attr> <attr name="startChar"> <int>5</int> </attr> <attr name="endLine"> <int>5</int> </attr> <attr name="endChar"> <int>1</int> </attr> </node> Timothy C. Lethbridge
ExampleDMM GXLcont. (3/4) <node id=7> <type xlink:xref="dmmschema.dtd#Routine"/> <attr name="name"> <string>main</string> </attr> </node> <node id=8> <type xlink:xref="dmmschema.dtd#SourcePart"/> <attr name="startLine"> <int>2</int> </attr> <attr name="startChar"> <int>0</int> </attr> <attr name="endLine"> <int>2</int> </attr> <attr name="endChar"> <int>4</int> </attr> </node> <node id=9> <type xlink:xref="dmmschema.dtd#Type"/> <attr name="name"> <string>void</string> </attr> </node> <edge from=1 to=2> <type xlink:xref="dmmschema.dtd#Contains"/> </edge> <edge from=2 to=3> <type xlink:xref="dmmschema.dtd#Defines"/> </edge> <edge from=2 to=4> <type xlink:xref="dmmschema.dtd#Contains"/> </edge> Timothy C. Lethbridge
Example DMM GXL cont. (4/4) <edge from=4 to=5> <type xlink:xref="dmmschema.dtd#Declares"/> </edge> <edge from=3 to=5> <type xlink:xref="dmmschema.dtd#IsOfType"/> </edge> <edge from=1 to=6> <type xlink:xref="dmmschema.dtd#Contains"/> </edge> <edge from=6 to=7> <type xlink:xref="dmmschema.dtd#Defines"/> </edge> <edge from=6 to=8> <type xlink:xref="dmmschema.dtd#Contains"/> </edge> <edge from=8 to=9> <type xlink:xref="dmmschema.dtd#Declares"/> </edge> <edge from=7 to=9> <type xlink:xref="dmmschema.dtd#Uses"/> </edge> <edge from=7 to=3> <type xlink:xref="dmmschema.dtd#Sets"/> </edge> </graph> </gxl> Timothy C. Lethbridge