Execution time estimation device, execution time estimation method, and execution time estimation program

The proposed device allows for the estimation of software execution time during the design phase by using a code generation model and a front-end unit to generate prompts based on natural language function descriptions, addressing the limitations of existing techniques.

JP7696528B1Active Publication Date: 2025-06-20MITSUBISHI ELECTRIC CORP
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2025511438
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2024-08-01
Filing Date
2024-10-18
Publication Date
2025-06-20
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

Existing techniques for estimating the execution time of software cannot do so until the software implementation is complete, making it difficult to meet real-time constraints and requiring a rollback from implementation to design if execution time targets are not met.

Method used

A device that includes a front-end unit to generate a prompt for code generation based on a function description in natural language, and an execution time estimation unit that estimates the execution time of the source code generated by a code generation model.

Benefits of technology

Enables the estimation of execution time during the design process, allowing for earlier identification of potential issues and reducing the need for costly rollbacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007696528000001
    Figure 0007696528000001
  • Figure 0007696528000002
    Figure 0007696528000002
  • Figure 0007696528000003
    Figure 0007696528000003
Patent Text Reader

Abstract

The front - end part (13) generates a prompt for code generation that instructs the generation of source code for realizing one or more functions from a function description indicating one or more functions of software described in natural language, and inputs it to the code generation model (11), which is a learning model. The execution - time estimation part (12) estimates the execution time of the source code generated by the code generation model (11) for the prompt input by the front - end part (13).
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to a technique for estimating the execution time of software.

Background Art

[0002] In the development of embedded software, it is important to estimate the execution time of the software to be developed in order to meet real-time constraints. As methods for grasping the execution time, there are a method of executing software in an operating environment and a method using an emulator and simulation. However, the method of executing software in an operating environment has a problem that the operating environment is not available at an early stage of development. In addition, the method using an emulator and simulation has a problem that simulation execution takes time.

[0003] In Patent Document 1, in order to solve this problem, a technique for estimating the execution time of software by utilizing program analysis technology by a compiler is presented.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0005] According to the technique presented in Patent Document 1, it becomes possible to flexibly estimate the execution time from the constituent instruction sequence of the program to be estimated. However, the technique presented in Patent Document 1 assumes that the implementation of the software source code is complete. Therefore, the execution time cannot be estimated until after the implementation process is completed. Therefore, if the execution time target cannot be achieved, a rollback from the implementation process to the design process will occur. The present disclosure aims to enable the estimation of execution time in the design process.

Means for Solving the Problem

[0006] The execution time estimation device according to the present disclosure includes a front-end unit that generates a prompt for code generation instructing the generation of source code for realizing one or more functions from a function description indicating one or more functions of software described in natural language, and inputs it to a code generation model which is a learning model, an execution time estimation unit that estimates the execution time of the source code generated by the code generation model for the prompt input by the front-end unit and is provided with.

Advantages of the Invention

[0007] In the present disclosure, a prompt for code generation is generated from a function description of software described in natural language and input to a code generation model, and the execution time of the source code generated by the code generation model is estimated. Thereby, it is possible to estimate the execution time in the design process.

Brief Description of the Drawings

[0008]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Mode for Carrying Out the Invention

[0009] Embodiment 1. ***Description of Configuration*** With reference to FIG. 1, the functional configuration of the execution time estimation device 10 according to Embodiment 1 will be described. The execution time estimation device 10 includes, as functional components, a code generation model 11, an execution time estimation unit 12, and a front-end unit 13. The code generation model 11 is a learning model that receives a prompt for code generation as input and generates the source code of software. The execution time estimation unit 12 is a function that receives the source code as input and estimates the execution time of the source code. The front-end unit 13 is a function that exchanges data with the user and also exchanges data with the code generation model 11 and the execution time estimation unit 12. The front-end unit 13 is connected to an external device such as a user terminal 30 via a communication network 14. The communication network 14 is a network for transmitting and receiving data. Also, the code generation model 11, the execution time estimation unit 12, and the front-end unit 13 are connected via a transmission path 15. The transmission path 15 is a path for transmitting data between the code generation model 11, the execution time estimation unit 12, and the front-end unit 13.

[0010] The learning model is a so-called generative AI. AI stands for Artificial Intelligence. As a specific example, the learning model may be configured using algorithms such as BERT and GPT. BERT is the abbreviation of Bidirectional Encoder Representations from Transformers. GPT is the abbreviation of Generative Pretrained Transformer. The learning model may be configured by combining a plurality of algorithms including these algorithms. In FIG. 1, a configuration is shown in which the execution time estimation device 10 includes a code generation model 11 that is a learning model. However, the code generation model 11 may be provided outside the execution time estimation device 10.

[0011] Referring to FIG. 2, the functional configuration of the front-end unit 13 according to Embodiment 1 will be described. The front-end unit 13 includes, as functional components, an input processing unit 131, an information output unit 132, a data transmission unit 133, a prompt generation unit 134, a validity determination unit 135, and a data reception unit 136. These functional components are connected via a transmission path 137. The input processing unit 131 has a function of splitting the input from the user terminal 30. The information output unit 132 has a function of outputting information regarding the estimated result of the execution time. The data transmission unit 133 has a function of transmitting the prompt for code generation to the code generation model 11 and transmitting the source code generated by the code generation model 11 to the execution time estimation unit 12. The prompt generation unit 134 has a function of generating a prompt for code generation to be transmitted to the code generation model 11. The validity determination unit 135 has a function of comparing the estimated result of the execution time estimation unit 12 with the constraint conditions regarding the execution time input from the user terminal 30 and determining whether the estimated result satisfies the constraint conditions. The data reception unit 136 has a function of receiving the information output from the code generation model 11 and the execution time estimation unit 12. The transmission path 137 is a path for transmitting data between the respective functional components.

[0012] Referring to FIG. 3, the hardware configuration of the execution time estimation device 10 according to Embodiment 1 will be described. The execution time estimation device 10 includes a storage 21, a processor 22, a memory 23, and a network interface 24. The storage 21 is a storage medium such as an SSD. SSD is an abbreviation for Solid State Drive. The storage 21 may be a removable recording medium such as an SD (registered trademark) memory card, CompactFlash (registered trademark), NAND flash, flexible disk, optical disk, compact disk, Blu-ray (registered trademark) disk, or DVD. SD is an abbreviation for Secure Digital. DVD is an abbreviation for Digital Versatile Disk.

[0013] The processor 22 is an IC that performs processing. IC is an abbreviation for Integrated Circuit. As a specific example, the processor 22 is a CPU. CPU is an abbreviation for Central Processing Unit.

[0014] The memory 23 is a storage device that temporarily stores data. As specific examples, the memory 23 is SRAM and DRAM. SRAM is an abbreviation for Static Random Access Memory. DRAM is an abbreviation for Dynamic Random Access Memory.

[0015] The network interface 24 is an interface for communicating with an external device. As specific examples, the network interface 24 is an Ethernet (registered trademark) or a USB port. USB is an abbreviation for Universal Serial Bus.

[0016] The storage 21 stores a program for realizing each functional component. This program is read out from the storage 21 into the memory 23 by the processor 22 and executed. Thereby, the functions of each functional component are realized. Further, the storage 21 stores data handled by each functional component.

[0017] ***Description of Operations*** With reference to FIGS. 4 to 7, the operations of the execution time estimation device 10 according to Embodiment 1 will be described. The operation procedure of the execution time estimation device 10 according to Embodiment 1 corresponds to the execution time estimation method according to Embodiment 1. Further, the program for realizing the operations of the execution time estimation device 10 according to Embodiment 1 corresponds to the execution time estimation program according to Embodiment 1.

[0018] With reference to FIG. 4, the processing flow of the execution time estimation device 10 according to Embodiment 1 will be described. (Step S100: Input Processing) The input processing unit 131 receives data input by the user from the user terminal 30. The input processing unit 131 writes the received data into the storage 21. The data input by the user includes a function description indicating a function group composed of one or more functions constituting software described in a natural language, a constraint condition for the execution time of the function group, and a relaxation condition for the function when the constraint condition for the execution time cannot be satisfied.

[0019] For example, the data input by the user is data according to the template shown in FIG. 5. In the column of the function (func) of the source code, one or more functions to be realized are described in natural language. For example, in the column of the function (func) of the source code, it is described as a function that performs a Fourier transform. In the column of the input value (input) of the function, the arguments required for the function that realizes the function described in the column of the function (func) of the source code are described in natural language. For example, in the column of the input value (input) of the function, it is described as a structure having two double-type members (input and output). In the column of the output value (output) of the function, the return value of the function that realizes the function described in the column of the function (func) of the source code is described in natural language. For example, in the column of the output value (output) of the function, it is described as a structure having two double-type members (data A and data B). In the column of the constraint, the constraints regarding the execution environment of the function that realizes the function described in the column of the function (func) of the source code are described in natural language. For example, in the column of the constraint, it is described as targeting the evaluation board Zedboard manufactured by Xilinx, using the Linux (registered trademark) OS, and using an FPGA. In the column of the relaxation condition, the relaxation content of the function is described in natural language. In the column of the execution time constraint condition (X), the execution time to be satisfied is described. For example, in the column of the execution time constraint condition (X), it is described as 100 μs (microseconds).

[0020] (Step S101: Prompt generation process) The prompt generation unit 134 reads out the function descriptions of one or more functions of the software described in natural language from the storage 21. The prompt generation unit 134 generates a prompt for code generation that instructs the generation of source code for realizing one or more functions from the function descriptions. The prompt generation unit 134 inputs the prompt for code generation to the code generation model 11 via the data transmission unit 133. Then, the code generation model 11 generates the source code of the software for the input prompt. The code generation model 11 outputs the source code to the front-end unit 13. The data reception unit 136 receives the source code output by the code generation model 11.

[0021] (Step S102: Source Code Output Process) The information output unit 132 outputs the received source code to the user terminal 30.

[0022] (Step S103: Source Code Judgment Process) The user terminal 30 displays the source code and presents it to the user. Then, the user terminal 30 receives an input from the user as to whether to accept the source code or not. If the user accepts the source code, the user terminal 30 advances the process to step S104. On the other hand, if the user does not accept the source code, the user terminal 30 returns the process to step S100, causes the user to input data including an amendment to the source code, etc., and causes the code generation model 11 to regenerate the source code.

[0023] (Step S104: Execution Time Estimation Process) The data transmission unit 133 transmits the source code received in step S102 to the execution time estimation unit 12 to cause the execution time estimation unit 12 to estimate the execution time of the source code. The execution time estimation unit 12 estimates the execution time of the source code by the method described in Patent Document 1, etc. Here, it is assumed that the execution time estimation unit 12 estimates the execution time for each of one or more functions together with the total execution time of the source code.

[0024] (Step S105: Estimation Result Reception Process) The data reception unit 136 receives the result estimated by the execution time estimation unit 12. The validity determination unit 135 reads the execution time constraint conditions from the storage 21. The validity determination unit 135 determines whether the total execution time indicated by the estimated result satisfies the execution time constraint conditions. The validity determination unit 135 determines that the constraint conditions are satisfied when the total execution time is within the time indicated by the execution time constraint conditions. When the execution time satisfies the execution time constraint condition, the validity determination unit 135 proceeds with the process to step S106. On the other hand, when the execution time does not satisfy the execution time constraint condition, the validity determination unit 135 proceeds with the process to step S107.

[0025] (Step S106: Result presentation process) The information output unit 132 outputs the estimated result received in step S105 to the user terminal 30 to present it to the user. At this time, the information output unit 132 may also output and present the execution time constraint condition, the source code, etc. together with the estimated result.

[0026] (Step S107: Relaxation condition determination process) The prompt generation unit 134 reads out the relaxation conditions for each function when the execution time constraint condition cannot be satisfied from the storage 21. The prompt generation unit 134 refers to the execution time for each function indicated by the estimated result and identifies the function with the longest execution time. The prompt generation unit 134 determines whether a relaxation condition is set for the identified function. When a relaxation condition is set, the prompt generation unit 134 proceeds with the process to step S108. On the other hand, when no relaxation condition is set, the prompt generation unit 134 proceeds with the process to step S106. That is, when no relaxation condition is set, the information output unit 132 outputs the result that does not satisfy the constraint condition received in step S105 to the user terminal 30.

[0027] (Step S108: Prompt regeneration process) The prompt generation unit 134 regenerates the prompt for code generation so that the execution time for the function with the longest execution time is improved in accordance with the relaxation condition for the function with the longest execution time. Then, the prompt generation unit 134 returns the process to step S101, inputs the regenerated prompt into the code generation model 11, and causes the source code to be regenerated.

[0028] In step S106, for example, information as shown in FIG. 6 is presented to the user. In FIG. 6, the execution time for each function is shown, and the total execution time is compared with the target execution time indicating the execution time constraint condition. Also, a link for downloading the source code is shown. Further, when the source code generated for the first time does not satisfy the constraint condition and the source code is regenerated with the function relaxed, for example, information as shown in FIG. 7 is presented to the user. In FIG. 7, an estimate for the source code regenerated as the second estimate is presented in a tab different from the first estimate. As the presented content, the points of change from the first time for the source code are added.

[0029] ***Effect of Embodiment 1*** As described above, the execution time estimation device 10 according to Embodiment 1 generates a prompt for code generation from the function description of software described in natural language and inputs it to the code generation model 11, and the execution time of the source code generated by the code generation model 11 is estimated. Thereby, it is possible to estimate the execution time in the design process.

[0030] Further, when the estimated execution time does not satisfy the constraint condition, the execution time estimation device 10 according to Embodiment 1 applies relaxation conditions to regenerate the source code. Then, the execution time of the regenerated source code is estimated. Thereby, it is possible to identify a functional configuration that satisfies the constraint condition.

[0031] Also, the execution time estimation device 10 according to Embodiment 1 applies relaxation conditions to the function with the longest execution time. Thereby, it is possible to regenerate the source code with the execution time efficiently reduced.

[0032] ***Other Configurations*** <Modification Example 1> In Embodiment 1, when no relaxation condition was set for the function with the longest execution time, the relaxation condition was not applied. However, the prompt generation unit 134 may apply the relaxation condition to the function with the longest execution time among the functions for which the relaxation condition is set. This makes it possible to apply the relaxation condition to the second-longest execution time function even when no relaxation condition is set for the function with the longest execution time. However, applying the relaxation condition to a function with a short execution time may not yield much effect. Therefore, only functions that account for a reference ratio or more of the total execution time may be targeted for application of the relaxation condition.

[0033] Embodiment 2. Embodiment 2 differs from Embodiment 1 in that it uses source code generated in the past. In Embodiment 2, this difference will be described, and the description of the same points will be omitted.

[0034] ***Description of the configuration*** With reference to FIG. 8, the functional configuration of the execution time estimation device 10 according to Embodiment 2 will be described. The execution time estimation device 10 differs from the execution time estimation device 10 shown in FIG. 1 in that it includes a database unit 16 as a functional component. The database unit 16 stores source code generated in the past in association with functions. The database unit 16 is realized by a storage 21.

[0035] With reference to FIG. 9, the information stored in the database unit 16 according to Embodiment 2 will be described. In the database unit 16, for each function name, the function, the creator, the source, the level, and the prompt are stored. The function name is the name of the function given to the source code. The function is a description of the function of the source code in natural language. The creator is the creator of the source code. The source indicates whether the source code was generated by the code generation model 11 or created by someone among the organization members. In FIG. 9, when created by someone among the organization members, it is set as hand-coded. The level is set to indicate whether the source code is publicly known or kept confidential within the organization. The prompt is the prompt given to the code generation model 11 at the time of generation when the source code was generated by the code generation model 11.

[0036] Referring to FIG. 10, the functional configuration of the front-end unit 13 according to Embodiment 2 will be described. The front-end unit 13 is different from the front-end unit 13 shown in FIG. 3 in that it includes a search unit 138 and a combination unit 139. The search unit 138 has a function of searching for source code from the database unit 16. The combination unit 139 has a function of combining the source code retrieved from the database unit 16 and the source code generated by the code generation model 11.

[0037] ***Description of Operations*** Referring to FIGS. 11 and 12, the operations of the execution time estimation device 10 according to Embodiment 2 will be described. The process of step S200 is the same as the process of step S100 in FIG. 4.

[0038] (Step S201: Search Process) The search unit 138 reads out the function descriptions of one or more functions of the software described in natural language from the storage 21. The search unit 138 searches the database unit 16 for the source code of the target function for each of the one or more functions. Specifically, the search unit 138 identifies the record in the database unit 16 where the target function is set for the function, and acquires the source code of that record. If there is a function where the source code exists, the process proceeds to step S202. On the other hand, if there is no function where the source code exists, the process proceeds to step S203.

[0039] (Step S202: First prompt generation process) The prompt generation unit 134 generates a code generation prompt for instructing the generation of source code for realizing a function where the source code does not exist. The prompt generation unit 134 inputs the code generation prompt into the code generation model 11 via the data transmission unit 133. Then, the code generation model 11 generates software source code for the input prompt. The code generation model 11 outputs the source code to the front-end unit 13. The data reception unit 136 receives the source code output by the code generation model 11.

[0040] (Step S203: Second prompt generation process) The prompt generation unit 134 generates a code generation prompt for instructing the generation of source code for realizing all one or more functions, in the same manner as step S101 in FIG. 4. The prompt generation unit 134 inputs the code generation prompt into the code generation model 11 via the data transmission unit 133. Then, the code generation model 11 generates software source code for the input prompt. The code generation model 11 outputs the source code to the front-end unit 13. The data reception unit 136 receives the source code output by the code generation model 11.

[0041] (Step S204: Combining process) The combining unit 139 combines the source code obtained in step S201 and the source code generated in step S202 to generate source code that realizes all one or more functions.

[0042] (Step S205: Source code output process) The information output unit 132 outputs the source code received in step S203 or the source code generated in step S204 to the user terminal 30.

[0043] The processing from step S206 to step S210 is the same as the processing from step S103 to step S107 in FIG. 4.

[0044] (Step S211: Source code determination process) The prompt generation unit 134 determines whether the source code of the function with the longest execution time is generated by the code generation model 11. If the prompt generation unit 134 determines that it is generated by the code generation model 11, the process proceeds to step S213. If the prompt generation unit 134 determines that it is not generated by the code generation model 11, the process proceeds to step S212.

[0045] (Step S212: Grade determination process) The prompt generation unit 134 determines whether the source code of the function with the longest execution time is a known one. If the prompt generation unit 134 determines that it is a known one, the process proceeds to step S213. On the other hand, if the prompt generation unit 134 determines that it is not a known one, the process proceeds to step S209.

[0046] The processing in step S213 is the same as the processing in step S108 in FIG. 4.

[0047] (Step S214: Source code generation process) The prompt generation unit 134 inputs the prompt generated in step S213 into the code generation model 11 to regenerate the source code. Then, the process returns to step S205.

[0048] ***Effects of Embodiment 2*** As described above, the execution time estimation device 10 according to the second embodiment uses the source code generated in the past. As a result, since it becomes possible to use the source code with a track record, it is possible to improve the reliability of the estimation result.

[0049] Further, the execution time estimation device 10 according to the second embodiment does not store the source code generated in the past in the code generation model 11, but manages it using the database unit 16. As a result, it becomes possible to keep the source code generated in the past confidential within the organization. Therefore, it is possible to use the source code of the handwritten code without worrying about information leakage.

[0050] ***Other configurations*** <Modification 2> In the first embodiment, each functional component is realized by software. However, as a modification 2, each functional component may be realized by hardware. The differences from the first embodiment will be described for this modification 2.

[0051] When each functional component is realized by hardware, the execution time estimation device 10 includes an electronic circuit instead of the storage 21, the processor 22, and the memory 23. The electronic circuit is a dedicated circuit that realizes the functions of each functional component, the storage 21, and the memory 23.

[0052] Examples of the electronic circuit include a single circuit, a composite circuit, a programmed processor, a parallel-programmed processor, a logic IC, a GA, an ASIC, and an FPGA. GA is an abbreviation for Gate Array. ASIC is an abbreviation for Application Specific Integrated Circuit. FPGA is an abbreviation for Field-Programmable Gate Array. Each functional component may be realized by one electronic circuit, or each functional component may be realized by being distributed among a plurality of electronic circuits.

[0053] <Modification 3> As a third modification example, some of the functional components may be implemented in hardware, and the other functional components may be implemented in software.

[0054] The storage 21, the processor 22, the memory 23, and the electronic circuit are referred to as a processing circuit. That is, the functions of the respective functional components are realized by the processing circuit.

[0055] Also, in the above description, the "section" may be read as "circuit", "step", "procedure", "process", or "processing circuit".

[0056] Hereinafter, aspects of the present disclosure will be collectively described as appendices. (Appendix 1) A front-end unit that generates a code generation prompt for instructing generation of source code for realizing one or more functions from a function description indicating one or more functions of software described in a natural language, and inputs the prompt to a code generation model that is a learning model, An execution time estimation unit that estimates an execution time of source code generated by the code generation model for the prompt input by the front-end unit An execution time estimation device including the above. (Appendix 2) The front-end unit is The execution time estimation device according to Appendix 1, which determines whether the execution time estimated by the execution time estimation unit satisfies a constraint condition. (Appendix 3) When the front-end unit determines that the execution time does not satisfy the constraint condition by the validity verification unit, the front-end unit regenerates the code generation prompt according to the relaxation condition of the software function, inputs the prompt to the code generation model, The execution time estimation unit estimates an execution time of source code generated by the code generation model for the regenerated prompt The execution time estimation device according to Appendix 2. (Appendix 4) For the function among the one or more functions with the longest execution time, the front-end part regenerates the prompt for code generation so that the execution time is improved. The execution time estimation device according to Supplementary Note 3. (Supplementary Note 5) The execution time estimation device further A search unit that acquires source code for some of the one or more functions from the source code generated in the past is provided, The front-end part generates a prompt for code generation that instructs the generation of source code for realizing the functions for which source code was not acquired by the search unit, and inputs it to the code generation model. The execution time estimation part estimates the execution time of the source code obtained by combining the source code searched by the search unit and the source code generated by the code generation model for the prompt. The execution time estimation device according to any one of Supplementary Notes 1 to 4. (Supplementary Note 6) The front-end part An input processing unit that receives the input of the function description, An information output unit that outputs the execution time The execution time estimation device according to any one of Supplementary Notes 1 to 5, comprising these. (Supplementary Note 7) A computer generates a prompt for code generation that instructs the generation of source code for realizing one or more functions from a function description indicating the one or more functions of software described in a natural language, and inputs it to a code generation model that is a learning model. An execution time estimation method in which a computer estimates the execution time of the source code generated by the code generation model for the prompt. (Supplementary Note 8) Front-end processing that generates a prompt for code generation that instructs the generation of source code for realizing one or more functions from a function description indicating the one or more functions of software described in a natural language, and inputs it to a code generation model that is a learning model. An execution time estimation process for estimating the execution time of the source code generated by the code generation model for the prompt input by the front-end processing, and An execution time estimation program that causes a computer to function as an execution time estimation device that performs the above.

[0057] The embodiments and modifications of the present disclosure have been described above. Some of these embodiments and modifications may be implemented in combination. Also, any one or some of them may be partially implemented. Note that the present disclosure is not limited to the above embodiments and modifications, and various changes can be made as necessary.

Explanation of Reference Numerals

[0058] 10 Execution time estimation device, 11 Code generation model, 12 Execution time estimation unit, 13 Front-end unit, 131 Input processing unit, 132 Information output unit, 133 Data transmission unit, 134 Prompt generation unit, 135 Validity determination unit, 136 Data reception unit, 137 Transmission path, 138 Search unit, 139 Combining unit, 14 Communication network, 15 Transmission path, 16 Database unit, 21 Storage, 22 Processor, 23 Memory, 24 Network interface, 30 User terminal.

Claims

1. a front-end unit that generates a prompt for code generation, which instructs generation of source code for implementing one or more functions of software from a functional description that indicates the one or more functions of the software written in a natural language, and inputs the prompt for code generation into a code generation model that is a learning model; an execution time estimation unit that estimates an execution time of a source code generated by the code generation model in response to the prompt input by the front end unit; a search unit that acquires source code for a part of the one or more functions from a source code that has been generated in the past; Equipped with the front-end unit generates a prompt for code generation instructing generation of source code for implementing a function for which source code has not been acquired by the search unit, and inputs the generated prompt to the code generation model; The execution time estimation unit estimates an execution time of a source code obtained by combining the source code searched by the search unit and the source code generated by the code generation model in response to the prompt.

2. a front-end unit that generates a prompt for code generation, which instructs generation of source code for implementing a plurality of functions of software from a functional description that indicates the plurality of functions of the software written in a natural language, and inputs the prompt for code generation into a code generation model that is a learning model; an execution time estimation unit that estimates an execution time of a source code generated by the code generation model in response to the prompt input by the front end unit; Equipped with the front-end unit determines whether the execution time estimated by the execution time estimation unit satisfies a constraint condition, and when it is determined that the execution time does not satisfy the constraint condition, identifies a function among the plurality of functions having the longest execution time by referring to the execution time estimated by the execution time estimation unit, regenerates the prompt for code generation for the identified function having the longest execution time in accordance with a relaxation condition for the software function so as to improve the execution time, and inputs the regenerated prompt to the code generation model; The execution time estimation unit estimates an execution time of a source code generated by the code generation model for the regenerated prompt.

3. The front end portion is an input processing unit that receives an input of the function description; an information output unit that outputs the execution time; 3. The execution time estimation device according to claim 1, further comprising:

4. The computer generates a code generation prompt that instructs generation of source code for realizing one or more functions of the software from a functional description that indicates the one or more functions described in a natural language, and inputs the code generation prompt to a learning model, which is a code generation model; The computer estimates an execution time of the source code generated by the code generation model in response to the prompt; a computer obtains source code for a part of the one or more functions from a source code generated in the past; a computer generates a prompt for code generation instructing generation of source code for implementing a function for which source code has not been obtained, and inputs the prompt to the code generation model; An execution time estimation method, in which a computer estimates an execution time of source code obtained by combining the searched source code with source code generated by the code generation model in response to the prompt.

5. The computer generates a code generation prompt that instructs generation of source code for realizing a plurality of functions of the software from a functional description that indicates the plurality of functions described in a natural language, and inputs the code generation prompt to a learning model, which is a code generation model; The computer estimates an execution time of the source code generated by the code generation model in response to the prompt; a computer determines whether the estimated execution time satisfies a constraint condition, and if it is determined that the execution time does not satisfy the constraint condition, identifies a function among the plurality of functions having the longest execution time by referring to the estimated execution time, and regenerates the prompt for code generation for the identified function having the longest execution time in accordance with a relaxation condition for the software function so as to improve the execution time, and inputs the regenerated prompt into the code generation model; An execution time estimation method, in which a computer estimates an execution time of source code generated by the code generation model for the regenerated prompt.

6. a front-end process for generating a prompt for code generation, which instructs generation of source code for realizing one or more functions of software from a functional description indicating the one or more functions described in a natural language, and inputting the prompt for code generation into a code generation model, which is a learning model; an execution time estimation process for estimating an execution time of a source code generated by the code generation model in response to the prompt input by the front-end process; A search process for acquiring source code for a part of the one or more functions from a source code generated in the past; causing a computer to function as an execution time estimation device that performs the front-end processing generates a prompt for code generation instructing generation of source code for implementing a function for which source code was not acquired by the search processing, and inputs the generated prompt to the code generation model; In the execution time estimation process, an execution time estimation program estimates the execution time of the source code obtained by combining the source code searched by the search process with the source code generated by the code generation model in response to the prompt.

7. a front-end process for generating a prompt for code generation, which instructs generation of source code for implementing a plurality of functions of software from a functional description that indicates the plurality of functions of the software written in a natural language, and inputting the prompt for code generation into a code generation model that is a learning model; an execution time estimation process for estimating an execution time of a source code generated by the code generation model in response to the prompt input by the front-end process; causing a computer to function as an execution time estimation device that performs In the front-end processing, it is determined whether or not the execution time estimated by the execution time estimation processing satisfies a constraint condition, and when it is determined that the execution time does not satisfy the constraint condition, the execution time estimated by the execution time estimation processing is referred to to identify a function having the longest execution time among the plurality of functions, and for the identified function having the longest execution time, the prompt for code generation is regenerated so as to improve the execution time in accordance with a relaxation condition of the software function, and the prompt is input to the code generation model; In the execution time estimation process, an execution time estimation program estimates an execution time of a source code generated by the code generation model for the regenerated prompt.

Citation Information

Patent Citations

  • Execution time estimation device, execution time estimation method, and program

    JP2017199253A

  • Program generation device and program generation method

    JP2021064087A

  • Automatic code reconfiguration based on function and subfunction analysis

    JP2024061591A

  • Programming support device

    JP7370467B2

  • JPP7370467B