Software development apparatus, software development program, and software development method

JP2026016754A5Pending Publication Date: 2026-06-03帝都久利寿 +1

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
帝都久利寿
Filing Date
2025-11-05
Publication Date
2026-06-03

AI Technical Summary

Technical Problem

Existing technologies for creating programs on edge devices in IoT systems do not adequately consider various constraints such as resource limitations and security, as exemplified by Japanese Patent Application Laid-Open No. 2004-038956, which focuses solely on computing resources without addressing broader constraints.

Method used

A software development apparatus and program that evaluate source code for compliance with constraints on resources, execution state, and execution procedure, generating object code that conforms to these constraints, with the option to generate additional object code for runtime compliance evaluation.

Benefits of technology

Enables the setting of various constraints for programs on edge devices, ensuring compliance with resource and security considerations, thereby creating applications that utilize limited resources effectively and prevent unintended behavior.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

It provides an environment in which various constraints can be freely set for programs executed on edge devices, etc. [Solution] A software development device that generates object code from source code includes an evaluation means that extracts constraints set in the source code and evaluates whether the source code complies with the constraints within the scope of application of the extracted constraints, and a generation means that generates object code so as to comply with the constraints.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present disclosure relates to a software development device and a software development program. [Background technology]

[0002] Recent advances in information and communication technology (ICT) have been remarkable, and devices connected to networks such as the Internet are no longer limited to traditional information processing devices such as personal computers and smartphones, but are now expanding to include a wide variety of things. This technological trend is known as the "Internet of Things" (IoT), and a variety of technologies and services are being proposed and put into practical use. In the future, it is expected that billions of people and tens of billions or even trillions of devices on Earth will be connected simultaneously. To realize such a networked world, it is necessary to provide solutions that enable simpler, safer, and more free connections.

[0003] As devices used in IoT (also known as "edge devices") become more intelligent, it becomes necessary to create various types of programs. However, the resources available to the target devices are often limited compared to personal computers.

[0004] As an example of how to create a program taking available resources into consideration, Japanese Patent Application Laid-Open No. 2004-038956 discloses a system for discovering and indicating computing resources available on various computing devices and for exposing such resources as services addressable by software applications. [Prior art documents] [Patent documents]

[0005] [Patent Document 1] Japanese Patent Application Laid-Open No. 2004-038956 Summary of the Invention [Problem to be solved by the invention]

[0006] When creating a program to be executed on an edge device, various points must be considered in terms of available resources and security. However, the above-mentioned Patent Document 1 merely focuses on creating a program taking into consideration the computing resources available on the target computing device, and does not provide a solution to the problem of having to consider various points when creating a program. [Means for solving the problem]

[0007] According to one aspect of the present disclosure, there is provided a software development apparatus for generating object code from source code, the software development apparatus including: evaluation means for extracting constraints set in source code and evaluating whether the source code conforms to the extracted constraints within a range of application of the constraints; and generation means for generating object code so as to conform to the constraints.

[0008] The generating means may stop generating the object code when it is evaluated that the source code does not conform to the constraints within the scope of the constraints.

[0009] When it is not possible to evaluate whether the source code complies with the constraint within the scope of application of the constraint, the generating means may generate, in addition to the object code corresponding to the source code, another object code for evaluating whether the object code complies with the constraint during execution of the object code.

[0010] The constraints may include any one of the following: restrictions or rules on the resources that the object code uses when it is executed; restrictions or rules on the execution state of the object code; restrictions or rules on the execution procedure of the object code; and restrictions or rules on the instructions contained in the source code.

[0011] When a call instruction is included in the scope of application of the constraint, the evaluation means may also evaluate whether or not an instruction called by the call instruction complies with the constraint.

[0012] According to another aspect of the present disclosure, there is provided a software development program for generating object code from source code, which causes a computer to execute the steps of: extracting constraints set in source code, evaluating whether the source code conforms to the extracted constraints within a scope of application of the constraints, and generating object code so as to conform to the constraints. [Effects of the Invention]

[0013] According to the present disclosure, it is possible to provide an environment in which various constraints can be freely set for programs executed on edge devices and the like. [Brief explanation of the drawings]

[0014] [Figure 1] 1 is a schematic diagram showing an example of an overall configuration of an IoT system according to an embodiment of the present invention. [Figure 2] FIG. 1 is a schematic diagram illustrating an example of a hardware configuration of a software development apparatus according to an embodiment of the present invention. [Figure 3] FIG. 2 is a schematic diagram illustrating an example of a hardware configuration of a controller according to the present embodiment. [Figure 4] FIG. 10 is a diagram for explaining constraints that can be set in the software development apparatus according to the present embodiment. [Figure 5]FIG. 10 is a diagram for explaining the scope of constraints that can be set in the software development apparatus according to the present embodiment. [Figure 6] 10A and 10B are diagrams for illustrating a case where conformance of settable constraints must be determined at runtime in the software development apparatus according to the present embodiment. [Figure 7] FIG. 2 is a block diagram showing a functional configuration provided by the software development apparatus according to the present embodiment. [Figure 8] 10A and 10B are diagrams for explaining a method for realizing conformance to constraints on calls in the software development apparatus according to the present embodiment. [Figure 9] 10 is a flowchart showing a processing procedure for generating object code from source code in the software development device according to the present embodiment. [Figure 10] FIG. 2 is a diagram showing an example of a user interface screen provided by the software development apparatus according to the present embodiment. DETAILED DESCRIPTION OF THE INVENTION

[0015] DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The present disclosure will be described in detail with reference to the accompanying drawings. In the drawings, the same or corresponding parts are designated by the same reference numerals and the description thereof will not be repeated.

[0016] In the following description, as a typical example, software development device 10 according to this embodiment 0 will be described as being applied to an IoT system, but the present disclosure is not limited to IoT systems and can be applied to any system and controller.

[0017] <A.IoTシステム1> First, the overall configuration of an IoT system 1 including a software development apparatus 100 and an edge device 2 according to the present embodiment will be described.

[0018] Fig. 1 is a schematic diagram showing an example of the overall configuration of an IoT system 1 according to the present embodiment. Referring to Fig. 1, in the IoT system 1, a program (object code) to be executed in an edge device 2 is typically generated in a software development device 100. The generated program is transferred from the software development device 100 to a controller 200 included in the edge device 2.

[0019] The software development device 100 is provided with an integrated development environment (IDE), and users can create any program in the IDE. That is, the software development device 100 generates object code from source code created by the user.

[0020] The edge device 2 may be any device, but typically includes factory equipment, various household devices, social infrastructure equipment, moving objects such as vehicles, any portable device, etc. As will be described later, the controller 200 has a processor and is capable of executing a program from the software development device 100.

[0021] An example of a processing procedure in the IoT system 1 will be described. First, a user creates source code using the software development device 100 ((1) Source Code Creation). The created source code is then compiled in the software development device 100 to generate object code ((2) Object Code Generation). The generated object code is transferred to the controller 200 of the edge device 2 ((3) Object Code Transfer). The transferred object code is executed by the controller 200 ((4) Object Code Execution).

[0022] By this procedure, any program developed in the software development device 100 can be executed in the controller 200.

[0023] As will be described later, the software development apparatus 100 according to the present embodiment provides an environment in which various restrictions can be freely set for the program executed by the controller 200. Typically, various restrictions can be arbitrarily set for the program according to the resources possessed by the controller 200 on which the program is executed, the types and uses of the edge devices 2, the importance of the program to be executed, the security to be ensured, and the like. By setting such restrictions, it is possible to realize an application using limited resources and prevent an unintended behavior of the application.

[0024] <B. Hardware Configuration Example> Next, a hardware configuration example of the devices included in the IoT system 1 according to the present embodiment will be described.

[0025] (b1: Software Development Apparatus 100) The software development apparatus 100 is typically realized by a general-purpose computer.

[0026] FIG. 2 is a schematic diagram showing a hardware configuration example of the software development apparatus 100 according to the present embodiment. Referring to FIG. 2, the software development apparatus 100 includes, as main components, a processor 102, a main memory 104, an input unit 106, a display 108, a hard disk 110, and a communication interface 122. These components are connected via an internal bus 120.

[0027] The processor 102 is composed of, for example, a CPU (Central Processing Unit) or a GPU (Graphics Processing Unit). A plurality of processors 102 may be arranged, or a processor 102 having a plurality of cores may be employed. 、複数のコアを有するプロセッサ102を採用してもよい。

[0028] ​​The main memory 104 is configured with a volatile storage device such as a DRAM (Dynamic Random Access Memory) or an SRAM (Static Random Access Memory). The hard disk 110 may be replaced with a non-volatile memory such as a solid state drive (SSD) or a flash memory. A volatile storage device may also be used. A designated program from among the programs stored on the hard disk 110 is loaded onto the main memory 104, and the processor 102 sequentially executes computer-readable instructions contained in the program loaded onto the main memory 104, thereby realizing various functions as will be described later.

[0029] Typically, hard disk 110 stores source code 112 created arbitrarily by the user, a software development program 114 for realizing an integrated development environment, and object code 116 generated from source code 112. Software development program 114 generates object code 116 from source code 112 created arbitrarily by the user, and includes a module that provides a program development environment.

[0030] The input unit 106 accepts input operations from a user who operates the software development device 100. The input unit 106 may be, for example, a keyboard, a mouse, a touch panel arranged on a display device, or operation buttons arranged on the housing of the software development device 100.

[0031] The display 108 displays the processing results of the processor 102. The display 108 may be, for example, an LCD (Liquid Crystal Display) or an organic EL (Electro-Luminescence) display.

[0032] The communication interface 122 is responsible for exchanging data with the controller 200. The communication interface 122 includes, for example, a wired connection terminal such as a Universal Serial Bus (USB) port, a serial port such as IEEE 1394, or a legacy parallel port. Alternatively, the communication interface 122 may include an Ethernet (registered trademark) port.

[0033] All or part of the software development device 100 may be implemented using a software development system such as an ASIC (Application Specific Integrated Circuit) incorporating a circuit corresponding to a computer-readable instruction. It may be implemented using hardwired circuitry, or alternatively, it may be implemented using circuitry corresponding to computer-readable instructions on a field-programmable gate array (FPGA). It may also be realized by appropriately combining the processor 102, main memory, ASIC, FPGA, etc.

[0034] The software development device 100 may further include a component for reading a software development program 114 including computer-readable instructions from a non-transitory medium that stores the program. The medium may be, for example, an optical medium such as a DVD (Digital Versatile Disc), a semiconductor memory such as a USB memory, or the like. It may also be a conductive medium.

[0035] The software development program 114 may not only be installed in the software development device 100 via a medium, but may also be provided from a distribution server on a network.

[0036] (b2: Controller 200) The controller 200 may be implemented using a general purpose computer or may be implemented using a semiconductor substrate containing the necessary components to perform the processing.

[0037] 3 is a schematic diagram showing an example of a hardware configuration of controller 200 according to the present embodiment. Referring to Fig. 3, controller 200 includes, as main components, an arithmetic processing unit 210, a wireless communication module 212, a USB controller 214, a communication controller 216, and an IO driver 218 electrically connected to one or more pads 220.

[0038] The arithmetic processing unit 210 is a calculation unit that executes programs, and includes, as its main components, a processor 202, a main memory 204, and a flash memory 206. The processor 202 is configured, for example, by a CPU or a GPU. Multiple processors 202 may be provided, or a processor 202 having multiple cores may be employed. The main memory 204 is configured by a volatile storage device such as a DRAM or an SRAM. The flash memory 206 is a non-volatile storage device that holds programs executed by the processor 202 and necessary data. Of the programs stored in the flash memory 206, a specified program is expanded on the main memory 204 and executed by the processor 202, thereby realizing various functions.

[0039] The wireless communication module 212 is responsible for wireless data exchange with any other device. The wireless communication module 212 may include a processing circuit and an antenna for wireless communication with devices, routers, mobile base stations, etc. Wireless communication supported by the wireless communication module 212 includes, for example, Wi-Fi (registered trademark), Bluetooth (registered trademark), ZigBee (registered trademark), LPWA (Low Power Wide Area), GSM (registered trademark), etc. , W-CDMA, CDMA200, LTE (Long Term Evolution), 5th generation mobile communications It can be either a system (5G).

[0040] The USB controller 214 is responsible for data exchange with the software development device 100. The communication controller 216 is responsible for wired data exchange with any other device. The communication controller 216 may be adapted to support known data exchange methods such as serial communication, parallel communication, GPIO (General-purpose input / output), etc.

[0041] The IO driver 218 is responsible for the exchange of electrical signals with any device electrically connected via the pad 220. The IO driver 218 outputs an electrical signal in accordance with a command from the arithmetic processing unit 210. Further, the IO driver 218 detects an electrical signal given via the pad 220 and outputs the detection result to the arithmetic processing unit 210. More specifically, the IO driver 218 is composed of a signal generation circuit, a signal detection circuit, a buffer circuit, etc.

[0042] The controller 200 may be driven by power from a battery (not shown). <C. Constraints> Next, the constraints that can be set in the software development device 100 according to the present embodiment will be described. Hereinafter.

[0043] In this specification, "constraints" include the rules to be observed in the execution of the object code 116 (assembly code) generated from the source code 112. "Constraints" may include restrictions or rules on the resources used by the object code 116 during execution, restrictions or rules on the execution state of the object code 116, restrictions or rules on the execution procedure of the object code 116, and restrictions or rules on the instructions included in the source code 112.

[0044] 4A and 4B are diagrams illustrating constraints that can be set in software development device 100 according to this embodiment. Source code 112 shown in Fig. 4A is an example of code for writing an output value determined by a predefined function fn1() to a specified address.

[0045] More specifically, the source code 112 includes a definition 1121 of an output value variable and a definition 1121 of an output value variable. The return value of the function fn1() is set to the output value OutValue (instruction 1123). Then, the value of the output value OutValue is written to the address "0x1000" (instruction 1124).

[0046] A constraint can be set by adding a constraint code 1125 to the source code 112 shown in Fig. 4(A). In the source code 112 shown in Fig. 4(B), a constraint code 1125 for specifying an accessible memory range is added. For example, "$allowedAddressRange = 0x0000 ... 0x0FFF" means that only addresses from "0x0000" to "0x0FFF" are accessible.

[0047] When such a constraint is set, the instruction 1124 for writing the output value OutValue to the address "0x1000" does not comply with the constraint, that is, the instruction 1124 cannot be executed.

[0048] The constraint code 1125 shown in FIG. 4(B) is effective, for example, when the memory range of "0x0000" to "0x0FFF" is set as a non-secure area in the controller 200, and the memory range of "0x1000" to "0x1FFF" is set as a secure area.

[0049] Typical methods for prohibiting the execution of instructions that do not conform to the constraints are (1) a method of making a determination during the process of generating object code 116 from source code 112, and (2) a method of making a determination when generating object code 116. In the method (1), a function for generating object code 116, such as a preprocessor, compiler, or optimizer, evaluates conformance to the constraints. On the other hand, in the method (2), object code for evaluating conformance to the constraints (hereinafter also referred to as "conformance evaluation object code") may be generated in addition to object code 116 generated from source code 112. Conformance evaluation object code 118 may be incorporated as part of object code 116, or may exist independently of object code 116. Details of such implementation examples will be described later.

[0050] Next, the range of application (hereinafter also referred to as "scope") of the constraints according to this embodiment will be described.

[0051] As shown in FIG. 4B, basically, the constraints defined in the constraint code 1125 are applied to the part following the description of the constraint code 1125. The part following the description of 5 is the scope of the constraint. The end position of the scope of this constraint can be set arbitrarily, but basically the scope of the constraint can be set to the range of parentheses including the constraint code 1125.

[0052] Furthermore, when a procedure or function is called, the called procedure or function may also be included in the scope of the constraint.

[0053] 5 is a diagram illustrating the scope of constraints that can be set in software development device 100 according to this embodiment. As shown in Fig. 5, for instruction 1123 that calls function fn1() and sets the return value of function fn1() to output value OutValue, partial source code 1126 of the called function fn1() may also be included in the scope of the constraint.

[0054] In this way, when a call instruction is included in the scope of a constraint, software development device 100 also evaluates whether the instructions (procedures and functions) called by the call instruction conform to the constraint. By sequentially inheriting the scope of such constraints, the source code that defines the called procedures and functions can also be evaluated for conformance to the constraint, thereby ensuring compliance with the constraint.

[0055] 6 is a diagram for explaining a case where conformance to a constraint that can be set in software development device 100 according to this embodiment must be determined at runtime. Fig. 6(A) shows source code 112 that is similar to source code 112 shown in Fig. 4(B). In source code 112 shown in Fig. 6(A), the address to which the output value OutValue is written is fixed to "0x1000" (instruction 1124), and by analyzing the lexicon and syntax of source code 112, it can be determined that the constraint is not conformed to.

[0056] In contrast, in the source code 112 shown in FIG. 6B, the address to which the output value OutValue is written is determined using the output address initial value IniPtr, so the write address cannot be uniquely determined by analyzing the source code 112 alone.

[0057] More specifically, in the source code 112 shown in FIG. 6(B), in addition to the definition 1127 of the output address initial value variable, a process 1128 for determining the output address initial value IniPtr is defined. And, an instruction 1129 for determining an output address that defines that the output address OutAddrs is determined by adding "0F00" to the output address initial value IniPtr is defined in the source code 112. Then, the value of the output value OutValue is written to the address indicated by the output address OutAddrs (instruction 1130).

[0058] In the source code 112 shown in FIG. 6(B), the value of the output address OutAddrs depends on the value of the output address initial value IniPtr, and will be dynamically determined when the corresponding object code 116 is executed.

[0059] The software development apparatus 100 according to the present embodiment provides a mechanism capable of evaluating compliance with constraints even during the execution of the corresponding object code 116 (details will be described later).

[0060] <D. Types of Constraints> As constraints according to the present embodiment, the following types may be adopted.

[0061]

Table 1

[0062]

Table 2

[0063] [[ID=

[0064] Note that it is not necessary to implement all of the constraint codes shown in the above table, and only a part of them may be implemented according to the required specifications. Also, constraint codes other than those shown in the above table may be adopted.

[0065] <E. Mechanism for Evaluating Conformance to Constraints> Next, an example of a mechanism by which the software development apparatus 100 according to the present embodiment evaluates conformance to constraints will be described.

[0066] FIG. 7 is a block diagram showing a functional configuration provided by the software development apparatus 100 according to the present embodiment. Each function shown in FIG. 7 is typically realized by the processor 102 of the software development apparatus 100 executing a software development program 114.

[0067] Referring to FIG. 7, the software development program 114 receives an input of source code 112 and generates object code 116 (assembler code). More specifically, the software development program 114 includes a preprocessor 1141, a compiler 1142, an optimizer 1143, and a code generator 1144.

[0068] The preprocessor 1141 executes lexical analysis and syntax analysis on the source code 112 and controls the behavior of the compiler 1142, the optimizer 1143, and the code generator 1144.

[0069] The compiler 1142 generates object code based on the results of lexical analysis and syntax analysis on the source code 112. The optimizer 1143 optimizes the generated object code. The code generator 1144 outputs the final object code 116 based on the results of optimization by the optimizer 1143.

[0070] In evaluating conformance to the above-mentioned constraints, the preprocessor 1141, the compiler 1142, and the optimizer 1143 extract constraints defined in the source code 112 and evaluate conformance to the extracted constraints (step S1). Note that the optimizer 1143 may modify the object code according to the contents of the set constraints. In this way, the software development device 100 extracts constraints set in the source code 112 and evaluates whether the source code 112 conforms to the constraints within the scope of the extracted constraints.

[0071] When conformance to the extracted constraints can only be evaluated when the object code 116 is executed, the code generator 1144 generates conformance evaluation object code 118, which is assembler code for evaluating conformance to the constraints (step S2).

[0072] In this way, the software development device 100 generates the object code 116 to conform to the constraints.

[0073] 8 is a diagram for explaining a method for realizing compliance with constraints on calls in software development device 100 according to this embodiment. The process shown in FIG. 8 may be provided by software development program 114 or may be implemented during execution of object code 116. It may be provided by the object code 118 for compatibility evaluation.

[0074] 8, a data set 150 is generated that indicates the constraint scope (hereinafter also referred to as the "parent scope") set for the calling procedure. The data set 150 of the parent scope includes information such as variables, constraints, and procedures. A management object 152 is also generated in association with the data set 150 of the parent scope.

[0075] A data set 154 indicating a constraint scope (hereinafter also referred to as "child scope") to be inherited by a called procedure is associated with the data set 150 of the parent scope. A management object 156 is also generated in association with the data set 154 of the child scope.

[0076] For example, when a procedure or function is called, a management object 152 associated with the data set 150 of the parent scope is referenced (step S11). Then, a data set 154 of the child scope is generated based on the data set 150 of the parent scope (step S12). In response to a reference from the data set 154 of the child scope to the management object 152 (step S13), a management object 156 is generated from the management object 152 (step S14). The generated management object 156 is associated with the data set 154 of the child scope (step S15).

[0077] By repeating such a series of processes, the set constraint scope is inherited in response to the call of a procedure or function.

[0078] <F. Processing Procedure> Next, a processing procedure for generating object code from source code in the software development apparatus 100 according to the present embodiment will be described.

[0079] FIG. 9 is a flowchart showing a processing procedure for generating object code from source code in the software development apparatus 100 according to the present embodiment. Each step shown in FIG. 9 is typically realized by the processor 102 executing the software development program 114.

[0080] 9, software development device 100 performs lexical analysis and syntactic analysis on input source code 112 (step S100). Based on the analysis results, software development device 100 determines whether or not constraints have been set (step S102). That is, software development device 100 extracts constraints to be set in source code 112, and evaluates whether or not source code 112 conforms to the constraints within the scope of the extracted constraints. If no constraints have been set (NO in step S102), the steps are skipped and the process from step S118 onward is executed.

[0081] If constraints have been set (YES in step S102), the software development device 100 selects one of the set constraints (step S104) and determines whether the source code included in the scope of the selected constraint complies with the constraint (step S106).

[0082] If there is a part of the source code included in the scope of the selected constraint that does not conform to the constraint (NO in step S106), software development device 100 outputs a message indicating that the constraint is not satisfied (step S108), and interrupts the process of generating object code 116 (step S110). Then, the process ends. When the software development device 100 evaluates that the source code 112 does not conform to the constraint in the scope of the constraint, the software development device 100 stops generating the object code 116.

[0083] 10 is a diagram showing an example of a user interface screen provided by software development device 100 according to the present embodiment. Referring to Fig. 10, user interface screen 300 includes an edit area 302 for creating source code, a compile button 304 for starting compilation of the source code created in edit area 302, and a message display area 306 for displaying an error message. A message indicating that the constraints are not met may be displayed in message display area 306.

[0084] 9, if it is not possible to determine whether the source code included in the scope of the selected constraint complies with the constraint ("unknown" in step S106), software development device 100 marks the portion of the source code for which it is not possible to determine whether the source code complies with the constraint (step S112). Then, the process proceeds to step S114.

[0085] If all source code included in the scope of the selected constraint conforms to the constraint (YES in step S106), software development device 100 determines whether evaluation of all set constraints has been completed (step S114). If evaluation of any set constraints remains to be completed (NO in step S114), software development device 100 selects one of the unevaluated constraints (step S116) and executes the processing from step S106 onwards.

[0086] If evaluation of all set constraints has been completed (YES in step S114), software development device 100 generates object code 116 (step S118).

[0087] Next, software development device 100 determines whether any part of the source code for which it is not possible to determine whether it complies with the constraint has been marked (step S120). That is, it is determined whether any part has been marked in step S112 described above.

[0088] If a portion where it is impossible to determine whether the source code conforms to the constraint is not marked (NO in step S120), the process of step S122 is skipped. On the other hand, if a portion where it is impossible to determine whether the source code conforms to the constraint is marked (YES in step S120), the software development apparatus 100 generates an object code 118 for conformity evaluation to determine whether the marked portion conforms to the constraint set at the time of execution (step S122). Thus, when it is impossible to evaluate whether the source code 112 conforms to the constraint within the scope of the constraint, in addition to the object code 116 corresponding to the source code 112, the software development apparatus 100 generates another object code (object code 118 for conformity evaluation) to evaluate whether it conforms to the constraint during the execution of the object code 116.

[0089] Finally, the software development apparatus 100 outputs the generated object code (step S124). That is, the software development apparatus 100 generates an object code so as to conform to the constraint included in the source code 112. Then, the process ends.

[0090] <G. Modified Example> In the above description, for the sake of convenience of explanation, the case of setting one constraint has been exemplified. However, the present invention is not limited to this, and a plurality of constraints can be set in layers. Also, a plurality of constraints can be set such that their respective scopes partially overlap each other.

[0091] Further, in the above description, a configuration example in which constraint codes are embedded in the source code 112 has been exemplified. However, the present invention is not limited to this, and a definition file for defining constraints may be prepared separately from the source code 112. In this case, the definition file may include information for specifying a procedure name or a function name that is the scope of the constraint and the content of the applied constraint in association with each other.

[0092] Thus, any method can be adopted for setting the constraints. <H. Advantages> According to the software development apparatus 100 according to the present embodiment, it is possible to provide an environment in which various constraints can be freely set for a program executed on an edge device or the like. As a result, in consideration of various aspects from the viewpoints of available resources and security, a program executed on an edge device can be created.

[0093] The disclosed embodiments should be considered to be illustrative in all respects and not restrictive. The scope of the present invention is shown not by the above description but by the claims, and it is intended that all modifications within the meaning and scope equivalent to the claims be included.

Explanation of Reference Numerals

[0094] 1 IoT system, 2 edge device, 100 software development apparatus, 102, 202 processor, 104, 204 main memory, 106 input unit, 108 display, 110 hard disk, 112 source code, 114 software development program, 116 object code, 118 object code for conformity evaluation, 120 internal bus, 122 communication interface, 150, 154 data set, 152, 156 management object, 200 controller, 206 flash memory, 210 arithmetic processing unit, 212 wireless communication module, 214 USB controller, 216 communication controller, 218 driver, 220 pad, 300 user interface screen, 302 editing area, 304 compile button, 306 message display area, 1121, 1127 definition, 1123, 1124, 1129, 1130 instruction, 1125 Constraint code, 1126 partial source code, 1128 process, 1141 preprocessor, 1142 compiler, 1143 optimizer, 1144 code generator.

Claims

1. A software development device, The system includes means for extracting constraint code that defines constraints contained in the source code, wherein the constraint code includes constraints on the behavior of at least one of the preprocessor, compiler, or optimizer. Means for determining the portion of the source code subject to the constraint defined by the constraint code, In order to generate object code from the aforementioned source code, means for determining whether the source code of the determined portion conforms to the constraints defined by the constraint code, A software development apparatus comprising means for restricting the generation of the object code if the aforementioned constraints are not met.

2. The software development apparatus according to claim 1, wherein the constraint code includes a portion indicating the content of the constraint and a parameter indicating the set value.

3. The software development apparatus according to claim 1 or 2, further comprising means for outputting the non-compliant portion when the above constraints are not met.

4. The software development apparatus according to any one of claims 1 to 3, wherein the means for determining the portion of the source code determines a first scope, which is the range of the source code to which the constraints specified by the constraint code apply, and a second scope, which is the range of the source code associated with the first scope.

5. The software development apparatus according to claim 4, wherein the means for determining the portion of the source code is to determine the portion following the description of the constraint code as the first scope.

6. The software development apparatus according to claim 5, wherein the means for determining the portion of the source code is to determine the portion called from the instruction included in the first scope as the second scope.

7. The aforementioned constraint code is: Restrictions or rules on the resources that object code uses at runtime. Restrictions or rules on the execution state of the aforementioned object code, Restrictions or rules on the execution procedure of the aforementioned object code, and, A software development apparatus according to any one of claims 1 to 6, comprising any one of the restrictions or rules on the instructions contained in the source code.

8. The software development apparatus according to any one of claims 1 to 7, wherein the constraint code is provided for setting multiple constraint codes together.

9. The software development apparatus according to any one of claims 1 to 8, further comprising means for generating the object code when the aforementioned constraints are met.

10. A software development program for a computer, The procedure involves extracting constraint code that defines constraints contained in the source code, wherein the constraint code includes constraints on the behavior of at least one of the preprocessor, compiler, or optimizer. The steps include determining the portion of the source code that is subject to the constraint defined by the constraint code, In order to generate object code from the aforementioned source code, the steps include determining whether the source code of the determined portion conforms to the constraints defined by the constraint code, A software development program that performs the step of restricting the generation of the object code if the aforementioned constraints are not met.

11. A method for developing software that is executed by a computer, The process includes a step of extracting constraint code that defines constraints contained in the source code, wherein the constraint code includes constraints on the behavior of at least one of the preprocessor, compiler, or optimizer. The steps include determining the portion of the source code that is subject to the constraint defined by the constraint code, In order to generate object code from the aforementioned source code, the steps include determining whether the source code of the determined portion conforms to the constraints defined by the constraint code, A software development method comprising the step of restricting the generation of the object code if it does not conform to the aforementioned constraints.