WO2018220836A1 - プログラムコード生成装置およびプログラムコード生成プログラム - Google Patents

プログラムコード生成装置およびプログラムコード生成プログラム Download PDF

Info

Publication number
WO2018220836A1
WO2018220836A1 PCT/JP2017/020664 JP2017020664W WO2018220836A1 WO 2018220836 A1 WO2018220836 A1 WO 2018220836A1 JP 2017020664 W JP2017020664 W JP 2017020664W WO 2018220836 A1 WO2018220836 A1 WO 2018220836A1
Authority
WO
WIPO (PCT)
Prior art keywords
branch
program
program code
branch destination
destination group
Prior art date
Application number
PCT/JP2017/020664
Other languages
English (en)
French (fr)
Inventor
武 植田
孝一 清水
翔永 梨本
Original Assignee
三菱電機株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 三菱電機株式会社 filed Critical 三菱電機株式会社
Priority to JP2019521912A priority Critical patent/JP6602511B2/ja
Priority to EP17911723.9A priority patent/EP3640796A4/en
Priority to PCT/JP2017/020664 priority patent/WO2018220836A1/ja
Priority to US16/500,483 priority patent/US11137988B2/en
Priority to CN201780091246.6A priority patent/CN110709814A/zh
Priority to TW106123305A priority patent/TWI658409B/zh
Publication of WO2018220836A1 publication Critical patent/WO2018220836A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/43Checking; Contextual analysis
    • G06F8/433Dependency analysis; Data or control flow analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/35Creation or generation of source code model driven
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/10Protecting distributed programs or content, e.g. vending or licensing of copyrighted material ; Digital rights management [DRM]
    • G06F21/12Protecting executable software

Definitions

  • the present invention relates to a technique for automatically generating a program code.
  • the model diagram includes a plurality of blocks and connection lines connecting the blocks. Each block defines elements of a processing procedure. Specifically, a group of data processing is defined for each block.
  • the model diagram also describes the control structure.
  • Patent Document 1 discloses a technique for generating a program code from a model diagram.
  • values are set in advance in each block of a model diagram, and when a program code is generated, a developer selects characteristics (code size, speed, etc.) that are important in code generation. Program codes with different characteristics are output from the same model diagram.
  • Patent Document 2 and Patent Document 3 notify that a model diagram is inappropriate when the model diagram is compared with an inappropriate block diagram pattern and the model diagram matches the inappropriate model diagram pattern Techniques to do this are disclosed.
  • the failure injection attack is an attack that causes a physical failure or the like to cause an intentional failure to the hardware.
  • Attacks that circumvent security measures implemented by software are possible through failure injection attacks. Specifically, the program instruction is skipped by a failure injection attack. As a result, the control flow of the program is changed, and security measures are avoided. Fundamentally, fault injection attacks cannot be prevented by software implementation alone. However, it is necessary to prevent the worst situation even if the control flow is changed.
  • Patent Document 1 Patent Document 1
  • Patent Document 2 Patent Document 2
  • Patent Document 3 considers the control flow represented by the model diagram. Therefore, the program code generated by these techniques is considered vulnerable to failure injection attacks.
  • An object of the present invention is to be able to generate a program code that is not vulnerable to a failure injection attack.
  • the program code generation device of the present invention includes: A branch element specifying unit for specifying a branch element that is a branch program element from a model diagram showing a plurality of program elements and the relationship between the program elements; From the model diagram, a group specifying unit for specifying a branch destination group that is a series of program elements constituting a branch destination for each branch destination of the branch element; An order determining unit that determines the order of arrangement of the branch destination groups in the program code.
  • the present invention it is possible to determine the arrangement order of each branch destination group in the program code. Therefore, it is possible to generate a program code including codes corresponding to each branch destination group in the determined arrangement order. Therefore, it is possible to generate a program code that is not vulnerable to a failure injection attack.
  • FIG. 1 is a configuration diagram of a program code generation device 100 according to Embodiment 1.
  • FIG. 4 is a flowchart of a program code generation method according to the first embodiment.
  • FIG. 6 shows a specific example of a model diagram 200 in the first embodiment.
  • FIG. 5 is a diagram showing a specific example of a branch element rule 210 in the first embodiment.
  • FIG. 5 is a flowchart of order determination processing (S140) in the first embodiment.
  • 5 is a flowchart of code generation processing (S150) in the first embodiment.
  • FIG. 3 is a configuration diagram of a code conversion rule 220 in the first embodiment.
  • FIG. 6 is a diagram illustrating a specific example of a general conversion rule 221 according to the first embodiment.
  • FIG. 5 is a diagram showing a specific example of a block conversion rule 222 in the first embodiment.
  • FIG. 10 is a diagram showing a specific example of behavior conversion rule 223 in the first embodiment.
  • FIG. 5 is a diagram showing a specific example of a header file 230 in the first embodiment.
  • FIG. 4 is a diagram showing a specific example of a source file 240 in the first embodiment.
  • 2 is a hardware configuration diagram of a program code generation device 100 according to Embodiment 1.
  • FIG. 1 is a diagram showing a specific example of a block conversion rule 222 in the first embodiment.
  • FIG. 10 is a diagram showing a specific example of behavior conversion rule 223 in the first embodiment.
  • FIG. 5 is a diagram showing a specific example of a header file 230 in the first embodiment.
  • FIG. 4 is a diagram showing a specific example of a source file 240
  • Embodiment 1 FIG. A form in which the program code is automatically generated will be described with reference to FIGS.
  • the configuration of the program code generation device 100 is a computer including hardware such as a processor 901, a memory 902, an auxiliary storage device 903, and an input / output interface 904. These hardwares are connected to each other via signal lines.
  • the processor 901 is an IC (Integrated Circuit) that performs arithmetic processing, and controls other hardware.
  • the processor 901 is a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or a GPU (Graphics Processing Unit).
  • the memory 902 is a volatile storage device.
  • the memory 902 is also called main memory or main memory.
  • the memory 902 is a RAM (Random Access Memory).
  • Data stored in the memory 902 is stored in the auxiliary storage device 903 as necessary.
  • the auxiliary storage device 903 is a nonvolatile storage device.
  • the auxiliary storage device 903 is a ROM (Read Only Memory), a HDD (Hard Disk Drive), or a flash memory.
  • the input / output interface 904 is a port to which an input device and an output device are connected.
  • the input / output interface 904 is a USB terminal
  • the input device is a keyboard and a mouse
  • the output device is a display.
  • USB is an abbreviation for Universal Serial Bus.
  • the program code generation device 100 includes software elements such as a branch element identification unit 110, a group identification unit 120, an order determination unit 130, and a code generation unit 140.
  • a software element is an element realized by software.
  • the auxiliary storage device 903 stores a program code generation program for causing a computer to function as the branch element specifying unit 110, the group specifying unit 120, the order determining unit 130, and the code generating unit 140.
  • the program code generation program is loaded into the memory 902 and executed by the processor 901.
  • the auxiliary storage device 903 stores an OS (Operating System). At least a part of the OS is loaded into the memory 902 and executed by the processor 901. That is, the processor 901 executes the program code generation program while executing the OS.
  • Data obtained by executing the program code generation program is stored in a storage device such as the memory 902, the auxiliary storage device 903, a register in the processor 901, or a cache memory in the processor 901.
  • the auxiliary storage device 903 functions as a storage unit 191 that stores data. However, another storage device may function as the storage unit 191 instead of the auxiliary storage device 903 or together with the auxiliary storage device 903.
  • the input / output interface 904 functions as a reception unit 192 that receives data input. Further, the input / output interface 904 functions as an output unit 193 that outputs data.
  • the program code generation device 100 may include a plurality of processors that replace the processor 901.
  • the plurality of processors share the role of the processor 901.
  • the program code generation program can be stored in a computer-readable manner on a nonvolatile storage medium such as a magnetic disk, an optical disk, or a flash memory.
  • a nonvolatile storage medium such as a magnetic disk, an optical disk, or a flash memory.
  • a non-volatile storage medium is a tangible medium that is not temporary.
  • the operation of the program code generation device 100 corresponds to a program code generation method.
  • the procedure of the program code generation method corresponds to the procedure of the program code generation program.
  • step S110 the reception unit 192 receives the model diagram 200.
  • the storage unit 191 stores the accepted model diagram 200 in the storage unit 191.
  • the user inputs the model diagram 200 to the program code generation device 100
  • the reception unit 192 receives the model diagram 200 input to the program code generation device 100.
  • the storage unit 191 stores the accepted model diagram 200.
  • the model diagram 200 is data representing the specifications of the execution program, and shows a plurality of program elements and the relationship between the program elements.
  • the program element is an element constituting an execution program such as input / output data, control and processing.
  • FIG. 3 shows a specific example of the model diagram 200.
  • the model diagram 200 includes a plurality of processing blocks (B0 to B8), a plurality of data blocks (D1 to D4), and a plurality of pins (P1 to P6). Further, the model diagram 200 includes connection lines that connect the processing blocks, data blocks, and pins to each other.
  • the processing block is a program element that represents data processing or control processing.
  • the data block is a program element that represents input / output data.
  • a pin is a program element that represents an attribute of input / output data.
  • the connection line is a directed line indicating a relationship between program elements. In FIG. 3, an arrow is used as a connection line, and the direction of the arrow represents a procedure or a data flow.
  • Each program element is set with an ID (Identifier) and a name.
  • the ID is used in processing in the program code generation method.
  • the name is presented to the user.
  • Reference numerals (B0 to B8, D1 to D4, and P1 to P6) given to the program elements correspond to the IDs of the program elements.
  • the type of processing block identifies the type of data processing or control processing. For example, there are types such as start, end, behavior call, action, and decision.
  • the start means the start of the procedure
  • the end means the end of the procedure.
  • a behavior call means a call to behavior.
  • the behavior is a predetermined process and is realized by one or more instructions. Specifically, the behavior corresponds to a function.
  • An action means execution of data processing.
  • Decision means execution of control processing.
  • the type of the processing block B0 is start. That is, the processing block B0 represents the start of the procedure.
  • the attribute information of the processing block B0 indicates that the procedure starting from the processing block B0 is a function procedure. Further, the attribute information of the processing block B0 indicates a “function”, a return value type “int”, and an argument “int argc, char * argv []”. "Function" means that the procedure starting from the processing block B0 is a function procedure.
  • Processing block B1 type is action. That is, the processing block B1 represents data processing. The contents of the processing block B1 indicate specific data processing.
  • the type of processing block B2 is a behavior call.
  • the content of the processing block B2 indicates the behavior name “AuthUser”. That is, the processing block B2 represents a call of behavior called AuthUser.
  • Processing block B3 type is decision.
  • Processing block B4 type is action. That is, the processing block B4 represents data processing. The content of the processing block B4 indicates specific data processing.
  • Processing block B5 type is action. That is, the processing block B5 represents data processing. The contents of the processing block B5 indicate specific data processing.
  • the type of the processing block B6 is a behavior call.
  • the content of the processing block B6 indicates the behavior name “ExecProgram”. That is, the processing block B6 represents a call of behavior called ExecProgram.
  • the attribute information of the processing block B6 indicates the important attribute “important processing”. That is, the processing block B6 is an important processing block.
  • An important processing block is a program element that represents an important process.
  • the type of the processing block B7 is finished. That is, the processing block B7 represents the end of the procedure.
  • the attribute information of the processing block B7 indicates a return value “1”.
  • processing block B8 represents the end of the procedure.
  • the attribute information of the processing block B8 indicates a return value “0”.
  • Data names that is, variable names are set in the data blocks (D1 to D4).
  • the data block D1 represents data “user_id” output from the processing block B1 and input to the processing block B2.
  • the data block D2 represents data “password” output from the processing block B1 and input to the processing block B2.
  • the data block D3 represents data “result” output from the processing block B2.
  • the data block D4 represents data “backup.exe” input to the processing block B6.
  • Data attributes are set for the pins (P1 to P6) as necessary.
  • arg means an argument
  • ret means a return value.
  • the pin P3 represents that the data “user_id” is the first argument for the behavior “AuthUser”.
  • the pin P4 represents that the data “password” is the second argument for the behavior “AuthUser”.
  • the pin P5 represents that the data “result” is a return value from the behavior “AuthUser”.
  • the pin P6 represents that the data “backup.exe” is the first argument for the behavior “ExecProgram”.
  • the model diagram 200 is described in a data format that can represent a hierarchical structure.
  • the model diagram 200 is described in a data format such as XML or JSON.
  • XML is an abbreviation for Extensible Markup Language.
  • JSON is an abbreviation for JavaScript Object Notation.
  • JavaScript is a registered trademark.
  • step S120 the branch element specifying unit 110 specifies a branch element from the model diagram 200.
  • a branch element is a program element of a branch.
  • the branch program element is a program element representing branch control.
  • the branch element is a program element corresponding to an if statement and else statement in C language.
  • the branch element specifying unit 110 specifies a branch element based on the type of each program element.
  • the branch element specifying unit 110 uses the branch element rule 210 to specify a branch element.
  • the branch element rule 210 is a rule for designating the type of the branch element, and is stored in the storage unit 191 in advance.
  • the branch element specifying unit 110 determines that the program element belonging to the type specified by the branch element rule 210 is a branch element.
  • FIG. 4 shows a specific example of the branch element rule 210.
  • the branch element rule 210 has respective columns of process type and rule value. Each column is associated with each other.
  • the processing type column indicates the processing type.
  • the processing type is a type of processing block.
  • the rule value column indicates whether or not the processing type is a branch type.
  • the branch type is a type of processing block corresponding to the branch element.
  • the rule value “1” means that the process type is a branch type, and the rule value “0” means that the process type is not a branch type.
  • the branch type is “decision”. Therefore, the branch element specifying unit 110 determines that the processing block in which the type “decision” is set is a branch element.
  • Branch processing may be performed in the processing block belonging to “action” or “behavior call”.
  • a parser is required to interpret the description of the processing block belonging to the “action”.
  • a model diagram of the behavior called from the processing block belonging to “behavior calling” is necessary. In the embodiment, description of a parser and behavior model diagram is omitted.
  • the branch element rule 210 may be described in either a natural language or a programming language.
  • the group specifying unit 120 specifies a branch destination group for each branch destination of the branch element from the model diagram 200.
  • a branch destination group is a series of program elements that constitute a branch destination.
  • step S121 the branch element specifying unit 110 selects one unselected processing block from the model diagram 200. Specifically, the branch element specifying unit 110 selects the processing blocks one by one while tracing the connection line from the start processing block to the end processing block.
  • step S122 the branch element specifying unit 110 determines whether the selected processing block is a branch element.
  • the branch element specifying unit 110 operates as follows. First, the branch element specifying unit 110 acquires the type from the selected processing block. Next, the branch element specifying unit 110 selects the same process type as the acquired type from the branch element rule 210. Next, the branch element specifying unit 110 acquires the rule value associated with the selected process type from the branch element rule 210. Then, the branch element specifying unit 110 determines whether or not the acquired rule value is 1. If the acquired rule value is 1, the selected processing block is a branch element.
  • step S123 If the selected processing block is a branch element, the process proceeds to step S123. If the selected processing block is not a branch element, the process proceeds to step S124.
  • step S123 the group specifying unit 120 specifies a branch destination group for each branch destination of the branch element. Specifically, the group specifying unit 120 specifies a series of program elements while following the connection line from the branch destination for each branch destination of the branch element.
  • the branch element is the processing block B3.
  • the branch destinations of the processing block B3 are the processing block B5 and the processing block B4.
  • a series of program elements obtained by tracing the connection line from the processing block B5 is a processing block B5, a processing block B6, and a processing block B8. Therefore, the group specifying unit 120 specifies a set of the processing block B5, the processing block B6, and the processing block B8 as the first branch destination group.
  • a series of program elements obtained by tracing the connection line from the processing block B4 is a processing block B4 and a processing block B7. Therefore, the group specifying unit 120 specifies a set of the processing block B4 and the processing block B7 as the second branch destination group.
  • the group specifying unit 120 generates branch information, and the storage unit 191 stores branch information.
  • the branch information is information for specifying a branch element and each branch destination group. Specifically, the information specifying the branch element is the ID of the branch element, and the information specifying the branch destination group is the ID of each program element constituting the branch destination group.
  • step S124 the branch element specifying unit 110 determines whether there is an unselected processing block. If there is an unselected processing block, the process proceeds to step S121. If there is no unselected processing block, the branch destination group identification (S120) ends.
  • Branch information is generated for each branch element by specifying the branch destination group (S120), and each branch information is stored in the storage unit 191.
  • step S ⁇ b> 130 the order determining unit 130 determines whether a branch destination group is specified from the model diagram 200. Specifically, the order determination unit 130 determines whether at least one branch information is stored in the storage unit 191. When at least one branch information is stored in the storage unit 191, the order determination unit 130 determines that the branch destination group is specified from the model diagram 200. When the branch destination group is specified from the model diagram 200, the process proceeds to step S140. If the branch destination group is not specified from the model diagram 200, the process proceeds to step S150.
  • step S140 the order determining unit 130 determines the arrangement order of the branch destination groups in the program code. Specifically, the order determination unit 130 determines the importance level of each branch destination group based on whether or not each branch destination group includes a program element having an important attribute. Then, the order determining unit 130 determines the arrangement order of the branch destination groups based on the importance level of each branch destination group.
  • the order determination unit 130 changes the branch element so as to match the determined order.
  • step S141 the order determining unit 130 selects one piece of unselected branch information.
  • the processing from step S142 to step S148 is executed on the branch information selected in step S141.
  • step S142 the order determining unit 130 selects one unselected branch destination group from the selected branch information.
  • Step S143 and step S144 are executed for the branch destination group selected in step S142.
  • step S143 the order determining unit 130 determines the importance level of the selected branch destination group.
  • the order determining unit 130 determines the importance level of the branch destination group as follows.
  • the order determination unit 130 determines whether the important element is included in the branch destination group.
  • An important element is a program element in which an important attribute is set.
  • the order determination unit 130 counts the number of elements in the branch destination group.
  • the number of elements in the branch destination group is the number of program elements included in the branch destination group.
  • the number of elements in the branch destination group is the number of processing blocks included in the branch destination group.
  • the number of elements of the branch destination group is used as an important level of the branch destination group.
  • processing block B5, processing block B6, and processing block B8 constitute a first branch destination group.
  • the first branch destination group includes three processing blocks including the processing block B6 in which the important attribute “important processing” is set. Therefore, the important level of the first branch destination group is “3”.
  • the order determination unit 130 sets the important level of the branch destination group to the lowest level. Specifically, the order determining unit 130 sets the importance level of the branch destination group to “0”.
  • processing block B4 and processing block B7 constitute a second branch destination group.
  • the second branch destination group does not include a processing block in which the important attribute “important process” is set. Therefore, the important level of the second branch destination group is “0”.
  • step S144 the order determining unit 130 determines whether there is an unselected branch destination group. If there is an unselected branch destination group, the process proceeds to step S142. If there is no unselected branch destination group, the process proceeds to step S145.
  • step S145 the order determining unit 130 determines whether the importance levels of the branch destination groups are different by comparing the importance levels of the branch destination groups with each other. However, the order determination unit 130 excludes a branch destination group that does not include an important element. That is, the order determination unit 130 performs comparison and determination for each branch destination group that includes an important element.
  • the process proceeds to step S146. If the importance level of each branch destination group is not different, that is, if there are two or more branch destination groups having the same importance level, the process proceeds to step S148.
  • step S146 the order determination unit 130 determines the arrangement order of each branch destination group based on the importance level of each branch destination group. Specifically, the order determination unit 130 determines the order of arrangement in ascending order of importance levels. For example, when the importance level of the first branch destination group is “3” and the importance level of the second branch destination group is “0”, the order of arrangement of these branch destination groups is “second branch destination group ⁇ second The order is “1 branch destination group”. Then, the order determining unit 130 registers the arrangement order of each branch destination group in the branch information.
  • step S147 when the determined order is different from the order specified by the branch element, the order determining unit 130 changes the branch element so as to match the determined order.
  • the order determination unit 130 operates as follows. First, the order determination unit 130 determines the arrangement order of each branch destination based on the branch condition indicated by the content of the branch element and two or more branch destinations. Next, the order determination unit 130 compares the arrangement order of each branch destination with the arrangement order of the branch destination group. When the order of branch destinations is different from the order of branch destination groups, the order determination unit 130 changes the branch condition indicated by the content of the branch element.
  • the branch element is the processing block B3.
  • the order of branch destinations is “B5 ⁇ B4”.
  • step S148 the order determining unit 130 generates an error message, and the output unit 193 displays the error message on the display. If there are two or more branch destination groups having the same importance level for one branch element, the branch destination groups cannot be arranged in an appropriate order. Therefore, an error message is displayed.
  • step S147 the order determination process (S140) ends. Furthermore, the process after the order determination process (S140) is not performed. That is, no program code is generated.
  • step S149 the order determining unit 130 determines whether there is unselected branch information. If there is unselected branch information, the process proceeds to step S141. If there is no unselected branch information, the order determination process (S140) ends.
  • step S150 the code generation unit 140 generates a program code based on the model diagram 200.
  • the program code includes a code corresponding to each branch destination group in the arrangement order of each branch destination group.
  • step S151 the code generation unit 140 reads the model diagram 200, the code conversion rule 220, and branch information from the storage unit 191.
  • the code conversion rule 220 is a rule for converting the model diagram 200 into a program code, and is stored in the storage unit 191 in advance.
  • the configuration of the code conversion rule 220 will be described based on FIG.
  • the code conversion rule 220 includes a general conversion rule 221, a block conversion rule 222, and a behavior conversion rule 223.
  • the general conversion rule 221 is a general conversion rule that is not related to the expression of the model diagram 200.
  • the block conversion rule 222 is a conversion rule related to the representation of the model diagram 200.
  • the behavior conversion rule 223 is a conversion rule related to a function corresponding to the behavior.
  • FIG. 9 shows a specific example of the general conversion rule 221.
  • the general conversion rule 221 has columns for items and conversion rules. Each column is associated with each other.
  • the item column specifies a program element.
  • the conversion rule column specifies the name of the program element.
  • the general conversion rule 221 specifies that the file name (excluding the extension) of the model diagram is used as the function name.
  • FIG. 10 shows a specific example of the block conversion rule 222.
  • the block conversion rule 222 has columns of type and conversion rule. Each column is associated with each other.
  • the type column specifies the type of processing block.
  • the conversion rule column specifies a method for describing a code corresponding to a processing block.
  • the block conversion rule 222 specifies that the branch condition indicated by the content in the processing block having the type “decision” is a conditional statement.
  • the description of the branch condition is a conditional statement set in the if statement or the while statement.
  • FIG. 11 shows a specific example of the behavior conversion rule 223.
  • the behavior conversion rule 223 includes fields for a name, a header, a return value, and an argument. Each column is associated with each other.
  • the name column indicates the name of the behavior.
  • the header field specifies a header in which a function corresponding to the behavior is defined.
  • the return value column specifies the return value of the function corresponding to the behavior.
  • the argument field specifies the argument of the function corresponding to the behavior.
  • the contents of the general conversion rule 221, the block conversion rule 222, and the behavior conversion rule 223 may be described in either a natural language or a programming language.
  • step S152 the code generation unit 140 generates a program code based on the model diagram 200, the code conversion rule 220, and the branch information.
  • the program code is written using a programming language.
  • the storage unit 191 stores program codes.
  • the code generation unit 140 operates as follows. First, the code generation unit 140 generates a header file and a source file according to the general conversion rule 221 (see FIG. 9).
  • the header file name is a name obtained by adding the extension “.h” to the file name (excluding the extension) of the model diagram 200.
  • the source file name is a name obtained by adding the extension “.c” to the file name (excluding the extension) of the model diagram 200.
  • the code generation unit 140 When the file name of the model diagram 200 is “ExecBackup.mdl”, the header file name is “ExecBackup.h” and the source file name is “ExecBackup.c”. The name of the function described in the source file is “ExecBackup”.
  • the code generation unit 140 describes a prototype declaration or the like in the header file. Then, the code generation unit 140 describes the program code in the source file based on the model diagram 200. In addition, the code generation unit 140 refers to the block conversion rule 222, the behavior conversion rule 223, and the branch information as necessary.
  • FIG. 12 shows a specific example of the header file 230.
  • a program code 231 is described in the header file 230.
  • the program code 231 is a code for defining a prototype declaration and the like for the function corresponding to the model diagram 200.
  • the program code 231 is written in C language.
  • FIG. 13 shows a specific example of the source file 240.
  • program code 241 is described.
  • the program code 241 is a function code corresponding to the model diagram 200.
  • the program code 241 is written in C language.
  • a portion surrounded by a broken line is a code corresponding to the branch element and each branch destination group.
  • a code for the first branch destination group (B5, B6, and B8) is described after the code corresponding to the second branch destination group (B4 and B7).
  • the program code generation device 100 specifies a branch destination group from the model diagram 200, and generates program code so that a more important branch destination group is located behind the specified branch destination group. As a result, a program code that is less susceptible to the adverse effects of a fault injection attack that skips instructions related to the control structure is generated. Therefore, it is possible to reduce labor and time for investigating whether the program code is easily affected by the failure injection attack. Further, it is possible to reduce labor and time for correcting a portion that is easily affected by a failure injection attack.
  • Embodiment 2 Differences from the first embodiment will be mainly described with respect to a form in which the order of arrangement of the branch destination groups is determined according to a predetermined order rule instead of the order of low importance level.
  • the order determination process (S140) will be described with reference to FIG.
  • the flow of the order determination process (S140) is as described in the first embodiment.
  • the method for determining the arrangement order of each branch destination group in step S146 is different from the method in the first embodiment.
  • the order determining unit 130 determines the arrangement order of the branch destination groups according to the order rule.
  • the order rule indicates the relationship between the importance level and the order.
  • a plurality of order rules exist according to the program development environment or the program execution environment, and the plurality of order rules are stored in the storage unit 191 in advance.
  • an order rule exists for each type of compiler.
  • the order determining unit 130 selects an order rule corresponding to the compiler designated by the user, and determines the order of arrangement of the branch destination groups according to the selected order rule.
  • there is an order rule for each type of architecture In this case, the order determination unit 130 selects an order rule corresponding to the architecture designated by the user, and determines the order of the branch destination groups according to the selected order rule.
  • the program code generation device 100 appropriately determines the arrangement order of each branch destination group according to the program development environment or the program execution environment. As a result, a program code that is less susceptible to the adverse effects of a fault injection attack that skips instructions related to the control structure is generated. Therefore, it is possible to reduce labor and time for investigating whether the program code is easily affected by the failure injection attack. Further, it is possible to reduce labor and time for correcting a portion that is easily affected by a failure injection attack.
  • Embodiment 3 Rather than determining the importance level of each branch destination group based on the presence or absence of an important element, the form of determining the importance level of each branch destination group based on the configuration of program elements in each branch destination group is mainly described. Differences from the first embodiment will be described.
  • the order determination process (S140) will be described with reference to FIG.
  • the flow of the order determination process (S140) is as described in the first embodiment.
  • the method for determining the importance level of each branch destination group in step S143 is different from the method in the first embodiment.
  • the order determining unit 130 determines the importance level of the branch destination group based on the configuration of the program elements in the branch destination group. For example, the order determination unit 130 determines the importance level of the branch destination group based on the number of program elements included in the branch destination group. The greater the number of program elements, the higher the importance level. For example, the order determination unit 130 determines the complexity of the configuration based on each program element included in the branch destination group, and determines the importance level of the branch destination group based on the complexity of the configuration. The higher the complexity, the higher the importance level.
  • Embodiment 4 Differences from the first embodiment will be mainly described regarding the mode of determining the importance level of each branch destination group based on the contents of each program element in each branch destination group.
  • the order determination process (S140) will be described with reference to FIG.
  • the flow of the order determination process (S140) is as described in the first embodiment.
  • the method for determining the importance level of each branch destination group in step S143 is different from the method in the first embodiment.
  • step S143 the order determining unit 130 determines the importance level of the branch destination group based on the contents of each program element in the branch destination group. Specifically, important information for specifying important elements is stored in the storage unit 191 in advance. Then, the order determining unit 130 determines the importance level of the branch destination group based on whether or not the important element specified by the important information is included in the branch destination group.
  • the method for determining the importance level of the branch destination group including the important element and the importance level of the branch destination group not including the important element are the same as those in the first embodiment.
  • the important information is “ExecProgram”
  • the important element in the model diagram 200 of FIG. 3 is the processing block B6. Therefore, the first branch destination group (B5, B6, and B8) includes an important element.
  • the second branch destination group (B4 and B7) does not include an important element.
  • Embodiment 5 FIG. Regarding the form in which the user is notified of the location where the arrangement order is changed in the model diagram 200, differences from the first embodiment will be mainly described.
  • step S140 the user is notified of the part of the model diagram 200 where the arrangement order is changed.
  • step S140 The order determination process (S140) will be described with reference to FIG.
  • the flow of the order determination process (S140) is as described in the first embodiment.
  • step S147 the user is notified of the part of the model diagram 200 where the arrangement order is changed.
  • step S147 when the determined order is different from the order specified by the branch element, the order determining unit 130 changes the branch element so as to match the determined order.
  • the method of changing the branch element is as described in the first embodiment.
  • the order determination unit 130 changes the model diagram 200 to a state in which the branch element is emphasized. Then, the output unit 193 displays the model diagram 200 on the display in a state where the branch element is emphasized.
  • the program code generation device 100 includes a processing circuit 990.
  • the processing circuit 990 is hardware that implements the branch element identification unit 110, the group identification unit 120, the order determination unit 130, and the code generation unit 140.
  • the processing circuit 990 may be dedicated hardware or a processor 901 that executes a program stored in the memory 902.
  • the processing circuit 990 is dedicated hardware, the processing circuit 990 is, for example, a single circuit, a composite circuit, a programmed processor, a parallel programmed processor, an ASIC, an FPGA, or a combination thereof.
  • ASIC is an abbreviation for Application Specific Integrated Circuit
  • FPGA is an abbreviation for Field Programmable Gate Array.
  • the program code generation device 100 may include a plurality of processing circuits that replace the processing circuit 990. The plurality of processing circuits share the role of the processing circuit 990.
  • the functions of the program code generation device 100 may be partially realized by dedicated hardware and the rest may be realized by software or firmware.
  • the processing circuit 990 can be realized by hardware, software, firmware, or a combination thereof.
  • the embodiment is an example of a preferred embodiment and is not intended to limit the technical scope of the present invention.
  • the embodiment may be implemented partially or in combination with other embodiments.
  • the procedure described using the flowchart and the like may be changed as appropriate.
  • 100 program code generation device 110 branch element identification unit, 120 group identification unit, 130 order determination unit, 140 code generation unit, 191 storage unit, 192 reception unit, 193 output unit, 200 model diagram, 210 branch element rule, 220 code Conversion rule, 221 general conversion rule, 222 block conversion rule, 223 behavior conversion rule, 230 header file, 231 program code, 240 source file, 901 processor, 902 memory, 903 auxiliary storage device, 904 input / output interface, 990 processing circuit.

Abstract

分岐要素特定部(110)は、複数のプログラム要素とプログラム要素間の関係とを示すモデル図から、分岐のプログラム要素である分岐要素を特定する。グループ特定部(120)は、前記モデル図から、前記分岐要素の分岐先毎に分岐先を構成する一連のプログラム要素である分岐先グループを特定する。順序決定部(130)は、前記プログラムコードの中での各分岐先グループの並び順を決定する。コード生成部(140)は、前記モデル図に基づいて、プログラムコードを生成する。プログラムコードは、各分岐先グループの並び順で、各分岐先グループに対応するコードを含む。

Description

プログラムコード生成装置およびプログラムコード生成プログラム
 本発明は、プログラムコードを自動で生成するための技術に関するものである。
 事前に作成されたプログラム仕様に基づいてソースコードのようなプログラムコードを自動に生成する方法がある。
 例えば、プログラム仕様を示すモデル図に基づいてプログラムコードを生成する方法がある。モデル図は、複数のブロックとブロック間を接続する接続線とで構成される。各ブロックには、処理手順の要素が定義される。具体的には、各ブロックには、ひとまとまりのデータ処理が定義される。モデル図において、プログラムが入力値を取得してからプログラムが出力値を出力するまでの処理手順、または、プログラムがイベントを受信してからプログラムがイベントに対応する処理を完了するまでの処理手順が記述される。また、モデル図には制御構造も記述される。
 特許文献1は、モデル図からプログラムコードを生成する技術を開示している。
 特許文献1に開示された技術では、モデル図の各ブロックに事前に値が設定され、プログラムコードが生成される際に開発者がコード生成で重視する特性(コードサイズまたは速度など)を選択し、同じモデル図から特性の異なるプログラムコードが出力される。
 特許文献2および特許文献3には、モデル図を不適切なブロック図のパターンと比較し、モデル図が不適切なモデル図のパターンと一致する場合に、モデル図が不適切であることを通知する技術が開示されている。
特開2006-301989号公報 特開2011-13887号公報 特開2016-57715号公報
 ハードウェアに対する攻撃である故障注入攻撃が存在する。
 故障注入攻撃は、ハードウェアに対して物理的な刺激等を与えて意図的な故障を発生させる攻撃である。故障注入攻撃によって、ソフトウェアで実現されるセキュリティ対策を回避する攻撃が可能である。具体的には、故障注入攻撃により、プログラム命令をスキップさせる。これにより、プログラムの制御フローが変更されるため、セキュリティ対策が回避される。
 根本的に、故障注入攻撃をソフトウェアの実装だけで防ぐことはできない。
 しかし、制御フローが変更されても最悪の事態に陥らないようにすることが必要である。
 一方、特許文献1、特許文献2および特許文献3のいずれに開示された技術も、モデル図が表す制御フローに関して考慮していない。そのため、これらの技術によって生成されたプログラムコードは、故障注入攻撃に対して脆弱であると考えられる。
 本発明は、故障注入攻撃に対して脆弱でないプログラムコードを生成することができるようにすることを目的とする。
 本発明のプログラムコード生成装置は、
 複数のプログラム要素とプログラム要素間の関係とを示すモデル図から、分岐のプログラム要素である分岐要素を特定する分岐要素特定部と、
 前記モデル図から、前記分岐要素の分岐先毎に分岐先を構成する一連のプログラム要素である分岐先グループを特定するグループ特定部と、
 プログラムコードの中での各分岐先グループの並び順を決定する順序決定部とを備える。
 本発明によれば、プログラムコードの中での各分岐先グループの並び順を決定することができる。そのため、決定された並び順で各分岐先グループに対応するコードを含むプログラムコードを生成することができる。したがって、故障注入攻撃に対して脆弱でないプログラムコードを生成することが可能となる。
実施の形態1におけるプログラムコード生成装置100の構成図。 実施の形態1におけるプログラムコード生成方法のフローチャート。 実施の形態1におけるモデル図200の具体例を示す図。 実施の形態1における分岐要素ルール210の具体例を示す図。 実施の形態1における分岐先グループの特定(S120)のフローチャート。 実施の形態1における順序決定処理(S140)のフローチャート。 実施の形態1におけるコード生成処理(S150)のフローチャート。 実施の形態1におけるコード変換ルール220の構成図。 実施の形態1における一般変換ルール221の具体例を示す図。 実施の形態1におけるブロック変換ルール222の具体例を示す図。 実施の形態1における振る舞い変換ルール223の具体例を示す図。 実施の形態1におけるヘッダファイル230の具体例を示す図。 実施の形態1におけるソースファイル240の具体例を示す図。 実施の形態1におけるプログラムコード生成装置100のハードウェア構成図。
 実施の形態および図面において、同じ要素および対応する要素には同じ符号を付している。同じ符号が付された要素の説明は適宜に省略または簡略化する。図中の矢印はデータの流れ又は処理の流れを主に示している。
 実施の形態1.
 プログラムコードを自動で生成する形態について、図1から図13に基づいて説明する。
***構成の説明***
 図1に基づいて、プログラムコード生成装置100の構成を説明する。
 プログラムコード生成装置100は、プロセッサ901とメモリ902と補助記憶装置903と入出力インタフェース904といったハードウェアを備えるコンピュータである。これらのハードウェアは、信号線を介して互いに接続されている。
 プロセッサ901は、演算処理を行うIC(Integrated Circuit)であり、他のハードウェアを制御する。例えば、プロセッサ901は、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、またはGPU(Graphics Processing Unit)である。
 メモリ902は揮発性の記憶装置である。メモリ902は、主記憶装置またはメインメモリとも呼ばれる。例えば、メモリ902はRAM(Random Access Memory)である。メモリ902に記憶されたデータは必要に応じて補助記憶装置903に保存される。
 補助記憶装置903は不揮発性の記憶装置である。例えば、補助記憶装置903は、ROM(Read Only Memory)、HDD(Hard Disk Drive)、またはフラッシュメモリである。補助記憶装置903に記憶されたデータは必要に応じてメモリ902にロードされる。
 入出力インタフェース904は入力装置および出力装置が接続されるポートである。例えば、入出力インタフェース904はUSB端子であり、入力装置はキーボードおよびマウスであり、出力装置はディスプレイである。USBはUniversal Serial Busの略称である。
 プログラムコード生成装置100は、分岐要素特定部110とグループ特定部120と順序決定部130とコード生成部140といったソフトウェア要素を備える。ソフトウェア要素はソフトウェアで実現される要素である。
 補助記憶装置903には、分岐要素特定部110とグループ特定部120と順序決定部130とコード生成部140としてコンピュータを機能させるためのプログラムコード生成プログラムが記憶されている。プログラムコード生成プログラムは、メモリ902にロードされて、プロセッサ901によって実行される。
 さらに、補助記憶装置903にはOS(Operating System)が記憶されている。OSの少なくとも一部は、メモリ902にロードされて、プロセッサ901によって実行される。
 つまり、プロセッサ901は、OSを実行しながら、プログラムコード生成プログラムを実行する。
 プログラムコード生成プログラムを実行して得られるデータは、メモリ902、補助記憶装置903、プロセッサ901内のレジスタまたはプロセッサ901内のキャッシュメモリといった記憶装置に記憶される。
 補助記憶装置903はデータを記憶する記憶部191として機能する。但し、他の記憶装置が、補助記憶装置903の代わりに、又は、補助記憶装置903と共に、記憶部191として機能してもよい。
 入出力インタフェース904は、データの入力を受け付ける受付部192として機能する。さらに、入出力インタフェース904は、データを出力する出力部193として機能する。
 プログラムコード生成装置100は、プロセッサ901を代替する複数のプロセッサを備えてもよい。複数のプロセッサは、プロセッサ901の役割を分担する。
 プログラムコード生成プログラムは、磁気ディスク、光ディスクまたはフラッシュメモリ等の不揮発性の記憶媒体にコンピュータ読み取り可能に記憶することができる。不揮発性の記憶媒体は、一時的でない有形の媒体である。
***動作の説明***
 プログラムコード生成装置100の動作はプログラムコード生成方法に相当する。また、プログラムコード生成方法の手順はプログラムコード生成プログラムの手順に相当する。
 図2に基づいて、プログラムコード生成方法を説明する。
 ステップS110において、受付部192は、モデル図200を受け付ける。そして、記憶部191は、受け付けられたモデル図200を記憶部191に記憶する。
 具体的には、利用者がプログラムコード生成装置100にモデル図200を入力し、受付部192は、プログラムコード生成装置100に入力されたモデル図200を受け付ける。そして、記憶部191は、受け付けられたモデル図200を記憶する。
 モデル図200は、実行プログラムの仕様を表すデータであり、複数のプログラム要素とプログラム要素間の関係とを示す。
 プログラム要素は、入出力データ、制御および処理など、実行プログラムを構成する要素である。
 図3に、モデル図200の具体例を示す。
 モデル図200は、複数の処理ブロック(B0~B8)と、複数のデータブロック(D1~D4)と、複数のピン(P1~P6)とを含んでいる。さらに、モデル図200は、処理ブロックとデータブロックとピンとを互いに接続する接続線を含んでいる。
 処理ブロックは、データ処理または制御処理を表すプログラム要素である。
 データブロックは、入出力データを表すプログラム要素である。
 ピンは、入出力データの属性を表すプログラム要素である。
 接続線は、プログラム要素間の関係を示す有向線である。図3において、接続線として矢印が用いられており、矢印の方向は手順またはデータの流れを表している。
 各プログラム要素には、ID(Identifier)および名称が設定される。IDは、プログラムコード生成方法における処理で使用される。名称は、利用者に提示される。プログラム要素に付されている符号(B0~B8、D1~D4およびP1~P6)は、プログラム要素のIDに相当する。
 処理ブロック(B0~B8)には、種別、内容、属性情報およびコメントなどの内部データが設定されている。
 処理ブロックの種別は、データ処理または制御処理の種類を識別する。
 例えば、開始、終了、振る舞い呼び出し、アクションおよびデシジョンなどの種別がある。
 処理ブロックの種別において、開始は手順の開始を意味し、終了は手順の終了を意味する。
 振る舞い呼び出しは、振る舞いの呼び出しを意味する。振る舞いは、予め定められた処理であり、1つ以上の命令によって実現される。具体的には、振る舞いは関数に相当する。
 アクションは、データ処理の実行を意味する。
 デシジョンは、制御処理の実行を意味する。
 処理ブロックB0の種別は開始である。つまり、処理ブロックB0は、手順の開始を表している。
 処理ブロックB0の属性情報は、処理ブロックB0から始まる手順が関数の手順であることを示している。
 さらに、処理ブロックB0の属性情報は、「関数」、戻り値の型「int」および引数「int argc, char *argv[]」を示している。「関数」は、処理ブロックB0から始まる手順が関数の手順であることを意味する。
 処理ブロックB1の種別はアクションである。つまり、処理ブロックB1は、データ処理を表している。処理ブロックB1の内容は、具体的なデータ処理を示している。
 処理ブロックB2の種別は振る舞い呼び出しである。処理ブロックB2の内容は、振る舞いの名称「AuthUser」を示している。つまり、処理ブロックB2は、AuthUserという振る舞いの呼び出しを表している。
 処理ブロックB3の種別はデシジョンである。処理ブロックB3の内容は、分岐条件「result==1」および2つの分岐先「B5」「B4」を示している。つまり、処理ブロックB3は、分岐制御を表している。分岐条件「result==1」を満たす場合の分岐先は処理ブロックB5であり、分岐条件「result==1」を満たさない場合の分岐先は処理ブロックB4である。
 処理ブロックB4の種別はアクションである。つまり、処理ブロックB4は、データ処理を表している。処理ブロックB4の内容は、具体的なデータ処理を示している。
 処理ブロックB5の種別はアクションである。つまり、処理ブロックB5は、データ処理を表している。処理ブロックB5の内容は、具体的なデータ処理を示している。
 処理ブロックB6の種別は振る舞い呼び出しである。処理ブロックB6の内容は、振る舞いの名称「ExecProgram」を示している。つまり、処理ブロックB6は、ExecProgramという振る舞いの呼び出しを表している。
 処理ブロックB6の属性情報は、重要属性「重要処理」を示している。つまり、処理ブロックB6は、重要な処理ブロックである。重要な処理ブロックは、重要な処理を表すプログラム要素である。
 処理ブロックB7の種別は終了である。つまり、処理ブロックB7は、手順の終了を表している。
 処理ブロックB7の属性情報は、戻り値「1」を示している。
 処理ブロックB8の種別は終了である。つまり、処理ブロックB8は、手順の終了を表している。
 処理ブロックB8の属性情報は、戻り値「0」を示している。
 データブロック(D1~D4)には、データ名、つまり、変数名が設定されている。
 データブロックD1は、処理ブロックB1から出力されて処理ブロックB2に入力されるデータ「user_id」を表している。
 データブロックD2は、処理ブロックB1から出力されて処理ブロックB2に入力されるデータ「password」を表している。
 データブロックD3は、処理ブロックB2から出力されるデータ「result」を表している。
 データブロックD4は、処理ブロックB6に入力されるデータ「backup.exe」を表している。
 ピン(P1~P6)には、データ属性が必要に応じて設定されている。図3において、「arg」は引数を意味しており、「ret」は戻り値を意味している。
 ピンP3は、データ「user_id」が振る舞い「AuthUser」に対する第1引数であることを表している。
 ピンP4は、データ「password」が振る舞い「AuthUser」に対する第2引数であることを表している。
 ピンP5は、データ「result」が振る舞い「AuthUser」からの戻り値であることを表している。
 ピンP6は、データ「backup.exe」が振る舞い「ExecProgram」に対する第1引数であることを表している。
 モデル図200は、階層的な構造を表現することが可能なデータ形式で記述される。
 例えば、モデル図200は、XMLまたはJSONなどのデータ形式で記述される。XMLは、Extensible Markup Languageの略称である。JSONは、JavaScript Object Notationの略称である。JavaScriptは登録商標である。
 図2に戻り、ステップS120を説明する。
 ステップS120において、分岐要素特定部110は、モデル図200から分岐要素を特定する。
 分岐要素は、分岐のプログラム要素である。分岐のプログラム要素は、分岐制御を表すプログラム要素である。例えば、分岐要素は、C言語におけるif文およびelse文に相当するプログラム要素である。
 具体的には、分岐要素特定部110は、各プログラム要素の種別に基づいて分岐要素を特定する。
 分岐要素特定部110は、分岐要素を特定するために分岐要素ルール210を用いる。分岐要素ルール210は、分岐要素の種別を指定するルールであり、記憶部191に予め記憶されている。
 分岐要素特定部110は、分岐要素ルール210によって指定される種別に属するプログラム要素が分岐要素であると判定する。
 図4に、分岐要素ルール210の具体例を示す。
 分岐要素ルール210は、処理種別とルール値とのそれぞれの欄を有する。それぞれの欄は互いに対応付けられている。
 処理種別の欄は、処理種別を示す。処理種別は、処理ブロックの種別である。
 ルール値の欄は、処理種別が分岐種別であるか否かを示す。分岐種別は、分岐要素に該当する処理ブロックの種別である。ルール値「1」は処理種別が分岐種別であることを意味しており、ルール値「0」は処理種別が分岐種別でないことを意味している。
 図4において、分岐種別は「デシジョン」である。
 したがって、分岐要素特定部110は、種別「デシジョン」が設定されている処理ブロックが分岐要素であると判定する。
 「アクション」または「振る舞い呼び出し」に属する処理ブロックの中で分岐処理が行われる場合がある。その場合、「アクション」に属する処理ブロックの記述を解釈するためにパーサが必要である。また、「振る舞い呼び出し」に属する処理ブロックから呼び出される振る舞いのモデル図が必要である。実施の形態において、パーサおよび振る舞いのモデル図について説明を省略する。
 分岐要素ルール210は、自然言語とプログラミング言語とのいずれで記述されてもよい。
 図2に戻り、ステップS120の説明を続ける。
 グループ特定部120は、モデル図200から、分岐要素の分岐先毎に分岐先グループを特定する。分岐先グループは、分岐先を構成する一連のプログラム要素である。
 図5に基づいて、分岐先グループの特定(S120)を説明する。
 ステップS121において、分岐要素特定部110は、モデル図200から、未選択の処理ブロックを1つ選択する。
 具体的には、分岐要素特定部110は、開始の処理ブロックから終了の処理ブロックまで接続線を辿りながら、処理ブロックを1つずつ選択する。
 ステップS122において、分岐要素特定部110は、選択された処理ブロックが分岐要素であるか判定する。
 具体的には、分岐要素特定部110は以下のように動作する。
 まず、分岐要素特定部110は、選択された処理ブロックから種別を取得する。
 次に、分岐要素特定部110は、取得された種別と同じ処理種別を分岐要素ルール210から選択する。
 次に、分岐要素特定部110は、選択された処理種別に対応付けられたルール値を分岐要素ルール210から取得する。
 そして、分岐要素特定部110は、取得されたルール値が1であるか判定する。
 取得されたルール値が1である場合、選択された処理ブロックは分岐要素である。
 選択された処理ブロックが分岐要素である場合、処理はステップS123に進む。
 選択された処理ブロックが分岐要素でない場合、処理はステップS124に進む。
 ステップS123において、グループ特定部120は、分岐要素の分岐先毎に分岐先グループを特定する。
 具体的には、グループ特定部120は、分岐要素の分岐先毎に分岐先から接続線を辿りながら、一連のプログラム要素を特定する。
 図3のモデル図200において、分岐要素は処理ブロックB3である。
 処理ブロックB3の分岐先は、処理ブロックB5および処理ブロックB4である。
 処理ブロックB5から接続線を辿ることによって得られる一連のプログラム要素は、処理ブロックB5、処理ブロックB6および処理ブロックB8である。したがって、グループ特定部120は、処理ブロックB5と処理ブロックB6と処理ブロックB8との組を第1分岐先グループとして特定する。
 処理ブロックB4から接続線を辿ることによって得られる一連のプログラム要素は、処理ブロックB4および処理ブロックB7である。したがって、グループ特定部120は、処理ブロックB4と処理ブロックB7との組を第2分岐先グループとして特定する。
 図5に戻り、ステップS123の説明を続ける。
 グループ特定部120は分岐情報を生成し、記憶部191は分岐情報を記憶する。
 分岐情報は、分岐要素と各分岐先グループとを特定する情報である。具体的には、分岐要素を特定する情報は分岐要素のIDであり、分岐先グループを特定する情報は分岐先グループを構成する各プログラム要素のIDである。
 次に、ステップS124を説明する。
 ステップS124において、分岐要素特定部110は、未選択の処理ブロックが有るか判定する。
 未選択の処理ブロックが有る場合、処理はステップS121に進む。
 未選択の処理ブロックが無い場合、分岐先グループの特定(S120)は終了する。
 分岐先グループの特定(S120)により、分岐要素毎に分岐情報が生成され、各分岐情報が記憶部191に記憶される。
 図2に戻り、ステップS130から説明を続ける。
 ステップS130において、順序決定部130は、モデル図200から分岐先グループが特定されたか判定する。
 具体的には、順序決定部130は、少なくとも1つの分岐情報が記憶部191に記憶されているか判定する。少なくとも1つの分岐情報が記憶部191に記憶されている場合、順序決定部130は、モデル図200から分岐先グループが特定されたと判定する。
 モデル図200から分岐先グループが特定された場合、処理はステップS140に進む。
 モデル図200から分岐先グループが特定されなかった場合、処理はステップS150に進む。
 ステップS140において、順序決定部130は、プログラムコードの中での各分岐先グループの並び順を決定する。
 具体的には、順序決定部130は、各分岐先グループが重要属性を有するプログラム要素を含むか否かに基づいて各分岐先グループの重要レベルを判定する。そして、順序決定部130は、各分岐先グループの重要レベルに基づいて各分岐先グループの並び順を決定する。
 また、順序決定部130は、決定された並び順が分岐要素によって特定される並び順と異なる場合、決定された並び順に合致するように分岐要素を変更する。
 図6に基づいて、順序決定処理(S140)の手順を説明する。
 ステップS141において、順序決定部130は、未選択の分岐情報を1つ選択する。
 ステップS142からステップS148までの処理は、ステップS141で選択された分岐情報に対して実行される。
 ステップS142において、順序決定部130は、選択された分岐情報から、未選択の分岐先グループを1つ選択する。
 ステップS143およびステップS144は、ステップS142で選択された分岐先グループに対して実行される。
 ステップS143において、順序決定部130は、選択された分岐先グループの重要レベルを判定する。
 具体的には、順序決定部130は、分岐先グループの重要レベルを以下のように判定する。
 順序決定部130は、重要要素が分岐先グループに含まれるか判定する。重要要素は、重要属性が設定されているプログラム要素である。
 重要要素が分岐先グループに含まれる場合、順序決定部130は、分岐先グループの要素数を数える。分岐先グループの要素数は、分岐先グループに含まれるプログラム要素の数である。具体的には、分岐先グループの要素数は、分岐先グループに含まれる処理ブロックの数である。分岐先グループの要素数が、分岐先グループの重要レベルとして用いられる。図3において、処理ブロックB5、処理ブロックB6および処理ブロックB8が第1分岐先グループを構成している。第1分岐先グループは、重要属性「重要処理」が設定されている処理ブロックB6を含めて、3つの処理ブロックを含んでいる。したがって、第1分岐先グループの重要レベルは「3」である。
 重要要素が分岐先グループに含まれない場合、順序決定部130は、分岐先グループの重要レベルを最低レベルにする。具体的には、順序決定部130は、分岐先グループの重要レベルを「0」にする。図3において、処理ブロックB4および処理ブロックB7が第2分岐先グループを構成している。第2分岐先グループは、重要属性「重要処理」が設定されている処理ブロックを含んでいない。したがって、第2分岐先グループの重要レベルは「0」である。
 ステップS144において、順序決定部130は、未選択の分岐先グループが有るか判定する。
 未選択の分岐先グループが有る場合、処理はステップS142に進む。
 未選択の分岐先グループが無い場合、処理はステップS145に進む。
 ステップS145において、順序決定部130は、各分岐先グループの重要レベルを互いに比較することによって、各分岐先グループの重要レベルが異なるか判定する。
 但し、順序決定部130は、重要要素を含んでいない分岐先グループを除外する。つまり、順序決定部130は、重要要素を含んでいる各分岐先グループを対象にして比較および判定を行う。
 各分岐先グループの重要レベルが異なる場合、つまり、同じ重要レベルを有する2つ以上の分岐先グループが存在しない場合、処理はステップS146に進む。
 各分岐先グループの重要レベルが異ならない場合、つまり、同じ重要レベルを有する2つ以上の分岐先グループが存在する場合、処理はステップS148に進む。
 ステップS146において、順序決定部130は、各分岐先グループの重要レベルに基づいて、各分岐先グループの並び順を決定する。
 具体的には、順序決定部130は、重要レベルの昇順で並び順を決定する。例えば、第1分岐先グループの重要レベルが「3」であり、第2分岐先グループの重要レベルが「0」である場合、これらの分岐先グループの並び順は「第2分岐先グループ→第1分岐先グループ」の順である。
 そして、順序決定部130は、各分岐先グループの並び順を分岐情報に登録する。
 ステップS147において、順序決定部130は、決定された並び順が分岐要素によって特定される並び順と異なる場合、決定された並び順に合致するように分岐要素を変更する。
 具体的には、順序決定部130は以下のように動作する。
 まず、順序決定部130は、分岐要素の内容が示す分岐条件と2つ以上の分岐先とに基づいて、各分岐先の並び順を判定する。
 次に、順序決定部130は、各分岐先の並び順を分岐先グループの並び順と比較する。
 各分岐先の並び順が分岐先グループの並び順と異なる場合、順序決定部130は、分岐要素の内容が示す分岐条件を変更する。
 図3のモデル図200において、分岐要素は処理ブロックB3である。処理ブロックB3の分岐条件は「result==1」であり、分岐条件を満たす場合の分岐先は処理ブロックB5であり、分岐条件を満たさない場合の分岐先は処理ブロックB4である。この場合、分岐先の並び順は「B5→B4」である。この並び順を「B4→B5」に変更したい場合、順序決定部130は、分岐条件「result==1」を「result!=1」に変更する。
 ステップS148において、順序決定部130はエラーメッセージを生成し、出力部193はエラーメッセージをディスプレイに表示する。
 一つの分岐要素に対して同じ重要レベルを有する2つ以上の分岐先グループが存在する場合、各分岐先グループを適切な順序で並べることができない。そのため、エラーメッセージが表示される。
 ステップS147の後、順序決定処理(S140)は終了する。さらに、順序決定処理(S140)の後の処理が行われない。つまり、プログラムコードが生成されない。
 ステップS149において、順序決定部130は、未選択の分岐情報が有るか判定する。
 未選択の分岐情報が有る場合、処理はステップS141に進む。
 未選択の分岐情報が無い場合、順序決定処理(S140)は終了する。
 図2に戻り、ステップS150を説明する。
 ステップS150において、コード生成部140は、モデル図200に基づいて、プログラムコードを生成する。
 プログラムコードは、各分岐先グループの並び順で、各分岐先グループに対応するコードを含む。
 図7に基づいて、コード生成処理(S150)を説明する。
 ステップS151において、コード生成部140は、モデル図200とコード変換ルール220と分岐情報とを記憶部191から読み込む。
 コード変換ルール220は、モデル図200をプログラムコードに変換するためのルールであり、記憶部191に予め記憶されている。
 図8に基づいて、コード変換ルール220の構成を説明する。
 コード変換ルール220は、一般変換ルール221とブロック変換ルール222と振る舞い変換ルール223とを含んでいる。
 一般変換ルール221は、モデル図200の表現に関わらない一般的な変換ルールである。
 ブロック変換ルール222は、モデル図200の表現に関わる変換ルールである。
 振る舞い変換ルール223は、振る舞いに対応する関数に関わる変換ルールである。
 図9に、一般変換ルール221の具体例を示す。
 一般変換ルール221は、項目と変換ルールとのそれぞれの欄を有する。それぞれの欄は互いに対応付けられている。
 項目の欄は、プログラム要素を指定している。
 変換ルールの欄は、プログラム要素の名称を指定している。
 例えば、一般変換ルール221は、モデル図のファイル名(拡張子は除く)を関数名として用いることを指定している。
 図10に、ブロック変換ルール222の具体例を示す。
 ブロック変換ルール222は、種別と変換ルールとのそれぞれの欄を有する。それぞれの欄は互いに対応付けられている。
 種別の欄は、処理ブロックの種別を指定している。
 変換ルールの欄は、処理ブロックに対応するコードを記述する方法を指定している。
 例えば、ブロック変換ルール222は、種別「デシジョン」を有する処理ブロックにおいて内容が示す分岐条件を条件文にすることを指定している。具体的には、分岐条件の記述がif文またはwhile文に設定される条件文になる。
 図11に、振る舞い変換ルール223の具体例を示す。
 振る舞い変換ルール223は、名称とヘッダと戻り値と引数とのそれぞれの欄を有する。それぞれの欄は互いに対応付けられている。
 名称の欄は、振る舞いの名称を示している。
 ヘッダの欄は、振る舞いに対応する関数が定義されているヘッダを指定している。
 戻り値の欄は、振る舞いに対応する関数の戻り値を指定している。
 引数の欄は、振る舞いに対応する関数の引数を指定している。
 一般変換ルール221、ブロック変換ルール222および振る舞い変換ルール223の内容は、自然言語とプログラミング言語とのいずれで記述してもよい。
 図7に戻り、ステップS152を説明する。
 ステップS152において、コード生成部140は、モデル図200とコード変換ルール220と分岐情報とに基づいて、プログラムコードを生成する。プログラムコードは、プログラミング言語を用いて記述される。記憶部191は、プログラムコードを記憶する。
 具体的には、コード生成部140は以下のように動作する。
 まず、コード生成部140は、一般変換ルール221(図9参照)に従って、ヘッダファイルとソースファイルとを生成する。ヘッダファイル名は、モデル図200のファイル名(拡張子を除く)に拡張子「.h」を付加して得られる名称である。ソースファイル名は、モデル図200のファイル名(拡張子を除く)に拡張子「.c」を付加して得られる名称である。モデル図200のファイル名が「ExecBackup.mdl」である場合、ヘッダファイル名は「ExecBackup.h」であり、ソースファイル名は「ExecBackup.c」である。また、ソースファイルの中に記述される関数の名称は「ExecBackup」である。
 次に、コード生成部140は、ヘッダファイルの中にプロトタイプ宣言などを記述する。
 そして、コード生成部140は、モデル図200に基づいて、ソースファイルの中にプログラムコードを記述する。また、コード生成部140は、必要に応じて、ブロック変換ルール222、振る舞い変換ルール223および分岐情報を参照する。
 図12に、ヘッダファイル230の具体例を示す。
 ヘッダファイル230には、プログラムコード231が記述されている。
 プログラムコード231は、モデル図200に対応する関数に関してプロトタイプ宣言などを定義するためのコードである。プログラムコード231は、C言語で記述されている。
 図13に、ソースファイル240の具体例を示す。
 ソースファイル240には、プログラムコード241が記述されている。
 プログラムコード241は、モデル図200に対応する関数のコードである。プログラムコード241は、C言語で記述されている。
 破線で囲われた部分は、分岐要素および各分岐先グループに対応するコードである。モデル図200(図3参照)における分岐条件「result==1」は、条件文「result!=1」に変更されている。そして、第2分岐先グループ(B4およびB7)に対応するコードの後ろに、第1分岐先グループ(B5、B6およびB8)に対するコードが記述されている。
***実施の形態1の効果***
 プログラムコード生成装置100は、モデル図200から分岐先グループを特定し、特定した分岐先グループの中でより重要な分岐先グループが後方に位置するようにプログラムコードを生成する。そのため、制御構造に関する命令をスキップさせる故障注入攻撃による悪影響を受け難いプログラムコードが生成される。
 したがって、プログラムコードが故障注入攻撃による悪影響を受けやすいかを調査するための労力及び時間を削減することができる。また、故障注入攻撃による悪影響を受けやすい箇所を修正するための労力及び時間を削減することができる。
 実施の形態2.
 各分岐先グループの並び順を重要レベルの低い順ではなく所定の順序ルールに従って決定する形態について、主に実施の形態1と異なる点を説明する。
***構成の説明***
 プログラムコード生成装置100の構成は、実施の形態1における構成(図1参照)と同じである。
***動作の説明***
 プログラムコード生成方法における処理の流れは、実施の形態1における処理の流れ(図2参照)と同じである。
 但し、ステップS140において各分岐先グループの並び順を決定する方法は、実施の形態1における方法と異なる。
 図6に基づいて、順序決定処理(S140)を説明する。
 順序決定処理(S140)の流れは、実施の形態1で説明した通りである。
 但し、ステップS146において各分岐先グループの並び順を決定する方法は、実施の形態1における方法と異なる。
 ステップS146において、順序決定部130は、各分岐先グループの並び順を順序ルールに従って決定する。順序ルールは、重要レベルと順序との関係を示す。
 プログラムの開発環境またはプログラムの実行環境に応じて複数の順序ルールが存在し、複数の順序ルールが記憶部191に予め記憶されている。
 例えば、コンパイラの種類毎に順序ルールが存在する。この場合、順序決定部130は、利用者から指定されたコンパイラに対応する順序ルールを選択し、選択した順序ルールに従って各分岐先グループの並び順を決定する。
 例えば、アーキテクチャの種類毎に順序ルールが存在する。この場合、順序決定部130は、利用者から指定されたアーキテクチャに対応する順序ルールを選択し、選択した順序ルールに従って各分岐先グループの並び順を決定する。
***実施の形態2の効果***
 プログラムコード生成装置100は、各分岐先グループの並び順をプログラムの開発環境またはプログラムの実行環境に応じて適切に決定する。
 そのため、制御構造に関する命令をスキップさせる故障注入攻撃による悪影響を受け難いプログラムコードが生成される。
 したがって、プログラムコードが故障注入攻撃による悪影響を受けやすいかを調査するための労力及び時間を削減することができる。また、故障注入攻撃による悪影響を受けやすい箇所を修正するための労力及び時間を削減することができる。
 実施の形態3.
 各分岐先グループの重要レベルを重要要素の有無に基づいて判定するのではなく、各分岐先グループの重要レベルを各分岐先グループの中のプログラム要素の構成に基づいて判定する形態について、主に実施の形態1と異なる点を説明する。
***構成の説明***
 プログラムコード生成装置100の構成は、実施の形態1における構成(図1参照)と同じである。
***動作の説明***
 プログラムコード生成方法における処理の流れは、実施の形態1における処理の流れ(図2参照)と同じである。
 但し、ステップS140において各分岐先グループの並び順を決定する方法は、実施の形態1における方法と異なる。
 図6に基づいて、順序決定処理(S140)を説明する。
 順序決定処理(S140)の流れは、実施の形態1で説明した通りである。
 但し、ステップS143において各分岐先グループの重要レベルを判定する方法は、実施の形態1における方法と異なる。
 ステップS143において、順序決定部130は、分岐先グループの中のプログラム要素の構成に基づいて、分岐先グループの重要レベルを判定する。
 例えば、順序決定部130は、分岐先グループの重要レベルを、分岐先グループに含まれるプログラム要素の数に基づいて判定する。プログラム要素の数が多いほど重要レベルは高い。
 例えば、順序決定部130は、分岐先グループに含まれる各プログラム要素に基づいて構成の複雑度を判定し、構成の複雑度に基づいて分岐先グループの重要レベルを判定する。複雑度が高いほど重要レベルは高い。
***実施の形態3の効果***
 モデル図200の作成者は、モデル図200に含まれるプログラム要素の中から重要要素を選んで重要要素に重要属性を設定する必要がない。
 したがって、モデル図200を作成するための労力および時間を削減することができる。
 実施の形態4.
 各分岐先グループの中の各プログラム要素の内容に基づいて各分岐先グループの重要レベルを判定する形態について、主に実施の形態1と異なる点を説明する。
***構成の説明***
 プログラムコード生成装置100の構成は、実施の形態1における構成(図1参照)と同じである。
***動作の説明***
 プログラムコード生成方法における処理の流れは、実施の形態1における処理の流れ(図2参照)と同じである。
 但し、ステップS140において各分岐先グループの並び順を決定する方法は、実施の形態1における方法と異なる。
 図6に基づいて、順序決定処理(S140)を説明する。
 順序決定処理(S140)の流れは、実施の形態1で説明した通りである。
 但し、ステップS143において各分岐先グループの重要レベルを判定する方法は、実施の形態1における方法と異なる。
 ステップS143において、順序決定部130は、分岐先グループの中の各プログラム要素の内容に基づいて、分岐先グループの重要レベルを判定する。
 具体的には、重要要素を特定する重要情報が予め記憶部191に記憶される。そして、順序決定部130は、重要情報によって特定される重要要素が分岐先グループに含まれるか否かに基づいて、分岐先グループの重要レベルを判定する。重要要素を含む分岐先グループの重要レベルおよび重要要素を含まない分岐先グループの重要レベルを判定する方法は、実施の形態1における方法と同じである。
 重要情報が「ExecProgram」である場合、図3のモデル図200において重要要素は処理ブロックB6である。したがって、第1分岐先グループ(B5、B6およびB8)は重要要素を含む。一方、第2分岐先グループ(B4およびB7)は重要要素を含まない。
***実施の形態4の効果***
 モデル図200の作成者は、モデル図200に含まれるプログラム要素の中から重要要素を選んで重要要素に重要属性を設定する必要がない。
 したがって、モデル図200を作成するための労力および時間を削減することができる。
 実施の形態5.
 モデル図200の中で並び順が変更される箇所を利用者に知らせる形態について、主に実施の形態1と異なる点を説明する。
***構成の説明***
 プログラムコード生成装置100の構成は、実施の形態1における構成(図1参照)と同じである。
***動作の説明***
 プログラムコード生成方法における処理の流れは、実施の形態1における処理の流れ(図2参照)と同じである。
 但し、ステップS140において、モデル図200の中で並び順が変更される箇所が利用者に知らされる。
 図6に基づいて、順序決定処理(S140)を説明する。
 順序決定処理(S140)の流れは、実施の形態1で説明した通りである。
 但し、ステップS147において、モデル図200の中で並び順が変更される箇所が利用者に知らされる。
 ステップS147において、順序決定部130は、決定された並び順が分岐要素によって特定される並び順と異なる場合、決定された並び順に合致するように分岐要素を変更する。分岐要素を変更する方法は、実施の形態1で説明した通りである。
 さらに、決定された並び順が分岐要素によって特定される並び順と異なる場合、順序決定部130は、モデル図200を分岐要素が強調された状態に変更する。そして、出力部193は、分岐要素が強調された状態でモデル図200をディスプレイに表示する。
***実施の形態5の効果***
 利用者は、プログラムコードを調査することなく、並び順が変更された箇所を知ることができる。
***実施の形態の補足***
 図14に基づいて、プログラムコード生成装置100のハードウェア構成を説明する。
 プログラムコード生成装置100は処理回路990を備える。
 処理回路990は、分岐要素特定部110とグループ特定部120と順序決定部130とコード生成部140とを実現するハードウェアである。
 処理回路990は、専用のハードウェアであってもよいし、メモリ902に格納されるプログラムを実行するプロセッサ901であってもよい。
 処理回路990が専用のハードウェアである場合、処理回路990は、例えば、単一回路、複合回路、プログラム化したプロセッサ、並列プログラム化したプロセッサ、ASIC、FPGAまたはこれらの組み合わせである。
 ASICはApplication Specific Integrated Circuitの略称であり、FPGAはField Programmable Gate Arrayの略称である。
 プログラムコード生成装置100は、処理回路990を代替する複数の処理回路を備えてもよい。複数の処理回路は、処理回路990の役割を分担する。
 プログラムコード生成装置100の機能について、一部が専用のハードウェアで実現されて、残りがソフトウェアまたはファームウェアで実現されてもよい。
 このように、処理回路990はハードウェア、ソフトウェア、ファームウェアまたはこれらの組み合わせで実現することができる。
 実施の形態は、好ましい形態の例示であり、本発明の技術的範囲を制限することを意図するものではない。実施の形態は、部分的に実施してもよいし、他の形態と組み合わせて実施してもよい。フローチャート等を用いて説明した手順は、適宜に変更してもよい。
 100 プログラムコード生成装置、110 分岐要素特定部、120 グループ特定部、130 順序決定部、140 コード生成部、191 記憶部、192 受付部、193 出力部、200 モデル図、210 分岐要素ルール、220 コード変換ルール、221 一般変換ルール、222 ブロック変換ルール、223 振る舞い変換ルール、230 ヘッダファイル、231 プログラムコード、240 ソースファイル、901 プロセッサ、902 メモリ、903 補助記憶装置、904 入出力インタフェース、990 処理回路。

Claims (12)

  1.  プログラムコードを生成するためのプログラムコード生成装置であって、
     複数のプログラム要素とプログラム要素間の関係とを示すモデル図から、分岐のプログラム要素である分岐要素を特定する分岐要素特定部と、
     前記モデル図から、前記分岐要素の分岐先毎に分岐先を構成する一連のプログラム要素である分岐先グループを特定するグループ特定部と、
     前記プログラムコードの中での各分岐先グループの並び順を決定する順序決定部と
    を備えるプログラムコード生成装置。
  2.  前記分岐要素特定部は、各プログラム要素の種別に基づいて前記分岐要素を特定する
    請求項1に記載のプログラムコード生成装置。
  3.  前記分岐要素特定部は、前記分岐要素の種別を指定する分岐要素ルールを用いて、前記分岐要素ルールによって指定される種別に属するプログラム要素が前記分岐要素であると判定する
    請求項2に記載のプログラムコード生成装置。
  4.  前記順序決定部は、各分岐先グループが重要属性を有するプログラム要素を含むか否かに基づいて各分岐先グループの重要レベルを判定し、各分岐先グループの重要レベルに基づいて各分岐先グループの前記並び順を決定する
    請求項1に記載のプログラムコード生成装置。
  5.  前記順序決定部は、各分岐先グループの中のプログラム要素の構成に基づいて各分岐先グループの重要レベルを判定し、各分岐先グループの重要レベルに基づいて各分岐先グループの前記並び順を決定する
    請求項1に記載のプログラムコード生成装置。
  6.  前記順序決定部は、各分岐先グループの中の各プログラム要素の内容に基づいて各分岐先グループの重要レベルを判定し、各分岐先グループの重要レベルに基づいて各分岐先グループの前記並び順を決定する
    請求項1に記載のプログラムコード生成装置。
  7.  前記順序決定部は、重要レベルの昇順で前記並び順を決定する
    請求項4から請求項6のいずれか1項に記載のプログラムコード生成装置。
  8.  前記順序決定部は、重要レベルと順序との関係を指定する順序ルールに従って前記並び順を決定する
    請求項4から請求項6のいずれか1項に記載のプログラムコード生成装置。
  9.  前記順序決定部は、決定された前記並び順が前記分岐要素によって特定される並び順と異なる場合、決定された前記並び順に合致するように前記分岐要素を変更する
    請求項4から請求項8のいずれか1項に記載のプログラムコード生成装置。
  10.  前記モデル図に基づいて前記プログラムコードを生成するコード生成部を備え、
     前記プログラムコードが、各分岐先グループの前記並び順で、各分岐先グループに対応するコードを含む
    請求項1から請求項9のいずれか1項に記載のプログラムコード生成装置。
  11.  前記プログラムコード生成装置は、決定された前記並び順が前記分岐要素によって特定される並び順と異なる場合に前記分岐要素が強調された状態で前記モデル図を表示する出力部を備える
    請求項1から請求項10のいずれか1項に記載のプログラムコード生成装置。
  12.  プログラムコードを生成するためのプログラムコード生成プログラムであって、
     複数のプログラム要素とプログラム要素間の関係とを示すモデル図から、分岐のプログラム要素である分岐要素を特定する分岐要素特定処理と、
     前記モデル図から、前記分岐要素の分岐先毎に分岐先を構成する一連のプログラム要素である分岐先グループを特定するグループ特定処理と、
     前記プログラムコードの中での各分岐先グループの並び順を決定する順序決定処理と
    をコンピュータに実行させるためのプログラムコード生成プログラム。
PCT/JP2017/020664 2017-06-02 2017-06-02 プログラムコード生成装置およびプログラムコード生成プログラム WO2018220836A1 (ja)

Priority Applications (6)

Application Number Priority Date Filing Date Title
JP2019521912A JP6602511B2 (ja) 2017-06-02 2017-06-02 プログラムコード生成装置およびプログラムコード生成プログラム
EP17911723.9A EP3640796A4 (en) 2017-06-02 2017-06-02 PROGRAM CODE GENERATION DEVICE AND TWO-DIMENSIONAL CODE GENERATION PROGRAM
PCT/JP2017/020664 WO2018220836A1 (ja) 2017-06-02 2017-06-02 プログラムコード生成装置およびプログラムコード生成プログラム
US16/500,483 US11137988B2 (en) 2017-06-02 2017-06-02 Program code generation device and computer readable medium
CN201780091246.6A CN110709814A (zh) 2017-06-02 2017-06-02 程序代码生成装置和程序代码生成程序
TW106123305A TWI658409B (zh) 2017-06-02 2017-07-12 Program code generating device and program code generating program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2017/020664 WO2018220836A1 (ja) 2017-06-02 2017-06-02 プログラムコード生成装置およびプログラムコード生成プログラム

Publications (1)

Publication Number Publication Date
WO2018220836A1 true WO2018220836A1 (ja) 2018-12-06

Family

ID=64456183

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2017/020664 WO2018220836A1 (ja) 2017-06-02 2017-06-02 プログラムコード生成装置およびプログラムコード生成プログラム

Country Status (6)

Country Link
US (1) US11137988B2 (ja)
EP (1) EP3640796A4 (ja)
JP (1) JP6602511B2 (ja)
CN (1) CN110709814A (ja)
TW (1) TWI658409B (ja)
WO (1) WO2018220836A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11675571B1 (en) * 2021-12-28 2023-06-13 Nb Ventures, Inc. Restructuring enterprise application

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04326124A (ja) * 1991-04-25 1992-11-16 Casio Comput Co Ltd フローチャート生成装置
JPH07230384A (ja) * 1994-02-16 1995-08-29 Matsushita Electric Ind Co Ltd 処理配置装置および方法
JP2006301989A (ja) 2005-04-21 2006-11-02 Fuji Electric Holdings Co Ltd 計算機言語によるプログラムをブロック図から自動生成する方法と装置とプログラム
JP2009009537A (ja) * 2006-09-11 2009-01-15 Renesas Technology Corp プログラム作成方法及び情報処理装置ならびにマイコン
JP2011013887A (ja) 2009-07-01 2011-01-20 Fuji Electric Systems Co Ltd ソフトウェア開発支援装置
JP2016057715A (ja) 2014-09-05 2016-04-21 富士電機株式会社 図形式プログラム解析装置

Family Cites Families (21)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
ATE141423T1 (de) * 1988-09-20 1996-08-15 Digital Equipment Corp Anordnung zur teilung eines generischen kodes für ein digitales datenverarbeitungssystem
US5187788A (en) * 1989-05-01 1993-02-16 The United States Of America As Represented By The Secretary Of The Air Force Graphics system for automatic computer code generation
JP3049561B2 (ja) * 1990-05-21 2000-06-05 東洋通信機株式会社 プロダクションシステムとプロダクションシステムの変換装置
JPH06314203A (ja) * 1993-04-28 1994-11-08 Fujitsu Ltd コンパイラの最適化方法および装置
US7275079B2 (en) * 2000-08-08 2007-09-25 International Business Machines Corporation Common application metamodel including C/C++ metamodel
US6996799B1 (en) * 2000-08-08 2006-02-07 Mobilygen Corporation Automatic code generation for integrated circuit design
WO2002044835A2 (en) * 2000-11-28 2002-06-06 Gingerich Gregory L A method and system for software and hardware multiplicity
US7093238B2 (en) * 2001-07-27 2006-08-15 Accordsqa, Inc. Automated software testing and validation system
US7444622B2 (en) * 2003-08-27 2008-10-28 Microsoft Corporation Access driven filtering
JP4874440B2 (ja) 2004-06-29 2012-02-15 株式会社デンソー 状態とイベントの組にアクションを割り当てた対応情報に基づいてプログラムを生成するプログラム生成プログラム、プログラム生成装置、およびプログラム生成方法、ならびに、これらによって生成されるプログラム
CN1908892A (zh) 2005-08-01 2007-02-07 王彤 测试用例设计方法和系统
JP2008064262A (ja) 2006-09-11 2008-03-21 Nissan Diesel Motor Co Ltd 変速機の同期装置
JP2008140288A (ja) 2006-12-05 2008-06-19 Nomura Research Institute Ltd プログラム実行システム
US8694760B2 (en) * 2009-05-19 2014-04-08 Panasonic Corporation Branch prediction using a leading value of a call stack storing function arguments
US20110088011A1 (en) * 2009-10-14 2011-04-14 Vermeg Sarl Automated Enterprise Software Development
CN102053825A (zh) * 2009-10-30 2011-05-11 国际商业机器公司 用于处理软件设计冲突的方法和系统
US8943487B2 (en) 2011-01-20 2015-01-27 Fujitsu Limited Optimizing libraries for validating C++ programs using symbolic execution
CN103377411A (zh) * 2012-04-27 2013-10-30 国际商业机器公司 用于生成wbs模型数据的方法和系统
US9588956B2 (en) 2013-07-12 2017-03-07 Ab Initio Technology Llc Parser generation
CN103425584B (zh) * 2013-08-27 2016-01-13 上海复深蓝信息技术有限公司 基于Java字节码的大型应用回归测试信息处理方法
WO2015087409A1 (ja) 2013-12-11 2015-06-18 株式会社日立製作所 ソースコード生成装置、ソースコード証明装置、ソースコード生成方法、およびソースコード生成プログラム

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04326124A (ja) * 1991-04-25 1992-11-16 Casio Comput Co Ltd フローチャート生成装置
JPH07230384A (ja) * 1994-02-16 1995-08-29 Matsushita Electric Ind Co Ltd 処理配置装置および方法
JP2006301989A (ja) 2005-04-21 2006-11-02 Fuji Electric Holdings Co Ltd 計算機言語によるプログラムをブロック図から自動生成する方法と装置とプログラム
JP2009009537A (ja) * 2006-09-11 2009-01-15 Renesas Technology Corp プログラム作成方法及び情報処理装置ならびにマイコン
JP2011013887A (ja) 2009-07-01 2011-01-20 Fuji Electric Systems Co Ltd ソフトウェア開発支援装置
JP2016057715A (ja) 2014-09-05 2016-04-21 富士電機株式会社 図形式プログラム解析装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3640796A4 *

Also Published As

Publication number Publication date
US20210109723A1 (en) 2021-04-15
US11137988B2 (en) 2021-10-05
JPWO2018220836A1 (ja) 2019-11-07
TWI658409B (zh) 2019-05-01
CN110709814A (zh) 2020-01-17
TW201903603A (zh) 2019-01-16
JP6602511B2 (ja) 2019-11-06
EP3640796A4 (en) 2020-06-03
EP3640796A1 (en) 2020-04-22

Similar Documents

Publication Publication Date Title
CN113287114A (zh) 针对以同步数字电路为目标的编程语言的查找表优化
US7036111B2 (en) Code verification system and method
JP5176478B2 (ja) データフロー解析装置、データフロー解析方法およびデータフロー解析プログラム
JP6847330B2 (ja) アタックツリー生成装置、アタックツリー生成方法およびアタックツリー生成プログラム
JP6602511B2 (ja) プログラムコード生成装置およびプログラムコード生成プログラム
US20110131031A1 (en) Dynamic generation of tests
JP2007304726A (ja) プログラム難読化装置、難読化方法及び難読化プログラム
US20100218200A1 (en) Method for programmatic editing of text files
JP6567212B2 (ja) 等価性検証装置および等価性検証プログラム
US11349908B2 (en) Generating templates for deployment of system services
JP6481515B2 (ja) 情報処理装置、コンパイル方法、及びコンパイラプログラム
Luckow et al. Symbolic pathfinder v7
US8972927B2 (en) Method and system for providing modeled components
JP2016128941A (ja) 出力判定装置、出力判定方法、出力判定プログラム、及び、静的解析装置
Brain et al. Verifying Classic McEliece: examining the role of formal methods in post-quantum cryptography standardisation
JP2021103354A (ja) プログラムの試験方法
JP2020201530A (ja) コンパイル装置、コンパイル方法、及びプログラム
JP7008780B2 (ja) 状態遷移編集装置および状態遷移編集プログラム
JP7163879B2 (ja) データフロー生成装置、その方法、およびそのプログラム
JP6807721B2 (ja) 状態遷移編集装置および状態遷移編集プログラム
JP2014206948A (ja) エントリーポイント抽出装置
Roio The Zencode Whitepaper
JP2017041085A (ja) プログラム仕様推定装置、推定方法、および推定プログラム
Roio et al. DECODE
JP2007133536A (ja) 故障検出プログラム作成装置、プリプロセッサ、故障検出プログラム作成方法、及びプログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17911723

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2019521912

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2017911723

Country of ref document: EP

Effective date: 20191209