WO2012046460A1 - ソフトウエア生成装置、ソフトウエア生成方法及びプログラム - Google Patents

ソフトウエア生成装置、ソフトウエア生成方法及びプログラム Download PDF

Info

Publication number
WO2012046460A1
WO2012046460A1 PCT/JP2011/051526 JP2011051526W WO2012046460A1 WO 2012046460 A1 WO2012046460 A1 WO 2012046460A1 JP 2011051526 W JP2011051526 W JP 2011051526W WO 2012046460 A1 WO2012046460 A1 WO 2012046460A1
Authority
WO
WIPO (PCT)
Prior art keywords
source code
software
blocks
data
block
Prior art date
Application number
PCT/JP2011/051526
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 US13/876,537 priority Critical patent/US20130185695A1/en
Priority to KR1020137008706A priority patent/KR101565666B1/ko
Priority to CN2011800480446A priority patent/CN103154886A/zh
Priority to JP2012537597A priority patent/JPWO2012046460A1/ja
Priority to EP11830394.0A priority patent/EP2626783A4/en
Publication of WO2012046460A1 publication Critical patent/WO2012046460A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • 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
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Definitions

  • the present invention relates to a software generation device, a software generation method, and a program. More specifically, the present invention relates to a software generation device that generates software executed by a predetermined control device, and software executed by a predetermined control device. The present invention relates to a software generation method and a program for generation.
  • the actual damage caused by errors in the process of running the operation program may be significantly increased depending on the application of the equipment. For this reason, the allowable range of errors caused by programs used for operating equipment is narrower than the allowable range of errors caused by programs used for operating information equipment, for example. Therefore, it is generally expensive to manufacture an operation program for facility equipment.
  • Patent Document 1 a development support apparatus for creating an operation program for equipment at a low cost while maintaining quality has been proposed (see, for example, Patent Document 1).
  • Patent Document 1 extracts state transition conditions that should be mutually exclusive from state transition information. This makes it possible to easily confirm whether or not the state transition condition that should have exclusivity actually has exclusivity. And the state transition condition which does not have exclusivity can be corrected without omission so that it may have exclusivity. Therefore, it is possible to avoid a situation where the software repeats a specific process indefinitely or a lot of source code is generated unnecessarily.
  • the present invention has been made under the above circumstances, and an object thereof is to generate a program with a simple operation.
  • the software generation device of the present invention provides: Matching means for matching a plurality of predetermined blocks to the source code, consisting of a character string constituting a part of software source code, Conversion means for converting the source code into data composed of the blocks by replacing the matched portions of the blocks of the source code with the matched blocks; Generating means for generating the software based on the data comprising the blocks; Is provided.
  • the source code for generating software is converted into data composed of a plurality of blocks. Therefore, the user can change the contents of processing by software and the order of processing by exchanging a certain block with a desired block or changing the arrangement of the blocks. Therefore, a desired program can be generated with a simple operation.
  • FIG. 1 is a block diagram showing the software generation apparatus 10 according to the present embodiment together with an air conditioning system 20 having a remote control device 21 and an air conditioning device 22.
  • the software generation device 10 is a device for generating an operation program 105 executed by the air conditioning system 20.
  • the software generation device 10 includes a CPU (Central Processing Unit) 10a, a display unit 10b, an input unit 10c, a main storage unit 10d, an auxiliary storage unit 10e, and a communication unit 10f. .
  • CPU Central Processing Unit
  • the display unit 10b has an LCD (Liquid Crystal Display) or a CRT (Cathode Ray Tube).
  • FIG. 2 shows a window W1 that functions as a user interface when the operation program 105 is generated.
  • the display unit 10b displays various windows represented by the window W1 based on instructions from the CPU 10a. Moreover, the processing result of CPU10a etc. are displayed as needed.
  • the input unit 10c includes a pointing device such as a keyboard, a mouse, or a touch panel.
  • the operator's instruction is input via the input unit 10c.
  • the CPU 10a is notified via the system bus 10g.
  • the main storage unit 10d has a volatile memory such as DRAM (Dynamic Random Access Memory) or SRAM (Static Random Access Memory).
  • the main storage unit 10d is used as a work area for the CPU 10a.
  • the auxiliary storage unit 10e has a nonvolatile memory such as a magnetic disk or a flash memory.
  • the auxiliary storage unit 10e stores dictionary information 101 and source code 102.
  • FIG. 3 is a diagram schematically showing the configuration of the dictionary information 101.
  • the dictionary information 101 includes source code pattern P N , control block BC N , and control content information CON N representing the content of control block BC N.
  • the source code pattern PN is source code indicating the contents of a single process among a plurality of processes executed by the operation program 105. As shown in FIG. 3, the source code pattern PN includes a character string (text) used for describing the source code. For example, the source code pattern PN is expressed in a format such as “function name (argument 1, argument 2);”.
  • the source code of the operation program 105 is the set temperature It can be expressed by a combination of a source code pattern indicating a read process, a source code pattern indicating a discharge air temperature setting process, and a source code pattern indicating an air volume setting process.
  • a source code represented by a character string of 10,000 lines for example, by a character string of about 100 lines or about 100 icons.
  • a control block BC N is associated with each source code pattern P N.
  • the control block BC N is the concept of time handling the source code pattern P N.
  • the software generation apparatus 10 the control block BC N is represented by an icon or an image in accordance with the contents of the control block BC N.
  • the control content information CON N is information for identifying the content of the control block BC N.
  • the control contents information CON N is, for example, shows the source code pattern P N equivalent content. Then, it handled in a state associated with the control block BC N.
  • the source code 102 is the original data when the operation program 105 is generated. 4, the source code 102 is a diagram schematically showing the relationship between the control block BC N. As shown in FIG. 4, the source code 102 is data described by a character string representing a function or an argument.
  • the communication unit 10f includes, for example, a serial interface or a LAN (Local Area Network) interface.
  • the software generation device 10 communicates with the remote control device 21 via the communication unit 10f.
  • the CPU 10a generates an operation program 105 to be executed by the remote control device 21 based on the source code 102 stored in the auxiliary storage unit 10e.
  • the operation program 105 is output to the remote control device 21 via the communication unit 10f.
  • the remote control device 21 is disposed, for example, on a wall surface that forms a space to be air-conditioned by the air-conditioning system 20 (hereinafter referred to as an air-conditioned space). And it functions as an interface for receiving a command from the user.
  • the remote control device 21 includes a CPU 21a, a display unit 21b, an input unit 21c, a main storage unit 21d, an auxiliary storage unit 21e, and a communication unit 21f.
  • the display unit 21b has an LCD. And the information regarding the preset temperature acquired by communication with the air conditioner 22, the temperature (room temperature) of the space used as air conditioning object, an operation mode, etc. is displayed.
  • the input unit 21c is an interface composed of a key switch or a touch panel. An instruction from the user is input via the input unit 21c. Then, the CPU 21a is notified via the system bus 21g.
  • the main storage unit 21d has a nonvolatile memory such as DRAM or SRAM.
  • the main storage unit 21d is used as a work area for the CPU 21a.
  • the auxiliary storage unit 21e has a nonvolatile memory such as a magnetic disk or a flash memory.
  • the auxiliary storage unit 10e stores the operation program 105 output from the software generation device 10.
  • the communication unit 21f has, for example, a serial interface, a LAN interface, a wireless communication interface, and the like.
  • the remote control device 21 communicates with the software generation device 10 and the air conditioner 22 via the communication unit 21f.
  • the CPU 21a reads and executes the operation program 105 stored in the auxiliary storage unit 21e. Thereby, the operation information such as the set temperature, the set air volume, and the operation mode set by the command from the user is output to the air conditioner 22 via the communication unit 21f.
  • the display unit 21b of the remote control device 21 displays operation information such as a set temperature, a set air volume, and an operation mode.
  • the air conditioner 22 is disposed on, for example, a wall surface or a ceiling that forms a space to be air-conditioned by the air conditioning system 20. And the air conditioner 22 air-conditions an air-conditioned space. As shown in FIG. 1, the air conditioner 22 includes a storage unit 22a, an output control unit 22b, and a communication unit 22c.
  • the storage unit 22a has a nonvolatile memory such as a flash memory or a volatile memory such as an SRAM.
  • the storage unit 22a stores driving information received via the communication unit 22c.
  • the output control unit 22b reads the operation information stored in the storage unit 22a. Then, referring to the read operation information, a fan for discharging air conditioned air to the conditioned space, a louver for discharging conditioned air, an outdoor unit for exchanging heat with the outside air, and the like are driven. Thereby, the air conditioning of the air-conditioned space according to the content of the instruction from the user is executed.
  • the communication unit 22c has, for example, a serial interface or a wireless communication interface.
  • the air conditioner 22 communicates with the remote control device 21 via the communication unit 22c.
  • the CPU 10a reads a program for generating the operation program 105 from the auxiliary storage unit 10e and executes it.
  • step S201 the CPU 10a waits for an operation program generation command from the user.
  • step S201: Yes the CPU 10a proceeds to next step S202.
  • the CPU 10a reads the source code 102 stored in the auxiliary storage unit 10e. Then, as can be seen with reference to FIG. 4, the line number NM is added to the source code 102, and the source code 102 is expanded in the main storage unit 10d.
  • the CPU 10a executes a matching process for the source code 102 developed in the main storage unit 10d. Specifically, CPU 10a from the source code pattern P N constituting the dictionary information 101 stored in the auxiliary storage unit 10e, reads the first source code pattern P 1. Next, the character string constituting the source code pattern P 1 is compared with the character string constituting the source code 102.
  • CPU10a is a character string that constitutes the source code pattern P 1, if the character string constituting the source code 102 matches, the source code pattern P 1 is determined to be matching. For example, a character string constituting the source code pattern P 1 shown in FIG. 3, as seen with reference to FIG. 4, that match the string of source code 102 [004] from row to [007] row. In this case CPU10a, a source code pattern P 1 is determined to be matching.
  • CPU10a for the source code pattern P N from the source code pattern P 1, performs sequential aforementioned matching process.
  • FIG. 6 is a diagram schematically showing a control block information 103 N.
  • the control block information 103 N is composed of an identification number ID N and position information LD N assigned to the control block BC N.
  • Identification number ID N is a number for identifying the control blocks BC N associated with the source code pattern P N. This identification number ID N is, for example, a continuous number from the control block BC 1 to the control block BC N.
  • Position information LD N is in the source code 102 is information indicating the position of the source code pattern P N.
  • the position information of the source code pattern P 1 matched with the source code 102 is the last line number [004] and last line number for specifying the line numbers [004] to [007], as can be seen with reference to FIG. Contains information about row [007].
  • the position information LD N it is possible to determine the location of source code pattern P N is matched.
  • FIG. 7 is a diagram schematically showing a control block related information 104 N.
  • the control block related information 104 N includes the identification number ID N of the control block BC N associated with the matched source code pattern PN , and the position when matching with the source code 102.
  • the identification number ID i of the control block BC i associated with the source code pattern P i preceding the source code pattern P N and the position when matched with the source code 102 are behind this source code pattern P N It includes information on the identification number ID j of the control block BC j associated with the source code pattern P j .
  • control block related information 104 1 about the source code pattern P as seen with reference to FIG. 4, the identification number ID 1 control block BC 1 associated with the source code pattern P 1, the source code pattern P the identification number ID N1 of the source code pattern P N1 which matched in position in front of 1, including information regarding the identification number ID N1 Metropolitan source code pattern P N1 which matched in position behind the source code pattern P 1.
  • next step S206 it generates the conversion data CD and control block information 103 N, and a control block related information 104 N.
  • the conversion data CD, the control block BC N associated with the source code pattern P N which is matched to the source code 102 is arranged on the basis of the position information of the control block information 103 N It is data generated by this.
  • source code pattern P N1 source code pattern P 1 , source code pattern P 1 , source code pattern P N3 , source code pattern P N2 ,...
  • conversion data CD in which a control block BC N1 , a control block BC 1 , a control block BC N3 , a control block BC N2,.
  • FIG. 8 is a diagram showing a window W1 displayed on the display unit 10b.
  • CPU 10a is a control block BC N constituting the conversion data CD, displayed using the corresponding icon IC N.
  • the operator can visually understand and modify the operation program 105 generated based on the source code 102. For example, when changing the conversion data CD, the operator first selects and double-clicks a desired icon IC using a mouse or the like. As a result, a window W2 showing the contents of the source code 102 pops up. In this window W2, a character string corresponding to the icon IC double-clicked in the source code 102 is displayed with emphasis by a frame or a marker indicated by a dotted line.
  • the operator can correct the source code 102 by inserting a character string representing a desired command into the window W2. For example, as can be seen by referring to the window W2 in FIG. 9, a command for updating the operation mode is inserted between the temperature update command corresponding to the icon IC 1 and the air volume change command corresponding to the icon IC 2. Thus, a command for updating the operation mode can be added to the source code 102. In this case, as can be seen by referring to the window W1 in FIG. 9, a new icon IC NW corresponding to the added command is displayed between the icon IC 1 and the icon IC 2 . The operator can also change the source code 102 by inserting the icon IC NW between the icon IC 1 and the icon IC 2 .
  • the CPU 10a waits for an input from the above-described operator in the next step S208. If the source code 102 is changed (step S208: Yes), the process proceeds to step S209. Then, the conversion data CD is changed to correspond to the changed source code 102, and the process returns to step S207. Thereafter, the CPU 10a repeatedly executes the processes in steps S207 to S209 until the determination in step S208 is affirmed. As a result, the operator can correct or edit the source code 102 while checking the conversion data CD generated based on the latest source code 102.
  • step S208 when the correction of the source code 102 is completed by the operator and the final source code 102 is confirmed (step S208: No), the CPU 10a proceeds to step S210.
  • the converted data CD is, for example, those composed of 10 control block BC N.
  • Each control block is assumed to be one of a structure block, a calling block, a control block indicating a measurement start probe, a control block indicating a measurement end probe, and an access block.
  • the above-described structural block is a control block corresponding to the source code indicating the branch of the process or the loop operation of the process.
  • the calling block is a control block corresponding to source code indicating an operation for calling a process corresponding to another control block.
  • the measurement starting probe block is a control block indicated by the small circle icon IC S.
  • the measurement end probe block is a control block indicated by the small circle icon IC E.
  • the access block performs an access process to a specified address based on information such as an address for specifying a resource such as a memory or a file, a type of write data, and a data write destination or a read destination.
  • This is a control block corresponding to the source code indicating.
  • step S210 the CPU 10a executes a subroutine 300 shown in the flowchart of FIG. First, in the first step S301, the CPU 10a resets the counter n.
  • step S302 the CPU 10a increments the counter n.
  • step S303 CPU 10a, the control block BC N of the N-th constituting the converted data CD (1 th in this case), it is determined whether a structural block. Then, N-th control block BC N is, if a structural block (Step S303: Yes), the process proceeds to step S304.
  • CPU 10a based on the source code pattern P N associated with the control block BC N, generates a program for executing branch processing.
  • the branching process is to execute different processes depending on whether the condition is met or not.
  • step S303 determines whether the determination in step S303 is negative (step S303: No). If the determination in step S303 is negative (step S303: No), the CPU 10a proceeds to step S305.
  • step S305 CPU 10a, the control block BC N of the N-th constituting the converted data CD (1 th in this case), it is determined whether the calling block. Then, N-th control block BC N is, when a call block (Step S305: Yes), the process proceeds to the next step S306.
  • step S306 CPU 10a, based on the source code pattern P N associated with the control block BC N, generates a program for performing call processing.
  • the calling process is a process in which another process is executed first and the next process is performed after the process is completed.
  • step S305 determines whether the determination in step S305 is negative (step S305: No). If the determination in step S305 is negative (step S305: No), the CPU 10a proceeds to step S307.
  • step S307 CPU 10a, the control block BC N of the N-th constituting the converted data CD (1 th in this case), it is determined whether the measurement start probe block. Then, N-th control block BC N is, when a measurement start probe block (Step S307: Yes), the process proceeds to the next step S308.
  • step S308 CPU 10a, based on the source code pattern P N associated with the control block BC N, generates a program for starting processing of the measurement.
  • the measurement start process is a process for starting the measurement of elapsed time by a measurement start command.
  • step S307 determines whether the determination in step S307 is negative (step S307: No). If the determination in step S307 is negative (step S307: No), the CPU 10a proceeds to step S309.
  • step S309 CPU 10a, the control block BC N of the N-th constituting the converted data CD (1 th in this case), it is determined whether the measurement end probe block. Then, N-th control block BC N is, when a measurement end probe block (Step S309: Yes), the process proceeds to the next step S310.
  • step S310 CPU 10a, based on the source code pattern P N associated with the control block BC N, generates a program for performing termination processing of the measurement.
  • the measurement termination process is a process for terminating the measurement of elapsed time by a measurement termination command.
  • step S309 determines whether the determination in step S309 is negative (step 309: No). If the determination in step S309 is negative (step 309: No), the CPU 10a proceeds to step S311.
  • step S311 CPU 10a, based on the source code pattern P N associated with the control block BC N, generates a program for executing an access process.
  • the access process is a process of reading from a predetermined address in the memory and writing to a predetermined address in the memory.
  • step S312 the CPU 10a determines whether the counter n is smaller than a threshold value.
  • This threshold value is equivalent to the total number of control blocks constituting the conversion data CD, and is 10 here.
  • the CPU 10a returns to step S302, and thereafter repeatedly executes the processing from step S302 to S312 until the determination in step S312 is denied.
  • the program of the N from the control block BC N source code pattern P N which corresponds to that constitute the conversion data CD (10 pieces in this case) is generated.
  • step S312 No
  • the CPU 10a proceeds to the next step S313.
  • step S313 the CPU 10a generates the operation program 105 by aligning the N programs in series and associating the preceding and following programs with each other.
  • the CPU 10a ends the subroutine 300, and proceeds to step S211.
  • step S211 the CPU 10a outputs the operation program 105 to the remote control device 21 via the communication unit 10f.
  • the operation program 105 output to the remote control device 21 is output to the auxiliary storage unit 21e via the communication unit 21f constituting the remote control device 21.
  • the operation program 105 is installed in the remote control device 21.
  • CPU10a will complete
  • the CPU 21a configuring the remote control device 21 reads the operation program 105 from the auxiliary storage unit 21e and executes the operation program 105. In that case, CPU21a starts measurement of elapsed time by the measurement start command based on the measurement start probe of the driving program 105, and ends measurement of elapsed time by the measurement end command based on the measurement end probe. With this operation, the time (required time) required for the processing executed after the measurement start command is executed until the measurement end command is executed is measured. When measuring the required time, the CPU 21a outputs information related to the measurement result to the software generation apparatus 10 via the communication unit 21f.
  • FIG. 11 is a diagram schematically showing the operation constraint condition information 106.
  • the operation constraint condition information 106 includes information on the control block identification number ID S indicating the measurement start probe, the control block identification number ID E indicating the measurement end probe, and the time limit LM. Has been.
  • the CPU 10a specifies the measurement start command and the measurement end command from the identification number of the operation constraint condition information 106, and specifies the time limit from the execution of the measurement start command to the execution of the measurement end command. Then, the measurement result (required time) output from the remote control device 21 is compared with the time limit, and the comparison result is displayed on the display unit 10b.
  • FIG. 12 and 13 are diagrams showing the comparison results displayed on the display unit 10b.
  • the CPU 10a displays the window W3 shown in FIG. 12 on the display unit 10b to indicate that the processing by the remote control device 21 has been performed within the time limit. To do.
  • the CPU 10a displays the window W4 shown in FIG. 13 on the display unit 10b and confirms that the processing by the remote control device 21 has not been performed within the time limit. indicate.
  • the source code 102 for generating the operation program 105 is converted into the conversion data CD including the control block BC by performing the matching using the source code pattern P. . Then, the conversion data CD composed of the control block BC can be visually recognized by the icon IC defined corresponding to the control block BC. Therefore, the operator of the software generation apparatus 10 can visually grasp the contents of the source code 102.
  • a window for displaying the source code pattern P at a location related to the icon pops up.
  • the source code 102 can be created or edited by adding the source code to the window or deleting the source code displayed in the window. Therefore, the source code 102 can be created sensuously and easily, and the operation program 105 can be easily created.
  • the source code 102 is displayed by the arrangement of the icon ICs displayed on the display unit 10b.
  • the source code 102 can be created or edited by inserting a desired icon IC between these icon ICs or deleting unnecessary icons. Therefore, the source code 102 can be created sensuously and easily, and the operation program 105 can be easily created.
  • the time required when the operation program 105 is executed by the remote control device 21 is evaluated. Then, as can be seen with reference to FIGS. 12 and 13, for example, the evaluation result is displayed in a window popped up on the input screen. Thereby, the operator of the software generation apparatus 10 can visually grasp the load and the like of the remote control device 21. Therefore, the created operation program 105 can be easily verified.
  • the conversion data CD is created by matching the source code pattern P with the source code 102. Thereby, the conversion data CD can be generated also from the source code pattern generated by another device.
  • conversion data is generated by matching using the source code pattern P constituting the dictionary information. Therefore, for example, by using dictionary information corresponding to the use of the driving program 105, various driving programs 105 can be easily created.
  • the software generation device 10 is connected to the remote control device 21 via a communication line such as a LAN or a serial cable. For this reason, the operation program 105 can be easily verified.
  • the result of evaluating the time required for the remote control device 21 to execute the operation program 105 is displayed in, for example, the windows W3 and W4 shown in FIGS.
  • a window W5 for displaying a timeline for each process may be displayed.
  • the operation program 105 is uploaded to the remote control device 21 by communication between the software generation device 10 and the remote control device 21.
  • the operation program 105 generated by the software generation device 10 is installed in the remote control device 21 via a recording medium such as a CD (Compact Disc) or a USB (Universal Serial Bus) memory. Also good.
  • the line number NM is added when the source code 102 is expanded in the main storage unit 10d.
  • a file name or the like may be added thereto.
  • control block is one of a structure block, a calling block, a control block indicating a measurement start probe, a control block indicating a measurement end probe, and an access block.
  • the present invention is not limited to this, and matching may be performed using a control block related to a source code pattern corresponding to another process, if necessary.
  • the functions of the software generation device 10 according to the present embodiment can be realized by dedicated hardware.
  • the software generation device, software generation method, and program of the present invention are suitable for software generation.

Abstract

 ソースコードパターンを用いたマッチングを行うことにより、運転プログラム(105)を生成するためのソースコード(102)を、ソースコードパターンが関連付けられた制御ブロックからなる変換データに変換する。そして、この制御ブロックからなる変換データを、制御ブロックに対応して規定されたアイコンを用いて表示する。これにより、ソフトウエア生成装置(10)のオペレータは、視覚的にソースコード(102)の内容を把握することができる。

Description

ソフトウエア生成装置、ソフトウエア生成方法及びプログラム
 本発明は、ソフトウエア生成装置、ソフトウエア生成方法及びプログラムに関し、更に詳しくは、所定の制御装置によって実行されるソフトウエアを生成するソフトウエア生成装置、所定の制御装置によって実行されるソフトウエアを生成するためのソフトウエア生成方法及びプログラムに関する。
 空調設備に代表される設備機器は、居住区やワークエリアに分散配置された複数の機器を、コンピュータを用いて集中管理する運用形態のものが多い。この種の設備機器は消費電力が大きく、出力をこまめに調整することで、大きな省エネ効果が期待できる。そのため、設備機器の出力を調整するための運転プログラムは年々複雑化し、これにともない運転プログラムに関連するソースコードの量も増大している。
 運転プログラムを実行する過程で生じたエラーによる実害は、設備機器の用途によっては、著しく拡大することがある。このため、設備機器の運用に用いられるプログラムに起因するエラーの許容範囲は、例えば情報機器の運用に用いられるプログラムに起因するエラーの許容範囲に比べて狭い。したがって、設備機器の運転プログラムの製造には、大きなコストがかかるのが一般的である。
 そこで、設備機器の運転プログラムを、品質を維持しつつ低コストで作成するための開発支援装置が提案されている(例えば、特許文献1参照)。
特開2009-157751号公報
 特許文献1に開示された開発支援装置は、状態遷移情報の中から互いに排他性を有すべき状態遷移条件を抽出する。これにより、排他性を有すべき状態遷移条件が、実際に排他性を有しているか否かを容易に確認することが可能となる。そして、排他性を有していない状態遷移条件を、排他性を有するように漏れなく修正することができる。したがって、ソフトウエアが特定の処理を無限に繰り返す状態に陥ったり、無駄に多くのソースコードが生成されることを回避することができる。
 上述の開発支援装置を用いる場合には、オペレータが状態遷移情報や状態遷移条件を作成する必要がある。しかしながら、現状では、状態遷移情報や状態遷移条件を作成するスキルを持つ技術者が少ない。
 本発明は、上述の事情の下になされたもので、簡単な操作でプログラムを生成することを目的とする。
 上記目的を達成するために、本発明のソフトウエア生成装置は、
 ソフトウエアのソースコードの一部を構成する文字列からなり、予め規定された複数のブロックを、前記ソースコードにマッチングさせるマッチング手段と、
 前記ソースコードの前記ブロックがマッチングした部分を、マッチングした前記ブロックに置き換えることにより、前記ソースコードを前記ブロックからなるデータに変換する変換手段と、
 前記ブロックからなるデータに基づいて、前記ソフトウエアを生成する生成手段と、
 を備える。
 本発明によれば、ソフトウエアを生成するためのソースコードが、複数のブロックからなるデータに変換される。このため、ユーザは、あるブロックを所望のブロックに交換するか、或いはブロックの配列を変更することにより、ソフトウエアによる処理の内容や、処理の順序を変更することが可能となる。したがって、簡単な操作で所望のプログラムを生成することができる。
本発明の実施形態に係るソフトウエア生成装置を、空調システムとともに示すブロック図である。 ウィンドを示す図である。 辞書情報の構成を模式的に示す図である。 ソースコードと制御ブロックとの関係を模式的に示す図である。 CPUの動作を説明するためのフローチャートである。 制御ブロック情報を模式的に示す図である。 制御ブロック関連情報を模式的に示す図である。 表示部に表示されるウィンドを示す図である。 表示部に表示されるウィンドを示す図である。 CPUに実行されるサブルーチンを示すフローチャートである。 動作制約条件情報を模式的に示す図である。 表示部に表示された比較結果を示す図である。 表示部に表示された比較結果を示す図である。 本実施形態の変形例について説明するための図である。 本実施形態の変形例について説明するための図である。
 以下、本発明の一実施形態を、図面を参照しつつ説明する。図1は、本実施形態に係るソフトウエア生成装置10を、リモートコントロール装置21と空調装置22とを有する空調システム20とともに示すブロック図である。このソフトウエア生成装置10は、空調システム20によって実行される運転プログラム105を生成するための装置である。図1に示されるように、ソフトウエア生成装置10は、CPU(Central Processing Unit)10a、表示部10b、入力部10c、主記憶部10d、補助記憶部10e、及び通信ユニット10fを有している。
 表示部10bは、LCD(Liquid Crystal Display)又はCRT(Cathode Ray Tube)などを有している。図2には、運転プログラム105の生成を行う際に、ユーザインタフェーイスとして機能するウィンドW1が示されている。表示部10bは、CPU10aの指示に基づいて、ウィンドW1に代表される各種ウィンドを表示する。また、必要に応じて、CPU10aの処理結果等を表示する。
 入力部10cは、キーボードや、マウス或いはタッチパネル等のポインティングデバイスから構成されている。オペレータの指示は、この入力部10cを介して入力される。そして、システムバス10gを経由してCPU10aに通知される。
 主記憶部10dは、DRAM(Dynamic Random Access Memory)或いはSRAM(Static Random Access Memory)等の揮発性メモリを有している。この主記憶部10dは、CPU10aの作業領域として用いられる。
 補助記憶部10eは、磁気ディスク、フラッシュメモリ等の不揮発性メモリを有している。この補助記憶部10eには、辞書情報101、ソースコード102が記憶されている。
 図3は、辞書情報101の構成を模式的に示す図である。図3に示されるように、辞書情報101は、ソースコードパターンP、制御ブロックBC、及び制御ブロックBCの内容を表す制御内容情報CONから構成されている。
 ソースコードパターンPは、運転プログラム105によって実行される複数の処理のうちの単一の処理の内容を示すソースコードである。図3に示されるように、ソースコードパターンPは、ソースコードの記述に用いられる文字列(テキスト)から構成されている。例えば、ソースコードパターンPは、「関数名(引数1,引数2);」等の書式で表現される。
 例えば、運転プログラム105によって実行される複数の処理が、設定温度の読み出し、吐出空気の温度の設定、及び風量の設定の3つである場合は、この運転プログラム105のソースコードは、設定温度の読み出し処理を示すソースコードパターンと、吐出空気の温度の設定処理を示すソースコードパターンと、風量の設定処理を示すソースコードパターンの組み合わせで表現できることになる。
 通常は、数十種類のソースコードパターンを用いることで、10000行の文字列によって表現されるソースコードを、例えば100行程度の文字列或いは100個程度のアイコンで表示することが可能となる。
 制御ブロックBCは、各ソースコードパターンPに関連付けられている。この制御ブロックBCは、ソースコードパターンPを取り扱う際の概念である。ソフトウエア生成装置10では、この制御ブロックBCは当該制御ブロックBCの内容に応じたアイコンや画像で表される。
 制御内容情報CONは、制御ブロックBCの内容を識別するための情報である。この制御内容情報CONは、例えばソースコードパターンPと同等の内容を示している。そして、制御ブロックBCと関連した状態で取り扱われる。
 図1に戻り、ソースコード102は、運転プログラム105を生成する際に、元となるデータである。図4は、ソースコード102と、制御ブロックBCとの関係を模式的に示す図である。図4に示されるように、ソースコード102は、関数や引数を表す文字列によって記載されたデータである。
 図1に戻り、通信ユニット10fは、例えばシリアルインタフェースまたはLAN(Local Area Network)インタフェース等を含んで構成されている。ソフトウエア生成装置10は、通信ユニット10fを介して、リモートコントロール装置21と通信を行う。
 CPU10aは、補助記憶部10eに記憶されたソースコード102に基づいて、リモートコントロール装置21によって実行される運転プログラム105を生成する。そして、この運転プログラム105を、通信ユニット10fを介して、リモートコントロール装置21へ出力する。
 リモートコントロール装置21は、例えば空調システム20の空調対象となる空間(以下、空調空間という)を形成する壁面などに配置されている。そして、ユーザからの指令を受け付けるためのインタフェースとして機能する。図1に示されるように、リモートコントロール装置21は、CPU21a、表示部21b、入力部21c、主記憶部21d、補助記憶部21e、及び通信ユニット21fを有している。
 表示部21bは、LCDを有している。そして、空調装置22との通信によって取得した設定温度、空調対象となる空間の温度(室温)、運転モードなどに関する情報を表示する。
 入力部21cは、キースイッチ或いはタッチパネル等から構成されるインタフェースである。ユーザからの指示は、この入力部21cを介して入力される。そして、システムバス21gを経由してCPU21aに通知される。
 主記憶部21dは、DRAM或いはSRAM等の不揮発性メモリを有している。この主記憶部21dは、CPU21aの作業領域として用いられる。
 補助記憶部21eは、磁気ディスク、フラッシュメモリ等の不揮発性メモリを有している。この補助記憶部10eには、ソフトウエア生成装置10から出力された運転プログラム105が記憶される。
 通信ユニット21fは、例えばシリアルインタフェース、LANインタフェース、無線通信インタフェース等を有している。リモートコントロール装置21は、通信ユニット21fを介して、ソフトウエア生成装置10及び空調装置22と通信を行う。
 CPU21aは、補助記憶部21eに記憶された運転プログラム105を読み出して実行する。これにより、ユーザからの指令によって設定された設定温度、設定風量、運転モード等の運転情報が、通信ユニット21fを介して、空調装置22へ出力される。またリモートコントロール装置21の表示部21bには、設定温度、設定風量、運転モード等の運転情報が表示される。
 空調装置22は、例えば空調システム20の空調対象となる空間を形成する壁面或いは天井などに配置されている。そして、空調装置22は、空調空間の空調を行う。図1に示されるように、空調装置22は、記憶部22a、出力制御ユニット22b、及び通信ユニット22cを有している。
 記憶部22aは、フラッシュメモリ等の不揮発性メモリ、或いはSRAM等の揮発性メモリを有している。この記憶部22aには、通信ユニット22cを介して受信した運転情報が記憶される。
 出力制御ユニット22bは、記憶部22aに記憶された運転情報を読み出す。そして、読み出した運転情報を参照して、空調空間に空調した空気を吐出するためのファン、空調空気を吐出するためのルーバー、外気と熱交換を行う室外機等を駆動する。これにより、ユーザからの指示内容に応じた空調空間の空調が実行される。
 通信ユニット22cは、例えばシリアルインタフェース、或いは無線通信インタフェース等を有している。空調装置22は、通信ユニット22cを介して、リモートコントロール装置21と通信を行う。
 図5のフローチャートは、ソフトウエア生成装置10のCPU10aによって実行されるプログラムの一連のアルゴリズムに対応している。以下、図5を参照しつつ、ソフトウエア生成装置10の動作について説明する。ソフトウエア生成装置10が起動されると、CPU10aは、運転プログラム105を生成するためのプログラムを補助記憶部10eから読み出し実行する。
 最初のステップS201では、CPU10aは、ユーザからの運転プログラム生成指令を待ち受ける。入力部10cを介して、ユーザからの生成指令が入力されると(ステップS201:Yes)、CPU10aは、次のステップS202へ移行する。
 次のステップS202では、CPU10aは、補助記憶部10eに記憶されたソースコード102を読み出す。そして、図4を参照するとわかるように、ソースコード102に行番号NMを付加して、このソースコード102を主記憶部10dに展開する。
 次のステップS203では、CPU10aは、主記憶部10dに展開したソースコード102に対するマッチング処理を実行する。具体的には、CPU10aは、補助記憶部10eに記憶された辞書情報101を構成するソースコードパターンPから、最初のソースコードパターンPを読み出す。次に、ソースコードパターンPを構成する文字列と、ソースコード102を構成する文字列とを比較する。
 CPU10aは、ソースコードパターンPを構成する文字列と、ソースコード102を構成する文字列とが一致した場合に、ソースコードパターンPがマッチングしたと判断する。例えば図3に示されるソースコードパターンPを構成する文字列は、図4を参照するとわかるように、ソースコード102の[004]行目から[007]行目までの文字列と一致する。この場合にCPU10aは、ソースコードパターンPがマッチングしたと判断する。
 CPU10aは、ソースコードパターンPからソースコードパターンPについて、順次上述のマッチング処理を実行する。
 次のステップS204では、CPU10aは、マッチングしたソースコードパターンPについての制御ブロック情報103を生成する。図6は、制御ブロック情報103を模式的に示す図である。図6に示されるように、制御ブロック情報103は、制御ブロックBCに割り当てられた識別番号ID及び位置情報LDとから構成されている。
 識別番号IDは、ソースコードパターンPに関連付けられた制御ブロックBCを識別するための番号である。この識別番号IDは、例えば制御ブロックBCから制御ブロックBCまで連続する番号となる。
 位置情報LDは、ソースコード102における、ソースコードパターンPの位置を示す情報である。例えばソースコード102とマッチングしたソースコードパターンPの位置情報は、図4を参照するとわかるように、行番号[004]~[007]を特定するための先頭行の行番号[004]と最終行[007]に関する情報を含む。この位置情報LDにより、ソースコードパターンPがマッチングした位置を判断することができる。
 次のステップS205では、CPU10aは、マッチングしたソースコードパターンPについての制御ブロック関連情報104を生成する。図7は、制御ブロック関連情報104を模式的に示す図である。図7に示されるように、制御ブロック関連情報104は、マッチングしたソースコードパターンPに関連付けられた制御ブロックBCの識別番号IDと、ソースコード102とマッチングしたときの位置が、このソースコードパターンPの前にあるソースコードパターンPと関連付けられた制御ブロックBCの識別番号IDと、ソースコード102とマッチングしたときの位置が、このソースコードパターンPの後ろにあるソースコードパターンPと関連付けられた制御ブロックBCの識別番号IDとに関する情報を含む。
 例えば、ソースコードパターンPについての制御ブロック関連情報104は、図4を参照するとわかるように、ソースコードパターンPに関連付けられた制御ブロックBCの識別番号IDと、ソースコードパターンPの前の位置でマッチングしたソースコードパターンPN1の識別番号IDN1と、ソースコードパターンPの後ろの位置でマッチングしたソースコードパターンPN1の識別番号IDN1とに関する情報を含む。
 次のステップS206では、制御ブロック情報103と、制御ブロック関連情報104とから変換データCDを生成する。図4を参照するとわかるように、この変換データCDは、ソースコード102にマッチングしたソースコードパターンPに関連付けられた制御ブロックBCが、制御ブロック情報103の位置情報に基づいて配列されることにより生成されるデータである。
 例えば図4に示されるように、ソースコード102の先頭から末尾にかけて、順にソースコードパターンPN1、ソースコードパターンP、ソースコードパターンPN3、ソースコードパターンPN2、・・・が並んでいる場合には、制御ブロックBCN1、制御ブロックBC、制御ブロックBCN3、制御ブロックBCN2、・・・が順に配列された変換データCDが生成される。
 次のステップS207では、CPU10aは、変換データCDの内容を、表示部10bに表示する。図8は、表示部10bに表示されるウィンドW1を示す図である。図8に示されるように、CPU10aは、変換データCDを構成する制御ブロックBCを、対応するアイコンICを用いて表示する。
 これにより、オペレータは、ソースコード102に基づいて生成される運転プログラム105を視覚的に理解し、修正することが可能となる。例えば、オペレータが変換データCDを変更する場合には、まず所望のアイコンICを、マウス等を用いて選択しダブルクリックする。これにより、ソースコード102の内容を示すウィンドW2がポップアップする。このウィンドW2では、ソースコード102のうちダブルクリックされたアイコンICに対応する文字列が、点線で示されたフレームやマーカー等によって強調して表示される。
 オペレータは、ウィンドW2に所望のコマンドを表す文字列を挿入することで、ソースコード102を修正することができる。例えば、図9のウィンドW2を参照するとわかるように、アイコンICに対応する温度更新コマンドと、アイコンICに対応する風量変更コマンドとの間に、運転モードを更新するためのコマンドを挿入することで、ソースコード102に、運転モードを更新するコマンドを付加することができる。この場合には、図9のウィンドW1を参照するとわかるように、アイコンICとアイコンICとの間に、追加されたコマンドに対応する新たなアイコンICNWが表示される。また、オペレータは、アイコンICとアイコンICとの間に、アイコンICNWを挿入することによっても、ソースコード102を変更することができる。
 CPU10aは、次のステップS208で、上述したオペレータからの入力を待ち受ける。ここでソースコード102が変更された場合には(ステップS208:Yes)、ステップS209へ移行する。そして、変換データCDを、変更後のソースコード102に対応するように変更して、ステップS207へ戻る。以降、CPU10aは、ステップS208での判断が肯定されるまで、ステップS207~ステップS209の処理を繰り返し実行する。これにより、オペレータは、最新のソースコード102に基づいて生成された変換データCDを確認しつつ、ソースコード102の修正や編集が可能となる。
 一方、オペレータによってソースコード102の修正が終了し、最終的なソースコード102が確定した場合には(ステップS208:No)、CPU10aは、ステップS210へ移行する。
 なお、説明の便宜上、最終的に確定した変換データCDは、例えば10個の制御ブロックBCから構成されているものとする。また、各制御ブロックは構造ブロック、呼び出しブロック、計測開始プローブを示す制御ブロック、計測終了プローブを示す制御ブロック、及びアクセスブロックのうちのいずれかであるものとする。
 上述の構造ブロックは、処理の分岐や、処理のループ動作を示すソースコードに対応した制御ブロックである。また、呼び出しブロックは、別の制御ブロックに対応する処理を呼び出す動作を示すソースコードに対応した制御ブロックである。また、例えば図8に示されるように、計測開始プローブブロックは、小円形のアイコンICで示される制御ブロックである。そして、計測終了プローブブロックは、小円形のアイコンICで示される制御ブロックである。これらの制御ブロックは、計測開始プローブブロックと計測終了プローブブロックとの間に位置する制御ブロックで示される処理に要する時間を計測することを示すソースコードに対応した制御ブロックである。また、アクセスブロックは、メモリや、ファイルなどの資源を特定するためのアドレス、書き込みデータの種別、及びデータ書き込み先や読み込み先などの情報に基づいて、指定のアドレスへのアクセス処理を実行する動作を示すソースコードに対応した制御ブロックである。
 ステップS210では、CPU10aは図10のフローチャートで示されるサブルーチン300を実行する。まず、最初のステップS301では、CPU10aは、カウンタnをリセットする。
 次のステップS302では、CPU10aは、カウンタnをインクリメントする。
 次のステップS303では、CPU10aは、変換データCDを構成するN番目(ここでは1番目)の制御ブロックBCが、構造ブロックであるか否かを判断する。そして、N番目の制御ブロックBCが、構造ブロックである場合には(ステップS303:Yes)、次のステップS304へ移行する。
 次のステップS304では、CPU10aは、制御ブロックBCに関連するソースコードパターンPに基づいて、分岐処理を行うためのプログラムを生成する。ここで、分岐処理とは、条件に合致する場合と、条件に合致しない場合とで、相互に異なる処理を実行するものである。
 一方、ステップS303での判断が否定された場合には(ステップS303:No)、CPU10aは、ステップS305へ移行する。
 ステップS305では、CPU10aは、変換データCDを構成するN番目(ここでは1番目)の制御ブロックBCが、呼び出しブロックであるか否かを判断する。そして、N番目の制御ブロックBCが、呼び出しブロックである場合には(ステップS305:Yes)、次のステップS306へ移行する。
 ステップS306では、CPU10aは、制御ブロックBCに関連するソースコードパターンPに基づいて、呼び出し処理を行うためのプログラムを生成する。ここで、呼び出し処理とは、別の処理を先に実行し、その処理が完了した後に次の処理を行うものである。
 一方、ステップS305での判断が否定された場合には(ステップS305:No)、CPU10aは、ステップS307へ移行する。
 ステップS307では、CPU10aは、変換データCDを構成するN番目(ここでは1番目)の制御ブロックBCが、計測開始プローブブロックであるか否かを判断する。そして、N番目の制御ブロックBCが、計測開始プローブブロックである場合には(ステップS307:Yes)、次のステップS308へ移行する。
 ステップS308では、CPU10aは、制御ブロックBCに関連するソースコードパターンPに基づいて、計測の開始処理を行うためのプログラムを生成する。ここで、計測開始処理とは、計測開始コマンドによって、経過時間の計測を開始する処理である。
 一方、ステップS307での判断が否定された場合には(ステップS307:No)、CPU10aは、ステップS309へ移行する。
 ステップS309では、CPU10aは、変換データCDを構成するN番目(ここでは1番目)の制御ブロックBCが、計測終了プローブブロックであるか否かを判断する。そして、N番目の制御ブロックBCが、計測終了プローブブロックである場合には(ステップS309:Yes)、次のステップS310へ移行する。
 ステップS310では、CPU10aは、制御ブロックBCに関連するソースコードパターンPに基づいて、計測の終了処理を行うためのプログラムを生成する。ここで、計測の終了処理とは、計測終了コマンドによって、経過時間の計測を終了する処理である。
 一方、ステップS309での判断が否定された場合には(ステップ309:No)、CPU10aは、ステップS311へ移行する。
 ステップS311では、CPU10aは、制御ブロックBCに関連するソースコードパターンPに基づいて、アクセス処理を行うためのプログラムを生成する。ここで、アクセス処理とは、メモリの所定のアドレスからの読み込み、メモリの所定のアドレスへの書き込みを行う処理である。
 上述したステップS304,S306,S308,S310,S311での処理が終了すると、CPU10aは、次のステップS312へ移行する。
 ステップS312では、CPU10aは、カウンタnが閾値より小さいか否かを判断する。なお、この閾値は、変換データCDを構成する制御ブロックの総数と等価であり、ここでは10である。カウンタnの値が閾値より小さい場合には(ステップS312:Yes)、CPU10aは、ステップS302に戻り、以降、ステップS312での判断が否定されるまで、ステップS302~S312までの処理を繰り返し実行する。これにより、変換データCDを構成する制御ブロックBCに対応したソースコードパターンPからN個(ここでは10個)のプログラムが生成される。
 一方、カウンタnが閾値以上になった場合には(ステップS312:No)、CPU10aは、次のステップS313へ移行する。
 ステップS313では、CPU10aは、N個のプログラムを直列に整列させるとともに、前後のプログラム同士を関連付けることで、運転プログラム105を生成する。そして、ステップS313で運転プログラム105を生成すると、CPU10aは、サブルーチン300を終了し、ステップS211へ移行する。
 ステップS211では、CPU10aは、通信ユニット10fを介して、運転プログラム105をリモートコントロール装置21へ出力する。リモートコントロール装置21へ出力された運転プログラム105は、リモートコントロール装置21を構成する通信ユニット21fを介して、補助記憶部21eに出力される。これにより、リモートコントロール装置21へ、運転プログラム105がインストールされる。
 CPU10aは、ステップS211の処理が完了すると運転プログラム105を生成するための処理を終了する。
 次に、運転プログラム105がインストールされたリモートコントロール装置21の動作について説明する。
 運転プログラム105がインストールされると、リモートコントロール装置21を構成するCPU21aは、補助記憶部21eから運転プログラム105を読み出して、当該運転プログラム105を実行する。その際に、CPU21aは、運転プログラム105の計測開始プローブに基づく計測開始コマンドによって、経過時間の計測を開始し、計測終了プローブに基づく計測終了コマンドによって、経過時間の計測を終了する。この動作により、計測開始コマンドが実行されてから、計測終了コマンドが実行されるまでの間に実行された処理に要した時間(所要時間)が計測される。CPU21aは、所要時間を計測すると、当該計測結果に関する情報を、通信ユニット21fを介して、ソフトウエア生成装置10へ出力する。
 ソフトウエア生成装置10のCPU10aは、計測結果に関する情報を受信すると、この計測結果を、動作制約条件情報106と比較する。図11は、動作制約条件情報106を模式的に示す図である。図11に示されるように、動作制約条件情報106は、計測開始プローブを示す制御ブロックの識別番号IDと、計測終了プローブを示す制御ブロック識別番号IDと、制限時間LMとに関する情報から構成されている。
 CPU10aは、この動作制約条件情報106の識別番号から計測開始コマンド及び計測終了コマンドを特定し、計測開始コマンドを実行してから計測終了コマンドを実行するまでの制限時間を特定する。そして、リモートコントロール装置21から出力された計測結果(所要時間)と制限時間とを比較して、比較結果を表示部10bに表示する。
 図12及び図13は、表示部10bに表示された比較結果を示す図である。例えば、CPU10aは、計測結果が制限時間よりも短い場合には、表示部10bに図12に示されるウィンドW3を表示して、リモートコントロール装置21による処理が制限時間内に行われたことを表示する。一方、CPU10aは、計測結果が制限時間よりも長い場合には、表示部10bに図13に示されるウィンドW4を表示して、リモートコントロール装置21による処理が制限時間内に行われなかったことを表示する。
 以上説明したように、本実施形態では、ソースコードパターンPを用いたマッチングが行われることにより、運転プログラム105を生成するためのソースコード102が、制御ブロックBCからなる変換データCDに変換される。そして、この制御ブロックBCからなる変換データCDが、制御ブロックBCに対応して規定されたアイコンICによって視認可能となる。したがって、ソフトウエア生成装置10のオペレータは、視覚的にソースコード102の内容を把握することができる。
 本実施形態では、表示部10bに表示されるアイコンICを操作することにより、当該アイコンに関連する箇所のソースコードパターンPを表示するウィンドがポップアップする。そして、このウィンドにソースコードを追記したり、ウィンドに表示されたソースコードを削除することで、ソースコード102を作成し、或いは編集することができる。したがって、ソースコード102を感覚的かつ容易に作成することができ、ひいては運転プログラム105を容易に作成することが可能となる。
 本実施形態では、表示部10bに表示されるアイコンICの配列によって、ソースコード102が表示される。そして、これらのアイコンICの間に所望のアイコンICを挿入したり、不要なアイコンを削除することで、ソースコード102を作成し、或いは編集することができる。したがって、ソースコード102を感覚的かつ容易に作成することができ、ひいては運転プログラム105を容易に作成することが可能となる。
 本実施形態では、リモートコントロール装置21で運転プログラム105を実行したときに要した時間が評価される。そして、例えば図12及び図13を参照するとわかるように、入力画面にポップアップしたウィンドに、評価結果が表示される。これにより、ソフトウエア生成装置10のオペレータは、リモートコントロール装置21の負荷等を視覚的に把握することがでる。したがって、作成した運転プログラム105を容易に検証することができる。
 本実施形態では、ソースコード102に対して、ソースコードパターンPをマッチングさせることによって、変換データCDが作成される。これにより、他の装置によって生成されたソースコードパターンからも変換データCDを生成することができる。
 本実施形態では、辞書情報を構成するソースコードパターンPを用いたマッチングにより、変換データが生成される。したがって、例えば運転プログラム105の用途に応じた辞書情報を用いることで、種々の運転プログラム105を容易に作成することが可能となる。
 本実施形態では、ソフトウエア生成装置10は、LAN、シリアルケーブル等の通信線を介して、リモートコントロール装置21に接続されている。このため、運転プログラム105の検証等を容易に行うことができる。
 以上、本発明の実施形態について説明したが、本発明は上記実施形態によって限定されるものではない。例えば上記実施形態では、図4を参照するとわかるように、ソースコード102のすべてが、辞書情報101を構成するソースコードパターンPに置き換えられた場合について説明した。しかしながら、図14に示されるように、例えば[004]行目から[0007]行目までのソースコードで規定されるソースコードパターンPが存在しないことも考えられる。この場合には、CPU10aは、[004]行目から[0007]行目までのソースコードを内容とする制御ブロックBCを新たに定義する。そして、この制御ブロックBCを含む制御ブロック群で変換データCDを生成する。これにより、ソースコード102を制御ブロックからなる変換データCDに変換することができ、同様にアイコンICの配列として表示することができる。
 本実施形態では、リモートコントロール装置21が運転プログラム105を実行するのに要する時間を評価した結果が、例えば図12及び図13に示されるウィンドW3,W4で表示されることとした。これに代えて、例えば、図15に示されるように、処理ごとのタイムラインを表示するウィンドW5を表示することとしてもよい。また、ウィンドW5に、所定の処理が制限時間内に完結しているか否かを示すテキストを表示することとしてもよい。これにより、タイムラインによって、処理時間を視覚的に把握するとともに、テキストによる情報によって、処理時間の評価結果を正確に確認することができる。
 本実施形態では、ソフトウエア生成装置10とリモートコントロール装置21との間の通信によって、運転プログラム105がリモートコントロール装置21にアップロードされることとした。これに限らず、ソフトウエア生成装置10によって生成された運転プログラム105を、例えばCD(Compact Disc)や、USB(Universal Serial Bus)メモリ等の記録媒体を介して、リモートコントロール装置21へインストールしてもよい。
 本実施形態では、ソースコード102を主記憶部10dに展開するときに、行番号NMを付加したが、これに加えて例えばファイル名等を付加することとしてもよい。
 本実施形態では、ソフトウエア生成装置10を用いて、空調システム20に実行される運転プログラム105を生成する場合について説明した。これに限らず、ソフトウエア生成装置10を用いることで、照明装置など種々の設備機器に使用される運転プログラム105を生成することができる。
 本実施形態では、制御ブロックが、構造ブロック、呼び出しブロック、計測開始プローブを示す制御ブロック、計測終了プローブを示す制御ブロック、及びアクセスブロックのうちのいずれかであるものとした。これに限らず、必要に応じて、他の処理に応じたソースコードパターンと関連する制御ブロックを用いて、マッチングを行うこととしてもよい。
 本実施形態に係るソフトウエア生成装置10の機能は、専用のハードウェアによっても実現することができる。
 本発明は、本発明の広義の精神と範囲を逸脱することなく、様々な実施形態及び変形が可能とされるものである。また、上述した実施形態は、本発明を説明するためのものであり、本発明の範囲を限定するものではない。つまり、本発明の範囲は、実施形態ではなく、特許請求の範囲によって示される。そして、特許請求の範囲内及びそれと同等の発明の意義の範囲内で施される様々な変形が、本発明の範囲内とみなされる。
 本出願は、2010年10月4日に出願された、日本国特許出願2010-225244号に基づく。本明細書中に日本国特許出願2010-225244号の明細書、特許請求の範囲、図面全体を参照して取り込むものとする。
 本発明のソフトウエア生成装置、ソフトウエア生成方法、及びプログラムは、ソフトウエアの生成に適している。
 10 ソフトウエア生成装置
 10a CPU
 10b 表示部
 10c 入力部
 10d 主記憶部
 10e 補助記憶部
 10f 通信ユニット
 10g システムバス
 20 空調システム
 21 リモートコントロール装置
 21a CPU
 21b 表示部
 21c 入力部
 21d 主記憶部
 21e 補助記憶部
 21f 通信ユニット
 21g システムバス
 22 空調装置
 22a 記憶部
 22b 出力制御ユニット
 22c 通信ユニット
 101 辞書情報
 102 ソースコード
 103 制御ブロック情報
 104 制御ブロック関連情報
 105 運転プログラム
 106 動作制約条件情報
 BC 制御ブロック
 CD 変換データ
 CON 制御内容情報
 DC 変換データ
 IC アイコン
 ID 識別番号
 LD 位置情報
 NM 行番号
 P ソースコードパターン

Claims (11)

  1.  ソフトウエアのソースコードの一部を構成する文字列からなり、予め規定された複数のブロックを、前記ソースコードにマッチングさせるマッチング手段と、
     前記ソースコードの前記ブロックがマッチングした部分を、マッチングした前記ブロックに置き換えることにより、前記ソースコードを前記ブロックからなるデータに変換する変換手段と、
     前記ブロックからなるデータに基づいて、前記ソフトウエアを生成する生成手段と、
     を備えるソフトウエア生成装置。
  2.  前記ブロックからなるデータを、前記ブロックに対応したグラフィックの配列として表示する表示手段を備える請求項1に記載のソフトウエア生成装置。
  3.  前記グラフィックはアイコンである請求項2に記載のソフトウエア生成装置。
  4.  前記グラフィックの配列を変更するためのインタフェースを備え、
     前記生成手段は、変更された前記グラフィックの配列に対応した前記ブロックの配列によって規定されるデータに基づいて、前記ソフトウエアを生成する請求項3に記載のソフトウエア生成装置。
  5.  前記表示手段は、
     前記ソフトウエアを所定の機器に実行させたときに、前記ソフトウエアによって規定される特定の処理が完了するまでの所要時間と、予め設定された制限時間とを比較した結果を表示する請求項1乃至4のいずれか一項に記載のソフトウエア生成装置。
  6.  前記機器に、通信回線を介して、前記ソフトウエアをアップロードする通信手段を備える請求項5に記載のソフトウエア生成装置。
  7.  前記ブロックと、前記ソースコードの一部を構成する文字列との対応を示す辞書データを記憶する記憶手段を備え、
     前記マッチング手段は、前記辞書データに基づいて、前記ブロックを前記ソースコードにマッチングさせる請求項1乃至6のいずれか一項に記載のソフトウエア生成装置。
  8.  ソフトウエアのソースコードの一部を構成する文字列からなり、予め規定された複数のブロックを、前記ソースコードにマッチングさせる工程と、
     前記ソースコードの前記ブロックがマッチングした部分を、マッチングした前記ブロックに置き換えることにより、前記ソースコードを前記ブロックからなるデータに変換する工程と、
     前記ブロックからなるデータに基づいて、前記ソフトウエアを生成する工程と、
     を備えるソフトウエア生成方法。
  9.  前記データを、前記ブロックに対応したグラフィックの配列として表示する工程を含む請求項8に記載のソフトウエア生成方法。
  10.  コンピュータに、
     ソフトウエアのソースコードの一部を構成する文字列からなり、予め規定された複数のブロックを、前記ソースコードにマッチングさせる手順と、
     前記ソースコードの前記ブロックがマッチングした部分を、マッチングした前記ブロックに置き換えることにより、前記ソースコードを前記ブロックからなるデータに変換する手順と、
     前記ブロックからなるデータに基づいて、前記ソフトウエアを生成する手順と、
     を実行させるプログラム。
  11.  前記データを、前記ブロックに対応したグラフィックの配列として表示する手順を更に実行させる請求項10に記載のプログラム。
PCT/JP2011/051526 2010-10-04 2011-01-26 ソフトウエア生成装置、ソフトウエア生成方法及びプログラム WO2012046460A1 (ja)

Priority Applications (5)

Application Number Priority Date Filing Date Title
US13/876,537 US20130185695A1 (en) 2010-10-04 2011-01-26 Software generation device, software generation method and program
KR1020137008706A KR101565666B1 (ko) 2010-10-04 2011-01-26 소프트웨어 생성 장치, 소프트웨어 생성 방법 및 프로그램 기억매체
CN2011800480446A CN103154886A (zh) 2010-10-04 2011-01-26 软件生成装置、软件生成方法以及程序
JP2012537597A JPWO2012046460A1 (ja) 2010-10-04 2011-01-26 ソフトウエア生成装置
EP11830394.0A EP2626783A4 (en) 2010-10-04 2011-01-26 SOFTWARE GENERATING DEVICE, SOFTWARE GENERATING METHOD, AND PROGRAM

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010225244 2010-10-04
JP2010-225244 2010-10-04

Publications (1)

Publication Number Publication Date
WO2012046460A1 true WO2012046460A1 (ja) 2012-04-12

Family

ID=45927462

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/051526 WO2012046460A1 (ja) 2010-10-04 2011-01-26 ソフトウエア生成装置、ソフトウエア生成方法及びプログラム

Country Status (6)

Country Link
US (1) US20130185695A1 (ja)
EP (1) EP2626783A4 (ja)
JP (1) JPWO2012046460A1 (ja)
KR (1) KR101565666B1 (ja)
CN (1) CN103154886A (ja)
WO (1) WO2012046460A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016206962A (ja) * 2015-04-23 2016-12-08 株式会社明電舎 ソフトウェア開発支援システム、ソフトウェア開発支援方法

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101597780B1 (ko) 2014-05-22 2016-02-25 황수진 소프트웨어 코드의 시각적 구현 방법 및 장치
KR102067431B1 (ko) * 2017-12-27 2020-02-11 슈어소프트테크주식회사 소스코드 표시장치, 소스코드 표시방법 및 이를 실행하기 위한 프로그램을 기록한 컴퓨터로 판독가능한 기록매체

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6379176A (ja) * 1986-09-24 1988-04-09 Central Res Inst Of Electric Power Ind デイスプレイ上の設計画面より入力した設計仕様から部品を組合せてプログラムを自動生成する方法
JP2003058370A (ja) * 2001-08-10 2003-02-28 Alpha:Kk ソースコード生成システム
JP2005004411A (ja) * 2003-06-11 2005-01-06 Hitachi Ltd システム開発方法、および、システム開発支援プログラム

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
BE758981A (fr) * 1969-11-14 1971-05-17 Westinghouse Electric Corp Systeme de controle des erreurs de fonctionnement d'un processus industriel
JP2765969B2 (ja) * 1989-07-31 1998-06-18 株式会社日立製作所 図式データ駆動型プログラム開発支援装置
US6480891B1 (en) * 1999-01-04 2002-11-12 3Com Corporation Embedded code memory size reduction in asynchronous mode transfer devices
US20040034846A1 (en) * 2002-06-12 2004-02-19 I-Logix Inc. System, method and medium for providing dynamic model-code associativity
WO2006082878A1 (ja) * 2005-02-03 2006-08-10 Mitsubishi Denki Kabushiki Kaisha プログラムコード生成支援装置及び方法、プログラム実行装置及び方法並びにプログラムコード圧縮処理装置及び方法並びにそれらのプログラム
US7954059B2 (en) * 2006-07-24 2011-05-31 National Instruments Corporation Automatic conversion of text-based code having function overloading and dynamic types into a graphical program for compiled execution
JP4971096B2 (ja) * 2007-10-12 2012-07-11 株式会社野村総合研究所 コーディング支援装置
US20100138811A1 (en) * 2008-12-02 2010-06-03 Qualcomm Incorporated Dynamic Performance Profiling
JP2010176557A (ja) * 2009-01-30 2010-08-12 Casio Computer Co Ltd アプリケーションソフトウェア生成装置、プログラム及びアプリケーションソフトウェア生成システム

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6379176A (ja) * 1986-09-24 1988-04-09 Central Res Inst Of Electric Power Ind デイスプレイ上の設計画面より入力した設計仕様から部品を組合せてプログラムを自動生成する方法
JP2003058370A (ja) * 2001-08-10 2003-02-28 Alpha:Kk ソースコード生成システム
JP2005004411A (ja) * 2003-06-11 2005-01-06 Hitachi Ltd システム開発方法、および、システム開発支援プログラム

Non-Patent Citations (1)

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

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2016206962A (ja) * 2015-04-23 2016-12-08 株式会社明電舎 ソフトウェア開発支援システム、ソフトウェア開発支援方法

Also Published As

Publication number Publication date
CN103154886A (zh) 2013-06-12
JPWO2012046460A1 (ja) 2014-02-24
US20130185695A1 (en) 2013-07-18
EP2626783A4 (en) 2015-10-28
KR20130065706A (ko) 2013-06-19
EP2626783A1 (en) 2013-08-14
KR101565666B1 (ko) 2015-11-03

Similar Documents

Publication Publication Date Title
US9176490B2 (en) Control program generation device, control program generation program, and control program generation method
JP5649590B2 (ja) 空気調和システムの管理装置
US20100179794A1 (en) Multi-variable control-based optimization to achieve target goal
US20150347671A1 (en) Fuse multiple drawings into an equipment (bim) model
WO2012046460A1 (ja) ソフトウエア生成装置、ソフトウエア生成方法及びプログラム
US11416302B2 (en) Computer system and method for determining of resource allocation
CN115599437A (zh) 一种软件版本的处理方法、装置、电子设备及存储介质
US20220035327A1 (en) Method and system for retrieving building automation system controller information using near field communication
KR101537467B1 (ko) 도면 편집 영역 확장 방법 및 시스템
JP4597716B2 (ja) 空調機シミュレーター、空調機シミュレーションシステムおよび空調機シミュレーションプログラム
CN103069353A (zh) 设备管理装置、画面显示方法以及记录介质
CN103443721A (zh) Plc设计装置
JP4699957B2 (ja) 換気設備プラン作成システム
US20210381709A1 (en) System and method for commissioning fresh air intake control
JP7237173B2 (ja) 機器管理装置及びソフトウェア生成方法
JP2006215872A (ja) 家電機器アダプタの制御ソフトウェア開発方法及び開発装置
JP6366811B2 (ja) 検査装置、検査方法、及び、プログラム
JP7110878B2 (ja) 空気調和機用コントローラ
JP4746418B2 (ja) レーダ情報処理装置、レーダ画面表示プログラム
JP2015049535A (ja) 省エネルギー技術提案装置、省エネルギー技術提案方法、及びプログラム
US20210318343A1 (en) Validation device, validation method and validation program
JP2007188191A (ja) 配管計装アイソメ図表示装置、配管計装アイソメ図表示システムおよび配管計装アイソメ図表示方法
JP7237029B2 (ja) 監視制御装置
CN115237396A (zh) 一种动态表单构建方法、构建装置、计算机设备和介质
CN109918727B (zh) 多仿真场景动态管理方法

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201180048044.6

Country of ref document: CN

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

Ref document number: 11830394

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2012537597

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 13876537

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20137008706

Country of ref document: KR

Kind code of ref document: A

REEP Request for entry into the european phase

Ref document number: 2011830394

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2011830394

Country of ref document: EP