Show last authors
1 {{panel title="Project Overview"}}
2 Responsible:
3
4 * {{mention reference="XWiki.uru" style="FULL_NAME" anchor="XWiki-uru-PMoJE"/}}
5
6 Related Theses:
7
8 * Martin Rieß, //A Graph Editor for Algorithm Engineering//, September 2010 ([[pdf>>url:http://rtsys.informatik.uni-kiel.de/%7Ebiblio/downloads/theses/mri-bt.pdf||shape="rect"]])
9 {{/panel}}
10
11 The Graph Analysis (GrAna) project allows to examine a broad variety of structural properties of a graph (node count, edge count, etc.) as well as properties of the final drawing (area, edge crossings, etc.). An analysis can either be performed on a single graph or batch-like on large collections of graphs, in which case the results are written to a file. We support a variety of input formats, namely every format [[KIML>>doc:Infrastructure for Meta Layout (KIML)]]'s formats service knows about.
12
13
14
15 {{toc/}}
16
17 {{note}}
18 A word of warning. Please scrutinize any results you get from GrAna. A lot of the existing analyses were written with certain graphs structures and use cases in mind. For instance, if the analysis does not account for self loops but your graph contains them, the results might be wrong.
19 {{/note}}
20
21 = Single Graphs Within the Editor =
22
23 Within Eclipse we provide a //Graph Analysis// view, which can be found via Eclipse's //Windows->Show View->Others// dialog.
24 In the top right corner of this view you can find two buttons, one of which performs the analysis on the lastly selected diagram. The other button allows you to configure the analysis, i.e. select specific analyses to perform. The following screenshot shows an example. On the very left it can be seen that the analysis was configured to list the node and edge count, the area, and the number of edge crossings. According to the results, the graph contains 4 nodes and 5 edges. This is correct because the //hyperedge// between nodes N2, N3, and N4 is structurally composed out of two edges and just drawn as a single edge. Counting hyperedges could be a different analysis. Moreover, the area is reported as 25800 and 0 edge crossings are present.
25 [[image:attach:granaSingle.jpg]]
26
27 = Batch Executions =
28
29 A frequent use case is to analyze a large set of graphs with regards to some metric. For instance, you finished your awesome new algorithm to minimize the number of edge crossings in a graph and want to know how well it performs. The web offers large sets of graphs that already served as benchmarks in the past. GrAna allows batch analyses to be executed in two ways, textually and using an Eclipse Wizard.
30
31 == Textually ==
32
33 We provide a concise DSL to specify the sets of graphs, the layout algorithm and options, and the analyses textually and store them in a //.grana// file. The DSL is based on Xtext, hence the editor comes with syntax highlighting, content assist, and formatting. An example specification can be found below.
34
35 You can specify a list of {{code language="none"}}Job{{/code}}s. A job is a self-contained unit of work. It specifies the previously mentioned data using the following keywords: {{code language="none"}}resources{{/code}}, {{code language="none"}}layoutoptions{{/code}}, {{code language="none"}}analyses{{/code}}, and {{code language="none"}}output{{/code}}. Layout options are specified by blocks that start with an arbitrary identifier followed by curly brackets. It is possible to specify multiple blocks of layout options. Each block results in a separate layout run allowing, for instance, to first execute a node placement algorithm and then an edge routing algorithm. For convenience it is possible to specify resources and output files globally at the beginning of the file and then use the {{code language="none"}}ref{{/code}} keyword to reference them from a job.
36
37 Besides jobs, there is also a {{code language="none"}}RangeJob{{/code}} which can be used analyze the effect of a specific layout option onto a specific metric. In the example below, the //thoroughness// layout option is registered using the {{code language="none"}}rangeoption{{/code}} keyword. An integer range is specified resulting in all values between (inclusive) 1 and 50 being tested. While the analyses specified using the {{code language="none"}}analyses{{/code}} keyword are only measured on the initial graph, the analysis specified using the {{code language="none"}}rangeanalysis{{/code}} keyword will be measured for every tested value of the range layout option. Since analyses can be composed out of multiple components (e.g. the edge crossing analysis states the minimum, maximum, and average number of crossings per edge as well as the sum – four components), the {{code language="none"}}component{{/code}} keyword tells GrAna which component to write to the output file.
38
39 To execute GrAna based on a //.grana// file, right click the file and select //Execute Analysis Batch ...//
40
41 {{code language="java"}}
42 globalResources
43 random "/Test/random/" filter ".*kgx"
44 north_graphs "file://D:/graphs/north" filter ".*graphml"
45 secret "/Test/secret/" filter ".*json"
46
47 globalOutputs
48 original_alg "/Test/results/original.csv"
49 awesome_alg "file://workspaces/eclps/Test/results/new.csv"
50 thoroughness "/Test/results/thorough.csv"
51
52 execute all
53
54 job original
55 layoutBeforeAnalysis
56 resources
57 ref random
58 ref north_graphs
59 ref secret
60 layoutoptions
61 klay {
62 de.cau.cs.kieler.algorithm: de.cau.cs.kieler.klay.layered
63 de.cau.cs.kieler.klay.layered.crossMin: LAYER_SWEEP
64 }
65 analyses
66 de.cau.cs.kieler.kiml.grana.nodeCount
67 de.cau.cs.kieler.kiml.grana.edgeCrossings
68 output ref original_alg
69
70 job my_awesome
71 layoutBeforeAnalysis
72 resources
73 ref random
74 ref north_graphs
75 ref secret
76 layoutoptions
77 klay {
78 de.cau.cs.kieler.algorithm: de.cau.cs.kieler.klay.layered
79 de.cau.cs.kieler.klay.layered.crossMin: LAYER_SWEEP
80 de.cau.cs.kieler.klay.layered.crossMin.awesome: true
81 }
82 analyses
83 de.cau.cs.kieler.kiml.grana.nodeCount
84 de.cau.cs.kieler.kiml.grana.edgeCrossings
85 output ref awesome_alg
86
87 rangejob thoroughness
88 resources
89 ref random
90  layoutoptions
91 klay {
92 de.cau.cs.kieler.algorithm: de.cau.cs.kieler.klay.layered
93 de.cau.cs.kieler.klay.layered.crossMin: LAYER_SWEEP
94 }
95 analyses
96 de.cau.cs.kieler.kiml.grana.nodeCount
97 rangeoption
98 de.cau.cs.kieler.klay.layered.thoroughness
99 intrange 1 to 50
100 // floatvalues 0.3, 0.4, 0.5
101 rangeanalysis
102 de.cau.cs.kieler.kiml.grana.edgeCrossings
103 component 3
104 output ref thoroughness
105 {{/code}}
106
107 == Eclipse Wizard ==
108
109 Second, you can use an Eclipse //Wizard// to select one or more sets of graphs, specify and configure a layout algorithm, and select a set of analyses. Results are then written to a //.csv// file (or more precisely semicolon-separated-file).
110 The following series of screenshots illustrates the process of using the wizard.
111 [[image:attach:granaWizard.jpg]]
112 \\
113
114 = Required Plugins =
115
116 * (((
117 Core:
118
119 *
120
121 {{code language="none"}}
122 de.cau.cs.kieler.kiml.grana
123 {{/code}}
124 )))
125 * Textual DSL:
126 ** {{code language="none"}}de.cau.cs.kieler.kiml.config.text{{/code}}
127 ** {{code language="none"}}de.cau.cs.kieler.kiml.config.text.ui{{/code}}
128 ** {{code language="none"}}de.cau.cs.kieler.kiml.grana.text{{/code}}
129 ** {{code language="none"}}de.cau.cs.kieler.kiml.grana.text.ui{{/code}}