Model description format modification device and model description format modification method
The model description format correction device addresses performance deterioration by aligning the description format of a model with a similar model's format based on performance data, enhancing resource efficiency and processing speed.
Patent Information
- Application Number
- JP2024002442
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-01-11
- Publication Date
- 2025-07-24
AI Technical Summary
When the description format of a model is unified, there is a possibility that the performance, such as resource usage amount and processing time, deteriorates.
A model description format correction device that includes a similar model data extraction unit and a model display unit to extract and correct the description format of an analysis target model to that of a specific similar model based on performance data and selection conditions, improving model performance.
The device enhances model performance by correcting the description format to that of a similar model with better resource usage and processing time.
Smart Images

Figure 2025108911000001_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a model description format correction device and a model description format correction method.
Background Art
[0002] Patent Document 1 discloses a model description format correction device for unifying a model description format. The model description format correction device described in Patent Document 1 determines whether there is code that is the same as or similar to the code generated from the created model in other models. And when the same or similar code exists in other models, the description format of the created model is unified with the description format of the other models.
Prior Art Documents
Patent Documents
[0003]
Patent Document 1
Patent Document 2
Patent Document 3
Summary of the Invention
Problems to be Solved by the Invention
[0004] When the description format of a model is unified, in the source code generated based on the unified model, there is a possibility that the performance such as resource usage amount and processing time deteriorates.
[0005] An object of the present disclosure is to provide a model description format correction device capable of improving the performance of a model when correcting the description format of the model in order to solve the above problems.
Means for Solving the Problems
[0006] The model description format correction device according to the present disclosure aims to correct the description format of a model in which the behavior of a system is abstractly represented. The model description format correction device includes a similar model data extraction unit and a model display unit. The similar model data extraction unit extracts two or more similar models that represent behaviors similar to the behavior of the analysis target model among a plurality of comparison target models based on the information of the analysis target model that is the analysis target for correcting the description format and the information of the plurality of comparison target models for comparing with the analysis target model. The model display unit corrects the description format of the analysis target model to the description format of a specific similar model selected from two or more similar models based on the performance data indicating the performance of the two or more similar models and the model selection conditions including the reference data indicating the criteria for the performance, or prompts to correct the description format of the analysis target model.
Effect of the Invention
[0007] According to the present disclosure, there is provided a model description format correction device capable of improving the performance of a model when correcting the description format of the model.
[0008] The objects, features, aspects, and advantages of the present disclosure will become more apparent from the following detailed description and the accompanying drawings.
Brief Description of the Drawings
[0009]
Figure 1
Figure 2
Figure 3
Figure 4
Figure 5
Figure 6
Figure 7
Figure 8
Figure 9
Figure 10
Figure 11
Figure 12
Figure 13
Modes for Carrying Out the Invention
[0010] <Embodiment 1> Model-based development is one of the software and hardware development methods and is mainly used in the automotive industry and the like. In model-based development, the behavior of the product to be developed is not described in natural language but in a diagram, that is, a model. A modeling tool is used for model description. For example, Simulink manufactured by MathWorks is a modeling tool using a block diagram. The modeling tool has a function of performing numerical simulation and a function of generating source code such as C language from the model. These functions improve the development efficiency and quality.
[0011] FIG. 1 is a diagram showing a description example of a model in Embodiment 1. The block named "In" is an input port block. The block named "Out" is an output port block. The block named "Constant_val" is a block corresponding to a constant value such as in the C language. The block named "Add_cal" is a block that outputs the value obtained by adding the two input values input from the "In" block and the "Constant_val" block. The model shown in FIG. 1 represents a process of outputting, as the value of the output port block, the value obtained by adding 1 to the value input to the input port block.
[0012] A model enables a person to understand the behavior of a system by visually recognizing the model. Therefore, in model-based development, the readability of the model is an important factor. The readability of a model refers to the ease of understanding the behavior of the system and the processing procedure. The higher the readability, the easier it is for a person to understand the behavior of the system and the processing procedure when reading the model.
[0013] A model description format (also referred to as a modeling method) has the characteristic that the behavior of the same system can be described in multiple formats. Therefore, the model description format may vary depending on the model creator. On the other hand, to improve the readability of a model, it is necessary that a person can understand the behavior of the system at a glance. In models representing the behavior of the same system, it is preferable that the model description format be unified in order to improve the readability of the model.
[0014] FIG. 2 is a functional block diagram showing the configuration of a model description format correction device 101 in Embodiment 1. The model description format correction device 101 has a function of correcting the description format of a model in which the behavior of a system is abstractly represented. The model description format correction device 101 includes a model input unit 10, a source code generation unit 20, a database unit 30, a similar model data extraction unit 40, a model selection condition input unit 50, and a model display unit 60.
[0015] The model input unit 10 acquires an analysis target model. The analysis target model is a model to be analyzed for whether to modify the description format. The analysis target model is input from the outside, for example.
[0016] The source code generation unit 20 generates source code based on the model. The source code is described in, for example, the C language, the C++ language, or the like. The conversion process from the model to the source code is realized by, for example, the auto code function of the modeling tool. The source code generation unit 20 in the first embodiment generates analysis target source code based on the analysis target model input to the model input unit 10. The source code generation unit 20 may compile the analysis target source code and convert it into an assembler (machine language). An assembler is a binary language that can be directly understood by a computer.
[0017] The database unit 30 stores information related to models created in the past. FIG. 3 is a diagram showing an example of information related to the models stored in the database unit 30 of the first embodiment. Information related to three comparison target models is stored in the database unit 30. The comparison target model is a model for comparison with the analysis target model. In other words, the comparison target model is an object for comparing whether the analysis target model includes behavior similar to that of the comparison target model.
[0018] The information related to the comparison target model is organized for each comparison target model and includes an index number, information on the comparison target model, information on the comparison target source code generated based on the comparison target model, information on the analysis result of the comparison target source code, and performance data of the comparison target source code. The analysis result of the comparison target source code corresponds to the product after the comparison target source code is compiled. The performance data indicates the performance of the comparison target source code.
[0019] The information of the comparison target model includes, for example, the file path information of the data of the comparison target model and the data of the comparison target model. The information of the comparison target source code includes, for example, the file path information of the data of the comparison target source code and the data of the comparison target source code. The information of the analysis result of the comparison target source code includes, for example, the file path information of the data of the product and the data of the product. The performance data includes, for example, items such as the ROM (Read Only Memory) capacity of the source code, the RAM (Random Access Memory) capacity of the source code, and the processing time of the source code, and the numerical values in each item.
[0020] The data of the comparison target source code and the data of the analysis result of the comparison target source code may be divided into a plurality of files and stored in the database unit 30. In that case, the plurality of file paths are described in a comma-separated manner.
[0021] The similar model data extraction unit 40 acquires the information of the analysis target model and the information of a plurality of comparison target models. Based on the information of the analysis target model and the information of a plurality of comparison target models, the similar model data extraction unit 40 extracts preferably two or more similar models that represent behaviors similar to the behavior of the analysis target model among the plurality of comparison target models. A model that represents a similar behavior is a model in which the processing content described in the model is the same, but the description format of the model is different.
[0022] The information of the analysis target model is, for example, the data of the analysis target source code generated by the source code generation unit 20. The information of the comparison target model is, for example, the data of the comparison target source code stored in the database unit 30. That is, the similar model data extraction unit 40 compares the analysis target source code with a plurality of comparison target source codes and extracts two or more similar models. The similar model data extraction unit 40 may compare the assembler based on the analysis target source code with the assemblers based on a plurality of comparison target source codes and extract two or more similar models.
[0023] In addition, the similar model data extraction unit 40 acquires the index number of the similar model and extracts the different parts and similar parts between the model to be analyzed and the similar model. The three pieces of data of the extracted index number, similar parts, and different parts are hereinafter referred to as similar model data.
[0024] The model selection condition input unit 50 acquires model selection conditions. The model selection conditions are conditions for the model display unit 60 described later to select a specific similar model from two or more similar models. The model selection conditions include reference data indicating criteria regarding the performance of the similar model. The reference data in the first embodiment includes data indicating criteria regarding the performance of the source code generated based on the similar model. The reference data includes items such as ROM capacity, RAM capacity, processing time, and numerical values in each item. The numerical values in each item may be provided with a range, upper limit, or lower limit.
[0025] The model display unit 60 acquires the performance data of two or more similar models extracted by the similar model data extraction unit 40 and the model selection conditions input to the model selection condition input unit 50. The performance data is acquired from the database unit 30. The model display unit 60 selects a specific similar model from two or more similar models based on the performance data and the reference data in the model selection conditions. Alternatively, when a specific similar model is selected by the user, the model display unit 60 acquires information on the selected specific similar model. Then, the model display unit 60 modifies the description format of the model to be analyzed to the description format of the specific similar model, or prompts to modify the description format of the model to be analyzed. Furthermore, the model display unit 60 may unify the description format of the model to be analyzed to the description format of the specific similar model. The model display unit 60 may prompt to unify the description format of the model to be analyzed to the description format of the specific similar model.
[0026] When selecting the above-mentioned specific similar model, the model display unit 60 selects a specific similar model so that the performance of the source code to be analyzed is improved by modifying the description format of the model to be analyzed in the description format of the specific similar model.
[0027] Based on the performance data of two or more similar models extracted by the similar model data extraction unit 40, the model display unit 60 rearranges and displays the order of those similar models. The model display unit 60 may highlight the difference portions between the similar models and the model to be analyzed.
[0028] FIG. 4 is a diagram showing an example of the configuration of the processing circuit 90 included in the model description format correction device 101. The functions of the model input unit 10, the source code generation unit 20, the database unit 30, the similar model data extraction unit 40, the model selection condition input unit 50, and the model display unit 60 are realized by the processing circuit 90. In other words, the processing circuit 90 has the model input unit 10, the source code generation unit 20, the database unit 30, the similar model data extraction unit 40, the model selection condition input unit 50, and the model display unit 60. The functions of the model input unit 10, the source code generation unit 20, the database unit 30, the similar model data extraction unit 40, the model selection condition input unit 50, and the model display unit 60 may be individually realized by a plurality of processing circuits or may be collectively realized by one processing circuit.
[0029] FIG. 5 is a diagram showing another example of the configuration of the processing circuit included in the model description format correction device 101. The processing circuit has a processor 91 and a memory 92. By the processor 91 executing a program stored in the memory 92, the functions of the model input unit 10, the source code generation unit 20, the database unit 30, the similar model data extraction unit 40, the model selection condition input unit 50, and the model display unit 60 are realized. For example, software described as a program is executed by the processor 91, whereby each function is realized. In this way, the model description format correction device 101 has a memory 92 for storing a program and a processor 91 for executing the program. The processor 91 is, for example, a CPU (Central Processing Unit) or the like. The memory 92 is a non-volatile or volatile semiconductor memory. The memory 92 may be an HDD (Hard Disk Drive) or the like.
[0030] The program describes a function for the model description format correction device 101 to extract two or more similar models that exhibit behaviors similar to that of the analysis target model from among a plurality of comparison target models based on information on the analysis target model that is the target of analysis for correcting the description format and information on the plurality of comparison target models for comparison with the analysis target model. Further, the program describes a function to correct the description format of the analysis target model to the description format of a specific similar model selected from among two or more similar models, or to prompt the correction of the description format of the analysis target model, based on performance data indicating the performance of those two or more similar models and model selection conditions including reference data indicating a reference for the performance. The program causes a computer to execute the procedures or methods of the model input unit 10, the source code generation unit 20, the database unit 30, the similar model data extraction unit 40, the model selection condition input unit 50, and the model display unit 60.
[0031] Each function of the above-described model input unit 10, source code generation unit 20, database unit 30, similar model data extraction unit 40, model selection condition input unit 50, and model display unit 60 may be partially realized by dedicated hardware and partially realized by software. The processing circuit realizes each of the above functions by a combination of hardware and software.
[0032] FIG. 6 is a flowchart showing a similar model data extraction process of the model description format correction method in Embodiment 1.
[0033] In step S11, the source code generation unit 20 generates an analysis target source code based on the analysis target model input to the model input unit 10. In a later step, when the similar model data extraction unit 40 extracts a similar model using an assembler, the source code generation unit 20 may compile the analysis target source code and convert it into an assembler.
[0034] In step S12, the similar model data extraction unit 40 sets an initial value for the loop variable "i". The loop variable "i" corresponds to the index number of the comparison target model stored in the database unit 30. Here, the initial value of the loop variable "i" is "1". The similar model data extraction unit 40 sequentially sets the loop variable "i" so that the processing after step S13 can be executed for all comparison target models.
[0035] In step S13, the similar model data extraction unit 40 determines whether the comparison target source code with the index number "i" contains a source code that is the same as or similar to the analysis target source code. Similar means that, for example, although there are differences in function names, variable names, constant values, etc. within the source code, the processing content such as the processing order and processing branches is the same for each other.
[0036] As an example, the method described in Patent Document 2 is used for the determination method in this step S13. When the method described in Patent Document 2 is used, the similar model data extraction unit 40 executes an extraction process on the assembler. For example, the similar model data extraction unit 40 extracts an opcode representing the processing content except for the operand representing the data to be processed. The similar model data extraction unit 40 determines whether the comparison target source code includes source code identical or similar to the analysis target source code based on the degree of coincidence of the opcode order.
[0037] If the comparison target source code includes source code identical or similar to the analysis target source code, step S14 is executed. Otherwise, step S16 is executed. In this way, the similar model data extraction unit 40 compares the comparison target source code and the analysis target source code to extract the same model or a similar model.
[0038] In step S14, the similar model data extraction unit 40 determines whether the description format of the comparison target model with the index number "i" is the same as the description format of the analysis target model.
[0039] As an example, the method described in Patent Document 3 is used for the determination method in this step S14. In Patent Document 3, for a model described by a block diagram using Simulink, the block diagram is normalized as a tree structure. For the normalized tree, a depth-first search is executed to detect whether there are matching blocks between the trees.
[0040] The source code has the characteristic that it is easy to extract the difference parts between comparison objects compared with the model. Also, since the source code has low dependence on tools, the difference parts can be detected accurately and quickly. However, just by comparing the source code shown in step S13, it is impossible to verify whether the model description formats are the same. Therefore, the model description format correction device 101 of Embodiment 1 compares the model description formats in step S14 and determines whether the description format of the comparison target model is the same as that of the analysis target model.
[0041] When it is determined that the description format of the comparison target model is the same as that of the analysis target model, step S16 is executed. In this case, the data of the comparison target model with index number "i" is not recorded as similar model data.
[0042] When it is determined that the description format of the comparison target model is not the same as that of the analysis target model, although the model description formats of the analysis target model and the comparison target model are different, they represent similar behaviors to each other. In this case, the similar model data extraction unit 40 extracts the difference parts and similar parts between the analysis target model and the comparison target model. The similar model data extraction unit 40 outputs similar model data including the index number of the similar model, the similar parts, and the difference parts. Then, step S15 is executed.
[0043] In this way, the similar model data extraction unit 40 extracts a similar model that represents a behavior similar to that of the analysis target model.
[0044] In step S15, the model description format correction device 101 records the comparison target model with index number "i" as a similar model. For example, the model description format correction device 101 records the similar model data.
[0045] In step S16, the model description format correction device 101 determines whether or not the similar model data extraction process has been completed for all comparison target models stored in the database unit 30. If the loop variable "i" does not match the maximum value of the index numbers stored in the database unit 30, step S17 is executed. If the loop variable "i" matches the maximum value of the index numbers stored in the database unit 30, the similar model data extraction process ends.
[0046] In step S17, the numerical value "1" is added to the loop variable "i". Then, for the comparison target model with the next index number "i + 1", step S13 is executed.
[0047] By repeating the above processing, the similar model data extraction unit 40 extracts and outputs a similar model that represents a behavior similar to that of the analysis target model among a plurality of comparison target models.
[0048] FIG. 7 is a flowchart showing the model display process of the model description format correction method according to the first embodiment. Here, a case where two or more similar models are extracted in the similar model data extraction process will be described.
[0049] In step S21, the model display unit 60 acquires the performance data of two or more similar models extracted by the similar model data extraction unit 40 and the model selection conditions input to the model selection condition input unit 50. The performance data of the similar models is acquired from the database unit 30. The model display unit 60 rearranges the order of the two or more similar models based on the performance data and the reference data in the model selection conditions. Here, as an example, the similar models extracted by the similar model data extraction unit 40 are the models with index numbers "1" and "2" shown in FIG. 3. It is set in the model selection conditions that the RAM capacity of the source code is 110 MB or less. The model display unit 60 rearranges the order of the similar models in the order of index numbers "2" and "1".
[0050] In step S22, the model display unit 60 numerically displays the performance of the source code of the similar models sorted in step S21.
[0051] In step S23, the model display unit 60 highlights the difference portions between the two or more similar models extracted by the similar model data extraction unit 40 and the analysis target model based on the similar model data.
[0052] In step S24, a specific similar model is selected from among the two or more similar models. When the specific similar model is selected by the user, the model display unit 60 acquires the information of the specific similar model. When the specific similar model is automatically selected by the model display unit 60, the model display unit 60 selects, for example, the similar model with the best numerical value of the source code performance.
[0053] The model display unit 60 corrects the description format of the analysis target model to the description format of the specific similar model. Alternatively, the model display unit 60 may prompt the user to correct the description format of the analysis target model to the description format of the specific similar model. The user is, for example, a model creator. When the user corrects the description format of the analysis target model, the user copies the description format of the specific similar model described above and corrects the description format of the analysis target model.
[0054] The model display unit 60 may unify the description format of the analysis target model to the description format of the specific similar model. Alternatively, the model display unit 60 may prompt to unify the description format of the analysis target model to the description format of the specific similar model. For example, by sorting the similar models according to the specified model selection conditions (in the order of the performance of the auto code), it becomes possible to unify the model description format with a model description format that improves the performance of the source code generated from the model input from the model input unit 10. Also, by displaying the performance of the auto code corresponding to the model as a numerical value, it becomes a criterion for considering the performance of the auto code when correcting the model description format.
[0055] To summarize the above, the model description format correction device 101 in Embodiment 1 is a device for correcting the description format of a model in which the behavior of a system is abstractly represented. The model description format correction device 101 includes a similar model data extraction unit 40 and a model display unit 60. The similar model data extraction unit 40 extracts two or more similar models that represent behaviors similar to that of the analysis target model among a plurality of comparison target models based on the information of the analysis target model that is the target of analysis for correcting the description format and the information of a plurality of comparison target models for comparison with the analysis target model. The model display unit 60 corrects the description format of the analysis target model to the description format of a specific similar model selected from two or more similar models based on the performance data indicating the performance of the two or more similar models and the model selection conditions including the reference data indicating the criteria for the performance, or prompts to correct the description format of the analysis target model.
[0056] When such a model description format correction device 101 attempts to correct the description format of an analysis target model, it improves the performance of the source code generated based on the analysis target model.
[0057] In addition, the model display unit 60 highlights the difference portions between the two or more similar models extracted by the similar model data extraction unit 40 and the analysis target model input to the model input unit 10. Thereby, since the difference portions between the models are easy to understand, the model correction work is made more efficient.
[0058] The analysis target model may be one of the plurality of comparison target models stored in the database unit 30. In this case, the description formats of the models stored in the database unit 30 are unified.
[0059] The model display unit 60 displays, in numerical data, the performance of the source code generated based on two or more similar models extracted by the similar model data extraction unit 40 and the performance of the source code to be analyzed generated based on the model to be analyzed input to the model input unit 10. In such a configuration, the model to be analyzed input from the model input unit 10 and the comparison target model stored in the database unit 30 are compared numerically. The modeling technique of the model creator is quantitatively evaluated. Thereby, the modeling technique of the model creator is improved.
[0060] <Embodiment 2> FIG. 8 is a functional block diagram showing the configuration of the model description format correction device 102 in Embodiment 2. The model description format correction device 102 includes a test data input unit 70, a model automatic test unit 71, a source code automatic test unit 72, and a database creation unit 31 in addition to the configuration of the model description format correction device 101 in Embodiment 1.
[0061] The test data input unit 70 acquires a test specification regarding the test of the behavior of the system described by the model. The test specification is input from the outside, for example. The test specification includes test data.
[0062] FIG. 9 is a diagram showing an example of test data. FIG. 9 shows two pieces of test data, and each piece of test data is managed by a test number. As an example, the test data includes, as elements, two input data (input A1 and input B1) and two output data (output A2 and output B2). Input A1 and input B1 correspond to the input data input to the model. Output A2 and output B2 correspond to the output data output from the model as a result of the processing being executed in the model. The number of each of the input data and the output data is not limited to two. Further, the input data and the output data are not limited to numerical values and may include character strings or the like. Depending on the processing content in the model, the input data or the output data is not necessarily required.
[0063] The model automatic test unit 71 verifies whether the analysis target model input from the model input unit 10 meets the test specifications. For this verification, for example, the simulation function of the modeling tool is used. The model automatic test unit 71 gives the input data of the test data to the analysis target model. And when the output of the analysis target model is the same as the output data of the test data, the model automatic test unit 71 determines that the analysis target model meets the test specifications. For an analysis target model without input and output, when no error is output during the simulation using the test data, the model automatic test unit 71 determines that the analysis target model meets the test specifications. In other cases, the model automatic test unit 71 determines that the analysis target model does not meet the test specifications.
[0064] When the analysis target model meets the test specifications, the model automatic test unit 71 outputs the analysis target model to the source code generation unit 20. When the analysis target model does not meet the test specifications, the model automatic test unit 71 notifies the user that the analysis target model does not meet the test specifications.
[0065] The source code automatic test unit 72 verifies whether the analysis target source code generated by the source code generation unit 20 meets the test specifications. The source code automatic test unit 72 performs the verification, for example, by compiling the analysis target source code and executing the process. The source code automatic test unit 72 gives the input data of the test data to the variable of the analysis target source code corresponding to the input of the analysis target model when the analysis target source code is executed. And when the variable corresponding to the output of the analysis target model is the same as the output data of the test data, the source code automatic test unit 72 determines that the analysis target source code meets the test specifications. For an analysis target source code without input and output, when no error is output during the execution of the analysis target source code, the source code automatic test unit 72 determines that the analysis target source code meets the test specifications. Also, the source code automatic test unit 72 measures the ROM capacity, RAM capacity, processing time, etc. when executing the source code.
[0066] When the source code to be analyzed does not meet the test specifications, the source code automatic test unit 72 notifies the user that the source code to be analyzed does not meet the test specifications. When the model to be analyzed does not meet the test specifications or when the source code to be analyzed does not meet the test specifications, the model description format correction device 102 does not execute subsequent processing.
[0067] The database creation unit 31 automatically stores the model to be analyzed and the source code to be analyzed in the database unit 30 only when the model to be analyzed and the source code to be analyzed meet the test specifications.
[0068] The functions of the test data input unit 70, the model automatic test unit 71, the source code automatic test unit 72, and the database creation unit 31 are realized by the processing circuit shown in FIG. 4 or FIG. 5.
[0069] According to such a model description format correction device 102, since the model to be analyzed and the source code to be analyzed that meet the test specifications are automatically added to the database unit 30, the update work of the database unit 30 is streamlined. In addition, since tests are automatically executed on the model to be analyzed and the source code to be analyzed input from the model input unit 10, the quality of the models stored in the database unit 30 is guaranteed.
[0070] <Embodiment 3> FIG. 10 is a functional block diagram showing the configuration of the model description format correction device 103 in Embodiment 3. The model description format correction device 103 includes a specification input unit 80, a test data input unit 70, a similar specification extraction unit 83, a similar test data extraction unit 73, a database unit 30, a model display unit 60, and a model selection condition input unit 50.
[0071] The database unit 30 stores information related to models created in the past. FIG. 11 is a diagram showing an example of information related to models stored in the database unit 30 of Embodiment 3. In the database unit 30, information related to three comparison target models is stored. The information related to the comparison target models of Embodiment 3 includes, in addition to the information related to the comparison target models of Embodiment 1, for each comparison target model, a comparison target specification and comparison target test data. In other words, the database unit 30 stores a plurality of comparison target specifications and a plurality of comparison target test data.
[0072] In the comparison target specification, the behavior of the comparison target model is described in natural language. For example, the comparison target specification includes descriptions such as "calculate the absolute value" and "calculate the logical sum".
[0073] The comparison target test data may include file path information of the comparison target test data. The comparison target test data has the same configuration as the test data shown in FIG. 9.
[0074] The specification input unit 80 acquires an input specification. The input specification is, for example, a specification input from the outside, and the behavior of the system is described in natural language.
[0075] The test data input unit 70 acquires input test data related to the test of the behavior of the system. The input test data is input from the outside, for example. The input test data has the same configuration as the test data shown in FIG. 9.
[0076] Based on the input specification and a plurality of comparison target specifications, the similar specification extraction unit 83 extracts at least one first comparison target model having a comparison target specification similar to the input specification from among the plurality of comparison target models stored in the database unit 30. As an example of a method for comparing the input specification and the comparison target specification, machine learning or the like is used, and the similarity between sentences is calculated. The similar specification extraction unit 83 extracts a first comparison target model having a comparison target specification with a high similarity.
[0077] The similar test data extraction unit 73 extracts at least one second comparison target model having comparison target test data similar to the input test data from among a plurality of comparison target models stored in the database unit 30 based on the input test data and the comparison target test data. As an example of a method for comparing the input test data and the comparison target test data, machine learning or the like is used, and the similarity between the test data is calculated. The similar test data extraction unit 73 extracts a second comparison target model having comparison target test data with a high similarity.
[0078] The model selection condition input unit 50 acquires model selection conditions. The model selection conditions include reference data indicating criteria for the performance of the first comparison target model and the second comparison target model. The reference data of Embodiment 3 includes items such as ROM capacity, RAM capacity, and processing time, and numerical values in each item, as criteria for the performance of the source code.
[0079] The model display unit 60 acquires the performance data of the first comparison target model and the second comparison target model from the database unit 30. The performance data includes numerical values indicating the performance of the source code of each of the first comparison target model and the second comparison target model. Also, the model display unit 60 acquires the model selection conditions from the model selection condition input unit 50. The model display unit 60 encourages the reuse of the description format of one of the first comparison target model and the second comparison target model based on the performance data and the reference data in the model selection conditions.
[0080] The functions of the specification input unit 80, the similar specification extraction unit 83, the similar test data extraction unit 73, the database unit 30, and the model selection condition input unit 50 are realized by the processing circuit shown in FIG. 3 or FIG. 6.
[0081] FIG. 12 is a flowchart showing the model display process in the model description format correction method according to Embodiment 3.
[0082] In step S31, the model display unit 60 acquires the performance data of at least one first comparison target model extracted by the similar specification extraction unit 83. Also, the model display unit 60 acquires the performance data of at least one second comparison target model extracted by the similar test data extraction unit 73. Those performance data are acquired from the database unit 30. Further, the model display unit 60 acquires model selection conditions from the model selection condition input unit 50. The model display unit 60 rearranges the order of the first comparison target model and the second comparison target model in descending order of the performance of the source code based on the performance data of each of the first comparison target model and the second comparison target model and the reference data in the model selection conditions.
[0083] In step S32, the model display unit 60 displays the ROM capacity, RAM capacity, and processing time in the source code of each of the first comparison target model and the second comparison target model in the rearranged order.
[0084] In step S33, the model display unit 60 displays the model data attributes, specifications, and test data of the first comparison target model and the second comparison target model displayed in the rearranged order. The model data attribute indicates whether each of the first comparison target model and the second comparison target model is a model extracted by either the similar specification extraction unit 83 or the similar test data extraction unit 73.
[0085] In step S34, the model display unit 60 prompts the user to reuse the description format of any of the first comparison target model and the second comparison target model. When the user adopts the reuse plan, a new model is created in the user's local computer environment.
[0086] In the model description format correction device 103 according to Embodiment 3, before analyzing the analysis target model input from the model input unit 10, it is verified whether the data of the comparison target model stored in the database unit 30 can be reused. When a reuse plan is adopted, the analysis target model input from the model input unit 10 becomes unnecessary, so that the modeling is made more efficient.
[0087] (Modification Example of Embodiment 3) FIG. 13 is a functional block diagram showing the configuration of a model description format correction device 104 according to a modification example of Embodiment 3. The model description format correction device 104 includes a specification input unit 80, a test data input unit 70, a similar specification extraction unit 83, and a similar test data extraction unit 73 in addition to the configuration of the model description format correction device 101 of Embodiment 1. Even with such a model description format correction device 104, the same effects as in Embodiment 3 can be obtained. Also, even when the specification input unit 80, the test data input unit 70, the similar specification extraction unit 83, and the similar test data extraction unit 73 are added to the model description format correction device 102 of Embodiment 2, the same effects as in Embodiment 3 can be obtained.
[0088] The present disclosure can freely combine each embodiment, or appropriately modify or omit each embodiment.
[0089] Hereinafter, various aspects of the present disclosure will be summarized as appendices.
[0090] (Appendix 1) A model description format correction device for correcting a description format of a model in which the behavior of a system is abstractly represented, Based on information of an analysis target model that is an analysis target for correcting the description format and information of a plurality of comparison target models for comparing with the analysis target model, a similar model data extraction unit that extracts two or more similar models representing behaviors similar to the behavior of the analysis target model among the plurality of comparison target models; Based on the performance data indicating the performance of the two or more similar models and the model selection conditions including the reference data indicating the criteria for the performance, the description format of the analysis target model is modified to the description format of the specific similar model selected from the two or more similar models, or a model display unit that prompts to modify the description format of the analysis target model, A model description format correction device comprising:
[0091] (Appendix 2) The performance data includes data indicating the performance of the source code generated based on the two or more similar models. The reference data of the model selection conditions includes data indicating the criteria for the performance of the source code. The model description format correction device according to Appendix 1 or Appendix 2.
[0092] (Appendix 3) The model display unit unifies and corrects the description format of the analysis target model to the description format of the specific similar model, or prompts to unify and correct the description format of the analysis target model. The model description format correction device according to Appendix 1 or Appendix 2.
[0093] (Appendix 4) A model input unit to which the analysis target model is input; A source code generation unit that generates analysis target source code based on the analysis target model; A database unit that stores the plurality of comparison target models, the plurality of comparison target source codes generated based on the plurality of comparison target models, and the performance data indicating the performance of each of the plurality of comparison target source codes; Further comprising a model selection condition input unit to which the model selection conditions are input; The similar model data extraction unit compares the analysis target source code with the plurality of comparison target source codes and extracts the two or more similar models. When selecting the specific similar model based on the performance data of the two or more similar models and the model selection conditions, the model display unit selects the specific similar model by modifying the description format of the analysis target model in the description format of the specific similar model, so that the performance of the analysis target source code is improved. The model description format correction device according to any one of Appendices 1 to 3.
[0094] (Appendix 5) The model display unit numerically displays the performance of the source code generated based on the two or more similar models and the performance of the analysis target source code generated based on the analysis target model. The model description format correction device according to any one of Appendices 1 to 4.
[0095] (Appendix 6) The model display unit highlights the difference portions between the two or more similar models and the analysis target model. The model description format correction device according to any one of Appendices 1 to 5.
[0096] (Appendix 7) The analysis target model is one of the plurality of comparison target models stored in the database unit. The model description format correction device according to Appendix 4.
[0097] (Appendix 8) A test data input unit for inputting test specifications regarding the test of the behavior of the system described by the model, A model automatic test unit for verifying whether the analysis target model satisfies the test specifications, A source code automatic test unit for verifying whether the analysis target source code satisfies the test specifications, When the analysis target model and the analysis target source code satisfy the test specifications, a database creation unit for storing the analysis target model and the analysis target source code in the database unit. The model description format correction device according to Appendix 4 or Appendix 7.
[0098] (Appendix 9) Based on the input specification in which the behavior of the system is described in natural language and the plurality of comparison target specifications in which the behavior of the plurality of comparison target models is described in the natural language respectively, a similar specification extraction unit that extracts at least one first comparison target model having a comparison target specification similar to the input specification among the plurality of comparison target models; Based on the input test data for testing the behavior of the system and the plurality of comparison target test data for testing the behavior of the plurality of comparison target models respectively, a similar test data extraction unit that extracts at least one second comparison target model having a comparison target test data similar to the input test data among the plurality of comparison target models, and further comprising: The model display unit promotes the reuse of the description format of any of the at least one first comparison target model and the at least one second comparison target model based on the performance data indicating the performance of each of the at least one first comparison target model and the at least one second comparison target model, the reference data indicating the reference for the performance, and the model selection condition, and the model description format correction device according to any one of Appendices 1 to 8.
[0099] (Appendix 10) A model description format correction device for correcting the description format of a model in which the behavior of a system is abstractly represented, Based on the input specification in which the behavior of the system is described in natural language and the plurality of comparison target specifications in which the behavior of the plurality of comparison target models is described in the natural language respectively, a similar specification extraction unit that extracts at least one first comparison target model having a comparison target specification similar to the input specification among the plurality of comparison target models; Based on the input test data for testing the behavior of the system and a plurality of comparison target test data for testing the behavior of each of the plurality of comparison target models, a similar test data extraction unit that extracts at least one second comparison target model having comparison target test data similar to the input test data among the plurality of comparison target models; A model description format correction device, comprising: a model display unit that promotes the reuse of the description format of any of the at least one first comparison target model and the at least one second comparison target model based on performance data indicating the performance of each of the at least one first comparison target model and the at least one second comparison target model, and model selection conditions including reference data indicating a reference for the performance.
[0100] (Appendix 11) A model description format correction method for correcting the description format of a model in which the behavior of a system is abstractly represented, Based on information of an analysis target model that is an analysis target for correcting the description format and information of a plurality of comparison target models for comparison with the analysis target model, two or more similar models that represent behaviors similar to the behavior of the analysis target model among the plurality of comparison target models are extracted, Based on performance data indicating the performance of the two or more similar models and model selection conditions including reference data indicating a reference for the performance, correct the description format of the analysis target model to the description format of a specific similar model selected from the two or more similar models, or prompt to correct the description format of the analysis target model. A model description format correction method.
Description of Reference Numerals
[0101] 10 Model input unit, 20 Source code generation unit, 30 Database unit, 31 Database creation unit, 40 Similar model data extraction unit, 50 Model selection condition input unit, 60 Model display unit, 70 Test data input unit, 71 Model automatic test unit, 72 Source code automatic test unit, 73 Similar test data extraction unit, 80 Specification input unit, 83 Similar specification extraction unit, 90 Processing circuit, 91 Processor, 92 Memory, 101 - 104 Model description format correction devices.
Claims
1. A model description format correction device for correcting a description format of a model in which the behavior of a system is abstractly represented, comprising: a similar model data extraction unit that extracts two or more similar models representing behaviors similar to the behavior of the analysis target model among the plurality of comparison target models based on information of the analysis target model that is the target of analysis for correcting the description format and information of the plurality of comparison target models for comparison with the analysis target model; a model display unit that corrects the description format of the analysis target model to the description format of a specific similar model selected from the two or more similar models based on performance data indicating the performance of the two or more similar models and model selection conditions including reference data indicating a reference for the performance, or prompts to correct the description format of the analysis target model;
2. The performance data includes data indicating the performance of source code generated based on the two or more similar models, The model description format correction device according to claim 1, wherein the reference data of the model selection conditions includes data indicating the reference for the performance of the source code.
3. The model display unit according to claim 1, which corrects the description format of the analysis target model to be unified with the description format of the specific similar model, or prompts to correct the description format of the analysis target model to be unified.
4. a model input unit to which the analysis target model is input; a source code generation unit that generates analysis target source code based on the analysis target model; a database unit that stores the plurality of comparison target models, a plurality of comparison target source codes generated based on the plurality of comparison target models, and the performance data indicating the performance of each of the plurality of comparison target source codes; further comprising a model selection condition input unit to which the model selection conditions are input, wherein the similar model data extraction unit compares the analysis target source code with the plurality of comparison target source codes and extracts the two or more similar models. When the model display unit selects the specific similar model based on the performance data of the two or more similar models and the model selection conditions, the model display unit selects the specific similar model by modifying the description format of the analysis target model in the description format of the specific similar model so that the performance of the analysis target source code is improved. The model description format correction device according to claim 1.
5. The model display unit according to claim 1, wherein the model display unit displays, in numerical data, the performance of the source code generated based on the two or more similar models and the performance of the analysis target source code generated based on the analysis target model.
6. The model description format correction device according to claim 1, wherein the model display unit highlights a difference portion between the two or more similar models and the analysis target model.
7. The analysis target model is one of the plurality of comparison target models stored in the database unit. The model description format correction device according to claim 4.
8. A test data input unit for inputting a test specification regarding a test of the behavior of the system described by the model; A model automatic test unit for verifying whether the analysis target model satisfies the test specification; A source code automatic test unit for verifying whether the analysis target source code satisfies the test specification; The model description format correction device according to claim 4, further comprising: a database creation unit that stores the analysis target model and the analysis target source code in the database unit when the analysis target model and the analysis target source code satisfy the test specification.
9. A similar specification extraction unit that extracts at least one first comparison target model having a comparison target specification similar to the input specification from the plurality of comparison target models based on the input specification in which the behavior of the system is described in a natural language and the plurality of comparison target specifications in which the behaviors of the plurality of comparison target models are respectively described in the natural language; Based on input test data for testing the behavior of the system and a plurality of comparison target test data for testing the behavior of each of the plurality of comparison target models, a similar test data extraction unit that extracts at least one second comparison target model having comparison target test data similar to the input test data among the plurality of comparison target models, The model display unit promotes the reuse of the description format of any of the at least one first comparison target model and the at least one second comparison target model based on the performance data indicating the performance of each of the at least one first comparison target model and the at least one second comparison target model, and the model selection condition including the reference data indicating the reference for the performance. The model description format correction device according to claim 1.
10. A model description format correction device for correcting the description format of a model in which the behavior of a system is abstractly represented, Based on an input specification in which the behavior of the system is described in natural language and a plurality of comparison target specifications in which the behavior of a plurality of comparison target models is described in the natural language respectively, a similar specification extraction unit that extracts at least one first comparison target model having a comparison target specification similar to the input specification among the plurality of comparison target models, Based on input test data for testing the behavior of the system and a plurality of comparison target test data for testing the behavior of each of the plurality of comparison target models, a similar test data extraction unit that extracts at least one second comparison target model having comparison target test data similar to the input test data among the plurality of comparison target models, A model display unit that promotes the reuse of the description format of any of the at least one first comparison target model and the at least one second comparison target model based on performance data indicating the performance of each of the at least one first comparison target model and the at least one second comparison target model, and a model selection condition including reference data indicating a reference for the performance. A model description format correction device comprising:
11. A model description format correction method for correcting the description format of a model in which the behavior of a system is abstractly represented, Based on the information of the analysis target model that is the analysis target for modifying the description form, and the information of a plurality of comparison target models for comparison with the analysis target model, extract two or more similar models that represent behaviors similar to the behavior of the analysis target model among the plurality of comparison target models. A model description form modification method for modifying the description form of the analysis target model to the description form of a specific similar model selected from the two or more similar models based on the performance data indicating the performance of the two or more similar models and the model selection conditions including the reference data indicating the criteria for the performance, or prompting to modify the description form of the analysis target model.
Citation Information
Patent Citations
Device, method and program for calculating similarity
JP2011086147A
Clone detection device, clone detection program, and recording medium recording clone detection program
JP2012038022A
Model description format correction device
JP2016201040A