Application development support method and application development support system

By dynamically generating the processing control unit's source code to use platform-specific APIs and handling data type conversions, the adaptation of application logic to the AUTOSAR AP execution environment is efficiently addressed, reducing adaptation time and effort.

JP2025087136APending Publication Date: 2025-06-10ASTEMO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
JP2023201580
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-11-29
Publication Date
2025-06-10

AI Technical Summary

Technical Problem

The challenge is to reduce the time and effort required for adapting application logic to the execution environment in AUTOSAR AP, where platform-specific APIs are dynamically generated, making it difficult to prepare a common API for abstraction.

Method used

The solution involves configuring the application into three parts: application logic, processing control unit, and platform input/output unit. The processing control unit's source code is dynamically generated to use the dynamically generated platform-specific API, and data type conversions are handled to facilitate data exchange between the application logic and the platform input/output unit.

Benefits of technology

This approach significantly reduces the adaptation work needed for the application logic to operate on the execution environment, streamlining the development process and shortening lead times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2025087136000001_ABST
    Figure 2025087136000001_ABST
Patent Text Reader

Abstract

To reduce a work of adapting an application logic to an execution environment.SOLUTION: An application development support method, which is executed by an information processing device, includes: a first step of reading in a data computation software component; a second step of acquiring a first input-output data definition including a data type required in the data computation software component; a third step of generating a source code of a platform input-output software component based on the first input-output data definition; a fourth step of generating a second input-output data definition including a data type required in the platform input-output software component; and a fifth step of generating a source code of a processing control software component based on a correspondence between the data type in the first input-output data definition and the data type in the second input-output data definition.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an application development support system for supporting the development of applications.

Background Art

[0002] The development environment for developing an application and the execution environment of the application may have different platforms (PF). For example, an application executed on a platform (AUTOSAR AP) introduced into an in-vehicle electronic control device may be developed on another platform (Simulink). In this case, it is necessary to transplant (adapt) the application developed in the Simulink environment so that it can be executed in the AUTOSAR AP environment.

Prior Art Documents

Patent Documents

[0003]

Patent Document 1

Summary of the Invention

Problems to be Solved by the Invention

[0004] Even after an application is released as a product version, the application is frequently changed for function updates and expansions. The changes to the application at this time are made in the development environment, and each time, it is necessary to adapt the application for that platform so that the changed application operates on the platform that is the execution environment. There is a need to shorten the development lead time by shortening the time required for this adaptation work.

[0005] Generally, platform-specific Application Programming Interfaces (APIs) are statically defined. Generally, there is a way to shorten the time required for adaptation work by preparing in advance a common API that abstracts each platform-specific API, and implementing the processing control unit to call this common API. Inside this common API, there are implementations for each platform that are implemented in a form that calls the statically defined platform-specific APIs. If an application can use the common API, and the common API supports different platforms, it is possible to easily adapt to those different platforms without modifying the application.

[0006] However, in AUTOSAR AP, which is the platform of the execution environment, since the platform-specific API is dynamically generated by the platform-specific tool, the common API cannot be prepared in advance, and it is necessary to modify the application side to use the platform-specific API.

[0007] Therefore, in order to reduce the adaptation work to the platform, the application can be configured to consist of three parts: application logic that does not depend on the platform, a processing control unit that depends on the platform, and a platform input / output unit. The application logic is the part that directly undertakes the main functions (computation processing) of the application, and the processing control unit controls the execution of the application logic and the transmission and reception of input / output data to and from the application logic so as to operate on that platform. The platform input / output unit is the part that actually performs the communication of input / output data and is automatically generated by the platform-specific tool. The platform-specific API described above is automatically generated by this platform-specific tool.

[0008] In order to reduce the adaptation work to the platform in the above application configuration, it is necessary to dynamically generate the source code of the processing control unit so as to use the dynamically generated platform-specific API.

[0009] Also, within the processing control unit, data needs to be exchanged between the application logic and the platform input / output unit. However, the application logic is implemented in a platform-independent manner, and the data types used on the application logic side are defined. On the other hand, on the platform input / output unit side, the data types used on the platform side are defined by platform-specific tools. Since these data types are separately defined even if they are composed of the same internal elements, they are not compatible, and the processing control unit cannot directly transfer data between the application logic and the platform input / output unit. Therefore, in the data exchange between the application logic and the platform input / output unit, conversion processing from one data type to the other is required.

[0010] As a method for generating program source code for data transfer, for example, there is a technique described in Patent Document 1 (Japanese Patent Application Laid-Open No. 2004-38507). Patent Document 1 (Japanese Patent Application Laid-Open No. 2004-38507) discloses a program source code generation method for generating program source code for transferring common data to each other, which refers to information in which a group serving as a unit for transferring common data to each other and a group of the program source code to be generated are defined, and for the program source code to be generated defined in the information, based on the elements included in the group of the program source code, generates program source code for data transfer, and combines the program source code generated based on the elements to generate the program source code to be generated for which the group is defined. However, Patent Document 1 does not consider data transfer between different data types.

[0011] An object of the present invention is to reduce the work of adapting application logic to the platform of the execution environment by generating source code that uses a dynamically generated platform-specific API.

Means for Solving the Problems

[0012] A typical example of the invention disclosed in the present application is as follows. That is, an application development support method executed by an information processing apparatus, wherein the information processing apparatus has an arithmetic unit that executes predetermined arithmetic processing and a storage device accessible by the arithmetic unit, and the information processing apparatus generates source code of an application operable on a first platform based on a data arithmetic software component that arithmetically operates output data based on input data. The source code of the application includes the data arithmetic software component, a platform input / output software component that performs data input / output between the data arithmetic software component and the first platform, and a processing control software component that controls the processing of the data arithmetic software component and the platform input / output software component. The application development support method includes a first step in which the arithmetic unit reads the data arithmetic software component, a second step in which the arithmetic unit acquires a first input / output data definition including a data type required in the data arithmetic software component, a third step in which the arithmetic unit generates source code of the platform input / output software component based on the first input / output data definition, a fourth step in which the arithmetic unit generates a second input / output data definition including a data type required in the platform input / output software component, and a fifth step in which the arithmetic unit generates source code of the processing control software component based on a correspondence relationship between the data type in the first input / output data definition and the data type in the second input / output data definition.

Effect of the Invention

[0013] According to one aspect of the present invention, the work of adapting the application logic to the execution environment can be reduced. Problems, configurations, and effects other than those described above will be clarified by the description of the embodiments for carrying out the following invention.

Brief Description of the Drawings

[0014]

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

Figure 14

Figure 15

Figure 16

Figure 17

Figure 18

Figure 19

Mode for Carrying Out the Invention

[0015] <Example 1> FIG. 1 is a diagram showing the configuration of the application development support system 1 of Example 1.

[0016] The application development support system 1 of this example includes an input / output data specification generation unit 20, a PF input / output unit generation information generation unit 30, a PF input / output unit generation unit 40, an input / output data specification generation unit 50, a data structure correspondence relationship estimation unit 60, a processing control unit generation unit 70, and a synthesis unit 80.

[0017] The application development support system 1 receives the source code (application logic code) of the application logic 2 having the arithmetic API and outputs the source code (application code) of the application 3. The application code output from the application development support system 1 is executed as the application 3 in the electronic control device through build processing and the like.

[0018] The input / output data specification generation unit 20 generates input / output data specification information from the application logic code of the application logic 2. As shown in FIG. 3, the application logic code includes the definition of the arithmetic API published by the application logic 2 and the definition of the data types used in the arguments of the arithmetic API. Here, the arithmetic API is an API for driving arithmetic processing related to the functions provided by the application 3.

[0019] The PF input / output unit generation information generation unit 30 generates PF input / output unit generation information from the input / output data specification information output from the input / output data specification generation unit 20.

[0020] The PF input / output section generation unit 40 generates the source code (PF input / output section code) of the PF input / output section from the PF input / output section generation information output from the PF input / output section generation information generation unit 30.

[0021] The input / output data specification generation unit 50 generates input / output data specification information from the PF input / output section code output from the PF input / output section generation unit 40.

[0022] The data structure correspondence relationship estimation unit 60 generates data correspondence relationship information from the input / output data specification information output from the input / output data specification generation unit 20 and the input / output data specification information output from the input / output data specification generation unit 50.

[0023] The processing control section generation unit 70 generates the source code (processing control section code) of the processing control section from the data correspondence relationship information output from the data structure correspondence relationship estimation unit 60.

[0024] The synthesis unit 80 synthesizes the application logic code that is the input of the application development support system 1, the PF input / output section code output from the PF input / output section generation unit 40, and the processing control section code output from the processing control section generation unit 70, and outputs the application code. The application code is composed of a set of the application logic code, the processing control section code, and the PF input / output section code.

[0025] In the application development support system 1 shown in FIG. 1, the input / output data specification generation unit 20 extracts the input / output data specification information from the application logic code, but the input / output data specification information may be directly input to the application development support system 1. In that case, the input / output data specification information is directly input to the PF input / output section generation information generation unit 30 and the data structure correspondence relationship estimation unit 60, and the application logic code is directly input to the synthesis unit 80.

[0026] FIG. 2 is a block diagram showing the physical configuration of the computer constituting the application development support system 1 of the present embodiment.

[0027] The application development support system 1 of this embodiment is composed of a computer having a processor (CPU) 101, a memory 102, an auxiliary storage device 103, and a communication interface 104. The application development support system 1 may have an input interface 105 and an output interface 106.

[0028] The processor 101 is an arithmetic unit that executes programs stored in the memory 102. By the processor 101 executing various programs, each functional unit of the application development support system 1 (for example, the input / output data specification generation unit 20, the PF input / output unit generation information generation unit 30, the PF input / output unit generation unit 40, the input / output data specification generation unit 50, the data structure correspondence relationship estimation unit 60, the processing control unit generation unit 70, the synthesis unit 80, etc.) is realized. Note that a part of the processing performed by the processor 101 when executing a program may be executed by another arithmetic unit (for example, hardware such as an ASIC or FPGA).

[0029] The memory 102 includes a ROM which is a non-volatile memory element and a RAM which is a volatile memory element. The ROM stores unchanging programs (for example, BIOS), etc. The RAM is a high-speed and volatile memory element such as a DRAM (Dynamic Random Access Memory), and temporarily stores the programs executed by the processor 101 and the data used during program execution.

[0030] The auxiliary storage device 103 is a large-capacity and non-volatile storage device such as a magnetic storage device (HDD) or a flash memory (SSD), for example. Also, the auxiliary storage device 103 stores the data used by the processor 101 during program execution and the programs executed by the processor 101. That is, the programs are read from the auxiliary storage device 103, loaded into the memory 102, and executed by the processor 101 to realize each function of the application development support system 1.

[0031] The communication interface 104 is a network interface device that controls communication with other devices according to a predetermined protocol.

[0032] The input interface 105 is an interface to which input devices such as a keyboard 107 and a mouse 108 are connected and which receives inputs from an operator. The output interface 106 is an interface to which output devices such as a display device 109 and a printer (not shown) are connected and which outputs the execution results of a program in a form visible to the user. Note that a terminal (not shown) connected to the application development support system 1 via a network may provide the input device and the output device. In this case, the application development support system 1 may have the function of a web server, and the terminal may access the application development support system 1 using a predetermined protocol (for example, http).

[0033] The program executed by the processor 101 is provided to the application development support system 1 via a removable medium (such as a CD-ROM or a flash memory) or a network and is stored in the non-volatile auxiliary storage device 103 which is a non-transitory storage medium. For this reason, the application development support system 1 may preferably have an interface for reading data from a removable medium.

[0034] The application development support system 1 is a computer system configured physically on one computer or on a plurality of computers configured logically or physically, and may operate on a virtual computer constructed on a plurality of physical computer resources. For example, each functional unit may operate on a separate physical or logical computer, or a plurality of them may be combined and operate on one physical or logical computer.

[0035] FIG. 3 is a diagram showing an example of application logic code input to the application development support system 1.

[0036] The application logic code is source code in which processing (particularly arithmetic processing) for realizing the main functions of an application is described by a developer according to a programming language specification, and is composed of a source file and a header file including the following definitions. ·Definition of the arithmetic API that serves as the interface for the application logic

[0037] The arguments of the arithmetic API are composed of the input data necessary for the arithmetic processing of the application logic and the output data that is the result of that arithmetic processing. ·Definition of the data types used in the arguments of the arithmetic API

[0038] Figure 4 is a flowchart of the input / output data specification generation process executed by the input / output data specification generation unit 20.

[0039] The input / output data specification generation unit 20 searches for API definitions based on specific keywords from the header file of the application logic code (S101). For example, it searches for arithmetic APIs that are publicly exposed (to the processing control unit) using "public" as the keyword. Based on Figure 3, "runAppLogic" is obtained as the result of S101.

[0040] Then, the input / output data specification generation unit 20 extracts the arguments of each arithmetic API found as a result of the search (S102). Based on Figure 3, as a result of S102, the argument "pos3d" of the "app::pos" data type and the argument "oinfo" of the "app::obj" data type used in the arguments of "runAppLogic" are obtained.

[0041] Then, the input / output data specification generation unit 20 determines whether each argument is an input or an output (S103). Input is the direction into the application logic, and output is the direction out of the application logic. For example, it may be determined based on keywords (e.g., "in", "out") included in the argument name, or it may be determined based on the way the argument is passed (e.g., input if passed by value, output if passed by reference). Assuming that the input data is passed by value and the output data is passed by reference, based on Figure 3, the argument "pos3d" is determined to be an input and the argument "oinfo" is determined to be an output.

[0042] Then, the input / output data specification generation unit 20 searches for the data types of each argument in the header file and outputs the API definition and data type information as input / output data specification information (S104). Based on FIG. 3, by searching the header file in S104, the definitions of app::pos and app::obj (the parts starting with struct app::pos and struct app::obj) can be obtained. Then, the input / output data specification information is output based on this information.

[0043] FIG. 4 described the input / output data specification generation process executed by the input / output data specification generation unit 20. For the input / output data specification generation unit 50 as well, by replacing the application logic code with the PF input / output unit code and the arithmetic API with the transmission / reception API in the above description, the same process is performed on the PF input / output unit code.

[0044] FIG. 5 is a diagram showing an example of the input / output data specification information output by the input / output data specification generation unit 20.

[0045] The format of the input / output data specification information may be arbitrary. For example, it may be a json file conforming to the json specification.

[0046] The input / output data specification information is composed of information extracted from the header file of the application logic code and includes the following information. · Interface name (the application logic corresponds to the arithmetic API name and is described as the ifname element in FIG. 5) · Input / output data information (corresponding to the arguments of the arithmetic API and described as the data element in FIG. 5) · Data type name of the input / output data (data.type element in FIG. 5), variable name (data.name element in FIG. 5), input / output direction of the data type (reception or transmission) (corresponding to the data.direction element in FIG. 5), and data type name and element name of each internal element included in the data type (data.elements element in FIG. 5)

[0047] The input / output data specification information output by the input / output data specification generation unit 50 is also expressed in the same manner based on the transmission / reception API definition included in the PF input / output unit code. The interface name corresponds to the transmission / reception API, and the input / output data information corresponds to the data transmitted / received by the transmission / reception API.

[0048] The PF input / output unit generation information generation unit 30 converts the format of the input / output data specification information output from the input / output data specification generation unit 20 and generates PF input / output unit generation information. In the PF input / output unit generation information generation unit 30, all the information included in the input / output data specification information is included in the PF input / output unit generation information in a format-converted form. This format conversion can be easily realized by known techniques. Also, information not included in the input / output data specification information may be added to the PF input / output unit generation information based on fixed values or setting information.

[0049] The format of the PF input / output unit generation information depends on the input specification of the PF input / output unit generation unit 40. For example, there is an ARXML file (AUTOSAR XML) that conforms to the ARXML specification, and the ARXML specification is composed of the following information. · Interface name of the PF input / output unit (name related to the transmission / reception API) · Data types communicated at each of the above interfaces and their internal elements

[0050] The data types communicated and their internal elements are included in the input / output data specification information and are set by the PF input / output unit generation information generation unit 30 through format conversion.

[0051] The PF input / output unit generation unit 40 generates the PF input / output unit code based on the PF input / output unit generation information. The PF input / output unit generation unit 40 has already been realized by tools provided by the PF vendor and is a known technique.

[0052] The PF input / output unit code is source code written according to the programming language specification for the processing of sending and receiving via the platform. This source code consists of a source file and a header file containing the following definitions. · Definition of the send / receive API that serves as the interface for the PF input / output unit

[0053] The arguments of the send / receive API are each composed of data to be sent and received via the PF. · Definition of the data types specified by the arguments of the send / receive API

[0054] In the PF input / output unit code output by the PF input / output unit generation unit 40, the send / receive API definition is generated based on the information described in the PF input / output unit generation information. At that time, the data type names, names of internal elements, etc. may match exactly the information included in the PF input / output unit generation information, or may be processed based on predetermined rules.

[0055] The data structure correspondence relationship estimation unit 60 estimates the correspondence relationship of each data structure (each data type and its internal elements) based on the input / output data specification information of the application logic 2 and the input / output data specification information of the PF input / output unit. For example, the data structure correspondence relationship estimation unit 60 may estimate the correspondence relationship of the data structure based on the similarity of names.

[0056] FIG. 6 is a diagram showing a configuration example of the data structure correspondence relationship information.

[0057] The data structure correspondence relationship information is information indicating the correspondence relationship between the input / output data structures of the application logic 2 and the PF input / output unit. For example, it may be created based on the input / output data specification information on the application logic 2 side and the input / output data specification information on the PF input / output unit side, and may be a json file in which the corresponding input / output data specification information on the PF input / output unit side is added to the input / output data specification information on the application logic 2 side.

[0058] In the data structure correspondence information shown in FIG. 6, for the input / output data specification information shown in FIG. 5, the input / output data specification information on the PF input / output unit side is added as a field starting with "corresponding" to show the correspondence. In FIG. 6, since the arithmetic processing API of the application logic 2 and the transmission / reception API of the PF input / output unit are not necessarily in a 1:1 correspondence, the corresponding ifname may be indicated inside each data. For example, the app::pos and app::obj data types included in the runAppLogic of the arithmetic API may be transmitted and received by separate transmission / reception APIs on the PF input / output unit side. In FIG. 6, the data type on the PF input / output unit side corresponding to app::pos is pf::pos, and its variable name is shown as PosData. Also, the internal elements x, y, and z included in the data type of app::pos correspond to the internal elements _x, _y, and _z of pf::pos, respectively. Although omitted in FIG. 6, similar to the correspondence between app::pos and pf::pos, the correspondence between the app::obj data type and the pf::obj data type is also described in the same way.

[0059] FIG. 11 is a flowchart of the correspondence estimation process executed by the data structure correspondence estimation unit 60. Through the processes shown in FIGS. 11 to 13, the data structure correspondence information shown in FIG. 6 is generated.

[0060] In the correspondence estimation process, for example, an estimation method can be adopted to estimate the correspondence between data types and between their internal elements based on the similarity of names. 1. Regarding data types (structures), for example, using the matching rate of the names of the data types, it is advisable to determine that the ones with the most similar names between the data type referred to by the arithmetic API on the application logic side and the data type referred to by the transmission / reception API on the PF input / output unit side have a correspondence. 2. Regarding the internal elements included in each data type in 1. above, for example, using the matching rate of the names of the internal elements of each data type, it is advisable to determine that the ones with the most similar names of the internal elements of each data type have a correspondence.

[0061] First, the data structure correspondence relationship estimation unit 60 selects one input / output data (A) from the input / output data specification information of the application logic (S111). Then, the data structure correspondence relationship estimation unit 60 searches for the input / output data (B) corresponding to the input / output data (A) from the input / output data specification information of the PF input / output unit (S112). Then, the data structure correspondence relationship estimation unit 60 searches for the correspondence relationship between the internal elements of the input / output data (A) and the internal elements of the input / output data (B) (S113). The processing from steps S111 to S113 is executed for all the input / output data included in the input / output data specification information of the application logic.

[0062] FIG. 12 is a detailed flowchart of the input / output data search process (S112).

[0063] The data structure correspondence relationship estimation unit 60 refers to the type information of the input / output data specification information and calculates the matching rate between the data type names of each data type included in the input / output data specification information of the PF input / output unit and the data type name of the input / output data (A) (S121). For example, consider the case where the type information of the input / output data (A) is app::pos and the list of type information of each data type included in the input / output data specification information of the PF input / output unit is as follows. At this time, calculate the matching rate with "app::pos" for each of the following names. As a result, since the string of "::pos" is common, the matching rate of pf::pos is the highest. ·List of input / output data specifications of the PF input / output unit pf::output pf::pos pf::processStatus

[0064] Then, the data structure correspondence relationship estimation unit 60 determines whether there are multiple data with the highest similarity (matching rate) of data type names (S122). S122 is considered, for example, in the case where there are multiple input data with the same data type in the input of the arithmetic API. In such a case, since all the type information is the same and the correspondence relationship cannot be uniquely specified, the determination is made based on the matching rate between the names (name information) of the arguments.

[0065] If there are multiple data type names with the highest match rate, the data structure correspondence relationship estimation unit 60 refers to the name information of the input / output data specification information among those with the highest match rate, compares the names of the arguments, and selects the one with the highest match rate as the candidate for the input / output data (B) (S123). For example, consider a case where there are multiple pieces of data of the ara::pos type (type information) in the input / output data specification information of the application logic, each with the names sensor1 and sensor2, and on the other hand, there are also multiple pieces of data of the pf::pos type in the input / output data specification information of the PF input / output unit, each with the names sensor1 and sensor2. In this case, based on the match rate of the name information, it is determined that sensor1 of ara::pos and sensor1 of pf::pos correspond.

[0066] On the other hand, if there is only one data type name with the highest match rate, the data structure correspondence relationship estimation unit 60 selects the one with the highest match rate as the candidate for the input / output data (B) (S124).

[0067] After that, the data structure correspondence relationship estimation unit 60 determines whether the input / output directions of the input / output data (A) and the candidate for the input / output data (B) are the same based on the direction information (S125).

[0068] If the input / output directions of the input / output data (A) and the candidate for the input / output data (B) are the same, the input / output data search process ends. On the other hand, if the input / output directions of the input / output data (A) and the candidate for the input / output data (B) are different, the current candidate for the input / output data (B) is excluded (S126), and the process returns to step S121, and the iteration process is executed for the unprocessed data types. This is because assuming data transfer from the platform input / output unit to the application logic, the input / output directions are the same, so those with different input / output directions are excluded.

[0069] FIG. 13 is a detailed flowchart of the internal element correspondence relationship search process (S113).

[0070] The data structure correspondence relationship estimation unit 60 selects one internal element from the input / output data (A) (S131).

[0071] Then, the data structure correspondence relationship estimation unit 60 calculates the coincidence rate by comparing the element names of each internal element included in the input / output data (B) with the element name of the internal element of the input / output data (A) selected in S131. Then, it is determined that the internal element having the highest coincidence rate among the internal elements included in the input / output data (B) corresponds to the internal element of the input / output data (A) selected in S131 (S132). For example, when the internal element x on the input / output data (A) side is selected and the following internal elements are included on the input / output data (B) side, it is determined that _x of the input / output data (B) has a high coincidence rate. · Input / output data (B) _x _y _z

[0072] Then, the data structure correspondence relationship estimation unit 60 determines whether all the internal elements of the input / output data (A) have been investigated (S133). If the investigation of all the internal elements of the input / output data (A) is completed, the internal element correspondence relationship search process ends. On the other hand, if the investigation of some of the internal elements of the input / output data (A) is incomplete, the process returns to step S131, and the process is executed for the uninvestigated internal elements.

[0073] FIG. 7 is a diagram showing a pseudo-code example of the basic part of the processing control unit generated by the processing control unit generation unit 70. FIGS. 8 and 9 are diagrams showing examples of conversion functions generated by the processing control unit generation unit 70. FIG. 10 is a diagram showing a pseudo-code example of the processing control unit generated by the processing control unit generation unit 70 based on FIGS. 7 to 9.

[0074] The processing control unit generation unit 70 generates the basic part of the processing control unit code based on the data structure correspondence relationship information. For example, it generates the source code of the following basic part that performs processing such as receiving the input data required for the arithmetic processing of the application logic, performing the arithmetic processing of the application logic, and transmitting the output result. The pseudo-code thereof is shown in FIG. 7. (1) Execution start (2) Loop the following processes (2-1) Call the receiving API to receive data (in Figure 7, pf::pos type data is received and the received data is stored in the PosData variable). (2-2) Prepare the variables pos3d and oinfo required as arguments for the calculation API of the application logic, and call the calculation API while passing them as arguments (at the time of Figure 7, no value setting to the variables is performed). (2-3) Prepare the variable objData required as an argument for the sending API, and call the sending API while passing it as an argument (at the time of Figure 7, similar to (2-2), no value setting to the variables is performed).

[0075] The above (2-1) to (2-3) can be generated based on the data structure correspondence relationship information. For example, for (2-1), in the data structure correspondence relationship information, check the PF input / output part side (= information with "corresponding" added), and generate based on them. For (2-2), in the data structure correspondence relationship information, based on the information on the application logic side (= information without "corresponding" added), prepare the corresponding variables and then generate the calculation API call. For (2-3), similar to (2-1), check the PF input / output part side and generate based on them. Whether to generate with (2-1) or (2-3) can be clearly identified by checking the correspondingdirection information of each data.

[0076] At the time of Figure 7, no data transfer is performed between the arguments of the calculation API of the application logic and the arguments of the sending and receiving APIs of the PF input / output part. To perform this data transfer, the functions in Figures 8 and 9 described below are generated.

[0077] Based on the data structure correspondence information, the processing control unit generator 70 generates functions for converting data types as shown in FIG. 8 based on each correspondence information. For example, from the data structure correspondence information shown in FIG. 6, the data types app::pos and pf::pos of the application logic and the PF input / output unit with corresponding relationships, their input / output directions, and the information of internal elements (e.g., x, _x) with corresponding relationships in each data type can be used for generation. In FIG. 6, since the direction attribute and the correspondingdirection attribute are in, it is determined that the conversion is from the platform input / output unit side to the application logic side, that is, from pf::pos to app::pos, and the data type conversion function in FIG. 8 is generated. The function generated here is a copy process between each element by an assignment statement, and methods other than the assignment statement may be used according to the data type. For example, if it is the std::string type (string type) in the C++ language, the copy() function may be used.

[0078] Conversely, if the direction attribute and the correspondingdirection attribute are out in FIG. 6, a data type conversion function for performing the conversion from the application logic side to the PF input / output unit side, that is, from app::pos to pf::pos, may be generated. The data type conversion function in this case is shown in FIG. 9.

[0079] Furthermore, the processing control unit generation unit 70 inserts the data type conversion function in FIG. 8 into the basic part of the processing control unit in FIG. 7. The result is shown in FIG. 10. The insertion position of each function is determined by the direction attribute and the correspondingdirection attribute. If the direction attribute and the correspondingdirection attribute are in, it is inserted before the arithmetic API (runAppLogic), and if the direction attribute and the correspondingdirection attribute are out, it is inserted after the arithmetic API. As described above, the conversion functions for all pairs of corresponding relationships are inserted into appropriate places in the basic part of the processing control unit according to the values of the direction attribute and the correspondingdirection attribute. At this time, the arguments set for each data type conversion function are set according to the data types of the respective arguments. As a result, as shown in FIG. 10, data type conversion from the pf::pos type to the app::pos type is performed between the arithmetic API on the application logic side and the transmission / reception API of the PF input / output unit, and transfer becomes possible.

[0080] As described above, according to the first embodiment of the present invention, the application logic code, the PF input / output unit code dynamically generated by the platform, and the processing control unit code corresponding to the transmission / reception API of the PF input / output unit and the arithmetic API of the application logic are generated, and by synthesizing these, the application code is generated, and the work of adapting the application logic to the execution environment can be reduced.

[0081] <Example 2> In Example 1, the compatibility in data transfer between the application logic and the PF input / output unit was realized by data conversion. However, since substitution processing is performed on an element-by-element basis, there are problems in terms of performance regarding data type conversion for structure data consisting of a large number of internal elements. Example 2 of the present invention is different from Example 1 described above in that the data type of the argument in the operation API of the application logic is defined by referring to an alias of the data type of the argument in the transmission / reception API of the PF input / output unit. By this alias reference, since the data type of the argument in the operation API and the data type of the argument in the transmission / reception API are regarded as the same, data type conversion becomes unnecessary. In Example 2, mainly the differences from Example 1 will be described, and the same components and processes as in Example 1 are denoted by the same reference numerals, and their descriptions are omitted.

[0082] Whether to apply the data conversion method of Example 1 or the alias reference method of Example 2 may be changed depending on the number of internal elements of the data type and, for example, the constraints regarding the modification of the application logic, or the method may be specified for each data by setting information.

[0083] FIG. 14 is a diagram showing the configuration of the application development support system 1 of Example 2.

[0084] The application development support system 1 of this embodiment includes an input / output data specification generation unit 20, a PF input / output unit generation information generation unit 30, a PF input / output unit generation unit 40, an input / output data specification generation unit 50, a data structure correspondence relationship estimation unit 60, a processing control unit generation unit 70, a synthesis unit 80, and an application logic code modification unit 90. The configurations of the input / output data specification generation unit 20, the PF input / output unit generation information generation unit 30, the PF input / output unit generation unit 40, the input / output data specification generation unit 50, and the data structure correspondence relationship estimation unit 60 are the same as those in Example 1 described above.

[0085] The application logic code modification unit 90 refers to the data correspondence relationship information output from the data structure correspondence relationship estimation unit 60 and modifies the application logic code of the application logic 2.

[0086] The processing control unit generation unit 70 generates the basic part of the processing control unit code shown in FIG. 7 from the data correspondence information output from the data structure correspondence relationship estimation unit 60. In the second embodiment, different from the first embodiment, the processing control unit generation unit 70 does not generate the conversion functions shown in FIGS. 8 and 9, nor does it insert the conversion function shown in FIG. 10. This is because the data definition used by the arguments of the application logic operation API is defined by alias reference, so data type conversion becomes unnecessary.

[0087] The synthesizing unit 80 synthesizes the application logic code modified by the application logic code modifying unit 90, the PF input / output unit code output from the PF input / output unit generation unit 40, and the processing control unit code output from the processing control unit generation unit 70, and outputs the application code.

[0088] FIG. 15 is a flowchart of the modification process executed by the application logic code modifying unit 90.

[0089] The application logic code modifying unit 90 selects one correspondence relationship from the data structure correspondence relationship information (S141). Then, the application logic code modifying unit 90 obtains the data type name on the application logic side from the correspondence relationship (S142). Then, the application logic code modifying unit 90 searches the header file of the application logic code with the data type name in S142 to identify the definition location of the data type (S143). Then, the application logic code modifying unit 90 rewrites the location to refer to the data type defined on the PF input / output unit side (S144). The processes from step S141 to S144 are executed for all correspondence relationships.

[0090] By the modification process of the application logic code described above, for example, the application logic code before modification shown in FIG. 16 is converted into the application logic code after modification.

[0091] As shown in FIG. 16, the correspondence relationship between app::pos and pf::pos is selected by S141 from the data structure correspondence relationship information, and app::pos is obtained as the data type name on the application logic side at S142. Then, at S143, the data type definition of app::pos included in the pre-modification application logic code is specified with app::pos as the keyword. Further, regarding the data type definition part of app::pos, the application logic code is modified at S144 so that pf::pos on the PF input / output unit side is referenced by an alias, and this becomes the post-modification application logic code. As a result, app::pos is treated as the same data type as pf::pos, and data conversion processing between app::pos and pf::pos becomes unnecessary.

[0092] Note that according to a predetermined condition, for each data type of the arguments of the operation API of the application code, it is possible to select whether to execute the process of rewriting the application code (S144) as in Example 2 or the process of inserting the data conversion process into the processing control unit code as in Example 1.

[0093] As described above, according to the alias reference method of Example 2 of the present invention, data type conversion becomes unnecessary within the processing control unit code, and data can be directly exchanged between the operation API and the transmission / reception API.

[0094] <Example 3> Example 3 of the present invention extends Example 1 and Example 2, and executes reception processing and operation processing at independent timings according to application requirements. In Example 3, mainly the differences from Example 1 are described, and the same components and processes as in Example 1 are denoted by the same reference numerals, and their descriptions are omitted. Since the differences between Example 3 and Example 2 are the same as those between Example 1, the description is omitted.

[0095] Based on Example 1, it is difficult to handle the case where reception processing and arithmetic processing are executed at independent timings (e.g., timer-driven, event-driven, etc.) according to application requirements. FIG. 17, which abstracts FIG. 7 showing the basic part of the processing control unit in Example 1 for the subsequent description, is shown. Based on FIG. 17, Example 1 can only handle the case where data reception processing, arithmetic processing, and data transmission processing of arithmetic results are executed together. In Example 3, the processing control unit generation unit 70 acquires processing control information including reception timing and arithmetic execution timing information for each data, and generates a processing control unit code for executing reception and arithmetic processing at the specified timing.

[0096] Although not shown in the figure, the application development support system 1 of this example has the same configuration as the application development support system 1 (FIG. 1, FIG. 14) of Example 1 or Example 2, but the function of the processing control unit generation unit 70 is different. That is, the processing control unit generation unit 70 of Example 3 generates a processing control unit code from the data correspondence relationship information output from the data structure correspondence relationship estimation unit 60 and the processing control information input from the outside.

[0097] FIG. 18 is a diagram showing an example of the processing control unit code output by the processing control unit generation unit 70 of Example 3.

[0098] When the processing control information includes processing control unit setting information such as executing data reception processing when data arrives and calling the operation API of the application logic by timer drive with a period of 100 ms, the processing control unit generation unit 70 generates a processing control unit code as shown in FIG. 18 based on the processing control unit setting information. In this processing control unit code, as shown by the portion surrounded by the dashed line, a callback function registration process is inserted so that data reception processing is executed when data arrives, and further, a process of periodically sending a notification at a period of 100 ms by another thread and waiting for the notification is inserted. The callback function registration is realized by an API provided by the PF input / output unit and is a known technique. Also, these processes are an example, and similar processes may be implemented by other processing means. By generating a processing control unit code including such processes based on the processing control unit setting information, data reception processing and operation processing can be performed at a timing according to the application requirements.

[0099] In Embodiment 3, the processing control information input to the processing control unit generation unit 70 may be input from the outside, or may be generated by converting a processing control setting file (see FIG. 19) input from the outside.

[0100] FIG. 19 is a diagram showing an example of the processing control setting file of Embodiment 3.

[0101] The processing control setting file includes information on data reception timing and processing execution timing. The format of the processing control setting file may be arbitrary, for example, a json file conforming to the json specification.

[0102] The data reception timing is the timing at which the processing control unit calls the data reception API. For example, it is when data arrives on the PF side or immediately before calling the operation API. The processing control setting file may include information ("timing": "AtArrival") specifying the timing at which the data is received for each data type (ara::pos) to be received.

[0103] The processing execution timing is the timing when the processing control unit calls the arithmetic API, such as periodically or when specific data is received. The processing control setting file may include information specifying the execution timing (e.g., "periodical", "onDataArrival"), and further include information on the cycle time ("timing": "periodical", "duration": "1sec") when calling periodically. Or when calling when specific data is received, it may include information specifying the data (e.g., "app::pos").

[0104] As described above, according to the method of Example 3 of the present invention, processing can be executed at any timing.

[0105] Note that the present invention is not limited to the foregoing embodiments, and includes various modifications and equivalent configurations within the scope of the appended claims. For example, the foregoing embodiments have been described in detail for easy understanding of the present invention, and the present invention is not necessarily limited to those having all the configurations described. Also, a part of the configuration of one embodiment may be replaced with the configuration of another embodiment. Also, the configuration of another embodiment may be added to the configuration of one embodiment. Also, for a part of the configuration of each embodiment, addition, deletion, or replacement with other configurations may be made.

[0106] Also, each of the foregoing configurations, functions, processing units, processing means, etc. may be realized in hardware by designing a part or all of them, for example, by using an integrated circuit, or may be realized in software by a processor interpreting and executing a program for realizing each function.

[0107] Information such as programs, tables, and files for realizing each function can be stored in a storage device such as a memory, a hard disk, an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.

[0108] Also, the control lines and information lines show those considered necessary for explanation, and do not necessarily show all the control lines and information lines required for implementation. In reality, it can be considered that almost all components are interconnected.

Explanation of Signs

[0109] 1 Application Development Support System 2 Application Logic 3 Application 20 Input / Output Data Specification Generation Unit 30 PF Input / Output Unit Generation Information Generation Unit 40 PF Input / Output Unit Generation Unit 50 Input / Output Data Specification Generation Unit 60 Data Structure Corresponding Relationship Estimation Unit 70 Processing Control Unit Generation Unit 80 Synthesis Unit 90 Application Logic Code Correction Unit 101 Processor 102 Memory 103 Auxiliary Storage Device 104 Communication Interface 105 Input Interface 106 Output Interface 107 Keyboard 108 Mouse 109 Display Device

Claims

1. An application development support method executed by an information processing apparatus, wherein the information processing apparatus includes an arithmetic unit that executes predetermined arithmetic processing and a storage device accessible by the arithmetic unit, and the information processing apparatus generates source code of an application operable on a first platform based on a data arithmetic software component that arithmetically operates output data based on input data, the application development support method comprising: the source code of the application includes the data arithmetic software component, a platform input / output software component that performs data input / output between the data arithmetic software component and the first platform, and a processing control software component that controls processing of the data arithmetic software component and the platform input / output software component; the application development support method includes: a first step in which the arithmetic unit reads the data arithmetic software component; a second step in which the arithmetic unit acquires a first input / output data definition including a data type required in the data arithmetic software component; a third step in which the arithmetic unit generates source code of the platform input / output software component based on the first input / output data definition; a fourth step in which the arithmetic unit generates a second input / output data definition including a data type required in the platform input / output software component; and a fifth step in which the arithmetic unit generates source code of a processing control software component based on a correspondence relationship between the data type in the first input / output data definition and the data type in the second input / output data definition. An application development support method characterized by including the above.

2. The application development support method according to claim 1, wherein the generated source code of the processing control software component includes source code that executes a data conversion process for converting data according to the first input / output data definition into data according to the second input / output data definition. An application development support method characterized by this.

3. The application development support method according to claim 1, further comprising a step of estimating the correspondence relationship between the data type in the first input / output data definition and the data type in the second input / output data definition based on a similarity of element names between the first input / output data definition and the second input / output data definition. An application development support method characterized by including the above.

4. The application development support method according to claim 2, further comprising the step of rewriting the source code of the data calculation software component so that the data type in the first input / output data definition conforms to the data type in the second input / output data definition. The application development support method is characterized by this.

5. The application development support method according to claim 4, further comprising the step of selecting whether to execute either the step of rewriting the source code of the data calculation software component for at least one of the input data and output data to be calculated by the data calculation software component according to a predetermined condition, or the step of generating the source code of the processing control software component that executes the data conversion process. The application development support method is characterized by this.

6. The application development support method according to claim 1, further comprising the step of obtaining a processing control specification including the specification of data processing control required in the data calculation software component, and generating the source code of the data calculation process control software component that controls the process executed by the data calculation software component and the process executed by the platform input / output software component according to at least one of the reception timing of the input data and the calculation timing of the output data set in the processing control specification. The application development support method is characterized by this.

7. An application development support system for generating the source code of an application operable on a first platform based on a data calculation software component that calculates output data based on input data, comprising a computer having an arithmetic device that executes a predetermined arithmetic process and a storage device accessible by the arithmetic device, wherein the source code of the application includes the data calculation software component, a platform input / output software component that performs data input / output between the data calculation software component and the first platform, and a processing control software component that controls the processes of the data calculation software component and the platform input / output software component, and the application development support system includes an input / output data specification generation unit that causes the arithmetic device to load the data calculation software component and generate a first input / output data definition including the data type required in the loaded data calculation software component. a PF input / output unit generation information generation unit that generates source code of the platform input / output software component based on the first input / output data definition; a PF input / output unit generation unit that generates a second input / output data definition including data types required in the platform input / output software component; An application development support system, characterized by comprising a processing control unit generation unit that generates source code of a processing control software component based on a correspondence relationship between data types in the first input / output data definition and data types in the second input / output data definition.

Citation Information

Patent Citations

  • Program source code generation method, and program source code generation program

    JP2004038507A