Systems, survey methods, and survey programs
Patent Information
- Application Number
- JP2025035702
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2025-03-06
- Publication Date
- 2026-09-17
AI Technical Summary
【0009】 本開示に含まれるひとつの態様によれば、ソフトウェアと設計書の整合性を調査することが可能となる。
Smart Images

Figure 2026147660000001_ABST
Abstract
Description
[[Technical Field]]
[0001] The present disclosure relates to a technique for comparatively investigating software and design documents. [[Background Art]]
[0002] In software development, a design document is created along with the software itself. The content of the created design document and the operation of the software are consistent with each other. Since the source code of software is described in a programming language, it is not easy to understand unless one is a skilled person. On the other hand, since design documents are described in natural language, they are relatively easy to understand. Therefore, when modifying software or utilizing software as an asset for the development of other systems, design documents described in natural language are useful for knowing the functions and operations of the current software. For example, Patent Document 1 discloses a method that identifies the relationship between code descriptions and source code, generates a corpus using the code descriptions and source code, and enables searching for source code using a natural language search query. [[Prior Art Documents]] [[Patent Documents]]
[0003] [[Patent Document 1]] Japanese Unexamined Patent Publication No. 2022-115815 [[Summary of the Invention]] [[Problem to be Solved by the Invention]]
[0004] Software may be modified after it is created, for example, even during operation. It is common practice to maintain the design document when modifying software, but there are cases where the design document is not sufficiently maintained. In such a case, there is a possibility that inconsistency may arise between the operation of the software and the content of the design document. In addition, comments in the source code of software may also become inconsistent similarly to design documents.
[0005] One of the purposes included in this disclosure is to provide a technology that enables comparative analysis of software and design documents.
[0006] Another purpose included in this disclosure is to obtain a more consistent explanation of how the software works. [Means for solving the problem]
[0007] A system in one aspect included in this disclosure is: Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. Based on the description in the design document and the code description, comparison information between the software and the design document is generated. It is a system.
[0008] Systems in other forms included in this disclosure are Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. In order to use the expression used in the aforementioned design document, the processor performs at least one of the following: The natural language processing program is further trained to include descriptions that contain expressions used in the aforementioned design document. A knowledge database containing expressions used in the aforementioned design document is made accessible from the natural language processing program. The description including the expressions used in the aforementioned design document is included in the prompt as reference information. It is a system. [Effects of the Invention]
[0009] According to one aspect of this disclosure, it becomes possible to investigate the consistency between the software and the design document. [Brief explanation of the drawing]
[0010] [Figure 1] This is a block diagram showing a first example of the configuration of the evaluation server according to Embodiment 1. [Figure 2] This is a block diagram showing an example of a computer's hardware configuration. [Figure 3] This is a schematic diagram illustrating an example of how the evaluation server is used. [Figure 4] This is a diagram illustrating the overview of the processing of the evaluation server according to Embodiment 1. [Figure 5] This flowchart shows an example of processing by the evaluation server according to Embodiment 1. [Figure 6] This figure shows an example of source code in which the original comments related to Embodiment 1 have been removed. [Figure 7] This figure shows an example of design document information related to Embodiment 1. [Figure 8] This figure shows an example of source code with embedded comments relating to Embodiment 1. [Figure 9] This figure shows an example of a comparison table relating to Embodiment 1. [Figure 10] This is a block diagram showing a second example of the configuration of the evaluation server according to Embodiment 1. [Figure 11] It is a flow chart showing a second example of processing of the evaluation server according to Embodiment 1. [Figure 12] It is a block diagram showing a configuration example of the evaluation server according to Embodiment 2. [Figure 13] It is a flow chart showing an example of processing of the evaluation server according to Embodiment 2. DETAILED DESCRIPTION OF THE INVENTION
[0011] Hereinafter, embodiments of the present invention will be described with reference to the drawings. In the following embodiments, for the sake of simplification of description, the description will be focused on the following cases. However, as disclosed at the end of this specification, the present invention of the present application does not require the premise of the simplified description: *Example of natural language processing program: generative AI. *Format of generated code description: embedded as a comment in source code. Note that a comment is a character string including a symbol (token) and text (a code description in this case) such as "#", " / / ", " / * * / ". *Software design document: a document (electronic data) describing the software using natural language. *Source code input to generative AI: uncommented source code obtained by removing comments originally attached to the source code. *Comparison information: comparison information as a "table" as shown in FIG. 9.
[0012] <<Embodiment 1>> <Configuration of Evaluation Server> FIG. 1 is a block diagram showing a first example of the configuration of the evaluation server 10 according to Embodiment 1.
[0013] Since source code 22 is created based on design document information 21, initially, design document information 21 and source code 22 are consistent. However, if subsequent modifications to source code 22 are not reflected in design document information 21, inconsistencies may arise between design document information 21 and source code 22. The evaluation server 10 has a function to evaluate the consistency between source code 22 and design document information 21.
[0014] The evaluation server 10 includes a storage unit 20 and a data processing unit 30.
[0015] The memory unit 20 stores design document information 21, source code 22, and additional training data 23.
[0016] Design document information 21 is a software design document written in natural language. Design document information 21 contains descriptions at the level of a detailed design document, for example, in a waterfall model.
[0017] Source code 22 is the source code for the software corresponding to the design information 21, and is written in a programming language. The programming language can be any language, such as Python, Java (registered trademark), or C.
[0018] The additional training data 23 is data used to train the generation AI included in the comment generation unit 32 to add comments to the source code 22 using the expressions described in the design document information 21. For example, the additional training data 23 includes the correspondence between the descriptions in the design document information 21 and the descriptions in the source code 22 at a stage where consistency is maintained.
[0019] The generative AI is constructed using known technologies such as LLM (Large Language Model), and basic learning regarding natural language has already been performed. Furthermore, the generative AI may be capable of additional learning, support RAG (Retrieval-Augmented Generation), and support few-shot learning. As will be understood from the following explanation, each embodiment disclosed herein may substitute the generative AI with a program belonging to the natural language processing program. The generative AI is also an example of a natural language processing program from the perspective of processing prompts written in natural language. As will be explained later, each embodiment discloses a method for having the generative AI consider expressions used in the design document. Therefore, in other words, the generative AI before this method is implemented is more effective when it has not learned about "expressions used in the design document," or when it has learned about such expressions but they have a lower priority than general expressions.
[0020] The data processing unit 30 processes various data held by the evaluation server 10. Functionally, the data processing unit 30 includes an input receiving unit 31, a comment generation unit 32, a learning unit 33, an evaluation unit 34, and a display unit 35.
[0021] The input receiving unit 31 receives input or instructions from the user.
[0022] The comment generation unit 32 includes the functionality of a generation AI, generates comments using the expressions used in the design document information 21, and adds the generated comments to the source code 22. Alternatively, the comment generation unit 32 may not include the functionality of a generation AI, and may utilize a generation AI provided by an external computer as needed.
[0023] The learning unit 33 performs tasks such as training the generation AI included in the comment generation unit 32. For example, the learning unit 33 uses the additional training data 23 to train the generation AI included in the comment generation unit 32.
[0024] The evaluation unit 34 evaluates the consistency between the comments added to the source code 22 and the descriptions in the design document information 21.
[0025] The display unit 35 displays the evaluation results of the consistency between the comments added to the source code 22 by the evaluation unit 34 and the description in the design document information 21, for example, as a comparison table 100 (see Figure 9).
[0026] Figure 2 is a block diagram showing an example of the hardware configuration of computer 1000. The evaluation server 10 shown in Figure 1 may be configured with the computer shown in Figure 2.
[0027] The computer 1000 comprises a processor 1001, a main memory 1002, an auxiliary memory 1003, an input device 1004, an output device 1005, and a communication device 1006.
[0028] The processor 1001 implements the functions of the evaluation server 10 by reading and executing programs stored in the main memory 1002 or auxiliary memory 1003. The processor 1001 may include a CPU (Central Processing Unit), a GPU (Graphics Processing Unit), and / or an NPU (Neural Processing Unit). However, the processor 1001 is not limited to these examples and may be any other semiconductor device that performs a predetermined process. For example, the processor 1001 implements the functions of the input receiving unit 31, comment generation unit 32, learning unit 33, evaluation unit 34, and display unit 35 included in the data processing unit 30 shown in Figure 1. Therefore, in the following description, processing mainly performed by the input receiving unit 31, comment generation unit 32, learning unit 33, evaluation unit 34, or display unit 35 may be read as processing mainly performed by the processor 1001.
[0029] The main memory 1002 is composed of volatile and / or non-volatile storage media and stores programs and data read from the processor 1001.
[0030] The auxiliary storage device 1003 is composed of a non-volatile storage medium and stores programs and data. Examples of the auxiliary storage device 1003 include SSDs (Solid State Drives), flash memory, and HDDs (Hard Disk Drives).
[0031] The memory unit 20 shown in Figure 1 is implemented by the main memory 1002 and / or the auxiliary memory 1003. In other words, the design information 21, source code 22, and additional learning data 23 shown in Figure 1 are stored in the main memory 1002 and / or the auxiliary memory 1003. As the implementation of the memory unit 20 is as described above, the memory unit 20 may be read as a memory hierarchy. The memory hierarchy may consist of either the main memory 1002 or the auxiliary memory 1003 alone.
[0032] The input device 1004 is a device that receives input from the user. Examples of the input device 1004 include a keyboard, mouse, touchpad, touch panel, microphone, etc. The input receiving unit 31 shown in Figure 1 may receive input from the user through the input device 1004.
[0033] The output device 1005 is a device that outputs the generated information. Examples of the output device 1005 include a display, a speaker, etc. The display unit 35 shown in Figure 1 may display information and images on the output device 1005 (display).
[0034] The communication device 1006 controls the transmission and reception of information via the communication network 12 (see Figure 3) to which the computer 1000 (evaluation server 10) is connected. Examples of the communication device 1006 include a Network Interface Card (NIC), a mobile communication chip, and a wireless communication chip.
[0035] Figure 3 is a schematic diagram showing an example of how the evaluation server 10 is used.
[0036] The evaluation server 10 may be connected to a communication network 12, as shown in Figure 3. The communication network 12 may include a wired LAN, a wireless LAN, the Internet, and / or a mobile communication network.
[0037] Users may use the evaluation server 10 through a terminal 11 connected to the communication network 12. Examples of terminals 11 include PCs, tablet devices, smartphones, etc.
[0038] Furthermore, users may use the evaluation server 10 directly without going through terminal 11 and communication network 12.
[0039] <Processing by the evaluation server> Figure 4 is a diagram illustrating the overview of the processing of the evaluation server 10 according to Embodiment 1.
[0040] The learning unit 33 trains the comment generation unit 32 (generation AI) on the correspondence between the design document information 21 and the source code 22 that is consistent with the design document. The learning unit 33 may generate a prompt for this training and perform training on the comment generation unit 32.
[0041] The comment generation unit 32 uses a trained generation AI to generate comments (hereinafter sometimes referred to as AI-generated comments) that use expressions found in the design document information 21, and adds them to the source code 22. This generates source code 22 with AI-generated comments based on the design document information 21 embedded within it.
[0042] The evaluation unit 34 creates a comparison table 100 (see Figure 9) that associates the AI-generated comments generated by the comment generation unit 32 with the contents described in the design document information 21.
[0043] The display unit 35 displays the comparison table 100 (see Figure 9).
[0044] Figure 5 is a flowchart showing an example of processing by the evaluation server 10 according to Embodiment 1. Figure 6 is a diagram showing an example of source code 22 in which the original comments (corresponding to the original comments described later) according to Embodiment 1 have been deleted. Figure 7 is a diagram showing an example of design document information 21 according to Embodiment 1. Figure 8 is a diagram showing an example of source code 22 in which AI-generated comments according to Embodiment 1 have been embedded. Figure 9 is a diagram showing an example of a comparison table according to Embodiment 1. Next, the processing of the evaluation server 10 will be explained with reference to Figures 4 to 9.
[0045] The learning unit 33 performs additional training on the generation AI included in the comment generation unit 32 using additional training data 23, which includes, for example, the correspondence between the source code 22 shown in Figure 6 and the design document information 21 shown in Figure 7 (S101). In other words, the learning unit 33 performs so-called fine-tuning on the generation AI. As a result, the generation AI is fine-tuned to suit the task of creating comments.
[0046] The comment generation unit 32 creates a prompt (S102) that includes an instruction to generate comments for the uncommented source code 22 (see Figure 6) using the expressions used in the design document information 21. For example, the comment generation unit 32 creates a prompt that includes the instruction, "Please embed comments in the source code using the expressions from the additionally learned design document information." Since the uncommented source code 22 is generated before step S102, the prompt in step S102 can also be said to have the meaning of generating comments summarizing the processing of the code portion of the source code. The "code portion" broadly refers to the part of the source code other than the comments. More specifically, the code portion refers to the part of the source code that affects execution when the source code is converted into an executable file and executed on a computer (or when the source code is executed by an interpreter). Note that Python's import statements and C language's #include statements can affect execution, but they can be compensated for by other parts of the source code. Because of these examples, the code portion may be defined as the part of the source code excluding comments and lines of a certain type (for example, the import statements mentioned above). Similarly, certain types of lines may be defined as the code portion. Although not explicitly stated in the computer language, any notation intended to be a comment may be treated as a comment. For example, the notation "dummy="TEST COMMENT"" which assigns the content of a comment (code explanation) to a variable that is not actually used is an example.
[0047] The comment generation unit 32 may also create a prompt that includes an instruction to prioritize referencing the additional training data 23 and generate comments for the uncommented source code 22. By pre-training the design document information 21 in step S101 and generating such a prompt, it becomes easier to operate as it is not necessary to input the design document information 21 each time the consistency between the source code 22 (software) and the design document information 21 is checked. As mentioned above, the comments generated by instructing the generation AI with a prompt are the AI-generated comments.
[0048] First, the comment generation unit 32 removes the original comments that were originally written in the source code 22, generating commentless source code 22 as illustrated in Figure 6. Next, the comment generation unit 32 inputs the prompt created in step S102 to the generation AI, causing the generation AI to generate AI-generated comments to be embedded in the commentless source code 22. This allows the generation AI to easily generate appropriate comments for the source code 22. Next, the comment generation unit 32 embeds the AI-generated comments in the corresponding locations of the commentless source code 22, generating commented source code 22 as shown in Figure 8 (S103). In Figure 8, the underlined strings starting with # are the embedded comments.
[0049] The evaluation unit 34 generates comparison information between the generated AI-generated comments and the descriptions in the design document information 21, and measures the degree of consistency (more precisely, the degree of consistency between the generated AI comments and the descriptions in the design document information 21) based on this comparison information, for example using the generating AI (S104). For example, the evaluation unit 34 inputs a prompt to the generating AI saying, "Generate a comparison table between the comments embedded in the source code above and the descriptions in the design document information." Alternatively, it inputs a prompt to the generating AI saying, "Generate a comparison table between the comments embedded in the source code above and the descriptions in the design document information, and highlight the inconsistent parts." As a result, the generating AI generates a comparison table 100, for example, as shown in Figure 9, which associates the parts of the descriptions in the design document information 21 with the parts of the comments in the AI-generated comments that are added to the parts of the descriptions in the commentless source code 22. The display unit 35 may display this generated comparison table 100. Furthermore, the evaluation unit 34 may generate information indicating the degree of consistency based on the comparison table. This information, for example, is the number of parts that the evaluation unit 34 determined to be inconsistent. Information indicating the degree of consistency may be displayed.
[0050] In this way, the AI-generated comments generated based on the actual software source code 22 can be compared with the design document information 21. Furthermore, by providing a comparison table 100 that compares parts of the design document information 21 with parts of the AI-generated comments generated by the AI, as shown in Figure 9, the user of this embodiment can easily verify the consistency of each part of the design document information 21 with the software. Moreover, by displaying information indicating the degree of consistency, the user can verify the consistency even more easily.
[0051] The input receiving unit 31 may prompt the user to limit the scope of the design document information 21 and accept the user's specification of that limited scope. Then, in step S102, the comment generation unit 32 may generate a prompt that includes an instruction to use expressions used within the scope of the design document information 21 specified by the user. By limiting the scope of use of the design document information 21 in this way, it becomes possible for the generation AI to create an appropriate AI-generated comment.
[0052] Furthermore, the input receiving unit 31 may extract symbols representing variables or functions included in the source code 22, prompt the user to associate at least one of the symbols with a natural language phrase used in the design document information 21, and accept the association between symbols and phrases from the user. Then, in step S102, the comment generation unit 32 may generate rule information for associating symbols and phrases, and generate a prompt that further includes the rule information. In this way, by associating variable names and function names that are difficult for the generating AI to guess with the descriptions in the design document information 21 using a rule basis, it becomes possible for the generating AI to create appropriate AI-generated comments.
[0053] Furthermore, the evaluation unit 34 may determine whether the corresponding descriptive and comment portions in the comparison table 100 are consistent with each other, and may display the inconsistent descriptive and comment portions in a way that distinguishes them from other portions. This allows the user to easily identify the parts of the design document information 21 where the descriptive portion in the design document information 21 and the AI-generated comments generated by the AI are inconsistent, thus enabling the user to easily identify the parts of the design document information 21 that differ from the software.
[0054] The evaluation unit 34 may perform the evaluation in step S104 without using the generated AI. For example, the evaluation unit 34 may decompose the design document information 21 into word groups, compare the generated AI-generated comments with the word groups to extract the differences, and determine that there is an inconsistency if the number of differences exceeds a predetermined threshold.
[0055] Figure 10 is a block diagram showing a second example of the configuration of the evaluation server 10 according to Embodiment 1.
[0056] Compared to the first example evaluation server 10 shown in Figure 1, the second example evaluation server 10 shown in Figure 10 differs in that the storage unit 20 holds a RAG input database 24. Other components are as described in Figure 1, so their explanation is omitted here.
[0057] The RAG input database 24 has source code 22 and design document information 21 registered as search targets. Note that the RAG input database 24 may also be interpreted as a search-extended knowledge database.
[0058] Figure 11 is a flowchart showing a second example of the processing of the evaluation server 10 according to Embodiment 1. Next, referring to Figure 11, the processing of the evaluation server 10 in the second example shown in Figure 10 will be described.
[0059] The learning unit 33 constructs a RAG input database 24 from, for example, the source code 22 shown in Figure 6 and the design document information 21 shown in Figure 7, and adds it to the generation AI of the comment generation unit 32 as a search base (S201).
[0060] The comment generation unit 32 creates a prompt containing an instruction that prioritizes referencing the RAG input database 24 to generate AI-generated comments for the uncommented source code 22 (S202). For example, the comment generation unit 32 creates a prompt that says, "Prioritize referencing the design document information representation in the RAG input database and embed comments in the source code."
[0061] The comment generation unit 32, similar to step S103, removes the original comments from the source code 22 to generate comment-free source code 22. Next, the comment generation unit 32 inputs the prompt created in step S202 to the generation AI, causing the generation AI to embed AI-generated comments into the comment-free source code 22 (S203).
[0062] Similar to step S104, the evaluation unit 34 generates comparison information between the generated AI-generated comments and the description in the design document information 21, and measures the degree of consistency (more precisely, the degree of consistency between the generated AI comments and the description in the design document information 21) based on this comparison information, for example using the generated AI (S204). Then, the display unit 35 displays the comparison table 100 and the information on the degree of consistency.
[0063] According to the above process, the design document information 21 is pre-stored in the RAG input database 24, so it is not necessary to input the design document information 21 each time the consistency between the source code 22 and the design document information 21 is checked, making the operation easy.
[0064] (Embodiment 2) Figure 12 is a block diagram showing an example configuration of the evaluation server 10 according to Embodiment 2.
[0065] Compared to the evaluation server 10 according to Embodiment 1 shown in Figure 1, the evaluation server 10 according to Embodiment 2 shown in Figure 12 differs in that the storage unit 20 does not have additional learning data 23. In Embodiment 2, a method for adding AI-generated comments to the source code 22 using so-called few-shot learning will be described, similar to Embodiment 1. Note that the components of the evaluation server 10 shown in Figure 12 are almost the same as the components of the evaluation server 10 shown in Figure 1, so they are given the same reference numerals as in Figure 1 and their explanation is omitted.
[0066] Figure 13 is a flowchart showing an example of the processing of the evaluation server 10 according to Embodiment 2.
[0067] The comment generation unit 32 creates a prompt that includes an instruction statement that instructs the generation of comments for the uncommented source code 22 using the expressions used in the design document information 21, and a description of the design document information 21 to be referenced (i.e., an example for few-shot learning) (S301). For example, the comment generation unit 32 creates a prompt that says, "Please embed comments in the source code 22 using the expressions of the design document information below," and (an example of the correspondence between the description of the source code 22 for few-shot learning and the notation of the design document information).
[0068] The comment generation unit 32, similar to step S103, removes the original comments from the source code 22 to generate comment-free source code 22. Next, the comment generation unit 32 inputs the prompt created in step S301 to the generation AI, causing the generation AI to embed AI-generated comments into the comment-free source code 22 (S302).
[0069] Similar to step S104, the evaluation unit 34 generates comparison information between the generated AI-generated comments and the description in the design document information 21, and measures the degree of consistency (more precisely, the degree of consistency between the generated AI comments and the description in the design document information 21) based on this comparison information, for example using the generated AI (S303). The display unit 35 then displays the comparison table 100 and the information on the degree of consistency.
[0070] According to the above process, when checking the consistency between the source code 22 and the design document information 21, the description to be referenced in the design document information 21 is specified, so it can be expected that the consistency between the source code 22 and the design document information 21 can be checked with high accuracy.
[0071] The embodiments of the present invention described above are illustrative for the purpose of explaining the present invention and are not intended to limit the scope of the present invention to those embodiments only. Those skilled in the art can implement the present invention in various other forms without departing from the scope of the present invention. For example, in the embodiments described above, the evaluation server 10 is shown to be implemented on one computer, but the evaluation server 10 may be implemented on multiple computers.
[0072] (Variations) The following variations of the embodiments described above may also be performed. *Instead of deleting comments, you can include instructions to ignore comments in the prompt as an alternative to creating comment-free source code. *It is not necessary to delete all comments in the source code. For example, comments intended for managing source code versions, such as CVS or RCS comments, are not relevant to this purpose and do not include explanatory text describing the processing overview, so they do not need to be deleted. Also, if source code 22 originally did not contain any comments, then source code 22 corresponds to the source code from which the original comments described above were deleted. Therefore, the deletion of comments disclosed in this embodiment is not mandatory. *The comment generation unit 32 generates a code description, which is a descriptive text explaining the processing overview of the code portion of the source code. However, it is not necessary to convert this code description into a comment with a comment symbol (token) attached and embed it in the source code. What is needed is the code description itself, not the comment symbol or token. If the code description is not embedded in the source code, it is possible to store correspondence information between the code description and the code portion (for example, information indicating which part of the code portion the description refers to), but this is not mandatory. *Generating comparative information is not mandatory. If the design document uses special terminology within the department or division that generates the design document, or if general terms are given special meanings, simply generating code descriptions (and comments) using the process described above will result in code descriptions that are highly readable and useful for that department or division. *The evaluation server 10 does not need to perform the aforementioned "function to evaluate consistency" or "generation of information indicating the degree of consistency." As mentioned above, it may be limited to the generation of comparison information, which is a preliminary step to consistency evaluation, and as mentioned above, the generation of comparison information is not mandatory. *While we have previously used the design document descriptions as the basis for comparison, we can instead use the original comments included in the source code as the basis for comparison. This allows us to verify the consistency between the original comments and the source code. To achieve this, simply replace the sections in the previously described embodiments that used the design document descriptions with original comments. Furthermore, the above-described embodiment includes the following:
[0073] (Item A1) Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. Based on the description in the design document and the code description, comparison information between the software and the design document is generated. system. (Matter A2) The system described in item A1, The aforementioned source code includes one or more comments, As for generating the prompt, the processor: A comment-free source code is generated by removing at least some of the comments from the aforementioned source code. The prompt is generated based on the uncommented source code and the design document. system. (Matter A3) The system described in item A1, The aforementioned source code includes one or more comments, The prompt includes an instruction to ignore the comment and create the code description, system. (Matter A4) The system described in item A1, The prompt includes an instruction to generate comments for the source code using expressions used within the scope specified by the user in the design document. system. (Item A5) The system described in item A1, As for generating the prompt, the processor: Extract the symbols representing variables or functions contained in the aforementioned code section, The user is prompted to associate at least one of the symbols with a natural language phrase used in the design document. The association between the aforementioned symbol and the aforementioned phrase is received from the user. A rule information is generated that associates the aforementioned symbol with the aforementioned phrase. The aforementioned rule information is further included in the prompt generated. system. (Matter A6) The system described in item A1, The memory hierarchy further stores additional training data, where the additional training data is data created based on the software's source code and design documents from a past point in time when consistency was maintained. Before generating the prompt, the processor further trains the natural language processing program with the additional training data. system. (Matter A7) The system described in item A1, The aforementioned memory hierarchy further stores a knowledge database, where the knowledge database is data created based on the source code and design documents of the software at a consistent point in the past. Before generating the prompt, the processor configures the natural language processing program to be able to access the knowledge database. system. (Matter A8) The system described in item A1, The design document includes one or more descriptions relating to the processing of the software, As for generating the prompt, the processor: Identify the description in the design document that corresponds to a part of the code portion of the source code, The prompt is generated, which includes the code portion of the source code and the description as reference information. system. (Item A15) Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. In order to use the expression used in the aforementioned design document, the processor performs at least one of the following: The natural language processing program is further trained to include descriptions that contain expressions used in the aforementioned design document. A knowledge database containing expressions used in the aforementioned design document is made accessible from the natural language processing program. The description including the expressions used in the aforementioned design document is included in the prompt as reference information. system.
[0074] (Item B1) Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software is stored in the storage hierarchy, The system or an external computer runs a natural language processing program which generates a code description for the source code using the same expressions as the original comments in the source code, by prompting the program to generate the code description, wherein the code description is a description of the processing overview of the code portion of the source code. Based on the aforementioned original comments and the aforementioned code description, comparative information between the software and the design document is generated. system. (Item B2) The system described in item B1, The aforementioned source code includes one or more comments, As for generating the prompt, the processor: A comment-free source code is generated by removing at least some of the original comments from the aforementioned source code. The prompt is generated based on the uncommented source code and the design document. system. (Item B3) The system described in item B1, The aforementioned source code includes one or more comments, The prompt includes an instruction to create the code description while ignoring the original comment, system. (Item B4) The system described in item B1, The prompt includes an instruction to generate comments for the source code using expressions used within the scope specified by the user in the design document. system. (Item B5) The system described in item B1, As for generating the prompt, the processor: Extract the symbols representing variables or functions contained in the aforementioned code section, The user is prompted to associate at least one of the symbols with a natural language phrase used in the original comment. The association between the aforementioned symbol and the aforementioned phrase is received from the user. A rule information is generated that associates the aforementioned symbol with the aforementioned phrase. The aforementioned rule information is further included in the prompt generated. system. (Item B6) The system described in item B1, The aforementioned memory hierarchy further stores additional training data, where the additional training data is data created based on the source code and original comments of the software at a past point in time when consistency was maintained. Before generating the prompt, the processor further trains the natural language processing program with the additional training data. system. (Item B7) The system described in item B1, The aforementioned memory hierarchy further stores a knowledge database, where the knowledge database is data created based on the source code and original comments of the software at a consistent point in the past. Before generating the prompt, the processor configures the natural language processing program to be able to access the knowledge database. system. (Item B8) The system described in item B1, The design document includes one or more descriptions relating to the processing of the software, As for generating the prompt, the processor: Identify the original comment corresponding to a portion of the source code, The prompt is generated, which includes the code portion of the source code and the description as reference information. system. (Matter B9) The system described in item B1 consists of one or more computers. The aforementioned natural language processing program is a generative AI program. The generated code description is generated as text within the comments of the source code. system. (Item B15) Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software is stored in the storage hierarchy, By prompting a program to generate a code description for the source code using the expressions used in the original comments, the system or an external computer executes a natural language processing program to generate the code description, wherein the code description is a description of the processing overview of the code portion of the source code. In order to use the expression used in the original comment, the processor does at least one of the following: The natural language processing program is further trained to include descriptions that contain expressions used in the aforementioned original comments. The knowledge database containing the expressions used in the original comment is made accessible to the natural language processing program. The description containing the expression used in the original comment is included in the prompt as reference information. system. [Explanation of Symbols]
[0075] 10…Evaluation server, 11…Terminal, 12…Communication network, 20…Storage unit, 21…Design document information, 22…Source code, 23…Additional learning data, 24…RAG input database, 30…Data processing unit, 31…Input reception unit, 32…Comment generation unit, 33…Learning unit, 34…Evaluation unit, 35…Display unit, 100…Computer, 1000…Computer, 1001…Processor, 1002…Main memory, 1003…Auxiliary memory, 1004…Input device, 1005…Output device, 1006…Communication device
Claims
1. Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. Based on the description in the design document and the code description, comparison information between the software and the design document is generated. system.
2. The system according to claim 1, The aforementioned source code includes one or more comments, As for generating the prompt, the processor: A comment-free source code is generated by removing at least some of the comments from the aforementioned source code. The prompt is generated based on the uncommented source code and the design document. system.
3. The system according to claim 1, The aforementioned source code includes one or more comments, The prompt includes an instruction to ignore the comment and create the code description, system.
4. The system according to claim 1, The prompt includes an instruction to generate comments for the source code using expressions used within the scope specified by the user in the design document. system.
5. The system according to claim 1, As for generating the prompt, the processor: Extract the symbols representing variables or functions contained in the aforementioned code section, The user is prompted to associate at least one of the symbols with a natural language phrase used in the design document. The association between the aforementioned symbol and the aforementioned phrase is received from the user. A rule information is generated that associates the aforementioned symbol with the aforementioned phrase. The aforementioned rule information is further included in the prompt generated. system.
6. The system according to claim 1, The memory hierarchy further stores additional training data, where the additional training data is data created based on the software's source code and design documents from a past point in time when consistency was maintained. Before generating the prompt, the processor further trains the natural language processing program with the additional training data. system.
7. The system according to claim 1, The aforementioned memory hierarchy further stores a knowledge database, where the knowledge database is data created based on the source code and design documents of the software at a consistent point in the past. Before generating the prompt, the processor configures the natural language processing program to be able to access the knowledge database. system.
8. The system according to claim 1, The design document includes one or more descriptions relating to the processing of the software, As for generating the prompt, the processor: Identify the description in the design document that corresponds to a part of the code portion of the source code, The prompt is generated, which includes the code portion of the source code and the description as reference information. system.
9. The system described in claim 1 is composed of one or more computers, The aforementioned natural language processing program is a generative AI program, The generated code description is generated as text within the comments of the source code. system.
10. Memory hierarchy, Processor and A method that is performed on a system having, The aforementioned processor: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. Based on the description in the design document and the code description, comparison information between the software and the design document is generated. method.
11. The method according to claim 10, The design document includes one or more descriptions relating to the processing of the software, The aforementioned processor: Based on the description in the design document and the code description, compare information is generated or generated by the natural language processing program. method.
12. The method according to claim 10, The prompt includes an instruction to generate comments for the source code using expressions used within the scope specified by the user in the design document. method.
13. The method according to claim 10, As for generating the prompt, the processor: Extract the symbols representing variables or functions contained in the aforementioned code section, The user is prompted to associate at least one of the symbols with a natural language phrase used in the design document. The association between the aforementioned symbol and the aforementioned phrase is received from the user. A rule information is generated that associates the aforementioned symbol with the aforementioned phrase. The aforementioned rule information is further included in the prompt generated. method.
14. A program that causes the system to execute the method according to any one of claims 10 to 13.
15. Memory hierarchy, Processor and A system having, The aforementioned processor is: The source code of the specified software and the design document of the software expressed in natural language are stored in the memory hierarchy. By prompting a program to generate a code description for the source code using the same terminology as used in the design document, the system or an external computer runs a natural language processing program which generates the code description, wherein the code description is a description of the processing overview of the code portion of the source code. In order to use the representation used in the aforementioned design document, the processor performs at least one of the following: The natural language processing program is further trained to include descriptions that contain expressions used in the aforementioned design document. A knowledge database containing expressions used in the aforementioned design document is made accessible from the natural language processing program. The description including the expressions used in the aforementioned design document is included in the prompt as reference information. system.
Citation Information
Patent Citations
Semantic code search based on augmented programming language corpus
JP2022115815A