• No results found

Graph Layout Adjustment Strategies

N/A
N/A
Protected

Academic year: 2021

Share "Graph Layout Adjustment Strategies"

Copied!
13
0
0

Loading.... (view fulltext now)

Full text

(1)

Graph Layout Adjustment Strategies

Margaret-Anne D. Storey

12

and Hausi A. Muller

2

1

School of Computing Science, Simon Fraser University, Burnaby, BC, Canada.

2

Department of Computer Science, University of Victoria, Victoria, BC, Canada.

f

mstorey,hausi

g

@csr.uvic.ca

Abstract.

When adjusting a graph layout, it is often desirable to pre- serve various properties of the original graph in the adjusted view. Perti- nent properties may include straightness of lines, graph topology, orthog- onalities and proximities. A layout adjustment algorithm which can be used to create sheye views of nested graphs is introduced. The SHriMP (

S

imple

H

iera

r

ch

i

cal

M

ulti-

P

erspective) visualizationtechnique uses this algorithm to create sheye views of nested graphs. This algorithm pre- serves straightness of lines and uniformly resizes nodes when requests for more screen space are made. In contrast to other layout adjustment algorithms, this algorithm has several variants to preserve additional se- lected properties of the original graph. These variants use di erent layout strategies to reposition nodes when the graph is distorted. The SHriMP visualization technique is demonstrated through its application to visual- izing structures in large software systems.

1 Introduction

Although the computer screen is relatively small, it is easy to ll it with so much information and detail that it completely overwhelms the user. It is not the amount of information displayed that is relevant, but rather how it is dis- played [17]. Frequently large knowledge bases are represented by graphs. Layout algorithms are often used to present graphs in a more meaningful format. Many visualization tools allow a user or other applications to interact with and adjust these graph layouts.

Misue et al. in [8] describe three properties which should be maintained in adjusted layouts to preserve the user's mental map : orthogonal ordering, clusters and topology. The orthogonal ordering between nodes is preserved if the hori- zontal and vertical ordering of points is maintained. Clusters are preserved by keeping nodes close in the distorted view if they were close in the original view.

The topology is preserved if the distorted view of the graph is a homeomorphism of the original view. Other properties which are important to preserve for some applications include straightness of lines, orthogonality of lines parallel to the x and y axes [9], and relative sizes of nodes.

It is impossible to allocate more space to a portion of a graph constrained

to t on a xed screen size without distorting one or more of the properties

described above. The type of layout and its application should be considered

when deciding which properties to preserve or distort. In a simple grid layout, it

(2)

is preferable to preserve parallel and orthogonal relationships among nodes. This is important for the visualization of large circuit diagrams. For other layouts, such as subway routing maps, the proximity relationships among nodes is a more important property to preserve.

One layout adjustment problem is that of showing more detail (perhaps by increasing the size of nodes) without hiding the remainder of the graph. Ap- proaches based on the sheye lens paradigm seem well suited to this task. How- ever, many of these techniques are non-trivial to implement and their distortion techniques often cannot be altered to suit di erent graph layouts. In addition, several techniques have the side e ect of causing too much distortion in some areas of the graph. For some applications, it would be better to evenly distribute the distortion throughout the entire graph by uniformly scaling nodes outside the focal points.

This paper presents the SHriMP layout adjustment algorithm.This algorithm is suitable for creating sheye views of nested graphs

3

by uniformlyresizing nodes when requests for more screen space are made. It preserves straightness of lines and non-overlapping nodes in the original view will not overlap in the adjusted view. Moreover, this algorithm is exible in its distortion technique as it can be altered to suit di erent graph layouts.

Several sheye view methods are brie y discussed in Section 2. The sub- sequent section presents the SHriMP layout adjustment algorithm. Section 4 describes di erent layout strategies which are used to preserve important prop- erties of various graph layouts. Finally, the SHriMP visualization technique is applied to the task of visualizing software structures.

2 Fisheye Views

Manipulating large graphs on a small screen can be problematic. Because of this, various methods have been proposed for displaying and manipulating large graphs. One approach partitions the graph into pieces, and then displays one piece at a time in a separate window. However, context is lost as detail is in- creased. Another approach makes the entire drawing of the graph smaller, thus preserving context, but the smaller details become dicult to read and interpret as the scale is reduced. A combination view can be given by providing context in one window and detail in another but this requires that the user mentally integrate the two|not always an easy task.

Techniques have been developed to view and navigate detailed information while providing the user with important contextual cues. Fisheye views, an ap- proach proposed by Furnas [4], provide context and detail in one view. This display method is based on the sheye lens metaphor where objects in the cen- ter of the view are magni ed and objects further from the center are reduced in size. In Furnas' formulation, each point in the structure is assigned a prior-

3

Nested graphs, in addition to nodes and arcs, contain composite nodes which are

used to implicitly communicate the hierarchical nature of the graph [5].

(3)

ity that is calculated using a degree of interest (DOI) function. Objects with a priority below a certain threshold are ltered from the view.

In order to deemphasize information of lesser interest, several variations on this theme have been developed that use size, position, colour, or shading in ad- dition to ltering. For example, SemNet uses three-dimensional point perspective that displays close objects larger than objects further away [3]. Graphical Fish- eye Views, a technique developed by Sarkar and Brown [13], magni es points of greater interest and correspondingly demagni es vertices of lower interest by distorting the space surrounding the focal point. Therefore, nodes that are fur- ther away from the focal point appear smaller. The Continuous Zoom Algorithm by Ho et al. [2], suitable for interactively displaying hierarchically-organized, two-dimensional networks, allows users to view and navigate nested graphs by expanding and shrinking nodes. This algorithm uniformly resizes nodes to pro- vide space for focal points. However, the zoom-out operation is not the reverse of the zoom-in operation.

Two methods based on a rubber sheet metaphor are described by Sarkar et al. in [14]. The rst method, Orthogonal Stretching , uses handles to stretch an area of the graph in the x and y directions. Items which fall in these areas are stretched uniformly, while everything outside of these areas contract uniformly.

The second method, Polygonal Stretching , allows a user to specify a polygonal region. Items inside the polygon are scaled as the polygon is stretched and the rest of the view is scaled smoothly to integrate it with the enlarged region. This method does not have an inverse mapping once a region is scaled.

Misue et al. describe three approaches in [9]. They are the Biform Display Method (BF), the Fisheye Display Method (FE) and the Orthogonal Fisheye Display Method (OFE). The BF method uses view areas, where items inside the view areas are uniformly magni ed, and items outside of the areas are uniformly demagni ed. The BF method is similar to the Continuous Zoom algorithm and the Orthogonal Stretching techniques; all three of these approaches preserve straightness of lines and orthogonal ordering in the distorted view. The FE uses an inverse tangent function to apply a sheye lens to the view. Objects closer to the center of the lens appear increasingly larger. However, the orthogonal ordering of points is not maintained using this approach. OFE, a variant of FE, does maintain the orthogonal orderings, but this method (as well as FE) tends to have too much distortion for some parts of the graph. A survey of these approaches and others such as Perspective Wall and Cone Trees are described by Noik in [11].

3 The SHriMP Layout Adjustment Algorithm

The SHriMP layout adjustment algorithm is elegant in its simplicity. Nodes in the graph uniformly give up screen space to allow a node of interest to grow.

Figure 1 gives an example where one node is enlarged. Figure 1(a) shows the

graph before the node of interest (the center node) is scaled by the desired factor.

(4)

(a) (b) (c)

Fig.1.

(a) The graph before any scaling is done. (b) The node of interest (center node) grows by the desired scale factor and pushes its siblings outward. (c) Finally, the node and its siblings are scaled to t inside the screen. This last step is the only step visible to the user of SHriMP, the other step is shown to describe the algorithm only.

The node grows by pushing its sibling

4

nodes outward as if there were in nite screen space, see Fig. 1(b). The node and its siblings are then scaled around the center of the screen so that they will t inside the available space, see Fig. 1(c).

Each sibling is pushed outward by adding a translation vector [ T x ; T y ] to its coordinates. The scaling operation makes use of an equation which scales an object around an arbitrary xed point [6]. In this case, the xed point is the center of the screen, (x p ;y p ), and the scale factor, s , is equal to the size of the screen divided by the requested size of the screen. Equations (1) and (2) show the function applied to the coordinates ( x,y ) of the sibling nodes.

x

0

= x p + s(x + T x

,

x p ) (1)

y

0

= y p + s(y + T y

,

y p ) (2)

In a nested graph, the node of interest pushes the boundaries of its parent node outward also. The parent in turn pushes its siblings out and so on until the root is reached. As a nal step, everything is scaled to t inside the root.

To shrink a node that has previously been enlarged, the scale factor, s , will be

< 1. The zoom-out operation will be the reverse operation of the zoom-in, and vice versa, when the scale factor is set appropriately. A simple extension allows for multiple focal points of varying scaling factors. To scale multiple nodes, each node in turn may grow (or shrink) pushing outward (or pulling inward) their siblings. Finally, nodes are scaled to t inside the available space.

This algorithm is simple, fast and e ective. When considering only one focal point, the algorithm is linear with respect to the number of nodes in the graph.

When scaling multiple nodes, it is O ( kn ) where k equals the number of focal points and n is the total number of nodes in the graph. In most applications, k is much smaller than n . The next section describes how di erent translation vectors may be used for repositioning siblings when a node is resized.

4

Nodes which have the same parent in the nested graph are siblings.

(5)

4 Layout Strategies

When zoominga node in a graph layout it may be desirable to maintainpertinent properties of the layout such as orthogonality, proximity,straightness of lines and the overall topology of the graph. The layout strategies presented in this paper preserve straightness of lines and the graph topology of the nodes. However, it is dicult to preserve both orthogonality and proximity relations using a xed screen size. Depending on the graph layout, it is often only necessary to preserve one of these properties.

In the SHriMP layout adjustment algorithm, a node grows (or shrinks) by pushing its sibling nodes outward along vectors. The translation vectors deter- mine how the sibling nodes are repositioned after a request for more space is made. The following section describes three methods for setting the magnitude and direction of a vector. Figure 2 shows a simple grid layout of a graph. Fig- ure 2(a) shows the grid before any scaling has been done. Parts (b),(c) and (d) show how di erent translation vectors can alter the appearance of the graph when it is distorted to allocate more space to the center node.

SLxcomp

(a)

SLxcomp

(b)

SLxcomp

(c)

SLxcomp

(d)

Fig.2.

(a) Grid before any scaling is done. (b) The center node is scaled using a layout strategy which preserves orthogonality in the graph. (c) and (d) The center node is scaled using layout strategies which are more suited to preserving proximities in the graph.

4.1 Preserving Orthogonality

One layout strategy, called variant 1 , preserves the orthogonal relationships

among nodes. The graph is partitioned into nine partitions by extending the

edges of the scaled node. The translation vector for each sibling node is calculated

according to the partition containing its center. Figure 3 shows the translation

vectors for each of the nine partitions. For example, the translation vector for

those nodes in partition 1 is T = [

,

d x ;

,

d y ], where d x and d y are the x and y

di erences between the new size of the scaled node and its previous size. All

sibling nodes above (below) the scaled node are pushed upward (downward) by

the same amount, thereby maintaining the orthogonality relationships of these

nodes with respect to the y axis. Similarly, nodes to the right (left) are pushed

(6)

} d

y

{

x

d d

x

-

[ , -d

y

] [ 0 , -d

y

]

d

x

- [ , d

y

]

[ 0 , 0 ] d

x

[ - , 0 ]

-d

y

] d

x

[ ,

0 ,

[ d

y

] [ d

x

, d

y

] d

x

[ , 0 ] Partition 1: Partition 2: Partition 3:

Partition 4: Partition 5: Partition 6:

Partition 7: Partition 8: Partition 9:

Fig.3.

In this layout strategy, the translation vector for each sibling node is determined by the partition containing its center.

right (left) by the same amount, maintaining the orthogonality relationships with respect to the x axis.

Figure 2(b) demonstrates how variant 1 maintains the grid-like appearance of a graph when a node is resized. This variant is quite similar in appearance to the Continuous Zoom algorithm reported by Ho et al. and the Biform Display method described by Misue et al.

4.2 Preserving Proximities

Many layout algorithms position nodes in groups or clusters to depict certain relationships in the graph. For example, spring layout algorithms position nodes which are highly connected closer to one another [1]. Therefore, a layout strategy which keeps those nodes that are close in the original view close in the distorted view would be bene cial.

This subsection describes another variant, called variant 2 , where proximity relationships are preserved by constraining each sibling node to stay on the line connecting its center to that of the node being resized. When a node is resized, it pushes a sibling node outward along this line. The direction of each sibling node's translation vector is equal to the direction of the line connecting the centers. The magnitude of this vector is equal to the distance that a corner point of the scaled node moves as it is enlarged.

In Fig. 4(a), the node A is enlarged. d x and d y are the x and y di erences between the new size of A and its previous size. (x a ;y a ) is the center of A . (x b ;y b ) is the center of B , a sibling of A . The direction of B 's translation vector is equal to the direction of the connecting line, and its magnitude is equal to  as per (3).

Equations (4) and (5) are used to calculate the translation vector T = [ T x ; T y ].

Note that  is constant for all sibling nodes, and need only be calculated once.

(7)

A B

{

,y ) (x )

(x ,y

{

x

d

d

y

direction }

}

b b

a a

u

/

u

/

(a)

A B

T

x

{

T {

y

T

x

{ T

{

y

{

,y ) (x )

(x ,y

{

x

d

d

y b b

a a

(b)

Fig.4.

(a) Sibling node, B , is pushed outward along the line connecting its center and the center of A , the node being scaled. Each node is pushed out by the distance



. (b) A sibling node, B , is pushed along the vector between its center and that of A , the node being scaled. The distance it is pushed along this vector is determined by the displacement of the intersecting node's edge as it moved along the vector.



=

pd2x

+

d2y

(3)

Tx

=

p

(

xa,xxba

)

2,

+ (

xbya,yb

)

2

(4)

Ty

=

p

(

xa,xyab

)

2,

+ (

ybya,yb

)

2

(5) This strategy has been applied to the grid in Fig. 2(c). This gure demon- strates that this strategy does not preserve all of the orthogonal relationships of variant 1 , but that it does appear to keep those nodes which were close in the original view, close in the transformed view. However, the screen space is not being used e ectively by this method. Variant 3 , described in the next subsection, makes better use of screen space while maintaining similar proximity relations.

4.3 An Alternative Proximity Preservation Strategy

In variant 3 , the direction of the translation vectors is the same as in variant 2 , but the magnitude () is not the same for all sibling nodes. Instead, a node pushes out sibling nodes according to the displacement of the scaled node's edge as it moved along the line connecting their centers. This strategy makes use of the fact that nodes are drawn as rectangles in SHriMP views. Variant 3 is applied to a grid layout in Fig. 2(d).

In Fig. 4(b), node A is being enlarged. m is equal to the slope of the line

connecting the centers of A and B . The T x and T y components are calculated

(8)

using (6) and (7). In this example, the T y component of the translation vector is simply equal to d y . Since the sibling node is above the scaled node, it is intuitive that it must be pushed upwards by at least this amount to provide room for A to grow in that direction. T x is then calculated by solving for T x in a point-line equation of the line through (x b ;y b ) and (x a ;y a ).

Translation vectors for other sibling nodes are calculated similarly, where

,

d x is used in place of d x when x b < x a , and similarly for d y .

T x =

8

>

>

<

>

>

:

m

1

(y b



d y

,

y a ) + x a

,

x b if

j

m

j

>= 1

0 if

j

m

j

=

1



d x otherwise (6)

T y =

8

>

>

<

>

>

:

m(x b



d x

,

x a ) + y a

,

y b if 0 <

j

m

j

< 1

0 if m = 0



d y otherwise (7)

Figure 5 shows a spring layout of a graph. Figure 5(b) shows the result of applying variant 3 when scaling several nodes. The general appearance of the spring layout is maintained by retaining the proximity relationships between nodes in the adjusted view. Figure 5(c) shows the same nodes scaled using the orthogonality preservation layout strategy, variant 1 , which distorts some of the clusters created by the spring layout and destroys the user's mental map in the process.

4.4 Hybrid Strategies

A graph layout may be composed from a variety of layout algorithms [7]. For example, the overall structure of the graph may be that of a tree, where sub- graphs are laid out using a simple grid strategy. When zooming a node in any part of the graph, the overall layout as well as the subgraph layouts should be maintained. This is possible as the algorithm can apply di erent layout strate- gies to the sibling nodes when a request for more or less space is made. In other words, the method of calculating translation vectors need not be the same for all sibling nodes.

In a tree layout it may be preferable to preserve parallel relationships between

levels in the tree hierarchy while repositioning children so that they remain close

to their parent node. A hybrid strategy based on variant 1 can retain both

properties for these layouts. If we set the T x component of the translation vector

for children of the node of interest to 0, the children will be not be spread apart

horizontally. Figure 6 shows the advantage of applying this hybrid strategy to a

tree layout.

(9)

BaseSystem

(a)

BaseSystem BaseSystem

(b) (c)

Fig.5.

(a) A spring layout of a graph before any scaling is done. (b) Several nodes are scaled using

variant3

, which preserves proximities. The clusters are not distorted using this strategy. (c) The same nodes are scaled using the orthogonality preservation layout strategy,

variant1

. Note how some of the clusters created by the spring layout are distorted.

5 Visualizing Software Structures Using SHriMP Views

The SHriMP visualization technique has been incorporated in the Rigi system for documenting and manipulating structures of large software systems [15].

The Rigi reverse engineering system is designed to analyze, summarize, and document the structure of large software systems [18]. The SHriMP visualization technique helps to alleviate problems of losing context while exploring the many relationships in a multi-million line legacy system.

For large software systems, understanding the structural aspects of a sys- tem's architecture is initially more important than understanding any single component [18]. The SHriMP visualization technique is particularly well suited to showing di erent levels of abstraction in a system's architecture concurrently.

Nodes are used to represent artifacts in the software, such as functions or data

(10)

collapse collapse

(a) (b)

collapse collapse

(c) (d)

Fig.6.

(a) A tree layout before any scaling is done. (b) Two nodes are scaled using the orthogonality preservation layout strategy. Note how the children of these scaled nodes are spread apart. (c) Two nodes are scaled using the proximity preservation layout strategy. Note how the layout of the children of these nodes and the rest of the graph is distorted. (d) Two nodes are scaled using a hybrid strategy which preserves parallel relationships between levels in the tree, and keeps children close to their parents.

variables. Arcs represent dependencies among these artifacts, such as call de- pendencies. Composite nodes correspond to subsystems in the software. The nesting feature of nodes communicates the hierarchical structure of the soft- ware (e.g. subsystem or class hierarchies). The user may incrementally expose the structure of the software by magnifying subsystems of current interest. The SHriMP layout adjustment algorithm provides the ability to browse groups of nodes and arcs in large software systems. By zooming on di erent areas in a large graph, a software engineer can quickly identify important features such as highly connected nodes and candidate subsystems.

Reverse engineering a system involves information extraction and informa-

tion abstraction [10]. One objective of a reverse engineer is to obtain a mental

model of the structure of a subject software system and to communicate this

model e ectively. A reverse engineer uses visualization techniques to facilitate

the identi cation of candidate subsystems and to assist in the visualization of

structures and patterns in the graph. The application of graph layout algorithms

play a key role in communicating the reverse engineer's mental model, and in

the identi cation of structures and patterns in the software.

(11)

CC1

(a)

WITHIN(STMT) ST22520

SQLCD999SQLCD900 SQLCD810

NOTFOUND IKEYNPTR B

AUXCALL ASP30090 ASP30055

ASP30052

ST01543 SQLWN541

STATUS

ZEROCHAR TBLSIZ

STORSIZ STORHSIZ STORAGSZ SAMPLSTR

MAXBYTE KMAX KINCR

KCOMPENS FLOATP5

FLOAT100 CTLBLKSZ CHUNKPTR BLNKCHAR TBLTYPE

AUD31

WITHIN(KEYNAM)

WRDALN

WITHIN(FLDDESC TARGADDR

STRADDR ST58002

ST53020 SQLCD685 SQLCD405

LOUTPTR

LNODEPTR FWZERO FPVDTVRA

FPVDTVCH FPVDTSMA FPVDTINT

FPVDTGRA FPVDTFLT

FPVDTDEC FPVDTCHR FPBWKLND

FPBFDEF

FLOATTYP DGTANDPTDECMAXP CHAR0

C3 ALPHANUM ALLDIGTS WITHIN(PSK)

WITHIN(CNT_INACTIVE) TMPTR

RDSCD630

RDSCD620RDSCD610 RDSCD600 RDSCD595

RDSCD510 RDSCD500

RDSCD490

RDSCD480RDSCD470 RDSCD460 RDSCD450 RDSCD440

RDSCD430 RDSCD420 RDSCD400

RDSCD275 AUD28

ALLKEYS ST22519 SQLCD667

RELSEG RDSCD237RDSCD232 RDSCD225 RDSCD090

ACQSEG

SQLCD206 EXPNDAUT AUD26

AUD25

UKSTLEN TEMPPTR

RISSTLEN RIPTR

REASON10

RDSCD202

RDSCD165

RDSCD105 PKSTLEN

KCAVRLEN KCAINCR KCAFXLEN

GET FREEFPAVRLEN FPAINCR

FKSTLEN

DFKSTLEN ALLOC WITHIN(PARENTS)

WITHIN(NUMINACT) WITHIN(CHILDREN)

UKEY

INACTKEY DROPKEY

ACTKEY ST55013

ST53031

ST52009 SQLCD656

SQLCD542

SQLCD537

BINARY WITHIN(CNT_PARENTS) WITHIN(CNT_CHILD)

ST56035 ST55008

ST54001 ST53010 ST22521

SQLCD823 SQLCD714

SQLCD670

SQLCD644 SQLCD539

SQLCD157 SQLCD101

REFERAUT

PKEY

FKEY BYADDR AUD24

ADDKEYACTIVE UNAVAIL SYSTEM RPRIME

RDSCD125 NRANGE EOFDIRT CNLINKED AVAIL

SQLCD657SEGACT PUBLIC8 NPTR LOBITOFFCPTR BASPTR

DNAMEPT1 DCRTRPT1

RDSCD111 AUXNAMEP

AUXCTPTR

BNAMEPTR BCRTRPTR RDSCD148

RDSCD145 PARBPTR

SQLCD711 DISABLED OBJNMPTN OBJCRPTN SQLCD709

OBJNMPTS OBJCRPTS DROPTREEAUD08

WITHIN(CONSTKN_STR)TTYPECOL OBJNMPTV

OBJCRPTV

BLANK8 OBJNMPTT OBJCRPTT

FKEYTYPE DROPCALL

ST56017SQLCD669 OBJNMPTI

OBJCRPTI

INACTIVE ZERO

SWTCH3

SWTCH2

SWTCH1 STBASPTR SAFENEG RSILDBAS

NCOLSSEG NCOLSCST NCOLSCAT

MLOW2K MHIG2K

MAXNEG IMGINDPT

FLTCONST FLT10000

FLOAT1 FLOAT0

F2BUNNRM F2BMININ F2BMINFT

F2BMAXIN F2BMAXFT COLSTPTR COLINFOY

COLINFON CLSTFCTR

CEIL8 CEIL69 CEIL64

UNLOCK

STBASSIZSTARTUL ILGMODE ENDUL COLSTSIZ ALLCODE SWTCH NOSTART

NFTID INTRAN FORCEND

DELETE DEADLOCK

CDELETE RESTRAN

ST57029 SQLCD915 SQLCD814

SQLCD813 SHARMODE RELNCODE LOCKLIM

LOCK

EXCLMODE AUD07

UPSTANOD

REVOKNOD RESTONOD

LOCKNODE GRANTNOD EXPNDNOD

ENDNODE DROPNODE DFSYNNOD

DEFVUNOD CRTTBNOD CRTIMNOD

COMNTNOD CHSEGNOD ACQIRNOD

ST56009 ST37501

SQLCD611 RDSCD185 GTTHAN0

MOVEALL ENDTRAN

YES XFF X

WITHIN VARCHA TPTR

SYNMCODE

STXXXXX ST57017

ST56042

ST37502

ST22524

ST22517 ST22504

SQLCD758 SQLCD334

SQLCD332 SQLCD330

SQLCD32

SQLCD21 SQLCD191 SPTR

SBCSDATA REASON RDIPTR PRPNAMNM

PRPMXLEN

PROGCO PASLSTR OWNERLEN NULLPTR NOTSUPNO

MIXEDSUB

MIXDATA INPTR2

INPTR1

INDXCODE GRAPHTT

DROPPR

DCTPER DCMXER DCEBER

DCCCSER DCAREAP

CCARTY BITON

BITOFF BITDATA

BASED AUD14 ASCMIXED

ZERO16 VIEWCODE

UPDTEAUT ST42501 SQLCD551

SLTBLKSZ SELCTAUT RDSCD355 NRDOMAUX MXSQLSTM

MULTABVU MAXTAB

MAXQCOL MAXQ

MAXPRED MAXIMG

INSRTAUT HWZERO DELETAUT CHKUPDAT

CHKSELCT CHKINSER CHKDELET

BLANK30

AUXFLDLN AUD09

AUD06 WITHIN(SCT) VGRAPH VARCTYPE

TSTPTYP

TOTOPS TIMETYP

ST57022 ST54016 ST54011

ST53042 ST37511

SQLCD683

SQLCD620 SQLCD610 SQLCD608

SQLCD607 SQLCD604 SQLCD602

SQLCD552 RESRCAUT RDSCD380

RDSCD375 RDSCD370 RDSCD360

RDSCD295

RDSCD257 RDSCD255

NVGRAPH

NVARCTYP NTSTPTYP NTIMETYP

NTABS22 NTABS13 NINTTYPE

NHWTYPE NGRAPH

NFLOATYP NDATETYP NCHARTYP MCR1AUXS LCRAUXSZ

INTTYPE ILLDOMS HWTYPE

GRAPH

FPSIZE FLOATYPE DATETYP

CLMLEN CHARTYPE

BLANK

AUD05 UNIQKEY

UNIQCODE UKEYTYPE TRUE

TOOMANYC ST54020 ST54008

ST53009

ST52011 ST22515 SQLCD617

SQLCD614

SQLCD612 SQLCD605 SQLCD603

SQLCD154 RSVGRAPH

RSVARCTP RSDECTYP RELSSIZE RELEASNM

RDSCD390 RDSCD265 PTRDUM

PKEYTYPE NRSVGRPH

NRSVARCT

NRSDCTYP NOCHILD

NLVRCTYP NLVGRAPH NDECTYPE LVGRAPHLVARCTYP

LDBASESZ

INSERT

ILLNDOM HWMONE

FWMONE FALSE

DUPLCODE DUPFOUND

DESCCODE DECTYPE AUTOMATIC

ASCCODE ST52003 SQLCD666

LABNTAB LABNCOL HEX0

F8 COMNTAB COMNCOL

TABLCODE SQLCD606

CLMNCODE

XDDEL

WITHIN(KEY_TYPE)

SWTCH32 ST53032

ST52004

ST42502 SQLCD708

SQLCD609 SQLCD204

RDSCD350 RDSCD340

RDSCD330 RDSCD320 RDSCD310 RDSCD300 RDSCD290 RDSCD270

RDSCD215 PVTDBSPC

NHLDRRUP

LBASESIZ ICRAUXSZ DIRTSCAN

DBAAUTH

CUPDATECFETCH

AUD04 UPDATE

TUPLCODE TBSIZE

SWTCHH

SWTCHF ST58004

ST57037 ST57011

ST56039 ST53060

ST52010

ST37515 SQLCD931SQLCD930 SQLCD901

SQLCD707SQLCD706 SQLCD705

SQLCD704 SQLCD699

SQLCD601 SEGTCODE

SCRAUXSZ SBASESIZ

RDSCD280 RDSCD260 RDSCD250RDSCD240 RDSCD230 RDSCD220RDSCD210 RDSCD200

RDSCD195 RDSCD190 RDSCD180 RDSCD170 RDSCD160 RDSCD150 RDSCD140 RDSCD130 RDSCD120 RDSCD110RDSCD100 PTREESIZ

PAGECDE OPPTR OPEN

OKON

OFF NOTAVSEG

NOROOMSP NHLDRRDL

NHLDRR NFKEY NEXT MXNAMLTHMAXSTRLNMXBINDTB MAXQTAB

MAXPOOLS MAXHW

KEYVIOL

KDMELTSZ

INPAGES

ILLFREE

FOXFOX FETCH EOF

DOMELTSZ DECPKSZ COMTMSIZ COMSCSIZ COMLKSIZ CLOSE

CINSERT CBASESIZ

BLANKS BADSARG

DELIM

ARIXGFP ARIXXPSARIXRAG

ARIXISH

ARIXSUT

ARIXSLF ARIXSFS ARIMFLP2 ARIXIEI

ARIXSDR ARIXIIK ARIXIEK

ARIXIAU ARIXIVU ARIXIAP ARIXIVR

ARIXIUK ARIXIKE ARIXIIP

ARIXIGK ARIXIBR

ARIXIAF ARIXSCF

ARIXOFE ARIXOCK

ARIXA04

ARIXI31

ARIXIDL ARIXI28 ARIXI34

ARIXIDU ARIXIDP ARIXIDF

ARIXI32

ARIXI29

ARIXI27 ARIXIST

ARIXI19ARIXICT ARIXIAT

ARIXI33 ARIXI16

ARIXI15

ARIXA09

ARIXA07 ARIXI14

ARIXI13 ARIXI18

ARIXEPH

ARIXI12 ARIXI30 ARIXI26 ARIXI25

ARIXI24 ARIXI23 ARIXI22

ARITDCC ARIMCID

ARIXI10

ARIXSLN ARIXESX3 ARIXESX2 ARIXESX1

ARIXEFB

ARIXEAB ARISYSDE

ARICTIM ARIXI09

ARIXI08

ARIXSDB ARIXSCN ARIXSCH

ARIXIFP

ARIXA06 ARIXI07 ARIXI20

ARIXI06 ARIXI05 ARIXI04

ARIXA02 ARIXI03

ARIXETR ARIXEPS

ARIXEER ARIXEDB

ARIXECK ARICWSG

ARICWSF ARIXI01 CC1

ARIXIVK

SQLCD538 ST53030

RDSCD410 RDSCD520 RDSCD530

RDSCD540 RDSCD550

RDSCD560

RDSCD570

RDSCD580

RDSCD590 ADPATHTY

ANCESTY CASCADE

CRTRLTH

DESCENTY FIRSTBLK

MXADPATH MXANCES MXDESCEN MXTAB

RDSCD122 RDSCD445

RDSCD565 SETNULL SQLCD629

SQLCD632 SQLCD648

ST53034

ST56015 TABTY

(b)

Fig.7.

(a) The spring layout algorithm has been applied to the SQL/DS software system. This algorithm helped to expose clusters of nodes on the fringe of the graph, which are candidates for subsystems. (b) One of the clusters of nodes is enlarged to show more detail.

Figure 7(a) shows the result of applying a spring layout algorithm to the graph representation of the SQL/DS software [18]. This layout algorithm assisted in the identi cation of several candidates for subsystems, by clustering groups of nodes around the fringe of the graph. In Fig. 7(b), the user has selected and zoomed one of these clusters, in order to see more detail. By using the SHriMP layout adjustment algorithm which preserves the proximity relations, this structure was emphasized without adversely a ecting the general layout of the graph.

In the Rigi system, a variety of tree layout algorithms are used for visualizing call graphs, data dependency trees and other hierarchies. For example, Fig. 8 shows a call dependency tree routed at the main function in a small program written in the C language. This program implements a list data structure. One of these nodes, mylistprint has been expanded by the SHriMP layout adjustment algorithm using the hybrid layout strategy suitable for tree layouts. By zooming the node in this fashion, a software engineer can read the source code of the mylistprint function and at the same time maintainhis mental map of the location of this function in the call dependency tree.

Rigi is end-user programmable [16] through the RCL (Rigi Command Lan-

guage) which is based on the Tcl/Tk language [12]. The SHriMP visualiza-

tion technique is implemented in the Tcl/Tk language and was therefore easily

integrated in the Rigi system. Since SHriMP (through Rigi) is end-user pro-

grammable, the layout strategy can be dynamically changed for one or more

nodes. The user can experiment with a variety of hybrid strategies based on the

graph layout hierarchy.

(12)

src

main

listfirst listinsert elementcreate

listcreate

elementsetnext elementinfo listnext

elementnext mylistprint

void mylistprint(list) List* list;

{

Element *elem;

fprintf(stderr,"Printing list:\n");

elem = listfirst(list);

while(elem != NULL) {

int info = elementinfo(elem);

fprintf(stderr,"

value = %d\n",info);

elem = listnext(list);

} }

Fig.8.

Browsing software source code using SHriMP Views

6 Conclusions

This paper introduced the SHriMP layout adjustment algorithm suitable for uniformly resizing nodes when requests for more screen space are made. It pre- serves straightness of lines and graph topology in the adjusted views. Moreover, the SHriMP algorithm is exible in its distortion technique and can be changed to suit di erent graph layouts. Several variants were presented for preserving orthogonal and proximity relationships. Hybrid strategies were also shown to be feasible, and are useful when trying to preserve the mental map of more sophisticated layouts.

This algorithm, due to its simplicity, can be easily integrated with existing graph drawing tools. This has been demonstrated through its integration with the Rigi system, where it was used for creating sheye views of nested graphs.

This approach can also be applied to the node disjointness problem.

We are currently investigating whether or not these methods will be useful in

the design phase of graph layouts such as those found in hierarchical petri nets

and user interfaces. Future work involves investigating other layout strategies

and to analyze the strategies presented in this paper to determine which classes

of proximity relations and orthogonal relations are preserved using the di erent

strategies.

(13)

Acknowledgments The authors gratefully thank Bryan Gilbert, James McDaniel and Minou Bhargava for editing suggestions. This work was supported in part by the Natural Sciences and Engineering Research Council of Canada.

References

1. G. Di Battista, P. Eades, R. Tamassia, and I. Tollis , Algorithms for graph drawing: An annotated bibliography , Comput. Geom. Theory Appl., 4 (1994), pp. 235{282.

2. J. Dill, L. Bartram, A. Ho, and F. Henigman , A continuously variable zoom for navigating large hierarchical networks , in Proceedings of the 1994 IEEE Con- ference on Systems, Man and Cybernetics, 1994.

3. K. M. Fairchild, S. E. Poltrock, and G. W. Furnas , Semnet: Three- dimensional graphic representations of large knowledge bases , in Cognitive Science and its Applications for Human-Computer Interaction, R. Guindon, ed., Lawrence Erlbaum Associates, 1988.

4. G. Furnas , Generalized sheye views , in Proceedings of ACM CHI'86, Boston, MA, April 1986, pp. 16{23.

5. D. Harel , On visual formalisms , Communications of the ACM, 31(5) (May 1988).

6. D. Hearn and M. P. Baker , Computer Graphics , Prentice Hall, 1986.

7. T. R. Henry and S. E. Hudson , Interactive graph layout , in UIST, Hilton Head, South Carolina, November 11-13, 1991, pp. 55{64.

8. K. Misue, P. Eades, W. Lai, and K. Sugiyama , Layout adjustment and the mental map , Journal of Visual Languages and Comput., 6(2) (1995), pp. 183{210.

9. K. Misue and K. Sugiyama , Multi-viewpoint perspective display methods: Formu- lation and application to compound graphs , in 4th Intl. Conf. on Human-Computer Interaction, Stuttgart, Germany, vol. 1, September 1991, pp. 834{838.

10. H. A. Muller, M. A. Orgun, S. R. Tilley, and J. S. Uhl , A reverse engi- neering approach to subsystem structure identi cation , Journal of Software Main- tenance: Research and Practice, 5(4) (December 1993), pp. 181{204.

11. E. Noik , A space of presentation emphasis techniques for visualizing graphs , in Proceedings of Graphics Interface '94, (Ban , Alberta), May 1994, pp. 225{233.

12. J. K. Ousterhout , Tcl and the Tk Toolkit , Addison-Wesley, 1994.

13. M. Sarkar and M. Brown , Graphical sheye views , Communications of the ACM, 37(12) (December 1994).

14. M. Sarkar, S. Snibbe, O. Tversky, and S. Reiss , Stretching the rubber sheet:

A metaphor for viewing large layouts on small screens , in User Interface Software Technology, 1993, November 3-5, 1993, pp. 81{91.

15. M.-A. D. Storey and H. A. Muller , Manipulating and documenting software structures using shrimp views . To appear in Proceedings of the 1995 International Conference on Software Maintenance (ICSM '95), Opio (Nice), France , October 16-20, 1995.

16. S. R. Tilley, K. Wong, M.-A. D. Storey, and H. A. Muller , Programmable reverse engineering , International Journal of Software Engineering and Knowledge Engineering, 4 (1994).

17. E. R. Tufte , Envisioning Information , Graphics Press, 1990.

18. K. Wong, S. R. Tilley, H. A. Muller, and M.-A. D. Storey , Structural re- documentation: A case study , IEEE Software, 12 (1995), pp. 46{54.

This article was processed using the L a TEX macro package with LLNCS style

References

Related documents

Write Java programs to demonstrate the use of various Layouts like Flow Layout, Border Layout, Grid layout, Grid bag layout and card layout.. Write programs in Java to create

As it has already been explained a cell, identified by its Cell Global Identity number (CGI), corresponds to the radio coverage of a base transceiver station.. A Location Area

Because the extensive reading approach to teaching reading includes the conditions of flow that can be designed into a task, ER enabled L2 learners to experience flow-like

These wines are hand-selected by our wine list architect and reflect the best and truest representation of the various wine regions where they are produced.. Both of these

performance of any work or services required by Consultant under this Contract shall be considered employees or sub-contractors of the Consultant only and not of the City; and any

To the extent that Designated Persons hold Commercially Sensitive Information, they are bound by the terms of this Code of Conduct in relation to that information and therefore

Based on the structural model in the model fit the above, this study can explain that there is a pos- itive effect of the Intelligence on the service quality at the hospital of

Concerning total lipid content and fatty acid composition of subcutaneous adipose tissue and SM of dry-cured ham, the statistical model included the main effect of the