

Prepara tus exámenes y mejora tus resultados gracias a la gran cantidad de recursos disponibles en Docsity
Gana puntos ayudando a otros estudiantes o consíguelos activando un Plan Premium
Esta página no es visible en la vista previa
¡No te pierdas las partes importantes!


AT&T Bell Laboratories
ABSTRACT
Dotplot is a technique for visualizing patterns of string
be explored interactively or detected automatically. Appli- cations include text analysis (author identification,plagiar- ism detection, translation alignment, etc.), sofhvare engineering (module and version identifcation, subroutine categorization, redundant code identification, etc.), and information retrieval (identification of similar records in results of queries). Patterns are interpreted though a visual language. Squares identify unordered matches (documents with lots of matching w o r d or subroutines with lots of matching symbols), while diagonals ia’entifi ordered matches (copies, versions, and translations). Patterns of squares and diagonals have more complex interpretations that identify subtler relationships.
1. Introduction
to be or
not
to be
Fig. 1 a) Six words, b) A million words of Shakespeare The dotplot technique is illustrated in Fig. 1a. A sequence is tokenized and plotted from left to right and top to bottom with a dot where the tokens match. Dots off the main diago- nal indicate similarities. While Fig. l a shows six words of Shakespeare, Fig. l b shows “The Complete Works” [6]. Grid lines show the boundaries between the concatenated files. Dark areas show a high density of matches. Unlike Fig. la, weighting and reconstruction methods are used to display matches from more than one pair of tokens in a sin- gle pixel. Weighting prevents matches between frequent tokens from saturating the plot. Additional details of the dotplot technique and associated browser are described else- where [2].
Small dark squares along the main diagonal in Fig. l b are caused by names of characters, which generally match within a single work, but not across different works. The exceptions are the European Histones, which share vocabu- lary and form a large dark cluster near the upper left. Squares are also formed by the character sequence of Fig. 3a in which the a’s match each other, but not the b’s, and vice versa. In general, one square indicates a high density of unordered matches, usually due to common vocabulary, while two squares indicate a change in vocabulary.
b) Repeated macros (5000 lines of manual pages)
Fig. 2a plots two versions of the xmh program. The software examples in this paper use C code from the XllR and XllR6 Window System [ 5 ]. Software is tokenized into
match. In Fig. 2a, diagonals are formed in the grid boxes that compare the different versions of each file. Diagonals
eral, diagonals indicate ordered matches such as copies or versions. aaaaaaaaabbbbbbbbb .................. .................. .................. .................. .................. .................. .................. .................. ..................
abcdefghiabcdefghi .. .. .. .. .. ..
.. a. . ..^. .. .. .. .. .. .. .. ..
0-8186-6660-9/94 $04.00 0 1994 IEEE
Fig. 3 a) Squares, b) Diagonals
173
While concatenating two copies creates diagonals, con- catenating multiple copies creates a diagonal texture. Fig.
X11 manual pages. In the following section, additional pat-
in terms of a generalized concatenation operation: shuffling. Similar work is briefly described.
Fig. 4a shows the manual pages of Fig. 2b along with the C code for two versions of x11 (the dark grid lines show the boundary between the versions). The manual pages appear
feature is modeled by the character sequence of Fig. 4b in which a subsequence of b’s is inserted into a larger sequence of a’s. Insertions are also identified by broken diagonals. Fig. 5a shows two versions of the X Toolkit code. The second version is larger than the first. New code is indicated by breaks in the diagonals. Fig. 5b models broken diagonals by inserting extra tokens into an otherwise copied sequence. In general, light crosses indicate insertions into unordered sequences, while broken diagonals indicate insertions into ordered sequences.
Fig. 4 a) Two versions of X
aaaaaaaabbaaaaaaaa ................................ ................................ ................................ ................................ .a m m ................................ ................................ ................................ ................................
b) Light Cross
abcdefghabcZydefgh I. (^). ..
. a (^). .... .. a ..
a (^).
Fig. 5 a) Two versions of xt (66600 lines of C b) Broken Diagonals
.. a ..
... a (^).
Code)
right grid box of Fig. 4a is shown magnified in Fig. 6a. Fig.
6b shows the same sequence that plots diagonals in Fig. 3b, but in a different order. Reordering of versions is typically caused by changes to file pathnames. Reordering is also indicated by square textures. Fig. 7a shows alternating ini-
tures with the same sequence that plots squares in Fig. 3a, but in a different order.
In some cases it is useful to automatically reorder sequences. The concatenation order of the files in Fig. l b was determined by a combinatorial optimization algorithm that emphasizes clusters of similar documents. This is use- ful in information retrieval systems for visualizing docu- ment clusters in the results of a query. Image processing algorithms that identify the clearest diagonal on a smp of dotplots are useful for identifying file pairs in reordered ver- sions.
abcdefgh i cdgh i e f a b
. a (^). a .. .. (^0). .. 0 0 .. .^ a^.. . (^) 0.. e (^) *** aa** . a .. .. ..
Fig. 6 a) Reordered versions of dix (8000 lines of C Code) b) Reordered Copies
Fig. 7 a) Reordered Initializations (2500 lines of C Code) b) Reordered Squares Shuffling is a generalization of insertion and reordering. Fig. 8a shows a seemingly contradictory pattem. Dark squares on the main diagonal indicate that each file has unique vocabulary, while the diagonal texture indicates that each file is a copy. Fig. 8b models the combination of squares and diagonals by shuffling together a sequence that forms squares with one that forms diagonals. Fig. 8a is a chapter of a manual in Dutch, French, German, Italian, Spanish, and Swedish. The input is tokenized into 4-grams.
174