JP2022047714A - Model generation system - Google Patents

Model generation system Download PDF

Info

Publication number
JP2022047714A
JP2022047714A JP2020153639A JP2020153639A JP2022047714A JP 2022047714 A JP2022047714 A JP 2022047714A JP 2020153639 A JP2020153639 A JP 2020153639A JP 2020153639 A JP2020153639 A JP 2020153639A JP 2022047714 A JP2022047714 A JP 2022047714A
Authority
JP
Japan
Prior art keywords
model
input
output
specification data
creation system
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.)
Pending
Application number
JP2020153639A
Other languages
Japanese (ja)
Inventor
明紘 吉沢
Akihiro Yoshizawa
広明 正岡
Hiroaki Masaoka
善強 李
Shan Qiang Li
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.)
AZAPA CO Ltd
Original Assignee
AZAPA CO Ltd
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 AZAPA CO Ltd filed Critical AZAPA CO Ltd
Priority to JP2020153639A priority Critical patent/JP2022047714A/en
Publication of JP2022047714A publication Critical patent/JP2022047714A/en
Pending legal-status Critical Current

Links

Images

Abstract

To solve a disadvantage that it is difficult to understand an intent of a program and improve an efficiency of a development in a model base development.SOLUTION: A model generation system 100 reads specification data 11 that recites a content of a program with text, and generates a model by replacing a keyword included in the specification data into a block while referring to a conversion database 107. Several models including the generated model are combined and connected based on model layout data 12 defining an execution order of the models to generate a combination model in a model base development. By doing this, a development efficiency of the program can be improved by taking advantage of a model base development that while making it easy to understand an intent of a developer based on the specification data for each model that builds the combination model, it is easy to visually grasp the execution order and inputs/outputs for combination among the entire models.SELECTED DRAWING: Figure 1

Description

本発明は、予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルを作成するモデル作成システムに関する。 The present invention relates to a model creation system that creates a model that represents the contents of a control program by combining blocks that indicate predetermined processing contents.

従来、車両の制御のためのプログラムの開発において、モデルベース開発が用いられることが多い。モデルベース開発とは、開発者がプログラムをソースコードの形で記述するのではなく、予め定められた処理内容を示すブロックの組み合わせにより、視認性の高い方法でプログラムを記述する方法である。モデルベース開発においては、例えば、Matlab(登録商標)、Simulink(登録商標)などが存在する。かかるモデルベース開発の効率を向上するため、例えば特許文献1は、複数のモデルの入出力を自動的に結合する際に、モデル間の入出力データの整合性を確認する技術を提供している。 Conventionally, model-based development is often used in the development of programs for controlling vehicles. Model-based development is a method in which a developer does not describe a program in the form of source code, but describes the program in a highly visible manner by combining blocks indicating predetermined processing contents. In model-based development, for example, MATLAB (registered trademark), Simulink (registered trademark) and the like exist. In order to improve the efficiency of such model-based development, for example, Patent Document 1 provides a technique for confirming the consistency of input / output data between models when automatically combining the input / output of a plurality of models. ..

特開2014-186565号公報Japanese Unexamined Patent Publication No. 2014-186565

モデルベース開発は、視認性が高くプログラムの内容を理解しやすい利点があるものの、個々のモデルには説明が付されていない分、複雑な制御プログラムの全体をモデルで表現した場合、細部のモデルについては、かえって理解し難いという短所があった。従来、モデルベース開発の利点を活かしつつ、かかる短所を解決する方法は提案されていなかった。
本発明は、かかる課題を解決するためになされたものであり、プログラムの意図を理解しづらいという短所を解決しつつ、モデルベース開発の効率を向上できる技術を提供することを目的とする。
Model-based development has the advantage of high visibility and easy understanding of the contents of the program, but since individual models are not explained, detailed models can be used when the entire complex control program is represented by a model. On the contrary, it had the disadvantage that it was difficult to understand. Previously, no method has been proposed to solve these shortcomings while taking advantage of model-based development.
The present invention has been made to solve such a problem, and an object of the present invention is to provide a technique capable of improving the efficiency of model-based development while solving the disadvantage that it is difficult to understand the intention of the program.

本発明は、
予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルを作成するモデル作成システムであって、
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力部と、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースと、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成部とを備え、
前記モデル作成部は、
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するモデル作成システムと構成することができる。
The present invention
It is a model creation system that creates a model that expresses the contents of a control program by combining blocks that indicate predetermined processing contents.
A specification input unit that reads specification data that describes the contents of the control program in text, and
A conversion database that stores the correspondence between a plurality of keywords used in the specification data and the block, and
It is provided with a model creation unit that creates the model by referring to the conversion database based on the specification data.
The model creation unit
A plurality of the keywords are sequentially extracted from the beginning of the specification data and replaced with the plurality of blocks.
By connecting the corresponding input / output between the blocks, it can be configured as a model creation system that creates the model.

本発明における仕様書データは、プログラムの内容をテキストで記述しているため、個々のモジュールのように規模の小さいプログラムであれば、その意図を理解しやすい利点がある。本発明によれば、このような仕様書データを読み込んで、ブロックに置換することにより、モデルを自動的に作成することができる。こうして作成されたモデルを結合させて全体のプログラムを構築するようにすれば、個々のモジュールについては、意図を理解しやすい仕様書データによる開発を適用しつつ、プログラム全体については、視認性の高いモデルを活用することができ、双方の利点を活かした効率的な開発を実現することが可能となる。 Since the specification data in the present invention describes the contents of the program in text, there is an advantage that the intention of the program can be easily understood if it is a small-scale program such as an individual module. According to the present invention, a model can be automatically created by reading such specification data and replacing it with a block. If the models created in this way are combined to construct the entire program, the development of the specification data that makes it easy to understand the intention is applied to each module, and the entire program is highly visible. The model can be utilized, and efficient development that takes advantage of both can be realized.

本発明におけるブロックへの配置とは、モデルベース開発で用いられる環境、例えば、Matlab(登録商標)、Simulink(登録商標)などに応じて、モデルを表すデータを作成することを意味する。同様にモデルの表記規則も環境に応じたものを用いればよい。本発明では、変換データベースを用いてキーワードをブロックに置換するが、この際に、併せてブロックに応じた表記規則が適用されることになる。表記規則は、ブロックと併せて変換データベースに記憶しておいてもよいし、ブロックに置換した際に、モデルベース開発で用いられる環境を呼び出すことで、当該環境下で用意されている機能を利用するものとしてもよい。
仕様書データの記述内容、記述形式は任意に決めることができる。開発者がより理解しやすい自然言語を用いて記述してもよい。また、客観性の高い論理式、数式などの形式で記述してもよい。ブロックとキーワードとの対応関係も任意に決めることができる。キーワードは、一文字、複数の文字列、特定の記号など種々の態様をとることができる。
Arrangement on a block in the present invention means creating data representing a model according to the environment used in model-based development, for example, Matlab (registered trademark), Simulink (registered trademark), and the like. Similarly, the notation rules of the model may be those according to the environment. In the present invention, the keyword is replaced with a block by using the conversion database, and at this time, the notation rule according to the block is also applied. The notation rules may be stored in the conversion database together with the block, or when replaced with a block, the environment used in model-based development can be called to use the functions provided under that environment. You may do it.
The description content and description format of the specification data can be determined arbitrarily. It may be written in a natural language that is easier for developers to understand. Further, it may be described in a format such as a highly objective logical formula or mathematical formula. The correspondence between blocks and keywords can also be determined arbitrarily. The keyword can take various forms such as one character, a plurality of character strings, and a specific symbol.

また、モデル作成部は、前記ブロックに応じた処理内容が実現されるよう前記モデルの表記規則に従って、前記複数のブロックの配置を決定する機能を備えても良い。例えば、モデルの表記規則として、左から右に向かって、入力から出力までの処理の流れを表す規則が設定されているときは、その流れに従って各ブロックを配置することにより、視覚的に理解しやすいモデルを作成することができる。
このブロックの配置は、仕様書データに基づいてブロックに置換した後、結線前に行うものとしてもよいし、結線まで完了した後に行ってもよい。
Further, the model creation unit may have a function of determining the arrangement of the plurality of blocks according to the notation rules of the model so that the processing contents corresponding to the blocks are realized. For example, if a rule that represents the flow of processing from input to output is set as a notation rule of the model from left to right, it is visually understood by arranging each block according to the flow. You can create an easy model.
The arrangement of this block may be performed after replacing the block with a block based on the specification data and before the connection, or may be performed after the connection is completed.

本発明のモデル作成システムにおいては、
前記キーワードは、前記処理内容に基づいて階層的に構成されているものとしてもよい。
In the model creation system of the present invention,
The keyword may be hierarchically configured based on the processing content.

階層的とは、上位層の処理内容に応じた上位層のキーワードと、それぞれのキーワードまたは処理内容の下位層に属するキーワードまたは処理内容からなる構造を言う。階層は、2階層としてもよいし、3階層以上としてもよい。このように階層的にすることにより、プログラムの内容が複雑であっても表現することが可能となる。 Hierarchical means a structure consisting of keywords in the upper layer corresponding to the processing content of the upper layer and keywords or processing contents belonging to the lower layer of each keyword or processing content. The hierarchy may be two layers or three or more layers. By making it hierarchical in this way, it is possible to express even if the contents of the program are complicated.

本発明のモデル作成システムにおいては、
前記処理内容に対する標準のキーワードと、他の表記によるキーワードとを対応づけたキーワードデータベースを有し、
前記モデルの作成に先立って、または前記モデルの作成と並行して、前記仕様書データのキーワードを、前記キーワードデータベースを参照して、標準のキーワードに整える標準化処理部を備えるものとしてもよい。
In the model creation system of the present invention,
It has a keyword database that associates standard keywords for the processing content with keywords in other notations.
Prior to the creation of the model, or in parallel with the creation of the model, a standardization processing unit for adjusting the keywords of the specification data into standard keywords by referring to the keyword database may be provided.

こうすることにより、仕様書データを柔軟に記載することができる。また、仕様書データを標準のキーワードに整えることにより、モデルの作成を容易に安定して行うことが可能となる。
キーワードデータベースは、種々の対応関係が可能である。例えば、標準のキーワードを英語、他のキーワードを日本語としておけば、開発者がより理解しやすい日本語で仕様書データを記述することが可能となる。他の態様として、標準のキーワードに対して、誤りやすい表記や、表記のゆれを、他のキーワードとして対応づけてもよい。こうすることにより、仕様書データが規定された表記に合致していないときでも、モデルの作成が可能となる。
By doing so, the specification data can be flexibly described. In addition, by adjusting the specification data to standard keywords, it becomes possible to easily and stably create a model.
The keyword database can have various correspondences. For example, if the standard keyword is English and the other keywords are Japanese, it is possible to describe the specification data in Japanese, which is easier for the developer to understand. As another aspect, a notation that is easy to make an error or a fluctuation of the notation may be associated with the standard keyword as another keyword. By doing so, it is possible to create a model even when the specification data does not match the specified notation.

本発明のモデル作成システムにおいては、
前記仕様書データには、前記モデルを作成する単位を規定するための所定の記述子が含まれており、
前記モデル作成部は、前記記述子で規定された単位ごとに前記モデルを、単位モデルとして作成するものとしてもよい。
In the model creation system of the present invention,
The specification data includes a predetermined descriptor for defining the unit for creating the model.
The model creation unit may create the model as a unit model for each unit specified in the descriptor.

こうすることにより複雑な内容のプログラムであっても、単位に分けて仕様書データを作成することができる。また、単位に分けることにより、モデル作成を容易かつ安定して行うことができる。
単位を規定するための記述子は任意に決めることができる。一文字であってもよいし、文字列であってもよい。
By doing so, even if the program has complicated contents, the specification data can be created by dividing it into units. Further, by dividing into units, model creation can be performed easily and stably.
The descriptor for defining the unit can be arbitrarily determined. It may be a single character or a character string.

上述の単位モデルを作成する態様においては、
前記モデル作成部は、さらに、
前記仕様書データの記述に基づいて複数の前記単位モデルの優先順位を設定し、
前記単位モデル間で対応する入出力を結線して、前記仕様書データの全体に対応するモデルを作成するものとしてもよい。
In the mode of creating the unit model described above,
The model creation unit further
Prioritize a plurality of the unit models based on the description of the specification data, and set the priority.
The corresponding input / output may be connected between the unit models to create a model corresponding to the entire specification data.

こうすることにより、単位モデル間の結線を自動化することができ、誤りなく効率的にモデル作成することができる利点がある。
優先順位は、例えば、仕様書データの文頭が優先度が高く、文末に向けて順に優先度が低くなるものとしてもよい。また、その逆であってもよい。さらに、単位モデルごとに、優先度を表す数字、文字、記号を付し、これに基づいて優先順位を決定してもよい。
By doing so, it is possible to automate the connection between the unit models, and there is an advantage that the model can be efficiently created without error.
As the priority, for example, the beginning of the text of the specification data may have a higher priority, and the priority may be lowered in order toward the end of the sentence. The reverse may also be true. Further, a number, a letter, and a symbol indicating a priority may be attached to each unit model, and the priority may be determined based on the numbers, letters, and symbols.

本発明のモデル作成システムにおいては、
複数の前記モデルの実行順序を規定する結合指示データを読み込む結合指示データ入力部と、
前記結合指示データで指定された前記モデルを、それぞれ当該結合指示データに従って相互に関係づけることによって、当該結合指示データに対応する制御処理を表す結合モデルを作成するモデル結合部とを備えるものとしてもよい。
In the model creation system of the present invention,
A join instruction data input unit that reads join instruction data that defines the execution order of a plurality of the models, and a join instruction data input unit.
It is also possible to include a model joining unit that creates a joining model representing a control process corresponding to the joining instruction data by relating the models specified in the joining instruction data to each other according to the joining instruction data. good.

結合指示データは、複数のモデルの実行順序を指示するデータである。仕様書データとの相違は、モデル単位でその順序が規定されている点である。結合指示データとしては、モデル配置図、即ち、モデルを矩形など所定の図形で表記し、その配置によって、モデル間の親子関係、実行順序を規定するものであってもよい。また、仕様書データのように、結合されるモデルの名称・実行順序をテキストで特定する形式をとってもよい。さらに、モデル配置図に代えて、そこに表される図形の座標・サイズを用いることで、テキストデータによって、それぞれの位置関係を表すようにしてもよい。このように結合指示データ、特にモデル配置図を用いることにより、モデルベース開発の利点であるモデル間の入出力等、プログラムの全体を視覚的に容易に把握することができる利点がある。上記態様によれば、結合指示データに応じた結合モデルを効率的に作成することができる。
結合対象となるモデルには、モデル生成システムで生成したモデルだけでなく、外部から読み込んだモデルを含めてもよい。
The join instruction data is data that indicates the execution order of a plurality of models. The difference from the specification data is that the order is specified for each model. As the join instruction data, a model layout diagram, that is, the model may be represented by a predetermined figure such as a rectangle, and the parent-child relationship between the models and the execution order may be defined by the layout. Further, as in the specification data, the name and execution order of the models to be combined may be specified by text. Further, instead of the model layout diagram, the coordinates and sizes of the figures represented therein may be used to represent the positional relationship between them by text data. By using the join instruction data, particularly the model layout diagram, as described above, there is an advantage that the entire program such as input / output between models, which is an advantage of model-based development, can be easily grasped visually. According to the above aspect, it is possible to efficiently create a binding model according to the binding instruction data.
The model to be combined may include not only the model generated by the model generation system but also the model read from the outside.

結合モデルを作成する態様においては、
前記結合指示データ入力部は、併せて前記結合モデルに対する外部からの入力、および該結合モデルから外部への出力を規定するインタフェース一覧表を入力し、
前記モデル作成システムは、さらに、
前記結合指示データで指定された各モデルの入出力に基づいて、前記結合モデルとしての入出力を表す入出力リストを作成するとともに、これと前記インタフェース一覧表との対比により、前記結合指示データの異状を判断するリスト作成部を備えるものとしてもよい。
In the aspect of creating a joint model,
The join instruction data input unit also inputs an interface list that defines an external input to the join model and an output from the join model to the outside.
The modeling system further
Based on the input / output of each model specified in the join instruction data, an input / output list representing the input / output as the join model is created, and by comparing this with the interface list, the join instruction data can be obtained. It may be provided with a list creation unit for determining an abnormality.

こうすることにより結合モデルに対する入出力、または結合モデルに含まれる各モデルなどの誤り等を容易に見いだすことができる。 By doing so, it is possible to easily find the input / output to the combined model or the error of each model included in the combined model.

結合モデルを作成する態様においては、
前記結合指示データで指定された各モデルを起動させるためのトリガー信号作成ブロックを作成するトリガー生成部を備え、
前記トリガー生成部は、
前記結合指示データで指定された各モデルの入力から、該各モデルを起動させるトリガー信号を抽出し、
当該抽出結果に基づいて、重複しないようにトリガー信号作成ブロックを前記結合モデルに追加し、
該トリガー信号作成ブロックを、それぞれ対応する前記モデルに結線するものとしてもよい。
In the aspect of creating a joint model,
It is equipped with a trigger generator that creates a trigger signal creation block for activating each model specified in the join instruction data.
The trigger generator is
A trigger signal for activating each model is extracted from the input of each model specified in the join instruction data.
Based on the extraction result, a trigger signal creation block is added to the coupling model so as not to overlap.
The trigger signal creation block may be connected to the corresponding model.

各モデルは、16msごとなど、起動するタイミングが決まっている。かかるタイミングでトリガー信号が入力されることにより、各モデルは起動する。上記態様によれば、トリガー信号に応じてトリガー信号作成ブロックを自動的に作成することができる。 Each model has a fixed start timing, such as every 16 ms. Each model is activated by inputting a trigger signal at such a timing. According to the above aspect, the trigger signal creation block can be automatically created according to the trigger signal.

結合モデルを作成する態様においては、
前記結合指示データで指定された各モデル間で対応する入出力を結線する結線部を備え、
該結線部は、
前記結合指示データに基づいて前記各モデルの実行順序を特定し、
前記モデルの出力が、当該モデルの後に実行される他のモデルの入力となる場合は、両者を直接結線し、
前記モデルの出力が、当該モデルの前に実行される他のモデルの入力となる場合は、前の処理における内容を入力することを表すブロックを介在させて両者を結線するものとしてもよい。
結合指示データが、モデル配置図である場合には、そこに表される各モデルの位置関係に基づいて実行順序が特定されることになる。
In the aspect of creating a joint model,
It is provided with a connection part for connecting the corresponding input / output between each model specified in the connection instruction data.
The connection part is
The execution order of each model is specified based on the join instruction data, and the execution order is specified.
If the output of the model is the input of another model that is executed after the model, connect the two directly.
When the output of the model becomes the input of another model executed before the model, the two may be connected by interposing a block indicating to input the contents in the previous process.
When the join instruction data is a model layout diagram, the execution order is specified based on the positional relationship of each model represented therein.

上記態様によれば各モデルを結線することができ、結合モデル間の入出力を含めたモデルの作成を行うことができる。また、結線する際に、モデルの実行順序を考慮して、前の処理における内容を入力することを表すブロックを介在させることにより、処理内容も適切に実行させることが可能となる。 According to the above aspect, each model can be connected, and a model including input / output between connected models can be created. Further, when connecting, the processing contents can be appropriately executed by interposing a block indicating that the contents in the previous processing are input in consideration of the execution order of the model.

本発明は、上述した特徴を必ずしも全てを備えている必要はなく、適宜、その一部を省略したり、組み合わせたりしてもよい。上述したモデルの作成をコンピュータによって実行するモデル作成方法として構成してもよいし、かかる方法をコンピュータに行わせるためのコンピュータプログラムとして構成してもよい。さらに、かかるコンピュータプログラムを記録したコンピュータが読み取り可能な記録媒体として構成してもよい。 The present invention does not necessarily have all of the above-mentioned features, and some of them may be omitted or combined as appropriate. The above-mentioned model creation may be configured as a model creation method executed by a computer, or may be configured as a computer program for causing the computer to perform such a method. Further, it may be configured as a recording medium that can be read by a computer that has recorded such a computer program.

モデル作成システムの構成を示す説明図である。It is explanatory drawing which shows the structure of the model making system. 仕様書データの例を示す説明図である。It is explanatory drawing which shows the example of the specification data. モデルの例を示す説明図である。It is explanatory drawing which shows the example of a model. モデル作成処理のフローチャート(1)である。It is a flowchart (1) of a model creation process. モデル作成処理のフローチャート(2)である。It is a flowchart (2) of a model creation process. 変換データベースの例を示す説明図である。It is explanatory drawing which shows the example of the conversion database. サブシステム間の結線例を示す説明図である。It is explanatory drawing which shows the example of the connection between a subsystem. モデルの結合処理例を示す説明図である。It is explanatory drawing which shows the example of a combination process of a model. モデル結合処理のフローチャート(1)である。It is a flowchart (1) of a model combination process. モデル結合処理のフローチャート(2)である。It is a flowchart (2) of a model combination process. 結線処理のフローチャートである。It is a flowchart of a connection process.

以下、本発明の実施例としてのモデル作成システムについて説明する。
図1は、モデル作成システムの構成を示す説明図である。モデル作成システム100は、仕様書データ11およびモデル配置図データ12を含む入力データ10を読み込み、ここからモデルを作成する。
Hereinafter, a model creation system as an embodiment of the present invention will be described.
FIG. 1 is an explanatory diagram showing a configuration of a model creation system. The model creation system 100 reads the input data 10 including the specification data 11 and the model layout data 12, and creates a model from the input data 10.

A:仕様書データ及びモデルの内容:
まず、本実施例における仕様書データおよびモデルの内容について説明する。
図2は、仕様書データの例を示す説明図である。実施例の仕様書データは、テキストデータで構成されている。図2の例の左端の行L1~L18は、説明の便宜上、付した行番号である。行L1の「■」は制御のためのプログラムの単位を表している。段落(a)(行L2~L7)、段落(b)(行L8~L15)、段落(c)(行L16~L18)は、条件および当該条件を満たしたときの処理を表している。図2の例において、「(a)[条件]立ち上げ」に続く行L3~L5が段落(a)における条件を示している。そして、この条件を満たしたとき、「[処理]」(行L6)およびその次の行(行L7)で示された処理を実現する内容となっている。
また、段落(b)(行L8~L15)は、段落(a)の条件が満たされなかったときの処理内容である。段落(a)と同様、「(b)[条件]立ち下げ」(行L8)に続く行L9~L13が段落(b)における条件を示している。そして、この条件を満たしたとき、「[処理]」およびその次の行で示された処理を実現する内容となっている。
さらに、段落(c)は、段落(a)(b)の条件が満たされなかったときの処理内容である。「(c)[条件]上記以外」の次の行に「[処理]」と記載されていることから、段落(c)は無条件に適用されることを表している。
なお、図2に示した仕様書データの記載は一例であり、仕様書データを記載するための規則は、任意に決めることができる。
A: Specification data and model contents:
First, the contents of the specification data and the model in this embodiment will be described.
FIG. 2 is an explanatory diagram showing an example of specification data. The specification data of the embodiment is composed of text data. The leftmost lines L1 to L18 in the example of FIG. 2 are line numbers assigned for convenience of explanation. The "■" in line L1 represents the unit of the program for control. Paragraphs (a) (lines L2 to L7), paragraphs (b) (lines L8 to L15), and paragraphs (c) (lines L16 to L18) represent conditions and processing when the conditions are satisfied. In the example of FIG. 2, the lines L3 to L5 following "(a) [Condition] startup" indicate the condition in paragraph (a). Then, when this condition is satisfied, the content is such that the processing indicated by "[processing]" (row L6) and the next row (row L7) is realized.
Further, paragraph (b) (lines L8 to L15) is a processing content when the condition of paragraph (a) is not satisfied. Similar to paragraph (a), lines L9 to L13 following "(b) [Condition] start-up" (line L8) indicate the condition in paragraph (b). Then, when this condition is satisfied, the content is such that the processing shown in "[Process]" and the next line is realized.
Further, the paragraph (c) is a processing content when the conditions of the paragraphs (a) and (b) are not satisfied. Since "[Process]" is described in the line following "(c) [Condition] Other than the above", it means that paragraph (c) is applied unconditionally.
The description of the specification data shown in FIG. 2 is an example, and the rules for describing the specification data can be arbitrarily determined.

図3は、モデルの例を示す説明図である。図2に示した仕様書データに対応するモデルを例示した。
行L2の「(a)[条件]立ち上げ」は条件分岐を表しており、図3のモデルでは、ブロックb12がこれに対応する。つまり、条件分岐を表す行は、ブロックb12に置換することによりモデルを作成することができる。そして、行L2の条件分岐における条件は、行L3~L5で表されているから、それぞれを以下に示す通りブロックに置換しつつ、これらがブロックb12への入力となるよう配置すればよい。
条件の内容を示す行L3の「accel_request_flag==1」の条件における「accel_request_flag」はブロックb1が対応する。ブロックb1には、符号「1」が表示されているが、これは別途用意された変数テーブルによって、「accel_request_flag」と対応づけられている。「==」はブロックb3が対応し、「accel_request_flag==1」の「1」はブロックb2が対応する。また、「AND」の部分は、ブロックb7に置換することで表される。
行L4の「accel_opening」には、ブロックb4が対応する。符号「2」は、変数テーブルによって、「accel_opening」と対応づけられている。「>」にはブロックb6が対応し、「ACCEL_OPEN_THR」にはブロックb5が対応する。そして、行L4の結果は、行L3の「AND」の条件の一部を構成するものであるから、ブロックb7に入力される。
行L4の「OR」は、行L3、L4で表される「AND」条件の出力と、行L5の条件との論理和をとることを表しているから、ブロックb8に置換されるとともに、ブロックb7の出力および行L5を表すブロックb9~b11の出力が入力される。
FIG. 3 is an explanatory diagram showing an example of a model. An example of a model corresponding to the specification data shown in FIG.
“(A) [Condition] start-up” in line L2 represents a conditional branch, and in the model of FIG. 3, the block b12 corresponds to this. That is, the line representing the conditional branch can be replaced with the block b12 to create a model. Since the conditions in the conditional branch of row L2 are represented by rows L3 to L5, they may be arranged so as to be inputs to block b12 while replacing each of them with blocks as shown below.
Block b1 corresponds to "accel_request_flag" in the condition of "accel_request_flag == 1" in line L3 indicating the content of the condition. The code "1" is displayed in the block b1, which is associated with "accel_request_flag" by a variable table prepared separately. “==” Corresponds to block b3, and “1” of “accel_request_flag == 1” corresponds to block b2. Further, the "AND" portion is represented by replacing it with the block b7.
Block b4 corresponds to "accel_opening" in line L4. The code "2" is associated with "accel_opening" by the variable table. “>” Corresponds to block b6, and “ACCEL_OPEN_THR” corresponds to block b5. Then, since the result of the row L4 constitutes a part of the condition of "AND" of the row L3, it is input to the block b7.
Since "OR" in row L4 represents the logical sum of the output of the "AND" condition represented by rows L3 and L4 and the condition in row L5, it is replaced with block b8 and blocked. The output of b7 and the output of blocks b9 to b11 representing the line L5 are input.

上述の条件を満たしたときの処理(行L6)は、「accel_command_flag=1」のうち、「accel_command_flag」はブロックb14の符号「6」に対応し、「1」はブロックb13に対応する。「==」は、条件分岐のブロックb12のうち条件を満たした場合の処理を表す内容に、ブロックb13が入力されている点が対応する。
同様に、仕様書データ(図2)の行L8~L18も、それぞれ対応するブロックに置換することにより、モデルを作成することができる。
In the process (line L6) when the above conditions are satisfied, among "accel_command_flag = 1", "accel_command_flag" corresponds to the code "6" of the block b14, and "1" corresponds to the block b13. “==” Corresponds to the point that the block b13 is input to the content representing the processing when the condition is satisfied in the block b12 of the conditional branch.
Similarly, a model can be created by substituting the rows L8 to L18 of the specification data (FIG. 2) with the corresponding blocks.

B.モデル作成システムの構成:
図1に戻り、モデル作成システム100の構成について説明する。
モデル作成システム100は、CPUおよびメモリを備えるコンピュータに、図示する各機能ブロックを実現するコンピュータプログラムをインストールすることによって構成することができる。モデル作成システム100は、このようにソフトウェア的に構成してもよいし、機能ブロックの少なくとも一部または全部をハードウェアによって構成してもよい。
以下、それぞれの機能ブロックの内容について説明する。
B. Configuration of modeling system:
Returning to FIG. 1, the configuration of the model creation system 100 will be described.
The model creation system 100 can be configured by installing a computer program that realizes each functional block shown in the figure on a computer having a CPU and a memory. The modeling system 100 may be configured by software in this way, or at least a part or all of the functional blocks may be configured by hardware.
The contents of each functional block will be described below.

仕様書入力部101は、図2に示した形式の仕様書データ11を読み込む。読み込んだデータは、記憶部110内に設定された入力データ記憶部111に記憶される。
モデル配置図入力部102は、モデル配置図データ12を読み込む。モデル配置図データ12とは、図3に示したようなモデルが複数ある場合に、それらを結合して一つのモデルを作成するための仕様を指示するデータであり、本発明の結合指示データの一種である。具体的な内容は後述する。読み込んだモデル配置図データ12は、記憶部110内の入力データ記憶部111に記憶される。
The specification input unit 101 reads the specification data 11 in the format shown in FIG. The read data is stored in the input data storage unit 111 set in the storage unit 110.
The model layout drawing input unit 102 reads the model layout drawing data 12. The model layout data 12 is data for instructing specifications for creating one model by combining a plurality of models as shown in FIG. 3, and is the data for instructing the combination instruction data of the present invention. It is a kind. The specific contents will be described later. The read model layout data 12 is stored in the input data storage unit 111 in the storage unit 110.

標準化処理部103は、入力した仕様書データ11に含まれるキーワードの標準化を行う。キーワードとは、例えば、図2の仕様書データの行L2における「[条件]」のように、置換するブロックを特定するための表記を言う。本実施例では、一部のキーワードについては、英語での表記を標準としながら多様な表現を許容している。例えば、[条件]という表記については、[IF]を標準の表記とできる。キーワードデータベース104は、標準の表記(例えば、[IF])と、その他の表記(例えば、[条件])とを対応づけて記憶したデータベースである。標準化処理部は、キーワードデータベース104を参照しながら、仕様書データ11のキーワードを標準の表記に修正していく。ただし、標準の表記に置換した仕様書データを新たに作成するということではなく、入力データ記憶部111に読み込んだ仕様書データの内容を修正すればよい。
標準化処理としては、上述のように、日本語から英語への変換、またはその逆という態様の他、表記のゆれなどを含めてもよい。例えば、図2の行L18の「前回値保持」という処理内容については、かかる表記を標準としつつ、「前回値を保持」、「前ステップの値」などを表記のゆれとして、キーワードデータベース104に記憶しておいてもよい。
上述の通り、標準化処理を施すことにより、後述するモデルの作成などは、標準化された表記を前提として用意しておけば良いこととなり、処理の簡略化、安定化を図ることができる。
The standardization processing unit 103 standardizes the keywords included in the input specification data 11. The keyword refers to a notation for specifying a block to be replaced, for example, "[condition]" in line L2 of the specification data in FIG. In this embodiment, various expressions are allowed for some keywords while using the notation in English as a standard. For example, for the notation [condition], [IF] can be used as the standard notation. The keyword database 104 is a database that stores a standard notation (for example, [IF]) in association with another notation (for example, [condition]). The standardization processing unit corrects the keywords of the specification data 11 to the standard notation while referring to the keyword database 104. However, it does not mean that the specification data replaced with the standard notation is newly created, but the content of the specification data read into the input data storage unit 111 may be modified.
As the standardization process, as described above, in addition to the mode of conversion from Japanese to English or vice versa, fluctuation of notation may be included. For example, regarding the processing content of "preserving the previous value" in line L18 of FIG. 2, while using this notation as a standard, "retaining the previous value", "value of the previous step", etc. are used as fluctuations in the notation in the keyword database 104. You may remember it.
As described above, by performing the standardization process, it is sufficient to prepare the model described later on the premise of the standardized notation, and the process can be simplified and stabilized.

モデル作成部106は、仕様書データ11に基づいてモデルを作成する処理を行う。仕様書データ11には、図2に示したように、処理内容を表す種々のキーワードが含まれている.モデルを構成するブロックとキーワードとの対応関係は、変換データベース107に記憶されている。モデル作成部106は、仕様書データ11に含まれるキーワードを、それぞれ変換データベース107に従って、モデルに置換することにより、モデルを作成するのである。作成したモデルは、記憶部110内に設けられたモデル記憶部112に保存される。 The model creation unit 106 performs a process of creating a model based on the specification data 11. As shown in FIG. 2, the specification data 11 includes various keywords indicating the processing contents. The correspondence between the blocks constituting the model and the keywords is stored in the conversion database 107. The model creation unit 106 creates a model by replacing the keywords included in the specification data 11 with a model according to the conversion database 107. The created model is stored in the model storage unit 112 provided in the storage unit 110.

モデルが作成されると、モデル配置図データ12に基づいて、複数のモデルを結合して、より複雑な制御プログラムを構築する。以下の機能ブロックは、モデルの結合を行うためのものである。
まず、リスト作成部105は、複数のモデルを結合して作成される結合モデルについて、入出力のリストを作成する。この入出力リストは、具体的には、結合モデルに用いられる各モデルの入出力を集約して作成することができる。作成した入出力リストは、記憶部110に記憶される。
When the model is created, a plurality of models are combined to construct a more complicated control program based on the model layout data 12. The following functional blocks are for combining models.
First, the list creation unit 105 creates an input / output list for the combined model created by combining a plurality of models. Specifically, this input / output list can be created by aggregating the input / output of each model used in the combined model. The created input / output list is stored in the storage unit 110.

なお、入出力リストは、モデル配置図データ12とともに、開発者が作成し、モデル作成システム100に入力するものとしてもよい。かかる場合には、リスト作成部105は、モデル配置図に基づいて入出力リストを作成し、開発者から入力されたリストに誤りがないかを判定するようにしてもよい。 The input / output list may be created by the developer together with the model layout data 12 and input to the model creation system 100. In such a case, the list creation unit 105 may create an input / output list based on the model layout diagram and determine whether the list input by the developer has an error.

モデル結合部115は、モデル配置図データ12に基づいて複数のモデルを結合する。結合したモデルは、モデル記憶部112に記憶される。
トリガー生成部116は、結合モデルに用いられる各モデルが起動するタイミングを特定し、それぞれのタイミングに応じたトリガー信号を発信するためのブロックをモデルに設定する。こうすることにより、複数のモデルを適切な実行タイミングで起動させることが可能となる。
結線部117は、複数のモデルの入出力を抽出し、同じ名称の入力、出力同士を結線する。こうすることでモデル間で適切な変数の伝達が可能となる。なお、結線部117は、各モデルの実行順序を考慮し、先に実行したモデルの出力値を、それよりも後に実行するモデルに入力する場合には、両者を直接結線する。逆に、あるモデルの出力値を、それよりも先に実行したモデルに入力する場合には、前回ステップの値を入力することを表すブロックを介在させて結線する。
The model coupling unit 115 combines a plurality of models based on the model layout data 12. The combined model is stored in the model storage unit 112.
The trigger generation unit 116 specifies the timing at which each model used for the coupling model is activated, and sets a block for transmitting a trigger signal according to each timing in the model. By doing so, it becomes possible to start a plurality of models at appropriate execution timings.
The connection unit 117 extracts the input / output of a plurality of models, and connects the inputs and outputs having the same name to each other. This allows the transfer of appropriate variables between models. In addition, the connection unit 117 considers the execution order of each model, and when the output value of the model executed earlier is input to the model to be executed after that, both are directly connected. On the contrary, when the output value of a certain model is input to the model executed earlier than that, the connection is made with a block indicating that the value of the previous step is input.

表示制御部118は、モデル作成システム100において、種々の表示を行う。例えば、仕様書データ11、モデル配置図データ12の表示や、作成されたモデルの表示、また、モデル作成に必要な種々の情報の表示や、開発者が種々の指定を行うための画面の表示などを行う。また、表示制御部118は、開発者の指示に従って結合モデルの結線の表示態様を切換可能としてもよい。例えば、モデルにおいて、入出力間を視認可能な線で結ぶようにしてもよいし、対応する入出力を結ぶ線は省略しつつ、両者を同じ色、記号などで表示して対応関係を示すようにしてもよい。かかる切換は、入出力の変数ごとに切換可能としてもよいし、全体をまとめて切換可能としてもよいし、結合モデルに用いられるモデル単位などで当該モデルに対する入出力の表示のみを切換可能としてもよい。このように多様な表示を実現可能とすることにより、モデルまたは結合モデルを開発者に理解しやすい状態で表示することが可能となり、開発効率を向上させることができる。 The display control unit 118 performs various displays in the model creation system 100. For example, display of specification data 11 and model layout data 12, display of created model, display of various information necessary for model creation, display of screen for developer to make various specifications. And so on. Further, the display control unit 118 may be able to switch the display mode of the connection of the connection model according to the instruction of the developer. For example, in the model, the input / output may be connected by a visible line, or the line connecting the corresponding input / output may be omitted, and both may be displayed in the same color, symbol, etc. to show the correspondence. You may do it. Such switching may be switchable for each input / output variable, may be switchable as a whole, or may be switchable only for input / output display for the model in units of models used for the combined model. good. By making it possible to realize such various displays, it is possible to display the model or the combined model in a state that is easy for the developer to understand, and it is possible to improve the development efficiency.

モデル作成システム100は、図1に示した他、種々の構成をとることができる。図1に示した以外の機能ブロックを用いてもよいし、これらの一部を複数の機能ブロックで実現したり、複数の機能ブロックを一つに統合してもよい。また、本実施例では、スタンドアロンで稼働するコンピュータを利用した例を示したが、図示した機能の一部を、ネットワークで接続された複数のサーバによって提供するものとしてもよい。 The model creation system 100 can have various configurations other than those shown in FIG. Functional blocks other than those shown in FIG. 1 may be used, some of them may be realized by a plurality of functional blocks, or a plurality of functional blocks may be integrated into one. Further, in this embodiment, an example using a computer operating standalone is shown, but some of the illustrated functions may be provided by a plurality of servers connected by a network.

C.モデル作成処理:
以下、モデル作成システム100が実行する処理について説明する。
図4および図5は、モデル作成処理のフローチャートである。仕様書データに基づいてモデルを作成する処理である。この処理は、主として図1の標準化処理部103、モデル作成部106が実行する処理であり、ハードウェア的にはモデル作成システム100を構成するコンピュータのCPUが実行する処理である。
C. Modeling process:
Hereinafter, the processing executed by the model creation system 100 will be described.
4 and 5 are flowcharts of the model creation process. This is the process of creating a model based on the specification data. This process is mainly executed by the standardization processing unit 103 and the model creation unit 106 of FIG. 1, and is a process executed by the CPU of the computer constituting the model creation system 100 in terms of hardware.

処理を開始すると、モデル作成システム100は、作成対象となる仕様書データを選択する(ステップS10)。予め複数の仕様書データが読み込まれているときは、モデル作成システム100が、これらの仕様書データの一覧を開発者に提示し、開発者がその中から選択するようにしてもよいし、モデルが未作成の仕様書データを自動的に選択するようにしてもよい。また、開発者が、「新規読み込み」を指示することにより、新たに読み込む仕様書データを、モデル作成の対象として選択するようにしてもよい。 When the process is started, the model creation system 100 selects the specification data to be created (step S10). When a plurality of specification data are read in advance, the model creation system 100 may present a list of these specification data to the developer so that the developer can select from them, or the model. May automatically select uncreated specification data. Further, the developer may instruct "new reading" to select the specification data to be newly read as the target of model creation.

次に、モデル作成システム100は、選択された仕様書データを読み込む(ステップS11)。既に入力データ記憶部111に記憶されている場合には、そこから読み出すようにしてもよい。 Next, the model creation system 100 reads the selected specification data (step S11). If it is already stored in the input data storage unit 111, it may be read from there.

そして、モデル作成システム100は、仕様書定数表に基づいて、定数のデータベースを作成する(ステップS12)。図2の仕様書データの例においては、行L4における「ACCEL_OPEN_THR」が定数、即ち条件判断をするための閾値である。定数表は、このように仕様書データで用いられる定数の名称と、具体的な値とを対応づけた一覧表となっている。定数表は、仕様書データとともに開発者が作成して、モデル作成システム100に入力するデータである。 Then, the model creation system 100 creates a database of constants based on the specification constant table (step S12). In the example of the specification data in FIG. 2, "ACCEL_OPEN_THR" in row L4 is a constant, that is, a threshold value for determining a condition. The constant table is a list in which the names of the constants used in the specification data and specific values are associated with each other. The constant table is data created by the developer together with the specification data and input to the model creation system 100.

モデル作成システム100は、次に、キーワードデータベース104に基づいて仕様書データの記載を標準化する(ステップS13)。標準化の処理は、標準化処理部103の機能として既に説明した通りである。例えば、図2の仕様書データの行L2における「[条件]」などのキーワードに対して、キーワードデータベース104を参照して、標準の表記(例えば、[IF])として登録されている表記に置換するのである。仕様書データに用いられている表記が、既に標準の表記になっている場合には、処理をスキップして、次のキーワードの処理に移行する。
標準化としては、上述のように日本語、英語などの言語の置き換えや、表記のゆれの修正などを対象とすることができる。
Next, the model creation system 100 standardizes the description of the specification data based on the keyword database 104 (step S13). The standardization process is as described above as a function of the standardization process unit 103. For example, for a keyword such as "[condition]" in line L2 of the specification data in FIG. 2, refer to the keyword database 104 and replace it with the notation registered as a standard notation (for example, [IF]). To do. If the notation used in the specification data is already the standard notation, the processing is skipped and the process proceeds to the processing of the next keyword.
As standardization, as described above, it is possible to replace languages such as Japanese and English, and to correct fluctuations in notation.

なお、標準化は、必須の処理という訳ではなく、これを省略することも可能である。その場合、仕様書データにおいて、[条件]、[IF]のように同じ処理に対して多様なキーワードの表記を認めるのであれば、これらのそれぞれが適切にブロックに置換されるようにプログラムを構築する必要がある。同様に、表記のゆれに対しても、これを認めるのであれば、それぞれの表記のゆれに対して、適切にブロックに置換されるようにプログラムを構築する必要がある。もし、表記のゆれを認めないのであれば、仕様書データを規定通りに記載する必要があり、柔軟性に欠けることとなる。
本実施例では、標準化処理を施すことにより、こうした課題を回避でき、ブロックへの置換処理の簡略化、安定化などを図ることが可能となっている。
Note that standardization is not an essential process, and it is possible to omit it. In that case, if various keyword notations such as [Condition] and [IF] are allowed for the same process in the specification data, the program is constructed so that each of these is appropriately replaced with a block. There is a need to. Similarly, if this is allowed for notational fluctuations, it is necessary to construct a program so that each notational fluctuation is appropriately replaced with a block. If the notation is not allowed to fluctuate, it is necessary to describe the specification data as specified, which results in inflexibility.
In this embodiment, by performing the standardization process, such a problem can be avoided, and it is possible to simplify and stabilize the replacement process with a block.

モデル作成システム100は、標準化処理が終了すると、仕様書データを章に分割する処理を行う(ステップS14)。章とは、プログラムを構成する単位の一つである。本実施例では、「■」という記述子で章を定義するものとした。図2の例では、行L1の文頭に1カ所記載されているだけであるが、次に「■」が記載されるまでが一つの章を構成することになる。このように章に区切って記載することにより、複雑なプログラムも理解しやすく記載することが可能となる利点がある。
なお、章を定義する記述子は、「■」に限らず任意に決めることができる。また、一文字である必要もなく、文字列で定義してもよい。
When the standardization process is completed, the model creation system 100 performs a process of dividing the specification data into chapters (step S14). A chapter is one of the units that make up a program. In this embodiment, the chapter is defined by the descriptor "■". In the example of FIG. 2, only one place is described at the beginning of the sentence of line L1, but one chapter is composed until "■" is described next. By dividing the program into chapters in this way, there is an advantage that even complicated programs can be described in an easy-to-understand manner.
The descriptor that defines the chapter is not limited to "■" and can be arbitrarily determined. Further, it does not have to be a single character and may be defined by a character string.

図5に移り、モデル作成システム100は、処理対象となる章(サブシステム)を選択する(ステップS15)。基本的には、仕様書データの文頭から、未処理の章を順に選択するようにすればよいが、開発者が個別に指定可能としてもよい。
なお、サブシステムとは、章に基づいて作成された単位モデルを表している。
Moving to FIG. 5, the model creation system 100 selects a chapter (subsystem) to be processed (step S15). Basically, the unprocessed chapters may be selected in order from the beginning of the specification data, but the developer may be able to specify them individually.
The subsystem represents a unit model created based on the chapter.

処理対象となる章が決まると、モデル作成システム100は、その章における仕様書データの未処理の一番上の文を読み込む(ステップS16)。そして、読み込んだ文に含まれるキーワードに応じて、処理方法を分類する(ステップS17)。 When the chapter to be processed is determined, the model creation system 100 reads the unprocessed top sentence of the specification data in that chapter (step S16). Then, the processing methods are classified according to the keywords included in the read sentence (step S17).

処理方法の分類について、図6により説明する。
図6は、変換データベースの例を示す説明図である。変換データベースは、図示する通りキーワードと処理内容とを対応づけて記憶している。処理内容には、モデルベース開発の環境に応じて、当該処理を表すブロックが記憶されることになる。
図の例では、「[条件]」という一連の文字列がキーワードであり、このキーワードに対する処理内容が条件分岐であることを表している。従って、このキーワードが現れたときには、図3のブロックb12のように条件分岐を表すブロックが用意されることになるのである。処理方法の分類(図5のステップS17)では、このようにキーワードに応じたブロックへの置換処理を行う。
The classification of the processing method will be described with reference to FIG.
FIG. 6 is an explanatory diagram showing an example of a conversion database. As shown in the figure, the conversion database stores the keywords and the processing contents in association with each other. A block representing the process is stored in the process content according to the environment of model-based development.
In the example of the figure, a series of character strings "[condition]" is a keyword, and the processing content for this keyword is a conditional branch. Therefore, when this keyword appears, a block representing a conditional branch is prepared as in the block b12 in FIG. In the classification of the processing method (step S17 in FIG. 5), the replacement process with the block corresponding to the keyword is performed in this way.

本実施例のキーワードは、階層構造となっている。例えば、図6における2番目のキーワード「=」に対しては、四則演算という処理内容が対応づけられているが、四則演算の下位層には、さらに定数のマップ、absなどのキーワードおよびそれに対する処理内容が対応づけられている。こうすることにより、キーワードの組み合わせによって、種々の四則演算を表すことが可能となっている。
このように階層構造で用意されたキーワードを利用するためには、「=」という四則演算に対するキーワードを見いだした後は、参照すべきキーワードをその下位層に移行する必要がある。処理方法の分類(図5のステップS17)では、先に処理したキーワードに応じて、参照すべきキーワードの層を移行した上で、それぞれ変換データベースに従ったブロックに置換する処理を行う。
The keywords of this embodiment have a hierarchical structure. For example, the second keyword "=" in FIG. 6 is associated with the processing content of four arithmetic operations, but the lower layers of the four arithmetic operations are further constant maps, keywords such as abs, and keywords for them. The processing contents are associated. By doing so, it is possible to express various four arithmetic operations by combining keywords.
In order to use the keywords prepared in the hierarchical structure in this way, after finding the keyword for the four arithmetic operations "=", it is necessary to move the keyword to be referred to to the lower layer. In the classification of the processing method (step S17 in FIG. 5), the layer of the keyword to be referred to is transferred according to the previously processed keyword, and then the block is replaced with the block according to the conversion database.

四則演算の下位層のキーワードの内容について、さらに説明する。
(ライブラリ関数名)というキーワードは、例えば、仕様書データ中に「sin」(サイン関数を表す文字列)が記載されている場合などのように、ライブラリの関数名が記載されている場合を意味する。このように、変換データベースにキーワードとして登録されていない文字列であっても、ライブラリとして用意されている関数名が出現した場合には、それに対応するライブラリ関数を読み出し、その処理のためのブロックへの置換を行うことになる。
The contents of the keywords in the lower layers of the four arithmetic operations will be further described.
The keyword (library function name) means that the function name of the library is described, for example, when "sin" (character string representing a sine function) is described in the specification data. do. In this way, even if the character string is not registered as a keyword in the conversion database, if a function name prepared as a library appears, the corresponding library function is read and the block for processing is read. Will be replaced.

また、変換データベースは、キーワードと処理内容が1対多で対応づけられていることもある。例えば、四則演算子に除算を示す「/」が含まれているが、これに対しては、(1)四則演算としての除算、(2)逆数の乗算の2つの処理が対応づけられている。一般に、除算の処理よりは、乗算の処理の方が処理速度が速いため、定数での除算のようにあらかじめ乗算に置き換えることが可能である場合には、乗算を用いることにより速度向上を図ることができるからである。そこで、変換データベースとしては、2つの処理内容を「/」に対応づけておき、ブロックへの置換を行う際に、いずれかを使い分けるものとしている。
このように複数の処理内容を対応づけるキーワードとしては、例えば、仕様書データ(図2)の行L3に示した「==」なども挙げられる。「==」は、左辺と右辺とが等しいという条件を表すキーワードであるが、例えば、左辺が浮動小数点型の変数、右辺が浮動小数点の定数のように浮動小数点型の比較では、丸め誤差などの影響により両者が厳密に一致しないことがある。こうした事情を考慮して、「==」には左辺と右辺とが一致するかを判定する処理の他、所定範囲の誤差範囲内であれば一致しているとみなす処理を対応づけてもよい。
Further, in the conversion database, the keyword and the processing content may be associated with each other on a one-to-many basis. For example, the four arithmetic operators include "/" indicating division, which is associated with two processes: (1) division as four arithmetic operations and (2) multiplication of reciprocals. .. In general, multiplication processing is faster than division processing, so if it is possible to replace it with multiplication in advance, such as division with a constant, use multiplication to improve the speed. Because it can be done. Therefore, as the conversion database, the two processing contents are associated with "/", and one of them is used properly when replacing with a block.
As a keyword for associating a plurality of processing contents in this way, for example, "==" shown in line L3 of the specification data (FIG. 2) can be mentioned. "==" Is a keyword that expresses the condition that the left side and the right side are equal. For example, in a floating point type comparison such as a floating point type variable on the left side and a floating point constant on the right side, a rounding error is used. Due to the influence, the two may not exactly match. In consideration of these circumstances, "==" may be associated with a process of determining whether the left side and the right side match, and a process of assuming that they match if they are within an error range of a predetermined range. ..

図6の例では、キーワードは2つの階層で構成されている例を示したが、3階層以上を設けるものとしてもよい。また、キーワードに応じて異なる階層数で変換データベースを用意するようにしてもよい。 In the example of FIG. 6, the keyword is composed of two layers, but three or more layers may be provided. Further, the conversion database may be prepared with a different number of layers depending on the keyword.

図5に戻り、モデル作成処理について説明する。処理方法の分類が完了すると(図5のステップS17)、モデル作成システム100は、変数・定数データベースに基づいてブロックを追加する。例えば、図2の行L3における「accel_request_flag」という変数は、図3のモデルのブロックb1に対応するが、ブロックb1には、符号1が表されているのみであり、上述の変数名は表されていない。変数名と符号1とを対応づけているのが変数表である。また、定数表は、図4のステップS12において、図2の行L4における「ACCEL_OPEN_THR」について説明した通りである。変数・定数データベースとは、変数表、定数表を表す。モデル作成システム100は、変数・定数データベースに基づいて、図3におけるブロックb1、ブロックb5などのブロックをそれぞれ追加するのである。 Returning to FIG. 5, the model creation process will be described. When the classification of the processing method is completed (step S17 in FIG. 5), the model creation system 100 adds a block based on the variable / constant database. For example, the variable "accel_request_flag" in line L3 of FIG. 2 corresponds to the block b1 of the model of FIG. 3, but the block b1 only represents the reference numeral 1 and the above-mentioned variable name is represented. Not. The variable table associates the variable name with the symbol 1. Further, the constant table is as described for "ACCEL_OPEN_THR" in row L4 of FIG. 2 in step S12 of FIG. The variable / constant database represents a variable table and a constant table. The model creation system 100 adds blocks such as block b1 and block b5 in FIG. 3 based on the variable / constant database.

こうしてステップS17、S18の処理により、必要なブロックが用意されると、モデル作成システム100は、これらのブロック間の結線処理を行い、ブロック配置の修正をする(ステップS19)。結線処理は、仕様書データに従って、対応するブロック間を接続する処理である。また、ブロック配置の修正は、開発者が見やすいよう、ブロックの間隔を整えたり、整列したりする処理である。 When the necessary blocks are prepared by the processing of steps S17 and S18 in this way, the model creation system 100 performs the wiring processing between these blocks and corrects the block arrangement (step S19). The wiring process is a process of connecting the corresponding blocks according to the specification data. In addition, the modification of the block arrangement is a process of arranging or aligning the blocks so that the developer can easily see them.

モデル作成システム100は、以上のステップS16~ステップS19の処理を、章に含まれる全ての文について終了するまで繰り返し実行する(ステップS20)。また、仕様書データに含まれる全ての章について終了するまで、ステップS15~ステップS20の処理を繰り返し実行する(ステップS21)。 The model creation system 100 repeatedly executes the above steps S16 to S19 until all the statements included in the chapter are completed (step S20). Further, the processes of steps S15 to S20 are repeatedly executed until all the chapters included in the specification data are completed (step S21).

最後に、モデル作成システム100は、章(サブシステム)間の結線処理を行い、章(サブシステム)間の配置の修正を行う(ステップS22)。こうして作成されたモデルは、図1に示したモデル記憶部112に保存される。 Finally, the model creation system 100 performs wiring processing between chapters (subsystems) and corrects the arrangement between chapters (subsystems) (step S22). The model thus created is stored in the model storage unit 112 shown in FIG.

ここで、サブシステム間の結線処理(ステップS22)について説明する。
図7は、サブシステム間の結線例を示す説明図である。図の左側には、仕様書データにおける章1-1~章1-3を示し、右側には、それに対応して作成されたモデル、即ちサブシステムss1~ss3を示した。それぞれのサブシステムss1~ss3の内容は、図3に示したように複数のブロックによって表されているが、図7においては、単純化して示してある。
Here, the connection processing between the subsystems (step S22) will be described.
FIG. 7 is an explanatory diagram showing an example of wiring between subsystems. On the left side of the figure, Chapters 1-1 to 1-3 in the specification data are shown, and on the right side, the corresponding models, that is, the subsystems ss1 to ss3 are shown. The contents of each of the subsystems ss1 to ss3 are represented by a plurality of blocks as shown in FIG. 3, but are shown in a simplified manner in FIG.

図7の例では、サブシステムss1に対する入力は「クラッチSW信号状態」および「クラッチ実施フラグ」の2つであり、出力は「クラッチONフラグ」となっている。そして、「クラッチONフラグ」は、「ニュートラル状態フラグ」とともにサブシステムss2に対する入力となっており、サブシステムss2の出力は「クラッチ解除フラグ」となっている。そこで、モデル作成システム100は、サブシステム間の結線処理として、サブシステムss1の出力である「クラッチONフラグ」と、サブシステムss2の入力である「クラッチONフラグ」とを結線するのである。
同様に、サブシステムss2の出力である「クラッチ解除フラグ」と、サブシステムss3の入力である「クラッチ解除フラグ」も結線する。
In the example of FIG. 7, the input to the subsystem ss1 is two, the “clutch SW signal state” and the “clutch execution flag”, and the output is the “clutch ON flag”. The "clutch ON flag" is an input to the subsystem ss2 together with the "neutral state flag", and the output of the subsystem ss2 is a "clutch release flag". Therefore, the model creation system 100 connects the "clutch ON flag" which is the output of the subsystem ss1 and the "clutch ON flag" which is the input of the subsystem ss2 as the connection processing between the subsystems.
Similarly, the "clutch release flag" which is the output of the subsystem ss2 and the "clutch release flag" which is the input of the subsystem ss3 are also connected.

サブシステム間の結線処理では、このようにサブシステム間で対応する入出力を見いだして結線することになる。ただし、モデル作成システム100は、それぞれのサブシステムの実行順序を考慮して、結線の態様を以下の通り切り替える。 In the connection processing between the subsystems, the corresponding input / output between the subsystems is found and connected in this way. However, the model creation system 100 switches the mode of connection as follows in consideration of the execution order of each subsystem.

本実施例では、実行される順に仕様書データに記載するものとしている。つまり、図7の例では、章1-1、章1-2、章1-3の順に実行されるのである。実行順序は、種々の表し方が可能であり、例えば、「■01」のように、章を表す記述子「■」と併せて実行順序を規律する数字を記載しておき、この数字部分が小さい順に実行するようにしてもよい。かかる態様によれば、仕様書データを章単位で移動させるまでなく、その実行順序を自在に変更することができる利点がある。 In this embodiment, the specifications are described in the order in which they are executed. That is, in the example of FIG. 7, the execution is performed in the order of Chapter 1-1, Chapter 1-2, and Chapter 1-3. The execution order can be expressed in various ways. For example, a number that regulates the execution order is described together with the descriptor "■" that represents the chapter, such as "■ 01", and this number part is It may be executed in ascending order. According to such an embodiment, there is an advantage that the execution order can be freely changed without moving the specification data in chapter units.

モデル作成システム100は、上述の実行順序を踏まえ、先に実行された章の出力が、その後に実行される章の入力となる場合には、そのまま結線を行うようにしている。図7の例では、章1-1の出力が、章1-2の入力となっているため、これらは直接結線をしている。また、章1-2の出力が、章1-3の入力となっているため、これらも直接結線をしている。仮に、章1-1の出力が、章1-3の入力となる場合も、章1-3は章1-1よりも後に実行される章であるから、直接結線すればよい。 Based on the above-mentioned execution order, the model creation system 100 makes a connection as it is when the output of the chapter executed earlier becomes the input of the chapter executed after that. In the example of FIG. 7, since the output of Chapter 1-1 is the input of Chapter 1-2, these are directly connected. Further, since the output of Chapter 1-2 is the input of Chapter 1-3, these are also directly connected. Even if the output of Chapter 1-1 becomes the input of Chapter 1-3, since Chapter 1-3 is a chapter executed after Chapter 1-1, it may be directly connected.

一方、図7には例示されていないが、例えば、章1-2の出力が、章1-1の入力となる場合には、モデル作成システム100は、前回のステップの実行時の値を入力することを表すブロックを介在させて、両者を結線する。章1-2は、章1-1よりも後に実行されるからである。章1-3の出力を、章1-1または章1-2に入力する場合も同様である。こうすることにより、それぞれの章(サブシステム)に、適切な値を入力することが可能となる。 On the other hand, although not illustrated in FIG. 7, for example, when the output of Chapter 1-2 is the input of Chapter 1-1, the model creation system 100 inputs the value at the time of executing the previous step. The two are connected by interposing a block indicating that the device is to be used. This is because Chapter 1-2 is executed after Chapter 1-1. The same applies when the output of Chapter 1-3 is input to Chapter 1-1 or Chapter 1-2. This makes it possible to enter appropriate values for each chapter (subsystem).

D.モデル結合処理:
次に、モデル結合処理について説明する。モデル結合処理とは、モデル作成処理(図4、図5)で作成された複数のモデル等を相互に結合することにより、より複雑なプログラムに対応したモデルを作成する処理である。結合される対象となるモデルは、他の開発者が作成したモデルや、一般的な処理内容として予め用意されているモデルなど、種々のモデルを含めることができる。結合対象となるモデルは、予め図1のモデル記憶部112に保存されているものとする。
D. Model join processing:
Next, the model joining process will be described. The model combination process is a process of creating a model corresponding to a more complicated program by mutually combining a plurality of models created in the model creation process (FIGS. 4 and 5). The model to be combined can include various models such as a model created by another developer and a model prepared in advance as a general processing content. It is assumed that the model to be combined is stored in the model storage unit 112 of FIG. 1 in advance.

以下の説明では、「モデル」という用語が表す内容によって混乱を招くことを回避するため、結合される対象となるモデルを「モジュール」と称し、結合された結果のことを「結合モデル」と称するものとする。 In the following description, in order to avoid confusion due to the content of the term "model", the model to be combined is referred to as a "module", and the combined result is referred to as a "combined model". It shall be.

まずモデル結合処理の例を示した後、そのフローチャートについて説明する。
図8は、モデルの結合処理例を示す説明図である。モジュールを結合して、結合モデルを作成するための指示には、仕様書データではなく、モデル配置図データが用いられる。図8(a)は、モデル配置図データの例を示している。モデル配置図データに示された矩形は、それぞれ結合対象となるモデル、即ちモジュールm1~m18を表している。モジュールm1~m18は、その名称によって、モデル記憶部112に記憶されたモデルと対応づけられた「モデルリファレンスモジュール」と、かかる対応づけによらず、図3に示したブロックのように予め定められた機能を有するモジュールとが含まれている。
First, an example of the model combination process is shown, and then the flowchart will be described.
FIG. 8 is an explanatory diagram showing an example of model joining processing. Model layout data is used instead of specification data for instructions to combine modules to create a combined model. FIG. 8A shows an example of model layout data. The rectangles shown in the model layout data represent the models to be combined, that is, the modules m1 to m18. Modules m1 to m18 are predetermined by their names as shown in FIG. 3 with a "model reference module" associated with a model stored in the model storage unit 112, regardless of such association. Includes modules with other functions.

また、モジュールm1~m12は、矩形M1に含まれており、モジュールm13~m18は矩形M2に含まれている。このように複数のモジュールを包含するまとまりを、本実施例では、結合サブシステムM1、M2と称する。また、結合サブシステムM1、M2にそれぞれモジュールm1~m12およびもジュールm13~m18が含まれている関係を「親子関係」と称するものとする。 Further, the modules m1 to m12 are included in the rectangle M1, and the modules m13 to m18 are included in the rectangle M2. Such a group including a plurality of modules is referred to as a coupling subsystem M1 and M2 in this embodiment. Further, a relationship in which the coupling subsystems M1 and M2 include modules m1 to m12 and joules m13 to m18, respectively, is referred to as a "parent-child relationship".

モデル配置図データは、さらに、モジュールm1~m18の位置関係によって実行順序を規定している。本実施例では、上から下、左から右という順に実行されるものとしている。例えば、モジュールm1~m8については、左側の列の上から下に向けてモジュールm1~m4が順次、実行された後、その右側の列の上から下に向けてモジュールm5~m8が実行される。その後は、その右側のモジュールm9,m10が実行され、さらに右側のモジュールm11、m12が実行されることになる。モジュールm9、m10を若干、左右にずらして表記しているのは、開発者が自分で視覚的に理解しやすいようにずらしただけであり、モジュールm9、m10の左端を整列して表してもモジュールの実行順序には変わらない。 The model layout data further defines the execution order by the positional relationship between the modules m1 to m18. In this embodiment, it is assumed that the execution is performed in the order of top to bottom and left to right. For example, for modules m1 to m8, modules m1 to m4 are sequentially executed from the top to the bottom of the left column, and then modules m5 to m8 are executed from the top to the bottom of the right column. .. After that, the modules m9 and m10 on the right side are executed, and the modules m11 and m12 on the right side are further executed. Modules m9 and m10 are slightly shifted to the left and right only so that the developer can easily understand them visually. Even if the left ends of modules m9 and m10 are aligned and represented. The order of module execution does not change.

図8(b)は、モデル結合処理の例を示している。モデル配置図データのモジュールm1~m18に対応する矩形が描かれている。それぞれ矩形の大きさが図8(a)から変化しているのは、モジュールm1~m18が対応するモデルの内容に応じたサイズに整えてあるからである。
また、モデル配置図データには存在していないモジュールm19,m20が追加されている。これは、モジュールm1~m18を起動させるためのトリガー信号を生成するモデルである。
さらに、モジュールm1~m18の入出力に基づいて、結合サブシステムM1、M2としての外部からの入力in、外部への出力outなども追加される。
FIG. 8B shows an example of model combination processing. A rectangle corresponding to the modules m1 to m18 of the model layout data is drawn. The size of each rectangle changes from FIG. 8A because the modules m1 to m18 are adjusted to the size according to the contents of the corresponding model.
In addition, modules m19 and m20 that do not exist in the model layout data have been added. This is a model that generates a trigger signal for activating modules m1 to m18.
Further, based on the input / output of the modules m1 to m18, an input from the outside as the coupling subsystems M1 and M2, an output out to the outside, and the like are added.

図8(c)は、結線処理を施した結果を表している。各モジュールm1~m20について、対応する入出力を結線した状態である。先にサブシステム間の結線処理(図7)で説明したのと同様、各モジュール間で対応する入出力を見いだし、実行順序を考慮して結線を行う。即ち、先に実行されるモジュールの出力が、それよりも後に実行されるモジュールの入力となる場合には、両者を直接結線する。また、後に実行されるモジュールの出力が、先に実行されるモジュールの入力となる場合には、間に、前のステップにおける値を入力することを示すブロックを介在させて両者を結線する。 FIG. 8C shows the result of performing the wiring process. The corresponding input / output is connected for each module m1 to m20. Similar to the wiring process between subsystems (FIG. 7), the corresponding input / output is found between the modules, and the wiring is performed in consideration of the execution order. That is, when the output of the module executed first becomes the input of the module executed after that, both are directly connected. Further, when the output of the module to be executed later becomes the input of the module to be executed first, the two are connected with a block indicating that the value in the previous step is input in between.

また、結線状態の表示には、2つの態様を用意した。一つ目の態様は、図8(c)に示されている通り、対応する入出力間に線を描いて表示する態様である。二つ目の態様は、図8(c)中にsg1,sg2のように、結線すべき入出力に付されたマークを同じ形状、色などで表示する態様である。2つの態様は、開発者の指示によって自在に切り換えることができる。このように2つの態様を用意することにより、結合モデルの表示の煩雑さを抑制し、視覚的に把握しやすくすることが可能となっている。 In addition, two modes were prepared for displaying the connection state. The first aspect is, as shown in FIG. 8C, a mode in which a line is drawn and displayed between the corresponding input / outputs. The second aspect is a mode in which the marks attached to the input / output to be connected are displayed in the same shape, color, etc. as shown in sg1 and sg2 in FIG. 8C. The two modes can be freely switched according to the instructions of the developer. By preparing the two modes in this way, it is possible to suppress the complexity of displaying the combined model and make it easier to visually grasp.

以下、モデル結合処理および結線処理のフローチャートについて説明する。
図9、図10は、モデル結合処理のフローチャートである。主として図1のリスト作成部105、モデル結合部115、トリガー生成部116が実行する処理であり、ハードウェア的にはモデル作成システム100のCPUが実行する処理である。
Hereinafter, the flowcharts of the model connection process and the connection process will be described.
9 and 10 are flowcharts of model combination processing. It is a process mainly executed by the list creation unit 105, the model coupling unit 115, and the trigger generation unit 116 in FIG. 1, and is a process executed by the CPU of the model creation system 100 in terms of hardware.

処理を開始すると、モデル作成システム100は、モデル配置図データおよびインタフェース一覧表を読み込み(ステップS30)、モジュールの親子関係を設定する(ステップS31)。図8の例で言えば、結合サブシステムM1とモジュールm1~m12の親子関係、および結合サブシステムM2とモジュールm13~m18の親子関係が設定される。インタフェース一覧表とは、結合モデル全体に対する入出力のリストであり、開発者が作成したものである。 When the process is started, the model creation system 100 reads the model layout data and the interface list (step S30), and sets the parent-child relationship of the module (step S31). In the example of FIG. 8, the parent-child relationship between the coupling subsystem M1 and the modules m1 to m12 and the parent-child relationship between the coupling subsystem M2 and the modules m13 to m18 are set. The interface list is a list of inputs and outputs for the entire join model, created by the developer.

次に、モデル作成システム100は、各モジュールの入出力に基づいて、結合モデルの入出力リストを作成する(ステップS32)。図中にリスト化の例を示した。図の例では、モジュールAの入力a、bと、モジュールBの入力b、cと、モジュールCの入力d、eを重複しないように抽出することで、入力としてはa、b、c、d、eが抽出される。また、モジュールAの出力d、モジュールBの出力e、モジュールCの出力fを抽出しないように抽出することで、出力としてはd、e、fが抽出される。 Next, the model creation system 100 creates an input / output list of the combined model based on the input / output of each module (step S32). An example of listing is shown in the figure. In the example of the figure, the inputs a and b of the module A, the inputs b and c of the module B, and the inputs d and e of the module C are extracted so as not to overlap, and the inputs are a, b, c and d. , E are extracted. Further, by extracting the output d of the module A, the output e of the module B, and the output f of the module C so as not to be extracted, d, e, and f are extracted as the outputs.

次に、モデル作成システム100は、ステップS32で作成された入出力リストと、インタフェース一覧表との整合性をチェックする(ステップS33)。本実施例では、まず、両者の入力が一致しているか、をチェックするものとした。インタフェース一覧表の入力に対して、入出力リストの入力に不足がある場合は、異状と判断される。一方、インタフェースの一覧表の入力に対して、入出力リストの入力に余剰が生じる場合は、必ずしも異状とは限らない。この余剰の入力は、結合モデル内でのみ使用される変数である可能性もあるからである。そこで、モデル作成100は、結合モデル内のモジュールの出力を参照し、余剰の入力と同じ変数が存在する場合には、異常なしと判断する。こうすることで、入力についての異状の有無が判断される。
次に出力について、モデル作成システム100は、インタフェース一覧表と入出力リストの出力を対比する。インタフェース一覧表の出力に対して、入出力リストの出力が不足している場合、その出力はいずれのモジュールからも出力されていないことを意味するから、異状と判断される。一方、インタフェース一覧表の出力に対して、入出力リストの出力が余剰の場合は、正常か異状かを特定することはできない。この余剰の出力が、他のモジュールの入力としてのみ使用されている場合には、結合モデル内でのみ使用される変数ということになるから、正常であることになる。従って、実施例では、入出力の出力が不足しているときには異状であると判断するものとしている。
Next, the model creation system 100 checks the consistency between the input / output list created in step S32 and the interface list (step S33). In this embodiment, first, it is checked whether the inputs of both are the same. If there is a shortage in the input / output list input with respect to the interface list input, it is judged to be abnormal. On the other hand, if there is a surplus in the input / output list input with respect to the interface list input, it is not necessarily an abnormality. This surplus input may be a variable used only in the join model. Therefore, the model creation 100 refers to the output of the module in the combined model, and if the same variable as the surplus input exists, it is determined that there is no abnormality. By doing so, it is determined whether or not there is an abnormality in the input.
Next, regarding the output, the model creation system 100 compares the output of the interface list with the output of the input / output list. If the output of the input / output list is insufficient for the output of the interface list, it means that the output is not output from any module, so it is judged to be abnormal. On the other hand, if the output of the input / output list is excessive with respect to the output of the interface list, it is not possible to specify whether it is normal or abnormal. If this surplus output is used only as an input of another module, it is normal because it is a variable used only in the join model. Therefore, in the embodiment, it is determined that the input / output is abnormal when the input / output output is insufficient.

モデル作成システム100は、上述のチェックによって異状が発見されたときは(ステップS34)、エラーを出力して(ステップS35)、モデル結合処理を終了する。こうすることにより、モデルの結合における異状があるときに、それを看過する可能性を抑制することができる。
なお、ステップS32~S35の処理は、必須のものではなく、これを省略しても差し支えない。
When an abnormality is found by the above check (step S34), the model creation system 100 outputs an error (step S35) and ends the model combination process. By doing this, it is possible to reduce the possibility of overlooking any abnormalities in the binding of the models.
The processes of steps S32 to S35 are not essential and may be omitted.

次に、モデル作成システム100は、親の結合サブシステムを作成する(ステップS36)。図8の例で言えば、結合サブシステムM1、M2を作成することになる。
ただし、この時点では、結合サブシステムM1、M2の内容は、まだ何も作成されていない状態であるから、結合モデルの出力図(図8(b))の上で言えば、結合サブシステムM1、M2を表す矩形が描かれるに留まることになる。
Next, the model creation system 100 creates a parent join subsystem (step S36). In the example of FIG. 8, the coupling subsystems M1 and M2 will be created.
However, at this point, since the contents of the combined subsystems M1 and M2 have not been created yet, the combined subsystem M1 can be said on the output diagram of the combined model (FIG. 8 (b)). , A rectangle representing M2 will only be drawn.

次に、モデル作成システム100は、各モジュールに対して、モデルを対応づける(ステップS37)。結合モデルの出力図(図8(b))において、モジュールを表す矩形の中に、対応するモデルのブロック(図3で示した例など)を描いてもよいし、単にコンピュータのメモリ上、これらとの対応づけを行うものとしてもよい。この対応づけを行うことにより、各モジュールに対応するモデルの大きさ、即ち図3に示したモデル等が占める領域の2次元的な面積を特定することができる。従って、ステップS37では、この面積に応じて、各モジュールのサイズを修正してもよい。モデルが示す面積の大きさは、ある程度、そのモデルの複雑さを反映していると考えられるから、このようにモジュールのサイズを修正することにより、各モジュールの複雑さを直感的に認識しやすくなる利点がある。 Next, the model creation system 100 associates a model with each module (step S37). In the output diagram of the combined model (FIG. 8 (b)), blocks of the corresponding model (such as the example shown in FIG. 3) may be drawn in the rectangle representing the module, or simply in the memory of the computer. It may be associated with. By making this association, the size of the model corresponding to each module, that is, the two-dimensional area of the area occupied by the model or the like shown in FIG. 3 can be specified. Therefore, in step S37, the size of each module may be modified according to this area. Since the size of the area indicated by the model is considered to reflect the complexity of the model to some extent, it is easier to intuitively recognize the complexity of each module by modifying the size of the module in this way. There is an advantage.

モデル作成システム100は、次に、入出力リストに基づいて入出力ブロックを追加する(ステップS38)。結合モデル全体に対する入出力ブロックは、インタフェース一覧表を参照すれば特定することができる。結合モデル全体に対する入出力は、出力図(図8(b))における入力in、出力outのように、追加される。 The model creation system 100 then adds an input / output block based on the input / output list (step S38). The input / output block for the entire join model can be specified by referring to the interface list. Inputs and outputs for the entire combined model are added, such as input in and output out in the output diagram (FIG. 8 (b)).

また、モデル作成システム100は、各モジュールの入力のうち、トリガー信号を抽出する(ステップS39)。各モジュールは、4msごとに起動するもの、16msごとに起動するものなど、種々の起動タイミングが定められている。この起動タイミングは、仕様書データで規定してもよいし、モデル配置図データで規定してもよい。また、これらのデータとは別に、各モジュールの起動タイミングを定めるリストを用意してもよい。各モジュールには、ステップS38で、この起動タイミングに応じたトリガー信号の入力ブロックが追加されているから、モデル作成システム100は、これを抽出するのである。 Further, the model creation system 100 extracts a trigger signal from the inputs of each module (step S39). Various start timings are defined for each module, such as one that starts every 4 ms and one that starts every 16 ms. This activation timing may be specified by the specification data or the model layout data. In addition to these data, a list that defines the startup timing of each module may be prepared. Since the input block of the trigger signal corresponding to the activation timing is added to each module in step S38, the model creation system 100 extracts this.

そして、モデル作成システム100は、トリガー信号に基づき重複を回避して、トリガー信号生成ブロックを作成する(ステップS40)。例えば、ステップS39の処理において、4msというトリガー信号のみが抽出されていれば、4msのトリガー信号を生成するトリガー信号生成ブロックのみを作成すればよい。4msと、16msという2種類のトリガー信号が抽出されていれば、これらに対応した2種類のトリガー信号生成ブロックを作成することになる。
トリガー信号生成ブロックは、結合サブシステムM1、M2のそれぞれについて作成される。出力図(図8(b))においては、モジュールm19、m20がそれぞれトリガー信号生成ブロックを表している。トリガー信号生成ブロックは、結合サブシステムM1、M2に共通のブロックとして作成してもよい。
以上でモデル結合処理を終了し、モデル作成システム100は、次に、モジュール間を結線する結線処理に移行する。
Then, the model creation system 100 avoids duplication based on the trigger signal and creates a trigger signal generation block (step S40). For example, if only the trigger signal of 4 ms is extracted in the process of step S39, only the trigger signal generation block that generates the trigger signal of 4 ms may be created. If two types of trigger signals, 4 ms and 16 ms, are extracted, two types of trigger signal generation blocks corresponding to these will be created.
The trigger signal generation block is created for each of the coupling subsystems M1 and M2. In the output diagram (FIG. 8 (b)), the modules m19 and m20 each represent a trigger signal generation block. The trigger signal generation block may be created as a block common to the coupling subsystems M1 and M2.
With the above, the model combination process is completed, and the model creation system 100 then shifts to the connection process for connecting the modules.

図11は、結線処理のフローチャートである。主として図1の結線部117が実行する処理であり、ハードウェア的にはモデル作成システム100のCPUが実行する処理である。
処理を開始すると、モデル作成システム100は、結合モデルを読み込む(ステップS50)。そして、モジュールごとに入出力をリスト化する(ステップS51)。図中の例では、モジュールAについては入力a,bおよび出力dが抽出され、モジュールBについては入力b、cおよび出力eが抽出され、モジュールCについては入力b,d,eおよび出力fが抽出されてリストが作成される。
FIG. 11 is a flowchart of the connection process. It is a process mainly executed by the connection portion 117 of FIG. 1, and is a process executed by the CPU of the model creation system 100 in terms of hardware.
When the process is started, the model creation system 100 reads the combined model (step S50). Then, the input / output is listed for each module (step S51). In the example in the figure, the inputs a, b and the output d are extracted for the module A, the inputs b, c and the output e are extracted for the module B, and the inputs b, d, e and the output f are extracted for the module C. It is extracted and a list is created.

モデル作成システム100は、このリストに基づき、入力ごとに同じ名称の出力を探して結線する(ステップS52)。ただし、各モジュールの実行順序を考慮して以下の態様で結線を行う。
実行順序が順方向、即ち、先に実行したモジュールの出力が、その後に実行するモジュールの入力となっている場合には、両者を直接結線する。一方、実行順序が逆方向、即ち、後に実行したモジュールの出力を、先に実行するモジュールの入力とする場合には、1/zブロックを介在させて結線する。1/zブロックとは、前のステップの値を入力することを意味するブロックである。こうすることにより、各モジュールに対して適切な入力を実現することができる。
モデル作成システム100は、全ての結線を終了するまで、ステップS52の処理を繰り返し実行して(ステップS53)、結線処理を終了する。
Based on this list, the model creation system 100 searches for and connects an output having the same name for each input (step S52). However, the wiring is made in the following manner in consideration of the execution order of each module.
If the execution order is forward, that is, the output of the module executed first is the input of the module to be executed after that, both are directly connected. On the other hand, when the execution order is in the opposite direction, that is, when the output of the module executed later is used as the input of the module to be executed first, the wiring is connected with the 1 / z block interposed therebetween. The 1 / z block is a block that means to input the value of the previous step. By doing so, it is possible to realize an appropriate input for each module.
The model creation system 100 repeatedly executes the process of step S52 (step S53) until all the connections are completed, and ends the connection process.

なお、図8(c)で説明した通り、本実施例では、結線状態の表示として、入出力間に線を描いて表示する態様、結線すべき入出力に付されたマークを同じ形状、色などで表示する態様の2つを用意した。両者は、開発者の指示によって自在に切り換えることができる。例えば、個別の入力または出力を指定して、表示態様を切り換えるようにしてもよいし、全体の表示態様を一括して、一方の表示から他方の表示に切り換えるようにしてもよい。また、全体の表示を一括して、いずれかの表示態様に統一するようにしてもよい。さらに、結合サブシステムM1など、一定の範囲を指定して、指定した範囲に関する入出力の表示態様を切り換えまたは統一するようにしてもよい。 As described in FIG. 8C, in this embodiment, as the display of the connection state, a mode of drawing a line between the input / output and displaying the marks attached to the input / output to be connected have the same shape and color. Two modes of display such as are prepared. Both can be freely switched according to the instructions of the developer. For example, individual inputs or outputs may be specified to switch the display mode, or the entire display mode may be collectively switched from one display to the other. Further, the entire display may be collectively unified into one of the display modes. Further, a certain range such as the coupling subsystem M1 may be specified to switch or unify the input / output display modes for the specified range.

なお、結線処理は、結合モデルにおける結線のみならず、モデル間の章(サブシステム)間の結線に用いることもできる。本実施例では、仕様書データに基づいて各章(サブシステム)ごとにモデルを作成し、相互に入出力を結線する処理(図7参照)を行う例を示した。しかし、モデル作成システム100で取り扱うモデルは、かかる態様に限られるものではない。例えば、章(サブシステム)に相当するモデルとして、既存のモデルまたは他のシステムで作成されたモデルを読み込んで処理を行うこともある。結線処理は、このような場合にも適用することができる。具体的には、ステップS50における読み込み対象を、サブシステムに変更すればよい。 The connection process can be used not only for connection in the connection model but also for connection between chapters (subsystems) between models. In this embodiment, a model is created for each chapter (subsystem) based on the specification data, and an example of performing a process of connecting input / output to each other (see FIG. 7) is shown. However, the model handled by the model creation system 100 is not limited to such an embodiment. For example, as a model corresponding to a chapter (subsystem), an existing model or a model created by another system may be read and processed. The wiring process can also be applied in such a case. Specifically, the read target in step S50 may be changed to a subsystem.

E.効果および変形例:
以上で説明したモデル作成システム100によれば、仕様書データに基づいてモデルを作成することができる。また、モデル配置図データを用いてモデル同士を結合、結線することができる。仕様書データは、図2に例示した通り、テキストで表示するため、開発者の意図を理解しやすい利点がある。一方、モデル配置図データには、モデルベース開発における利点、即ち、各モデルの入出力、実行順序などを視覚的に理解しやすい利点がある。
このように本実施例のモデル作成システム100によれば、仕様書データに基づいてモデルを作成するという機能を備えることにより、開発者の意図をくみ取りにくいというモデルベース開発の欠点を補いつつ、その利点も活かしたプログラム開発を実現することができる。
E. Effects and variants:
According to the model creation system 100 described above, a model can be created based on the specification data. In addition, models can be connected and connected using model layout data. As the specification data is displayed as text as illustrated in FIG. 2, there is an advantage that the intention of the developer can be easily understood. On the other hand, the model layout data has an advantage in model-based development, that is, an advantage that it is easy to visually understand the input / output and execution order of each model.
As described above, according to the model creation system 100 of this embodiment, by providing the function of creating a model based on the specification data, the defect of the model-based development that it is difficult to grasp the intention of the developer is compensated for. It is possible to realize program development that also takes advantage of it.

本実施例で説明した種々の特徴は、必ずしも全てを備えている必要はなく、適宜、その一部を省略したり組み合わせたりして構成してもよい。また、本実施例のモデル作成システム100は、一例に過ぎず、種々の変形例を構成することも可能である。 The various features described in this embodiment do not necessarily have all of them, and some of them may be omitted or combined as appropriate. Further, the model creation system 100 of this embodiment is only an example, and various modified examples can be configured.

本発明は、予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルの作成に利用することができる。 The present invention can be used to create a model representing the contents of a control program by combining blocks indicating predetermined processing contents.

10 入力データ
11 仕様書データ
12 モデル配置図データ
100 モデル作成システム
101 仕様書入力部
102 モデル配置図入力部
103 標準化処理部
104 キーワードデータベース
105 リスト作成部
106 モデル作成部
107 変換データベース
110 記憶部
111 入力データ記憶部
112 モデル記憶部
115 モデル結合部
116 トリガー生成部
117 結線部
118 表示制御部
10 Input data 11 Specification data 12 Model layout data 100 Model creation system 101 Specification input unit 102 Model layout input unit 103 Standardization processing unit 104 Keyword database 105 List creation unit 106 Model creation unit 107 Conversion database 110 Storage unit 111 Input Data storage unit 112 Model storage unit 115 Model coupling unit 116 Trigger generation unit 117 Connection unit 118 Display control unit

Claims (11)

予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルを作成するモデル作成システムであって、
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力部と、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースと、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成部とを備え、
前記モデル作成部は、
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するモデル作成システム。
It is a model creation system that creates a model that expresses the contents of a control program by combining blocks that indicate predetermined processing contents.
A specification input unit that reads specification data that describes the contents of the control program in text, and
A conversion database that stores the correspondence between a plurality of keywords used in the specification data and the block, and
It is provided with a model creation unit that creates the model by referring to the conversion database based on the specification data.
The model creation unit
A plurality of the keywords are sequentially extracted from the beginning of the specification data and replaced with the plurality of blocks.
A model creation system that creates the model by connecting the corresponding inputs and outputs between the blocks.
請求項1記載のモデル作成システムであって、
前記キーワードは、前記処理内容に基づいて階層的に構成されているモデル作成システム。
The model creation system according to claim 1.
The keyword is a model creation system that is hierarchically configured based on the processing content.
請求項1または2記載のモデル作成システムであって、
前記処理内容に対する標準のキーワードと、他の表記によるキーワードとを対応づけたキーワードデータベースを有し、
前記モデルの作成に先立って、または前記モデルの作成と並行して、前記仕様書データのキーワードを、前記キーワードデータベースを参照して、標準のキーワードに整える標準化処理部を備えるモデル作成システム。
The model creation system according to claim 1 or 2.
It has a keyword database that associates standard keywords for the processing content with keywords in other notations.
A model creation system including a standardization processing unit that prepares keywords of the specification data into standard keywords by referring to the keyword database before or in parallel with the creation of the model.
請求項1~3いずれか記載のモデル作成システムであって、
前記仕様書データには、前記モデルを作成する単位を規定するための所定の記述子が含まれており、
前記モデル作成部は、前記記述子で規定された単位ごとに前記モデルを、単位モデルとして作成するモデル作成システム。
The model creation system according to any one of claims 1 to 3.
The specification data includes a predetermined descriptor for defining the unit for creating the model.
The model creation unit is a model creation system that creates the model as a unit model for each unit specified in the descriptor.
請求項4記載のモデル作成システムであって、
前記モデル作成部は、さらに、
前記仕様書データの記述に基づいて複数の前記単位モデルの優先順位を設定し、
前記単位モデル間で対応する入出力を結線して、前記仕様書データの全体に対応するモデルを作成するモデル作成システム。
The model creation system according to claim 4.
The model creation unit further
Prioritize a plurality of the unit models based on the description of the specification data, and set the priority.
A model creation system that connects the corresponding input / output between the unit models and creates a model corresponding to the entire specification data.
請求項1~5いずれか記載のモデル作成システムであって、
複数の前記モデルの実行順序を規定する結合指示データを読み込む結合指示データ入力部と、
前記結合指示データで指定された前記モデルを、それぞれ当該結合指示データに従って相互に関係づけることによって、当該結合指示データに対応する制御処理を表す結合モデルを作成するモデル結合部とを備えるモデル作成システム。
The model creation system according to any one of claims 1 to 5.
A join instruction data input unit that reads join instruction data that defines the execution order of a plurality of the models, and a join instruction data input unit.
A model creation system including a model join unit that creates a join model representing a control process corresponding to the join instruction data by relating the models specified in the join instruction data to each other according to the join instruction data. ..
請求項6記載のモデル作成システムであって、
前記結合指示データ入力部は、併せて前記結合モデルに対する外部からの入力、および該結合モデルから外部への出力を規定するインタフェース一覧表を入力し、
前記モデル作成システムは、さらに、
前記結合指示データで指定された各モデルの入出力に基づいて、前記結合モデルとしての入出力を表す入出力リストを作成するとともに、これと前記インタフェース一覧表との対比により、前記結合指示データの異状を判断するリスト作成部を備えるモデル作成システム。
The model creation system according to claim 6.
The join instruction data input unit also inputs an interface list that defines an external input to the join model and an output from the join model to the outside.
The modeling system further
Based on the input / output of each model specified in the join instruction data, an input / output list representing the input / output as the join model is created, and by comparing this with the interface list, the join instruction data can be obtained. A model creation system equipped with a list creation unit that determines abnormalities.
請求項6または7記載のモデル作成システムであって、
前記結合指示データで指定された各モデルを起動させるためのトリガー信号作成ブロックを作成するトリガー生成部を備え、
前記トリガー生成部は、
前記結合指示データで指定された各モデルの入力から、該各モデルを起動させるトリガー信号を抽出し、
当該抽出結果に基づいて、重複しないようにトリガー信号作成ブロックを前記結合モデルに追加し、
該トリガー信号作成ブロックを、それぞれ対応する前記モデルに結線するモデル作成システム。
The model creation system according to claim 6 or 7.
It is equipped with a trigger generator that creates a trigger signal creation block for activating each model specified in the join instruction data.
The trigger generator is
A trigger signal for activating each model is extracted from the input of each model specified in the join instruction data.
Based on the extraction result, a trigger signal creation block is added to the coupling model so as not to overlap.
A model creation system that connects the trigger signal creation block to the corresponding model.
請求項5~8いずれか記載のモデル作成システムであって、
前記結合指示データで指定された各モデル間で対応する入出力を結線する結線部を備え、
該結線部は、
前記結合指示データに基づいて前記各モデルの実行順序を特定し、
前記モデルの出力が、当該モデルの後に実行される他のモデルの入力となる場合は、両者を直接結線し、
前記モデルの出力が、当該モデルの前に実行される他のモデルの入力となる場合は、前の処理における内容を入力することを表すブロックを介在させて両者を結線するモデル作成システム。
The model creation system according to any one of claims 5 to 8.
It is provided with a connection part for connecting the corresponding input / output between each model specified in the connection instruction data.
The connection part is
The execution order of each model is specified based on the join instruction data, and the execution order is specified.
If the output of the model is the input of another model that is executed after the model, connect the two directly.
When the output of the model is the input of another model executed before the model, a model creation system that connects the two with a block indicating that the contents of the previous process are input.
予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルをコンピュータによって作成するモデル作成方法であって、
前記コンピュータが実行するステップとして、
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力ステップと、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースを参照する参照ステップと、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成ステップとを備え、
前記モデル作成ステップは、
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するステップであるモデル作成方法。
This is a model creation method in which a computer creates a model that represents the contents of a control program by combining blocks that indicate predetermined processing contents.
As a step performed by the computer
A specification input step for reading specification data in which the contents of the control program are described in text, and
A reference step that refers to a conversion database that stores the correspondence between a plurality of keywords used in the specification data and the block, and
A model creation step for creating the model by referring to the conversion database based on the specification data is provided.
The model creation step is
A plurality of the keywords are sequentially extracted from the beginning of the specification data and replaced with the plurality of blocks.
A model creation method, which is a step of creating the model by connecting the corresponding input / output between the blocks.
コンピュータによって予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルを作成するためのコンピュータプログラムであって、
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力機能と、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースを参照する参照機能と、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成機能とをコンピュータによって実現し、
前記モデル作成機能は、
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成する機能であるコンピュータプログラム。

It is a computer program for creating a model representing the contents of a control program by combining blocks indicating the processing contents predetermined by a computer.
A specification input function that reads specification data that describes the contents of the control program in text, and
A reference function that refers to a conversion database that stores the correspondence between a plurality of keywords used in the specification data and the block, and
A computer realizes a model creation function that creates the model by referring to the conversion database based on the specification data.
The model creation function is
A plurality of the keywords are sequentially extracted from the beginning of the specification data and replaced with the plurality of blocks.
A computer program that is a function of creating the model by connecting the corresponding input / output between the blocks.

JP2020153639A 2020-09-14 2020-09-14 Model generation system Pending JP2022047714A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2020153639A JP2022047714A (en) 2020-09-14 2020-09-14 Model generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2020153639A JP2022047714A (en) 2020-09-14 2020-09-14 Model generation system

Publications (1)

Publication Number Publication Date
JP2022047714A true JP2022047714A (en) 2022-03-25

Family

ID=80781226

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2020153639A Pending JP2022047714A (en) 2020-09-14 2020-09-14 Model generation system

Country Status (1)

Country Link
JP (1) JP2022047714A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117519693A (en) * 2024-01-02 2024-02-06 深圳维盛半导体科技有限公司 3D conversion method, device, equipment and storage medium for bond wire quota statistics

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117519693A (en) * 2024-01-02 2024-02-06 深圳维盛半导体科技有限公司 3D conversion method, device, equipment and storage medium for bond wire quota statistics
CN117519693B (en) * 2024-01-02 2024-04-02 深圳维盛半导体科技有限公司 3D conversion method, device, equipment and storage medium for bond wire quota statistics

Similar Documents

Publication Publication Date Title
US9618925B2 (en) Multi-mode editor for configuring process control blocks including both logical functions and arithmetic computations
Meinicke et al. Mastering software variability with FeatureIDE
JP2670345B2 (en) Automatic program generator
US9754059B2 (en) Graphical design verification environment generator
CN105793818A (en) Source code translation
JPH10232891A (en) Work group computing for electronic design automation
US8584062B2 (en) Tool suite for RTL-level reconfiguration and repartitioning
US9031672B2 (en) Logic diagram processing device and logic diagram processing method
JP2022047714A (en) Model generation system
CN116542207A (en) Method, device, equipment and storage medium for generating circuit layout
JP5747698B2 (en) Requirements management support device
JP2007011507A (en) Display method of program tree and program generation system
JP2007206798A (en) Program, method and device for generating control program
EP0218258A3 (en) Software structuring system and method by data table translation
JP6993573B2 (en) Program analysis method, program analysis device and program analysis program
JPWO2017043664A1 (en) Information management apparatus and file management method
JPS62197826A (en) Production of system flow specifications
CN116167728B (en) BIM project information linkage realization method and device
JP5316273B2 (en) Program automatic generation apparatus and program automatic generation method
US7890911B2 (en) Skeleton generation apparatus and method
JP2008009678A (en) Logic diagram display method, program, and device
JP2005327192A (en) Hardware design system and method thereof
JP5791797B2 (en) LSI design apparatus, LSI design method, and program
Kulcsár et al. Bridging the Design Gap: Next-level Automation in Automotive Design with the IncQuery AUTOSAR-UML Bridge
KR100940127B1 (en) Method of translating requirement model to natural language

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20230706