Display method in software development support system

Abstract: A display method in an information processing device for use in software development support comprises the steps of analyzing a software product before change and a software product after change, respectively to form structure information before change and structure informa­ tion after change, which consist of software element informations correlated with each other, in accordance with the respective structures of the software products; forming structure information that forms a union set of the before-change structure information and said after­ change structure information, which includes all the software element informations before and after change, and appending identification information representative of the manner of change in each software element to the union set structure information; and converting at least a part of the union set structure information into its graphic format so as to be produced together with the representations of the change manners represented by the identification information.

Description: The present invention relates to a display method in a software development support system according to the preamble of claim 1. Such a method is known from US 3 711 863. If some changes are made in software products such as programs, program design specifications, etc. (hereinafter represented by programs), comparison between an old program and a new program must be made for checking if the changes have been made as desired. In the prior aft software development support system, the comparison is made, for each line in the text, between the program before change and the program after change to check the changes (addition, deletion and updating). The results of the comparison are displayed or printed out in the form of texts with identifiers respectively indicative of the lines with the addition, the lines with the deletion, and the updated lines. Incidentally, one example of making the comparison between files such as source programs, etc. is disclosed in "Information Processing" Vol. 24, No. 4, April 1983, pages 514 to 520. Generally, in order to test the program, the change in the variants in the course of the test is checked. The conventional system for this purpose includes the types of: interrupting the execution of a program at each of the interrupting points preset in the program to display the value of the variable specified previously or at the interrupting point, and interrupting the execution of a program when each of previously specified conditions (value change, reaching a predetermined value, etc.) for a previously specified variable is made, in order to display the value of the variable specified previously or at the interrupting point. Incidentally, one example of the conventional test support systems is disclosed in "HITACHI HYORON" Vol. 66, No. 3, March 3, 1984, pages 33 to 36. US 3 711 863 discloses a procedure for controlling a data processing system by a computer program that compares two versions of a source program and identifies the difference between the two versions. The differences found by the procedure are classified to be either additions, deletions or modifications. In PROC. IEEE/AIAA 7 th DIGITAL AVIONICS SYSTEMS CONF., 13 October 1986, Fort Worth, Texas, U.S., pages 33-40; J.H. SCHWARTZ : "The ben dix computer-aided software engineering system : a new approach to an ADA* design language", it is disclosed how a program source code can be displayed on a screen in a tree structure to display the source program in an easily understandable way for the user. The conventional method of displaying the comparison results in the form of texts makes it difficult to intuitively and synthetically understand the change contents, so that the recognition of the change is delayed and errors may occur. Therefore, the efficiency and reliability in the change of the program (debug, version up, etc.) will be deteriorated. It is therefore the object of the present invention to provide a display method that graphically displays the positions and types of the changes of a program, thereby intuitively and synthetically understanding the change to improve the efficiency and reliability in the program change. This object is solved in accordance with the features of independent claim 1. Dependent claims are directed on preferred embodiments of the invention. Further, the above-mentioned conventional method of displaying the value of a variable doesn't display the variable value before or after the interruption so that it cannot follow the change of the variable value and so cannot find an unexpected change thereof which would have occurred in the course of executing the program. Thus, the detection of bugs will be incomplete, and the debug thereof will be difficult as the case may be. This problem can be solved to a certain degree by setting further minutely interrupting points or interrupting conditions. However, if they are intended to be minutely set, the procedure of setting them will become complex correspondingly so this solution has a limit. Further, there can be taken a technique of displaying the variant values for the execution of each step. This technique, however, requires a specialized manner of the display. In both conventional techniques, for each updating of the display, the name and value of a variable is successively added, e.g. for each line, to the old display. Therefore, the same variant will be displayed separately at many positions, thereby making it difficult to follow the variant. Also, if the number of updating the display is great, the variable displays are scrolled since the matter to be displayed cannot be displayed in one screen, thus making the display indistinct, or the number of the data to be displayed are excessively increased, thus making it difficult to extract useful information. The second object of this invention is to provide a display method of displaying variable values in the course of executing the test of a program in a plain manner by means of a simple operation, thereby making easy the debug operation of the program. The first feature of the present invention resides in comprising the steps of analyzing the software product before change with that after change to form structure information before change and structure information after change which include software element information correlated with each other in accordance with the respective software structures of the products, forming from both structure informations, structure information that forms a union set of both structure informations including all the elements before and after the change and also adding an identifier that indicates change of each software element, and converting at least a part of the structure information that forms a union set, into a graphic form to output the graphic and the change represented by said identifier. A second feature of the present invention resides in comprising the steps of specifying the display position of a specified variable in a program to be tested, and displaying, in synchronism with the execution of each step in the program, the specified variable value obtained in the step at the specified position. In accordance with the first feature of the present invention, the structure informations of software products before and after change are formed as e.g. tree structure information. The union-set-forming-structure information formed by the tree structure information includes all the information of the software elements not changed and changed (addition, deletion, updating) and software structure information. The information indicative of the manner of change (presence and type thereof) of each software element can be obtained by comparing the structure information before change with the structure information after change or comparing the text before change with the text after change. On the basis of the thus obtained union-set-forming-structure information with the change-indicating identifier, the display of software in the graphic form and the manner of the change of the software elements on the graphic display can be made, so that the contents of change of the software can be easily understood. In accordance with the second feature of the present invention, the display position of the value of each variant to be displayed is fixed, and the value is displayed to be updated or added in real time in synchronism with the execution of the program step updating the value so that the process of change of a desired variable can be successively observed at the fixed position. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a functional block diagram of a first embodiment implementing a first feature of the present invention; Fig. 2 shows one example of a source program before change; Fig. 3 shows one example of a source program after change; Figs. 4A and 4B show tree structure information of the program of Fig. 2 and the PAD representation thereof; Figs. 5A and 5B show tree structure information of the program of Fig. 3 and the PAD representation thereof; Figs. 6A and 6B show structure information that forms a union set, which is led by the tree structure information of Figs. 4A and 4B, and the PAD representation thereof; Fig. 7 is a functional block diagram of a second embodiment implementing the first feature of the present invention; Fig. 8 shows the PAD representation of structure information that forms a union set which is provided in the second embodiment of the first feature of the present invention; Fig. 9 is a functional block diagram of a third embodiment implementing the first feature of the present invention; Figs. 10 and 11 show the PAD representations of the programs before and after change in the third embodiment of the first feature of the present invention; Fig. 12 is a functional block diagram of a first embodiment implementing a second feature of the present invention; Fig. 13 is a flowchart of the first embodiment of Fig. 12; Figs. 14A and 14B are views showing the display screens provided by the first embodiment of the second feature of the present invention; Fig. 15 is a functional block diagram of a second embodiment of the second feature of the present invention; Fig. 16 is a flowchart of the second embodiment of Fig. 12; Fig. 17 is a view showing the display screen provided by the second embodiment of the second feature of the present invention; Fig. 18 is a functional block diagram of a third embodiment of the present invention; Fig. 19 is a flowchart of the third embodiment of Fig. 18; Fig. 20 is a view showing the display screen provided by the third embodiment of the second feature of the present invention; Fig. 21 is a flow chart of a fourth embodiment of the second feature of the present invention; and Fig. 22 is a view showing the display screen provided by the fourth embodiment of the second feature of the present invention. DESCRIPTION OF THE PREFERRED EMBODIMENTS At first, a first feature of the present invention will be explained in connection with several embodiments. In these embodiments, changes in a source program are represented in a PAD (Problem Analysis Diagram) form. The details of the PAD are explained in "Treatises in Information Processing Society of Japan" Vol. 21, No. 4, pages 259 to 267. Fig. 1 shows a data processing device implementing a first embodiment of the first feature of the present invention in a functional block diagram form. Functional blocks illustrated in Fig. 1 may be implemented through software on a single processor except storage portions or may be shared by plural processors. A before-change program storage portion 1 is a memory for storing the text of a source program before-change, while an after-change program storage portion 2 is a memory for storing the text of a source program after-change. One example of the before-change source program text is illustrated in Fig. 2, while one example of the after-change source program text is illustrated in Fig. 3. A before-change tree structure conversion portion 3 converts the before-change source program from its text form into its tree structure form and stores the result of conversion in a before-change program tree structure storage portion 5. An after-change program tree conversion portion 4 converts the after-change source program from its text form into its tree structure form and stores the result of conversion in an after-change program tree structure storage portion 6. Fig. 4A illustrates the thus provided tree structure of the before-change source program (Fig. 2) and Fig. 4B illustrates its PAD representation. Fig. 5A illustrates the thus provided tree structure of the after-change source program (Fig. 3) and Fig. 5B illustrates its PAD representation. Returning to Fig. 1, a program tree structure comparison portion 7 compares the before-change source program tree structure information stored in the storage portion 5 with the after-change source program tree structure information stored in the storage portion 6 to append, to the changed program elements, identifiers representative of their change type, and also unifies the before-change program tree structure information and the after-change program tree structure information to form union-set program tree information thereof and stores it in a union-set program tree structure storage portion 8. Such a processing is carried out in such a manner that the program elements of the before-change and after-change program tree structures are compared with each other travelling in the direction from their root to branches and further to leaves, so as to identify the changed (this concept includes addition, deletion and updating) program elements, and the changed elements are appended with the identifiers representative of their change type. Thus, a tree including both the changed program elements and the not-changed program elements is formed. As for the updated elements, both the before-update elements and the after-update elements are included in the union set tree structure. Fig. 6A shows union-set tree structure information provided, in the above-mentioned manner, from the before-change source program tree structure information shown in Fig. 4A and the after-change source program tree structure information shown in Fig. 5A, and Fig. 6B shows the PAD representation thereof. A sentence 13 in Figs. 4A and 4B showing the before-change tree structure is deleted or disappears in Figs. 5A and 5B showing the after-change tree structure so that the sentence 13 is preserved with the identifier representative of deletion being appended in Figs. 6A and 6B showing the union-set tree structure. A sentence 18 in Figs. 5A and 5B is one added to the before-change tree structure of Fig. 4 so that it exists as a sentence 24 appended with the identifier representative of addition in the union set tree structure of Fig. 6. A sentence 17 in Fig. 4 is updated to a sentence 22 in Fig. 5 so that the union set tree structure of Fig. 6 includes both the before-change sentence and the after-change sentence as indicated by 25, which are appended with the identifiers representative of before-update and after-update, respectively. Likewise, a sentence 14 in Fig. 4 is updated to a sentence 19 in Fig. 5 so that as indicated by 26, the union set tree structure of Fig. 6 includes both the before-change sentence and the after-change sentence which are appended with the identifiers representative of before-update and after-update, respectively. In this case, the sentences following the sentences 14 and 19 as branches and leaves of the tree structure (sentences 15, 16 in Fig. 4 and sentences 20, 21 in Fig. 5) are also included, with the identifiers representative of before-update and after-update being appended, in the union set tree structure, as indicated by 27, 28, 29 and 30 in Figs. 6A and 6B. Returning to Fig. 1, an output position calculation portion 9 reads out the union set program tree structure information from the union set tree storage portion 8 to calculate the on-display display position of each of the program elements, appends the thus obtained position information to the corresponding program elements in the union set program tree structure information and stores the thus obtained union set program tree structure information with the position information in a tree structure with position information storage portion 10. A PAD graphic display portion 11 analyzes the union-set program tree information with position information in the storage portion 10 to edit the PAD display information in accordance with the PAD notation and also to convert the change type information into the corresponding display information (character, color, graphic, etc.). The thus obtained display information is sent to a display 12 to be displayed on the screen in such a manner as shown in Fig. 6. The presence and/or type of change may be represented by colors, blinks, chrominance changes, graphic symbols, etc. In the embodiment mentioned above, if a certain program element has branches and leaves, which means selection and iteration, when the program element is changed, the same change identifier is unconditionally appended to all the program elements belonging to these branches and leaves. This is because the comparison of the program tree structure (7 in Fig. 1) is carried out along the tree structure from the root of the tree towards the branches and leaves. Therefore, even if the program elements belonging to these branches and leaves are actually not changed, they are displayed as if they themselves were changed. For example, the sentence 16 in Fig. 4 corresponding to the sentence 21 in Fig. 5 has not been entirely changed. However, since the sentence corresponding to its root (parent node) has been changed in the selection (branch) condition (from 14 of Fig. 4 to 19 of Fig. 5), the same sentences (16, 21) appear as a before-update program element (28 of Fig. 6) and an after-update program element (30 of Fig. 6) in the union set tree structure. This is inconvenient to understand the actual condition of the change. Another embodiment shown in Fig. 7 intends to improve the above inconvenience using the result of direct comparison of the program texts in addition to the comparison of the tree structure information. In this embodiment, a source program comparison portion 40 and a source program change information storage portion 41 are added to the embodiment of Fig. 1. The source program change information in the storage portion 41 is sent to the program tree structure comparison portion 42 together with the tree structure information before and after change. The source program comparison portion 40 directly and successively compares the before-change source program text from the storage portion 1 with the after-change source program text from the storage portion 2 to detect the program elements changed (addition, deletion and updating) and stores the results in the source program change information storage portion 41. In this comparison, only such a planelike comparison as disclosed in the aforementioned "Information Processing" is carried out irrespectively of the structures of programs. This comparison makes it possible to detect the manner of change in each of the program elements themselves irrespectively of the presence or absence of change in a program element that is the root of the program element of interest. A program tree structure comparison portion 42 form union set tree structure in the same manner as in the program tree structure comparison portion 7 in Fig. 1, and then decides the identifiers to be appended to the individual program elements referring to the source program change information in the storage portion 41. Specifically, the program elements belonging to the branches and leaves of the changed program, if they themselves have been changed, are appended with their change type, and, if they themselves have not been changed, are appended with the identifier representative of unchangedness and the identifier representative of a pair of the program elements corresponding to each other. Fig. 8 shows the PAD representation of the union set tree structure information provided in the manner mentioned above from the before-change program of Fig. 2 and the after-change program of Fig. 3, which corresponds to Fig. 6B. In the sentences belonging to the branches from the changed sentence 45 (which corresponds to the sentence 26 in Fig. 6B), the sentence 43 in the before-change program and the sentence 44 in the after-change program correspond to each other and any change doesn't exist therebetween. Therefore, these sentences are appended with the identifier representative of unchanged and the identifier representative of the correspondence (in this case "1"). In contrast, the sentence 46 itself is updated to the sentence 47 so that the sentence 46 and the sentence 47 are appended with the identifiers representative of before-change and after-change respectively. The succeeding processing is the same as in Fig. 1. If, in addition to the graphic display of the union set of the program elements before change and after change, a part consisting of only the before-change program elements and a part consisting of only the after-change program elements can be individually displayed, the actual state of the changes can be further easily understood. In order to implement such a display, an embodiment shown in Fig. 9 adds a before-change information extraction portion 50 and an after-change information extraction portion 51 to the arrangement of Fig. 7. The before-change information extraction portion 50 extracts only the information on the before-change program elements from the union-set tree structure information with position information stored in the storage portion 10 by checking the identifiers and supplies the extracted information to the PAD graphic display portion 11. Likewise, the after-change information extraction portion 51 extracts only the information on the after-change program elements and supplies it to the PAD graphic display portion 11. Fig. 10 shows the PAD representation of the before-change program information provided in the above-mentioned manner from the union set tree information corresponding to the PAD representation of Fig. 8. Fig. 11 shows the PAD representation of the after-change program information provided in the same manner. In Figs. 10 and 11, the corresponding parts of the union set tree structure with position information of Fig. 8 are employed as they are so that the positions and types of the changes are displayed in the same manner as in Fig. 8 and also the positions of the respective program elements are the same as in Fig. 8. Thus, by comparing the displays shown in Figs. 8, 10 and 11, the actual state of the changes can be further easily understood. These three kinds of display may be exchanged one by one by the operation by an operator, otherwise, optionally selected two or all the displays may be juxtaposed or superposed. In the latter case, a display having a multiwindow function can be conveniently used. In the several embodiments mentioned above, a tree structure has been adopted as the representation of a program. However, any other representation form may be adopted if it can represent the logical relations among the program elements. Also, any display means other than the display may be used if it can produce graphics. For example, a dot printer (regardless of an impact type and non-impact type) may be used. Now, several embodiments of a second feature of the invention will be explained. Fig. 12 shows a data processing device for implementing a first embodiment in a functional block diagram form. Although terminals T in Fig. 12 are actually a single unit, they are repeatedly illustrated to clarify the relation thereof with other functions. A display variable read-in portion 61 reads in, from the terminal 7, the name of a variable specified so that its value is displayed on the screen. A display position determination portion 62 determines the on-screen display positions of the respective variables read in by the display variable read-in portion 61 in accordance with a prescribed rule (for example, so as to be arranged from top to bottom in the read-in order). A display variable/display position storage portion 63 stores the names of the variables read-in by the display variable read-in portion 61 and their display positions determined by the display position determination portion 62 in a correlated manner therebetween. A program execution control portion 64 controls the activation of a variable name display portion 65, a program execution portion 66 and a variable value display portion 68. The variable name display portion 65 reads out the information on the variable names to be displayed and their display position and displays the variable names at the specified positions on the screen of the terminal 7. The program execution portion 66 executes the program to be tested, step by step, referring to or updating the variables preserved in a variable table storage portion 67. The variable table storage portion 67 stores the values of all the variables in the program at the respective time point in a table form. A variable value display portion 68 displays the variable values (stored in the variable table storage portion 67) of the variables to be displayed, which are stored in the display variable/display position storage portion 63, at the display positions stored in the storage portion 63. Fig. 13 shows a flowchart implementing this embodiment. In step 69, variables to be displayed are read in from the terminal 7 by the display variable read-in portion 61 of Fig. 12. In step 70, the display positions of the variables are determined e.g. from top to below in the read-in order by the display position determination portion 62. In step 71, the names of the variables specified in step 69 are displayed at the display positions determined in step 70 by the variable name display portion 65. In step 72, the program is executed by one step by the program execution portion 66. In step 73, the values of the variables specified in step 69 at the present time are displayed at the display positions by the variable value display portion 68. In step 74, the end of the program is judged. Then, if the program reaches the end, the execution of the program is terminated. In other cases, the processing is returned to step 72 to execute the subsequent step of the program. Figs. 14A and 14B show examples of the display screen in accordance with the above embodiment when the program is executed with the variables x, y and the elements z[1] to z[6] of an arrangement being specified as variables to be displayed. Fig. 14A shows the display immediately after the execution of the program is started, while Fig. 14B shows the display at a certain time in the course of the execution. With respect to an embodiment in which, in addition to specifying of the variables to be displayed, the display positions or locations of the variables can be specified, its functional block diagram is shown in Fig. 15, its flowchart is shown in Fig. 16 and one example of its display screen is shown in Fig. 17. In Fig. 15, the display position determination portion 62 of Fig. 12 is replaced by a display position read-in portion 75. The display position read-in portion 75 read in, from the terminal 7, the specified display positions of the variables read in the display variable read-in portion 62. In Fig. 16, the step 70 in Fig. 13 is replaced by a step 76. In step 76, the display positions of the variables to be displayed are read in from the terminal 7 by the display position read-in portion 75 of Fig. 15. Fig. 17 shows one example of a display screen in accordance with this embodiment. In this example, in the left half of the screen, the variables to be displayed and their position are simultaneously displayed. Specifically, the names of the variables to be displayed are specified and also their display line number on the screen are specified in the parentheses right of the variable name. In the case of an arrangement, the column numbers where elements of the line are to be displayed at each of the lines sectioned by a semicolon in < > are specified. In the example of Fig. 17, with respect to the arrangement 2, the specification is made in such a manner that the variable name is displayed at a first line and the names and values of the elements z[1] to z[6] are successively displayed at the positions starting from a second, 10th and 18th columns of the subsequent two lines. In the embodiments mentioned above, although the changes in the variables in the execution process of a program can be observed, it is impossible to know the position where the value or change is located in the program. This problem is solved in an embodiment as shown in Figs. 18 to 20 by displaying the contents and execution position of the program as well as the variables on the same screen. Fig. 18 is a functional block diagram of this embodiment, in which a program content display portion 77 and a program execution position display portion 78 are added to the functional block diagram of Fig. 12. The program content display portion 77 displays the contents of the program during its execution, in a prescribed form. For example, the source program may be displayed in the text form as it is or may be graphically displayed in the known PAD form previously referred to. The program execution position display portion 70 displays the execution position in the displayed program contents on the basis of the display data of the program contents formed by the program content display portion 77. In the flowchart of Fig. 19, steps 79 and 80 are added to the flowchart of Fig. 13. In step 79, the program contents are displayed on the screen in a prescribed form (e.g. PAD) by the program content display portion 77. In step 80, the execution position in the program contents being displayed as a result of the step 79 is displayed in a prescribed form. Fig. 20A shows one example of the display screen in accordance with this embodiment. The program contents are represented in PAD and the PAD box (hatched in Fig. 20A) corresponding to the processing during execution is displayed in color different from the other PAD boxes. In the other example of Fig. 20B, the number of the PAD box of the processing in which the variable value during display has been substituted for the variable of interest is displayed on the right of each variable value. The display in such a form can be realized by displaying the number of the PAD box executed on the right of the variable value processed thereby. In the display form of Fig. 20A, the PAD box during execution may be displayed in different color as in Fig. 20A. Instead of changing color, any intensified display format such as chrominance change, blink, etc. In the several embodiments mentioned above, only the latest value of the variable is displayed but the changing process of the variable value is not displayed. Therefore, in order to know the changing process of the variable value, the screen must be always monitored. An embodiment in which the changing process itself of the variable value is displayed will be explained. Its functional block diagram is the same as Fig. 18 and the functions of the functional blocks included therein are the same as in Fig. 18 except the variable value display portion. Specifically, the variable value display portion 68 in this embodiment checks the variable values (stored in the variable table storage portion 67) of the variables stored in the display variable/display position storage portion 63. Only if the values are different from the already displayed values, the display portion 68 displays the updated value in addition to the already displayed values. Fig. 21 shows the flowchart of this embodiment. In Fig. 21, the step 73 in the flowchart of Fig. 19 is replaced by steps 81 and 82. In the variable value display processing (step 73) of Fig. 19, the old variable values are cancelled and the new variable value are displayed on the same position where the old variable values were displayed, whereas in Fig. 21, if the variable values have been changed is judged (step 81) and if so, the new variable values are displayed on the right side of the old variable values (step 82). Fig. 22 shows one example of the display screen in accordance with this embodiment. In this example, the old variable values and the new variable values are displayed in such a manner that they are chained by arrows. When the variable values have been successively changed, all the respective displays will not be included within the display screen. In this case, the old variable values may be shifted out so that a prescribed number of the newer displays remain on the screen. In accordance with the first feature of this invention, the contents of change in software products can be easily understood intuitionally and synthetically. Thus, the efficiency of software changing operations, which are often performed in the development and maintenance of the software and the reliability of the software after-change is also improved. In accordance with the second feature of this invention, troublesome setting of interruption times and interruption conditions is not required during the test execution of a program and also the changing process of the variable values can be known instead of the variable values at intermittent interruption times. Only the values of the specified variables are displayed at predetermined positions so that they can be easily monitored and hardly missed. Thus, the efficiency of the debug operation of a program can be improved.

Claims: A display method in a software development support system provided with an information processing device, comprising the steps of comparing in the information processing device first information relating to a software before-change with a second information relating to that software after-change, and producing a display in accordance with the comparison result, characterized in comprising the steps of forming tree structure information of at least a part of the software both for the software before and after-change, these two informations being compared with each other, forming a union set tree structure information of both the before and after-change tree structure information and producing a graphic format of that union set, and displaying at least a portion of the graphic format of the union set tree structure information. A method according to claim 1, characterized in that the step of forming a union set tree structure information makes also reference to identification information prepared in the comparing step representative of the manner of change between the two informations. A method according to claim 1 or 2, characterized in that the tree structure information consists of software element information. A method according to one of the claims 1 to 3, characterized in further comprising the step of directly comparing texts of the before-change and after-change software.

Inventors: KATUMATA HIDETOSI, MAEZAWA HIROYUKI, NAITO ICHIRO, OSHIO TAKESHI, YAMAGUCHI JUNKO, KATUMATA, HIDETOSI, MAEZAWA, HIROYUKI, NAITO, ICHIRO, OSHIO, TAKESHI, YAMAGUCHI, JUNKO
Applicants: HITACHI COMPUTER ENG, HITACHI LTD, HITACHI SEIBU SOFT WARE COMPAN, HITACHI COMPUTER ENGINEERING CO., LTD., HITACHI SEIBU SOFT WARE COMPANY, LTD., HITACHI, LTD.
Application year: 1987
Main classification: G06F9
IPC codes: G06F11, G06F9