Beschreibungdescription
Verfahren zur Auswertung von Code-Überprüfer-BerichtenProcedure for evaluating code reviewer reports
Die Erfindung betrifft ein Verfahren zur Auswertung von sogenannten Code-Checker-Berichten, wie sie von Werkzeugen zur Sourcecode-Überprüfung erzeugt werden.The invention relates to a method for evaluating so-called code checker reports, such as those generated by tools for checking the source code.
Bei der Überprüfung des Source-Codes großer Software-Systeme unter Benutzung kommerziell verfügbarer Werkzeuge, wie z.B. PC-Lint (http : //www. gimpel . com) , werden umfangreiche Reports erzeugt. In vielen Fällen sind die so erzeugten, textuellen Datenmengen so umfangreich, dass sie nur noch sehr aufwendig oder gar nicht manuell auszuwerten sind.When checking the source code of large software systems using commercially available tools such as PC-Lint (http: // www. Gimpel. Com), extensive reports are generated. In many cases, the amount of textual data generated in this way is so extensive that it can only be evaluated with great effort or not at all manually.
Bekannte Überprüfungs-Werkzeuge, wie Sotograph (http: //www, software-toitjography■ de) , stellen im Rahmen der Sourcecode-Überprüfungen gewonnene Informationen zum Teil auch graphisch dar.Known verification tools, such as Sotograph (http: // www, software-toitjography ■ de), also partially display the information obtained as part of the source code verification.
Die der Erfindung zu Grunde liegende Aufgabe besteht nun darin, ein Verfahren zur Auswertung von Code- Überprüferberichten anzugeben, bei dem insbesondere Source- Codes großer Software-Systeme besonders schnell und einfach auf verschiedenen Ebenen überprüfbar sind.The object on which the invention is based is now to specify a method for evaluating code checker reports in which, in particular, source codes of large software systems can be checked particularly quickly and easily at different levels.
Diese Aufabe wird durch die Merkmale des Patentanspruchs 1 oder 10 erfindungsgemäß gelöst. Die weiteren Ansprüche betreffen bevorzugte Ausgestaltungen der Erfindung.This task is solved according to the invention by the features of patent claim 1 or 10. The further claims relate to preferred embodiments of the invention.
Die Erfindung besteht im Wesentlichen darin, dass Reports eines Code-Checker-Werkzeugs, wie bspw. PC-Lint, welches z. B. Meldungen der Kategorien "Error", "Warning", "Information" und "Note" zu erkannten Problemen des untersuchten Sourcecodes erzeugt, komprimiert und in ein fächerartiges Diagramm umgesetzt werden, um, insbesondere bei umfangreichen Sourcecodes, einen sehr schnellen, qualitativen
Überblick über den Zustand und/oder über Veränderungen des untersuchten Sourcecodes auf verschiedenen Ebenen, bspw. auf Projektebene, zu erhalten. Die Erfindung wird nachfolgend anhand von in den Zeichnungen dargestellten Ausführungsbeispielen näher erläutert. Dabei zeigtThe invention essentially consists in that reports of a code checker tool, such as, for example, PC-Lint, which, for. B. Messages of the categories "Error", "Warning", "Information" and "Note" to recognized problems of the source code under investigation are generated, compressed and converted into a fan-like diagram in order, especially with extensive source codes, to be very fast, qualitative Get an overview of the status and / or changes in the source code under investigation at various levels, e.g. at project level. The invention is explained in more detail below on the basis of exemplary embodiments illustrated in the drawings. It shows
Figur 1 ein fächerartiges Diagramms zur Erläuterung der Erfindung und Figur 2 eine Variante des fächerartigen Diagramms zur Erläuterung der Erfindung.1 shows a fan-like diagram to explain the invention and FIG. 2 shows a variant of the fan-like diagram to explain the invention.
Das Verfahren ist hier am Beispiel des Werkzeugs PC-Lint beschrieben, lässt sich jedoch einfach an andere Code- Überprüfer bzw. Code-Checker anpassen, solange diese ihre Ergebnisse in ähnlicher, textueller Form zur Verfügung stellen. Ausgangspunkt für das erfindungsgemäße Verfahren sind also bspw. sogenannte PC-Lint-Reports . Ein Auszug aus einem PC- Lint-Report ist in der folgenden Tabelle 1 beispielhaft dargestellt.The procedure is described here using the example of the PC-Lint tool, but can be easily adapted to other code checkers or code checkers as long as they provide their results in a similar, textual form. The starting point for the method according to the invention are, for example, so-called PC lint reports. An excerpt from a PC Lint report is shown as an example in Table 1 below.
_utils,cpp (C++) _utils, cpp (C ++)
Line 0: Option: +rw( inline)Line 0: Option: + rw (inline)
Line 0: Option: +rw ( inline )Line 0: Option: + rw (inline)
Line 0: Option: +rw (_to_semi)Line 0: Option: + rw (_to_semi)
Line 0: Option: +r ( typeo )Line 0: Option: + r (typeo)
Line 0: Option: -rw< asm, _asm, asm )Line 0: Option: -rw <asm, _asm, asm)
Line 0: Option: +rw( _ignore_init ) d:\ sr\projects\GenericArriba\snapshot_mk\GenericPre_VO09\siemens\siemenscpp\src\vp\comnion\gps _utils.cpp:l:7: Note 970: Use of modifier or type 'char' outside of a typedef [MISRA Rule 13] d:\usr\projects\GenericArriba\snapshot_mk\GenericPre_V009\siemens\siemenscpp\src\vp\common\gps _utils.cpp:108:0: Note 1904: Old-style C comment — Effective C++ #4 d:\usr\projects\GenericArriba\snapshot_mk\GenericPre_V009\siemens\siemenscpp\src\vp\common\gps _utils.cpp:110:l: Note 960: Violates MISRA Required Rule 87, only preprocessor Statements and comments before ' #include ' d:\usr\projects\GenericArriba\anapshot_mk\GenericPre_V009\siemens\siemenscpp\src\vp\common\gps _utils.cpp:110:9: Info 829: A +headerwarn Option was previously issued for header 'stdio.h' [MISRA Rule 1243 d:\iasr\projects\GenericArriba\snapshot_mk\GenericPre_V009\siemens\siemenscpp\src\vp\common\gps _utils.cpp:lll:l: Note 960: Violates MISRA Required Rule 87, only preprocessor Statements and comments before '#include' d:\usr\projects\GenericArriba\snapshot_mk\GenericPre_V009\siemens\siemenscpp\src\vp\coinmon\gps _utils.cpp:112:l: Note 960: Violates MISRA Required Rule 87, only preprocessor Statements and comments before ' finclude ' d:\usr\projects\GenericArriba\snaps ot_mk\GenericEre_V009\siemens\siemen3cpp\src\vp\common\gps _utils.cpp:113:1: Note 960: Violates MISRA Required Rule 87, only preprocessor statements and comments before '#include'Line 0: Option: + rw (_ignore_init) d: \ sr \ projects \ GenericArriba \ snapshot_mk \ GenericPre_VO09 \ siemens \ siemenscpp \ src \ vp \ comnion \ gps _utils.cpp: l: 7: Note 970: Use of modifier or type 'char' outside of a typedef [MISRA Rule 13] d: \ usr \ projects \ GenericArriba \ snapshot_mk \ GenericPre_V009 \ siemens \ siemenscpp \ src \ vp \ common \ gps _utils.cpp: 108: 0: Note 1904: Old-style C comment - Effective C ++ # 4 d: \ usr \ projects \ GenericArriba \ snapshot_mk \ GenericPre_V009 \ siemens \ siemenscpp \ src \ vp \ common \ gps _utils.cpp: 110: l: Note 960: Violates MISRA Required Rule 87, only preprocessor Statements and comments before '#include' d: \ usr \ projects \ GenericArriba \ anapshot_mk \ GenericPre_V009 \ siemens \ siemenscpp \ src \ vp \ common \ gps _utils.cpp: 110: 9: Info 829: A + headerwarn Option Was previously issued for header 'stdio.h' [MISRA Rule 1243 d: \ iasr \ projects \ GenericArriba \ snapshot_mk \ GenericPre_V009 \ siemens \ siemenscpp \ src \ vp \ common \ gps _utils.cpp: lll: l: Note 960: Violates MISRA Required Rule 87, only preprocessor statements a nd comments before '#include' d: \ usr \ projects \ GenericArriba \ snapshot_mk \ GenericPre_V009 \ siemens \ siemenscpp \ src \ vp \ coinmon \ gps _utils.cpp: 112: l: Note 960: Violates MISRA Required Rule 87, only preprocessor Statements and comments before 'finclude' d: \ usr \ projects \ GenericArriba \ snaps ot_mk \ GenericEre_V009 \ siemens \ siemen3cpp \ src \ vp \ common \ gps _utils.cpp: 113: 1: Note 960: Violates MISRA Required Rule 87, only preprocessor statements and comments before '#include'
Tabelle 1 : Beispiel eines PC-Lint- eports (Inr-Datei)Table 1: Example of a PC lint report (Inr file)
Je nach Größe des zugrunde liegenden Projekts, der darin enthaltenen Source-Files sowie des Inhalts der sogenannten Policy Files können diese Reports sehr groß werden, z. B. weit über 100.000 Textzeilen bzw. mehrere Megabyte groß.Depending on the size of the underlying project, the source files it contains, and the content of the so-called policy files, these reports can become very large. B. well over 100,000 lines of text or several megabytes in size.
Beispielsweise mit Hilfe eines Perl-Scripts, wird aus diesem Report in einem ersten Schritt unter Zusammenfassung identischer Meldungstypen und Erstellung einerFor example, with the help of a Perl script, this report will be transformed into a first step by summarizing identical message types and creating one
Zusammenfassung eine sogenannte Ins-Datei erstellt, deren Inhalt beispielhaft in der folgenden Tabelle 2 abgebildet ist. Die Extension "Ins" steht hierbei für Lint-Summary.In summary, a so-called Ins file was created, the content of which is shown in Table 2 below. The extension "Ins" stands for lint summary.
506 2 Constant value Boolean 527w 1 ünreachable 529 5 Symbol ■ ... ' (...) not subse uently referenced 534w 22 Ignoring return value of function (compare wit , .. ) 537w 8 Repeated include file ' ... ' 544w 3 endif or eise not followed by EOL 550w 1 Symbol '...' (...) not accessed 570w 1 Loss of sign (...) (... to ... 613w 3 Possible use of null pointer ' .. ' in ... argument to Operator 632w 35 Assignment to strong type ' ... in context: ... 633w 11 Assignment from a strong type ... ' in context: ... 634w 11 String type mismatch (type ' .. ' ) in e uallty or conditional
638w 2 Strong type mismatch for type ' ... ' in relational 639w 15 Strong type mismatch for type ' ... ' in binary Operation 641w 5 Converting enum to int 668w 1 Possibly passing a null pointer to function '...', 713i 1 Loss of precision (...) (... to ) 715i 10 Symbol ' ... ' (...) not referenced 725i 2 Expected positive indentation rom ... 732i 2 Loss of sign (...) (... to ...) 734i 2 Loss of precision (...) (... bits to ... bits) 740i 1 ünusual pointer cast (incompatible indirect types) 744i 2 switch Statement as no default 750i 2 local macro ' ... ' (...) not referenced 752i 2 local declarator ' ... ' (...) not referenced 762i 5 Redundantly declared symbol ' ... ' previously declared at ... 766i 5 Include of header file ... not used in module ... 792i 3 void cast of void expression 818i 5 Pointer para eter '...' (— ) could be declared ptr to const 829i 1 A +headerwarn Option was previously issued for header ' ... '506 2 Constant value Boolean 527w 1 ünreachable 529 5 Symbol ■ ... '(...) not subse uently referenced 534w 22 Ignoring return value of function (compare wit, ..) 537w 8 Repeated include file' ... '544w 3 endif or eise not followed by EOL 550w 1 symbol '...' (...) not accessed 570w 1 Loss of sign (...) (... to ... 613w 3 Possible use of null pointer '. . 'in ... argument to Operator 632w 35 Assignment to strong type' ... in context: ... 633w 11 Assignment from a strong type ... 'in context: ... 634w 11 String type mismatch (type' .. ') in e uallty or conditional 638w 2 Strong type mismatch for type '...' in relational 639w 15 Strong type mismatch for type '...' in binary Operation 641w 5 Converting enum to int 668w 1 Possibly passing a null pointer to function '...', 713i 1 Loss of precision (...) (... to) 715i 10 Symbol '...' (...) not referenced 725i 2 Expected positive indentation rom ... 732i 2 Loss of sign (...) (... to ...) 734i 2 Loss of precision (...) (... bits to ... bits) 740i 1 ünusual pointer cast (incompatible indirect types) 744i 2 switch Statement as no default 750i 2 local macro '...' (...) not referenced 752i 2 local declarator '...' (...) not referenced 762i 5 Redundantly declared symbol '...' previously declared at ... 766i 5 Include of header file ... not used in module ... 792i 3 void cast of void expression 818i 5 Pointer para eter '...' (-) could be declared ptr to const 829i 1 A + headerwarn Option Was previously issued for header '. .. '
(830i 34) Location cited in prior message 912n 13 Implicit binary conversion from ... to ... 917n 26 Prototype coercion (...) ... to ... 957n 6 Function ' ' defined without a prototype in scope 960n 30 Violates MISRA Required Rule ... , 961n 9 Violates MISRA Advisory Rule ... , ... 970n 344 Use of modifier or type ' ' outside of a typedef 97In 27 Use of 'char' without 'signed' or 'unsigned'(830i 34) Location cited in prior message 912n 13 Implicit binary conversion from ... to ... 917n 26 Prototype coercion (...) ... to ... 957n 6 Function '' defined without a prototype in scope 960n 30 Violates MISRA Required Rule ..., 961n 9 Violates MISRA Advisory Rule ..., ... 970n 344 Use of modifier or type '' outside of a typedef 97In 27 Use of 'char' without 'signed' or 'unsigned'
1512w 6 destructor for base class ' ' (...) is not Virtual1512w 6 destructor for base class '' (...) is not virtual
1717i 19 empty prototype for function declaration, assumed ' (void) '1717i 19 empty prototype for function declaration, assumed '(void)'
1904n 181 Old-style C comment1904n 181 Old-style C comment
1923n 15 macro ' ... ' could become const variable1923n 15 macro '...' could become const variable
1924n 25 C-style cast 126 arning 43 Info 455 Note 6 Warning 19 Info 221 Note 870 Total Tabelle 2: Komprimierte Form eines PC-Lint-Reports (Ins-Datei)1924n 25 C-style cast 126 arning 43 Info 455 Note 6 Warning 19 Info 221 Note 870 Total Table 2: Compressed form of a PC Lint report (Ins file)
Im Unterschied zu den ursprünglichen PC-Lint-Reports sind die erzeugten, komprimierten Reports deutlich kleiner und strukturell übersichtlicher gestaltet. Sie bilden den Ausgangspunkt für die folgenden Schritte des Verf hrens .In contrast to the original PC-Lint reports, the generated, compressed reports are significantly smaller and structurally clearer. They form the starting point for the following steps of the procedure.
Der folgende Abschnitt ist vor allem für sogenannte Unit- Tests interessant. Code-Checker-Werkzeuge wie PC-Lint sind auch in der Lage Systemtests über Modulgrenzen hinweg
durchzuführen. Die Meldungen, die dabei generiert werden, werden genauso behandelt, wie die Meldungen im Rahmen von Unit-Tests .The following section is particularly interesting for so-called unit tests. Code checker tools such as PC-Lint are also able to perform system tests across module boundaries perform. The messages that are generated are treated in the same way as the messages in the context of unit tests.
Ein weiteres Leistungsmerkmal des Skripts zur Komprimierung ist die Eliminierung redundanter Meldungen. Eine redundante Meldung kann z.B. dadurch erzeugt werden, daß mehrfach dasselbe Header-File inkludiert wird. Die erstellte Zusammenfassung zählt nur eindeutige Meldungen. Andere Meldungen, wie z.B. die Meldung 830 in Tabelle 2, sind redundant, da es sich dabei um eine Meldung, aber um 2 Referenzpunkte handelt, nämlich auf die Definitions- und Verwendungssteilen. Sie beziehen sich auf zugehörigen Code in der Quelldatei, indizieren aber keine neue Meldung.Another feature of the compression script is the elimination of redundant messages. A redundant message can e.g. are generated by including the same header file multiple times. The summary created only counts clear messages. Other messages, such as the message 830 in Table 2 is redundant, since it is a message but two reference points, namely on the definition and usage parts. They refer to related code in the source file, but do not index a new message.
Zusätzlich zur Erzeugung von Diagrammen zu jedem untersuchten, einzelnen Source-File, bietet das Verfahren Diagramme, die eine Zusammenfassung für eine Menge von zusammengehörigen Source-Files repräsentieren, die sogenannte Transitive Hülle. Das Verfahren ermöglicht zudem dieIn addition to generating diagrams for each individual source file examined, the method offers diagrams that represent a summary for a number of related source files, the so-called transitive envelope. The process also enables
Erzeugung unterschiedlicher Diagrammtypen. Beispiele sind ein Schnappschuß des aktuellen Zustands oder ein Vergleich zweier unterschiedlicher Versionen eines Sourcecode-Standes . Zusätzlich zu den lns-Dateien zu einzelnen Source-Files erzeugt das Skript also zu einer durch die Verzeichnis- oder Projektstruktur festgelegten Menge von Source-Files die sogenannte "Transitive Hülle" der darin enthaltenen lns- Dateien. D.h., besteht ein Projekt aus 3 cpp-Dateien und gibt es dazu 3 lnr- sowie 3 lns-Dateien, so wird auf Projektebene eine Datei namens tc.lns erzeugt, die eineGeneration of different diagram types. Examples are a snapshot of the current status or a comparison of two different versions of a source code status. In addition to the lns files for individual source files, the script also generates the so-called "transitive envelope" of the lns files contained therein for a set of source files defined by the directory or project structure. In other words, if a project consists of 3 cpp files and there are 3 lnr and 3 lns files, a file called tc.lns is created at project level, one
Zusammenfassung der enthaltenen lns-Dateien darstellt. Das Präfix "tc" steht hierbei für Transitive Closure. Diese Transitive Hülle ermöglicht einen schnellen Überblick über den Zustand des untersuchten Sourcecodes auf einer Ebene über derjenigen einzelner Files.
Die durch das Perl-Skript komprimierten PC-Lint-Reports werden nun in fächerartige Auswertungsdiagramme umgesetzt.Summary of the contained lns files. The prefix "tc" stands for Transitive Closure. This transitive envelope enables a quick overview of the status of the source code being examined on a level above that of individual files. The PC-Lint reports compressed by the Perl script are now converted into subject-like evaluation diagrams.
Zuvor jedoch noch einige, grundlegende Informationen zu PC- Lint, die für das Verständnis der folgenden Beschreibung hilfreich sind.Before that, however, some basic information about PC-Lint, which is helpful for understanding the following description.
PC-Lint untergliedert seine Meldungen in 4 Kategorien: • Fehler (Errors) , • Warnungen (Warnings) , • Informationen (Infos) und • Anmerkungen (Notes) .PC-Lint divides its reports into 4 categories: • Errors, • Warnings, • Information and • Notes.
Innerhalb dieser Kategorien wird bspw. nochmals zwischen den Programmiersprachen C und C++ unterschieden.Within these categories, a distinction is made between the programming languages C and C ++.
Insgesamt können die Meldungen von PC-Lint hier damit 8 verschiedenen Gruppen zugeordnet werden.In total, the messages from PC-Lint can be assigned to 8 different groups.
In Figur 1 ist ein schematisch dargestelltes fächerartiges Auswertungsdiagramm (Fan-Diagramm) gezeigt, bei dem diese Kategorien in Form von Sektoren in einem Winkelbereich von 180° in vertikaler Form bzw. dargestellt sind, wobei zwischen der O-Uhr-Position und der 1-Uhr-Position die Meldungstypen der wichtigsten Problemart E (errors) , zwischen der 1-Uhr-Position und der 3-Uhr-Position die Meldungstypen der zweitwichtigsten Problemart (warnings) , zwischen der 3-Uhr-Position und der 5-Uhr- Position die Meldungstypen der drittwichtigsten Problemart I (infos) und zwischen der 5-Uhr-Position und der 6-Uhr- Position die Meldungstypen der letztwichtigsten Problemart N (notes) eingeordnet werden.FIG. 1 shows a schematically illustrated fan-like evaluation diagram (fan diagram), in which these categories are shown in the form of sectors in an angular range of 180 ° in vertical form or, with the o'clock position and the 1- Clock position the message types of the most important problem type E (errors), between the 1 o'clock position and the 3 o'clock position the message types of the second most important problem type (warnings), between the 3 o'clock position and the 5 o'clock position the message types of the third most important problem type I (info) and between the 5 o'clock position and the 6 o'clock position the message types of the last most important problem type N (notes) are classified.
Die Unterschiede in den Winkelbereichen zwischen E und N einerseits und W und I andererseits geben in etwa die unterschiedlich grossen Integer-Bereiche wieder, die zur Numerierung der PC-Lint-Meldungen der verschiedenen Kategorien verwendet werden.
Die vorgestellte, grafische Darstellung basiert auf der durch das Perl-Skript komprimierten Fassung der PC-Lint-Reports, den sogenannten * .lns-Dateien. D.h. pro Source-File , z.B. *.cpp, und zugehöriger *.lns-Datei wird ein Diagramm erzeugt.The differences in the angular ranges between E and N on the one hand and W and I on the other hand roughly reflect the differently large integer ranges that are used to number the PC-Lint messages of the different categories. The graphic representation presented is based on the version of the PC-Lint reports compressed by the Perl script, the so-called * .lns files. This means that a diagram is generated for each source file, eg * .cpp, and the associated * .lns file.
Die .lns-Dateien fassen Meldungen desselben Typs, d.h. mit identischer ID, zusammen und summieren deren Vorkommen. Diese Werte werden bspw. in der schematischen, grafischen Visualisierung anhand von z. B. roten Linien dargestellt. Als Funktion wird dabei der lOer-Logarithmus verwendet, um den großen Wertebereich gut abdecken zu können. Außerdem wird damit erreicht, dass mehrere, nebeneinander gestellte fächerartige Auswertungsdiagramme sehr leicht qualitativ zu vergleichen sind. Die Anzahl der konzentrischen Kreislinien und damit der Skala ist konfigurierbar und der Defaultwert ist mit "3" vordefiniert. In dem Ausnahmefall des Wertes "1" wird vom lOer-Logarithmus aus Gründen der Anschaulichkeit abgewichen und trotzdem eine kurze Linie dargestellt. Die Anzahl der z. B. roten Linien repräsentiert die vorkommenden Meldungstypen im komprimierten PC-Lint-Report, die Länge der Linie die Häufigkeit ihres Vorkommens . Liegt der Endpunkt einer Linie außerhalb des darstellbaren Bereichs, so wird die Linie einfach abgeschnitten.The .lns files contain messages of the same type, i.e. with identical ID, together and sum up their occurrences. These values are, for example, in the schematic, graphic visualization using z. B. red lines. The 10 logarithm is used as a function in order to be able to cover the large range of values well. In addition, it is achieved that several, side-by-side, fan-like evaluation diagrams can be compared qualitatively very easily. The number of concentric circular lines and thus the scale is configurable and the default value is predefined with "3". In the exceptional case of the value "1", a deviation from the 10-logarithm is made for reasons of clarity and a short line is nevertheless displayed. The number of z. B. red lines represent the occurring message types in the compressed PC-Lint report, the length of the line the frequency of their occurrence. If the end point of a line lies outside the displayable range, the line is simply cut off.
Zur eigentlichen Umsetzung in eine graphische Darstellung wird bspw. ein Perl-Skript namens lns2plot verwendet, welches eine vorhandene .lns-Datei als Input erhält und als Zwischenergebnis eine . fan-Datei für das fächerartige Auswertungsdiagramm erzeugt. Diese . fan-Datei wird nun von einem Graphikprogramm, bspw. von dem Programm gnuplot als gnuplot-Programm, verarbeitet und entweder das fertige Fan- Diagramm in einem neuen Fenster angezeigt oder in einem zu definierenden Format (*.png, *.pbm, *.gif, etc.) in einer Datei abgelegt .For the actual conversion into a graphical representation, for example, a Perl script called lns2plot is used, which receives an existing .lns file as input and an intermediate result. fan file for the fan-like evaluation diagram. This . Fan file is now processed by a graphics program, for example by the gnuplot program as a gnuplot program, and either the finished fan diagram is displayed in a new window or in a format to be defined (* .png, * .pbm, *. gif, etc.) stored in a file.
Generell dienen die fächerartigen Aus ertungsdiagramme dazu, dem Betrachter einen schnellen, qualitativen Überblick zum
Status des zugehörigen Source-Codes, z. B. eines einzelnen Files, Unter-Projekts oder Projekts zu vermitteln. Für detaillierte Angaben zu genauen Zahlen und Fehlernummern ist immer das zugehörige .Ins-File zu konsultieren.In general, the subject-like evaluation diagrams provide the viewer with a quick, qualitative overview Status of the associated source code, e.g. B. to convey a single file, sub-project or project. Always consult the associated .Ins file for detailed information on exact numbers and error numbers.
Optional ist es außerdem möglich eine Überschrift mit dem zugehörigen Dateinamen sowie einen Zeitstempel als Unterschrift zu generieren, der den Zeitpunkt der Diagramm- Generierung wiedergibt .Optionally, it is also possible to generate a heading with the associated file name and a time stamp as a signature, which reflects the time of the diagram generation.
Im Folgenden wird nun kurz beschrieben, welche Kommandos auf Shell-Ebene notwendig sind, um bspw. unter RedHat und Cygwin/Windows solche fächerartigen Diagramme bzw. Fan- Diagramme zu erzeugen und anzuzeigen.The following briefly describes which commands are required at the shell level in order to generate and display such fan-like diagrams or fan diagrams under RedHat and Cygwin / Windows, for example.
Cygwin/Windows :Cygwin / Windows:
Erzeugung eines solchen fächerartigen Diagramms und Anzeige in einem Fenster:Generation of such a fan-like diagram and display in a window:
$ lns2plot -style fan -type xll -noplot adas.lns$ lns2plot -style fan -type xll -noplot adas.lns
$ startx$ startx
$ gmiplot$ gmiplot
gnuplot> load "adas.lns .fan"gnuplot> load "adas.lns .fan"
RedHat Linux/Cygwin/Windows : Erzeugung eines Fan-Diagramms und Abspeichern in einer Datei im png-Format:RedHat Linux / Cygwin / Windows: Generation of a fan diagram and saving in a file in png format:
$ lns2plot -style fan -type png adas.lns$ lns2plot -style fan -type png adas.lns
Wie aus den obigen Kommandofolgen hervorgeht, ermöglicht die Option type dem Anwender zu steuern, ob das erzeugte Diagramm angezeigt (xll) oder ob es in einem definierten Format auf Datei geschrieben werden soll (png) . Die Option style ermöglicht die Auswahl eines Diagrammtyps (z.B. fan).
Eine weitere Eigenschaft der Fan-Diagramme besteht darin, daß der subjektive Eindruck zur Häufigkeit von Meldungen durch die Ausrichtung der Linien am Nullpunkt nicht verloren geht, wenn die Diagramme verkleinert werden, z.B. zur Darstellung in Thumbnail-Form.As can be seen from the above command sequences, the type option enables the user to control whether the generated diagram is displayed (xll) or whether it should be written to a file in a defined format (png). The style option enables the selection of a diagram type (eg fan). Another characteristic of the fan diagrams is that the subjective impression of the frequency of messages is not lost when the lines are aligned with the zero point when the diagrams are reduced, for example, for display in thumbnail form.
In Figur 2 ist ein Diagramm zum Vergleich zweier Sourcecode- Versionen gezeigt. Um diese Variante des ursprünglichen Fan- Diagramms zu erzeugen, bietet das zuvor beschriebene Perl- Skript lns2plot vorteilhafter Weise eine Option "vs" (Versus) , um zwei verschiedene Versionen desselben Sourcecode-Stands zu vergleichen. Diese Darstellungsform ist besonders geeignet, um die Entwicklung von Sourcecode über die Zeit zu beobachten. Der Schwerpunkt dieser Fan-Diagramm- Variante liegt auf der Darstellung der Veränderung von einem Sourcecode-Stand einer Version x zu einem Sourcecode-Stand einer Version y.FIG. 2 shows a diagram for comparing two source code versions. In order to generate this variant of the original fan diagram, the previously described Perl script lns2plot advantageously offers an option "vs" (Versus) to compare two different versions of the same source code level. This form of representation is particularly suitable for observing the development of source code over time. The focus of this fan diagram variant is on the representation of the change from a source code version of version x to a source code version of version y.
Das fächerartige Diagramm von Figur 2 ist aus zweiThe fan-like diagram of Figure 2 is made up of two
Halbkreisen aufgebaut, ..wobei der linke Halbkreis sich auf die Verbesserungen VB gegenüber dem zu vergleichenden Sourcecode- Stand konzentriert, der rechte Halbkreis dagegen die Verschlechterungen VS bzw. unveränderten Zustände UZ darstellt. Positive und negative Veränderungen sind lediglich aus Gründen der Übersichtlichkeit auf die beiden Halbkreise verteilt.Semicircles built up, whereby the left semicircle concentrates on the improvements VB compared to the source code level to be compared, the right semicircle on the other hand represents the deteriorations VS or unchanged states UZ. For reasons of clarity, positive and negative changes are distributed over the two semicircles.
Die in dem Diagramm dargestellten Kreuze ohne Linie stellen minimale Veränderungen dar, deren Ausmaß so gering ist, daß sie nicht mittels einer sichtbaren Linie dargestellt werden können.The crosses without a line shown in the diagram represent minimal changes, the extent of which is so small that they cannot be represented by a visible line.
Durch eine entsprechende Farbgebung können negative und positive Veränderungen besonders gut verdeutlicht werden. So bedeuten bspw. grüne Kreuze minimale Verbesserungen, rote dagegen minimale Verschlechterungen und grüne bzw. rote Linien stellen signifikante Änderungen in positiver bzw.
negativer Richtung dar. Die Länge der Linien soll einen quantitativen Eindruck dieser Veränderung vermitteln. Die bspw. blau eingefärbten Punkte schließlich im rechten Halbkreis repräsentieren stagnierende Zustände, d.h. bezüglich dieser Sourcecode-Meldungen hat sich keineAppropriate coloring can make negative and positive changes particularly clear. For example, green crosses mean minimal improvements, red crosses mean minimal deteriorations and green and red lines represent significant changes in positive or negative direction. The length of the lines should give a quantitative impression of this change. The points colored blue, for example, finally in the right semicircle represent stagnating states, that is to say none with regard to these source code messages
Veränderung in der Anzahl der gemeldeten Fehler ergeben.Changes in the number of reported errors result.
Auch dieses Fan-Diagramm legt den Schwerpunkt wieder darauf, daß schnellstmöglich ein qualitativer Eindruck vermittelt werden soll, wie sich ein zugrunde liegender Sourcecode-Stand gegenüber einer zu vergleichenden Version verändert hat. Auch für diese Form des Fan-Diagramms gilt, daß sie sich nicht nur für einzelne Source-Files, sondern für Mengen von Source- Files erzeugen lassen, die sich aus der zugrunde liegenden Verzeichnis- oder ProjektStruktur ergeben.Again, this fan diagram focuses on giving a qualitative impression as quickly as possible of how an underlying source code version has changed compared to a version to be compared. This form of fan diagram also applies that it can be generated not only for individual source files, but also for sets of source files that result from the underlying directory or project structure.
Die Position der Linien und die Darstellung der Punkte beinhaltet die Bedeutung, die Farbgebung ist lediglich ein Hilfsmittel auf Medien, die die Diagramme farbig darstellen können.The position of the lines and the representation of the dots contain the meaning, the coloring is only an aid on media that can display the diagrams in color.
Zusätzlich zur singulären Darstellung einzelner Fan- Diagramme, besteht die Möglichkeit sich die Fan-Diagramme zu einem zugrunde liegenden Software-Projekt mit Hilfe eines beliebigen Browsers in HTML-Form zu betrachten. Dabei entspricht der Aufbau der HTML-Seiten der Projekt- bzw.In addition to the singular representation of individual fan diagrams, it is also possible to view the fan diagrams for an underlying software project in HTML form using any browser. The structure of the HTML pages corresponds to the project or
VerzeichnisStruktur des zu untersuchenden Software-Projekts. Eine Navigation innerhalb der Diagramm-Hierarchie ist über HTML-Links realisiert.Directory structure of the software project to be examined. Navigation within the diagram hierarchy is implemented using HTML links.
Optional bewirkt ein weiteres Skript die Präsentation der erzeugten Diagramme im HTML-Format. Mit Hilfe dieser Repräsentation ist ein Betrachten der Diagramme mit jedem beliebigen Browser möglich und zudem auch eine Navigation in der Hierarchie der erzeugten Diagramme mittels HTML-Links.Another script can optionally be used to present the generated diagrams in HTML format. With the help of this representation, the diagrams can be viewed with any browser and also navigation in the hierarchy of the generated diagrams using HTML links.
Konzeptionelle Erweiterungen des Verfahrens bestehen darin, die erzeugten Fan-Diagramme mittels der VRML-Technologie in
drei-dimensionaler Form darzustellen, um sie z.B. zoombar zu machen, sowie in der Möglichkeit einer Navigation aus dem Diagramm direkt an die betreffende Sourcecode-Stelle.Conceptual expansions of the method consist in using the VRML technology to generate the fan diagrams display three-dimensional form, for example to make it zoomable, as well as the possibility of navigating from the diagram directly to the relevant source code location.
Der Vorteil des beschriebenen Verfahrens besteht in derThe advantage of the method described is that
Möglichkeit, dass sich der Betrachter der Fan-Diagramme einen sehr schnellen, qualitativen Überblick über den Zustand des untersuchten Sourcecodes verschaffen kann, der so durch manuelle Auswertung der textuellen Information auch nicht im Ansatz möglich ist. Die Verfügbarkeit von Diagrammen zu einer Menge von Source-Files - siehe Transitive Hülle - bzw. zu einem gesamten Projekt unterstreicht den Vorteil nochmals.Possibility that the viewer of the fan diagrams can get a very quick, qualitative overview of the state of the source code examined, which is not possible in the approach by manual evaluation of the textual information. The availability of diagrams for a number of source files - see Transitive Shell - or for an entire project further underlines the advantage.
Ferner macht es das Verfahren möglich, einen rein visuellen, schnellen Eindruck von der Veränderung eines Systems durch die Darstellung der Veränderung zwischen zwei verschiedenen Systemzuständen zu erhalten. Außerdem ist das Verfahren aufgrund der genannten Voraussetzungen weitgehend unabhängig von den Code-Checker-Werkzeugen, die den zugrundeliegenden Datenbestand liefern.
Furthermore, the method makes it possible to obtain a purely visual, quick impression of the change in a system by displaying the change between two different system states. In addition, the procedure is largely independent of the code checker tools that provide the underlying data stock due to the aforementioned requirements.