15.02.2013 Views

reverse engineering – recent advances and applications - OpenLibra

reverse engineering – recent advances and applications - OpenLibra

reverse engineering – recent advances and applications - OpenLibra

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

GUIsurfer: A Reverse Engineering Framework for User Interface Software<br />

GUIsurfer: A Reverse Engineering Framework for User Interface Software 11<br />

Now, for brevity, the graph described in Figure 3 will be considered. All vertices <strong>and</strong> edges<br />

Fig. 3. Agenda’s behaviour graph (numbered)<br />

are labeled with unique identifiers.<br />

To illustrate the analysis performed with Graph-Tool, three metrics will be considered: Shortest<br />

distance between vertices, Pagerank <strong>and</strong> Betweenness.<br />

4.1.0.1 Shortest Distance<br />

Graph-Tool enables the calculation of the shortest path between two vertices. A path is a<br />

sequence of edges in a graph such that the target vertex of each edge is the source vertex<br />

of the next edge in the sequence. If there is a path starting at vertex u <strong>and</strong> ending at vertex v<br />

then v is reachable from u.<br />

For example, the following Python comm<strong>and</strong> calculate the shortest path between vertices 11<br />

<strong>and</strong> 6 (i.e. between the Login window <strong>and</strong> a particular ContactEditor window state), cf. Figure<br />

3.<br />

vlist, elist = shortest_path(g, g.vertex(11), g.vertex(6))<br />

print "shortest path vertices", [str(v) for v in vlist]<br />

print "shortest path edges", [str(e) for e in elist]<br />

41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!