Source code analysis support system and method

The source code analysis support system addresses the inadequacies of existing methods by iteratively verifying and refining specification data and codes, ensuring accurate and detailed deciphering of system processes and generating readable documents.

JP2025110704AActive Publication Date: 2025-07-29HITACHI SOLUTIONS WEST JAPAN LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2024004688
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2024-01-16
Publication Date
2025-07-29
Estimated Expiration
2044-01-16

AI Technical Summary

Technical Problem

Existing methods for deciphering specifications from source code, such as those described in Patent Document 1, are inadequate due to the lack of accurate and detailed comment sentences, leading to insufficient accuracy in identifying the actual processes implemented in a system compared to the assumed specifications.

Method used

A source code analysis support system that includes a generation unit to create specification data and evaluation source code, a verification unit to perform first and second verifications using test codes, and a reception unit to provide a user interface, ensuring accurate deciphering of specifications by iteratively refining the generated data and codes to meet predetermined conditions.

Benefits of technology

Enables precise decoding of implemented processes from source code, identifying errors and surplus parts, and generating highly readable specification documents, thereby improving the accuracy of system development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025110704000001_ABST
    Figure 2025110704000001_ABST
Patent Text Reader

Abstract

To support deciphering of specifications for an information processing system from a source code with sufficient accuracy.SOLUTION: A source code analysis support system comprises: a generation unit for generating specification data from a source code, and generating an evaluation source code and an evaluation test code from the specification data; a verification unit for verifying the source code using a test code; and a reception unit for providing a user interface. The reception unit accepts input of a target source code, the generation unit generates the specification data, the evaluation source code, and the evaluation test code based on the target source code, the verification unit performs a first verification for verifying the evaluation source code using a target test code for verifying the target source code, and a second verification for verifying the target source code using the evaluation test code, and the reception unit outputs information on specifications based on the specification data for which verification results of the first verification and the second verification satisfy prescribed conditions.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a technique for assisting in the analysis of source code of an information processing system.

Background Art

[0002] In recent years, in the scene of developing an information processing system (hereinafter also simply referred to as "system"), there is an existing system (hereinafter also referred to as "legacy system") that has been developed and operated in the past, and when developing a new system by migrating from the legacy system, it is often the case. In that case, in order to develop a new system considering the processes executed in the legacy system, it first starts with investigating the processes implemented in the legacy system.

[0003] In the investigation, the content of the design document of the legacy system is confirmed. However, since the legacy system has been repeatedly modified for processes and bug fixes during operation, there are often discrepancies between the design document and the actually implemented processes.

[0004] In addition, in the case of an old legacy system such as a host computer, the design document may be handwritten. Handwritten design documents may be lost during storage, or the content may become illegible due to damage, etc., and it may be difficult to grasp accurate design information from the design document.

[0005] Therefore, not only the content of the design document is confirmed, but it is often necessary to decipher the actually implemented processes from the source code of the actually operating system and check whether there are differences between the specifications assumed from the design document and the actually implemented processes.

[0006] The task of deciphering the processes implemented from the source code is a significant burden in system development. In this regard, Patent Document 1 discloses a method for extracting specifications from the comment sentences included in the source code.

Prior Art Documents

Patent Documents

[0007]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0008] In order to confirm the differences between the specifications assumed from the design documents and the processes actually implemented in the system, it is required to decipher the processes implemented in the system from the source code with sufficient accuracy. According to the method of Patent Document 1, specifications can be extracted from the comment sentences included in the source code, but accurate and detailed comment sentences are not necessarily described in the source code. Therefore, there are cases where the processes cannot be deciphered with sufficient accuracy from the comment sentences.

[0009] One object included in the present disclosure is to provide a technique for assisting in deciphering the specifications of an information processing system from source code with sufficient accuracy.

Means for Solving the Problems

[0010] A source code analysis system according to one aspect included in the present disclosure is a source code analysis support system that supports the analysis of source code of an information processing system, and includes: a generation unit that generates specification data representing the specifications of the source code from the source code, and generates, from the specification data, an evaluation source code that reflects the specifications of the specification data and an evaluation test code for verifying the evaluation source code; a verification unit that verifies the source code using the test code; and a reception unit that provides a user interface, wherein the reception unit receives input of a target source code to be analyzed, the generation unit generates the specification data, the evaluation source code, and the evaluation test code based on the target source code, the verification unit performs a first verification that verifies the evaluation source code using the target test code for verifying the target source code, and a second verification that verifies the target source code using the evaluation test code, and the reception unit outputs specification information based on specification data for which the verification results of the first and second verifications satisfy predetermined conditions. [Effects of the Invention]

[0011] According to one aspect of the present disclosure, it becomes possible to decipher with sufficient accuracy the processes implemented in an information processing system from the source code. [Brief description of the drawings]

[0012]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Embodiments for Carrying Out the Invention

[0013] Hereinafter, embodiments of the present invention will be described with reference to the drawings.

[0014] FIG. 1 is a block diagram of the source code analysis support system according to this embodiment.

[0015] The source code analysis support system 10 is a system that supports the work of analyzing the source code of an existing information processing system and decoding the specifications. Hereinafter, the information processing system to be analyzed may be referred to as the target system, and the source code to be analyzed may be referred to as the target source code. Note that the specifications here are the specifications of the software implemented in the information processing system. The level of the specifications is not particularly limited. For example, the description content of a program design document that describes functions, variables, classes, constants, detailed flows, etc. at a level that can be actually implemented as a software program may be used as the specifications.

[0016] Referring to FIG. 1, the source code analysis support system 10 includes a reception server 11, a generation server 12, a formatting server 15, a test execution server 16, and a test environment 17. The generation server 12 includes a specification generation unit 13 and a code generation unit 14. The reception server 11, the generation server 12, the formatting server 15, the test execution server 16, and the test environment 17 are, as hardware, computers including a storage device and a processor, and are realized by the processor executing a software program stored in the storage device. The reception server 11, the generation server 12, the formatting server 15, the test execution server 16, and the test environment 17 may each be configured by a separate computer, or some or all of them may be implemented on one computer.

[0017] The reception server 11 provides a user interface to the user 90 and provides the user 90 with a function of assisting in the analysis of source code by using the other servers.

[0018] The generation server 12 generates specification data representing the specification of the source code from the target source code of the target system by the specification generation unit 13, and generates, from the specification data, an evaluation source code reflecting the specification of the specification data and an evaluation test code for verifying the evaluation source code by the code generation unit 14. The evaluation test code is, for example, a coverage test that covers the entire test of the evaluation source code reflecting the specification data, and may include, as an example, test items for executing and evaluating all routes of the evaluation source code.

[0019] If the generated source code for evaluation is equivalent to the target source code from which it originated, it can be said that the specification data in between also describes specifications equivalent to those of the target source code. However, the source code for evaluation does not necessarily become equivalent to the target source code. First, there may be differences between the target source code and the specification data. For example, an error may occur when generating the specification data from the target source code. Also, there is a possibility that specifications that do not exist in the target source code may be mixed into the specification data. Similarly, there may be differences between the source code for evaluation and the specification data. The source code analysis support system 10 of the present embodiment enables the creation of specification data that accurately reflects the processing of the target source code by repeatedly regenerating the specification data and the source code for evaluation so that the source code for evaluation becomes equivalent to the target source code.

[0020] The generation server 12 is configured to be able to utilize a natural language generation-based artificial intelligence, and generates specification data, source code for evaluation, and test code for evaluation by utilizing the natural language generation-based artificial intelligence. Hereinafter, the natural language generation-based artificial intelligence may be referred to as the generation AI. As the generation AI, one obtained by fine-tuning a general-purpose model to be suitable for the analysis of the target source code is used.

[0021] Here, as an example, the specification data is intermediate data structured in a predetermined structure and is not necessarily in a readable format for the user 90 to read and understand. The structure of the intermediate data is not particularly limited. By using the structured intermediate data to eliminate ambiguity, it becomes possible to ensure subsequent information processing including the generation of source code and test code. The formatting server 15 formats the intermediate data whose evaluation results satisfy predetermined conditions into a readable specification document.

[0022] The test execution server 16 uses the test environment 17 to execute tests on the source code using test code. Specifically, the test execution server 16 performs a first verification to verify the evaluation source code using test code for verifying the target source code, and a second verification to verify the target source code using the evaluation test code. The test code for verifying the target source code will hereinafter be referred to as the target test code in the sense of being test code corresponding to the target source code. In the present embodiment, as an example, the target test code is created during the development and / or modification of the target source code and is managed as an attachment to the target source code. The target test code may be, for example, a coverage test that covers the entire test of the target source code and may include, as an example, test items that execute and evaluate all routes of the target source code.

[0023] The test environment 17 is an operating environment of hardware and software for verifying whether an information processing system in which source code is implemented operates correctly by executing test code. The test environment 17 can provide an environment 18 for the test of the first verification and an environment 19 for the test of the second verification.

[0024] Figure 2 is a conceptual diagram for explaining the outline of the analysis process by the source code analysis support system.

[0025] As shown in Figure 2, the overall analysis process 20 includes a source code analysis process 21, an evaluation code generation process 22, a first verification process 23, and a second verification process 24.

[0026] First, the specification data SD is generated from the target source code OSC by the source code analysis process 21. Further, the evaluation source code ESC and the evaluation test code ETC are generated from the specification data SD by the evaluation code generation process 22. Then, the test of the evaluation source code ESC is executed by the target test code OTC, which is the test code attached to the target source code OSC, by the first verification process 23. If the result of the test is not a normal result, the source code analysis process 21, the evaluation code generation process 22, and the first verification process 23 are repeated. If a normal result is obtained in the first verification process 23, the first verification process 23 is terminated and the process proceeds to the second verification process 24. In the second verification process 24, the test of the target source code OSC is executed by the evaluation test code ETC. If the result of the test is not a normal result, the user is prompted to determine whether correction is necessary. When a normal result is also obtained in the second verification process 24, the specification data SD at that time is formatted into a specification document and output. In this way, by mutually verifying the evaluation source code ESC and the target source code OSC by the first verification process 23 and the second verification process 24, even if surplus parts are mixed into the specification data SD due to hallucination, it is possible to detect and remove those surplus parts.

[0027] FIG. 3 is a conceptual diagram for explaining the fine-tuning of a natural language generation-based artificial intelligence.

[0028] By fine-tuning a general-purpose model of a generation-based AI that is available for use through an API (Application Programming Interface) or the like for source code analysis, a model that shows higher accuracy in source code analysis can be obtained. From the business systems of each company, the business rules of each company, logical names such as databases, coding examples, etc. are collected, and fine-tuning data for each company is created based on them. The technology of the generation-based AI can also be utilized to extract this fine-tuning data. Thereby, it can be made suitable for the said company.

[0029] Figure 3 illustrates the fine-tuning for each company. Based on the data 31 extracted from the business system including the target system of the company (Company A) operating the target system, fine-tuning data 32 serving as learning data in fine-tuning is created. Then, by performing fine-tuning 34 of the general-purpose model 33 using the fine-tuning data 32, a model 35 for Company A is created. In this example, it is assumed that a model dedicated to Company A is created, but it is not limited to this. As another example, a model with higher precision may be created by further limiting the usage.

[0030] Figure 4 is a conceptual diagram for explaining high-precision fine-tuning.

[0031] Logical names and the like may have different naming rules for each language and project. Therefore, fine-tuning data may be created based on the naming rules for each language and project according to the target system. Referring to Figure 4, by performing fine-tuning using the fine-tuning data extracted from the business system of Company A, a model 35 for Company A is created. Similarly, by performing fine-tuning using the fine-tuning data extracted from the business system of Company B, a model 41 for Company B is created. Furthermore, by limiting it to a more limited usage, for example, by performing fine-tuning using the fine-tuning data extracted from Project A of Company A, a model 42 for Project A of Company A showing high precision in Project A of Company A can be created. Similarly, by performing fine-tuning using the fine-tuning data extracted from Project B of Company A, a model 43 for Project B of Company A showing high precision in Project B of Company A can be created.

[0032] Figures 5 to 7 are sequence diagrams of the analysis process by the source code analysis support system.

[0033] 5, when the receiving server 11 receives a request from the user 90 to analyze the target source code OSC (S101), it instructs the generating server 12 to generate specification data SD (S102). The generating server 12, having received the instruction, generates the specification data SD and returns it to the receiving server 11 (S103). Next, the receiving server 11 instructs the generating server 12 to generate evaluation source code ESC and evaluation test code ETC (S104). The generating server 12, having received the instruction, generates the evaluation source code ESC and evaluation test code ETC and returns them to the receiving server 11 (S105). The evaluation source code ESC is added with a comment indicating which part of the specification data SD has been reflected, and a code for outputting a log for verification using the evaluation test code ETC.

[0034] 6, the receiving server 11 then instructs the test execution server 16 to perform a first verification, in which the evaluation source code ESC is tested using the target test code OTC (S201). Upon receiving the instruction, the test execution server 16 tests the evaluation source code ESC using the target test code OTC and returns the result to the receiving server 11 as a verification result (S202). The test may or may not be completed successfully.

[0035] The test code has a specified value or range that should be the value that is output as a result of its execution.If an error occurs during the test code execution and the execution stops, or if the test code is executed to the end but the output value is outside the specified range, the test is not considered to have been performed normally and some kind of abnormality is considered to have occurred.

[0036] The verification results include information that enables one to know whether the test was executed normally, whether it was not executed normally, and if not, whether the execution stopped during the test code, whether the test code was executed to the end but the output value was outside the predetermined range, if the execution stopped, at which step the execution stopped, and the logs obtained at each location when the test code was executed.

[0037] The reception server 11 analyzes the verification results to determine whether the test was completed normally, and if there is an abnormality, identifies the location of the error in the specification data SD and / or the evaluation source code ESC. If the first verification is completed normally, it is confirmed that the evaluation source code ESC correctly includes the processing included in the target source code OSC, and the specification data SD correctly includes the specifications regarding the processing included in the target source code OSC. Therefore, if the test is completed normally, the reception server 11 ends the first verification and proceeds to step S301. On the other hand, if there is an abnormality in the test, the reception server 11 performs the process of identifying the following error locations.

[0038] FIG. 8 is a conceptual diagram for explaining a method of error identification when an execution stop of the test code occurs.

[0039] The reception server 11 obtains the position where the execution stop occurred in the target test code OTC when (1) evaluating the evaluation source code ESC by the target test code OTC and (2) an error occurs and the execution stops in the test. Further, the reception server 11 identifies, from the obtained position where the execution stop occurred in the target test code OTC, (3) the error location (hereinafter also referred to as the code error location) of the evaluation source code ESC corresponding to that position. Further, the reception server 11 refers to the comments described in the code error location of the evaluation source code ESC, identifies which part of the specifications in the specification data SD the code reflects, and identifies that part of the specification data SD as the part with an error in the specification (hereinafter also referred to as the specification error location).

[0040] FIG. 9 is a conceptual diagram for explaining a method of identifying an error when the test code has been executed to the end but the output value is out of a predetermined range.

[0041] The reception server 11 acquires logs of each location when (1) evaluating the evaluation source code ESC by the target test code OTC in a test, and (2) the test code has been executed to the end but the output value is out of a predetermined range. (3) Further, the reception server 11 identifies the code error location of the evaluation source code ESC based on the values of the logs at each location. At this time, the reception server 11 may autonomously identify the code error location based on rules based on predetermined information, or may present the output value and the logs at each location to the user 90 and accept the code error location of the analysis result from the user 90. In that case, the reception server 11 may assist the user 90 in analyzing the logs using a coverage tool. Further, the reception server 11 refers to the comments described in the code error location of the evaluation source code ESC, identifies which specification location in the specification data SD the code at that location reflects, and identifies that location in the specification data SD as a specification error location.

[0042] Returning to FIG. 6, when an abnormality occurs in the test and the specification error location that caused the abnormality is identified, the reception server 11 instructs the generation server 12 to regenerate the specification data SD (S203). The generation server 12 that has received the instruction generates the specification data SD and returns it to the reception server 11 (S204). At this time, the generation server 12 may input a prompt with the specification error location of the specification data SD improved and the test changed to be executed normally to the generation system AI. Subsequently, the reception server 11 instructs the generation server 12 to generate the evaluation source code ESC and the evaluation test code ETC (S205). The generation server 12 that has received the instruction generates the evaluation source code ESC and the evaluation test code ETC based on the new specification data SD and returns them to the reception server 11 (S206).

[0043] Subsequently, the reception server 11 instructs the test execution server 16 to test the new evaluation source code ESC using the target test code OTC (S207). The test execution server 16 that has received the instruction tests the evaluation source code ESC using the target test code OTC and returns the result to the reception server 11 as the verification result (S208).

[0044] The reception server 11 analyzes the verification result to determine whether the test has been completed normally. If there are any abnormalities, it identifies the location of the error in the specification data SD and / or the evaluation source code ESC. If the test has been completed normally, the reception server 11 proceeds to step S301. If there are any abnormalities, the reception server 11 performs the process of identifying the location of the error described above using FIGS. 8 and 9, returns to step S203, and repeats the processes from step S203 to S208.

[0045] If the test has not been completed normally after repeating the processes from step S203 to S208 n times, the reception server 11 presents the verification result to the user 90 to prompt manual analysis and improvement (S209).

[0046] Referring to FIG. 7, subsequently, the reception server 11 instructs the test execution server 16 to perform a second verification of testing the target source code OSC using the evaluation test code ETC (S301). The test execution server 16 that has received the instruction tests the target source code OSC using the evaluation test code ETC and returns the result to the reception server 11 as the verification result (S302). The test may or may not be completed normally.

[0047] In the above-mentioned first verification, it has been confirmed that the evaluation source code ESC correctly includes the processes included in the target source code OSC, and the specification data SD correctly includes the specifications regarding the processes included in the target source code OSC. Therefore, if an abnormality occurs in the test during the second verification, the specification data SD and the evaluation source code ESC may include surplus parts that are not included in the target source code OSC. As a result, it is conceivable that the evaluation test code ETC includes test codes for verifying those surplus parts.

[0048] The reception server 11 analyzes the verification result to determine whether the test has been completed normally. If there is an abnormality, it identifies the surplus parts in the specification data SD and the evaluation source code ESC. If the test has been completed normally, the reception server 11 ends the second verification and proceeds to step S304. On the other hand, if there is an abnormality in the test, the reception server 11 performs a process of identifying the surplus parts.

[0049] The method of identifying the surplus parts is basically the same as the method of identifying the error parts shown in FIGS. 8 and 9. Here, the case where the execution of the test code stops will be described.

[0050] FIG. 10 is a conceptual diagram for explaining the method of identifying the surplus parts when the execution of the test code stops.

[0051] The reception server 11 acquires the position where execution stop occurred in the evaluation test code ETC when (1) evaluating the target source code OSC with the evaluation test code ETC and (2) an error occurs and execution stop occurs. Further, the reception server 11 identifies (3) the surplus part of the evaluation source code ESC corresponding to that position (hereinafter also referred to as the code surplus part) from the position where execution stop occurred in the acquired evaluation test code ETC. Further, the reception server 11 refers to the comment described in the code surplus part of the evaluation source code ESC, identifies which part of the specification in the specification data SD the code reflects, and identifies that part of the specification data SD as a surplus part of the specification (hereinafter also referred to as the specification surplus part).

[0052] The user 90 may manually handle the specification surplus part in this specification data SD, or the generation server 12 may handle it. The specification data SD is not necessarily in a highly readable format, but since the specification surplus part is identified, if it has a certain degree of readability, the user 90 can easily delete the specification surplus part.

[0053] Also, in the second verification, if execution stop did not occur but the output value was out of the predetermined range, the reception server 11 may identify the code surplus part of the evaluation source code ESC based on the value of the log at each location output in the second verification, and identify the specification surplus part in the specification data SD based on the comment of the code surplus part.

[0054] Returning to FIG. 7, when an abnormality occurs in the test and the specification surplus part that caused the abnormality is identified, the reception server 11 presents the test result to the user 90 (S303).

[0055] The reception server 11 instructs the formatting server 15 to format the specification data SD to create a highly readable specification document (S304). The instructed formatting server 15 formats the specification data SD into a specification document and returns it to the reception server 11 (S305). The reception server 11 outputs the formatted specification document to the user 90 (S306).

[0056] In the above-described embodiment, it is assumed that the target test code OTC is managed attached to the target source code OSC. However, the test code is not necessarily managed attached to the existing source code such as the legacy code to be analyzed.

[0057] Hereinafter, a modified example in the case where the target test code OTC is not attached to the target source code OSC is shown.

[0058] FIG. 11 is a conceptual diagram for explaining an outline of the analysis process when the target test code OTC is not attached to the target source code OSC. As shown in FIG. 11, the overall analysis process 20 includes a source code analysis process 21', an evaluation code generation process 22, a first verification process 23', and a second verification process 24. The evaluation code generation process 22 and the second verification process 24 in this modified example are the same processes as those in the above-described embodiment. The source code analysis process 21' and the first verification process 23' in this modified example are different from the processes in the above-described embodiment. Hereinafter, the source code analysis process 21' and the first verification process 23' in this modified example will be described.

[0059] In this modification example, in the source code analysis process 21' performed in advance, the specification generation unit 13 of the generation server 12 generates, from the target source code OSC, in addition to the specification data SD, a target test code OTC' as a test code for verifying the target source code OSC. The target test code OTC' is, for example, a coverage test that covers the entire test of the target source code OSC, and may include, as an example, test items that execute and evaluate all routes of the target source code OSC. For the generation of the target test code OTC', the same generation-based AI as that used when generating the specification data SD is used. And in the first verification process 23', the test execution server 16 executes a test of the evaluation source code ESC by the target test code OTC' generated from the target source code OSC. Thereby, even when no test code is attached to the target source code OSC, it is possible to decode the specification with high accuracy.

[0060] As described above, the present embodiment and its modification examples are examples for explaining the present invention, and the present invention is not limited to those descriptions. Those skilled in the art can implement the present invention in various other modes without departing from the scope of the present invention. Further, the present embodiment and the modification examples include the following matters. However, the matters included in the present embodiment and the modification examples are not limited to only those shown below.

[0061] [Item 1] A source code analysis support system for supporting analysis of source code of an information processing system includes: a generation unit that generates, from source code, specification data representing the specifications of the source code; and generates, from the specification data, evaluation source code that reflects the specifications of the specification data and evaluation test code for verifying the evaluation source code; a verification unit that verifies the source code using the test code; and a reception unit that provides a user interface, wherein the reception unit receives input of target source code to be analyzed; the generation unit generates the specification data, the evaluation source code, and the evaluation test code based on the target source code; the verification unit performs a first verification that verifies the evaluation source code using the target test code for verifying the target source code and a second verification that verifies the target source code using the evaluation test code; and the reception unit outputs information on a specification document based on specification data whose verification results satisfy predetermined conditions. In this manner, the specification data generated from the source code is evaluated using the first and second verifications, making it possible to accurately decipher the specifications from the source code.

[0062] [Matter 2] In the source code analysis support system described in item 1, the generation unit adds a comment to the evaluation source code indicating which part of the specification data is reflected in the specification, and when an execution stop occurs in the first verification, the reception unit identifies the part in the evaluation source code where the execution stop occurred as a code error part, and identifies a specification error part in the specification data that is an error part based on the comment of the code error part, and the generation unit regenerates the specification data, the evaluation source code, and the evaluation test code so as to improve the specification error part. According to this, when an execution stop occurs in the first verification, the specification error part in the specification data can be identified and improved by regeneration.

[0063] [Matter 3] In the source code analysis support system described in item 2, the generation unit adds code for outputting a log for verification by the evaluation test code to the evaluation source code. When the reception unit does not encounter an execution stop in the first verification but the output value is outside a predetermined range, based on the values of the logs at each location output in the first verification, it identifies the code error location in the evaluation source code, and based on the comment at the code error location, it identifies the specification error location in the specification data. The generation unit regenerates the specification data, the evaluation source code, and the evaluation test code so as to improve the specification error location. Thereby, when the output value is outside the assumed range in the first verification, the specification error location in the specification data can be identified and improved by regeneration.

[0064] [Item 4] In the source code analysis support system described in item 3, when the reception unit completes the first verification normally and an execution stop occurs in the second verification, it identifies the location in the evaluation source code corresponding to the location where the execution stop occurred in the evaluation test code as a code surplus location, and based on the comment at the code surplus location, it identifies the specification surplus location, which is the surplus location in the specification data. Thereby, when an execution stop occurs in the second verification, the specification surplus location in the specification data can be identified.

[0065] [Item 5] In the source code analysis support system described in item 4, when the reception unit completes the first verification normally and in the second verification, although an execution stop does not occur but the output value is outside a predetermined range, based on the values of the logs at each location output in the second verification, it identifies the code surplus location in the evaluation source code, and based on the comment at the code surplus location, it identifies the specification surplus location in the specification data. Thereby, when the output value is outside the assumed range in the second verification, the specification surplus location in the specification data can be identified and improved by regeneration.

[0066] [Item 6] In the source code analysis support system described in Item 1, the generation unit generates the specification data from the target source code using a natural language generation artificial intelligence, and generates the evaluation source code and the evaluation test code from the specification data using the natural language generation artificial intelligence. The natural language generation AI can decode the specification with high readability from the source code.

[0067] [Item 7] In the source code analysis support system described in Item 6, when the generation unit regenerates the specification data, the evaluation source code, and the evaluation test code, it applies a prompt with changes made so that the verification result satisfies the condition to the natural language generation artificial intelligence. This improves the specification data and enables highly accurate analysis by regeneration.

[0068] [Item 8] In the source code analysis support system described in Item 6, the generation unit fine-tunes the natural language generation artificial intelligence in advance using the fine-tuning data related to the target source code. This can improve the accuracy of the analysis by the natural language generation artificial intelligence.

[0069] [Item 9] In the source code analysis support system described in Item 1, the generation unit generates the target test code from the target source code in advance. This enables highly accurate specification decoding even when the test code is not attached to the target source code.

[0070] [Item 10] In the source code analysis support system described in Item 1, the specification data is intermediate data structured in a predetermined structure, and further includes a formatting unit that formats the intermediate data into a specification document in a readable format. The reception unit causes the formatting unit to format and output the intermediate data whose verification result satisfies the condition into a specification document. Thereby, in the verification process, it is possible to perform the process with intermediate data suitable for the process and provide highly readable specification data to the user.

[0071] [Item 11] A source code analysis support method for supporting the analysis of the source code of an information processing system, comprising: generating specification data representing the specification of the source code from the source code; generating, from the specification data, an evaluation source code reflecting the specification of the specification data and an evaluation test code for verifying the evaluation source code; a verification unit that verifies the source code using the test code; and a reception unit that provides a user interface. A computer having the above components receives an input of a target source code to be analyzed, generates the specification data, the evaluation source code, and the evaluation test code based on the target source code, and performs a first verification for verifying the evaluation source code using a target test code for verifying the target source code, and a second verification for verifying the target source code using the evaluation test code, and outputs information on a specification document based on the specification data for which the verification results of the first verification and the second verification satisfy a predetermined condition.

Description of Reference Numerals

[0072] 10…Source code analysis support system, 11…Reception server, 12…Generation server, 13…Specification generation unit, 14…Code generation unit, 15…Formatting server, 16…Test execution server, 17…Test environment, 18…Environment for the first verification test, 19…Environment for the second verification test, 20…Analysis process, 21…Source code analysis process, 22…Evaluation code generation process, 23…First verification process, 24…Second verification process, 31…Data, 32…Fine-tuning data, 33…General model, 34…Fine-tuning, 35…Model for Company A, 41…Model for Company B, 42…Model for Project A, 43…Model for Project B, 90…User

Claims

1. A source code analysis support system for supporting the analysis of the source code of an information processing system, a generation unit that generates specification data representing the specification of the source code from the source code, and generates an evaluation source code reflecting the specification of the specification data and an evaluation test code for verifying the evaluation source code from the specification data, a verification unit that verifies the source code using the test code, a reception unit that provides a user interface, having, the reception unit receives an input of a target source code to be analyzed, the generation unit generates the specification data, the evaluation source code, and the evaluation test code based on the target source code, the verification unit executes a first verification for verifying the evaluation source code using a target test code for verifying the target source code and a second verification for verifying the target source code using the evaluation test code, the reception unit outputs information on a specification document based on the specification data in which the verification results of the first verification and the second verification satisfy a predetermined condition, a source code analysis support system.

2. the generation unit adds a comment indicating which part of the specification data is reflected in the evaluation source code, when an execution stop occurs in the first verification, the reception unit identifies the location where the execution stop occurs in the evaluation source code as a code error location, and based on the comment at the code error location, identifies a specification error location that is an incorrect location in the specification data, the generation unit regenerates the specification data, the evaluation source code, and the evaluation test code so as to improve the specification error location, the source code analysis support system according to claim 1.

3. the generation unit further adds code for outputting a log for verification by the evaluation test code to the evaluation source code, in the first verification, when no execution stop occurs but the output value is out of a predetermined range, the reception unit identifies a code error location in the evaluation source code based on the log values at each location output in the first verification, and based on the comment at the code error location, identifies a specification error location in the specification data, the generation unit regenerates the specification data, the evaluation source code, and the evaluation test code so as to improve the specification error location, The source code analysis support system according to claim 2.

4. When the first verification is completed normally and an execution stop occurs in the second verification, the reception unit specifies, as a code surplus location, the location in the evaluation source code corresponding to the location where the execution stop occurred in the evaluation test code, and based on the comment of the code surplus location, specifies a specification surplus location that is a surplus location in the specification data. The source code analysis support system according to claim 3.

5. When the first verification is completed normally and no execution stop occurs in the second verification but the output value is out of a predetermined range, the reception unit specifies the code surplus locations of the evaluation source code based on the log values of each location output in the second verification, and based on the comments of the code surplus locations, specifies the specification surplus locations in the specification data. The source code analysis support system according to claim 4.

6. The generation unit uses a natural language generation artificial intelligence to generate the specification data from the target source code, and uses the natural language generation artificial intelligence to generate the evaluation source code and the evaluation test code from the specification data. The source code analysis support system according to claim 1.

7. When the generation unit regenerates the specification data, the evaluation source code, and the evaluation test code, it applies a prompt with changes made so that the verification result satisfies the condition to the natural language generation artificial intelligence. The source code analysis support system according to claim 6.

8. The generation unit pre-finetunes the natural language generation artificial intelligence using fine-tuning data related to the target source code. The source code analysis support system according to claim 6.

9. The generation unit pre-generates the target test code from the target source code. The source code analysis support system according to claim 1.

10. The specification data is intermediate data structured in a predetermined structure, and further has a formatting unit that formats the intermediate data into a readable specification document, and the reception unit causes the formatting unit to format and output the intermediate data for which the verification result satisfies the condition into a specification document. The source code analysis support system according to claim 1.

11. A source code analysis support method for supporting the analysis of the source code of an information processing system, a computer having a generation unit that generates specification data representing the specification of the source code from the source code, and generates, from the specification data, an evaluation source code reflecting the specification of the specification data and an evaluation test code for verifying the evaluation source code, a verification unit that verifies the source code using the test code, and a reception unit that provides a user interface, receives an input of a target source code to be analyzed, generates the specification data, the evaluation source code, and the evaluation test code based on the target source code, performs a first verification for verifying the evaluation source code using a target test code for verifying the target source code and a second verification for verifying the target source code using the evaluation test code, and outputs information on a specification document based on the specification data for which the verification results of the first verification and the second verification satisfy a predetermined condition. Source code analysis support method.

Citation Information

Patent Citations

  • Automatic evaluation system for program

    JP2001117794A

  • System and apparatus for analyzing static analysis result

    JP2005202494A

  • Program for debug support

    JP2007004255A

  • Specification creating program and computer readable medium stored with the program

    JP2002169692A