Device, method, and program for generating program specification
Abstract
Problem to be solved.To provide a device, a method, and a program for generating program specifications, which easily and quickly generate program specifications from a source program.
Solution.A display device 21 for the device for generating program specifications provides a GUI function to a user, an input device 22 provides a data input function, an external storage device 23 preserves the source program and other project properties, and a printer 24 prints program specifications. Respective modules of a comment keyword setting part 31, a comment extraction part 32, a project property management part 33, a difference analysis part 34, a specification generation part 35, and a specification print part 36 are mounted on an arithmetic unit 25. Candidates of a keyword by which comments are retrieved from the source program are extracted, set and confirmed, and comments related to differences between files, comments related to differences between symbols, and comments related to differences between processing procedures are extracted by comment items on the basis of the confirmed keywords and are printed as revised specifications.
Copyright (C)2006,JPO&NCIPI
Term
Term ended
Projected expiry passed 24 March 2026, 0.5 years ago.
- Priority and filed
- Published
- Projected expiry
- Today
5 claims: 3 independent, 2 dependent
- 1Comments that have the same character or symbol consecutively specified or more from the comments inserted in the source program, and comments other than comments that have the same character or symbol consecutive specified number or more in the continuous comment line are on the far left. A comment keyword candidate extraction means for extracting a comment described or a comment matching a keyword defined in a predetermined definition file as a comment keyword candidate, and a comment keyword candidate extracted by the comment keyword candidate extraction means. The comment keyword setting means for selectively confirming as a comment keyword, the comment keyword confirmation means for notifying and confirming the comment keyword confirmed by the comment keyword setting means by comparing with the source program, and the comment keyword confirmation means. A comment item extraction means for extracting comment items from the source program based on the comment keyword confirmed by the above, and a program specification generation means for generating a program specification based on the comment items extracted by the comment item extraction means. A program specification creation device characterized in that it is configured to include. ソースプログラムに挿入されているコメントから同じ文字又は記号が所定個以上連続しているコメント、連続するコメント行の中の同じ文字又は記号が所定個以上連続しているコメント以外のコメントで最左端に記述されているコメント、又は所定の定義ファイルに定義されているキーワードに一致するコメントをコメントキーワードの候補として抽出するコメントキーワード候補抽出手段と、該コメントキーワード候補抽出手段により抽出されたコメントキーワードの候補をコメントキーワードとして選択的に確定するコメントキーワード設定手段と、該コメントキーワード設定手段により確定されたコメントキーワードを前記ソースプログラムと照らし合わせて報知して確認するコメントキーワード確認手段と、該コメントキーワード確認手段により確認されたコメントキーワードに基づいて前記ソースプログラムからコメント項目を抽出するコメント項目抽出手段と、該コメント項目抽出手段により抽出されたコメント項目に基づいてプログラム仕様書を生成するプログラム仕様書生成手段と、を含んで構成されたことを特徴とするプログラム仕様書作成装置。
- 4A comment other than a comment in which the same character or symbol is continuous by a predetermined number or more from a comment inserted in the source program to the computer, or a comment in which the same character or symbol is continuous by a predetermined number or more in a continuous comment line. It is extracted by the comment keyword candidate extraction function that extracts the comment described at the leftmost end of the comment or the comment that matches the keyword defined in the predetermined definition file as a comment keyword candidate, and the comment keyword candidate extraction function. A comment keyword setting function that selectively confirms a comment keyword candidate as a comment keyword, and a comment keyword confirmation function that notifies and confirms a comment keyword confirmed by the comment keyword setting function by comparing it with the source program. A comment item extraction function that extracts comment items from the source program based on the comment keywords confirmed by the comment keyword confirmation function, and a program that generates a program specification based on the comment items extracted by the comment item extraction function. A program specification creation program to realize the specification generation function. コンピュータに対して、ソースプログラムに挿入されているコメントから同じ文字又は記号が所定個以上連続しているコメント、連続するコメント行の中の同じ文字又は記号が所定個以上連続しているコメント以外のコメントで最左端に記述されているコメント、又は所定の定義ファイルに定義されているキーワードに一致するコメントをコメントキーワードの候補として抽出するコメントキーワード候補抽出機能と、該コメントキーワード候補抽出機能により抽出されたコメントキーワードの候補をコメントキーワードとして選択的に確定するコメントキーワード設定機能と、該コメントキーワード設定機能により確定されたコメントキーワードを前記ソースプログラムと照らし合わせて報知して確認するコメントキーワード確認機能と、該コメントキーワード確認機能により確認されたコメントキーワードに基づいて前記ソースプログラムからコメント項目を抽出するコメント項目抽出機能と、該コメント項目抽出機能により抽出されたコメント項目に基づいてプログラム仕様書を生成するプログラム仕様書生成機能と、を実現させるためのプログラム仕様書作成プログラム。
- 5A recording medium in which a program for creating a program specification is recorded so that it can be read by a computer. A comment in which the same characters or symbols are consecutive by a predetermined number or more from a comment inserted in the source program, the same in a continuous comment line With the function to extract the comment described at the leftmost end of the comment other than the comment in which a predetermined number or more of characters or symbols are continuous, or the comment matching the keyword defined in the predetermined definition file as a comment keyword candidate. , The function to selectively confirm the extracted comment keyword candidates as comment keywords, the function to notify and confirm the confirmed comment keywords by comparing with the source program, and the confirmed comment keywords. A recording medium recording a program specification creation program for causing a computer to execute a function of extracting a comment item from the source program based on the above and a function of generating a program specification based on the extracted comment item. プログラム仕様書作成プログラムをコンピュータによる読み取り可能に記録した記録媒体であって、ソースプログラムに挿入されているコメントから同じ文字又は記号が所定個以上連続しているコメント、連続するコメント行の中の同じ文字又は記号が所定個以上連続しているコメント以外のコメントで最左端に記述されているコメント、又は所定の定義ファイルに定義されているキーワードに一致するコメントをコメントキーワードの候補として抽出する機能と、抽出された前記コメントキーワードの候補をコメントキーワードとして選択的に確定する機能と、確定された前記コメントキーワードを前記ソースプログラムと照らし合わせて報知して確認する機能と、確認された前記コメントキーワードに基づいて前記ソースプログラムからコメント項目を抽出する機能と、抽出された前記コメント項目に基づいてプログラム仕様書を生成する機能と、をコンピュータに実行させるためのプログラム仕様書作成プログラムを記録した記録媒体。
Independent claims3
110 paragraphs, as filed
The present invention relates to a technique for creating a program specification from a source program in the fields of reengineering and reverse engineering, and more particularly to a technique for generating change information of a source program as a program specification.
Conventionally, in the development of a system, that is, the development of a program that operates the system, it is called forward engineering that first creates a program specification, which is a program design document, and then creates a program, that is, a source program, based on the program specification. The method was basic.
However, the situation at the site of the customer who builds the system and uses the system generally requires various changes when the system is put into operation, so the program specifications are rewritten each time. The conventional method of changing the source program based on the rewritten program specification cannot keep up with the recent rapid trend.
Therefore, in recent program development, the development work is started from the creation of the source program. Then, a development method called plot type development is adopted, in which this is compiled, the program is operated, the system is operated, the actual working state is observed, and the program is modified flexibly while consulting with the customer. In many cases. Therefore, there is no program specification at the development site.
By the way, when a system change is made, it is necessary to compare the source program before and after the change in order to check whether the change is made correctly. In that case, conventionally, the texts describing the source program before the change and the source program after the change are sequentially compared line by line, and the line where the change (addition, deletion, change) has been made is displayed.
However, if such a change in the source program can only be grasped by the superficial difference that appears in the text that describes the source program, it is first necessary to know the important matter why the change in the program was made. It is not possible, and then it is not possible to know what kind of changes have been made to the system configuration such as data configuration and function configuration. Furthermore, as mentioned above, there is a problem that it is not useful to use even if it is stored as a material because the information that should be originally is insufficient.
As a result, it is necessary to carefully examine the source program from corner to corner to check the changes, which not only requires a lot of effort, but also makes it difficult to find the mistakes even if there are mistakes in the changes, resulting in recent plots. Type development had the problem that there was a high risk of compromising the reliability of program changes.
If the program is developed by the basic method of forward engineering, the above problem does not occur because the program specifications suitable for the source program always exist, but it is not suitable for the trend of the times as mentioned above. Therefore, in order to solve the above problems, various methods for generating program specifications from a source program by a technique called reengineering have been proposed and put into practical use.
By the way, in general, in order to create a program specification, it is necessary that comment rules (correspondence rules between comment information and keywords for identifying the comment in the source program) are defined in advance. In other words, originally, before creating a source program, comment rules are defined in advance, and if the source program is described according to the comment rules, the comment rules are referred to and the correspondence between the comments and keywords is a parameter. By setting it in the program specification creation device as, the program specification can be easily created.
<p> However, in many cases, comment rules have not been established, and in recent years, multiple engineers often create one system, so the comment description format described in the created source program. Is not unified. Therefore, in order to create a program specification from those source programs, it is necessary to search for keywords corresponding to the comments to be extracted while referring to the separately created source programs one by one. I was spending a lot of effort on the work.</p><p> Also, in any case, those program specifications are merely an attempt to make it easier to investigate the contents than to directly examine the source program by generating the program specifications from the source program, and the contents of the program. Although comments were extracted to find out, the reason for the change in the program after the change, the system configuration, and the changed part were not informatized.</p><p> Further improved methods for generating program specifications from the source program are described by the applicant in the earlier applications, Japanese Patent Application No. 2-166442 (Japanese Patent Application Laid-Open No. 4-55938) and Japanese Patent Application No. 4 -It is proposed in Application No. 220721 (Japanese Patent Laid-Open No. 4-220721). However, this was also not intended to inform the reason for the change of the program after the change, the system configuration, and the changed part in an easy-to-understand manner, so it is not necessarily an ideal program specification that can be used as a revised specification. It was hard to say, and further improvement was desired.</p><p> The subject of the present invention is to further improve in the field of reengineering, and it is possible to generate program specifications and other documents at high speed. In particular, a source consisting of the reason for changing the program after the change, the system configuration, and the changed part. Program specification creation device and program specification creation method that realized the technology to generate program change information as a revised program specification by a method different from the above application of Japanese Patent Application No. 2-166442 and Japanese Patent Application No. 4-220721. In addition, it is to provide a program specification creation program.</p>
<p> FIG. 1 (a) is a diagram of the operating principle of the program specification creating device of the first invention, and FIG. 1 (b) is a diagram of the operating principle of the program specification creating device of the second invention. First, as shown in FIG. 1 (a), the program specification creation device of the first invention (the invention according to claim 1) has a source program analysis means 1, a comment extraction means 2, a project asset management means 3, and a difference. It is composed of an analysis means 4 and a revised specification generation means 5.</p><p> In each of the above means, the source program analysis means 1 analyzes the source program and extracts the components of the source program. The comment extraction means 2 extracts the comment to be displayed in the program specification from the comment inserted in the above source program. The project asset management means 3 stores the project assets including the source program, the components extracted by the source program analysis means, and the comments extracted by the comment extraction means. The difference analysis means 4 extracts two old and new source programs from the above project assets with different dates and times saved by the project asset management means, and compares the symbols defined in the two old and new source programs to make a difference. If there is a difference, the difference information of the symbol is extracted, and if there is a difference, the comment attached to the same symbol of the old and new source programs is compared, and if there is a difference, the difference information of the comment is extracted. Then, the revised specification generation means 5 generates the revised specifications based on the above-mentioned difference information detected by the difference analysis means.</p><p> Next, as shown in FIG. 1 (b), the program specification creation device of the second invention has comment keyword candidate extraction means 11, comment keyword setting means 12, comment keyword confirmation means 13, and comment item extraction means 14. , And the program specification generation means 15.</p><p> In each of the above means, the comment keyword candidate extraction means 11 specifies a comment in which the same character or symbol is continuous by a predetermined number or more from the comment inserted in the source program, and the same character or symbol in the continuous comment line. The comment described at the leftmost end among the comments other than the consecutive comments, or the comment matching the keyword defined in the predetermined definition file is extracted as a comment keyword candidate. The comment keyword setting means 12 selectively determines the comment keyword candidates extracted by the comment keyword candidate extraction means as comment keywords. The comment keyword confirmation means is 13. The comment keyword confirmed by the comment keyword setting means is notified and confirmed by comparing with the above source program. The comment item extraction means 14 extracts comment items from the above source program based on the comment keywords confirmed by the comment keyword confirmation means. The program specification generation means 15 generates a program specification based on the comment items extracted by the comment item extraction means.</p><p> Further, the program specification creation method of the present invention is a method based on the first invention, and is inserted into the source program and the source program analysis step of analyzing the source program and extracting the components of the source program. Includes the comment extraction process that extracts comments to be displayed in the program specifications from the comments, the source program, the components extracted by the source program analysis process, and the comments extracted by the comment extraction process. The project asset management process that saves the project assets and the old and new source programs in the project assets that are saved by the project asset management process at different dates and times are extracted, and the symbols defined in the old and new source programs. If there is a difference, the difference information of the symbol is extracted, and if there is a difference, the comment attached to the same symbol of the old and new source programs is compared, and if there is a difference, the difference information of the comment is extracted. It includes a step and a revised specification generation step of generating a revised specification based on each of the above difference information extracted by the difference analysis step.</p><p> The program specification creation method of the present invention is a method based on the second invention described above, and is a comment in which the same character or symbol is continuous by a predetermined number or more from a comment inserted in the source program, and a continuous comment line. As a comment keyword candidate, a comment described at the leftmost end of a comment other than a comment in which the same character or symbol is consecutive in a predetermined number or more, or a comment matching the keyword defined in the predetermined definition file is used as a comment keyword candidate. The comment keyword candidate extraction process to be extracted, the comment keyword setting process for selectively determining the comment keyword candidates extracted by the comment keyword candidate extraction process as comment keywords, and the comment keyword determined by the comment keyword setting process are selected. A comment keyword confirmation process that notifies and confirms by comparing with the above source program, a comment item extraction process that extracts comment items from the above source program based on the comment keywords confirmed by the comment keyword confirmation process, and the comment item. It includes a program specification generation step of generating a program specification based on the comment items extracted by the extraction step.</p><p> In addition, the program specification creation program of the present invention tells a computer a comment in which the same character or symbol is continuous by a predetermined number or more from a comment inserted in the source program, the same character in a continuous comment line, or Comment keyword candidate extraction that extracts the comment described at the leftmost end of the comment other than the comment with consecutive symbols of a predetermined number or more, or the comment that matches the keyword defined in the predetermined definition file as a comment keyword candidate. The function, the comment keyword setting function that selectively confirms the comment keyword candidates extracted by the comment keyword candidate extraction function as comment keywords, and the comment keyword confirmed by the comment keyword setting function are compared with the above source program. The comment keyword confirmation function that notifies and confirms the comment item, the comment item extraction function that extracts the comment item from the above source program based on the comment keyword confirmed by the comment keyword confirmation function, and the comment item extraction function that extracts the comment item. It is a program for realizing a program specification generation function that generates a program specification based on a comment item.</p>
<p> As described in detail above, according to the present invention, it is possible to create a project configuration revision specification based on the difference information of the project configuration obtained by comparing the existence of the source program that constitutes both the old and new project assets. Therefore, it is convenient for the user to easily know which source program file is added or deleted between projects or changed between projects.</p><p> In addition, since it is possible to create a file revision specification that describes the difference information regarding the symbol information defined in the same source program file of both the old and new project assets and the comment information accompanying the file, the user has been changed. Not only can you easily know the detailed changes in the source program file, but you can also easily know the reason for the change in the comment information, which makes it convenient to quickly respond to further program development and improvement. Is.</p><p> In addition, a symbol revision specification was created that describes the difference information of the symbols when the same symbol defined in the same source program file of both the old and new project assets has a child symbol and the comment information attached to the symbol. Since it can be done, the user can easily know the further detailed contents of the changed source program file, and it is also convenient to be able to quickly respond to the development and improvement of further programs.</p><p> In addition, the function revision specification that describes the difference information of the processing procedure when the same symbol defined in the same source program file of both the old and new project assets has the processing procedure and the comment information attached to the symbol. It is convenient because you can easily know how the processing procedure of the changed source program has changed, and you can quickly respond to the development and improvement of further programs as well.</p><p> In addition, comment keyword candidates are extracted based on three special rules, the keywords for which comments are extracted are determined by the comment keyword candidates, and comments for specifications are extracted. Even if the source program is created, it is easy to determine the keywords for extracting the main comments, which makes it possible to create revised specifications as well as normal source programs created without specifications. It is convenient because it is possible to easily create specifications.</p>
Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 2 is a diagram showing the overall configuration of the program specification creation device according to the embodiment. The program specification creation device includes a display device 21, an input device 22, an external storage device 23, a printing device 24, and an arithmetic unit 25.
The display device 21 is composed of a CRT, an LCD, a plasma display, or the like, and provides a GUI (Graphical User Interface) function for the user. The input device 22 is composed of a pointing device such as a keyboard and a mouse, and provides a data input function for a GUI. The external storage device 23 is composed of a hard disk or the like, and provides a source program and a function of storing project assets associated with the source program. The printing device 24 is composed of a printer or the like, and provides a printing function of a created program specification.
The arithmetic unit 25 is configured to include at least a central processing unit (CPU) and a memory, and controls the entire program specification creation device by a program loaded in the memory. In addition, each module of the comment keyword setting unit 31, the comment extraction unit 32, the project asset management unit 33, the difference analysis unit 34, the specification generation unit 35, and the specification printing unit 36 is implemented in the arithmetic unit 25 by a program. To.
The comment keyword setting unit 31 described above provides a GUI in cooperation with the display device 21 and the input device 22, and as will be described in detail later, comment keyword candidates (comment keyword candidates) from the source program file read from the external storage device 23. Candidates that should be search keywords for comments that should be extracted as main comments) are extracted, and keywords for comments that should be extracted from the extracted comment keyword candidates are set.
This comment keyword setting unit 31 is a source program analysis means 1, a source program analysis process, a comment keyword candidate extraction means 11, a comment keyword setting means 12, a comment keyword confirmation means 13, a comment keyword candidate extraction process, a comment keyword setting process, and a comment. It acts as a keyword confirmation process, a comment keyword candidate extraction function, a comment keyword setting function, or a comment keyword confirmation function.
In the comment extraction unit 32, a comment or a comment item is extracted based on the comment keyword for the extracted comment set and confirmed in the comment keyword setting unit 31. The comment extraction unit 32 acts as a comment extraction means 2, a comment extraction step, a comment item extraction means 14, a comment item extraction step, or a comment item extraction function.
In addition, the project asset management unit 33 stores and stores the project assets in the external storage device 23. Here, the project asset refers to the source program and each file of the components, comment items, and comment groups extracted from this source program by the comment extraction unit 32 above, and is finally generated from these files. It refers to assets that include program specifications and revised program specifications. This project asset management unit 33 acts as a project asset management means 3 or a project asset management process.
The difference analysis unit 34 searches the project assets stored in the external storage device 23 to check whether the same source programs with different dates and times exist, and if they exist, the two old and new source programs are selected. Extract. In addition, the comments attached to the same file of the old and new source program files are compared, and if there is a difference, the difference is extracted as comment difference information. Furthermore, the comments attached to the same symbol of those source programs are compared, and if there is a difference, the difference is extracted as comment difference information. In addition, the symbols defined in those source programs are compared, and if there is a difference, the difference is extracted as symbol difference information. This difference analysis unit 34 acts as a difference analysis means 4 or a difference analysis step.
The specification generation unit 35 creates a program specification including comments and symbol difference information extracted by the difference analysis unit 34 as a revised program specification. This specification generation unit 35 acts as a revision specification generation means 5, a revision specification generation process, a program specification generation means 15, a program specification generation process, or a program specification generation function.
The specification printing unit 36 prints out the generated program specifications by the printing device 24 as needed. As a result, the user can easily know the change information of the source program.
3 and 4 are flowcharts explaining the operation of the program specification creation process performed by the program specification creation device, and FIG. 4 shows the processes of steps S1 and S3 of FIG. 3 in more detail. is there.
FIG. 5 is a diagram showing a file 37 of a source program written in the C ++ language as an example of the source program to be processed in the above processing. In the figure, the beginning part of the source program is typically shown from the first line to the 32nd line as a part necessary for explanation. In the figure, the symbol "//" is a symbol indicating that all characters following the line are ignored by the C ++ compiler, and these lines generally contain comment delimiters and statements. To.
As shown in Fig. 5, the file name of this source program file 35 is "main.cpp", and the first to sixth lines of the description are the comment part with "//" at the beginning of the line, 7 The line is the read specification part of the header file "main.h" by the "#include" statement, the comment part with "//" at the beginning of the 8th to 15th lines, the 16th to 20th lines Up to, the program statement (not shown) summarized by "{" and "}" following the "void_main_ ()" statement indicating the start position of the program, and "//" at the beginning of the 21st to 29th lines The comment part placed, and from the 30th line, the program statement (not shown) summarized by "{" and "}" following the class name "GasStation" defined by the "class" statement is described. There is.
The comments from the 1st to 6th lines above are separated by 25 "*" written in the 1st and 6th lines, respectively, and are described in the 2nd to 5th lines in between. It consists of comments such as "Overview", "Definition of main function and subfunction", "Creator", and "Fujitsu Oo". This comment is a comment attached to the header file "main.h" for which reading is specified on the 7th line, and also a comment attached to this source program file itself, in other words, the file name "main.cpp". is there.
In addition, the comments from the 8th to 15th lines above are separated by 25 "*" written in the 8th and 15th lines, respectively, and the 9th to 14th lines in between are separated from each other. Described "1. Name", "Control", "2. Outline", "Control of gas station simulation (main function)", "3. Function", "(1) Control of gas station simulation" It consists of the comment text of "." This comment is attached to the "main" function whose execution start is specified on the 16th line.
The comments from the 21st line to the 29th line above are separated by 25 "*" written in the 21st and 29th lines, respectively, and the 22nd to 28th lines in between are separated from each other. Described "1. Japanese class name", "Gas station class", "2. Overview", "Manage gas station status", "3. Function explanation", "(1) Gas station sales It consists of comments such as "Manage." And "(2) Manage the state of the tank at the gas station." This comment accompanies the "GasStation" tool, which is defined as a class on line 30.
As described above, in the source program in this example, the main comment is described from the beginning of the line, not from the middle of the same line in which the program statement is described. Generally, the processing contents of the program are described as comments in the source program. As shown in FIG. 5, the comment attached to the file is described at the beginning of the file, and the comment attached to the symbol is immediately before the symbol. It has been inserted.
A "symbol" is, for example, a heading that represents a set of elements having one characteristic, such as a member function and an external function, when the source program is written in the C ++ language. It is a character string described in one word such as "main" and "GasStation" used.
Taking the source program file 37 of the file name "main.cpp" shown in FIG. 5 having such a description structure as an example, the processing operations shown in FIGS. 3 and 4 performed by the program specification creation device of this example are described. This will be described below. In the following description, the source program file and the source program are used interchangeably. In addition, the file name is also a symbol when it is referred to by another program, and here, the name of the file is treated as a symbol as well as the symbol in the file.
First, in the flowchart of FIG. 3, the comment sentence of the program language before the change is analyzed (step S1). This process is performed on the source program before the change when there is a source program before the change (old source program) and a source program after the change (new source program). This will be described with reference to the flowchart of FIG.
First, the program language is analyzed (step S11). This process analyzes the source program, for example, the source program 37 shown in Fig. 5R> 5 (here, this is the source program before the change) according to the language specifications of the C ++ language, and the defined symbols and their symbols. This is the process of extracting the number of the start line (the line in which the symbol is described).
FIG. 6A is a diagram showing an example of a data file corresponding to the definition symbol / start line obtained by the above program language analysis process and constructed in a predetermined area of the external storage device 23. As shown in Fig. (A), the definition symbol / start line correspondence data file 38 created based on the above-extracted definition symbol and its start line has "main" and "GasStation" as symbol names. "Function" and "class" are added to these as symbol types, respectively, and then "16" and "30" are shown and constructed as starting line numbers corresponding to each symbol. There is.
Since the figure shows an example extracted from the simple source program 37 shown in Fig. 5, only two definition symbol names are shown, but the source program for business use generally has simple control. Thousands of lines, tens of thousands of lines in complex controls, and in some cases hundreds of thousands of lines, so the number of definition symbols extracted from them is actually quite large.
Following the above, in FIG. 4, the comment group is extracted (step S12). This process is a process of extracting comments associated with each symbol extracted in the above source program analysis process. At this time, the file name "main.cpp" of the source program 37 is also extracted as a symbol. Then, a data file consisting of the file name, the definition symbols extracted from the source program, and the comment group for each of those symbols (the symbol of the file name and the symbol defined in the file, the same applies hereinafter) is constructed. File.
FIG. 6B is a diagram showing the configuration of a symbol / comment compatible data file obtained by the comment group extraction process and showing the correspondence between the symbol and the comment group obtained in the other predetermined area of the external storage device 23. Is. In the example shown in the figure, in the symbol / comment compatible data file 39, "main.cpp", "main", and "GasStation" are stored as symbol names in the symbol name area 39-1.
Then, in the type area 39-2 corresponding to those symbol names, "file" is stored as the type of "main.cpp", "function" is stored as the type of "main", and as the type of "GasStation". "Class" is stored. Then, in the comment group area 39-3 corresponding to the symbol name "main.cpp" that follows, 25 consecutive "*" are separated from the beginning of the line, and "Summary" is separated by one digit from the beginning of the line. "Definition of main function, subfunction" is 2 digits away from the beginning of the line, "Creator" is 1 digit away from the beginning of the line, "Fujitsu Oo" is 2 digits away from the beginning of the line, and 25 consecutive "*" Is from the beginning of the line, and the comment attached to the file (that is, the file name or file name symbol) of the source program 37 shown in Fig. 5 just removes "//", and the rest is the description of the source program as it is. It is stored in the form, that is, in the form including the number of blank feed digits from the beginning of the line.
Similarly, in the comment group area 39-3 corresponding to the symbol "main", 25 consecutive "*" are separated from the beginning of the line, "1. Name" is separated from the beginning of the line by one digit, and "Control" is from the beginning of the line. Leave 2 digits, "2. Outline" 1 digit from the beginning of the line, "Gas station simulation control (main function)" 2 digits from the beginning, "3. Function" 1 digit from the beginning of the line , "(1) Control the simulation of the gas station." Is stored two digits away from the beginning of the line, and 25 consecutive "*" are stored from the beginning of the line, etc., as described in the source program. To.
Furthermore, in the comment group area 39-3 corresponding to the symbol "GasStation", 25 consecutive "*" are separated from the beginning of the line, and "1. Japanese class name" is separated from the beginning of the line by one digit, "Gas station class". Is 2 digits away from the beginning of the line, "2. Overview" is 1 digit away from the beginning of the line, "Manage gas station status" is 2 digits away from the beginning of the line, and "3. Function description" is 1 digit from the beginning of the line. After that, "(1) Manage the sales of the gas station" is two digits from the beginning of the line, and "(2) Manage the state of the tank of the gas station." Is two digits from the beginning of the line, and is continuous. Twenty-five "*" are stored from the beginning of the line, and so on, in the same form as the description of the source program.
Following the above, in FIG. 4, the comment keyword candidates are extracted (step S13), the extracted comment keyword candidates are set (step S14), and the set comment keyword candidates are confirmed (step S15). The processing of steps S13, S14 and S15 is repeated for the number of comments extracted in step S12.
Further, as described above, these processes are originally described in the source program over an extremely large number of lines. In general, comments are often added as memorandums to a large number of definition symbols extracted from such a source program as shown in Fig. 6 (a). The number is thousands, and in some cases tens of thousands, which is an extremely large number of comments. If all of these are included in the program specifications, it will be difficult to understand which of the main comments are, and this will not meet the original purpose of creating the specifications.
Therefore, in this example, in order to narrow down the comments that should be included (displayed) in the program specifications to those that meet the purpose of the specifications, first, the comment keyword candidates that are the keywords of the comments that should be extracted are extracted. Then, the user is notified of the display, a necessary keyword is selected from these comment keyword candidates, set as a keyword for comment extraction, and further confirmed.
Therefore, in the above comment keyword candidate extraction process according to the present embodiment, the comment group of the symbol / comment corresponding data file 39 shown in FIG. 5 is extracted according to any or all of the three rules described later. The rule according to the present invention does not make a rule to correspond to a keyword individually determined corresponding to each comment as in the conventional comment convention, but in the present invention, there is a description form of a comment and a certain form. It is determined by the tendency of the strings that appear in the seed comments. As a result, even if the comment is described by a plurality of engineers in different comment description methods, the main comment can be appropriately extracted and incorporated into the program specification.
Extraction of comment keyword candidates performed according to any or all of the above three rules is performed using the data input dialog screen described in detail later. Then, which of the three rules is used to extract the comment keyword candidate is determined by the operator who inputs data to this dialog screen. Here, prior to the explanation of the data input dialog screen, the above three rules and an example of comment keyword candidates extracted based on the rules are shown.
First, in the first rule, a comment in which a predetermined number of the same characters (including symbols) are consecutive is used as a comment keyword candidate. The number of consecutive characters or symbols is specified in the definition file described later.
FIG. 7 (a) is a diagram showing an example of comment keyword candidates extracted from the symbol / comment compatible data file 39 of FIG. 6 (b) based on the above-mentioned rule of a predetermined number of consecutive characters or symbols. As shown in Fig. (A), in the first comment keyword candidate file 41, "file", "function", and "class" are stored as symbol types in the type area 41-1, respectively. Then, 25 consecutive "*" are stored in each of the extracted comment keyword candidate areas 41-2 corresponding to those types.
Next, in the second rule, the comment described at the leftmost end in the series of comment sentences surrounded by delimited comments is used as a comment keyword candidate. FIG. 7 (b) is a diagram showing an example of comment keyword candidates extracted from the symbol / comment compatible data file 39 of FIG. 6 (b) based on the above-mentioned rule of comment described at the leftmost end. .. As shown in Fig. (B), the second comment keyword candidate file 42 has "file", "function", and "class" as symbol types in the type area 42-1 as in the first case. Each is stored. Then, the "summary" and "creator" are stored in the extracted comment keyword candidate area 42-2 corresponding to the "file", and the extracted comment keyword candidate area 42-2 corresponding to the "function" is used. "1. Name", "2. Outline", "3. Function" are stored, and "1. Japanese class name" is stored in the extracted comment keyword candidate area 42-2 corresponding to "Class". ing.
Further, in the third of the above rules, a comment that matches the keyword defined in the predetermined definition file is set as a comment keyword candidate. FIG. 7 (c) is a diagram showing an example of comment keyword candidates extracted from the symbol / comment compatible data file 39 of FIG. 6 (b) based on the above-mentioned rule of keywords defined in the definition file. .. Figure (c) As shown in, in the third comment keyword candidate file 43, "file", "function", and "class" are stored as symbol types in the type area 43-1 as in the first and second cases, respectively. Has been done. Then, the "summary" and "creator" are stored in the extracted comment keyword candidate area 43-2 corresponding to the "file", and the extracted comment keyword candidate area 43-2 corresponding to the "function" is used. , "-" Indicates that there is no data is stored, and "1. Japanese class name", "2. Overview", "3. Function description "is stored. The keywords of these comment keyword candidates are defined in the comment keyword candidate option definition file (hereinafter, simply referred to as a definition file).
FIG. 8 is a diagram showing an example of the above definition file. This definition file 44 is a file described in XML (extensible markup language), and the candidate character string that becomes a keyword is a regular expression by the <Keyword> tag of the child tag of the <KeywordDefinition> tag that is the parent tag. Is specified using. In the example of the figure, "* summary", "* creator", "* explanation", "* parameter", and "* name" are set as keywords.
In other words, the "summary" of the comment keyword candidates corresponding to the "file" shown in Fig. 7 (c) is extracted based on the keyword "* summary" defined in the definition file 44, and the "creator" is also It is extracted based on the keyword "* creator". Similarly, the comment keyword candidate "1. Japanese class name" corresponding to the "class" shown in Fig. 7 (c) was extracted based on the keyword "* name" defined in the definition file 44. Similarly, "2. Overview" is extracted based on the keyword "* Overview", and "3. Function Description" is extracted based on the keyword "* Explanation".
In addition, there is no comment keyword candidate corresponding to "function" in Fig. 7 (c) in the comment group area 39-3 corresponding to "function" in the symbol / comment compatible data file 39 shown in Fig. 6 (b). , This is because there is no comment corresponding to the keywords "* summary", "* creator", "* description", "* parameter" or "* name" defined in the definition file 44.
Further, in the definition file 44, as shown in FIG. 8, the standard of the number of characters to be extracted as a comment keyword candidate for a continuous character string by the <Length> tag of the child tag of the <BorderOpion> tag which is the parent tag. "20" is set as. With this setting, as shown in Fig. 7 (a), 25 consecutive "*" s are extracted.
Data created in HTML or XML, styled in CSS or XSL, and displayed by a web browser to set, check, and extract comment keywords based on the three rules above. A dialog screen for input is used.
Fig. 9 (a), (b) and Fig. 10 (a), (b) are data input dialog screens for setting keywords for comment extraction, and Fig. 11 shows the set keywords for comment extraction. This is a dialog screen for confirmation. In the following explanation, the comment keyword candidate and the extracted keyword candidate have the same meaning as the "candidate for the comment keyword to be extracted", and the comment keyword and the extracted keyword also have the same meaning as the "keyword for the comment to be extracted". Will be used in.
As shown in the figure (a), in the data input dialog screen, the extraction keyword setting screen 45 is first displayed. On the "extracted keyword setting" screen 45, the type input window 46, the extracted keyword and comment item setting window 47, and the extracted keyword candidate display window 48 are displayed in order from the top of the display area.
A button 49 for displaying a pull-down menu is displayed in the type input window 46, and when this button 49 is clicked with a pointing device (hereinafter, also referred to as "press"), for example, file information, function information, Menus such as class information are displayed. "File information" is displayed in the type input window 46 shown in the figure (a). After the user displays the above menu, select "File information" from the menu and double-click it. It shows that it was confirmed.
In addition, the extracted keyword and comment item setting window 47 is provided with a large data display window 51, and "extracted keywords" and "comment items" indicating the type fields of display data are displayed in a horizontal row, and the data display window 51 On the right side of, there are three vertical buttons, "Add (A)", "Change (M)", and "Delete (D)". On the right side of this extracted keyword and comment item setting window 47, it is divided into five vertical columns, "OK", "Cancel", "Test (T)", "Option (O)", "Candidate list (L) < Five buttons of <"are displayed.
A large data display window 52 is provided in the extraction keyword candidate display window 48, and the "number of extractions" and the "candidates" indicating the type column of the display data are displayed in a horizontal row. To the right of this data display window 52, there are four vertical buttons, "Register Candidate (R)", "Extract Candidate (E)", "Cancel (S)", and "Switch Source (B)". It is displayed. In addition, a candidate list filter setting window 53 is displayed below the data display window 52, and three selection check input windows of length (L), column (C), and keyword (K) are displayed in the candidate list filter setting window 53. Is displayed.
In the example shown in Fig. (A), a check is displayed in the input window of column (C), indicating that the user specified the "column" and clicked on the input window of this column (C). There is. This "column" specification specifies that the leftmost comment keyword candidate is extracted, and as a result, the symbol / comment compatible data file 39 in Fig. 6 (b) is searched, and the type area 39-2. The leftmost comment is extracted as a keyword candidate from the comment group in the comment group area 39-3 corresponding to the "file" of, and is displayed in the data display window 52.
Here, as the leftmost comment, the character string and the delimited comment by a continuous symbol are not distinguished, and the delimited comment (consecutive "*") actually described from the leftmost in the comment line and its The comment described at the leftmost end in the series of comment sentences surrounded by delimited comments is set as the leftmost comment, and these are extracted as extraction keyword candidates.
As a result, as shown in Fig. 9 (a), in the data display window 52, the candidates for the extracted keywords are divided into three stages below the "candidate" column on the right side, and 20 consecutive "*" s. , "Summary" and "Creator" are displayed, and the numbers indicating the number of extracts are displayed below the corresponding "Number of extracts" column on the left as "2", "1" and "1". Here, the user thinks that "summary" is the most appropriate keyword for extracting comments related to file information, and selects "summary" from the display in the above-mentioned extraction keyword candidate display window 48 to invert. When it is displayed and the "Candidate registration" button is pressed, "Summary" is displayed under the "Extracted keyword" column of the data display window 51 and the "Summary" is commented as shown in Fig. 10 (a). Figure 7 (b) as keyword candidates It is registered in the extracted comment keyword candidate area 42-2 of the second comment keyword candidate file 42 shown in. Further, if necessary, the above-mentioned extracted keywords are edited, and the corresponding comment items (items defined in the layout in the program specifications described later) are selected. In that case, click the "Add" button displayed in the extraction keyword and comment item setting window 47. Then, the Define Extraction Keyword (Add) screen 55 shown in Fig. 9 (b) is displayed as a dialog. In this "extracted keyword definition (addition)" screen 55, the extracted keyword condition specification window 56 is displayed at the top, and the comment item condition specification window 57 is displayed at the bottom.
In the above extraction keyword condition specification window 56, three lines of check input lines 61 for selecting and specifying extraction conditions are displayed, and in the keyword display window 62 below it, select on the "extraction keyword setting" screen 45. The entered "Summary" is displayed. In addition, the "OK" button 58 and the "Cancel" button 59 are displayed in two rows on the right side of the extraction keyword condition specification window 56.
Further, in the comment item condition specification window 57, three lines of check input lines 63 for selecting and specifying the comment item condition are displayed, and the item setting window 64 is displayed below the check input line 63. A pull-down menu display button 65 is displayed at the right end of the item setting window 64. When the user presses the pull-down menu display button 65, a character string of terms that can be set as an item name such as "summary", "author name", "function", and "change history" is displayed in the menu.
The display of "Summary" displayed in the item setting window 64 of Fig. 9 (b) should be displayed by the user in the comment item "Summary" of the specification that should be extracted by the extraction keyword "Summary". It indicates that "Summary" was selected and specified from the above menu as a kimono.
Note that comment keywords and comment items are not limited to matching ones. That is, the comment item of the summary comment is not limited to "summary", and may be another term indicating that it is a comment item such as a summary, a description, or a summary. These are stored in advance in a pull-down menu file according to the format design of the specifications.
Moreover, even if there is a comment item, there may be no necessary comment. For example, "return value" by specifying "void main ()", other "parameter explanation", "remarks", etc. are also set in the specifications as comment items, but the comment is not described in the source program. In many cases.
After setting the above comment items, when the user presses the "OK" button 58, as shown in Fig. 10 (a), the "Summary" already displayed under the "Extracted keywords" field of the data display window 51. "Summary" is displayed under the "Comment item" column next to.
The user repeats the above operation for the "creator" displayed in the data display window 52 of the extraction keyword setting screen 45 and the 25 consecutive "*" as shown in FIG. 10 (b). In the data display window 51, "Summary", "Creator", and 25 "*" are displayed under the "Extracted keyword" field, and "Summary" and "Creator" are displayed under the "Comment item" field. Is displayed. In this way, all the extraction keywords corresponding to the "file information" displayed in the type input window 46 are set.
Although the 25 "*" are one element of the comment group, they are not the comments themselves but the delimiters of the comment extraction range, so even if they are keywords when extracting comments, they are included in the comment items. Is not included.
After all the extracted keywords corresponding to the file information are set as described above, when the user presses the "OK" button 66, the extracted keyword confirmation screen 67 shown in FIG. 11 is displayed on the above dialog screen (extracted keyword). It is displayed side by side (or partially overlaps) with the setting screen 45). As shown in FIG. 11, the display of this confirmation screen is the same as that of the source program file shown in FIG. Then, when the user presses the "test" button 68 on the extraction keyword setting screen 45, the color of the comment keyword and the comment extracted by this comment keyword changes.
In the example shown in FIG. 11, although it is not clear because it is a monochrome diagram, the position indicator mark 69 is displayed on the first line, which is the description start line of the comment group, and is set as the extraction keyword on the above extraction keyword setting screen 45. There are 20 "*" (1st line in Figure 11), "Summary" (2nd line in Figure 11), "Creator" (4th line in Figure 11), and 20 "*" (Figure 11). The 6th line of 11) is displayed in red, for example. Then, as comments to be extracted by these extraction keywords, "definition of main function and subfunction" (3rd line in Fig. 11) and "Fujitsu husband" (5th line in Fig. 11) are displayed in green, for example. To. This color-coded display allows the user to visually confirm the extracted keywords related to the "file" and the keywords extracted by the extracted keywords in the description of the source program. Here, by pressing the "OK" button 66 on the extraction keyword setting screen 45, the comment group of the color-coded display portion is confirmed.
The processing according to steps S13, S14 and S15 in FIG. 4 described above is for each symbol type extracted in FIG. 6 (b) (in the example of FIG. 6 (b), in addition to the above file, there is still a function. And "class" remains) is done in the same way. Then, based on the confirmation of this extracted keyword, the comment is extracted and the comment database for each comment item is created (step S16).
12 (a), (b), and (c) are diagrams showing an example of a database constructed in a predetermined area of the external storage device 23 by a group of comments extracted based on the above comment extraction process, respectively. .. The figure (a) shows the file comment data file 71 of the file "main.cpp", and "definition of main function and subfunction" and "definition of main function and subfunction" as comments corresponding to "summary" and "creator" of comment items. "Fujitsu husband" is stored respectively.
In addition, the figure (b) is the function comment data file 72 of the function "main", and the comment items "Japanese name", "Summary", "Return value", "Parameter explanation", "Function explanation", And as comments corresponding to "Remarks", "Control", "Control of gas station simulation (main function)", None, None, "(1) Control of gas station simulation", and None. Each is stored.
The figure (c) shows an example of the class comment data file 73 regarding the class GasStation. In the example of the figure, "gas station class" is stored as a comment corresponding to the comment item "Japanese name", and "manage the state of the gas station" is stored as a comment corresponding to "summary". "(1) Control the simulation of the gas station" is stored as the comment corresponding to "Function explanation", and "(1) Manage the sales of the gas station" and "(1) Manage the sales of the gas station" as the comment corresponding to "Remarks". (2) Manage the state of the tank at the gas station. Is stored.
Then, following the above database creation process, a program specification generation process is performed (step S17). FIG. 13 is a diagram showing an example of a program specification generated in the program specification generation process. The figure shows a confirmation screen 74 displaying the program specifications created based on the data of the function comment data file 72 shown in FIG. 12 (b). As shown in the header part 75 of the same screen 74, the title of this program specification is "main function explanation". The function name is "main", the Japanese name is "control", the definition file is "Msin.cpp", the definition line number is "16", and the declaration format is "void main ()". All of these are the data extracted in the process up to the generation of the symbol / comment compatible data file 39 shown in Fig. (B).
Next, in the comment section 76, a display in which a small frame in which the item name is described and a large frame in which the comment is described is sequentially displayed downward in sequence. In the example shown in the figure, the item name "Summary" shown in Fig. 12 (b) has a comment "Control of gas station simulation (main function)", the item name "Return value" has no comment, and the item name " There is no comment in the "bara meta explanation", and the comment "(1) Control the simulation of the gas station" is described in the item name "function explanation".
At the bottom of the screen in the figure, although not particularly shown, the display in which the item names and comments that can be displayed by scrolling with the scroll bar 77 are described is continuous. The program specification created in this way is the source program file 37 shown in FIG. 5 and the definition symbol / start line corresponding data file 38 shown in FIGS. 6 (a) and 6 (b) in the process shown in FIG. And symbol comment compatible data file 39, the file comment data file 71 shown in Fig. 12 (a), (b), (c), function comment data file 72, and class comment data file 73, all before the change of project assets. The information is stored in a predetermined area of the external storage device 23 (step S2).
Subsequently, the modified source program corresponding to the source program before the modification, that is, the new source program file with the date and time was read, and the comment sentence of the modified program language was analyzed (step S3), and the result was obtained. Save the modified information (step S4). The processes of steps S3 and S4 are the same as the processes described in steps S1 and S2, except that the target source programs are two source programs, old and new, which have different production dates (or dates and times when they were first saved). It is the same.
In the above explanation, it is explained as two source programs, old and new, but in general, in order to build one project for operating one system, a plurality of programs called normal modules are created. A file that individually describes each source program that is the basis of each of these programs is, for example, the source program file 37 as shown in FIG.
Therefore, there are a large number of source program files (hereinafter, simply referred to as files) in two project assets of the same date and time (same name, the same applies hereinafter). The processes of steps S1 to S4 described above are processes performed for all of those files.
Then, following the above, the difference information is constructed (step S5). Although not shown in particular, this process extracts project assets with the same name (that is, two old and new) with different dates and times from the above-mentioned project assets, compares the contents of both project assets, and uses them as difference information. This is a process of extracting the difference information (difference information) of the above, converting the difference information into a difference information file, and storing (storing) the difference information in the external storage device 23.
As a result, the existence of the files that make up both project assets is first compared. And the file that exists in the newer date and time of both project assets but does not exist in the old one, that is, the additional file information when there is an added file, exists in the older date and time of both project assets. Is not in the newer one, that is, the deleted file information when there is a deleted file, and when both projects have files with the same name, the contents are the same or changed. Difference information such as change presence / absence information is constructed.
Next, the comment information attached to the same file and the same symbol of both project assets is compared to construct the difference information, and further, the symbol information defined in the same file of both project assets is compared and the difference information is constructed. Difference information is constructed, and if the same symbol of both project assets has a child symbol, such as a member of a class in the C ++ language, the child symbol information is compared and the difference information is constructed. ..
Further, when the same symbol of both project assets has a processing procedure like a function or a member function in the case of C ++ language, the difference information of the processing procedure is constructed. Then, based on these difference information, the following four types of revised specifications are generated (step S6). FIG. 14 is a diagram showing an example of a project configuration revision specification that describes the difference information of the project configuration obtained by comparing the existence of the source program that constitutes both of the project assets. As shown in the figure, in the project configuration revision specification 78, the header part 79 describes the project configuration revision specification and the name of this specification in the specification name column 79-1, and the project name column 79. In -2, " system" and the project name to which the program of this specification belongs are described. In the example shown in the figure, the data unit 81 is provided with six data lines from line numbers 81-1 to 81-6, and the file name and the state of the file are described in association with each other. That is, in the file name field, the six files stored in the SampleSrc folder of the desk of the device number C of the external storage device 23, along with the address indicating the storage location, C: \ SampleSrc \ a.cpp, ~ It is described as \ b.cpp, ~ \ c.cpp, ~ \ d.cpp, ~ \ e.cpp, ~ \ f.cpp, and the corresponding status fields are "same", "delete", and "add". The states are described as "change", "change", and "change" respectively.
For the above "same" file, "delete" file, and "addition" file, the contents of the program can be easily found by examining the program specifications created by the above method. Then, for the "changed" programs, a file revision specification that describes the difference information of the definition symbols of those files and the difference information of the comments attached to the files is created again.
FIG. 15 is a diagram showing an example of a file revision specification in which the difference information regarding the symbol information defined in the same file of both project assets and the comment information accompanying those files are described together. The file revision specifications shown in the figure are the file revision specifications for the modified file C: \ SampleSrc \ d.cpp described in line number 81-4 of the project configuration revision specifications 78 shown in Fig. 14. 82 is taken as an example and shown.
As shown in FIG. 15, the file revision specification 82 includes a header section 83, a comment section 84, and a symbol section 85. In the header part 83, first, "file revision specification" and the specification name are described, the project name is described as " system" in the project name column, and the file name is described in the file name column. "C: \ SampleSrc \ d.cpp" is described, the date and time are described as "2001/01/01 12:00" in the update date and time column before change, and the same year is described in the update date and time column after change. The date and time are described as "2001/01/30 13:06".
In addition, the comment section 84 is provided with a comment item column, a status column, a comment column before change, and a comment column after change from the left. In the comment item column, the keywords for comment extraction as comment items determined by the above-mentioned extraction, setting, and confirmation processing of comment keyword candidates are listed in order from the top: "Summary", "Creator", "Function", and " Change history "is described.
Then, in the state column corresponding to those comment items, the states are described as "=", "=", "", and "", respectively. That is, regarding the "summary" of the comment item, the comment status is the same (=) before and after the change, and the corresponding comment fields before and after the change are both "Control of the XX system". The same comment is described. Also, regarding "Creator", the comment status is the same (=) before and after the change, and the corresponding comment in the comment column before change and the comment column after change both have the same comment as "Fujitsu husband". It has been described.
Regarding "function", the comment status is different () before and after the change, and the comment before the change was a comment on the three lines 1) to 3), but the comment after the change There is an additional comment between 2) and 3), and in the example shown in the figure, the additional comment is "2.2) Process to support ". .. Regarding the change history, the state of the comment before and after the change is naturally different (), and the comment before the change is only the comment of "2001/01/01 first edition", but the comment after the change is the above. In addition to the comments of the first edition, the comment of "2000/01/30 2nd edition support" has been added.
That is, by comparing these functions with the comments in the change history, it is easy to find out the date and time of the change and the reason for the change in the source program. Further, the symbol unit 85 is provided with a symbol name column, a symbol type column, and a status column. In the symbol name column, the extracted definition symbol names are described as "CAaaClass", ..., "ReadData" in order from the top, and in the corresponding symbol type column, the symbol types are "class" in order from the top, ..., It is described as "external function". Then, in the status column corresponding to this, "same", ..., "Change" are described in order from the top.
Here, it can be seen that the symbol "CEeeClass" of line number 85-4 has a type of "class", and its element has a child symbol. And since the state is "changed", it can be seen that there is a change in the content. In addition, the type of the symbol "ReadData" at line number 85-8 is "external function", and the status is also "change", so it can be seen that the processing procedure has changed. Here, too, a symbol revision specification is created again for the changed symbol.
FIG. 16 shows a symbol in which the difference information of symbols when the same symbol defined in the same file of both project assets has child symbols as described above and the comment information accompanying those symbols are described together. It is a figure which shows the example of the revision specification. As shown in FIG. 16, the symbol revision specification 86 also includes a header section 87, a comment section 88, and a symbol section 89. The header section 87 first describes the "symbol revision specification" and the specification name, and also has a project name column, a symbol name column, a type column, a pre-change update date and time column, and a post-change update date and time column.
The same contents as the header part 83 of the file revision specification 82 in Fig. 15 are described in the project name column, the update date and time column before change, and the update date and time column after change, and the symbol name "CEeeClass" is described in the symbol name column. Is described, and the type is described as "class" in the type column.
In addition, the comment section 88 is provided with a comment item column, a status column, a comment column before change, and a comment column after change from the left, and has the same column structure as in the case of the file revision specification 82. Further, the comment item column is also described as "summary", "creator", "function" and "change history" in order from the top, and has the same structure as the case of the file revision specification 82. The contents of the status column corresponding to the creator of these comment item columns and the change history, the comment column before change, and the comment column after change are also the same as in the case of the file revision specification 82. However, the comment corresponding to the outline and the function is different from the comment about the file in the case of the file revision specification 82 because it is the comment about the symbol.
That is, in the comment item "Summary", the state is "=", and the comment content is "manage the system state" both before and after the change. Also, when the comment item is "function", the state is "", and if the comment content is "2) insufficient of the comment texts 1) and 2) before the change, a new memory is acquired. After the change, a comment is added to the comment text of "2) ~. At that time, if there is a reusable memory, it will be used." By comparing the comments of the old and new features, the reason for the change in the source program becomes clearer.
In addition, the symbol section 89 is provided with a symbol name column, a symbol type column, and a status column, and the extracted child symbol names are listed as "m_Vall", ..., "M_Func4" in the symbol name column in order from the top. In the symbol type column corresponding to this, the symbol types are described as "member variables", ..., "Member functions" in order from the top. Then, in the status column corresponding to this, "same", ..., "Change" are described in order from the top.
This makes it easy to see which symbol the member variable or function displayed is added, deleted, or changed. Figure 17 shows the function revision specification that describes the difference information of the processing procedure when the same symbol defined in the same file of both project assets has the processing procedure and the comment information attached to those symbols. It is a figure which shows the example of. The function revision specification 91 shown in the figure is a revision specification created by changing the state of the symbol ReadData of the line number 85-8 of the symbol part 85 in FIG. 15 to change.
As shown in FIG. 17, this function revision specification 91 also includes a header section 92, a comment section 93, and a symbol section 94. In the header part 91, first, "function revision specification" and the specification name are described, and in addition, a project name column, a function name column, a type column, a pre-change update date and time column, and a post-change update date and time column are provided. The same contents as the header part 83 of the file revision specification 82 of FIG. 15 are described in the project name column, the update date and time column before the change, and the update date and time column after the change. Then, the function name "ReadData" is described in the function name column, and the type is described as "external function" in the type column.
In addition, the comment section 93 is provided with a comment item column, a status column, a comment column before change, and a comment column after change from the left, which also have the same column structure as in the case of the file revision specification 82. Further, the comment item column is also described as "summary", "creator", "function" and "change history" in order from the top, and has the same structure as the case of the file revision specification 82. The contents of the status column corresponding to the creator of these comment item columns and the change history, the comment column before change, and the comment column after change are also the same as in the case of the file revision specification 82.
In addition, in the comments corresponding to the comment items "Summary" and "Function", first, the state of "Summary" is "=" and the comment content is "Read data" both before and after the change. .. In "Function", the state is "", and the comment content is a new comment "3" between 3) and 4) of the four lines of comment sentences 1) to 4) before the change. -1) In the case of special records, "special processing is performed" has been added. In this case as well, the reason for the change in the source program can be clarified more clearly by comparing the comments of the old and new functions.
Then, in the symbol unit 94, the processing procedure column is divided into two on the left and right. That is, the processing procedure before the change is displayed on the left, and the processing procedure after the change is displayed on the right. Then, the background color of the processing procedure description part that has not been changed (for example, white) is different from the background color of the processing procedure description part 95 (95-1, 95-2) of the changed part (for example, yellow). Alternatively, it may be shaded).
Generally, changes include modification, deletion, and addition of contents, but the example shown in the figure is an additional example, and the processing procedure description part 95-1 before the change on the left is the description of the processing procedure. There is no, and the added processing procedure is described as "// 3-1) record ~ if (psz ~ Analy ~ (pszBuffer);" in the changed processing procedure description part 95-2 on the right. If this function revision specification 91 is a modification rather than an addition of a processing procedure, the processing procedure before and after the change is described in both the processing procedure description parts 95-1 and 95-2. If it is deleted, not added or modified, the deleted processing procedure is described in the processing procedure description part 95-1 on the left side, and nothing is described in the processing procedure description part 95-2 on the right side. Therefore, the difference between the processing procedure before and after the change can be seen at a glance.
In the comment group extraction process in the above-described embodiment, the method of extracting the comment group based on the three rules is limited to creating the two old and new program specifications for creating the above-mentioned revised specifications. Without this, it can be suitably used as a normal program specification creation method.
(Appendix 1) A source program analysis means for analyzing a source program and extracting components of the source program, and a comment extraction means for extracting comments to be displayed in the program specifications from comments inserted in the source program. , The project asset management means for storing the project assets including the source program, the components extracted by the source program analysis means, and the comments extracted by the comment extraction means, and the date and time saved by the project asset management means. The old and new source programs in the different project assets are extracted, the symbols defined in the old and new source programs are compared, and if there is a difference, the difference information of the symbols is extracted, and the old and new sources are extracted. When the comments attached to the same symbol of two source programs are compared and there is a difference, the difference analysis means for extracting the difference information of the comment and the revised specification based on the difference information detected by the difference analysis means. A program specification creation device characterized in that it is configured to include a revised specification generation means for generating. (Appendix 2) The program specification according to Appendix 1, wherein the difference analysis means detects difference information by comparing the child symbols when the same symbol of the old and new source programs has a child symbol. Writing device. (Appendix 3) The program specification described in Appendix 1 is characterized in that the difference analysis means detects difference information by comparing the processing procedures when the same symbol of the old and new source programs has a processing procedure. Writing device. (Appendix 4) The revised specification generation means is characterized in that a program specification including information on whether or not two old and new source programs exist in the source program is created based on the detection by the difference analysis means. The program specification creation device described in Appendix 1. (Appendix 5) The program specification creation device according to Appendix 1, wherein the revised specification generation means creates a program specification including the difference information of the comments based on the detection by the difference analysis means. (Appendix 6 ) The program specification creation device according to Appendix 1, wherein the revised specification generation means creates a program specification including the difference information of the symbols based on the detection by the difference analysis means. (Appendix 7) The program specification creation device according to Appendix 2, wherein the revised specification generation means creates a program specification including difference information of the child symbols based on the detection by the difference analysis means. .. (Appendix 8) The program specification creation device according to Appendix 3, wherein the revised specification generation means creates a program specification including difference information of the processing procedure based on the detection by the difference analysis means. .. (Appendix 9) Comments other than comments in which the same characters or symbols are consecutive by a predetermined number or more from comments inserted in the source program, and comments in which the same characters or symbols are consecutive by a predetermined number or more in a continuous comment line The comment described in the leftmost end of the program or the comment matching the keyword defined in the predetermined definition file is extracted as a comment keyword candidate extraction means, and the comment keyword candidate extraction means is extracted. A comment keyword setting means for selectively confirming a comment keyword candidate as a comment keyword, a comment keyword confirmation means for notifying and confirming a comment keyword determined by the comment keyword setting means by comparing it with the source program, and the like. A comment item extraction means that extracts comment items from the source program based on the comment keyword confirmed by the comment keyword confirmation means, and a program specification that generates a program specification based on the comment items extracted by the comment item extraction means. A program specification creation device characterized in that it is configured to include a document generation means. (Appendix 10) The program specification creation device according to Appendix 9, wherein the comment keyword candidate extraction means extracts comment keyword candidates for each language element of the program language in which the source program is described. (Appendix 11) Previous The comment keyword candidate extraction means is a program specification creation device described in Appendix 9, characterized in that a comment consisting of a description for classifying various comments is extracted as a comment keyword candidate. (Appendix 12) The definition file for defining the comment keyword of the comment having a high description frequency and the editing means for editing the definition file are further provided, and the comment keyword candidate extraction means provides a comment matching the contents of the definition file. The program specification creation device described in Appendix 9, which is characterized by extracting as a candidate for a comment keyword. (Appendix 13) The program specification creation according to Appendix 9 is characterized in that the comment keyword setting means includes display notification means for displaying or combining the extracted candidate comment keywords. apparatus. (Supplementary note 14) The program specification creation device according to Supplementary note 9, wherein the comment keyword setting means displays extracted candidates for the comment keyword in order of frequency of use. (Appendix 15) A source program analysis process that analyzes the source program and extracts the components of the source program, and a comment extraction process that extracts comments to be displayed in the program specifications from the comments inserted in the source program. , The project asset management process that stores the project assets including the source program, the components extracted by the source program analysis process, and the comments extracted by the comment extraction process, and the date and time saved by the project asset management process. The old and new source programs in the different project assets are extracted, the symbols defined in the old and new source programs are compared, and if there is a difference, the difference information of the symbols is extracted, and the old and new sources are extracted. When the comments attached to the same symbol of two source programs are compared and there is a difference, the difference analysis step that extracts the difference information of the comment and the revised specification based on each of the difference information detected by the difference analysis step. It consisted of a revised specification generation process to generate A method of creating program specifications, which is characterized by this. (Appendix 16) Comments other than comments in which the same characters or symbols are consecutive by a predetermined number or more from comments inserted in the source program, and comments in which the same characters or symbols are consecutive by a predetermined number or more in a continuous comment line The comment keyword candidate extraction process for extracting the comment described at the leftmost end of the program or the comment matching the keyword defined in the predetermined definition file as a comment keyword candidate, and the comment keyword candidate extraction process for extracting the comment keyword candidate. A comment keyword setting process for selectively confirming a comment keyword candidate as a comment keyword, a comment keyword confirmation process for notifying and confirming a comment keyword determined by the comment keyword setting process by comparing it with the source program, and the comment keyword confirmation process. A comment item extraction process that extracts comment items from the source program based on the comment keywords confirmed by the comment keyword confirmation process, and a program specification that generates a program specification based on the comment items extracted by the comment item extraction process. A program specification creation device characterized in that it is configured to include a document generation process. (Appendix 17) For a computer, a comment in which the same character or symbol is continuous by a predetermined number or more from a comment inserted in the source program, or a comment in which the same character or symbol in a continuous comment line is continuous by a predetermined number or more. The comment keyword candidate extraction function that extracts the comment described at the leftmost end of the comment other than the existing comment or the comment that matches the keyword defined in the predetermined definition file as a comment keyword candidate, and the comment keyword candidate extraction function. A comment keyword setting function that selectively confirms comment keyword candidates extracted by the function as a comment keyword, and a comment keyword that notifies and confirms the comment keyword confirmed by the comment keyword setting function by comparing it with the source program. Confirmation function and the comment keyword confirmation function A comment item extraction function that extracts comment items from the source program based on the comment keyword confirmed by, and a program specification generation function that generates a program specification based on the comment item extracted by the comment item extraction function. , A program specification creation program to realize. (Appendix 18) Program specification creation A recording medium in which a program is recorded so that it can be read by a computer, and comments in which the same characters or symbols are consecutive in a predetermined number or more from comments inserted in the source program, continuous comment lines. A comment that is described at the leftmost end of a comment other than a comment in which the same character or symbol is consecutive in a predetermined number or more, or a comment that matches the keyword defined in the predetermined definition file is used as a comment keyword candidate. It was confirmed that there is a function to extract, a function to selectively confirm the extracted candidate comment keyword as a comment keyword, and a function to notify and confirm the confirmed comment keyword by comparing it with the source program. Record a program specification creation program for causing a computer to execute a function of extracting comment items from the source program based on the comment keyword and a function of generating a program specification based on the extracted comment item. Recording medium.
<figref num="1">(a) is an operating principle diagram in the program specification creating device of the first invention, and (b) is an operating principle diagram in the program specification creating device of the second invention.</figref><figref num="2">It is a figure which shows the whole structure of the program specification making apparatus in one Embodiment.</figref><figref num="3">It is a main flowchart explaining the operation of the program specification creation process performed by the program specification creation apparatus.</figref><figref num="4">It is a flowchart which shows the process of steps S1 and S3 of a main flowchart in more detail.</figref><figref num="5">It is a figure which shows the file of the source program written in C ++ language as an example of the source program to be processed in the program specification creation process.</figref><figref num="6">(a) is a diagram showing an example of the definition symbol / start line correspondence data file obtained by the program language analysis process, and (b) is a diagram showing an example of the symbol / comment correspondence data file obtained by the comment group extraction process. is there.</figref><figref num="7">(a), (b), and (c) are diagrams showing examples of comment keyword candidates extracted from the symbol / comment compatible data file based on the first, second, and third rules, respectively.</figref><figref num="8">It is a figure which shows the example of the comment keyword candidate option definition file.</figref><figref num="9">(a) and (b) are data input dialog screens for setting keywords for comment extraction.</figref><figref num="10">(a) and (b) are data input dialog screens for setting keywords for comment extraction.</figref><figref num="11">This is a dialog screen for confirming the set keywords for extracting comments.</figref><figref num="12">(a), (b), and (c) are diagrams showing an example of a database constructed in a predetermined area of an external storage device by a group of comments extracted based on a comment extraction process, respectively.</figref><figref num="13">It is a figure which shows the example of the program specification generated in the program specification generation process.</figref><figref num="14">It is a figure which shows the example of the project composition revision specification which describes the composition difference information of old and new project assets by the revision specification generation processing.</figref><figref num="15">It is a figure which shows the example of the file revision specification which described together the symbol information difference information of the same file of the old and new project assets by the revision specification generation processing, and the comment information attached to the file.</figref><figref num="16">It is a figure which shows the example of the symbol revision specification which described the difference information of the child symbol of the same symbol of the old and new project assets by the revision specification generation processing, and the comment information attached to the symbol together.</figref><figref num="17">It is a figure which shows the example of the function revision specification which described the difference information of the processing procedure of the same symbol of the old and new project assets by the revision specification generation processing, and the comment information attached to the symbol together.</figref>
Code description
1 Source program analysis means 2 Comment extraction means 3 Project asset management means 4 Difference analysis means 5 Revised specification generation means 11 Comment keyword candidate extraction means 12 Comment keyword setting means 13 Comment keyword confirmation means 14 Comment item extraction means 15 Program specification generation Means 21 Display device 22 Input device 23 External storage device 24 Printing device 25 Computing device 31 Comment keyword setting unit 32 Comment extraction unit 33 Project asset management unit 34 Difference analysis unit 35 Specification generation unit 36 Specification printing unit 37 Source program file Example 38 Definition symbol / start line compatible data file 39 Symbol / comment compatible data file 39-1 Symbol name area 39-2 Type area 39-3 Comment group area 41 First comment keyword candidate file 41-1 Type area 41-2 Extracted comment keyword candidate area 42 Second comment keyword candidate file 42-1 Type area 42-2 Extracted comment keyword candidate area 43 Third comment keyword candidate area 43-1 Type area 43-2 Extracted comment Keyword candidate area 44 Comment keyword candidate option definition file 45 Extraction keyword setting screen 46 Type input window 47 Extraction keyword and comment item setting window 48 Extraction keyword candidate display window 49 Pull-down menu display button 51, 52 Data display window 53 Candidate list filter setting window 55 Extraction keyword Definition (addition) screen 56 Extraction keyword condition specification window 57 Comment item Condition specification window 58 OK button 59 Cancel button 61, 63 Check input line 62 Keyword display window 64 Item setting window 65 Pull-down menu display button 66 OK button 67 Extraction keyword confirmation Screen 68 Test button 69 Position indication mark 71 File Comment data file 72 Function comment data file 73 Class comment data file 74 Confirmation screen 75 Header part 76 Comment part 77 Scroll bar 78 Project configuration revision specifications 79 Header part 79-1 Specification name Column 79-2 Project name column 81 Data part 81-1 to 81-6 Data line 82 File revision specification 83 Header part 84 Comment part 85 Symbol part 86 Symbol revision specification 87 Header part 88 Comment part 89 Symbol part 91 Function revision specification 92 Header part 93 Comment part 94 Symbol part
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US8645908B2 | Cited by | United States of America | Applicant |
2 priority claims, no other members on record
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 2006083405 | Japan | A | |
| JP20060083405 | – | – | – |
4 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Decision of refusalA02 | A02 | |
| Written amendmentA521 | A521 | |
| Notification of reasons for refusalA131 | A131 | |
| Written request for application examinationA621 | A621 |
Numbers
- Publication
- 2006190332
- Publication, DOCDB
- 2006190332
- Publication, EPODOC
- JP2006190332
- Application
- 83405
- Application, DOCDB
- 2006083405
- Application, EPODOC
- JP20060083405
Titles3
- Japanese
- プログラム仕様書作成装置及びプログラム仕様書作成方法並びにプログラム仕様書作成プログラム
- English
- DEVICE, METHOD, AND PROGRAM FOR GENERATING PROGRAM SPECIFICATION
- English
- Program specification creation device, program specification creation method, and program specification creation program
Classification
- IPC, 2
- G06F9 44
- G06F17 30