Program and system
The system analyzes source code into files and unit programs, storing dependencies and processing content in natural language, allowing ordinary engineers to manage system operations effectively.
Patent Information
- Application Number
- JP2024113029
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2026-01-27
AI Technical Summary
Existing systems require specialized engineers to operate due to the lack of clarity in program dependencies and limited natural language searches, making it difficult for ordinary engineers to understand and manage system operations.
A system and program that analyze source code into files and unit programs, identify dependencies, and store processing content in natural language, enabling natural language searches to find relevant programs.
Enables ordinary engineers to understand and operate systems by clearly analyzing and displaying dependencies and processing content in natural language, facilitating system operation.
Smart Images

Figure 2026012613000001_ABST
Abstract
Description
[Technical Field]
[0001] The present invention relates to a program and a system, and more specifically to a program and a system that can support system operation by analyzing dependencies between unit programs that make up source code and enabling a target unit program to be understood in natural language. [Background technology]
[0002] In the field of system operation, engineers who are familiar with specific systems are required. To address this problem of dependency on individual skills, programs and systems that can support system operation so that any ordinary engineer can operate the system are desired. Japanese Patent Application Laid-Open Publication No. 2022-115815 describes a method, a storage medium, and a system for performing semantic code search based on an extended programming language corpus. This method allows for semantic code search based on an extended programming language corpus. However, this method does not clarify the dependencies between programs, and natural language searches are also limited. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] Japanese Patent Publication No. 2022-115815 Summary of the Invention [Problem to be solved by the invention]
[0004] Therefore, there is a demand for a program and a system that can support the operation of a system so that an ordinary engineer can operate the system. [Means for solving the problem]
[0005] This invention is based on the finding that the processing content of each unit program and each file can be analyzed by dividing source code into multiple files and the unit programs contained in each file, analyzing their dependencies, and then analyzing the processing content of each unit program.Furthermore, this invention is based on the finding that by storing identification information of each file or program in association with its processing content in natural language, it is possible to easily find the relevant program by searching in natural language.
[0006] A first invention relates to a program that causes a computer to execute a file analysis step, an inter-file dependency analysis step, a unit file program dependency analysis step, an inter-file program dependency analysis step, and a unit program processing content analysis step. The file analysis process is a process of analyzing the source code of the system to be analyzed into multiple files. The inter-file dependency analysis step is a step of analyzing the dependency relationships between the multiple files recognized in the file analysis step. The unit file program dependency analysis step is a step of analyzing the dependency relationships between a plurality of unit programs included in a unit file when each of the plurality of files is treated as a unit file. The inter-file program dependency analysis step is a step of analyzing the dependency between unit programs contained in different files among a plurality of files. (By going through the steps up to this point, we can achieve a graph of dependencies between programs in the system's source code.) The unit program processing content analysis process is a process of analyzing the processing content of each unit program contained in multiple files, taking into consideration the dependency relationships between multiple files, the dependency relationships between multiple unit programs contained in each unit file, and the dependency relationships between unit programs contained in different files.
[0007] Preferably, the program further causes the computer to execute a processing content storage step, which is a step of storing unit programs (identification information of the unit programs) and processing content of the unit programs in natural language in association with each other.
[0008] Preferably, this program further causes the computer to execute a search input step and a search result unit program selection step. The search input step is a step of entering a search in natural language. The search result unit program selection step is a step of analyzing the natural language search and selecting a search result unit program that is a unit program that will be the search result from among the unit programs included in multiple files.
[0009] Preferably, the program further causes the computer to execute a search result unit program display step, which includes: The processing content of the search result unit program in natural language, and This is a step of displaying one or both of the dependency relationships of the multiple unit programs contained in the unit file containing the search result unit program.
[0010] The first invention may be provided as an information recording medium on which any of the above programs is recorded.
[0011] The second invention relates to a computer system that appropriately executes each of the above steps. [Effects of the Invention]
[0012] According to this invention, it is possible to properly analyze the dependencies of unit programs and understand each unit program in natural language, so that a program and system can be provided that can support the operation of a system in a way that any ordinary engineer can operate the system. [Brief explanation of the drawings]
[0013] [Figure 1] FIG. 1 is a block diagram for explaining this system. [Figure 2] FIG. 2 is a flowchart illustrating the process of analyzing the processing content of a unit program. [Figure 3] FIG. 3 is a diagram conceptually showing the dependency relationships between files and the dependency relationships between unit programs in each file. [Figure 4] FIG. 4 is a diagram conceptually showing the dependency relationships between unit programs in each file, including the dependency relationships between unit programs contained in different files. [Figure 5] FIG. 5 is a conceptual diagram showing an example of output from the development support system. [Figure 6] FIG. 6 is a flowchart for explaining the process of searching for a target unit program. DETAILED DESCRIPTION OF THE INVENTION
[0014] The following describes embodiments of the present invention with reference to the drawings. The present invention is not limited to the embodiments described below, and includes appropriate modifications of the embodiments below within the scope obvious to those skilled in the art.
[0015] FIG. 1 is a block diagram illustrating this system. As shown in FIG. 1, the development support system 1 includes a source code input unit 3, a file analysis unit 5, an inter-file dependency analysis unit 7, a unit file program dependency analysis unit 9, an inter-file program dependency analysis unit 11, and a unit program processing content analysis unit 13. As shown in FIG. 1, this system 1 may include any one or more of a processing content storage unit 15, a search input unit 21, a search result unit program selection unit 23, and a search result unit program display unit 25. Each unit performs a respective process or step, and may be interpreted as a respective means. The system 1 is implemented by a computer, an information processing device, or a computer server system. This system typically includes a server and multiple terminals. In other words, this system may be implemented by one or multiple information processing terminals (computers).
[0016] A computer has an input unit, an output unit, a control unit, a calculation unit, and a memory unit, and each element is connected by a bus or the like to enable the exchange of information. For example, a control program or various information may be stored in the memory unit. When predetermined information is input from the input unit, the control unit reads the control program stored in the memory unit. The control unit then reads the information stored in the memory unit as appropriate and transmits it to the calculation unit. The control unit also transmits the input information to the calculation unit as appropriate. The calculation unit performs calculation processing using the various received information and stores it in the memory unit. The control unit reads the calculation results stored in the memory unit and outputs them from the output unit. In this way, various processes and steps are executed. Each unit or means executes these various processes. A computer may have a processor, and the processor may realize various functions and steps. A computer may be standalone. A computer may have some of its functions distributed between a server and a terminal. In this case, it is preferable that the server and the terminal can exchange information via a network such as the Internet or an intranet. The computer may include a processor and a memory coupled to the processor. The memory may store instructions that, when executed by the processor, cause the computer to perform various processes or function as various elements. The computer may be provided with various training data to build a learning model and perform various calculations through machine learning. In this case, the computer may perform various analyses using the learning model created through machine learning and deep learning of AI (artificial intelligence).
[0017] The steps performed by each element to analyze the processing content of a unit program are explained below. Figure 2 is a flowchart for explaining the processing for analyzing the processing content of a unit program. In the figure, S stands for step.
[0018] Source code input process (S101) The source code of the target system is input to the source code input unit 3. Specifically, an engineer simply specifies the source code of the target system and instructs the development support system 1 to input a copy of the source code. In this way, the process of inputting the source code of the target system into the development support system 1 is performed.
[0019] File analysis process (S102) Next, the file analysis unit 5 analyzes the source code of the system to be analyzed into multiple files. The source code of the system to be analyzed is, for example, digital information that can be read by the computer-based development support system 1. The system to be analyzed has multiple files with different formats. Examples of formats include image files, audio files, text files, and program files written in a programming language. The development support system 1 analyzes the source code of the system to be analyzed and breaks it down into multiple files. The development support system 1 may assign a file identification number to each of the analyzed files and store the file identification number so that each file can be read. In this way, the development support system 1 performs the process of analyzing the source code of the system to be analyzed into multiple files.
[0020] Inter-file dependency analysis process (S103) The inter-file dependency analysis unit 7 analyzes the dependency relationships of multiple files recognized in the file analysis process. A dependency relationship is a relationship in which data access to one file affects data access to another file. For example, an example of a dependency relationship is when one file cannot be processed until another file has been processed. Another example of file dependency is when another file is used in the processing of a certain file. Dependencies between files can be analyzed using methods described in, for example, Japanese Patent Publication No. 2022-115815 (the above-mentioned Patent Document 1), as well as Japanese Patent Publication No. 5085421, Japanese Patent Publication No. 5294675, Japanese Patent Publication No. 5725623, and Japanese Patent Publication No. 7333889. In this way, the development support system 1 performs a process of analyzing the dependency relationships of multiple files recognized in the file analysis process.
[0021] A specific example of the inter-file dependency analysis process will be described below. Although the specific form differs depending on the programming language, file names often indicate the processing content. The development support system 1 can obtain the processing content of each file by analyzing the file names of multiple files. In doing so, for example, the relationship between each file and the processing content is stored in a storage unit. Since each process has a dependency relationship, the development support system 1 can analyze the dependency relationship of each file by analyzing the dependency relationship corresponding to the processing content.
[0022] Analyzing program dependencies within unit files (S104) The unit file program dependency analysis unit 9 analyzes the dependency relationships of multiple unit programs included in a unit file when each file of multiple files is considered to be a unit file. A program file has multiple processing blocks. These processing blocks are considered to be unit programs. Then, each unit program also has a dependency relationship. The development support system 1 analyzes the dependency relationships of these unit programs. Dependencies between programs can be analyzed using methods described in, for example, Japanese Patent Publication No. 2022-115815 (the above-mentioned Patent Document 1), as well as Japanese Patent Publication No. 5085421, Japanese Patent Publication No. 5294675, Japanese Patent Publication No. 5725623, and Japanese Patent Publication No. 7333889. In this way, the development support system 1 performs a process of analyzing the dependency relationships of multiple unit programs included in a unit file.
[0023] A specific example of the process of analyzing the program dependency relationships within a unit file will be described below. Although the specific form differs for each programming language, programs have semantic chunks of processing content (for example, functions and classes). The development support system 1 detects each program using regular expressions and extracts the semantic chunks of processing content contained in each program. The development support system 1 also uses regular expressions to detect whether semantic chunks from the same file are used within each semantic chunk, and if so, assigns dependencies between the semantic chunks. In this way, the development support system 1 can analyze the dependencies between multiple unit programs contained in a unit file.
[0024] 3 is a conceptual diagram showing the dependency relationships between files and the dependency relationships between unit programs in each file. In this way, the development support system 1 can recognize programs included in the source code of the target system at the file level, obtain related program information within the same file, and obtain and graph the dependency relationships between files.
[0025] Inter-file program dependency analysis process (S105) The inter-file program dependency analysis unit 11 analyzes the dependency relationships between unit programs included in different files among a plurality of files. In other words, even if a program is included in different unit files, those programs may have a dependency relationship. The inter-file program dependency analysis unit 11 analyzes such unit programs included in different files and having a dependency relationship. Dependencies between programs across files can be analyzed using methods described in, for example, Japanese Patent Publication No. 2022-115815 (the above-mentioned Patent Document 1), as well as Japanese Patent Publication No. 5085421, Japanese Patent Publication No. 5294675, Japanese Patent Publication No. 5725623, and Japanese Patent Publication No. 7333889. In this way, the development support system 1 performs a process of analyzing the dependency relationships between unit programs included in different files among a plurality of files.
[0026] A specific example of the inter-file program dependency analysis process will be described below. Inter-file dependencies and intra-unit-file program dependencies are analyzed as described above. These relationships are stored, for example, in a memory unit. The development support system 1 reads out inter-file dependencies and intra-unit-file program dependencies and combines them to analyze the program dependencies of the entire system. The development support system 1 analyzes dependencies across files from the program dependencies of the entire system obtained in this way, and adds information about new dependencies as an inter-file program dependency analysis. In this way, the development support system 1 can perform processing to analyze the dependencies of unit programs contained in different files among a single or multiple files.
[0027] Figure 4 is a conceptual diagram showing the dependencies between unit programs in each file, including the dependencies between unit programs contained in different files. As shown in Figure 4, this allows for a comprehensive analysis of the dependencies between programs in the source code of the target system. This makes it possible to graph and visualize the dependencies between programs in the source code of the target system.
[0028] Unit program processing content analysis step (S106) The unit program processing content analysis unit 13 analyzes the processing content of each unit program included in multiple files, taking into consideration the dependency relationships between multiple files, the dependency relationships between multiple unit programs included in each unit file, and the dependency relationships between unit programs included in different files. For example, a program may be tagged. The development support system 1 may analyze the processing of each program by referring to a command dictionary that stores commands included in tags in association with the processing related to the commands.
[0029] Furthermore, the unit program processing content analysis unit 13 may analyze the processing of each unit program (processing based on commands, etc.) by referring to a trained model relating to dependencies and processing content. Such trained models can be constructed using artificial intelligence. For example, a trained model can be constructed using the dependencies (and processing based on commands, etc. of each unit program) from past source code analysis examples and the processing content of the dependent unit programs as training data with answers. Then, by inputting the dependencies or the dependencies and the processing content of each program into the obtained trained model, the processing content of the unit program can be analyzed taking the dependencies into consideration. Processing based on commands, etc. is program processing that can be analyzed without taking the dependencies into consideration. The dependencies may be one or more of the following: dependencies between multiple files, dependencies between multiple unit programs included in each unit file, and dependencies between unit programs included in different files. In this way, the development support system 1 performs processing to analyze the processing content of each unit program included in multiple files, taking into consideration the dependencies between multiple files, dependencies between multiple unit programs included in each unit file, and dependencies between unit programs included in different files.
[0030] A specific example of the unit program processing content analysis step will be described below. The dependency relationships of multiple files, the dependency relationships of multiple unit programs included in each unit file, and the dependency relationships of unit programs included in different files are stored in a storage unit. The development support system 1 reads out the dependency relationships of multiple files, the dependency relationships of multiple unit programs included in each unit file, and the dependency relationships of unit programs included in different files. The development support system 1 then uses a large-scale language model (LLM) to provide a natural language explanation for the program, which is a semantic block. The development support system 1 extracts surrounding semantic blocks using the dependency information of each semantic block, and adds a summary of the natural language explanation information using the LLM to the natural language information of the target semantic block. In this way, the development support system 1 can perform processing to analyze the processing content of each unit program included in multiple files.
[0031] It is preferable that the processing content of the analyzed unit program can be written in natural language. In this case, it is preferable that the development support system 1 has a processing content dictionary that stores processing content to be used for search in natural language. It is also preferable that the trained model described above can reference the processing content dictionary and output processing content in natural language.
[0032] Processing content storage step (S107) The processing content storage unit 15 stores unit programs and the processing content of the unit programs in natural language in a storage unit in association with each other. For example, the development support system 1 may store information about the processing content of each unit program in association with the identification information of the unit program. The information about the processing content may be stored in association with the processing content in natural language in a processing content dictionary. Then, the development support system 1 can perform processing to store the unit programs and the processing content of the unit programs in natural language in association with each other. The natural language means terms that can be understood by humans, not machine language. Examples of natural languages are Japanese and English.
[0033] Fig. 5 is a conceptual diagram showing an example of output from the development support system. In the example of Fig. 5, for a search target program, the dependency relationships of unit programs in files containing the search target program and the processing of the search target program in natural language are displayed. In this way, the development support system 1 may be configured to output not only the dependency relationships of each file and each unit program, but also the processing content of a selected unit file in natural language. In this case, the output information may be displayed on a monitor or the like.
[0034] In this way, the development support system 1 can analyze the source code of the target system, obtain information about the dependencies of each file and each program, and the processing content of each program, and store this information in natural language. By performing this processing, when analyzing the target system, the development support system 1 can search for unit programs related to that processing by inputting natural language related to the processing. The natural language related to the processing does not have to be limited to the processing content. In this case, by analyzing the input language, the development support system 1 can effectively search for appropriate unit programs taking into account the dependencies.
[0035] The process of searching for a target unit program will be described below with reference to the flowchart of FIG.
[0036] Search input process (S201) The search input unit 21 performs search input in natural language. For example, a user performs input in natural language to the development support system 1. An example of input is input in natural language regarding the situation in which a bug occurred. For example, the user may use a keyboard to input the situation in which the bug occurred. Then, the search input unit 21 inputs this input information to the development support system 1 as search input in natural language. The development support system 1 treats the information input in natural language as search input. In this way, the development support system 1 performs search input processing in natural language.
[0037] Search result unit program selection process (S202) The search result unit program selection unit 23 analyzes the search command in natural language and selects a search result unit program, which is a unit program that will be the search result, from among the unit programs contained in multiple files. The development support system 1 analyzes the input information and uses it as input information for searching for a unit program in which a bug has occurred. For example, the development support system 1 can use artificial intelligence for language analysis to analyze an input example and obtain input information (search input) for searching for a unit program. For example, the development support system 1 can build a trained model for past system errors as training data with answers between user input and the unit program that caused the system error. Then, when a search command is input, the development support system 1 can analyze which program performed the problem. The source code of the target system includes multiple programs. The development support system 1 selects a search result unit program (or a candidate unit program) based on the search command. For example, when searching for a bug in the target system, the development support system 1 selects a unit program in which a bug has occurred. In this way, the development support system 1 analyzes the search command in natural language and selects a search result unit program that is a unit program that is a result of the search from among the unit programs contained in a plurality of files.
[0038] Search result unit program display process (S203) The search result unit program display unit 25 outputs information relating to the search result unit programs. By performing this output, information relating to the search result unit programs is output to the monitor of the development support system 1, for example.
[0039] This display example may be the same as that shown in Figure 5. In the example shown in Figure 5, both the processing details of the search result unit programs in natural language and the dependency relationships of multiple unit programs included in the unit file containing the search result unit programs are displayed. By looking at this output, the user can understand which unit program has what kind of problem. Furthermore, if the problematic unit program can be identified, the bug can be eliminated by modifying only that unit program, allowing the target system to operate properly.
[0040] So far, we have explained each process and each step performed by a computer system. As explained above, this specification also provides a program that causes a computer to execute each of the processes and each step described above. This program may be recorded on a non-transitory information recording medium. Examples of information recording media include CDs, CD-ROMs, DVDs, USB memory, hard disks, and disks on servers. [Industrial Applicability]
[0041] The present invention can be preferably used in the field of information and communications. [Explanation of symbols]
[0042] 1. Development Support System 3 Source code input section 5 File analysis section 7 Inter-file dependency analysis part 9. Intra-unit file program dependency analysis 11 Inter-file program dependency analysis part 13 Unit program processing content analysis section 15 Processing content storage unit 21 Search input section 23 Search result unit program selection section 25 Search result unit program display section
Claims
1. On the computer, a file analysis step of analyzing the source code of the system to be analyzed into multiple files; an inter-file dependency analysis step for analyzing the dependency relationships of the plurality of files recognized in the file analysis step; a unit file program dependency analysis step for analyzing dependency relationships among a plurality of unit programs included in each of the plurality of files, when each of the plurality of files is treated as a unit file; an inter-file program dependency analysis step for analyzing dependency relationships between the unit programs included in different files among the plurality of files; a unit program processing content analysis step of analyzing processing content of each unit program included in the plurality of files, taking into consideration the dependency relationships of the plurality of files, the dependency relationships of the plurality of unit programs included in each unit file, and the dependency relationships of the unit programs included in the different files; A program that executes.
2. 2. The program according to claim 1, The computer, a program further executing a step of storing the unit program and a processing content of the unit program in natural language in association with each other.
3. 3. The program according to claim 2, The computer, a search input step for inputting a search in natural language; The program further executes a search result unit program selection step, which is a step of analyzing the natural language search and selecting a search result unit program, which is a unit program that results from the search, from among the unit programs included in the plurality of files.
4. 4. The program according to claim 3, The computer, The processing content of the search result unit program in the natural language; and The program further executes a search result unit program display step, which is a step of displaying one or both of the dependencies of a plurality of unit programs included in a unit file including the search result unit program.
5. An information recording medium on which the program according to any one of claims 1 to 4 is recorded.
6. a file analysis step of analyzing the source code of the system to be analyzed into multiple files; an inter-file dependency analysis step for analyzing the dependency relationships of the plurality of files recognized in the file analysis step; a unit file program dependency analysis step for analyzing dependency relationships among a plurality of unit programs included in each of the plurality of files, when each of the plurality of files is treated as a unit file; an inter-file program dependency analysis step for analyzing dependency relationships between the unit programs included in different files among the plurality of files; a unit program processing content analysis step of analyzing processing content of each unit program included in the plurality of files, the step of analyzing processing content of each unit program taking into consideration the dependency relationships of the plurality of files, the dependency relationships of the plurality of unit programs included in each unit file, and the dependency relationships of the unit programs included in the different files; A computer system that performs the above.
Citation Information
Patent Citations
Semantic code search based on augmented programming language corpus
JP2022115815A