Code conversion system and program

The code conversion system uses a two-stage grouping process with an LLM to automate and enhance code conversion accuracy, addressing limitations in existing systems by enabling efficient and precise language transformations.

JP7829785B1Active Publication Date: 2026-03-13DAIWA INST OF RES

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2025-08-26
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing code conversion systems lack automation, have limited conversion targets, and suffer from low accuracy, necessitating manual review and correction, thus failing to achieve labor savings and cost reductions.

Method used

A code conversion system utilizing a two-stage grouping process with a Large-Scale Language Model (LLM) to categorize programs by link information and convert them to different languages, ensuring accurate and automated code conversion without manual intervention.

Benefits of technology

The system achieves labor savings, expands conversion targets, and improves conversion accuracy by performing automated, high-precision code conversion across various languages and environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007829785000001_ABST
    Figure 0007829785000001_ABST
Patent Text Reader

Abstract

This system provides a code conversion system that can promote labor savings in conversion, expand the range of data that can be converted, improve conversion accuracy, and reduce conversion costs. [Solution] The code conversion system 10 is configured with a group creation means 25 that divides the group of programs to be converted into groups with inputs and outputs, a subgroup creation means 26 that uses a large-scale language model (LLM) to create subgroups that will serve as code conversion processing units for each created group by instructing that programs to be converted to the same language be grouped together and programs called by other programs be kept separate, and the created subgroups be arranged in order from those with no dependencies, and a code conversion means 27 that uses the LLM to perform code conversion on each subgroup and in the received order.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a code conversion system and a program configured by a computer that executes code conversion processing for each code of a plurality of programs constituting a program group into different languages. For example, when performing code conversion on a program group in which programs in a plurality of languages are mixed, when performing code conversion on a program group in which programs with different purposes and uses are mixed, when performing code conversion on a program group in which completely unrelated programs are mixed, etc., it can be used.

Background Art

[0002] Generally, conversion of programs for converting existing programs into different formats is being carried out. Such conversions include, for example, the operation or process of rewriting a program written in an old programming language into a program in a new language (when simply referred to as "language" in the present application, it refers to a programming language), and the operation or process of adapting to changes in a program execution environment such as an OS (Operating System) without changing the language, such as when changing a program operating on one OS to operate on another OS. The code conversion referred to in the present application is the former conversion of rewriting the language of the program. However, it may include the latter conversion corresponding to changes in the execution environment such as the OS, and in short, it only needs to include rewriting of the language. Also, the code conversion referred to in the present application is not the compilation of a high-level language source code into machine language.

[0003] Note that a system that generates code using a large language model (LLM: Large Language Model) based on explanatory text or the like indicating code needs input by a user is known (see Patent Document 1). However, this system is not a system that executes conversion of program code.

Prior Art Documents

Patent Documents

[0004] [Patent Document 1] Japanese Patent Publication No. 2025-36437 (Abstract) [Overview of the project] [Problems that the invention aims to solve]

[0005] As mentioned earlier, converting a program's language is a common practice. While various conversion products exist to perform program code conversion, testing the quality of the converted program often has to be done manually. Therefore, the labor-saving effect of automating program code conversion using conversion products has been limited.

[0006] Furthermore, conventional conversion products had limitations in their functionality, such as only being able to convert from COBOL to other languages, or having restrictions on the operating systems and middleware on which they could be used, thus limiting their applications.

[0007] Furthermore, even if it is possible to automate code conversion using conventional conversion products, the accuracy of the conversion is low, so ultimately, the automatically converted code still needs to be reviewed and corrected manually, which does not lead to cost reductions through automated conversion.

[0008] The objective of the present invention is to provide a code conversion system and program that can promote labor savings in conversion, expand the scope of conversion targets, improve conversion accuracy, and reduce conversion costs. [Means for solving the problem]

[0009] The present invention relates to a code conversion system comprising a computer that performs code conversion processing to different languages ​​for each of the codes of multiple programs constituting a group of programs, A group creation means that divides a group of programs into groups with inputs and outputs, using the link information of multiple programs and their input / output data obtained by code analysis of the group of programs to be converted, This group creation means creates subgroups that serve as code conversion processing units for each group created, including text data that is a text representation of the code of all programs included in the group and the link information of these programs and their input / output data, text data that lists the file paths, the language before conversion, and the language after conversion for all programs included in the group, text data that lists the file paths for the input / output data, and subgroups that serve as code conversion processing units by grouping programs that are converted to the same language together, keeping programs that are called by other programs separate and not grouped together, and keeping programs that have already been targeted for conversion in another group separate and not grouped together, and further creating subgroup creation request data that includes an instruction to arrange the created subgroups in order of non-dependency, inputting the created subgroup creation request data into a large-scale language model, and receiving the subgroups and their order output from this large-scale language model. This subgroup creation means creates code conversion request data for each subgroup created and in the received order, including the file path, the language to be converted, the total amount of code content to be converted, and instructions on which to convert to the target language for all programs included in the subgroup; inputs the created code conversion request data into a large-scale language model; and receives the converted code of the programs output from the large-scale language model. It is characterized by having the following features.

[0010] Here, in "perform code conversion processing to a different language for each of the multiple programs that make up the program group," "to a different language" means that the language before conversion and the language after conversion are different for each of the multiple programs, and does not mean that if there are multiple converted programs, the languages ​​of those multiple programs will be different. However, if there are multiple converted programs, the languages ​​of those multiple programs may be different, so if there are multiple converted programs, the languages ​​of those programs may be one or multiple. Therefore, the above "to a different language" means, for example, when there are multiple programs A and B that make up the program group, that the language of program A is different from the language of program a obtained by converting program A, and the language of program B is different from the language of program b obtained by converting program B, and does not mean that the language of the converted program a is different from the language of the converted program b. However, it is possible to specify that the languages ​​of the converted program a are different from the languages ​​of the converted program b, so the languages ​​of the converted programs a and b may be the same or different.

[0011] Furthermore, the "link information of multiple programs and their input / output data obtained by code analysis of the group of programs to be converted" in the "group creation means" refers to information that shows the relationships between each program (the order of processing, the relationship between the caller and the called), the relationship between each program and its input, and the relationship between each program and its output. This is what is known as the code analysis result, or equivalent information such as graph data (see Figure 3).

[0012] Furthermore, in the "group creation means," the "input" of a "group with input and output" is the initial input of the program constituting the group, and does not correspond to the input of data output from the program constituting the group (intermediate input within the group). Therefore, it means the "input" of the group as a whole. Also, the "output" of a "group with input and output" is the final output of the program constituting the group, and does not correspond to the output of data that will be input by the program constituting the group (intermediate output within the group). Therefore, it means the "output" of the group as a whole.

[0013] Furthermore, the "text data that converts the link information of these programs and their input / output data" in the "subgroup creation means" is the result of code analysis, or equivalent information such as graph data converted into text. More specifically, it is, for example, graph data converted into text in Mermaid format.

[0014] In the code conversion system of the present invention, since it is equipped with a group creation means and a subgroup creation means, two-stage grouping can be performed, making it possible to achieve efficient and highly accurate code conversion.

[0015] In other words, the group creation means described above groups programs using the link information of multiple programs and their input / output data obtained through code analysis, making it possible to broadly categorize programs by purpose or use. To put it another way, the grouping done by the group creation means described above is not a grouping that can only be determined by looking at the contents of the code, but a grouping that can be determined by link information. Multiple programs created by one program developer, one program development team, or the same department within a company may be stored and managed in the same location (for example, the same folder). Specifically, for example, a group of programs may contain multiple programs that perform processing related to consumption tax calculation and multiple programs that perform processing related to inventory management. In such cases, the group creation means can use the link information to divide the group of programs into a consumption tax calculation group and an inventory management group. Therefore, the separated consumption tax calculation group and the inventory management group have no link to each other or the link is weak (the meaning of weak link will be explained later in the [Mode for Carrying Out the Invention] section), and are groups that can be separated for data processing purposes. On the other hand, programs belonging to the same group as a result of the grouping are directly or indirectly linked. Furthermore, the processing related to consumption tax calculation and the processing related to inventory management are both processes related to goods, so they can be said to be examples of a group of programs with multiple purposes or uses that are related in some sense. However, here we state that even in such cases (when they seem to be related in content), if the group creation means determines that there is no link or the link is weak using the link information, they will be grouped as different groups. It should be noted that the grouping by the group creation means can, of course, be applied even when multiple completely unrelated programs are mixed together. For example, even if a consumption tax calculation program, a personal schedule management program, a baseball game program, and a traffic congestion prediction program are mixed together (although it is thought that such program management is rare, this is meant to be hypothetical).), and using link information, it is possible to group items that are determined to have no links or weak links.

[0016] Next, the subgroup creation process by the subgroup creation means in the latter stage is performed using a Large-Scale Language System (LLM) by specifying the languages ​​before and after conversion. At this time, instructions are sent to the Large-Scale Language System (LLM) to group programs that are converted to the same language, to keep programs called by other programs separate, and to keep programs that have already been targeted for conversion in another group separate. This makes it possible to group (create subgroups) such that the conversion relationship between the programs before and after conversion is not one-to-one (one program is converted to one program), but rather an N-to-M correspondence conversion (N programs are converted to M programs: N ≠ M). As a result, it becomes possible to perform code conversion processing by the code conversion means, that is, code generation processing in the converted language, in units optimized for the characteristics of the converted language.

[0017] Furthermore, the code conversion process can be performed automatically using the code conversion means, eliminating the need for manual code conversion. Additionally, the code conversion process is performed at the subgroup level using the Large-Scale Language System (LLM) created by the subgroup creation means, resulting in highly accurate conversions and eliminating the need for manual corrections after code conversion. This allows for labor savings in the conversion process and reduces conversion costs.

[0018] Furthermore, since the subgroup creation process using the subgroup creation means is performed using a Large-Scale Language System (LLM), the conversion operator can arbitrarily specify the languages ​​before and after conversion. Therefore, it is not subject to the language constraints of existing conversion products, nor is it subject to the constraints of usable OSs and middleware. This makes it possible to broaden the scope of conversion, thereby achieving the aforementioned objectives.

[0019]

[0020] Furthermore, in the aforementioned code conversion system, An API reference creation means creates API reference creation request data that includes instructions requesting that the converted code created by the code conversion means and the functions contained in the converted code be compiled as an API reference, including the function name, arguments, return value, and processing overview; inputs the created API reference creation request data into a large-scale language model; and receives the API reference information output from the large-scale language model. This includes an API reference storage means that stores the API reference information created by this API reference creation means in association with the identification information of a program including a function, The code conversion means is, When creating code conversion request data for a subgroup that includes a program that calls a function, it is desirable that the code conversion request data be configured to include API reference information about the called function stored in the API reference storage means.

[0021] When creating an API reference for a function called in this way and including it in the code conversion request data, when creating code conversion request data for a subgroup that includes the program on the calling side of the function, in that code conversion request data, information on the API reference for the function called from the program included in the current subgroup targeted for code conversion processing (since the code conversion processing by the code conversion means is performed in order for each subgroup, it means the subgroup for which the processing order has arrived) is included. The program including the function to be called belongs to a subgroup different from the current subgroup targeted for code conversion processing, and since it is already a program for which the code conversion processing by the code conversion means has been completed as a program belonging to another subgroup, it is not included in the entire amount of the pre-conversion code content for the current subgroup targeted for code conversion processing. Therefore, by including the API reference information in the code conversion request data, it becomes possible to improve the accuracy of the conversion of the current subgroup targeted for code conversion processing, that is, the accuracy of the code conversion of the calling-side program. Also, since it is not the code of the function to be called itself but the information on the API reference that is included in the code conversion request data, it becomes possible to reduce the number of tokens sent to the large language system (LLM).

[0022] <Configuration to recreate subgroups reflecting error analysis content>

[0023] Furthermore, in the code conversion system described above, Post-conversion code execution means for executing the post-conversion code starting from the lowest-level program with a dependency that is not called from any program, and Backup file storage means for storing all files of data linked to the programs within the group, and Backup table storage means for storing all tables linked to the programs within the group, and Targeting files and tables of data that are only output from programs within a group and not read, comparing the data and tables output as the execution result by the post-conversion code execution means with the data and tables stored in the backup file storage means and the backup table storage means, and verification means for determining whether they match. Feedback message storage means for storing, as feedback messages, the error information obtained as the execution result by the post-conversion code execution means and / or the output difference when a mismatch is determined in the comparison by the verification means. When error information is obtained as the execution result by the post-conversion code execution means and / or when it is determined that there is no match in the comparison by the verification means, create error analysis request data including the post-conversion code of all programs within the group and their paths, sample data of files and tables of all data input and output from programs within the group, the feedback messages stored in the feedback message storage means, and an instruction text asking to analyze the cause of the execution error by the post-conversion code execution means and the mismatch in the comparison by the verification means and the countermeasures. Input the created error analysis request data into a large language model and receive the error analysis content output from the large language model. Error analysis means. Error analysis content storage means for storing the error analysis content obtained by this error analysis means. The subgroup creation means When performing processing for the second and subsequent loops for the same group, it is desirable that the subgroup creation request data additionally includes the error analysis content stored in the error analysis content storage means and includes an instruction text asking to recreate the subgroup based on the error analysis content.

[0024] By reconfiguring the system to recreate subgroups based on the error analysis results, the process of creating subgroups using the subgroup creation method can be repeated for the same group until no execution errors occur and no discrepancies occur in the output data. This improves the accuracy of code conversion and eliminates the need for manual code correction after conversion, thus promoting labor savings in the conversion process.

[0025] <Invention of a program>

[0026] Furthermore, the program of the present invention is intended to make a computer function as the code conversion system described above.

[0027] Furthermore, the above program or any part thereof can be recorded and stored or distributed on recording media such as magneto-optical disks (MO), compact discs (CD), digital versatile disks (DVD), flexible disks (FD), magnetic tape, read-only memory (ROM), electrically erasable and rewritable read-only memory (EEPROM), flash memory, random access memory (RAM), hard disk drives (HDD), solid state drives (SSD), and flash disks. It can also be transmitted using transmission media such as wired networks like local area networks (LAN), metropolitan area networks (MAN), wide area networks (WAN), the Internet, intranets, extranets, wireless communication networks, or combinations thereof, and can also be transmitted on carrier waves. Moreover, the above program may be part of another program, or may be recorded on a recording media together with a separate program. [Effects of the Invention]

[0028] As described above, the present invention performs code conversion by performing two-stage grouping, which has the effect of promoting labor savings in conversion, expanding the scope of conversion targets, improving conversion accuracy, and suppressing conversion costs. [Brief explanation of the drawing]

[0029] [Figure 1] An overall configuration diagram of a code conversion system according to one embodiment of the present invention. [Figure 2] A diagram showing the configuration of the pre- and post-conversion language correspondence storage means of the above embodiment. [Figure 3] A diagram illustrating the preparation process before code conversion in the above embodiment. [Figure 4] A diagram showing the configuration of the API reference storage means of the above embodiment. [Figure 5] An explanatory diagram showing an image of the N-to-M conversion of the above embodiment. [Figure 6] A figure showing an example of the two-stage grouping of the above embodiment. [Figure 7] A diagram showing the configuration of the code analysis result storage means of the above embodiment. [Figure 8] A diagram showing the configuration of the conversion status storage means of the above embodiment. [Figure 9] A figure showing an example of the graph structure of group G1 in the above embodiment. [Figure 10] A figure showing an example of the graph structure of group G2 in the above embodiment. [Figure 11] A figure showing an example of the graph structure of group G3 in the above embodiment. [Figure 12] A flowchart illustrating the overall flow (part 1) of the code conversion process in the above embodiment. [Figure 13] A flowchart illustrating the overall flow (part 2) of the code conversion process in the above embodiment. [Figure 14] A diagram illustrating the usage scenarios of the large-scale language model (LLM) of the above embodiment. [Figure 15] This diagram illustrates the changes in the situation as the code conversion process of group G1 in the above embodiment progresses. [Figure 16] This figure shows an example of using a large-scale language model (LLM) by the code analysis means of the above embodiment. [Figure 17] This figure shows an example of using a large-scale language model (LLM) by the subgroup creation means of the above embodiment. [Figure 18] This figure shows an example of using a large-scale language model (LLM) by the code conversion means of the above embodiment. [Figure 19] This figure shows an example of the use of a large-scale language model (LLM) during re-conversion by the code conversion means of the above embodiment. [Figure 20] This figure shows an example of using a large-scale language model (LLM) by the API reference creation means of the above embodiment. [Figure 21] This figure shows an example of using a large-scale language model (LLM) by the error analysis means of the above embodiment. [Modes for carrying out the invention]

[0030] One embodiment of the present invention will be described below with reference to the drawings. Figure 1 shows the overall configuration of the code conversion system 10 of this embodiment. Figure 2 shows an example of the configuration of the pre- and post-conversion language correspondence relationship storage means 44, Figure 3 shows the status of the preparation process before code conversion, Figure 4 shows an example of the configuration of the API reference storage means 50, Figure 5 shows an image of N-to-M conversion, Figure 6 shows an example of two-stage grouping, Figure 7 shows an example of the configuration of the code analysis result storage means 45, and Figure 8 shows an example of the configuration of the conversion status storage means 49. Furthermore, Figures 9 to 11 show examples of the graph structure of groups G1, G2, and G3, and Figures 12 and 13 show the overall flow of the code conversion process in flowcharts. Figure 14 is an explanatory diagram of a usage scenario of a large-scale language model (LLM), and Figure 15 is an explanatory diagram showing the changes in the situation as the code conversion process of group G1 progresses. Figures 16 to 21 show examples of the use of a large-scale language model (LLM) by the code analysis means 23, subgroup creation means 26, code conversion means 27, code conversion means 27 during re-conversion, API reference creation means 28, and error analysis means 32, respectively.

[0031] <Overall configuration of code conversion system 10>

[0032] In Figure 1, the code conversion system 10 includes a code conversion server 20 composed of one or more computers. This code conversion server 20 is connected via network 1 to a service provision system 60 using Large Language Models (LLMs) and to a worker terminal 70 operated by a conversion worker (a person who performs code conversion work, hereinafter simply referred to as "worker").

[0033] Here, Network 1 is an external network primarily composed of the Internet, but it may also be a combination of the Internet and internal networks such as LANs or intranets, and it does not matter whether it is wired, wireless, or a hybrid of wired and wireless; in short, it is sufficient if it can transmit information at a reasonable speed between multiple locations (regardless of distance).

[0034] Furthermore, the service provision system 60 using a Large-Scale Language Model (LLM) is a computer system that provides cloud API (Application Programming Interface) services, and can employ, for example, Chat Generative Pre-trained Transformer (ChatGPT: Azure OpenAI ChatCompletion API GPT-4o), OpenAI's GPT-3.5, Google's Palm and Palm2, Amazon Web Services (AWS)'s Titan, and Meta's Llama.

[0035] Furthermore, the worker terminal 70 is comprised of a computer and includes display means such as an LCD display and input means such as a mouse and keyboard. This worker terminal 70 may be a notebook personal computer or a portable device such as a smartphone or tablet.

[0036] <Configuration of Code Conversion Server 20>

[0037] The code conversion server 20 is composed of one or more computers and includes processing means 20A that perform various code conversion processes to convert program code written in various languages ​​into code in a different language, and storage means 40 that store data necessary for the various processes performed by the processing means 20A.

[0038] The processing means 20A includes a conversion target arrangement means 21, a conversion and conversion language specification means 22, a code analysis means 23, a graphing means 24, a group creation means 25, a subgroup creation means 26, a code conversion means 27, an API reference creation means 28, a converted code file output means 29, a converted code execution means 30, a verification means 31, and an error analysis means 32.

[0039] Here, each of the means 21 to 32 included in the processing means 20A is implemented by a central processing unit (CPU) located inside the code conversion server 20, one or more programs that define the operating procedure of this CPU, and working memory such as main memory and cache memory. Details of each of these means 21 to 32 will be described later.

[0040] Furthermore, the storage means 40 includes a pre-conversion code file storage means 41, an input / output file storage means 42, an input / output table storage means 43, a pre-conversion language correspondence relationship storage means 44, a code analysis result storage means 45, a graph data storage means 46, a group storage means 47, a subgroup storage means 48, a conversion status storage means 49, an API reference storage means 50, a post-conversion code file storage means 51, a backup file storage means 52, a backup table storage means 53, a feedback message storage means 54, and an error analysis content storage means 55.

[0041] Here, the means 41 to 55 included in the storage means 40 can be, for example, non-volatile memory such as a hard disk drive (HDD) or solid-state drive (SSD). The group storage means 47, subgroup storage means 48, conversion status storage means 49, API reference storage means 50, feedback message storage means 54, and error analysis content storage means 55 may be volatile memory (main memory).

[0042] <Configuration of code conversion server 20 / processing means 20A / conversion target placement means 21>

[0043] The conversion target placement means 21, in accordance with the operator's operation instructions from the operator terminal 70, executes the process of storing each file (program file) containing each of the multiple programs (program code) that constitute the group of programs to be converted in the pre-conversion code file storage means 41. This group of programs is a collection of programs that the operator wants to convert the language of, and is a collection of programs before conversion. Since each file is assigned a file name, the file path, which includes this file name and information indicating its storage location (e.g., folder name), becomes the program identification information.

[0044] Furthermore, the conversion target placement means 21, in accordance with the operator's operation instructions from the operator terminal 70, stores input files (input data files) and output files (output data files) from the input and output data of multiple programs constituting the program group to be converted in the input / output file storage means 42, and also executes the process of storing input table data and output table data in the input / output table storage means 43. This input and output data is prepared in advance by the operator. That is, the operator prepares multiple programs constituting the program group to be converted, and the input files (input data files) and input table data necessary to execute these programs, and executes the multiple programs constituting the program group to be converted in the execution environment (OS, middleware, language execution environment) prepared (installed) by the operator on the code conversion server 20, and collects the output files (output data files) and output table data obtained as a result of the execution. The purpose of collecting output files (output data files) and output table data in this way is to obtain the correct output data, and to compare the output with the output with the pre-conversion code and determine if they match.

[0045] Furthermore, whether the data storage format for input / output data (data input to a program and data output from a program) is a file or a table is irrelevant to the content of this application. Therefore, even when only files (data files) are described in the description of input / output, without listing files and tables in parallel, input / output of data to tables may still be included.

[0046] <Configuration of code conversion server 20 / processing means 20A / conversion and pre- and post-conversion language specification means 22: Figure 2>

[0047] The pre- and post-conversion language specification means 22 receives a specification input regarding the correspondence between the pre-conversion language and the post-conversion language from the operator operating the operator terminal 70 via the network 1, and executes a process to store the received specification information in the pre- and post-conversion language correspondence relationship storage means 44 (see Figure 2). Specifically, it accepts instructions such as rewriting JCL to bash, or Cobol to Python. In the example in Figure 2, the pre- and post-conversion language correspondence relationship storage means 44 only shows the correspondence between the pre-conversion language and the post-conversion language, but the post-conversion language may be specified using the language of the pre-conversion code, middleware, or OS as a key. It may also be possible to specify the post-conversion language for each program file.

[0048] Furthermore, this correspondence between the languages ​​before and after conversion is not applied uniformly to the entire set of programs, but rather to each of the multiple programs that make up the set. Therefore, for example, if all of several programs are written in Cobol, it is not necessary to specify that all of those programs be rewritten in Python. The set of programs to be converted (before conversion) may contain programs written in multiple languages, and the set of programs after conversion may contain programs written in multiple languages, or may consist of programs written in only one language.

[0049] <Configuration of code conversion server 20 / processing means 20A / code analysis means 23: Figures 3, 7, 14, and 16>

[0050] The code analysis means 23 performs code analysis on multiple programs that constitute the group of programs to be converted, and stores the analysis results in the code analysis result storage means 45 (see Figures 3 and 7). The obtained code analysis results are link information that shows the dependencies between programs, the relationship between a program and its input data, and the relationship between a program and its output data. This information can be visualized (graphed) by connecting each program and each data with lines that show their links.

[0051] Specifically, as shown in Figures 14 and 16, the code analysis means 23 creates code analysis request data for each program (each code) included in the group of programs to be converted, transmits the created code analysis request data to the service provision system 60 using a large-scale language model (LLM) via the network 1, and receives LLM response data transmitted from the service provision system 60 via the network 1.

[0052] Here, the code analysis request data includes the code of the program to be converted and instructions to perform code analysis and extract the input / output file name (file path), input / output table name, and call code name (file path of the called program, i.e., the file path of the program called from the current program). The LLM response data obtained for each program (each code) includes the extracted input / output file name (file path), input / output table name, and call code name (file path of the called program). For example, in the case of program A in group G1 of Figure 9, file d1 is input, file d2 is output, and program X is called, so LLM response data as shown at the bottom of Figure 16 is obtained, and the code analysis result storage means 45 stores the code analysis result (link information) as shown in Figure 7 or Figure 3.

[0053] In this application, as shown in Figures 3 and 7, symbols such as A, B, C, ... are used to describe the program identification information (ID). These symbols are the same as the file path, which indicates the location where the program file is stored. Therefore, although Figures 3 and 7 show separate columns for the symbols A, B, C, ... and the file path (... / ... / xxx.xxx) for clarity, these represent the same information and only need to be in one column. For example, when "Program A" is written in this application's description, it means the program located at file path A. The reason for using the file path (including the file name) as the program identification information (ID), rather than the file name, is to account for the possibility that program files with the same file name may exist in different storage locations (folders, etc.). The same applies to input / output files; more precisely, the file path, not the file name, is the identification information for the input / output data. Also, in this application's description, the file path is sometimes simply referred to as "path." Furthermore, in Figures 3, 17, etc., the set A and B is written as {A, B}, which refers to {file path of program A, file path of program B}.

[0054] <Configuration of code conversion server 20 / processing means 20A / graphing means 24>

[0055] The graphing means 24 converts the code analysis results (link information showing inter-program dependencies, the relationship between a program and its input data, and the relationship between a program and its output data) stored in the code analysis result storage means 45 (see Figures 3 and 7) into a graph structure (see Figures 9 to 11), and stores the resulting graph data (link information) in the graph data storage means 46 (see Figure 3). This graph data is information for graphically displaying the code analysis results (link information) stored in the code analysis result storage means 45 (see Figures 3 and 7), and in terms of information quantity, it is equivalent to the code analysis results. More specifically, as shown in Figure 3, it is a collection of "data file - (read) → program code", "program code - (written) → data file", "program code - (called) → program code", etc., and specifically, it is as shown in the graph data of groups G1, G2, and G3 shown in the lower right parts of Figures 9 to 11.

[0056] <Configuration of code conversion server 20 / processing means 20A / group creation means 25: Figure 3>

[0057] The group creation means 25 uses the link information of multiple programs and their input / output data obtained by code analysis of the group of programs to be converted (information indicating dependencies between programs, the relationship between a program and its input data, and the relationship between a program and its output data) to divide the group of programs into groups with inputs and outputs, and executes the process of storing the information of the groups created by this group division in the group storage means 47 (see Figure 3). The group division by this group creation means 25 is not a group division that can be determined without looking at the contents of the code, but a group division that can be determined by link information.

[0058] Therefore, each group obtained by grouping using this group creation means 25 is a group that has no links to external entities (groups other than itself) or has weak links to external entities. Weak links mean that although links to external entities exist, the informational value of those links is low, such as when there are no links to external entities other than common programs (programs linked from a large number of programs) or master data (data linked from a large number of programs). Whether to group based on the absence of links or on weak links may be selected by the user of this system each time, or it may be fixed by the system. Furthermore, the criteria for determining whether a link is weak, such as which is a common program or which is master data, may be specified in advance by the user of this system, or the system may make the determination using link information (for example, a threshold determination may be made based on whether there are a large number of links or not).

[0059] On the other hand, programs that have been grouped by the group creation means 25 and come to belong to the same group are linked directly or indirectly. An indirect link means a link in which data or programs are intermediaries, and a direct link is a case where they are linked in a chain-like fashion.

[0060] In this embodiment, the creation of groups (the first stage of two-stage grouping) is performed using the overall graph data (link information) of the program group to be converted, which is stored in the graph data storage means 46 (see Figure 3). In the examples in Figures 3 and 6, three groups G1, G2, and G3 are created, and Figures 9 to 11 show specific examples of the graph structures of each of the three created groups G1, G2, and G3.

[0061] Here, the "input" of a group with inputs and outputs, as already mentioned in [Means for Solving the Problem], is the initial input of the program that makes up the group, and does not correspond to the input of data output from the program that makes up the group (intermediate input within the group). Therefore, it means the "input" of the group as a whole. Specifically, for example, data d1 of group G1 in Figure 9, data d9 of group G2 in Figure 10, and data d21 of group G3 in Figure 11 correspond to the "input" of the group as a whole. On the other hand, for example, data d2 of group G1 in Figure 9 is an input of program B, but since it is output from program A, it is an intermediate input within group G1 and therefore does not correspond to the "input" of the group as a whole.

[0062] Furthermore, the "output" of a group with inputs and outputs, as already mentioned in [Means for Solving the Problem], is the final output of the program constituting the group (the last in the link; therefore, if the link branches, it is the final output in each link, resulting in multiple outputs), and does not correspond to the output of data that will be input by the program constituting the group (intermediate outputs within the group). Therefore, it means the "output" of the group as a whole. Specifically, for example, data d5 and d8 of group G1 in Figure 9, data d16 of group G2 in Figure 10, and data d17, d19, and d20 of group G3 in Figure 11 correspond to the "output" of the group as a whole. On the other hand, for example, data d3 of group G1 in Figure 9 is output from program B, but since it is input to programs C and E, it is an intermediate output within group G1 and therefore does not correspond to the "output" of the group as a whole.

[0063] Furthermore, the group creation means 25 ensures that the group it creates includes one or more programs (codes), but in doing so, it groups them according to the following conditions. That is, for processes that involve input and output but only perform one-to-one processing (processes that input one data and output one other data), it does not create a group consisting of a single program (code), but rather, if there is a preceding (upstream) program (code), it is included in the same group as that program. Specifically, for example, the process of program N in Figure 10 takes one data d15 as input and outputs another data d16, and there is a preceding (upstream) program M (a program that outputs data d15), so program N is not created as a group consisting of a single program (code), but is included in the same group as the preceding (upstream) program M. On the other hand, the processing of program M in Figure 10 takes two data points, d12 and d14, as input, and therefore does not meet the condition of only performing one-to-one processing as described above. Thus, the processing after program M (in the case of Figure 10, the processing of programs M and N) could belong to a different group of programs. However, in the example of Figure 10, they are included in the same group as programs J and L, which perform upstream processing that outputs the two data points d12 and d14. In this case, whether to put them in the same group or different groups may be determined by other conditions (for example, total code size, similarity of processing content, etc.) or may be selected manually.

[0064] <Configuration of code conversion server 20 / processing means 20A / subgroup creation means 26: Figures 3, 5, 6, 9-11, 14, 17>

[0065] The subgroup creation means 26 creates subgroup creation request data for each group created by the group creation means 25 in the first stage of grouping (creation of subgroups that will be code conversion units) for the second stage of grouping. It then transmits the created subgroup creation request data to the service provision system 60 using a large-scale language model (LLM) via the network 1, receives LLM response data transmitted from the service provision system 60 via the network 1, and executes a process to store the information of the subgroups created in this second stage of grouping in the subgroup storage means 48 (see Figure 3).

[0066] Here, the subgroup creation request data includes, as shown in Figures 14 and 17, text data that is a text representation of the code of all programs included in the group and the link information of these programs and their input / output data; text data that lists the file paths (including the filenames of the program files), the language before conversion, the language after conversion, and the number of times each program is called by programs (code) outside the group for all programs included in the group; text data that lists the file paths (including the filenames of the data files) for the input / output data; instructions to create subgroups that will serve as code conversion processing units by grouping programs that will be converted to the same language together, keeping programs that are called by other programs separate, and keeping programs that have already been targeted for conversion in another group separate; and further instructions to arrange the created subgroups in order of their lack of dependencies. In addition, the LLM response data obtained for each group includes information on the subgroups created by the Large-Scale Language Model (LLM) and their order (information on the order in which the code of the subgroups will be converted).

[0067] As indicated by the asterisk in the central part of Figure 17, the instructions and explanatory texts for the information sent to the LLM along with the instructions have been replaced with language that the LLM can understand, so the terminology used in the explanation of this application (for example, "subgroup") is not used as is. In this application, when explaining two-stage grouping, the set of programs created by performing the first-stage grouping is simply called a "group," and the set of programs for code conversion (which will be the code conversion processing unit) created by performing the second-stage grouping on that first-stage group is called a "subgroup." However, since such an explanation is not given to the LLM, it cannot understand the meaning of "subgroup." The same applies to other types of request data input to the LLM.

[0068] Of the information included in these subgroup creation request data, the "text data with link information converted into text" is, more specifically, in this embodiment, text data in mermaid format of graph data (graph data for each group stored in the group storage means 47 (see Figure 3)) for all programs included in the group and their input / output data, as shown in Figure 3. Therefore, the subgroup creation means 26 creates mermaid-format text data for each group (first-level group), as shown in Figure 3, and includes it in the subgroup creation request data for each group.

[0069] Furthermore, the "language before conversion" is the language of the execution environment prepared by the operator on the code conversion server 20 along with the OS and middleware when executing multiple programs that constitute the group of programs to be converted (before conversion) by the conversion target placement means 21, and the "language after conversion" is the language stored in the conversion-to-conversion-to-conversion-language correspondence relationship storage means 44 (see Figure 2) in association with the "language before conversion". Therefore, when the subgroup creation means 26 creates subgroup creation request data, it uses the "language before conversion" to obtain the "language after conversion" from the conversion-to-conversion-to-language correspondence relationship storage means 44.

[0070] Figure 6 shows an example where the 24 programs A, B, C, ... that make up the group of programs to be converted are grouped into three groups: Group G1 containing 10 programs A, B, C, D, E, F, G, X, Y, Z; Group G2 containing 8 programs H, I, J, K, L, M, N, X; and Group G3 containing 7 programs P, Q, R, T, U, V, W. In this example, since program X is included in both Group G1 and Group G2, program X is used in multiple groups. Furthermore, group G1 is divided into six subgroups SG101, SG102, SG103, SG104, SG105, and SG106; group G2 is divided into four subgroups SG201, SG202, SG203, and SG204; and group G3 is divided into six subgroups SG301, SG302, SG303, SG304, SG305, and SG306. The graph structures of groups G1, G2, and G3 in Figures 9 to 11 correspond to these second-level groupings.

[0071] Furthermore, the instruction to "group programs that are converted to the same language" included in the subgroup creation request data mentioned above means that the converted program group may contain programs in multiple languages, so programs should be grouped by the converted language. Note that the pre-conversion program group may also contain programs in multiple languages. For example, as shown in group G3 of Figure 11, program P written in JCL language and programs Q, R, U, etc. written in COBOL language may be mixed together. This example is when a JCL language program manages the launch of COBOL language programs. Therefore, to explain more generally, if the group of programs before conversion is a mixture of programs for languages ​​α, β, γ, and δ, and the pre- and post-conversion language correspondence relationship storage means 44 (see Figure 2) stores the correspondence relationships from language α to language ξ, from language β to language ξ, from language γ to language ξ, and from language δ to language ξ, then the group of programs after conversion will all be programs for language ξ. If the pre- and post-conversion language correspondence relationship storage means 44 (see Figure 2) stores the correspondence relationships from language α to language ξ, from language β to language ξ, from language γ to language η, and from language δ to language η, then the group of programs after conversion will be a mixture of programs for languages ​​ξ and η. In the latter case, programs that are coded to language ξ may be grouped together in the same subgroup, and programs that are coded to language η may also be grouped together in the same subgroup. In other words, programs that are coded to language ξ and programs that are coded to language η cannot be grouped together.

[0072] Furthermore, the instruction to "keep programs called by other programs separate and not group them together" is intended to ensure that programs called by other programs (called programs) are not grouped with the calling programs (the programs that initiate the call) but are placed in separate subgroups, as they need to be coded before the calling programs. Specifically, for example, program X in group G1 in Figure 9 is called by programs A and C, so it is not grouped with programs A and C, but is placed in an independent subgroup SG102. Similarly, program Y in group G1 in Figure 9 is called by program E, so it is not grouped with program E, but is placed in an independent subgroup SG105. Also, program Z is called by program Y, so it is not grouped with program Y, but is placed in an independent subgroup SG106.

[0073] Furthermore, the instruction to "keep programs that have already been designated for conversion in another group separate" is intended to allow the code conversion process by the code conversion means 27 to be skipped. This is because the subgroup creation process by the subgroup creation means 26 is performed sequentially for each group (first-level group). Programs that belong to groups (first-level groups) for which the subgroup creation process by the subgroup creation means 26 has already been designated for conversion when the code conversion means 27 performs the code conversion process. Since there is no need to convert them again, the code conversion process for those programs is skipped. Specifically, for example, program X in group G2 in Figure 10 has already been designated for conversion in another group G1 (it has been assigned to subgroup SG102, which is the unit of conversion processing), so it is made into an independent subgroup SG202, allowing the code conversion process by the code conversion means 27 to be skipped. The code conversion process performed by the code conversion means 27 is executed sequentially for each group (first-stage group) (for example, in the order of groups G1, G2, and G3), and further, within each group, it is executed in subgroup units.

[0074] Furthermore, the instruction to "arrange the created subgroups in order from those with no dependencies" is intended to ensure that the called program (the program being called) is coded before the calling program (the program making the call). Therefore, the subgroups should be arranged in order from the called program (the program being called), that is, from those with no dependencies, so that the coding can be performed in that order. Specifically, for example, in group G1 in Figure 9, programs A and C call program X, so programs A and C have dependencies on program X, and program X is a program with no dependencies. Therefore, subgroup SG102, which contains program X, is coded first, followed by subgroup SG101, which contains programs A and B, and then subgroup SG103, which contains programs C and D. Consequently, the LLM response data output from the Large-Scale Language System (LLM) will be arranged in the order SG102={X}, SG101={A,B}, and SG103={C,D}, as shown in the lower left of Figure 9. Similarly, in group G1 in Figure 9, program E calls program Y, and program Y then calls program Z. Therefore, program E has a dependency on program Y, and program Y has a dependency on program Z. Since program Z is a program with no dependencies, subgroup SG106, which includes program Z, is converted first, followed by subgroup SG105, which includes program Y, and then subgroup SG104, which includes programs E, F, and G. Consequently, the LLM response data output from the Large-Scale Language System (LLM) is arranged in the order of SG106={Z}, SG105={Y}, and SG104={E,F,G}, as shown in the lower left of Figure 9.

[0075] Furthermore, when the subgroup creation means 26 processes the same group for the second time or later in the loop (when processing step S8 via step S25 in Figure 13, which will be described later), it adds the error analysis content stored in the error analysis content storage means 55 to the subgroup creation request data, and also adds an instruction statement requesting that the subgroup be recreated based on the error analysis content.

[0076] <Configuration of code conversion server 20 / processing means 20A / code conversion means 27: Figures 14, 18, 19, 5>

[0077] As shown in Figures 14, 18, and 19, the code conversion means 27 creates code conversion request data for each subgroup created by the subgroup creation means 26, and in the order in which the subgroups were received. This data includes the file path (including the program file name), the language to be converted, the total amount of the code (program code) to be converted, and an instruction to convert to the language to be converted for all programs included in the subgroup. The code conversion request data is then transmitted via network 1 to the service provision system 60 using a large-scale language model (LLM), and the converted code for all programs included in the subgroup is received from the service provision system 60 via network 1 as LLM response data.

[0078] Here, the "language before conversion" and "language after conversion" among the information to be included in the code conversion request data are the same as in the case of the subgroup creation request data creation process by the subgroup creation means 26 described above.

[0079] Furthermore, the code conversion means 27 skips code conversion for subgroups that have already been converted in another group that is being converted earlier. In other words, it does not create code conversion request data for subgroups that have already been converted in another group. Information on whether or not a subgroup has been converted is obtained from the conversion status storage means 49 in Figure 8. Specifically, as shown in the lower left part of Figure 10, the code conversion of program X in group G2 is skipped because it has already been completed in group G1.

[0080] Furthermore, the code conversion means 27 updates the status of the conversion status storage means 49 (see Figure 8) from "waiting for conversion" to "converted" for programs that have completed the code conversion process.

[0081] Figure 5 illustrates how an N-to-M conversion is achieved through the subgroup creation process by the subgroup creation means 26 and the code conversion process on a subgroup basis by the code conversion means 27. The group of programs to be converted, shown on the left side of Figure 5, for example, contains a mix of JCL and COBOL programs. This group consists of five programs, each with the functions of data collection, data cleansing, data processing, LD file creation, and data loading. In this case, as shown by the dotted lines on the right side of Figure 5, the subgroup creation means 26 creates three subgroups with Java (Java is a registered trademark) as the target language. That is, the three programs performing data cleansing, data processing, and LD file creation before conversion are combined into one subgroup. Therefore, in this example, the five programs before conversion are converted into three programs, resulting in a 5-to-3 conversion.

[0082] Furthermore, in the example in Figure 6, the transformation for group G1 is 10:6, for group G2 it is 8:4, and for group G3 it is 7:6.

[0083] Furthermore, as shown in Figures 18 and 19, when the code conversion means 27 creates code conversion request data for a subgroup containing a program that calls a function, it additionally includes API reference information about the called function (a function included in the called program) stored in the API reference storage means 50 (see Figure 4) within the code conversion request data. Specifically, for example, since programs A and C in group G1 in Figure 9 call program X, when creating code conversion request data for subgroup SG101 containing program A and subgroup SG103 containing program C, the API reference information about program X (function) already stored in the API reference storage means 50 (see Figure 4) is additionally included within this code conversion request data. Similarly, since program E in group G1 in Figure 9 calls program Y, when creating code conversion request data for subgroup SG104 containing program E, the API reference information about program Y (function) already stored in the API reference storage means 50 (see Figure 4) is additionally included within this code conversion request data. Furthermore, since program Y in group G1 in Figure 9 calls program Z, when creating code conversion request data for subgroup SG105 which includes program Y, the API reference information for program Z (function) that is already stored in the API reference storage means 50 (see Figure 4) is added to this code conversion request data.

[0084] Furthermore, as shown in Figure 19, when the code conversion means 27 processes the same group for the second time or later in the loop (when processing step S9 via step S25 in Figure 13, which will be described later), it adds the error analysis content stored in the error analysis content storage means 55 to the code conversion request data, and also adds an instruction statement requesting that the code be re-converted based on the error analysis content.

[0085] <Configuration of code conversion server 20 / processing means 20A / API reference creation means 28: Figures 14 and 20>

[0086] As shown in Figures 14 and 20, the API reference creation means 28 creates API reference creation request data that includes instructions requesting that the converted code created by the code conversion means 27 and the functions contained in the converted code be compiled as an API reference, including the function name, arguments, return value, and processing overview. The created API reference creation request data is transmitted via network 1 to the service provision system 60 using a large-scale language model (LLM). The service provision system 60 receives the API reference information output from the large-scale language model (LLM) (including the function name, arguments, return value, and processing overview for the function) as LLM response data transmitted via network 1 from the service provision system 60. The API reference creation means 28 then stores the received API reference information in the API reference storage means 50 (see Figure 4) in association with the identification information of the program containing the function.

[0087] <Configuration of code conversion server 20 / processing means 20A / converted code file output means 29>

[0088] The converted code file output means 29 performs the process of storing the converted code (program code) file obtained by the processing by the code conversion means 27 in the converted code file storage means 51.

[0089] <Configuration of code conversion server 20 / processing means 20A / converted code execution means 30>

[0090] The converted code execution means 30 executes the converted code (program code) obtained by the code conversion means 27, starting with the program with the lowest dependency that is not called by any other program. In addition, if an execution error occurs, the converted code execution means 30 also executes the process of storing the error information (standard output at the time of the error, standard error output, return code, log output) as a feedback message in the feedback message storage means 54. Standard output and standard error output refer to the data output destination (or the data output there) and error output destination (or the error output there) in the initial state of a program running on a computer (a state in which nothing is specified).

[0091] The reason we execute programs "starting with the program with the lowest dependency level" is that if we execute the program with the lowest dependency level, the programs that are called by that program will be executed automatically. Specifically, for example, in group G1 in Figure 9, as shown on the right end of Figure 15, the converted program a obtained by converting the code of subgroup SG101 containing programs A and B, the converted program c obtained by converting the code of subgroup SG103 containing programs C and D, and the converted program e obtained by converting the code of subgroup SG104 containing programs E, F, and G are the programs with the lowest dependency level. Therefore, we start with programs a, c, and e and execute all the converted programs in group G1. This is because if we execute programs a, c, and e, programs x, y, and z will be executed automatically.

[0092] Furthermore, when the converted code execution means 30 executes the converted programs within the group as described above, it performs the following preparatory processing in advance. First, for all data files and table data linked to the converted programs within the group, it copies the data files stored in the input / output file storage means 42 to the backup file storage means 52, and copies the table data stored in the input / output table storage means 43 to the backup table storage means 53 to obtain a backup. After this backup is obtained, it deletes or clears the data files stored in the input / output file storage means 42 and the table data stored in the input / output table storage means 43.

[0093] Next, only the data files and table data that are read by the programs within the group but not output are rearranged in the input / output file storage means 42 and input / output table storage means 43. Specifically, for example, in the case of group G1 in Figure 9, the data file and table data that are read by the programs within the group but not output is data d1, so this data d1 is rearranged. Then, after this state has been set up in advance, when the converted program within the group is executed, the data files and table data rearranged in the input / output file storage means 42 and input / output table storage means 43 are input and used in the processing of the converted program (converted code), and the data files and table data obtained in this processing are output to the input / output file storage means 42 and input / output table storage means 43.

[0094] <Configuration of code conversion server 20 / processing means 20A / verification means 31>

[0095] The verification means 31 targets files and tables of data that are output only from programs within the group and are not read, and compares the data and tables output as a result of execution by the converted code execution means 30 with the data and tables stored in the backup file storage means 52 and the backup table storage means 53 to determine whether they match or not. If they do not match, it executes a process to store the difference in the output as a feedback message in the feedback message storage means 54. Specifically, for example, in the case of group G1 in Figure 9, the data that are output only from programs within the group and are not read are data d5 and d8, so the verification means 31 targets these data d5 and d8 and compares the execution result of the converted code with the backed-up correct data.

[0096] <Configuration of code conversion server 20 / processing means 20A / error analysis means 32: Figures 14 and 21>

[0097] As shown in Figures 14 and 21, the error analysis means 32, when error information is obtained as a result of execution by the converted code execution means 30, and / or when a mismatch is determined by comparison by the verification means 31, creates error analysis request data that includes the converted codes and paths of all programs in the group (paths of program files, including file names), sample data of files and tables of all data input and output from the programs in the group, feedback messages stored in the feedback message storage means 54, and instructions requesting an analysis of the cause of the execution error by the converted code execution means 30 and the mismatch in the comparison by the verification means 31, and how to deal with it. The error analysis means 32 transmits the created error analysis request data to the service provision system 60 using the Large-Scale Language Model (LLM) via the network 1, receives the error analysis content output from the Large-Scale Language Model (LLM) as LLM response data transmitted from the service provision system 60 via the network 1, and executes a process to store the received error analysis content in the error analysis content storage means 55.

[0098] <Configuration of code conversion server 20 / storage means 40 / pre-conversion code file storage means 41>

[0099] The pre-conversion code file storage means 41 stores each file (program file) that contains multiple programs (program code) that make up the group of programs to be converted (pre-conversion).

[0100] <Configuration of code conversion server 20 / storage means 40 / input / output file storage means 42>

[0101] The input / output file storage means 42 stores input files (input data files) input by multiple programs that constitute the group of programs to be converted (before conversion), and output files (output data files) output from these pre-conversion program groups.

[0102] <Configuration of code conversion server 20 / storage means 40 / input / output table storage means 43>

[0103] The input / output table storage means 43 stores input table data input by multiple programs that constitute the group of programs to be converted (before conversion), and output table data output from these pre-conversion program groups.

[0104] <Configuration of code conversion server 20 / storage means 40 / conversion-pre-language correspondence storage means 44>

[0105] As shown in Figure 2, the pre- and post-conversion language correspondence relationship storage means 44 stores specification information indicating the correspondence between the language before conversion and the language after conversion, which is received by the operator via the pre- and post-conversion language specification means 22.

[0106] <Configuration of code conversion server 20 / storage means 40 / code analysis result storage means 45>

[0107] As shown in Figures 3 and 7, the code analysis result storage means 45 stores the code analysis processing for multiple programs that constitute the group of programs to be converted (before conversion) by the code analysis means 23. Specifically, for example, it stores the program identification information (ID), the identification information of the data to be read (input file name, or more precisely, its file path), the identification information of the data to be written (output file name, or more precisely, its file path), the identification information (ID) of the program to be called (the program that is called from the program itself), and the location where the program is stored (file path), in association with each other. Figure 7 shows examples of code analysis results corresponding to groups G1, G2, and G3 in Figures 9, 10, and 11. Note that the location where the program is stored (file path) is the program identification information (ID), so although these are listed separately in Figures 3 and 7, they can be in a single column.

[0108] <Configuration of code conversion server 20 / storage means 40 / graph data storage means 46: Figures 3, 9-11>

[0109] As shown in Figure 3, the graph data storage means 46 stores the overall graph data (link information) of the program group to be converted, obtained by processing by the graphing means 24. Figures 9 to 11 show specific examples of graph data for each group.

[0110] <Configuration of code conversion server 20 / storage means 40 / group storage means 47: Figure 3>

[0111] As shown in Figure 3, the group storage means 47 stores information about the groups created by the group creation means 25. Specifically, the group storage means 47 stores the group identification information, the identification information of the programs that make up the group, and the graph data of the group (graph data belonging to each group from the overall graph data of the group of programs to be converted, stored in the graph data storage means 46) in association with each other.

[0112] <Configuration of code conversion server 20 / storage means 40 / subgroup storage means 48: Figure 3>

[0113] As shown in Figure 3, the subgroup storage means 48 stores information about the subgroups created by the subgroup creation means 26. Specifically, the subgroup storage means 48 stores the subgroups that make up the group (the first-level group) ({} indicates a subgroup, and {} contains identification information of the programs included in the subgroup) and the conversion order of those subgroups, in association with the identification information of the group.

[0114] <Configuration of code conversion server 20 / storage means 40 / conversion status storage means 49: Figure 8>

[0115] As shown in Figure 8, the conversion status storage means 49 stores the conversion status indicating whether the code conversion of each program constituting the group of programs to be converted has been completed. It stores the group identification information, the subgroup identification information, the converted code identification information, the status (converted or pending conversion), and the pre-conversion code identification information in association with each other. The example in Figure 8 corresponds to groups G1, G2, and G3 in Figures 9 to 11. Since program X is used in both group G1 in Figure 9 and group G2 in Figure 10, in the example in Figure 8, there are two records for program X: the status of group G1 and the status of group G2. These statuses are updated synchronously (if the status of group G1 is updated to "converted", the status of group G2 is also updated to "converted"), and as shown in the lower left part of Figure 10, if the code conversion of program X has already been completed in group G1, it is skipped when it comes time for the code conversion of group G2.

[0116] <Configuration of code conversion server 20 / storage means 40 / API reference storage means 50: Figure 4>

[0117] As shown in Figure 4, the API reference storage means 50 stores the API reference information (including the function name, arguments, return value, and processing summary for the function) created by the API reference creation means 28, in association with the identification information of the program containing the function.

[0118] <Configuration of code conversion server 20 / storage means 40 / converted code file storage means 51>

[0119] The converted code file storage means 51 stores the file (program file) that is output by the converted code (program code) obtained by the code conversion means 27 and converted into a file by the converted code file output means 29.

[0120] <Configuration of code conversion server 20 / storage device 40 / backup file storage device 52>

[0121] The backup file storage means 52 stores a copy of the data files (all data files linked to programs within the group) stored in the input / output file storage means 42 as a backup.

[0122] <Configuration of code conversion server 20 / storage means 40 / backup table storage means 53>

[0123] The backup table storage means 53 stores a copy of the table data (all table data linked to programs within the group) stored in the input / output table storage means 43 as a backup.

[0124] <Configuration of code conversion server 20 / storage means 40 / feedback message storage means 54>

[0125] The feedback message storage means 54 stores the error information obtained as a result of execution by the converted code execution means 30, and / or the difference in output when a mismatch is found in the comparison by the verification means 31, as a feedback message.

[0126] <Configuration of code conversion server 20 / storage device 40 / error analysis content storage device 55>

[0127] The error analysis content storage means 55 stores the error analysis content obtained by the error analysis means 32.

[0128] <Overall flow of the code conversion process: Figures 12 and 13>

[0129] In Figure 12, the operator operates the operator terminal 70 to prepare the OS, middleware, and language execution environment on the code conversion server 20 (step S1). This process is performed by the conversion target placement means 21, but the details of this process have already been described in detail in the description of the configuration of the conversion target placement means 21, so a detailed explanation is omitted here.

[0130] Next, the operator operates the operator terminal 70 to prepare the input files and input table data necessary to execute the program group (code group) to be converted, execute the program group in the execution environment, and collect the output files and output table data obtained as a result of the execution (step S2). These processes are also performed by the conversion target placement means 21, but the details of these processes have already been described in detail in the description of the configuration of the conversion target placement means 21, so a detailed explanation is omitted here.

[0131] Then, the operator operates the operator terminal 70 to place each file of the program group (code group) to be converted, and its input / output data (input / output files, input / output tables) (step S3). That is, each file of the multiple programs that make up the program group to be converted is stored in the pre-conversion code file storage means 41, and the input / output data (input / output files, input / output tables) of these programs are stored in the input / output file storage means 42 and the input / output table storage means 43. These processes are also executed by the conversion target placement means 21, but the details of these processes have already been described in detail in the description of the configuration of the conversion target placement means 21, so a detailed explanation is omitted here.

[0132] Furthermore, the operator operates the operator terminal 70 to specify the correspondence between the languages ​​before and after conversion. The pre- and post-conversion language specification means 22 receives this specification information via the network 1 and stores it in the pre- and post-conversion language correspondence storage means 44 (see Figure 2) (step S4). The details of this process have already been described in detail in the explanation of the configuration of the pre- and post-conversion language specification means 22, so a detailed explanation is omitted here.

[0133] Subsequently, the code analysis means 23 performs code analysis on the program group to be converted, and stores the obtained code analysis results in the code analysis result storage means 45 (see Figures 3 and 7) (step S5). The details of this process have already been described in detail in the description of the configuration of the code analysis means 23, so a detailed explanation is omitted here. In this embodiment, the LLM-based service provision system 60 is used, but code analysis may be performed using other tools.

[0134] Next, the graphing means 24 converts the code analysis results (link information showing dependencies between programs, relationships between programs and their input data, and relationships between programs and their output data) stored in the code analysis result storage means 45 (see Figures 3 and 7) into a graph structure (see Figures 9 to 11), and stores the resulting graph data (link information equivalent to the code analysis results) in the graph data storage means 46 (see Figure 3) (step S6). The details of this process have already been described in detail in the explanation of the configuration of the graphing means 24, so a detailed explanation is omitted here.

[0135] Then, the group creation means 25 uses the graph data stored in the graph data storage means 46 (see Figure 3) to perform the first stage of two-stage grouping, creating groups and storing them in the group storage means 47 (see Figure 3) (step S7). The details of this process have already been described in detail in the description of the configuration of the group creation means 25, so a detailed explanation is omitted here.

[0136] Furthermore, in Figure 13, the subgroup creation means 26 utilizes the LLM service provision system 60 to create a subgroup for code conversion (a subgroup that serves as a code conversion processing unit) for each group (first-stage group) stored in the group storage means 47 (see Figure 3), as the second stage of the two-stage grouping, and stores it in the subgroup storage means 48 (see Figure 3) (step S8). The details of this process have already been described in detail in the explanation of the configuration of the subgroup creation means 26, so a detailed explanation is omitted here.

[0137] Next, the code conversion means 27 uses the LLM service provision system 60 to perform a code conversion process for each subgroup stored in the subgroup storage means 48 (see Figure 3) in the order in which they are stored, and stores the resulting converted code (converted program) file in the converted code file storage means 51 (step S9). The details of this process have already been described in detail in the description of the configuration of the code conversion means 27, so a detailed explanation is omitted here. At this time, the API reference obtained in the previous loop is used, and the details of this flow (the temporal relationship between the creation and storage of the API reference and its use) will be explained using Figure 15, which will be described later.

[0138] Furthermore, if the processing by this code conversion means 27 results in a re-conversion process for the same group (after going through the processing in step S25 described later), the information stored in the feedback message storage means 54 (execution error information and / or output differences) is used, as shown in Figure 19.

[0139] Furthermore, the API reference creation means 28 utilizes the LLM service provision system 60 and uses the converted code of the program containing the function created by the code conversion means 27 to create an API reference (including the function name, arguments, return value, and processing overview of the function) for the function contained in the converted code (step S10), and stores this information in the API reference storage means 50 (see Figure 4) in association with the identification information of the program containing the function (step S11).

[0140] Subsequently, the converted code file output means 29 stores the converted code file in the converted code file storage means 51 (step S12).

[0141] Then, using the "subgroups constituting the group and their conversion order" stored in the subgroup storage means 48 (see Figure 3), it is determined whether there are any subgroups remaining in the group being processed that should undergo code conversion processing (step S13). If there are any remaining subgroups, the status in the conversion status storage means 49 (see Figure 8) is used to determine whether the subgroup has already been converted (step S14). If it has already been converted, the conversion process is skipped and the process proceeds to the next subgroup (step S15), and the process returns to step S13 described above.

[0142] In step S14, it is determined that the conversion has already been completed. For example, in group G1 in Figure 9, there are two instances where program X (function) of subgroup SG102 is called. If the conversion of program X (function) of subgroup SG102 is completed during the first call, then the conversion of program X (function) of subgroup SG102 can be omitted during the second call. However, in cases where the LLM takes this into consideration and includes program X (function) of subgroup SG102 only once in the order of subgroups indicating the conversion order (i.e., the LLM determines the order of subgroups by skipping the conversion of program X (function) corresponding to the second call), there is no need for the processing means 20A of the code conversion server 20 to determine whether the subgroup has already been converted (step S14). For example, if the conversion order of the subgroups of group G1 shown in the lower left of Figure 9, or the conversion order of the subgroups stored in the record of group G1 in the subgroup storage means 48 in Figure 3, is {X};{A,B};{C,D};{Z};{Y};{E,F,G}, then the conversion of program X called for the second time is skipped by the output from LLM, so there is no need to perform the process of determining whether or not the conversion has already been completed (step S14). On the other hand, if the output from LLM is in the order {X};{A,B};{X};{C,D};{Z};{Y};{E,F,G}, then the process of determining whether or not the conversion has already been completed (step S14) should be performed to skip the conversion of program X for the second time.

[0143] Furthermore, since the same program may be used across multiple groups (the first group in a two-stage grouping), if the same program is included in a group that has already undergone code conversion processing, and the code conversion of the subgroup containing that program has already been performed in the processing of that preceding group, then in step S14, it will be determined that the conversion has already been completed. For example, group G1 in Figure 9 includes program X (function), and this program X (function) is also included in group G2 in Figure 10. Therefore, if the subgroup SG102 of program X (function) that constitutes group G1 has been converted in advance, the conversion of the subgroup SG202 of program X (function) that constitutes group G2 can then be skipped. Information on whether or not program X (function) has been converted can be obtained from the status of the conversion status storage means 49 (see Figure 8). In this case, when the status of the record in subgroup SG102 of program X (function) is updated to "converted" during the processing of group G1 in Figure 9, the status of the record in subgroup SG202 of program X (function) in group G2 in Figure 10 is also synchronized and updated to "converted," so that the conversion status of the same program can be checked across groups.

[0144] On the other hand, if the process in step S14 described above determines that the conversion has not already been completed (conversion not completed), the process returns to step S9 and performs the code conversion for the next subgroup.

[0145] Furthermore, if, in the process of step S13 described above, it is determined that there are no remaining subgroups in the group being processed that require code conversion processing, the process proceeds to another process in that group (this does not mean that the group being processed changes, but rather that the process after the code conversion processing for each subgroup in that group has been completed).

[0146] Specifically, the post-converted code execution means 30 first performs preparatory processing for the execution of the post-converted code (step S16). Specifically, all input / output files and input / output tables linked to the code within the group are backed up and then deleted or cleared. Furthermore, only files and tables that are read by the code within the group but not output are rearranged. The details of these processes have already been described in the explanation of the configuration of the post-converted code execution means 30, so a detailed explanation is omitted here.

[0147] Next, the converted code execution means 30 executes the lowest-level dependency code (program) within the group (the one not called by any other code) (step S17). The details of this process have already been described in detail in the description of the configuration of the converted code execution means 30, so a detailed explanation is omitted here.

[0148] Then, it is determined whether or not an execution error occurred as a result of processing by the post-conversion code execution means 30 (step S18). If an execution error occurs, the post-conversion code execution means 30 collects error information (standard output at the time of the error, standard error output, return code, log output) and stores it in the feedback message storage means 54 as a feedback message (step S19). The details of this process have already been described in detail in the description of the configuration of the post-conversion code execution means 30, so a detailed explanation is omitted here.

[0149] On the other hand, if no execution error occurs in the process of step S18 described above, the verification means 31 targets the files and tables of data that are only output from the programs in the group and are not read, and compares the data and tables output as the execution result by the converted code execution means 30 with the data and tables stored in the backup file storage means 52 and the backup table storage means 53 (step S20), and determines whether they match or not (step S21). If they do not match, the difference in the output is stored as a feedback message in the feedback message storage means 54 (step S22). The details of this process have already been described in detail in the description of the configuration of the verification means 31, so a detailed explanation is omitted here.

[0150] On the other hand, if the comparison result matches in step S21 above, no execution error occurs, and since the comparison result matches, the code conversion process for all subgroups belonging to the group being processed has been successful (a favorable processing result has been obtained). Therefore, it is determined whether there are any groups remaining to be processed (step S23). If there are none, the series of processes (code conversion and verification processes) are terminated. If there are groups remaining, the process returns to step S8 to proceed to the next group.

[0151] Furthermore, in the processing described above in steps S19 and / or S22, the error information and / or the difference in output are stored in the feedback message storage means 54 as a feedback message. Then, the error analysis means 32 uses the LLM service provision system 60 to analyze the cause of the execution error and how to deal with it, and / or the cause of the discrepancy in the comparison and how to deal with it (step S24). The details of this process have already been described in detail in the description of the configuration of the error analysis means 32, so a detailed explanation is omitted here.

[0152] Next, the error analysis means 32 stores the obtained error analysis content in the error analysis content storage means 55, performs processing to repeat the processing of the same group (step S25), and returns to the processing of step S8. When returning to step S8, the error analysis content stored in the error analysis content storage means 55 in the processing of step S25 is reflected in the subgroup creation process in the same group (step S8), that is, the subgroup recreation process, and is also reflected in the subgroup code conversion process in the same group (step S9), that is, the subgroup code reconversion process.

[0153] <Changes in the situation as the code conversion of Group G1 progresses: Figure 15>

[0154] When performing code conversion on group G1 in Figure 9, first, subgroups SG101, SG102, SG103, SG104, SG105, and SG106 that make up group G1 are created (step S8 in Figure 13). Then, the code conversion process is carried out for each of the created subgroups SG101 to SG106 one by one by performing the loop processing steps S9 to S15 in Figure 13. After the code conversion process for all subgroups SG101 to SG106 is completed, the process moves on to steps S16 and onward for group G1. Figure 15 shows the progress of the conversion while the loop processing steps S9 to S15 in Figure 13 is being performed.

[0155] In Figure 15, the solid, thick borders indicate converted programs (code), and the dotted lines indicate programs (code) that have not yet been converted. The pre-conversion code is shown in uppercase, and the post-conversion code is shown in lowercase. Therefore, as the loop processing in steps S9 to S15 in Figure 13 is performed, it can be seen that the converted programs (code) shown in the solid, thick borders gradually increase in subgroup units. It can also be seen that the code conversion process proceeds with a mixture of converted and unconverted programs (code). It can also be said that the subgroup creation process in step S8 of Figure 13 is performed so that the code conversion process proceeds in this manner.

[0156] In the first loop iteration, a code conversion process (step S9 in Figure 13) is performed for program X (function) of subgroup SG102, resulting in the converted program x (function) enclosed in a thick solid border. Furthermore, in this first loop iteration, an API reference for program x is created using the code of the converted program x (step S10 in Figure 13), and stored in the API reference storage means 50 (step S11 in Figure 13).

[0157] In the second loop iteration, when performing the code conversion process for programs A and B of subgroup SG101 (step S9 in Figure 13), program A calls program X (see Figure 9), so the API reference of program x (function) stored in the API reference storage means 50 is used. After the conversion is performed, the converted program a, enclosed in a thick solid border, is obtained, and at this stage, the converted programs enclosed in thick solid borders are programs a and x.

[0158] In the third loop iteration, when the code conversion process for programs C and D of subgroup SG103 (step S9 in Figure 13) is performed, program C calls program X (see Figure 9), so the API reference of program x (function) stored in the API reference storage means 50 is used. After the conversion is performed, the converted program c, enclosed in a thick solid border, is obtained, and at this stage, the converted programs enclosed in thick solid borders are programs a, x, and c.

[0159] In the fourth loop iteration, a code conversion process (step S9 in Figure 13) is performed for program Z (function) of subgroup SG106, resulting in the converted program z (function) enclosed in a thick solid border. Furthermore, in this fourth loop iteration, an API reference for program z is created using the code of the converted program z (step S10 in Figure 13), and stored in the API reference storage means 50 (step S11 in Figure 13). Therefore, at this stage, the converted programs enclosed in thick solid borders are programs a, x, c, and z.

[0160] In the fifth loop iteration, when the code conversion process for program Y of subgroup SG105 (step S9 in Figure 13) is performed, program Y calls program Z (see Figure 9), so the API reference of program z (function) stored in the API reference storage means 50 is used. After the conversion is performed, the converted program y, enclosed in a thick solid border, is obtained. Furthermore, in this fifth loop iteration, the API reference of program y is created using the code of the converted program y (step S10 in Figure 13) and stored in the API reference storage means 50 (step S11 in Figure 13). Therefore, at this stage, the converted programs enclosed in a thick solid border are programs a, x, c, y, and z.

[0161] In the sixth loop iteration, when performing the code conversion process for programs E, F, and G of subgroup SG104 (step S9 in Figure 13), program E calls program Y (see Figure 9), so the API reference of program y (function) stored in the API reference storage means 50 is used. After the conversion is performed, the converted program e enclosed in a thick solid border is obtained, and at this stage, the converted programs enclosed in thick solid borders are programs a, x, c, e, y, and z. Thus, the code conversion process for all subgroups constituting group G1 in Figure 9 is completed.

[0162] Subsequently, in the processing from step S16 onwards in Figure 13 for group G1, the converted program of group G1 is tested (the converted code is executed), but at this time, the converted code is executed starting from the converted programs a, c, and e. This is because when these programs a, c, and e are executed, the called programs x, y, and z are also executed automatically.

[0163] <Effects of this embodiment>

[0164] This embodiment offers the following advantages: Since the code conversion system 10 includes a group creation means 25 and a subgroup creation means 26, it can perform two-stage grouping. This enables efficient and highly accurate code conversion.

[0165] In other words, the group creation means 25, as described above, groups programs using the link information of multiple programs and their input / output data obtained through code analysis. This allows for the broad classification of programs based on their purpose and use. In other words, the group creation means 25 enables grouping based on link information, rather than grouping based on code content. Multiple programs created by a single program developer, a single program development team, or the same department within a company may be stored and managed in the same location (for example, the same folder). Specifically, for example, a single program group may contain multiple programs that perform processing related to consumption tax calculation and multiple programs that perform processing related to inventory management. In such cases, the group creation means 25 can use the link information to divide the program group into a consumption tax calculation group and an inventory management group. Consequently, the separated consumption tax calculation group and inventory management group can be groups that have no link to each other or only a weak link, and can be separated for data processing purposes. On the other hand, programs that are directly or indirectly linked can be assigned to the same group. Furthermore, the processes related to consumption tax calculation and inventory management are both processes related to goods, and can therefore be considered examples of a group of programs with multiple related purposes or uses. However, even in such cases (when the content seems to be related), the group creation means 25 can be used to determine, using link information, that there is no link or the link is weak, and these programs can be grouped into different groups. Of course, the grouping by the group creation means 25 can also be applied when multiple completely unrelated programs are mixed together. For example, even if a consumption tax calculation program, a personal schedule management program, a baseball game program, and a traffic congestion prediction program are mixed together (although it is unlikely that such program management is performed, this is meant to imply that it might exist), the link information can be used to determine that there is no link or the link is weak, and these programs can be grouped accordingly.

[0166] Next, the subgroup creation process by the subgroup creation means 26 is performed using a large-scale language system (LLM) by specifying the languages ​​before and after conversion. At this time, instructions are sent to the large-scale language system (LLM) to group programs that are converted to the same language, to keep programs called by other programs separate, and to keep programs that have already been designated for conversion in another group separate. This allows for grouping (creation of subgroups) where the conversion relationship between the programs before and after conversion is not one-to-one (one program is converted to one program), but rather an N-to-M correspondence conversion (N programs are converted to M programs: N ≠ M). Therefore, the code conversion process by the code conversion means 27, i.e., the code generation process in the converted language, can be performed in units optimized for the characteristics of the converted language.

[0167] Furthermore, since the code conversion means 27 can perform the code conversion process automatically, there is no need for manual code conversion work. Also, because the code conversion process is performed in units of subgroups created using the Large-Scale Language System (LLM) by the subgroup creation means 26, highly accurate conversion can be achieved, eliminating the need for manual correction work after code conversion. Therefore, labor savings in conversion can be achieved, and conversion costs can be reduced.

[0168] Furthermore, since the subgroup creation process by the subgroup creation means 26 is performed using a large-scale language system (LLM), the conversion operator can arbitrarily specify the languages ​​before and after conversion. Therefore, it is not subject to language constraints like existing conversion products, nor is it subject to constraints on usable OS and middleware like existing conversion products, thus expanding the range of conversion targets.

[0169] Furthermore, since the code conversion system 10 includes an API reference creation means 28 and an API reference storage means 50, when the code conversion means 27 creates code conversion request data for a subgroup including the program that calls the function, it can include API reference information (information already stored in the API reference storage means 50) about the program (function) called by that program. This improves the accuracy of code conversion for the program that calls the function. Also, since the code conversion request data includes API reference information rather than the code of the called program (function) itself, the number of tokens sent to the Large-Scale Language System (LLM) can be reduced.

[0170] Furthermore, the code conversion system 10 includes a post-conversion code execution means 30, a backup file storage means 52, a backup table storage means 53, a verification means 31, a feedback message storage means 54, an error analysis means 32, and an error analysis content storage means 55. Therefore, the subgroup creation means 26 can recreate subgroups reflecting the error analysis content. Consequently, the subgroup creation process by the subgroup creation means 26 can be repeated for the same group until no execution errors occur and no discrepancies occur in the output data. This improves the accuracy of code conversion and eliminates the need for manual code correction after code conversion, thus promoting labor savings in the conversion process.

[0171] <Form of transformation>

[0172] It should be noted that the present invention is not limited to the embodiments described above, and any modifications that can achieve the objectives of the present invention are included within the scope of the present invention.

[0173] For example, in the above embodiment, the code analysis means 23 was configured to utilize a large-scale language model (LLM) as shown in Figures 14 and 16. However, the code analysis means 23 may be implemented using an existing program, a newly developed program, or an external service provision system (not shown) for code analysis connected to the code conversion server 20 via the network 1. However, it is preferable to use a large-scale language model (LLM) as in the above embodiment, as this allows for support of any OS, middleware, and language. [Industrial applicability]

[0174] As described above, the code conversion system and program of the present invention are suitable for use in cases such as converting the codes of a group of programs containing programs in multiple languages, converting the codes of a group of programs containing programs with different purposes or uses, or converting the codes of a group of programs containing programs that are completely unrelated. [Explanation of symbols]

[0175] 10 Code Conversion Systems 25 Group Creation Methods 26 Subgroup creation method 27 Code conversion means 28. API Reference Creation Methods 30. Means for executing the converted code 31 Verification methods 32 Error Analysis Methods 50 API Reference Storage Means 52 Backup file storage method 53 Backup table storage means 54 Feedback message storage means 55 Error Analysis Content Storage Method

Claims

1. A code conversion system comprising a computer that performs code conversion processing to different languages ​​for each of the code of multiple programs that make up a group of programs, A group creation means that divides the group of programs to be converted into groups with inputs and outputs, using the link information of the multiple programs and their input / output data obtained by code analysis of the group of programs to be converted, For each group created by this group creation means, a subgroup is created which will serve as a code conversion processing unit. This subgroup creation means includes text data which is text data containing the code of all programs included in the group and link information of these programs and their input / output data, text data which lists the file path, language before conversion, and language after conversion for all programs included in the group, text data which lists the file path for input / output data, and subgroups which will serve as a code conversion processing unit. This subgroup creation means also creates subgroup creation request data which includes an instruction to arrange the created subgroups in order of non-dependency, inputs the created subgroup creation request data into a large-scale language model, and receives the subgroups and their order output from this large-scale language model. A code conversion means creates code conversion request data for each subgroup created by this subgroup creation means, and in the received order, including the file path, the language to be converted, the total amount of code content to be converted, and an instruction to convert to the language to be converted for all programs included in the subgroup, inputs the created code conversion request data into the large language model, and receives the converted code of the programs output from the large language model. A code conversion system characterized by having the following features.

2. API reference creation means creates API reference creation request data that includes instructions requesting that the converted code created by the code conversion means and the functions contained in the converted code be compiled as an API reference, including the function name, arguments, return value, and processing overview; inputs the created API reference creation request data into the large-scale language model; and receives the API reference information output from the large-scale language model. The API reference storage means stores the information of the API reference created by the API reference creation means in association with the identification information of the program including the function, The code conversion means is When creating the code conversion request data for the subgroup which includes a program that calls the function, the code conversion request data is configured to include the API reference information for the function to be called, which is stored in the API reference storage means. The code conversion system according to feature 1.

3. A means for executing converted code, which starts with the program with the lowest dependency that is not called by any other program, and executes the converted code from there. A backup file storage means that stores all data files linked to the programs within the aforementioned group, A backup table storage means that stores all tables linked to the programs within the aforementioned group, A verification means that targets data files and tables that are output only from programs within the group but are not read, and compares the data and tables output as the execution result by the converted code execution means with the data and tables stored in the backup file storage means and the backup table storage means to determine whether they match or not. A feedback message storage means stores, as a feedback message, the error information obtained as a result of execution by the converted code execution means, and / or the difference in output when a mismatch is found in the comparison by the verification means. If the error information is obtained as a result of execution by the converted code execution means, and / or if the verification means determines that there is no match in the comparison, the error analysis means creates error analysis request data including the converted codes and paths of all programs in the group, sample data of files and tables of all data input and output from the programs in the group, the feedback messages stored in the feedback message storage means, and an instruction statement requesting that the cause of the execution error by the converted code execution means and the discrepancy in the comparison by the verification means be analyzed and how to address it, inputs the created error analysis request data into the large-scale language model, and receives the error analysis content output from the large-scale language model. This includes an error analysis content storage means for storing the error analysis content obtained by this error analysis means, The aforementioned subgroup creation means is When processing the same group for the second time or later in the loop, the system is configured to include the error analysis content stored in the error analysis content storage means in the subgroup creation request data, as well as an instruction to recreate the subgroup based on the error analysis content. The code conversion system according to feature 1.

4. A program for causing a computer to function as a code conversion system according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Compiler based on machine learning (ML) model

    CN116541011A

  • Method, system, and program for converting application program code to executable code using neural networks based on characteristics of the inputs

    US20040122785A1

  • Methods and apparatus for intentional programming for heterogeneous systems

    US20220171626A1

  • Method, system, and program for converting code to executable code using neural networks implemented in a software program

    US6832214B1

  • Method and apparatus for generating code based on large-scaled model, electronic device and storage medium

    JP2025036437A

Cited By

  • Software conversion generation system, program, and control method for the software conversion generation system.

    JP7870997B1