JP2016201009A - Source code generation system, source code generation apparatus, source code generation method, and program - Google Patents

Source code generation system, source code generation apparatus, source code generation method, and program Download PDF

Info

Publication number
JP2016201009A
JP2016201009A JP2015081441A JP2015081441A JP2016201009A JP 2016201009 A JP2016201009 A JP 2016201009A JP 2015081441 A JP2015081441 A JP 2015081441A JP 2015081441 A JP2015081441 A JP 2015081441A JP 2016201009 A JP2016201009 A JP 2016201009A
Authority
JP
Japan
Prior art keywords
source code
item
processing
exception
generation unit
Prior art date
Legal status (The legal status 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 status listed.)
Granted
Application number
JP2015081441A
Other languages
Japanese (ja)
Other versions
JP6482362B2 (en
Inventor
勇人 金井
Hayato Kanai
勇人 金井
克浩 吉岡
Katsuhiro Yoshioka
克浩 吉岡
畠山 剛
Takeshi Hatakeyama
剛 畠山
薫 井元
Kaoru Imoto
薫 井元
正実 岩橋
Masami Iwahashi
正実 岩橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Mitsubishi Electric Corp
Mitsubishi Electric Mechatronics Software Corp
Original Assignee
Mitsubishi Electric Corp
Mitsubishi Electric Mechatronics Software Corp
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 Mitsubishi Electric Corp, Mitsubishi Electric Mechatronics Software Corp filed Critical Mitsubishi Electric Corp
Priority to JP2015081441A priority Critical patent/JP6482362B2/en
Publication of JP2016201009A publication Critical patent/JP2016201009A/en
Application granted granted Critical
Publication of JP6482362B2 publication Critical patent/JP6482362B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To automatically generate all source codes representing exception handling which occurs during operation.SOLUTION: A source code generation system includes: a processing item list storage unit 1071 which stores a processing item list 107; a behavior description information storage unit 1081 which stores behavior description information 108; a behavior description generation unit 501 which generates a source code defining a class; an operation generation unit 502 which generates a source code defining an operation; an exception description generation unit 503 which generates a source code representing exception handling which occurs during the operation; a condition description generation unit 504 which generates a source code representing conditional branching of the operation; and a processing description generation unit 505 which generates a source code representing processing content of the operation.SELECTED DRAWING: Figure 1

Description

本発明は、ソースコード生成システム、ソースコード生成装置、ソースコード生成方法及びプログラムに関する。   The present invention relates to a source code generation system, a source code generation device, a source code generation method, and a program.

代表的なモデル記述言語であるUML(Unified Modeling Language)では、静的モデルとしてクラス図、動的モデルとして状態遷移図、シーケンス図、アクティビティ図などがある。標準で規定されているのは、個々の図で利用するモデル要素、すなわちクラスの箱や状態の書き方、条件の書き方のみであり、記載する内容や図間の整合性などは設計者に委ねられている。   In UML (Unified Modeling Language), which is a typical model description language, there are a class diagram as a static model, a state transition diagram, a sequence diagram, and an activity diagram as a dynamic model. The standard specifies only the model elements used in individual diagrams, that is, how to write class boxes and states, and how to write conditions. The contents to be described and the consistency between diagrams are left to the designer. ing.

組込み製品においては、センサ、ディスプレイ等のハードウェア機器上で発生する故障、異常等の「例外」事象に対応したソフトウェアの例外処理が重要であるが、UMLでの記載方法は定まっていない。
また、ユースケ―ス分析において、ユースケース記述の中のシナリオの1つとしてユースケース図が記述される場合がある。しかし、ユースケース図は要求レベルの形式化されていないテキストであるため、コード生成するには、詳細設計レベルの設計情報との紐付けとコード生成の作り込みが必要であり、作成に時間がかかっている。
In an embedded product, software exception handling corresponding to an “exception” event such as a failure or abnormality occurring on a hardware device such as a sensor or a display is important, but a description method in UML has not been determined.
In use case analysis, a use case diagram may be described as one of the scenarios in the use case description. However, because use case diagrams are unformatted text at the required level, code generation requires linkage with design information at the detailed design level and creation of code generation. It depends.

また、機能実行中の割込みに対応して「処理の優先度」に応じた実行制御を行う必要があり、一般的には、タスクの競合分析により、タスク単位で競合関係をマトリクスで整理する場合がある。タスクは、ソフトウェア設計レベルのデータであり、例外処理と同様に、詳細設計レベルの設計情報との紐付けとコード生成の作り込みが必要である。   In addition, it is necessary to perform execution control according to the "processing priority" corresponding to the interrupt during function execution. Generally, when competing relations are organized in units of tasks by task conflict analysis There is. The task is data at the software design level, and it is necessary to link with the design information at the detailed design level and to create a code as in the exception processing.

特許文献1では、例外処理を定義して、自動的にソースコードに埋め込むことが可能である。
また、特許文献2では、階層化された機能項目ごとに、優先順位を記入するようにして、その実行優先順位情報に基づいて、ソースコードを実行することが可能である。
In Patent Document 1, exception processing can be defined and automatically embedded in the source code.
Further, in Patent Document 2, it is possible to execute the source code based on the execution priority information by entering the priority for each hierarchical function item.

特開2007−094922号公報JP 2007-094922 A 特開2012−252555号公報JP 2012-252555 A

特許文献1では、状態遷移図をインプットとして、定義された状態以外になった場合の1つの条件分岐文、すなわちifに対するelseなどを出力することができるが、複数パターンの例外処理の分岐を出力することはできないという課題があった。   In Patent Document 1, a state transition diagram can be used as an input to output one conditional branch statement in the case of a state other than the defined state, that is, “else” for if, etc. There was a problem that we could not do it.

本発明では、すべての例外事象の条件分岐を表すソースコードを出力することを目的とする。   An object of the present invention is to output source code representing conditional branches of all exception events.

本発明に係るソースコード生成システムは、
処理の項目を表す処理項目と、前記処理項目に含まれる操作を表す操作情報と、例外処理を表す例外処理情報とを含む処理項目リストを記憶する処理項目リスト記憶部と、
前記処理項目リストに基づいて記述された前記処理項目の振舞いを記述する振舞い記述情報を記憶する振舞い記述情報記憶部と、
前記処理項目を用いて、クラスを定義するソースコードを生成する振舞い記述生成部と、
前記操作情報を用いて、前記操作を定義するソースコードを生成する操作生成部と、
前記例外処理情報を用いて、前記操作の実行中に発生する前記例外処理を表すソースコードを生成する例外記述生成部と、
前記振舞い記述情報を用いて、前記操作の条件分岐を表すソースコードを生成する条件記述生成部と、
前記振舞い記述情報を用いて、前記操作の処理内容を表すソースコードを生成する処理記述生成部とを備える。
A source code generation system according to the present invention includes:
A process item list storage unit that stores a process item list that includes a process item that represents a process item, operation information that represents an operation included in the process item, and exception process information that represents an exception process;
A behavior description information storage unit that stores behavior description information that describes the behavior of the processing item described based on the processing item list;
A behavior description generator for generating a source code defining a class using the processing items;
Using the operation information, an operation generation unit that generates a source code that defines the operation;
Using the exception handling information, an exception description generator for generating source code representing the exception handling that occurs during execution of the operation;
Using the behavior description information, a condition description generation unit that generates a source code representing a conditional branch of the operation;
A processing description generating unit that generates source code representing the processing content of the operation using the behavior description information;

本発明に係るソースコード生成システムは、処理項目と操作情報と例外処理情報とを含む処理項目リストを記憶する処理項目リスト記憶部と、処理項目リストに基づいて記述された処理項目の振舞いを記述する振舞い記述情報を記憶する振舞い記述情報記憶部と、処理項目を用いて、クラスを定義するソースコードを生成する振舞い記述生成部と、操作情報を用いて、操作を定義するソースコードを生成する操作生成部と、例外処理情報を用いて、操作の実行中に発生する例外処理を表すソースコードを生成する例外記述生成部とを備えるので、操作時に発生する例外処理を表すソースコードを生成することができる。   A source code generation system according to the present invention describes a processing item list storage unit that stores a processing item list including processing items, operation information, and exception processing information, and describes the behavior of the processing items described based on the processing item list A behavior description information storage unit for storing behavior description information to be generated, a behavior description generation unit for generating a source code for defining a class using process items, and a source code for defining an operation using operation information Since it includes an operation generation unit and an exception description generation unit that generates source code representing exception processing that occurs during execution of an operation using exception processing information, source code that represents exception processing that occurs during an operation is generated be able to.

実施の形態1に係るソースコード生成システム800のブロック構成図。1 is a block configuration diagram of a source code generation system 800 according to Embodiment 1. FIG. 実施の形態1に係るソースコード生成システム800における仕様記述からソースコード生成までの流れを示す図。FIG. 3 is a diagram showing a flow from specification description to source code generation in the source code generation system 800 according to the first embodiment. 実施の形態1に係る物理項目リスト102の具体例及び作成の手順を示す図。The figure which shows the specific example of the physical item list | wrist 102 which concerns on Embodiment 1, and the procedure of preparation. 実施の形態1に係る物理項目の振舞い記述104の具体例及び作成の手順を示す図。The figure which shows the specific example and creation procedure of the behavior description 104 of the physical item which concerns on Embodiment 1. FIG. 実施の形態1に係る機能項目リスト103の具体例及び作成の手順を示す図。FIG. 6 is a diagram illustrating a specific example of a function item list 103 according to the first embodiment and a creation procedure. 実施の形態1に係る機能項目の振舞い記述105の具体例及び作成の手順を示す図。The figure which shows the specific example and procedure of creation of the behavior description 105 of the function item which concerns on Embodiment 1. FIG. 実施の形態1に係るソースコード生成装置20におけるソースコード生成方法、ソースコード生成処理S10の動作を示すフロー図。The source code generation method in the source code generation device 20 concerning Embodiment 1, and a flow figure showing operation of source code generation processing S10. 実施の形態1に係る物理項目リストと物理項目の振舞い記述とから生成したソースコードの例を示す図。The figure which shows the example of the source code produced | generated from the physical item list which concerns on Embodiment 1, and the behavior description of a physical item. 実施の形態1に係る機能項目リストと機能項目の振舞い記述とから生成したソースコードの例を示す図。The figure which shows the example of the source code produced | generated from the function item list | wrist which concerns on Embodiment 1, and the behavior description of a function item. 実施の形態1に係るソースコード生成装置20のハードウェア構成図。1 is a hardware configuration diagram of a source code generation device 20 according to Embodiment 1. FIG. 実施の形態2に係るソースコード生成システム800aのブロック構成図。The block block diagram of the source code generation system 800a which concerns on Embodiment 2. FIG. 実施の形態2に係る優先度制御ソースコード3031を実現する優先度制御部3031aの優先度制御処理の動作を示すフロー図。FIG. 11 is a flowchart showing an operation of priority control processing of a priority control unit 3031a that implements priority control source code 3031 according to the second embodiment. 実施の形態2に係る優先度制御部3031aによる各機能の継承関係の例を示す図。The figure which shows the example of the inheritance relationship of each function by the priority control part 3031a which concerns on Embodiment 2. FIG.

実施の形態1.
図1を用いて、本実施の形態に係るソースコード生成装置20のブロック構成について説明する。
本実施の形態では、物理項目に対して発生しうる例外事象と機能項目に対する処理の優先度と仕様記述方法とコード生成方法とを示す。
Embodiment 1 FIG.
A block configuration of the source code generation device 20 according to the present embodiment will be described with reference to FIG.
In the present embodiment, exception events that may occur for physical items, processing priorities for function items, specification description methods, and code generation methods are shown.

***構成の説明***
ソースコード生成システム800は、処理項目リスト記憶部1071、振舞い記述情報記憶部1081、ソースコード生成装置20、ソースコード30を有する。
ソースコード生成装置20は、取得部40とソースコード生成部50と優先度制御生成部60とを有する。
取得部40は、物理項目リスト102、機能項目リスト103、物理項目の振舞い記述104、機能項目の振舞い記述105を入力とする。
*** Explanation of configuration ***
The source code generation system 800 includes a processing item list storage unit 1071, a behavior description information storage unit 1081, a source code generation device 20, and a source code 30.
The source code generation device 20 includes an acquisition unit 40, a source code generation unit 50, and a priority control generation unit 60.
The acquisition unit 40 receives the physical item list 102, the function item list 103, the physical item behavior description 104, and the functional item behavior description 105.

物理項目リスト102、機能項目リスト103は、処理項目リスト107の例である。
物理項目の振舞い記述104、機能項目の振舞い記述105は、振舞い記述情報108の例である。
The physical item list 102 and the function item list 103 are examples of the processing item list 107.
The physical item behavior description 104 and the function item behavior description 105 are examples of the behavior description information 108.

処理項目リスト記憶部1071は、処理の項目を表す処理項目1072と、処理項目1072に含まれる操作を表す操作情報1073と、例外処理を表す例外処理情報1074とを含む処理項目リスト107を記憶する。処理項目リスト記憶部1071は、処理項目リスト107として、物理項目リスト102と機能項目リスト103とを記憶する。   The process item list storage unit 1071 stores a process item list 107 including a process item 1072 representing a process item, operation information 1073 representing an operation included in the process item 1072, and exception process information 1074 representing an exception process. . The processing item list storage unit 1071 stores the physical item list 102 and the function item list 103 as the processing item list 107.

振舞い記述情報記憶部1081は、処理項目リスト107に基づいて記述された処理項目1072の振舞いを記述する振舞い記述情報108を記憶する。振舞い記述情報記憶部1081は、振舞い記述情報108として、物理項目の振舞い記述104と機能項目の振舞い記述105とを記憶する。
処理項目リスト107は、操作として複数の操作1073aを表す操作情報1073を有する。
The behavior description information storage unit 1081 stores behavior description information 108 that describes the behavior of the processing item 1072 described based on the processing item list 107. The behavior description information storage unit 1081 stores a physical item behavior description 104 and a function item behavior description 105 as the behavior description information 108.
The process item list 107 includes operation information 1073 representing a plurality of operations 1073a as operations.

ソースコード生成部50は、振舞い記述生成部501、操作生成部502、例外記述生成部503、条件記述生成部504、処理記述生成部505を有する。
振舞い記述生成部501は、処理項目1072を用いて、クラスを定義するソースコードを生成する。
操作生成部502は、操作情報1073を用いて、操作を定義するソースコードを生成する。操作生成部502は、複数の操作の各操作を定義するソースコードを生成する。
例外記述生成部503は、例外処理情報1074を用いて、操作の実行中に発生する例外処理を表すソースコードを生成する。例外記述生成部503は、複数の操作の各操作を定義するソースコードに対して例外処理を表すソースコードを割り付ける。
条件記述生成部504は、振舞い記述情報108を用いて、操作の条件分岐を表すソースコードを生成する。
処理記述生成部505は、振舞い記述情報108を用いて、操作の処理内容を表すソースコードを生成する。
The source code generation unit 50 includes a behavior description generation unit 501, an operation generation unit 502, an exception description generation unit 503, a condition description generation unit 504, and a process description generation unit 505.
The behavior description generation unit 501 uses the processing item 1072 to generate a source code that defines a class.
The operation generation unit 502 uses the operation information 1073 to generate source code that defines the operation. The operation generation unit 502 generates source code that defines each operation of a plurality of operations.
The exception description generation unit 503 uses the exception processing information 1074 to generate source code representing exception processing that occurs during operation execution. The exception description generation unit 503 assigns source code representing exception processing to source code defining each operation of a plurality of operations.
The condition description generation unit 504 uses the behavior description information 108 to generate source code representing a conditional branch of the operation.
The process description generation unit 505 uses the behavior description information 108 to generate a source code that represents the processing content of the operation.

各構成部についてさらに詳しく説明する。
振舞い記述生成部501は、物理項目リスト102および機能項目リスト103で定義された全ての物理項目および機能項目毎に1つのクラスを生成する。ここでクラスとは、ソースコードの形式で生成されたものである。クラスの名称には、物理項目および機能項目毎、すなわち処理項目1072毎に定義したラベル名を使用する。
次に、物理項目リスト102および機能項目リスト103、すなわち処理項目リスト107で、自項目の上位階層項目が定義されているものについては、その上位階層の項目から生成されたクラスと親子関係があることを示す継承コードを生成する。振舞い記述生成部501は、生成した継承コードをソースコードの形式で生成されたクラスに追記する。
Each component will be described in more detail.
The behavior description generation unit 501 generates one class for every physical item and function item defined in the physical item list 102 and the function item list 103. Here, the class is generated in the form of source code. As the class name, a label name defined for each physical item and function item, that is, for each processing item 1072 is used.
Next, in the physical item list 102 and the function item list 103, that is, the processing item list 107 in which the upper item of the item is defined, there is a parent-child relationship with the class generated from the item of the upper item. Generate inheritance code that indicates The behavior description generation unit 501 adds the generated inheritance code to a class generated in the form of source code.

操作生成部502は、物理項目リスト102および機能項目リスト103で定義された全ての操作毎に1つのメソッドを生成し、当該操作が属する機能のクラス内に配置する。ここでメソッドとは、ソースコードの形式で生成されたものである。メソッドの名称には、操作毎に定義したラベル名を使用する。メソッドのソースコードを生成するとは、操作を定義するソースコードを生成することである。   The operation generation unit 502 generates one method for every operation defined in the physical item list 102 and the function item list 103, and arranges it in the function class to which the operation belongs. Here, the method is generated in the form of source code. Use the label name defined for each operation as the method name. Generating a method source code means generating a source code that defines an operation.

例外記述生成部503は、物理項目リスト102で定義された例外毎に例外コードを生成し、その例外が属する物理項目のすべてのメソッドに例外コードを配置する。   The exception description generation unit 503 generates an exception code for each exception defined in the physical item list 102, and places the exception code in all methods of the physical item to which the exception belongs.

条件記述生成部504は、物理項目の振舞い記述104および機能項目の振舞い記述105、すなわち振舞い記述情報108で定義された全ての条件記述について、同じ内容となるif文を生成する。ここでif文の判定対象として使用する属性名称は、物理項目リスト102または機能項目リスト103において属性名称とラベルを対にして定義しており、ソースコードには当該ラベルを使用する。また、生成したif文は、物理項目の振舞い記述104および機能項目の振舞い記述105で定義した操作のソースコード内にて、記述した順番通りに配置する。   The condition description generation unit 504 generates an if statement having the same contents for all condition descriptions defined by the behavior description 104 of the physical item and the behavior description 105 of the function item, that is, the behavior description information 108. Here, the attribute name used as the determination target of the if statement is defined by pairing the attribute name and the label in the physical item list 102 or the function item list 103, and the label is used for the source code. The generated if statement is arranged in the order described in the operation source code defined in the behavior description 104 of the physical item and the behavior description 105 of the function item.

処理記述生成部505では、物理項目の振舞い記述104および機能項目の振舞い記述105で定義された全ての処理記述について、同じ内容となる制御文を生成する。制御文内で使用する属性名称は、物理項目リスト102または機能項目リスト103において属性名称とラベルを対にして定義しており、ソースコードには当該ラベルを使用する。また、生成した制御文は、物理項目の振舞い記述104および機能項目の振舞い記述105で定義した操作のソースコード内にて、記述した順番通りに配置する。   The process description generation unit 505 generates control statements having the same contents for all process descriptions defined in the physical item behavior description 104 and the function item behavior description 105. The attribute name used in the control statement is defined by pairing the attribute name and the label in the physical item list 102 or the function item list 103, and the label is used for the source code. The generated control statements are arranged in the order described in the operation source code defined in the behavior description 104 of the physical item and the behavior description 105 of the function item.

優先度制御生成部60は、処理項目1072の各々に設定された優先度1075に基づいて、実行中の処理項目の優先度と実行が要求された処理項目の優先度とを比較し、優先度が高い方の処理項目を実行する優先度制御機能を有する優先度制御ソースコード303を生成する。
なお、優先度制御生成部60は無くてもよく、機能の優先順位の制御プログラムを各機能のソースコードに持つ構成でも構わない。
The priority control generation unit 60 compares the priority of the process item being executed with the priority of the process item requested to be executed based on the priority 1075 set for each of the process items 1072, and the priority A priority control source code 303 having a priority control function for executing a process item having a higher value is generated.
Note that the priority control generation unit 60 may not be provided, and a configuration may be adopted in which a function priority control program is included in the source code of each function.

図2を用いて、本実施の形態に係るソースコード生成システム800における仕様記述からソースコード生成までの流れについて説明する。
仕様が記述されたインプット仕様書101から、ハードウェアを抽出し、故障、電源断、異常値検出などの発生する可能性のある例外項目の定義を物理項目リスト102に列挙する。また、インプット仕様書101から、ソフトウェアの機能を抽出し、優先度の定義を機能項目リスト103に列挙する。
A flow from specification description to source code generation in the source code generation system 800 according to the present embodiment will be described with reference to FIG.
The hardware is extracted from the input specification 101 in which the specifications are described, and the definitions of exception items that may occur such as failure, power interruption, abnormal value detection, etc. are listed in the physical item list 102. Also, software functions are extracted from the input specification 101 and the definition of priority is listed in the function item list 103.

物理項目リスト102の項目ごとに、物理項目の振舞い記述104に日本語の振舞い記述言語により、例外発生時の例外と振舞いを定義する。
機能項目リスト103の項目ごとに、機能の振舞いの定義を機能項目の振舞い記述105に記述する。
For each item in the physical item list 102, an exception and a behavior when an exception occurs are defined in the behavior description 104 of the physical item using a Japanese behavior description language.
For each item in the function item list 103, a function behavior definition is described in the function item behavior description 105.

ソースコード生成装置20に、物理項目リスト102、物理項目の振舞い記述104、機能項目リスト103、機能項目の振舞い記述105を入力して、物理項目クラス301、機能項目クラス302のソースコード30を生成する。   The physical item list 102, the physical item behavior description 104, the function item list 103, and the function item behavior description 105 are input to the source code generation device 20 to generate the source code 30 of the physical item class 301 and the function item class 302. To do.

図3を用いて、本実施の形態に係る物理項目リスト102の具体例及び作成の手順について説明する。物理項目リスト102では、ハードウェアの項目を階層化して表記する。   A specific example and creation procedure of the physical item list 102 according to the present embodiment will be described with reference to FIG. In the physical item list 102, hardware items are expressed in a hierarchy.

物理項目は、処理の項目であるクラスを表す処理項目1072の例である。
物理項目リスト102、すなわち処理項目リスト107は、処理項目1072として、複数の処理項目1072aを有する。また、複数の処理項目1072aの各々が上位の階層である親処理項目10721を有する。最上位の処理項目には親処理項目はない。
具体的には、物理項目リスト102には、物理項目ごとに、物理名称である名称とソースコード生成時に用いるラベルとを階層的に記載する。階層が下になるほど物理項目を詳細化する。
物理項目の名称として、センサの階層の下にセンサ1とセンサ2とを記載し、物理項目のラベルとして、センサに対応するSensor、センサ1に対応するSen1、センサ2に対応するSen2と記載する。
例えば、センサが親物理項目、すなわち親処理項目10721であり、センサ1、センサ2が子物理項目、すなわち子処理項目10722となる。
The physical item is an example of a processing item 1072 that represents a class that is a processing item.
The physical item list 102, that is, the processing item list 107 has a plurality of processing items 1072 a as the processing items 1072. Each of the plurality of process items 1072a has a parent process item 10721 which is a higher hierarchy. The top-level process item has no parent process item.
Specifically, in the physical item list 102, for each physical item, a name that is a physical name and a label that is used when generating the source code are described hierarchically. The physical items are refined as the hierarchy goes down.
As the names of the physical items, sensors 1 and 2 are described below the sensor hierarchy, and as the physical item labels, Sensor corresponding to the sensor, Sen1 corresponding to the sensor 1, and Sen2 corresponding to the sensor 2 are described. .
For example, the sensor is a parent physical item, that is, a parent processing item 10721, and the sensor 1 and sensor 2 are child physical items, that is, a child processing item 10722.

また、物理項目ごとに操作の名称、操作のラベルを記載する。図3では、センサ1の操作の名称として、起動と値取得を記載し、それぞれのラベルOpeY,OpeZを記載する。   In addition, an operation name and an operation label are described for each physical item. In FIG. 3, activation and value acquisition are described as names of operations of the sensor 1, and respective labels OpeY and OpeZ are described.

それぞれの操作に対して、属性の名称、属性のラベル、属性の範囲、属性の初期値を記載する。すべての操作に共通する属性は、どの操作にも属さない行に記載する。図3では「起動」と、「値取得」という名称の操作に対して共通する、電源状態という属性の名称を記載している。「電源状態」という属性の名称に対して、ラベルをAttrN、範囲をPOWERONとPOWEROFFとした。   For each operation, the attribute name, attribute label, attribute range, and initial attribute value are described. Attributes common to all operations are listed on lines that do not belong to any operation. In FIG. 3, the name of the attribute called the power supply state common to the operations called “startup” and “value acquisition” is shown. For the attribute name “power state”, the label is AttrN and the range is POWERON and POWEROFF.

物理項目に対して例外項目がある場合は、例外の名称と例外のラベルとを記載する。図3では、「センサ1」という物理項目の名称に対して、「電源断」という例外の名称と、POWEROffEventという例外のラベルを記載している。   If there is an exception item for the physical item, describe the exception name and exception label. In FIG. 3, for the name of the physical item “sensor 1”, an exception name “power off” and an exception label “POWEROffEvent” are shown.

図4を用いて、本実施の形態に係る物理項目の振舞い記述104の具体例及び作成の手順について説明する。
物理項目リスト102の物理項目ごとに、物理項目の振舞い記述104を作成する。図4では「センサ1」についての振舞い記述を記載した。
物理項目の振舞い記述104では、物理項目の名称、概要、目的を記載したあと、物理項目の振舞い記述を記載する。
A specific example of the physical item behavior description 104 according to the present embodiment and a procedure for creating the physical item will be described with reference to FIG.
A physical item behavior description 104 is created for each physical item in the physical item list 102. In FIG. 4, the behavior description of “sensor 1” is described.
The physical item behavior description 104 describes the physical item behavior description after describing the name, outline, and purpose of the physical item.

物理項目リスト102において、振舞い記述の作成対象である物理項目に、例外処理があれば、[]のカッコの中に例外の名称を記載する。
また、処理を表す処理記述は先頭に・をつける。
図4では、「電源断」という例外処理が起きた場合、電源状態をPOWEROFFにするという処理を記述している。
また、操作に対しては<>のカッコで表し、<>のカッコの中に操作の名称を記載する。
In the physical item list 102, if there is an exception process for a physical item for which a behavior description is to be created, the name of the exception is entered in brackets [].
In addition, a process description representing a process is prefixed with.
FIG. 4 describes a process of setting the power state to POWER OFF when an exceptional process of “power failure” occurs.
In addition, operations are represented by parentheses <>, and the name of the operation is described in parentheses <>.

図5を用いて、本実施の形態に係る機能項目リスト103の具体例及び作成の手順について説明する。機能項目リスト103では、システムに要求される機能を階層化して表記する。
機能項目は、処理の項目であるクラスを表す処理項目1072の例である。
機能項目リスト103、すなわち処理項目リスト107は、処理項目として、複数の処理項目を有し、複数の処理項目の各々に優先度1075が設定される。また、複数の処理項目の各々が上位の階層である親処理項目を有する。最上位の処理項目には親処理項目はない。以下で説明する優先レベルは、優先度1075の例である。
A specific example of the function item list 103 according to the present embodiment and a procedure for creating it will be described with reference to FIG. In the function item list 103, functions required for the system are expressed in a hierarchy.
The function item is an example of a processing item 1072 that represents a class that is a processing item.
The function item list 103, that is, the process item list 107 has a plurality of process items as process items, and a priority 1075 is set for each of the plurality of process items. Each of the plurality of process items has a parent process item that is a higher hierarchy. The top-level process item has no parent process item. The priority level described below is an example of a priority 1075.

機能項目リスト103では、まずシステムが要求する機能を抽出する。そして、抽出した各機能を大分類・中分類・小分類というように階層的に整理する。階層の深さに制限を設ける必要は無く、また機能により階層の深さが異なっていても良い。
図5の例では、機能項目の欄に、上位階層から順に機能の名称が設定される。大分類が機能A、中分類が機能A1及び機能A2と設定されている。また、大分類が機能B、中分類が機能B1及び機能B2、機能B2の小分類として機能B21及び機能B22と設定されている。なお、ここで機能の名称に使用する名前、すなわち文字列に制限は無い。
例えば、機能Aが親機能項目、すなわち親処理項目であり、機能A1、機能A2が子機能項目、すなわち子処理項目となる。また、子機能項目、すなわち子処理項目を機能B21、機能B22とすると、親機能項目、すなわち親処理項目は機能B2である。
In the function item list 103, first, a function requested by the system is extracted. Then, the extracted functions are arranged hierarchically such as major classification, middle classification, and minor classification. There is no need to limit the depth of the hierarchy, and the depth of the hierarchy may be different depending on the function.
In the example of FIG. 5, function names are set in the function item column in order from the upper layer. The major classification is set as function A, and the middle classification is set as function A1 and function A2. Further, the major classification is set as function B, the middle classification is set as function B1 and function B2, and the minor classification of function B2 is set as function B21 and function B22. In addition, there is no restriction | limiting in the name used for the name of a function here, ie, a character string.
For example, function A is a parent function item, that is, a parent process item, and function A1 and function A2 are child function items, that is, a child process item. If the child function items, that is, the child process items are the function B21 and the function B22, the parent function item, that is, the parent process item is the function B2.

次に、各機能についてシステムが要求する優先度1075を検討する。この優先度1075とは、同じ階層に分類した機能同士の実行優先度を指している。図5の例では、機能Aと機能Bの優先レベルは、それぞれ1と2であるため、機能Aの優先度が機能Bの優先度よりも高いことになる。
上記優先度は、上位階層の機能が同じである機能同士では固有の値を指定する必要がある。一方、上位階層が異なる機能同士では優先度の値が重複しても良い。図5の例では、上位階層が機能Aである中分類の機能A1と機能A2との優先レベルは、それぞれ1と2である。また、同じ中分類であるが上位階層が機能Bである中分類の機能B1と機能B2との優先レベルについても、それぞれ1と2とが設定されている。
Next, the priority 1075 required by the system for each function is considered. The priority 1075 indicates an execution priority between functions classified in the same hierarchy. In the example of FIG. 5, the priority levels of the function A and the function B are 1 and 2, respectively. Therefore, the priority of the function A is higher than the priority of the function B.
As the priority, it is necessary to specify a unique value between functions having the same upper layer function. On the other hand, priority values may be duplicated between functions having different upper layers. In the example of FIG. 5, the priority levels of the middle-class function A1 and function A2 whose upper layer is function A are 1 and 2, respectively. In addition, 1 and 2 are set for the priority levels of the functions B1 and B2 of the medium classification whose functions are the same middle class but whose upper layer is the function B, respectively.

次に、各機能にラベルを設定する。これは、ソースコード生成の際、クラス名に使用される。そのため、生成するコードのプログラミング言語仕様に則った命名をする必要がある。   Next, a label is set for each function. This is used for the class name when generating the source code. Therefore, it is necessary to name the generated code according to the programming language specification.

続いて、機能項目リスト103の作成において定義した各機能の具体的な仕様を機能仕様として定義する。機能仕様は操作情報1073の例である。機能仕様には、大きく分けて操作と属性がある。   Subsequently, a specific specification of each function defined in the creation of the function item list 103 is defined as a function specification. The functional specification is an example of the operation information 1073. Functional specifications are roughly classified into operations and attributes.

まず操作の項目では、各機能において必要となる処理内容を抽出し、その処理に対して名称を付ける。この名称は、一つの機能内で固有である必要がある。
次に、抽出した各操作にラベルを設定する。これは、ソースコード生成の際、メソッド名に使用される。そのため、生成するコードのプログラミング言語仕様に則った命名をする必要がある。
First, in the operation item, the processing contents necessary for each function are extracted, and a name is given to the processing. This name must be unique within a function.
Next, a label is set for each extracted operation. This is used for the method name when generating the source code. Therefore, it is necessary to name the generated code according to the programming language specification.

次に属性の項目では、各操作で使用するデータを抽出し、抽出したデータに対して名称を付ける。抽出したデータに対して付する名称は、一つの操作内で固有である必要がある。
抽出した各属性にラベルを設定する。このラベルは、ソースコード生成の際、フィールド名に使用される。そのため、生成するコードのプログラミング言語仕様に則った命名をする必要がある。
また、抽出した各属性の値域を範囲に設定する。これは、ソースコード生成の際、フィールドの値域に使用される。そのため、フィールドとして存在しえない範囲の値は設定できない。
さらに、抽出した各属性の初期値を設定する。これは、ソースコード生成の際、フィールドの初期化に使用される。そのため、フィールドとして存在しえない範囲の値は設定できない。
Next, in the attribute item, data used in each operation is extracted, and a name is given to the extracted data. The name given to the extracted data needs to be unique within one operation.
Set a label for each extracted attribute. This label is used as a field name when generating source code. Therefore, it is necessary to name the generated code according to the programming language specification.
In addition, the range of each extracted attribute is set as a range. This is used for the field range when generating source code. Therefore, a value in a range that cannot exist as a field cannot be set.
Furthermore, the initial value of each extracted attribute is set. This is used for field initialization when generating source code. Therefore, a value in a range that cannot exist as a field cannot be set.

図6を用いて、本実施の形態に係る機能項目の振舞い記述105の具体例及び作成の手順について説明する。
機能項目の振舞い記述105では、機能項目リスト103で定義した各機能の振舞いを定義し、各機能が持つ操作毎に、処理内容の詳細を記載する。
A specific example of the function item behavior description 105 according to the present embodiment and a procedure for creating the function item will be described with reference to FIG.
In the function item behavior description 105, the behavior of each function defined in the function item list 103 is defined, and details of processing contents are described for each operation of each function.

まず、機能が持つ操作の1つずつについて、当該操作に属する属性をどのように使用するか具体的に検討し、どのような「条件」で、どのような「処理」を行うか明らかにする。
次に、検討した「条件」と「処理」とを、擬似言語にて記述する。この擬似言語では、使用する属性を機能項目リスト103に記載の名称と揃え、論理構造のみを記号化する。
First, for each operation of the function, examine how to use the attribute belonging to the operation, and clarify what kind of “processing” should be performed under what “condition”. .
Next, the studied “conditions” and “processing” are described in a pseudo language. In this pseudo language, the attributes to be used are aligned with the names described in the function item list 103, and only the logical structure is symbolized.

1つの機能が持つ全ての操作は、一つの「機能項目の振舞い記述」としてまとめて記述する。
つまり、図5の機能項目リスト103における機能A1が持つ操作A及び操作Bについては、図6に示す1つの「機能項目の振舞い記述105」にまとめて記述する。
以上の手順を、機能項目リスト103における全ての機能について実施する。
All operations of one function are collectively described as one “function item behavior description”.
That is, the operation A and the operation B included in the function A1 in the function item list 103 in FIG. 5 are collectively described in one “function item behavior description 105” illustrated in FIG.
The above procedure is performed for all functions in the function item list 103.

***動作の説明***
図7を用いて、本実施の形態に係るソースコード生成装置20におけるソースコード生成方法、ソースコード生成処理S10の動作について説明する。
*** Explanation of operation ***
The operation of the source code generation method and source code generation processing S10 in the source code generation device 20 according to the present embodiment will be described using FIG.

取得部40は、処理項目リスト107と、処理項目リスト107に基づいて記述された処理項目1072の振舞いを記述する振舞い記述情報108とを取得する取得処理S100を実行する。
具体的には、S701において、取得部40は、物理項目リスト102、機能項目リスト103、物理項目の振舞い記述104、機能項目の振舞い記述105を取得する。
振舞い記述生成部501は、取得部40により取得された物理項目の振舞い記述104または機能項目の振舞い記述105に対して、未処理のものが無い場合、処理を終了し、未処理のものが有る場合、S702に処理を進める。
ここで、処理対象の振舞い記述を処理対象振舞い記述とする。
The acquisition unit 40 executes an acquisition process S100 that acquires the process item list 107 and the behavior description information 108 that describes the behavior of the process item 1072 described based on the process item list 107.
Specifically, in S701, the acquisition unit 40 acquires the physical item list 102, the function item list 103, the physical item behavior description 104, and the functional item behavior description 105.
If there is no unprocessed item for the physical item behavior description 104 or the functional item behavior description 105 acquired by the acquisition unit 40, the behavior description generation unit 501 terminates the process, and there is an unprocessed item. If so, the process proceeds to S702.
Here, the behavior description of the processing target is the processing target behavior description.

振舞い記述生成部501は、処理項目1072を用いてクラスを定義するソースコードを生成する振舞い記述生成処理S100aを実行する。
具体的には、S702において、振舞い記述生成部501は、処理対象振舞い記述に基づいて、機能項目リスト103あるいは物理項目リスト102から、処理対象振舞い記述の機能名称あるいは物理名称のラベルを取得しクラスを生成する。
The behavior description generation unit 501 executes a behavior description generation process S100a that generates a source code that defines a class using the processing item 1072.
Specifically, in S702, the behavior description generation unit 501 acquires the function name or physical name label of the processing target behavior description from the function item list 103 or the physical item list 102 based on the processing target behavior description, and class Is generated.

例えば、処理対象振舞い記述が物理項目の振舞い記述104の場合、振舞い記述生成部501は、図3の物理項目リスト102に基づいて、「センサ1」についてクラスを定義するソースコードを生成する。まず、振舞い記述生成部501は、物理項目リスト102から振舞い記述「センサ1」のラベルを取得し、物理項目クラス301であるSen1クラスをソースコードとして生成する。具体的には、振舞い記述生成部501は、図8の1行目の「Class Sen1」を生成する。
また、例えば、処理対象振舞い記述が機能項目の振舞い記述105の場合、振舞い記述生成部501は、図5の機能項目リスト103に基づいて、「機能A1」についてのソースコードを生成する。まず、振舞い記述生成部501は、機能項目リスト103から振舞い記述「機能A1」のラベルを取得し、機能項目クラス302であるClassA1クラスをソースコードとして生成する。具体的には、振舞い記述生成部501は、図9の1行目の「class ClassA1」を生成する。
For example, when the processing target behavior description is the physical item behavior description 104, the behavior description generation unit 501 generates source code that defines a class for “sensor 1” based on the physical item list 102 of FIG. 3. First, the behavior description generation unit 501 acquires the label of the behavior description “sensor 1” from the physical item list 102 and generates the Sen1 class, which is the physical item class 301, as a source code. Specifically, the behavior description generation unit 501 generates “Class Sen1” on the first line in FIG.
For example, if the behavior description to be processed is the behavior description 105 of the function item, the behavior description generation unit 501 generates a source code for “function A1” based on the function item list 103 of FIG. First, the behavior description generation unit 501 acquires the label of the behavior description “function A1” from the function item list 103, and generates the Class A1 class that is the function item class 302 as a source code. Specifically, the behavior description generation unit 501 generates “class Class A1” on the first line in FIG.

S702におけるクラスのソースコード生成後、処理対象振舞い記述の機能項目または物理項目について親機能項目または親物理項目が有る場合は、処理はS703に進む。処理対象振舞い記述の機能項目または物理項目について親機能項目または親物理項目が無い場合は、処理はS704に進む。   After the generation of the class source code in S702, if there is a parent function item or a parent physical item for the function item or physical item of the processing target behavior description, the process proceeds to S703. If there is no parent function item or parent physical item for the function item or physical item in the processing target behavior description, the process proceeds to S704.

S703において、振舞い記述生成部501は、継承記述処理S200を実行する。振舞い記述生成部501は、処理対象振舞い記述に基づいて、機能項目リスト103あるいは物理項目リスト102から、親機能項目または親物理項目の名称のラベルを取得し、継承コードを生成する。   In S703, the behavior description generation unit 501 executes the inheritance description process S200. The behavior description generation unit 501 acquires the label of the name of the parent function item or the parent physical item from the function item list 103 or the physical item list 102 based on the processing target behavior description, and generates an inheritance code.

処理対象振舞い記述が図3の物理項目リスト102の場合、振舞い記述生成部501は、センサ1には親物理項目である「センサ」があるので、「センサ」のラベルSensorを取得する。振舞い記述生成部501は、S702で生成したソースコード「class Sen1」に対して、親クラス「Sensor」への継承記述を生成する。具体的には、振舞い記述生成部501は、図8の1行目の「:public Sensor」を生成する。
処理対象振舞い記述が図5の機能項目リスト103の場合では、振舞い記述生成部501は、機能A1には親の機能項目である「機能A」があるので、「機能A」のラベルClassAを取得する。振舞い記述生成部501は、S702で生成したソースコード「class ClassA1」に対して、親クラス「ClassA」への継承記述を生成する。具体的には、振舞い記述生成部501は、図9の1行目の「:public ClassA」を生成する。
When the behavior description to be processed is the physical item list 102 in FIG. 3, the behavior description generation unit 501 acquires the label “Sensor” of “Sensor” because the sensor 1 has “Sensor” as a parent physical item. The behavior description generation unit 501 generates an inheritance description to the parent class “Sensor” for the source code “class Sen1” generated in S702. Specifically, the behavior description generation unit 501 generates “: public Sensor” on the first line in FIG.
When the processing target behavior description is the function item list 103 of FIG. 5, the behavior description generation unit 501 obtains the label ClassA of “function A” because “function A” is the parent function item in the function A1. To do. The behavior description generation unit 501 generates an inheritance description to the parent class “ClassA” for the source code “class ClassA1” generated in S702. Specifically, the behavior description generation unit 501 generates “: public ClassA” on the first line in FIG.

S704において、操作生成部502は、処理対象振舞い記述に基づいて、未処理の操作があるか否かを判定する。操作生成部502は、未処理の操作が有る場合、処理をS705に進め、未処理の操作が無い場合、処理をS708に進める。   In step S <b> 704, the operation generation unit 502 determines whether there is an unprocessed operation based on the processing target behavior description. If there is an unprocessed operation, the operation generation unit 502 advances the process to S705. If there is no unprocessed operation, the operation generation unit 502 advances the process to S708.

操作生成部502は、操作情報1073を用いて操作を定義するソースコードを生成する操作生成処理S300を実行する。
具体的には、S705において、操作生成部502は、機能項目リスト103あるいは物理項目リスト102から、未処理の操作名称のラベルを取得しメソッドを生成する。
The operation generation unit 502 executes an operation generation process S300 for generating a source code that defines an operation using the operation information 1073.
Specifically, in step S <b> 705, the operation generation unit 502 acquires a label of an unprocessed operation name from the function item list 103 or the physical item list 102 and generates a method.

例えば、操作生成部502は、図3の物理項目リスト102の場合、センサ1には操作「起動」があるので、ラベルを取得し、メソッドをソースコードとして生成する。具体的には、操作生成部502は、図8の2行目の「void OpeY()」を生成する。
また、例えば、操作生成部502は、図5の機能項目リスト103の場合、機能Aには操作「操作A」があるので、ラベルを取得し、メソッドをソースコードとして生成する。具体的には、操作生成部502は、図9の2行目の「void OpeA()」を生成する。
For example, in the case of the physical item list 102 in FIG. 3, the operation generation unit 502 acquires the label and generates a method as the source code because the sensor 1 has the operation “activation”. Specifically, the operation generation unit 502 generates “void OpeY ()” on the second line in FIG.
Further, for example, in the case of the function item list 103 in FIG. 5, the operation generation unit 502 obtains a label and generates a method as source code because the function A has the operation “operation A”. Specifically, the operation generation unit 502 generates “void OpeA ()” on the second line in FIG.

例外記述生成部503は、例外処理情報1074を用いて操作の実行中に発生する例外処理を表すソースコードを生成する例外記述生成処理S400を実行する。
S706において、例外記述生成部503は、処理対象振舞い記述に未処理の例外記述があるか否かを判定する。例外記述生成部503は、未処理の例外記述がある場合、処理をS707に進める。また、例外記述生成部503は、未処理の例外記述が無い場合、処理をS704に進める。
The exception description generation unit 503 executes exception description generation processing S400 that generates source code representing exception processing that occurs during the execution of an operation using the exception processing information 1074.
In step S706, the exception description generation unit 503 determines whether there is an unprocessed exception description in the processing target behavior description. If there is an unprocessed exception description, the exception description generation unit 503 advances the process to S707. Also, if there is no unprocessed exception description, the exception description generation unit 503 advances the process to S704.

S707において、例外記述生成部503は、物理項目リスト102から、例外名称のラベルを取得し、操作に例外コードを追加する。
例えば、例外記述生成部503は、図3の物理項目リスト102の場合、センサ1には例外項目「電源断」があるので、「電源断」のラベルを取得し、「起動」メソッドに例外コードを追加する。具体的には、例外記述生成部503は、図8の3行目と5行目のように、ソースコードを生成する。
In step S707, the exception description generation unit 503 acquires an exception name label from the physical item list 102, and adds an exception code to the operation.
For example, in the case of the physical item list 102 in FIG. 3, the exception description generation unit 503 obtains the label “Power off” because the sensor 1 has the exception item “Power off”, and adds an exception code to the “Start” method. Add Specifically, the exception description generation unit 503 generates source code as shown in the third and fifth lines of FIG.

条件記述生成部504は、振舞い記述情報108を用いて操作の条件分岐を表すソースコードを生成する条件記述生成処理S500を実行する。
S708において、条件記述生成部504は、処理対象振舞い記述に未処理の条件記述がある場合、処理をS709に進める。条件記述生成部504は、未処理の条件記述が無い場合、処理をS710に進める。
The condition description generation unit 504 executes a condition description generation process S500 for generating source code representing a conditional branch of an operation using the behavior description information 108.
In S708, the condition description generation unit 504 advances the process to S709 if there is an unprocessed condition description in the processing target behavior description. If there is no unprocessed condition description, the condition description generation unit 504 advances the process to S710.

S709において、条件記述生成部504は、条件記述内の属性名称のラベルを取得しif文を生成する。
例えば、条件記述生成部504は、図5の機能項目リスト103の場合、操作「操作A」に条件記述があるので、条件記述内の属性名称「属性B」「属性C」「属性D」「属性E」のラベルを機能項目リスト103から取得し、if文を生成する。具体的には、条件記述生成部504は、図9の3行目と6行目のように、ソースコードを生成する。
In step S709, the condition description generation unit 504 acquires an attribute name label in the condition description and generates an if statement.
For example, in the case of the function item list 103 in FIG. 5, the condition description generation unit 504 has a condition description in the operation “operation A”, so the attribute names “attribute B” “attribute C” “attribute D” “ The label of the attribute “E” is acquired from the function item list 103, and an “if” statement is generated. Specifically, the condition description generation unit 504 generates source code as in the third and sixth lines in FIG.

処理記述生成部505は、振舞い記述情報108を用いて操作の処理内容を表すソースコードを生成する処理記述生成処理S600を実行する。
S710において、処理記述生成部505は、処理対象振舞い記述に未処理の処理記述が有るか否かを判定する。処理記述生成部505は、未処理の処理記述が有る場合、処理をS711に進める。処理記述生成部505は、未処理の処理記述が無い場合、処理をS701に進める。
The process description generation unit 505 executes a process description generation process S600 that generates a source code representing the process contents of the operation using the behavior description information 108.
In step S710, the process description generation unit 505 determines whether there is an unprocessed process description in the process target behavior description. If there is an unprocessed process description, the process description generation unit 505 advances the process to S711. If there is no unprocessed process description, the process description generation unit 505 advances the process to S701.

S711において、処理記述生成部505は、処理記述内の属性名称のラベルを取得し制御文を生成する。
例えば、処理記述生成部505は、図5の機能項目リスト103の場合、操作「操作A」に未処理の処理記述があるので、条件記述内の属性名称「属性F」のラベルを取得し、制御文を生成する。具体的には、処理記述生成部505は、図9の4行目と7行目のように、ソースコードを生成する。
In step S <b> 711, the process description generation unit 505 acquires the attribute name label in the process description and generates a control statement.
For example, in the case of the function item list 103 in FIG. 5, the process description generation unit 505 acquires the label of the attribute name “attribute F” in the condition description because there is an unprocessed process description in the operation “operation A”. Generate control statements. Specifically, the process description generation unit 505 generates source code as in the fourth and seventh lines of FIG.

図8は、物理項目クラス301のソースコード30の例を示す。図9は、機能項目クラス302のソースコード30の例を示す。
以上のソースコード生成処理S10により、図8及び図9に示すようなソースコード30が自動的に出力される。
FIG. 8 shows an example of the source code 30 of the physical item class 301. FIG. 9 shows an example of the source code 30 of the function item class 302.
Through the above source code generation processing S10, the source code 30 as shown in FIGS. 8 and 9 is automatically output.

ソースコード生成部50は、物理項目クラス301と機能項目クラス302とのソースコード30を出力する。
なお、優先度制御生成部60は、機能項目の各々に設定された優先レベルに基づいて、実行中の機能項目の優先レベルと実行が要求された機能項目の優先レベルとを比較する。優先度制御生成部60は、優先レベルが高い方の機能項目を実行する優先度制御機能を有する優先度制御ソースコード303を生成する。
The source code generation unit 50 outputs the source code 30 of the physical item class 301 and the function item class 302.
The priority control generation unit 60 compares the priority level of the function item being executed with the priority level of the function item requested to be executed based on the priority level set for each function item. The priority control generation unit 60 generates a priority control source code 303 having a priority control function for executing a function item having a higher priority level.

図10を用いて、本実施の形態に係るソースコード生成装置20のハードウェア構成について説明する。
ソースコード生成装置20はコンピュータである。
ソースコード生成装置20は、プロセッサ901、補助記憶装置902、メモリ903、通信装置904、入力インタフェース905、ディスプレイインタフェース906といったハードウェアを備える。
プロセッサ901は、信号線910を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
入力インタフェース905は、入力装置907に接続されている。
ディスプレイインタフェース906は、ディスプレイ908に接続されている。
The hardware configuration of the source code generation device 20 according to this embodiment will be described with reference to FIG.
The source code generation device 20 is a computer.
The source code generation device 20 includes hardware such as a processor 901, an auxiliary storage device 902, a memory 903, a communication device 904, an input interface 905, and a display interface 906.
The processor 901 is connected to other hardware via the signal line 910, and controls these other hardware.
The input interface 905 is connected to the input device 907.
The display interface 906 is connected to the display 908.

プロセッサ901は、プロセッシングを行うIC(Integrated Circuit)である。
プロセッサ901は、例えば、CPU(Central Processing Unit)、DSP(Digital Signal Processor)、GPU(Graphics Processing Unit)である。
補助記憶装置902は、例えば、ROM(Read Only Memory)、フラッシュメモリ、HDD(Hard Disk Drive)である。
メモリ903は、例えば、RAM(Random Access Memory)である。
通信装置904は、データを受信するレシーバー9041及びデータを送信するトランスミッター9042を含む。
通信装置904は、例えば、通信チップ又はNIC(Network Interface Card)である。
入力インタフェース905は、入力装置907のケーブル911が接続されるポートである。
入力インタフェース905は、例えば、USB(Universal Serial Bus)端子である。
ディスプレイインタフェース906は、ディスプレイ908のケーブル912が接続されるポートである。
ディスプレイインタフェース906は、例えば、USB端子又はHDMI(登録商標)(High Definition Multimedia Interface)端子である。
入力装置907は、例えば、マウス、キーボード又はタッチパネルである。
ディスプレイ908は、例えば、LCD(Liquid Crystal Display)である。
The processor 901 is an IC (Integrated Circuit) that performs processing.
The processor 901 is, for example, a CPU (Central Processing Unit), a DSP (Digital Signal Processor), or a GPU (Graphics Processing Unit).
The auxiliary storage device 902 is, for example, a ROM (Read Only Memory), a flash memory, or an HDD (Hard Disk Drive).
The memory 903 is, for example, a RAM (Random Access Memory).
The communication device 904 includes a receiver 9041 that receives data and a transmitter 9042 that transmits data.
The communication device 904 is, for example, a communication chip or a NIC (Network Interface Card).
The input interface 905 is a port to which the cable 911 of the input device 907 is connected.
The input interface 905 is, for example, a USB (Universal Serial Bus) terminal.
The display interface 906 is a port to which the cable 912 of the display 908 is connected.
The display interface 906 is, for example, a USB terminal or an HDMI (registered trademark) (High Definition Multimedia Interface) terminal.
The input device 907 is, for example, a mouse, a keyboard, or a touch panel.
The display 908 is, for example, an LCD (Liquid Crystal Display).

補助記憶装置902には、図1に示す振舞い記述生成部501、操作生成部502、例外記述生成部503、条件記述生成部504、処理記述生成部505(以下、振舞い記述生成部501、操作生成部502、例外記述生成部503、条件記述生成部504、処理記述生成部505をまとめて「部」と表記する)の機能を実現するプログラムが記憶されている。
このプログラムは、メモリ903にロードされ、プロセッサ901に読み込まれ、プロセッサ901によって実行される。
更に、補助記憶装置902には、OS(Operating System)も記憶されている。
そして、OSの少なくとも一部がメモリ903にロードされ、プロセッサ901はOSを実行しながら、「部」の機能を実現するプログラムを実行する。
図10では、1つのプロセッサ901が図示されているが、ソースコード生成装置20が複数のプロセッサ901を備えていてもよい。
そして、複数のプロセッサ901が「部」の機能を実現するプログラムを連携して実行してもよい。
また、「部」の処理の結果を示す情報やデータや信号値や変数値が、メモリ903、補助記憶装置902、又は、プロセッサ901内のレジスタ又はキャッシュメモリにファイルとして記憶される。
The auxiliary storage device 902 includes a behavior description generation unit 501, an operation generation unit 502, an exception description generation unit 503, a condition description generation unit 504, and a process description generation unit 505 (hereinafter, a behavior description generation unit 501, an operation generation). A program that realizes the function of the unit 502, the exception description generation unit 503, the condition description generation unit 504, and the process description generation unit 505.
This program is loaded into the memory 903, read into the processor 901, and executed by the processor 901.
Further, the auxiliary storage device 902 also stores an OS (Operating System).
Then, at least a part of the OS is loaded into the memory 903, and the processor 901 executes a program that realizes the function of “unit” while executing the OS.
Although one processor 901 is illustrated in FIG. 10, the source code generation device 20 may include a plurality of processors 901.
A plurality of processors 901 may execute a program for realizing the function of “unit” in cooperation with each other.
In addition, information, data, signal values, and variable values indicating the results of the processing of “unit” are stored as files in the memory 903, the auxiliary storage device 902, or a register or cache memory in the processor 901.

「部」を「サーキットリー」で提供してもよい。
また、「部」を「回路」又は「工程」又は「手順」又は「処理」に読み替えてもよい。
「回路」及び「サーキットリー」は、プロセッサ901だけでなく、ロジックIC又はGA(Gate Array)又はASIC(Application Specific Integrated Circuit)又はFPGA(Field−Programmable Gate Array)といった他の種類の処理回路をも包含する概念である。
なお、プログラムプロダクトと称されるものは、「部」として説明している機能を実現するプログラムが記録された記憶媒体、記憶装置などであり、見た目の形式に関わらず、コンピュータ読み取り可能なプログラムをロードしているものである。
The “part” may be provided as “circuitry”.
Further, “part” may be read as “circuit”, “process”, “procedure”, or “processing”.
“Circuit” and “Circuitry” include not only the processor 901 but also other types of processing circuits such as a logic IC or GA (Gate Array) or ASIC (Application Specific Integrated Circuit) or FPGA (Field-Programmable Gate Array). It is a concept to include.
Note that what is called a program product is a storage medium, a storage device, or the like on which a program that realizes the function described as a “part” is recorded. It is what you are loading.

***効果の説明*** *** Explanation of effects ***

本実施の形態に係るソースコード生成装置20では、ソースコードの雛型、条件記述、処理記述などの正常記述の自動生成に加え、例外と処理の優先度とを考慮したソースコードの自動生成が可能となる。よって、ソースコード作成時間を削減する効果がある。   In the source code generation device 20 according to the present embodiment, in addition to automatic generation of normal descriptions such as source code templates, condition descriptions, and process descriptions, automatic generation of source codes taking into account exceptions and processing priorities is performed. It becomes possible. Therefore, there is an effect of reducing the source code creation time.

本実施の形態に係るソースコード生成装置20では、ハードウェア物理項目に対して、任意の例外を定義した物理項目リストから物理項目リストに定義されている各操作をソースコードとして生成する。生成された全操作のソースコードに対して、同一のハードウェア物理項目に対する全例外のソースコードを割り付ける。このような処理により、例外記述生成部において、ハードウェア物理項目に属する複数の操作へ例外処理毎の例外処理ソースコードを自動生成する。このように、本実施の形態に係るソースコード生成装置20では、すべての例外事象の条件分岐を自動で出力することで、更に作成時間の削減効果を高めることができる。   In the source code generation device 20 according to the present embodiment, each operation defined in the physical item list is generated as a source code from a physical item list in which an arbitrary exception is defined for a hardware physical item. All exception source codes for the same hardware physical item are allocated to the generated source codes of all operations. By such processing, the exception description generation unit automatically generates exception processing source code for each exception processing for a plurality of operations belonging to the hardware physical item. As described above, in the source code generation device 20 according to the present embodiment, it is possible to further increase the effect of reducing the creation time by automatically outputting the conditional branches of all exceptional events.

本実施の形態に係るソースコード生成装置20では、優先度制御生成部を備えているので、機能の優先順位の制御プログラムを各機能のソースコードに持つ必要がない。そのため、ソースコード量を削減することができる。また、優先度制御機能により、機能優先度を考慮した切り替えが可能となる。   Since the source code generation apparatus 20 according to the present embodiment includes the priority control generation unit, it is not necessary to have a function priority control program in the source code of each function. As a result, the amount of source code can be reduced. Further, the priority control function enables switching in consideration of the function priority.

実施の形態2.
本実施の形態では、主に、実施の形態1と異なる点について説明する。
本実施の形態では、機能項目に対する処理の優先度の仕様記述方法とコード生成方法とについて説明する。
Embodiment 2. FIG.
In the present embodiment, differences from the first embodiment will be mainly described.
In the present embodiment, a specification description method and a code generation method for processing priority for function items will be described.

***構成の説明***
図11を用いて、本実施の形態に係るソースコード生成システム800aのブロック構成につて説明する。
本実施の形態に係るソースコード生成装置20aでは、各機能項目の優先度を考慮し、実行することが可能となる。
*** Explanation of configuration ***
The block configuration of the source code generation system 800a according to this embodiment will be described with reference to FIG.
The source code generation device 20a according to the present embodiment can be executed in consideration of the priority of each function item.

図11に示すように、ソースコード生成装置20aは、実施の形態1の優先度制御生成部60、優先度制御ソースコード303に替えて、優先度制御生成部601、優先度制御ソースコード3031を有する。優先度制御生成部601は、優先度制御ソースコード3031を生成する。   As illustrated in FIG. 11, the source code generation device 20 a includes a priority control generation unit 601 and a priority control source code 3031 instead of the priority control generation unit 60 and the priority control source code 303 according to the first embodiment. Have. The priority control generation unit 601 generates priority control source code 3031.

優先度制御生成部601は、実行中の処理項目の親処理項目の優先度1075aと、実行が要求された処理項目の親処理項目の優先度とに基づいて、実行が要求された処理項目の実行の可否を判定する優先度制御機能を有する優先度制御ソースコード3031を生成する。
優先度制御生成部601は、実行が要求された処理項目の親処理項目と異なる親処理項目を有する実行中の処理項目がある場合には、実行が要求された処理項目の親処理項目の優先度と実行中の処理項目の親処理項目の優先度とを比較する。優先度制御生成部601は、優先度が低い方の親処理項目を有する処理項目の実行を不可とすることで、異なる子項目同士の比較を省略できる。
The priority control generation unit 601 determines the process item requested to be executed based on the priority 1075a of the parent process item of the process item being executed and the priority of the parent process item of the process item requested to be executed. A priority control source code 3031 having a priority control function for determining whether or not execution is possible is generated.
When there is a process item being executed having a parent process item different from the parent process item of the process item requested to be executed, the priority control generation unit 601 gives priority to the parent process item of the process item requested to be executed. And the priority of the parent process item of the process item being executed are compared. The priority control generation unit 601 can omit the comparison of different child items by disabling execution of the process item having the parent process item with the lower priority.

***動作の説明***
図12を用いて、本実施の形態に係る優先度制御ソースコード3031を実現する優先度制御部3031aの優先度制御処理の手順について説明する。ここで、優先度制御ソースコード3031の優先度制御機能を実現する構成部を優先度制御部3031aとする。
*** Explanation of operation ***
The procedure of the priority control process of the priority control unit 3031a that realizes the priority control source code 3031 according to the present embodiment will be described with reference to FIG. Here, a component that realizes the priority control function of the priority control source code 3031 is referred to as a priority control unit 3031a.

S1201において、優先度制御部3031aは、実行要求の機能項目の優先レベルを取得する。
S1202において、優先度制御部3031aは、優先レベルを判定し、優先レベルが0の場合、S1212の実行許可に進む。
優先レベルが0以外の場合、優先度制御部3031aは、S1203に進み、実行中の機能情報を取得する。
In S1201, the priority control unit 3031a acquires the priority level of the function item of the execution request.
In S1202, the priority control unit 3031a determines the priority level. If the priority level is 0, the process proceeds to S1212.
If the priority level is other than 0, the priority control unit 3031a proceeds to S1203 and acquires the function information being executed.

S1204において、優先度制御部3031aは、実行中機能が無い場合、S1212の実行許可に進む。
優先度制御部3031aは、実行中機能が有る場合、S1205で異なる親クラスの実行中機能があるか否かを判定する。親クラスとは、親機能項目すなわち親処理項目のことである。
優先度制御部3031aは、異なる親クラスの実行中機能が有る場合、S1207に進む。
優先度制御部3031aは、異なる親クラスの実行中機能が無い場合、S1206に進む。
In S1204, when there is no function being executed, the priority control unit 3031a proceeds to the execution permission of S1212.
If there is a function being executed, the priority control unit 3031a determines whether there is a function being executed of a different parent class in S1205. The parent class is a parent function item, that is, a parent processing item.
If there is an executing function of a different parent class, the priority control unit 3031a proceeds to S1207.
If there is no executing function of a different parent class, the priority control unit 3031a proceeds to S1206.

S1206において、優先度制御部3031aは、同じ親クラスの実行中機能が有るか否かを判定する。優先度制御部3031aは、同じ親クラスの実行中機能が有る場合、S1209に進む。優先度制御部3031aは、同じ親クラスの実行中機能が無い場合、S1212の実行許可に進む。   In S1206, the priority control unit 3031a determines whether or not there is an executing function of the same parent class. If there is an executing function of the same parent class, the priority control unit 3031a proceeds to S1209. If there is no executing function of the same parent class, the priority control unit 3031a proceeds to S1212 to permit execution.

S1207において、優先度制御部3031aは、実行中機能と実行要求機能との親クラス同士の優先レベルを比較する。S1208において、優先度制御部3031aは、実行中機能と実行要求機能との親クラス同士の優先レベルの比較の結果、実行要求機能の親クラスの優先レベルが低い場合はS1211の実行不許可とする。優先度制御部3031aは、実行要求機能の親クラスの優先レベルが高い場合はS1206に進む。   In S1207, the priority control unit 3031a compares the priority levels of the parent classes of the function being executed and the execution request function. In S1208, when the priority level of the parent class of the execution request function is low as a result of the comparison of the priority levels of the parent class of the function being executed and the execution request function, the priority control unit 3031a does not permit the execution of S1211. . If the priority level of the parent class of the execution request function is high, the priority control unit 3031a proceeds to S1206.

S1209において、優先度制御部3031aは、同じ親クラスの実行中機能と実行要求機能との優先レベル同士を比較し、実行要求機能の優先レベルが高い場合、S1212の実行許可とする。優先度制御部3031aは、実行要求機能の優先レベルが低い場合、S1211の実行不許可とする。
以上で、優先度制御処理の手順についての説明を終わる。
In S1209, the priority control unit 3031a compares the priority levels of the executing function and the execution request function of the same parent class, and when the priority level of the execution request function is high, the execution permission of S1212 is set. If the priority level of the execution request function is low, the priority control unit 3031a does not permit the execution of S1211.
This is the end of the description of the priority control processing procedure.

次に、図13を用いて、本実施の形態にかかる優先度制御部3031aによる各機能の継承関係の例について説明する。
機能B2の場合、実行許可を判断するためには親クラスである機能Bの優先レベルを考慮して、実行許可判定を行う。親クラスの参照方法は、各言語の継承クラスの参照機能を利用する。
例えば、機能A2が実行要求機能であり、機能B1及び機能B2が実行中機能である場合、機能A2と、機能B1及び機能B2とは親クラスが異なる。そこで親クラス同士の優先レベルを比較すると、機能A2の親クラスである機能Aの優先レベル「1」は、機能B1及び機能B2の親クラスである機能Bの優先レベル「2」よりも低い。そこで、機能A2と機能B1及び機能B2の各々との優先レベルを比較するまでもなく、機能Aは実行不可となる。
Next, an example of the inheritance relationship of each function by the priority control unit 3031a according to the present embodiment will be described with reference to FIG.
In the case of the function B2, in order to determine the execution permission, the execution permission determination is performed in consideration of the priority level of the function B which is the parent class. The parent class reference method uses the reference function of the inherited class of each language.
For example, when the function A2 is an execution request function and the functions B1 and B2 are executing functions, the parent classes of the function A2, the function B1, and the function B2 are different. Therefore, when the priority levels of the parent classes are compared, the priority level “1” of the function A that is the parent class of the function A2 is lower than the priority level “2” of the function B that is the parent class of the functions B1 and B2. Therefore, the function A cannot be executed without comparing the priority levels of the function A2 and each of the functions B1 and B2.

***効果の説明***
本実施の形態に係るソースコード生成装置20aでは、実行中の機能を階層に従って上位機能毎に管理し、優先度比較を段階的に行う。起動する機能の上位機能と、実行中の機能の上位機能同士で比較し、比較対象を絞り込む。次に同一階層の機能同士で優先度を比較する。これにより、比較対象数を減らすことができ、処理時間の短縮を可能とする。
*** Explanation of effects ***
In the source code generation device 20a according to the present embodiment, the function being executed is managed for each higher-level function according to the hierarchy, and the priority comparison is performed step by step. Compare the higher-level functions of the function to be activated with the higher-level functions of the function being executed, and narrow down the comparison target. Next, priorities are compared between functions in the same hierarchy. As a result, the number of comparison targets can be reduced, and the processing time can be shortened.

本実施の形態に係るソースコード生成装置20aでは、優先順位の制御は、各機能のソースコードで持たず、機能優先度の制御の役割を持つ実行優先度制御に集約することで、ソースコード量の削減を可能とする。   In the source code generation device 20a according to the present embodiment, the priority order control is not included in the source code of each function, but is aggregated into execution priority control having a role of function priority control. Can be reduced.

本実施の形態に係るソースコード生成装置20では、起動する機能と全ての実行中の機能の優先度を比較する必要がなく、優先度の比較処理時間を短縮することができる。   In the source code generation device 20 according to the present embodiment, it is not necessary to compare the priorities of the function to be activated and all the functions being executed, and the priority comparison processing time can be shortened.

上記の実施の形態では、取得部40、振舞い記述生成部501、操作生成部502、例外記述生成部503、条件記述生成部504、処理記述生成部505、優先度制御生成部60がそれぞれ独立した機能ブロックとしてソースコード生成装置20を構成している。しかし、ソースコード生成装置20の構成は任意である。また、振舞い記述生成部501、操作生成部502、例外記述生成部503、条件記述生成部504、処理記述生成部505をひとつの機能ブロックで実現してもよい。また、優先度制御生成部60の機能をソースコード生成部50が備えていてもよい。
ソースコード生成装置20の機能ブロックは、実施の形態に記載した機能を実現することができれば、任意であり、これらの機能ブロックを、他のどのような組み合わせでファイル管理装置を構成しても構わない。
In the above embodiment, the acquisition unit 40, the behavior description generation unit 501, the operation generation unit 502, the exception description generation unit 503, the condition description generation unit 504, the process description generation unit 505, and the priority control generation unit 60 are independent of each other. The source code generation device 20 is configured as a functional block. However, the configuration of the source code generation device 20 is arbitrary. Further, the behavior description generation unit 501, the operation generation unit 502, the exception description generation unit 503, the condition description generation unit 504, and the process description generation unit 505 may be realized by one functional block. Further, the source code generation unit 50 may include the function of the priority control generation unit 60.
The function blocks of the source code generation device 20 are arbitrary as long as the functions described in the embodiment can be realized, and the file management device may be configured by any combination of these function blocks. Absent.

以上、実施の形態1,2について説明したが、これらの2つの実施の形態のうち、1つの実施の形態を部分的に実施しても構わない。あるいは、これらの2つの実施の形態のうち、複数を部分的に組み合わせて実施しても構わない。その他、これらの2つの実施の形態を、全体としてあるいは部分的に、どのように組み合わせて実施しても構わない。
なお、上記の実施の形態は、本質的に好ましい例示であって、本発明、その適用物や用途の範囲を制限することを意図するものではなく、必要に応じて種々の変更が可能である。
Although the first and second embodiments have been described above, one of the two embodiments may be partially implemented. Alternatively, a plurality of these two embodiments may be partially combined. In addition, these two embodiments may be implemented in any combination as a whole or in part.
In addition, said embodiment is an essentially preferable illustration, Comprising: It does not intend restrict | limiting the range of this invention, its application thing, or a use, A various change is possible as needed. .

20,20a ソースコード生成装置、30 ソースコード、40 取得部、50 ソースコード生成部、60,601 優先度制御生成部、101 インプット仕様書、102 物理項目リスト、103 機能項目リスト、104 物理項目の振舞い記述、105 機能項目の振舞い記述、107 処理項目リスト、108 振舞い記述情報、301 物理項目クラス、302 機能項目クラス、303,3031 優先度制御ソースコード、501 振舞い記述生成部、502 操作生成部、503 例外記述生成部、504 条件記述生成部、505 処理記述生成部、800,800a ソースコード生成システム、901 プロセッサ、902 補助記憶装置、903 メモリ、904 通信装置、905 入力インタフェース、906 ディスプレイインタフェース、907 入力装置、908 ディスプレイ、910 信号線、911,912 ケーブル、1071 処理項目リスト記憶部、1072 処理項目、1072a 複数の処理項目、1073 操作情報、1073a 複数の操作、1074 例外処理情報、1075 優先度、1075a 実行中の処理項目の親処理項目の優先度、1075b 実行が要求された処理項目の親処理項目の優先度、1081 振舞い記述情報記憶部、3031a 優先度制御部、9041 レシーバー、9042 トランスミッター、10721 親処理項目、10722 子処理項目、S10 ソースコード生成処理、S100 取得処理、S100a 振舞い記述生成処理、S200 継承記述処理、S300 操作生成処理、S400 例外記述生成処理、S500 条件記述生成処理、S600 処理記述生成処理。   20, 20a Source code generation device, 30 source code, 40 acquisition unit, 50 source code generation unit, 60, 601 priority control generation unit, 101 input specification, 102 physical item list, 103 function item list, 104 physical item Behavior description, 105 Function item behavior description, 107 Process item list, 108 Behavior description information, 301 Physical item class, 302 Function item class, 303, 3031 Priority control source code, 501 Behavior description generation unit, 502 Operation generation unit, 503 Exception description generation unit, 504 Condition description generation unit, 505 Process description generation unit, 800, 800a Source code generation system, 901 processor, 902 auxiliary storage device, 903 memory, 904 communication device, 905 input interface, 906 display Interface, 907 input device, 908 display, 910 signal line, 911, 912 cable, 1071 processing item list storage unit, 1072 processing item, 1072a multiple processing items, 1073 operation information, 1073a multiple operations, 1074 exception processing information, 1075 Priority, 1075a Priority of parent process item of the process item being executed, 1075b Priority of parent process item of the process item requested to be executed, 1081 Behavior description information storage unit, 3031a Priority control unit, 9041 Receiver, 9042 Transmitter, 10721 Parent processing item, 10722 Child processing item, S10 Source code generation processing, S100 acquisition processing, S100a Behavior description generation processing, S200 Inheritance description processing, S300 Operation generation processing, S400 Exception description generation processing S500, condition description generation process, S600 process description generation process.

Claims (8)

処理の項目を表す処理項目と、前記処理項目に含まれる操作を表す操作情報と、例外処理を表す例外処理情報とを含む処理項目リストを記憶する処理項目リスト記憶部と、
前記処理項目リストに基づいて記述された前記処理項目の振舞いを記述する振舞い記述情報を記憶する振舞い記述情報記憶部と、
前記処理項目を用いて、クラスを定義するソースコードを生成する振舞い記述生成部と、
前記操作情報を用いて、前記操作を定義するソースコードを生成する操作生成部と、
前記例外処理情報を用いて、前記操作の実行中に発生する前記例外処理を表すソースコードを生成する例外記述生成部と、
前記振舞い記述情報を用いて、前記操作の条件分岐を表すソースコードを生成する条件記述生成部と、
前記振舞い記述情報を用いて、前記操作の処理内容を表すソースコードを生成する処理記述生成部と
を備えるソースコード生成システム。
A process item list storage unit that stores a process item list that includes a process item that represents a process item, operation information that represents an operation included in the process item, and exception process information that represents an exception process;
A behavior description information storage unit that stores behavior description information that describes the behavior of the processing item described based on the processing item list;
A behavior description generator for generating a source code defining a class using the processing items;
Using the operation information, an operation generation unit that generates a source code that defines the operation;
Using the exception handling information, an exception description generator for generating source code representing the exception handling that occurs during execution of the operation;
Using the behavior description information, a condition description generation unit that generates a source code representing a conditional branch of the operation;
A source code generation system comprising: a process description generation unit that generates a source code representing the processing content of the operation using the behavior description information.
前記処理項目リストは、
前記操作として複数の操作を表す前記操作情報を有し、
前記操作生成部は、
前記複数の操作の各操作を定義するソースコードを生成し、
前記例外記述生成部は、
前記複数の操作の各操作を定義するソースコードに対して前記例外処理を表すソースコードを割り付ける請求項1に記載のソースコード生成システム。
The processing item list is:
The operation information representing a plurality of operations as the operation,
The operation generator is
Generating source code defining each operation of the plurality of operations;
The exception description generation unit
The source code generation system according to claim 1, wherein source code representing the exception processing is assigned to source code defining each operation of the plurality of operations.
前記処理項目リストは、
前記処理項目として、複数の処理項目を有し、前記複数の処理項目の各々に優先度が設定され、
前記ソースコード生成システムは、
前記処理項目の各々に設定された優先度に基づいて、実行中の処理項目の優先度と実行が要求された処理項目の優先度とを比較し、優先度が高い方の処理項目を実行する優先度制御機能を有する優先度制御ソースコードを生成する優先度制御生成部を備える請求項1または2に記載のソースコード生成システム。
The processing item list is:
As the processing item, it has a plurality of processing items, and a priority is set for each of the plurality of processing items,
The source code generation system includes:
Based on the priority set for each of the process items, the priority of the process item being executed is compared with the priority of the process item requested to be executed, and the process item with the higher priority is executed. The source code generation system according to claim 1, further comprising a priority control generation unit that generates a priority control source code having a priority control function.
前記処理項目リストは、
前記処理項目として、複数の処理項目を有し、
前記複数の処理項目の各々に優先度が設定されるとともに、前記複数の処理項目の各々が上位の階層である親処理項目を有し、
実行中の処理項目の親処理項目の優先度と、実行が要求された処理項目の親処理項目の優先度とに基づいて、実行が要求された処理項目の実行の可否を判定する優先度制御機能を有する優先度制御ソースコードを生成する優先度制御生成部を備える請求項1または2に記載のソースコード生成システム。
The processing item list is:
As the processing item, it has a plurality of processing items,
A priority is set for each of the plurality of processing items, and each of the plurality of processing items has a parent processing item that is a higher hierarchy,
Priority control that determines whether or not a process item requested to be executed can be executed based on the priority of the parent process item of the process item being executed and the priority of the parent process item of the process item requested to be executed The source code generation system according to claim 1, further comprising a priority control generation unit that generates a priority control source code having a function.
前記優先度制御生成部は、
実行が要求された処理項目の親処理項目と異なる親処理項目を有する実行中の処理項目がある場合には、前記実行が要求された処理項目の親処理項目の優先度と前記実行中の処理項目の親処理項目の優先度とを比較し、優先度が低い方の親処理項目を有する処理項目の実行を不可とする請求項4に記載のソースコード生成システム。
The priority control generation unit
When there is a process item being executed having a parent process item different from the parent process item of the process item requested to be executed, the priority of the parent process item of the process item requested to be executed and the process being executed 5. The source code generation system according to claim 4, wherein the priority of the parent processing item of the item is compared, and execution of the processing item having the parent processing item with the lower priority is prohibited.
処理の項目を表す処理項目と、前記処理項目に含まれる操作を表す操作情報と、例外処理を表す例外処理情報とを含む処理項目リストと、前記処理項目リストに基づいて記述された前記処理項目の振舞いを記述する振舞い記述情報とを取得する取得部と、
前記処理項目を用いて、クラスを定義するソースコードを生成する振舞い記述生成部と、
前記操作情報を用いて、前記操作を定義するソースコードを生成する操作生成部と、
前記例外処理情報を用いて、前記操作の実行中に発生する前記例外処理を表すソースコードを生成する例外記述生成部と、
前記振舞い記述情報を用いて、前記操作の条件分岐を表すソースコードを生成する条件記述生成部と、
前記振舞い記述情報を用いて、前記操作の処理内容を表すソースコードを生成する処理記述生成部と
を備えるソースコード生成装置。
A process item representing a process item, operation information representing an operation included in the process item, exception process information representing an exception process, and the process item described based on the process item list An acquisition unit for acquiring behavior description information describing the behavior of
A behavior description generator for generating a source code defining a class using the processing items;
Using the operation information, an operation generation unit that generates a source code that defines the operation;
Using the exception handling information, an exception description generator for generating source code representing the exception handling that occurs during execution of the operation;
Using the behavior description information, a condition description generation unit that generates a source code representing a conditional branch of the operation;
A source code generation device comprising: a process description generation unit that generates a source code representing the processing content of the operation using the behavior description information.
処理の項目を表す処理項目と、前記処理項目に含まれる操作を表す操作情報と、例外処理を表す例外処理情報とを含む処理項目リストを記憶する処理項目リスト記憶部と、前記処理項目リストに基づいて記述された前記処理項目の振舞いを記述する振舞い記述情報を記憶する振舞い記述情報記憶部とを備えるソースコード生成システムのソースコード生成方法において、
振舞い記述生成部が、前記処理項目を用いてクラスを定義するソースコードを生成し、
前記操作情報を用いて前記操作を定義するソースコードを生成する操作生成部と、
例外記述生成部が、前記例外処理情報を用いて前記操作の実行中に発生する前記例外処理を表すソースコードを生成し、
条件記述生成部が、前記振舞い記述情報を用いて前記操作の条件分岐を表すソースコードを生成し、
処理記述生成部が、前記振舞い記述情報を用いて前記操作の処理内容を表すソースコードを生成するソースコード生成方法。
A process item list storage unit that stores a process item that includes a process item that represents a process item, operation information that represents an operation included in the process item, and exception process information that represents an exception process; and In a source code generation method of a source code generation system, comprising: a behavior description information storage unit that stores behavior description information that describes the behavior of the processing item described based on
The behavior description generator generates source code that defines a class using the processing items,
An operation generation unit that generates a source code that defines the operation using the operation information;
An exception description generation unit generates source code representing the exception processing that occurs during execution of the operation using the exception processing information;
A condition description generation unit generates source code representing a conditional branch of the operation using the behavior description information,
A source code generation method in which a process description generation unit generates a source code representing the processing content of the operation using the behavior description information.
処理の項目を表す処理項目と、前記処理項目に含まれる操作を表す操作情報と、例外処理を表す例外処理情報とを含む処理項目リストと、前記処理項目リストに基づいて記述された前記処理項目の振舞いを記述する振舞い記述情報とを取得する取得処理と、
前記処理項目を用いてクラスを定義するソースコードを生成する振舞い記述生成処理と、
前記操作情報を用いて前記操作を定義するソースコードを生成する操作生成処理と、
前記例外処理情報を用いて前記操作の実行中に発生する前記例外処理を表すソースコードを生成する例外記述生成処理と、
前記振舞い記述情報を用いて前記操作の条件分岐を表すソースコードを生成する条件記述生成処理と、
前記振舞い記述情報を用いて前記操作の処理内容を表すソースコードを生成する処理記述生成処理と
をコンピュータに実行させるプログラム。
A process item representing a process item, operation information representing an operation included in the process item, exception process information representing an exception process, and the process item described based on the process item list Acquisition processing for acquiring behavior description information describing the behavior of
A behavior description generation process for generating a source code for defining a class using the processing items;
An operation generation process for generating a source code defining the operation using the operation information;
Exception description generation processing for generating source code representing the exception processing that occurs during execution of the operation using the exception processing information;
A condition description generation process for generating a source code representing a conditional branch of the operation using the behavior description information;
A program for causing a computer to execute a process description generating process for generating a source code representing the processing contents of the operation using the behavior description information.
JP2015081441A 2015-04-13 2015-04-13 Source code generation system, source code generation device, source code generation method and program Active JP6482362B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015081441A JP6482362B2 (en) 2015-04-13 2015-04-13 Source code generation system, source code generation device, source code generation method and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015081441A JP6482362B2 (en) 2015-04-13 2015-04-13 Source code generation system, source code generation device, source code generation method and program

Publications (2)

Publication Number Publication Date
JP2016201009A true JP2016201009A (en) 2016-12-01
JP6482362B2 JP6482362B2 (en) 2019-03-13

Family

ID=57424340

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015081441A Active JP6482362B2 (en) 2015-04-13 2015-04-13 Source code generation system, source code generation device, source code generation method and program

Country Status (1)

Country Link
JP (1) JP6482362B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115167834A (en) * 2022-09-08 2022-10-11 杭州新中大科技股份有限公司 Automatic source code generation method and device based on code datamation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10214191A (en) * 1996-11-27 1998-08-11 Toshiba Corp Device for supporting development applied to object-oriented programming, and method therefor
JP2003208307A (en) * 2002-01-16 2003-07-25 Hitachi Software Eng Co Ltd Source program generation system
JP2004287695A (en) * 2003-03-20 2004-10-14 Mitsubishi Electric Corp Program development support device, program development support method, program, and computer-readable storage medium recording the program
WO2007116490A1 (en) * 2006-03-31 2007-10-18 Fujitsu Limited Source code generation program, source code generation method, and source code generation device
JP2012212286A (en) * 2011-03-31 2012-11-01 Canaly Research Co Ltd Program development tool

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10214191A (en) * 1996-11-27 1998-08-11 Toshiba Corp Device for supporting development applied to object-oriented programming, and method therefor
JP2003208307A (en) * 2002-01-16 2003-07-25 Hitachi Software Eng Co Ltd Source program generation system
JP2004287695A (en) * 2003-03-20 2004-10-14 Mitsubishi Electric Corp Program development support device, program development support method, program, and computer-readable storage medium recording the program
WO2007116490A1 (en) * 2006-03-31 2007-10-18 Fujitsu Limited Source code generation program, source code generation method, and source code generation device
JP2012212286A (en) * 2011-03-31 2012-11-01 Canaly Research Co Ltd Program development tool

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115167834A (en) * 2022-09-08 2022-10-11 杭州新中大科技股份有限公司 Automatic source code generation method and device based on code datamation
CN115167834B (en) * 2022-09-08 2022-12-23 杭州新中大科技股份有限公司 Automatic source code generation method and device based on code datamation

Also Published As

Publication number Publication date
JP6482362B2 (en) 2019-03-13

Similar Documents

Publication Publication Date Title
JP5911562B2 (en) Method for adapting user interface and input control
US9558016B2 (en) Platform system, method for changing support hardware configuration of universal extensible firmware interface basic input output system and computer program product
US20140337824A1 (en) Out-of-band framework libraries within applications
US10585826B2 (en) Using processor types for processing interrupts in a computing device
CN109739600B (en) Data processing method, medium, device and computing equipment
BR112012027950B1 (en) computerized method of managing a plurality of subbuffers, non-transitory machine readable means and apparatus for managing a plurality of subbuffers
JP5778296B2 (en) Virtual computer system, virtualization mechanism, and data management method
CN107526625A (en) A kind of Java intelligence contract safety detection methods based on bytecode inspection
KR20220050895A (en) Data retention technique using memory aperture flush order
US20230289187A1 (en) Method and apparatus for rectifying weak memory ordering problem
CN110825499A (en) Method and device for realizing security isolation based on unified container cloud platform
US11036527B2 (en) Class splitting in object-oriented environments
US10540151B1 (en) Graphical customization of a firmware-provided user interface (UI)
JP6482362B2 (en) Source code generation system, source code generation device, source code generation method and program
CN116501415A (en) Command execution method and device, electronic equipment and computer readable storage medium
US9275426B2 (en) Method and apparatus for unifying graphics processing unit computation languages
US10649743B2 (en) Application developing method and system
US11809833B2 (en) System and method for image localization in knowledge base content
JP2013161219A (en) Code generation device and code generation program
US20230195666A1 (en) Providing Platform Management Profiles to Platform Management Drivers on Electronic Devices
US20230205532A1 (en) Offloading computation based on extended instruction set architecture
JP5963313B2 (en) Information processing apparatus, method, and program
JP7401252B2 (en) Information processing device, information processing method and program
JP7370264B2 (en) Traceability management device, traceability management method, and traceability management program
US20220414222A1 (en) Trusted processor for saving gpu context to system memory

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180221

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20181031

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20181106

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181224

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20190115

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20190212

R150 Certificate of patent or registration of utility model

Ref document number: 6482362

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250