JP7572819B2 - Model Creation System - Google Patents
Model Creation System Download PDFInfo
- Publication number
- JP7572819B2 JP7572819B2 JP2020153639A JP2020153639A JP7572819B2 JP 7572819 B2 JP7572819 B2 JP 7572819B2 JP 2020153639 A JP2020153639 A JP 2020153639A JP 2020153639 A JP2020153639 A JP 2020153639A JP 7572819 B2 JP7572819 B2 JP 7572819B2
- Authority
- JP
- Japan
- Prior art keywords
- model
- input
- instruction data
- data
- unit
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 claims description 75
- 230000008569 process Effects 0.000 claims description 67
- 238000012545 processing Methods 0.000 claims description 50
- 238000006243 chemical reaction Methods 0.000 claims description 22
- 230000005856 abnormality Effects 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 6
- 230000003213 activating effect Effects 0.000 claims description 4
- 239000000284 extract Substances 0.000 claims description 4
- 238000000605 extraction Methods 0.000 claims description 2
- 238000012905 input function Methods 0.000 claims 3
- 238000010586 diagram Methods 0.000 description 24
- 238000011161 development Methods 0.000 description 17
- 230000008901 benefit Effects 0.000 description 15
- 230000006870 function Effects 0.000 description 11
- 238000013500 data storage Methods 0.000 description 5
- 238000003672 processing method Methods 0.000 description 5
- 230000002159 abnormal effect Effects 0.000 description 3
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 230000004913 activation Effects 0.000 description 1
- 230000004931 aggregating effect Effects 0.000 description 1
- 230000001174 ascending effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000007935 neutral effect Effects 0.000 description 1
- 230000004044 response Effects 0.000 description 1
- 230000000087 stabilizing effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
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は、複数のモデルの入出力を自動的に結合する際に、モデル間の入出力データの整合性を確認する技術を提供している。
Traditionally, model-based development has often been used in the development of programs for controlling vehicles. Model-based development is a method in which a developer writes a program in a highly visible manner by combining blocks that indicate predetermined processing content, rather than writing the program in the form of source code. Examples of model-based development include Matlab (registered trademark) and Simulink (registered trademark). To improve the efficiency of such model-based development, for example,
モデルベース開発は、視認性が高くプログラムの内容を理解しやすい利点があるものの、個々のモデルには説明が付されていない分、複雑な制御プログラムの全体をモデルで表現した場合、細部のモデルについては、かえって理解し難いという短所があった。従来、モデルベース開発の利点を活かしつつ、かかる短所を解決する方法は提案されていなかった。
本発明は、かかる課題を解決するためになされたものであり、プログラムの意図を理解しづらいという短所を解決しつつ、モデルベース開発の効率を向上できる技術を提供することを目的とする。
Although model-based development has the advantage of being highly visible and easy to understand the contents of the program, it has the disadvantage that when a complex control program is expressed as a whole in a model, it is difficult to understand the detailed models because each model does not come with an explanation. Up until now, no method has been proposed that overcomes this disadvantage while taking advantage of the advantages of model-based development.
The present invention has been made to solve the above problems, and has an object to provide a technique that can improve the efficiency of model-based development while solving the drawback that it is difficult to understand the intent of a program.
本発明は、
予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルを作成するモデル作成システムであって、
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力部と、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースと、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成部とを備え、
前記モデル作成部は、
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するモデル作成システムと構成することができる。
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,
a specification input unit for reading specification data in which the contents of the control program are described in text;
a conversion database storing a correspondence between a plurality of keywords used in the specification data and the blocks;
a model creation unit that creates the model by referring to the conversion database based on the specification data,
The model creation unit is
Extracting a plurality of the keywords from the beginning of the specification data in order and replacing them with a plurality of the blocks;
A model creation system can be configured to create the model by connecting corresponding inputs and outputs between the blocks.
本発明における仕様書データは、プログラムの内容をテキストで記述しているため、個々のモジュールのように規模の小さいプログラムであれば、その意図を理解しやすい利点がある。本発明によれば、このような仕様書データを読み込んで、ブロックに置換することにより、モデルを自動的に作成することができる。こうして作成されたモデルを結合させて全体のプログラムを構築するようにすれば、個々のモジュールについては、意図を理解しやすい仕様書データによる開発を適用しつつ、プログラム全体については、視認性の高いモデルを活用することができ、双方の利点を活かした効率的な開発を実現することが可能となる。 The specification data in this invention describes the contents of a program in text, which has the advantage that the intent is easy to understand for small programs such as individual modules. According to this invention, a model can be automatically created by reading such specification data and replacing it with blocks. By combining the models created in this way to build the entire program, it is possible to develop individual modules using specification data that makes it easy to understand the intent, while using highly visible models for the entire program, making it possible to realize efficient development that takes advantage of the benefits of both.
本発明におけるブロックへの配置とは、モデルベース開発で用いられる環境、例えば、Matlab(登録商標)、Simulink(登録商標)などに応じて、モデルを表すデータを作成することを意味する。同様にモデルの表記規則も環境に応じたものを用いればよい。本発明では、変換データベースを用いてキーワードをブロックに置換するが、この際に、併せてブロックに応じた表記規則が適用されることになる。表記規則は、ブロックと併せて変換データベースに記憶しておいてもよいし、ブロックに置換した際に、モデルベース開発で用いられる環境を呼び出すことで、当該環境下で用意されている機能を利用するものとしてもよい。
仕様書データの記述内容、記述形式は任意に決めることができる。開発者がより理解しやすい自然言語を用いて記述してもよい。また、客観性の高い論理式、数式などの形式で記述してもよい。ブロックとキーワードとの対応関係も任意に決めることができる。キーワードは、一文字、複数の文字列、特定の記号など種々の態様をとることができる。
In the present invention, placing in a block means creating data representing a model according to an environment used in model-based development, such as Matlab (registered trademark), Simulink (registered trademark), etc. Similarly, the notation rules for the model may be used according to the environment. In the present invention, a conversion database is used to replace keywords with blocks, and at this time, notation rules according to the blocks are also applied. The notation rules may be stored in the conversion database together with the blocks, or when replaced with blocks, the environment used in model-based development may be called up to utilize functions prepared in that environment.
The description content and description format of the specification data can be determined arbitrarily. It may be described using a natural language that is easier for developers to understand. It may also be described in a format such as a logical expression or mathematical formula that is more objective. The correspondence between blocks and keywords can also be determined arbitrarily. Keywords can take various forms, such as a single character, multiple character strings, or a specific symbol.
また、モデル作成部は、前記ブロックに応じた処理内容が実現されるよう前記モデルの表記規則に従って、前記複数のブロックの配置を決定する機能を備えても良い。例えば、モデルの表記規則として、左から右に向かって、入力から出力までの処理の流れを表す規則が設定されているときは、その流れに従って各ブロックを配置することにより、視覚的に理解しやすいモデルを作成することができる。
このブロックの配置は、仕様書データに基づいてブロックに置換した後、結線前に行うものとしてもよいし、結線まで完了した後に行ってもよい。
The model creation unit may also have a function of determining the arrangement of the plurality of blocks according to a notation rule of the model so that the processing content corresponding to the block is realized. For example, when a rule that represents the flow of processing from input to output from left to right is set as the notation rule of the model, by arranging each block according to the flow, a model that is visually easy to understand can be created.
This arrangement of blocks may be performed after replacement with blocks based on specification data and before wiring, or may be performed after wiring has been completed.
本発明のモデル作成システムにおいては、
前記キーワードは、前記処理内容に基づいて階層的に構成されているものとしてもよい。
In the model creation system of the present invention,
The keywords may be hierarchically structured based on the processing content.
階層的とは、上位層の処理内容に応じた上位層のキーワードと、それぞれのキーワードまたは処理内容の下位層に属するキーワードまたは処理内容からなる構造を言う。階層は、2階層としてもよいし、3階層以上としてもよい。このように階層的にすることにより、プログラムの内容が複雑であっても表現することが可能となる。 "Hierarchical" refers to a structure consisting of keywords in a higher layer that correspond to the processing content of the higher layer, and keywords or processing content that belong to a lower layer of each keyword or processing content. The hierarchy may be two levels, or three or more levels. By making it hierarchical in this way, it becomes possible to express even complex program content.
本発明のモデル作成システムにおいては、
前記処理内容に対する標準のキーワードと、他の表記によるキーワードとを対応づけたキーワードデータベースを有し、
前記モデルの作成に先立って、または前記モデルの作成と並行して、前記仕様書データのキーワードを、前記キーワードデータベースを参照して、標準のキーワードに整える標準化処理部を備えるものとしてもよい。
In the model creation system of the present invention,
a keyword database that associates standard keywords for the processing content with keywords in other notations;
The system may further include a standardization processing unit that, prior to or in parallel with the creation of the model, converts keywords in the specification data into standard keywords by referring to the keyword database.
こうすることにより、仕様書データを柔軟に記載することができる。また、仕様書データを標準のキーワードに整えることにより、モデルの作成を容易に安定して行うことが可能となる。
キーワードデータベースは、種々の対応関係が可能である。例えば、標準のキーワードを英語、他のキーワードを日本語としておけば、開発者がより理解しやすい日本語で仕様書データを記述することが可能となる。他の態様として、標準のキーワードに対して、誤りやすい表記や、表記のゆれを、他のキーワードとして対応づけてもよい。こうすることにより、仕様書データが規定された表記に合致していないときでも、モデルの作成が可能となる。
This allows specification data to be written flexibly. Also, by arranging the specification data into standard keywords, it becomes possible to easily and stably create models.
The keyword database can have various correspondences. For example, if standard keywords are in English and other keywords are in Japanese, it becomes possible for developers to write specification data in Japanese, which is easier to understand. As another aspect, misleading notations or notation variations may be associated with standard keywords as other keywords. In this way, it becomes possible to create a model even when the specification data does not match the defined notation.
本発明のモデル作成システムにおいては、
前記仕様書データには、前記モデルを作成する単位を規定するための所定の記述子が含まれており、
前記モデル作成部は、前記記述子で規定された単位ごとに前記モデルを、単位モデルとして作成するものとしてもよい。
In the model creation system of the present invention,
the specification data includes a predetermined descriptor for defining a unit for creating the model;
The model creation section may create the model as a unit model for each unit defined by the descriptor.
こうすることにより複雑な内容のプログラムであっても、単位に分けて仕様書データを作成することができる。また、単位に分けることにより、モデル作成を容易かつ安定して行うことができる。
単位を規定するための記述子は任意に決めることができる。一文字であってもよいし、文字列であってもよい。
By doing this, even if the program has complicated contents, specification data can be created by dividing it into units. Also, by dividing it into units, model creation can be performed easily and stably.
The descriptor for specifying the unit can be determined arbitrarily. It can be a single character or a string of characters.
上述の単位モデルを作成する態様においては、
前記モデル作成部は、さらに、
前記仕様書データの記述に基づいて複数の前記単位モデルの優先順位を設定し、
前記単位モデル間で対応する入出力を結線して、前記仕様書データの全体に対応するモデルを作成するものとしてもよい。
In the above-mentioned aspect of creating the unit model,
The model creation unit further
setting a priority order for the plurality of unit models based on the description of the specification data;
Corresponding inputs and outputs between the unit models may be connected to create a model corresponding to the entire specification data.
こうすることにより、単位モデル間の結線を自動化することができ、誤りなく効率的にモデル作成することができる利点がある。
優先順位は、例えば、仕様書データの文頭が優先度が高く、文末に向けて順に優先度が低くなるものとしてもよい。また、その逆であってもよい。さらに、単位モデルごとに、優先度を表す数字、文字、記号を付し、これに基づいて優先順位を決定してもよい。
This has the advantage that the connections between unit models can be automated, enabling efficient model creation without errors.
The priority order may be, for example, such that the first part of the specification data has a higher priority and the last part has a lower priority. It may also be the other way around. Furthermore, a number, letter, or symbol representing the priority may be assigned to each unit model, and the priority order may be determined based on this.
本発明のモデル作成システムにおいては、
複数の前記モデルの実行順序を規定する結合指示データを読み込む結合指示データ入力部と、
前記結合指示データで指定された前記モデルを、それぞれ当該結合指示データに従って相互に関係づけることによって、当該結合指示データに対応する制御処理を表す結合モデルを作成するモデル結合部とを備えるものとしてもよい。
In the model creation system of the present invention,
a combination instruction data input unit for reading combination instruction data that specifies an execution order of the plurality of models;
The system may further include a model combination unit that creates a combination model representing a control process corresponding to the combination instruction data by relating the models specified by the combination instruction data to each other in accordance with the combination instruction data.
結合指示データは、複数のモデルの実行順序を指示するデータである。仕様書データとの相違は、モデル単位でその順序が規定されている点である。結合指示データとしては、モデル配置図、即ち、モデルを矩形など所定の図形で表記し、その配置によって、モデル間の親子関係、実行順序を規定するものであってもよい。また、仕様書データのように、結合されるモデルの名称・実行順序をテキストで特定する形式をとってもよい。さらに、モデル配置図に代えて、そこに表される図形の座標・サイズを用いることで、テキストデータによって、それぞれの位置関係を表すようにしてもよい。このように結合指示データ、特にモデル配置図を用いることにより、モデルベース開発の利点であるモデル間の入出力等、プログラムの全体を視覚的に容易に把握することができる利点がある。上記態様によれば、結合指示データに応じた結合モデルを効率的に作成することができる。
結合対象となるモデルには、モデル生成システムで生成したモデルだけでなく、外部から読み込んだモデルを含めてもよい。
The merge 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. The merge instruction data may be a model layout diagram, that is, a diagram in which the models are represented by a predetermined figure such as a rectangle, and the parent-child relationship between the models and the execution order are specified by the layout. Also, like the specification data, the name and execution order of the models to be merged may be specified by text. Furthermore, instead of the model layout diagram, the coordinates and size of the figures shown there may be used to express the respective positional relationships by text data. In this way, by using the merge instruction data, especially the model layout diagram, there is an advantage that the entire program, such as input and output between models, which is an advantage of model-based development, can be visually and easily grasped. According to the above aspect, a merge model according to the merge instruction data can be efficiently created.
The models to be combined may include not only models generated by the model generation system, but also models read from outside.
結合モデルを作成する態様においては、
前記結合指示データ入力部は、併せて前記結合モデルに対する外部からの入力、および該結合モデルから外部への出力を規定するインタフェース一覧表を入力し、
前記モデル作成システムは、さらに、
前記結合指示データで指定された各モデルの入出力に基づいて、前記結合モデルとしての入出力を表す入出力リストを作成するとともに、これと前記インタフェース一覧表との対比により、前記結合指示データの異状を判断するリスト作成部を備えるものとしてもよい。
In an embodiment for generating a binding model,
the connection instruction data input unit also inputs an interface list that specifies inputs from the outside to the connection model and outputs from the connection model to the outside;
The model creation system further comprises:
The system may also include a list creation unit that creates an input/output list representing the input/output of the combined model based on the input/output of each model specified in the combine instruction data, and determines whether there is an abnormality in the combine instruction data by comparing this with the interface list.
こうすることにより結合モデルに対する入出力、または結合モデルに含まれる各モデルなどの誤り等を容易に見いだすことができる。 This makes it easy to find errors in the inputs and outputs of the combined model, or in each model included in the combined model.
結合モデルを作成する態様においては、
前記結合指示データで指定された各モデルを起動させるためのトリガー信号作成ブロックを作成するトリガー生成部を備え、
前記トリガー生成部は、
前記結合指示データで指定された各モデルの入力から、該各モデルを起動させるトリガー信号を抽出し、
当該抽出結果に基づいて、重複しないようにトリガー信号作成ブロックを前記結合モデルに追加し、
該トリガー信号作成ブロックを、それぞれ対応する前記モデルに結線するものとしてもよい。
In an embodiment for generating a binding model,
a trigger generating unit that generates a trigger signal generating block for activating each model designated by the combination instruction data;
The trigger generation unit is
extracting a trigger signal for activating each model from an input of each model designated by the combination instruction data;
Based on the extraction result, adding a trigger signal generating block to the combined model without overlapping;
The trigger signal generating blocks may be wired to the corresponding models.
各モデルは、16msごとなど、起動するタイミングが決まっている。かかるタイミングでトリガー信号が入力されることにより、各モデルは起動する。上記態様によれば、トリガー信号に応じてトリガー信号作成ブロックを自動的に作成することができる。 Each model has a set activation timing, such as every 16 ms. Each model is activated when a trigger signal is input at that timing. According to the above aspect, a trigger signal creation block can be automatically created in response to a trigger signal.
結合モデルを作成する態様においては、
前記結合指示データで指定された各モデル間で対応する入出力を結線する結線部を備え、
該結線部は、
前記結合指示データに基づいて前記各モデルの実行順序を特定し、
前記モデルの出力が、当該モデルの後に実行される他のモデルの入力となる場合は、両者を直接結線し、
前記モデルの出力が、当該モデルの前に実行される他のモデルの入力となる場合は、前の処理における内容を入力することを表すブロックを介在させて両者を結線するものとしてもよい。
結合指示データが、モデル配置図である場合には、そこに表される各モデルの位置関係に基づいて実行順序が特定されることになる。
In an embodiment for generating a binding model,
a connection unit for connecting corresponding inputs and outputs between each model designated by the connection instruction data,
The connection portion is
determining an execution order of each of the models based on the combination instruction data;
If the output of the model is to be the input of another model executed after the model, the two are directly connected.
When the output of the model is to be the input of another model executed before the model in question, the two may be connected via a block representing the input of the contents of the previous process.
When the combination instruction data is a model layout diagram, the execution order is specified based on the positional relationship of each model shown therein.
上記態様によれば各モデルを結線することができ、結合モデル間の入出力を含めたモデルの作成を行うことができる。また、結線する際に、モデルの実行順序を考慮して、前の処理における内容を入力することを表すブロックを介在させることにより、処理内容も適切に実行させることが可能となる。 According to the above aspect, each model can be connected, and a model including input and output between the connected models can be created. In addition, when connecting the models, the execution order of the models can be taken into consideration, and by inserting a block that represents the input of the contents of the previous process, the process contents can also be executed appropriately.
本発明は、上述した特徴を必ずしも全てを備えている必要はなく、適宜、その一部を省略したり、組み合わせたりしてもよい。上述したモデルの作成をコンピュータによって実行するモデル作成方法として構成してもよいし、かかる方法をコンピュータに行わせるためのコンピュータプログラムとして構成してもよい。さらに、かかるコンピュータプログラムを記録したコンピュータが読み取り可能な記録媒体として構成してもよい。 The present invention does not necessarily have to have all of the above-mentioned features, and some of them may be omitted or combined as appropriate. The present invention may be configured as a model creation method in which the creation of the above-mentioned model is executed by a computer, or as a computer program for causing a computer to execute such a method. Furthermore, the present invention may be configured as a computer-readable recording medium on which such a computer program is recorded.
以下、本発明の実施例としてのモデル作成システムについて説明する。
図1は、モデル作成システムの構成を示す説明図である。モデル作成システム100は、仕様書データ11およびモデル配置図データ12を含む入力データ10を読み込み、ここからモデルを作成する。
A model creation system according to an embodiment of the present invention will now be described.
1 is an explanatory diagram showing the configuration of a
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. Lines L1 to L18 on the left side of the example in FIG. 2 are line numbers added for convenience of explanation. "■" in line L1 represents a program unit for control. Paragraph (a) (lines L2 to L7), paragraph (b) (lines L8 to L15), and paragraph (c) (lines L16 to L18) represent conditions and processing when the conditions are met. In the example in FIG. 2, lines L3 to L5 following "(a) [condition] start" represent the conditions in paragraph (a). When this condition is met, the processing shown in "[processing]" (line L6) and the next line (line L7) is realized.
Paragraph (b) (lines L8 to L15) describes the process to be performed when the condition in paragraph (a) is not met. As in paragraph (a), lines L9 to L13 following "(b) [condition] fall" (line L8) indicate the condition in paragraph (b). When this condition is met, the process indicated in "[Process]" and the next line is realized.
Furthermore, paragraph (c) describes the process to be taken when the conditions in paragraphs (a) and (b) are not met. The word "[Processing]" written in the line following "(c) [Condition] Other than the above" indicates that paragraph (c) is applied unconditionally.
It should be noted that the description of the specification data shown in FIG. 2 is merely an example, and the rules for describing the specification data can be determined arbitrarily.
図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の出力が入力される。
3 is an explanatory diagram showing an example of a model, which corresponds to the specification data shown in FIG.
"(a) [Condition] Launch" in line L2 represents a conditional branch, which corresponds to block b12 in the model in Figure 3. In other words, a model can be created by replacing a line representing a conditional branch with block b12. And since the condition for the conditional branch in line L2 is represented by lines L3 to L5, each of them can be replaced with a block as shown below, and these can be arranged so that they become the input to block b12.
In the condition "accel_request_flag==1" in line L3 indicating the contents of the condition, "accel_request_flag" corresponds to block b1. The code "1" is displayed in block b1, which is associated with "accel_request_flag" by a separately prepared variable table. "==" corresponds to block b3, and the "1" in "accel_request_flag==1" corresponds to block b2. The "AND" portion is expressed by replacing it with block b7.
Block b4 corresponds to "accel_opening" in line L4. The code "2" is associated with "accel_opening" by the variable table. Block b6 corresponds to ">", and block b5 corresponds to "ACCEL_OPEN_THR". And the result of line L4 is input to block b7 because it constitutes part of the condition of "AND" in line L3.
The "OR" in line L4 represents the logical sum of the output of the "AND" condition represented by lines L3 and L4 and the condition in line L5, so it is replaced by block b8, and the output of block b7 and the outputs of blocks b9 to b11 representing line L5 are input.
上述の条件を満たしたときの処理(行L6)は、「accel_command_flag=1」のうち、「accel_command_flag」はブロックb14の符号「6」に対応し、「1」はブロックb13に対応する。「==」は、条件分岐のブロックb12のうち条件を満たした場合の処理を表す内容に、ブロックb13が入力されている点が対応する。
同様に、仕様書データ(図2)の行L8~L18も、それぞれ対応するブロックに置換することにより、モデルを作成することができる。
The process when the above condition is satisfied (line L6) is "accel_command_flag=1", where "accel_command_flag" corresponds to the code "6" in block b14, and "1" corresponds to block b13. "==" corresponds to the fact that block b13 is input to the content representing the process when the condition is satisfied in block b12 of the conditional branch.
Similarly, a model can be created by replacing lines L8 to L18 of the specification data (FIG. 2) with the corresponding blocks.
B.モデル作成システムの構成:
図1に戻り、モデル作成システム100の構成について説明する。
モデル作成システム100は、CPUおよびメモリを備えるコンピュータに、図示する各機能ブロックを実現するコンピュータプログラムをインストールすることによって構成することができる。モデル作成システム100は、このようにソフトウェア的に構成してもよいし、機能ブロックの少なくとも一部または全部をハードウェアによって構成してもよい。
以下、それぞれの機能ブロックの内容について説明する。
B. Modeling system configuration:
Returning to FIG. 1, the configuration of the
The
The contents of each functional block will be explained below.
仕様書入力部101は、図2に示した形式の仕様書データ11を読み込む。読み込んだデータは、記憶部110内に設定された入力データ記憶部111に記憶される。
モデル配置図入力部102は、モデル配置図データ12を読み込む。モデル配置図データ12とは、図3に示したようなモデルが複数ある場合に、それらを結合して一つのモデルを作成するための仕様を指示するデータであり、本発明の結合指示データの一種である。具体的な内容は後述する。読み込んだモデル配置図データ12は、記憶部110内の入力データ記憶部111に記憶される。
The
The model layout
標準化処理部103は、入力した仕様書データ11に含まれるキーワードの標準化を行う。キーワードとは、例えば、図2の仕様書データの行L2における「[条件]」のように、置換するブロックを特定するための表記を言う。本実施例では、一部のキーワードについては、英語での表記を標準としながら多様な表現を許容している。例えば、[条件]という表記については、[IF]を標準の表記とできる。キーワードデータベース104は、標準の表記(例えば、[IF])と、その他の表記(例えば、[条件])とを対応づけて記憶したデータベースである。標準化処理部は、キーワードデータベース104を参照しながら、仕様書データ11のキーワードを標準の表記に修正していく。ただし、標準の表記に置換した仕様書データを新たに作成するということではなく、入力データ記憶部111に読み込んだ仕様書データの内容を修正すればよい。
標準化処理としては、上述のように、日本語から英語への変換、またはその逆という態様の他、表記のゆれなどを含めてもよい。例えば、図2の行L18の「前回値保持」という処理内容については、かかる表記を標準としつつ、「前回値を保持」、「前ステップの値」などを表記のゆれとして、キーワードデータベース104に記憶しておいてもよい。
上述の通り、標準化処理を施すことにより、後述するモデルの作成などは、標準化された表記を前提として用意しておけば良いこととなり、処理の簡略化、安定化を図ることができる。
The
The standardization process may include not only the conversion from Japanese to English or vice versa, as described above, but also variations in notation, etc. For example, for the process content "keep previous value" in line L18 of Fig. 2, this notation may be used as the standard, while "keep previous value", "value of previous step", etc. may be stored in the
As described above, by carrying out standardization processing, the creation of models, which will be described later, can be performed based on the standardized notation, thereby simplifying and stabilizing the processing.
モデル作成部106は、仕様書データ11に基づいてモデルを作成する処理を行う。仕様書データ11には、図2に示したように、処理内容を表す種々のキーワードが含まれている.モデルを構成するブロックとキーワードとの対応関係は、変換データベース107に記憶されている。モデル作成部106は、仕様書データ11に含まれるキーワードを、それぞれ変換データベース107に従って、モデルに置換することにより、モデルを作成するのである。作成したモデルは、記憶部110内に設けられたモデル記憶部112に保存される。
The
モデルが作成されると、モデル配置図データ12に基づいて、複数のモデルを結合して、より複雑な制御プログラムを構築する。以下の機能ブロックは、モデルの結合を行うためのものである。
まず、リスト作成部105は、複数のモデルを結合して作成される結合モデルについて、入出力のリストを作成する。この入出力リストは、具体的には、結合モデルに用いられる各モデルの入出力を集約して作成することができる。作成した入出力リストは、記憶部110に記憶される。
Once the models are created, a more complex control program is constructed by combining a plurality of models based on the
First, the
なお、入出力リストは、モデル配置図データ12とともに、開発者が作成し、モデル作成システム100に入力するものとしてもよい。かかる場合には、リスト作成部105は、モデル配置図に基づいて入出力リストを作成し、開発者から入力されたリストに誤りがないかを判定するようにしてもよい。
The input/output list may be created by the developer together with the
モデル結合部115は、モデル配置図データ12に基づいて複数のモデルを結合する。結合したモデルは、モデル記憶部112に記憶される。
トリガー生成部116は、結合モデルに用いられる各モデルが起動するタイミングを特定し、それぞれのタイミングに応じたトリガー信号を発信するためのブロックをモデルに設定する。こうすることにより、複数のモデルを適切な実行タイミングで起動させることが可能となる。
結線部117は、複数のモデルの入出力を抽出し、同じ名称の入力、出力同士を結線する。こうすることでモデル間で適切な変数の伝達が可能となる。なお、結線部117は、各モデルの実行順序を考慮し、先に実行したモデルの出力値を、それよりも後に実行するモデルに入力する場合には、両者を直接結線する。逆に、あるモデルの出力値を、それよりも先に実行したモデルに入力する場合には、前回ステップの値を入力することを表すブロックを介在させて結線する。
The
The
The
表示制御部118は、モデル作成システム100において、種々の表示を行う。例えば、仕様書データ11、モデル配置図データ12の表示や、作成されたモデルの表示、また、モデル作成に必要な種々の情報の表示や、開発者が種々の指定を行うための画面の表示などを行う。また、表示制御部118は、開発者の指示に従って結合モデルの結線の表示態様を切換可能としてもよい。例えば、モデルにおいて、入出力間を視認可能な線で結ぶようにしてもよいし、対応する入出力を結ぶ線は省略しつつ、両者を同じ色、記号などで表示して対応関係を示すようにしてもよい。かかる切換は、入出力の変数ごとに切換可能としてもよいし、全体をまとめて切換可能としてもよいし、結合モデルに用いられるモデル単位などで当該モデルに対する入出力の表示のみを切換可能としてもよい。このように多様な表示を実現可能とすることにより、モデルまたは結合モデルを開発者に理解しやすい状態で表示することが可能となり、開発効率を向上させることができる。
The
モデル作成システム100は、図1に示した他、種々の構成をとることができる。図1に示した以外の機能ブロックを用いてもよいし、これらの一部を複数の機能ブロックで実現したり、複数の機能ブロックを一つに統合してもよい。また、本実施例では、スタンドアロンで稼働するコンピュータを利用した例を示したが、図示した機能の一部を、ネットワークで接続された複数のサーバによって提供するものとしてもよい。
The
C.モデル作成処理:
以下、モデル作成システム100が実行する処理について説明する。
図4および図5は、モデル作成処理のフローチャートである。仕様書データに基づいてモデルを作成する処理である。この処理は、主として図1の標準化処理部103、モデル作成部106が実行する処理であり、ハードウェア的にはモデル作成システム100を構成するコンピュータのCPUが実行する処理である。
C. Model Creation Process:
The processes executed by the
4 and 5 are flowcharts of the model creation process. This process creates a model based on specification data. This process is mainly executed by the
処理を開始すると、モデル作成システム100は、作成対象となる仕様書データを選択する(ステップS10)。予め複数の仕様書データが読み込まれているときは、モデル作成システム100が、これらの仕様書データの一覧を開発者に提示し、開発者がその中から選択するようにしてもよいし、モデルが未作成の仕様書データを自動的に選択するようにしてもよい。また、開発者が、「新規読み込み」を指示することにより、新たに読み込む仕様書データを、モデル作成の対象として選択するようにしてもよい。
When processing begins, the
次に、モデル作成システム100は、選択された仕様書データを読み込む(ステップS11)。既に入力データ記憶部111に記憶されている場合には、そこから読み出すようにしてもよい。
Next, the
そして、モデル作成システム100は、仕様書定数表に基づいて、定数のデータベースを作成する(ステップS12)。図2の仕様書データの例においては、行L4における「ACCEL_OPEN_THR」が定数、即ち条件判断をするための閾値である。定数表は、このように仕様書データで用いられる定数の名称と、具体的な値とを対応づけた一覧表となっている。定数表は、仕様書データとともに開発者が作成して、モデル作成システム100に入力するデータである。
The
モデル作成システム100は、次に、キーワードデータベース104に基づいて仕様書データの記載を標準化する(ステップS13)。標準化の処理は、標準化処理部103の機能として既に説明した通りである。例えば、図2の仕様書データの行L2における「[条件]」などのキーワードに対して、キーワードデータベース104を参照して、標準の表記(例えば、[IF])として登録されている表記に置換するのである。仕様書データに用いられている表記が、既に標準の表記になっている場合には、処理をスキップして、次のキーワードの処理に移行する。
標準化としては、上述のように日本語、英語などの言語の置き換えや、表記のゆれの修正などを対象とすることができる。
The
Standardization can include the replacement of languages such as Japanese and English, as described above, and the correction of variations in notation.
なお、標準化は、必須の処理という訳ではなく、これを省略することも可能である。その場合、仕様書データにおいて、[条件]、[IF]のように同じ処理に対して多様なキーワードの表記を認めるのであれば、これらのそれぞれが適切にブロックに置換されるようにプログラムを構築する必要がある。同様に、表記のゆれに対しても、これを認めるのであれば、それぞれの表記のゆれに対して、適切にブロックに置換されるようにプログラムを構築する必要がある。もし、表記のゆれを認めないのであれば、仕様書データを規定通りに記載する必要があり、柔軟性に欠けることとなる。
本実施例では、標準化処理を施すことにより、こうした課題を回避でき、ブロックへの置換処理の簡略化、安定化などを図ることが可能となっている。
Standardization is not a required process, and it can be omitted. In that case, if various keyword notations for the same process, such as [Condition] and [IF], are permitted in the specification data, the program must be constructed so that each of these is replaced with an appropriate block. Similarly, if notational variations are permitted, the program must be constructed so that each notational variation is replaced with an appropriate block. If notational variations are permitted, the specification data must be written exactly as specified, which would result in a lack of flexibility.
In this embodiment, by carrying out standardization processing, it is possible to avoid such problems and to simplify and stabilize the replacement processing into blocks.
モデル作成システム100は、標準化処理が終了すると、仕様書データを章に分割する処理を行う(ステップS14)。章とは、プログラムを構成する単位の一つである。本実施例では、「■」という記述子で章を定義するものとした。図2の例では、行L1の文頭に1カ所記載されているだけであるが、次に「■」が記載されるまでが一つの章を構成することになる。このように章に区切って記載することにより、複雑なプログラムも理解しやすく記載することが可能となる利点がある。
なお、章を定義する記述子は、「■」に限らず任意に決めることができる。また、一文字である必要もなく、文字列で定義してもよい。
When the standardization process is completed, the
The descriptor that defines the chapter is not limited to "■" and can be determined arbitrarily. Also, it does not have to be a single character and can be defined as a character string.
図5に移り、モデル作成システム100は、処理対象となる章(サブシステム)を選択する(ステップS15)。基本的には、仕様書データの文頭から、未処理の章を順に選択するようにすればよいが、開発者が個別に指定可能としてもよい。
なお、サブシステムとは、章に基づいて作成された単位モデルを表している。
5, the
It should be noted that a subsystem represents a unit model created based on a chapter.
処理対象となる章が決まると、モデル作成システム100は、その章における仕様書データの未処理の一番上の文を読み込む(ステップS16)。そして、読み込んだ文に含まれるキーワードに応じて、処理方法を分類する(ステップS17)。
Once the chapter to be processed has been determined, the
処理方法の分類について、図6により説明する。
図6は、変換データベースの例を示す説明図である。変換データベースは、図示する通りキーワードと処理内容とを対応づけて記憶している。処理内容には、モデルベース開発の環境に応じて、当該処理を表すブロックが記憶されることになる。
図の例では、「[条件]」という一連の文字列がキーワードであり、このキーワードに対する処理内容が条件分岐であることを表している。従って、このキーワードが現れたときには、図3のブロックb12のように条件分岐を表すブロックが用意されることになるのである。処理方法の分類(図5のステップS17)では、このようにキーワードに応じたブロックへの置換処理を行う。
The classification of the processing methods will be explained with reference to FIG.
6 is an explanatory diagram showing an example of a conversion database. As shown in the figure, the conversion database stores keywords and processing contents in association with each other. In the processing contents, blocks representing the processing are stored according to the model-based development environment.
In the example shown in the figure, the series of characters "[condition]" is a keyword, and the processing content for this keyword is conditional branching. Therefore, when this keyword appears, a block representing a conditional branching is prepared, such as block b12 in Figure 3. In classifying the processing method (step S17 in Figure 5), replacement processing with a block according to the keyword is performed in this way.
本実施例のキーワードは、階層構造となっている。例えば、図6における2番目のキーワード「=」に対しては、四則演算という処理内容が対応づけられているが、四則演算の下位層には、さらに定数のマップ、absなどのキーワードおよびそれに対する処理内容が対応づけられている。こうすることにより、キーワードの組み合わせによって、種々の四則演算を表すことが可能となっている。
このように階層構造で用意されたキーワードを利用するためには、「=」という四則演算に対するキーワードを見いだした後は、参照すべきキーワードをその下位層に移行する必要がある。処理方法の分類(図5のステップS17)では、先に処理したキーワードに応じて、参照すべきキーワードの層を移行した上で、それぞれ変換データベースに従ったブロックに置換する処理を行う。
The keywords in this embodiment have a hierarchical structure. For example, the second keyword "=" in Fig. 6 is associated with the processing content of the four arithmetic operations, and at a lower level of the four arithmetic operations, keywords such as constant map and abs and the processing content corresponding to them are further associated. This makes it possible to express various arithmetic operations by combining keywords.
In order to use keywords prepared in a hierarchical structure like this, after finding the keyword for the four arithmetic operations "=", it is necessary to move the keyword to be referenced to a lower level. In the classification of the processing method (step S17 in FIG. 5), the layer of the keyword to be referenced is moved according to the previously processed keyword, and then a process of replacing it with a block according to the conversion database is performed.
四則演算の下位層のキーワードの内容について、さらに説明する。
(ライブラリ関数名)というキーワードは、例えば、仕様書データ中に「sin」(サイン関数を表す文字列)が記載されている場合などのように、ライブラリの関数名が記載されている場合を意味する。このように、変換データベースにキーワードとして登録されていない文字列であっても、ライブラリとして用意されている関数名が出現した場合には、それに対応するライブラリ関数を読み出し、その処理のためのブロックへの置換を行うことになる。
The contents of the lower-level keywords for the four arithmetic operations will be further explained.
The keyword (library function name) means that the name of a library function is written, for example, when "sin" (a character string representing the sine function) is written in the specification data. In this way, even if a character string is not registered as a keyword in the conversion database, if the name of a function prepared as a library appears, the corresponding library function will be read and replaced with a block for processing it.
また、変換データベースは、キーワードと処理内容が1対多で対応づけられていることもある。例えば、四則演算子に除算を示す「/」が含まれているが、これに対しては、(1)四則演算としての除算、(2)逆数の乗算の2つの処理が対応づけられている。一般に、除算の処理よりは、乗算の処理の方が処理速度が速いため、定数での除算のようにあらかじめ乗算に置き換えることが可能である場合には、乗算を用いることにより速度向上を図ることができるからである。そこで、変換データベースとしては、2つの処理内容を「/」に対応づけておき、ブロックへの置換を行う際に、いずれかを使い分けるものとしている。
このように複数の処理内容を対応づけるキーワードとしては、例えば、仕様書データ(図2)の行L3に示した「==」なども挙げられる。「==」は、左辺と右辺とが等しいという条件を表すキーワードであるが、例えば、左辺が浮動小数点型の変数、右辺が浮動小数点の定数のように浮動小数点型の比較では、丸め誤差などの影響により両者が厳密に一致しないことがある。こうした事情を考慮して、「==」には左辺と右辺とが一致するかを判定する処理の他、所定範囲の誤差範囲内であれば一致しているとみなす処理を対応づけてもよい。
In addition, the conversion database may have a one-to-many correspondence between keywords and processing contents. For example, the four arithmetic operators include "/", which indicates division, and two processing operations are associated with this: (1) division as one of the four arithmetic operations, and (2) multiplication by reciprocal. In general, multiplication is faster than division, so in cases where it is possible to replace it with multiplication in advance, such as division by a constant, the speed can be improved by using multiplication. Therefore, the conversion database associates the two processing operations with "/", and one of them is used when replacing it with a block.
An example of a keyword that associates multiple processing contents in this way is "==" shown on line L3 of the specification data (Figure 2). "==" is a keyword that indicates the condition that the left and right sides are equal, but in a comparison of floating-point types, for example, when the left side is a floating-point variable and the right side is a floating-point constant, the two may not exactly match due to the effects of rounding errors. Taking this into consideration, "==" may be associated with a process that determines whether the left and right sides match, as well as a process that considers them to match if they are within a specified error range.
図6の例では、キーワードは2つの階層で構成されている例を示したが、3階層以上を設けるものとしてもよい。また、キーワードに応じて異なる階層数で変換データベースを用意するようにしてもよい。 In the example of FIG. 6, the keywords are configured in two hierarchical levels, but three or more hierarchical levels may be provided. Also, conversion databases may be prepared with different numbers of hierarchical levels depending on the keywords.
図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. Once the classification of the processing method is completed (step S17 in FIG. 5), the
こうしてステップS17、S18の処理により、必要なブロックが用意されると、モデル作成システム100は、これらのブロック間の結線処理を行い、ブロック配置の修正をする(ステップS19)。結線処理は、仕様書データに従って、対応するブロック間を接続する処理である。また、ブロック配置の修正は、開発者が見やすいよう、ブロックの間隔を整えたり、整列したりする処理である。
Once the necessary blocks have been prepared through the processes of steps S17 and S18, the
モデル作成システム100は、以上のステップS16~ステップS19の処理を、章に含まれる全ての文について終了するまで繰り返し実行する(ステップS20)。また、仕様書データに含まれる全ての章について終了するまで、ステップS15~ステップS20の処理を繰り返し実行する(ステップS21)。
The
最後に、モデル作成システム100は、章(サブシステム)間の結線処理を行い、章(サブシステム)間の配置の修正を行う(ステップS22)。こうして作成されたモデルは、図1に示したモデル記憶部112に保存される。
Finally, the
ここで、サブシステム間の結線処理(ステップS22)について説明する。
図7は、サブシステム間の結線例を示す説明図である。図の左側には、仕様書データにおける章1-1~章1-3を示し、右側には、それに対応して作成されたモデル、即ちサブシステムss1~ss3を示した。それぞれのサブシステムss1~ss3の内容は、図3に示したように複数のブロックによって表されているが、図7においては、単純化して示してある。
Here, the process of connecting the subsystems (step S22) will be described.
Fig. 7 is an explanatory diagram showing an example of wiring between subsystems. The left side of the figure shows chapters 1-1 to 1-3 in the specification data, and the right side shows the models created corresponding to them, that is, subsystems ss1 to ss3. The contents of each of the subsystems ss1 to ss3 are represented by multiple blocks as shown in Fig. 3, but in Fig. 7 they are shown in a simplified form.
図7の例では、サブシステムss1に対する入力は「クラッチSW信号状態」および「クラッチ実施フラグ」の2つであり、出力は「クラッチONフラグ」となっている。そして、「クラッチONフラグ」は、「ニュートラル状態フラグ」とともにサブシステムss2に対する入力となっており、サブシステムss2の出力は「クラッチ解除フラグ」となっている。そこで、モデル作成システム100は、サブシステム間の結線処理として、サブシステムss1の出力である「クラッチONフラグ」と、サブシステムss2の入力である「クラッチONフラグ」とを結線するのである。
同様に、サブシステムss2の出力である「クラッチ解除フラグ」と、サブシステムss3の入力である「クラッチ解除フラグ」も結線する。
In the example of Fig. 7, the inputs to subsystem ss1 are "clutch SW signal state" and "clutch execution flag", and the output is "clutch ON flag". The "clutch ON flag" is an input to subsystem ss2 along with the "neutral state flag", and the output of subsystem ss2 is an "clutch release flag". Therefore, the
Similarly, the "clutch release flag" which is the output of the subsystem ss2 is connected to the "clutch release flag" which is the input of the subsystem ss3.
サブシステム間の結線処理では、このようにサブシステム間で対応する入出力を見いだして結線することになる。ただし、モデル作成システム100は、それぞれのサブシステムの実行順序を考慮して、結線の態様を以下の通り切り替える。
In the process of connecting subsystems, corresponding inputs and outputs between the subsystems are found and connected in this way. However, the
本実施例では、実行される順に仕様書データに記載するものとしている。つまり、図7の例では、章1-1、章1-2、章1-3の順に実行されるのである。実行順序は、種々の表し方が可能であり、例えば、「■01」のように、章を表す記述子「■」と併せて実行順序を規律する数字を記載しておき、この数字部分が小さい順に実行するようにしてもよい。かかる態様によれば、仕様書データを章単位で移動させるまでなく、その実行順序を自在に変更することができる利点がある。 In this embodiment, the specification data is written in the order in which the chapters will be executed. That is, in the example of Figure 7, the chapters are executed in the order Chapter 1-1, Chapter 1-2, and Chapter 1-3. The execution order can be expressed in various ways, for example, a number that governs the execution order can be written together with the descriptor "■" representing the chapter, such as "■01", and the execution can be performed in ascending order of the number. This aspect has the advantage that the execution order can be freely changed without having to move the specification data by chapter.
モデル作成システム100は、上述の実行順序を踏まえ、先に実行された章の出力が、その後に実行される章の入力となる場合には、そのまま結線を行うようにしている。図7の例では、章1-1の出力が、章1-2の入力となっているため、これらは直接結線をしている。また、章1-2の出力が、章1-3の入力となっているため、これらも直接結線をしている。仮に、章1-1の出力が、章1-3の入力となる場合も、章1-3は章1-1よりも後に実行される章であるから、直接結線すればよい。
The
一方、図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 becomes the input to chapter 1-1, the
D.モデル結合処理:
次に、モデル結合処理について説明する。モデル結合処理とは、モデル作成処理(図4、図5)で作成された複数のモデル等を相互に結合することにより、より複雑なプログラムに対応したモデルを作成する処理である。結合される対象となるモデルは、他の開発者が作成したモデルや、一般的な処理内容として予め用意されているモデルなど、種々のモデルを含めることができる。結合対象となるモデルは、予め図1のモデル記憶部112に保存されているものとする。
D. Model Binding Process:
Next, the model merging process will be described. The model merging process is a process for creating a model corresponding to a more complicated program by mutually merging multiple models created in the model creation process (FIGS. 4 and 5). The models to be merged can include various models, such as models created by other developers and models prepared in advance as general processing contents. The models to be merged are assumed to be stored in advance in the
以下の説明では、「モデル」という用語が表す内容によって混乱を招くことを回避するため、結合される対象となるモデルを「モジュール」と称し、結合された結果のことを「結合モデル」と称するものとする。 In the following explanation, to avoid confusion over what the term "model" means, the models to be combined will be referred to as "modules," and the combined result will be referred to as the "combined model."
まずモデル結合処理の例を示した後、そのフローチャートについて説明する。
図8は、モデルの結合処理例を示す説明図である。モジュールを結合して、結合モデルを作成するための指示には、仕様書データではなく、モデル配置図データが用いられる。図8(a)は、モデル配置図データの例を示している。モデル配置図データに示された矩形は、それぞれ結合対象となるモデル、即ちモジュールm1~m18を表している。モジュールm1~m18は、その名称によって、モデル記憶部112に記憶されたモデルと対応づけられた「モデルリファレンスモジュール」と、かかる対応づけによらず、図3に示したブロックのように予め定められた機能を有するモジュールとが含まれている。
First, an example of the model binding process will be shown, and then a flowchart thereof will be described.
FIG. 8 is an explanatory diagram showing an example of model merging processing. Model layout plan data, not specification data, is used as an instruction for merging modules to create a merged model. FIG. 8(a) shows an example of model layout plan data. Rectangles shown in the model layout plan data respectively represent models to be merged, i.e., modules m1 to m18. Modules m1 to m18 include "model reference modules" that are associated with models stored in the
また、モジュールm1~m12は、矩形M1に含まれており、モジュールm13~m18は矩形M2に含まれている。このように複数のモジュールを包含するまとまりを、本実施例では、結合サブシステムM1、M2と称する。また、結合サブシステムM1、M2にそれぞれモジュールm1~m12およびもジュールm13~m18が含まれている関係を「親子関係」と称するものとする。 Modules m1 to m12 are included in rectangle M1, and modules m13 to m18 are included in rectangle M2. In this embodiment, a group that includes multiple modules is referred to as a combined subsystem M1, M2. The relationship in which combined subsystems M1, M2 each include modules m1 to m12 and modules m13 to m18 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 specifies the execution order according to the relative positions of modules m1 to m18. In this embodiment, they are executed from top to bottom and left to right. For example, for modules m1 to m8, modules m1 to m4 are executed sequentially from top to bottom in the left column, and then modules m5 to m8 are executed from top to bottom in the right column. After that, modules m9 and m10 to the right are executed, and then modules m11 and m12 to the right of that are executed. Modules m9 and m10 are shifted slightly to the left and right just to make it easier for the developer to understand visually; the execution order of the modules would not change if modules m9 and m10 were aligned with their left ends aligned.
図8(b)は、モデル結合処理の例を示している。モデル配置図データのモジュールm1~m18に対応する矩形が描かれている。それぞれ矩形の大きさが図8(a)から変化しているのは、モジュールm1~m18が対応するモデルの内容に応じたサイズに整えてあるからである。
また、モデル配置図データには存在していないモジュールm19,m20が追加されている。これは、モジュールm1~m18を起動させるためのトリガー信号を生成するモデルである。
さらに、モジュールm1~m18の入出力に基づいて、結合サブシステムM1、M2としての外部からの入力in、外部への出力outなども追加される。
Fig. 8(b) shows an example of model merging processing. Rectangles corresponding to modules m1 to m18 of the model layout data are drawn. The size of each rectangle has changed from that of Fig. 8(a) because modules m1 to m18 have been resized according to the content of the corresponding models.
Also, modules m19 and m20 that do not exist in the model layout data are added. This is a model that generates a trigger signal for starting modules m1 to m18.
Furthermore, based on the inputs and outputs of the modules m1 to m18, inputs in from the outside and outputs out to the outside as the combined subsystems M1 and M2 are also added.
図8(c)は、結線処理を施した結果を表している。各モジュールm1~m20について、対応する入出力を結線した状態である。先にサブシステム間の結線処理(図7)で説明したのと同様、各モジュール間で対応する入出力を見いだし、実行順序を考慮して結線を行う。即ち、先に実行されるモジュールの出力が、それよりも後に実行されるモジュールの入力となる場合には、両者を直接結線する。また、後に実行されるモジュールの出力が、先に実行されるモジュールの入力となる場合には、間に、前のステップにおける値を入力することを示すブロックを介在させて両者を結線する。 Figure 8 (c) shows the result of wiring. It shows the state where the corresponding inputs and outputs of each module m1 to m20 have been wired. As explained above in the wiring process between subsystems (Figure 7), corresponding inputs and outputs between each module are found and wiring is performed taking into account the execution order. That is, if the output of a module executed earlier will be the input of a module executed later, the two are directly wired. Also, if the output of a module executed later will be the input of a module executed earlier, the two are wired with a block indicating that the value from the previous step is to be input between them.
また、結線状態の表示には、2つの態様を用意した。一つ目の態様は、図8(c)に示されている通り、対応する入出力間に線を描いて表示する態様である。二つ目の態様は、図8(c)中にsg1,sg2のように、結線すべき入出力に付されたマークを同じ形状、色などで表示する態様である。2つの態様は、開発者の指示によって自在に切り換えることができる。このように2つの態様を用意することにより、結合モデルの表示の煩雑さを抑制し、視覚的に把握しやすくすることが可能となっている。 Two modes are also available for displaying the connection status. The first mode is a mode in which a line is drawn between corresponding inputs and outputs, as shown in Figure 8 (c). The second mode is a mode in which marks attached to inputs and outputs to be connected are displayed with the same shape, color, etc., as in sg1 and sg2 in Figure 8 (c). The two modes can be freely switched at the developer's discretion. By providing these two modes, it is possible to reduce the complexity of displaying the connection model and make it easier to understand visually.
以下、モデル結合処理および結線処理のフローチャートについて説明する。
図9、図10は、モデル結合処理のフローチャートである。主として図1のリスト作成部105、モデル結合部115、トリガー生成部116が実行する処理であり、ハードウェア的にはモデル作成システム100のCPUが実行する処理である。
The flowcharts of the model binding process and the wiring process will be described below.
9 and 10 are flowcharts of the model combining process, which is mainly executed by the
処理を開始すると、モデル作成システム100は、モデル配置図データおよびインタフェース一覧表を読み込み(ステップS30)、モジュールの親子関係を設定する(ステップS31)。図8の例で言えば、結合サブシステムM1とモジュールm1~m12の親子関係、および結合サブシステムM2とモジュールm13~m18の親子関係が設定される。インタフェース一覧表とは、結合モデル全体に対する入出力のリストであり、開発者が作成したものである。
When processing begins, the
次に、モデル作成システム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
次に、モデル作成システム100は、ステップS32で作成された入出力リストと、インタフェース一覧表との整合性をチェックする(ステップS33)。本実施例では、まず、両者の入力が一致しているか、をチェックするものとした。インタフェース一覧表の入力に対して、入出力リストの入力に不足がある場合は、異状と判断される。一方、インタフェースの一覧表の入力に対して、入出力リストの入力に余剰が生じる場合は、必ずしも異状とは限らない。この余剰の入力は、結合モデル内でのみ使用される変数である可能性もあるからである。そこで、モデル作成100は、結合モデル内のモジュールの出力を参照し、余剰の入力と同じ変数が存在する場合には、異常なしと判断する。こうすることで、入力についての異状の有無が判断される。
次に出力について、モデル作成システム100は、インタフェース一覧表と入出力リストの出力を対比する。インタフェース一覧表の出力に対して、入出力リストの出力が不足している場合、その出力はいずれのモジュールからも出力されていないことを意味するから、異状と判断される。一方、インタフェース一覧表の出力に対して、入出力リストの出力が余剰の場合は、正常か異状かを特定することはできない。この余剰の出力が、他のモジュールの入力としてのみ使用されている場合には、結合モデル内でのみ使用される変数ということになるから、正常であることになる。従って、実施例では、入出力の出力が不足しているときには異状であると判断するものとしている。
Next, the
Next, for output, the
モデル作成システム100は、上述のチェックによって異状が発見されたときは(ステップS34)、エラーを出力して(ステップS35)、モデル結合処理を終了する。こうすることにより、モデルの結合における異状があるときに、それを看過する可能性を抑制することができる。
なお、ステップS32~S35の処理は、必須のものではなく、これを省略しても差し支えない。
If an abnormality is found by the above check (step S34), the
It should be noted that the processes in steps S32 to S35 are not essential and may be omitted.
次に、モデル作成システム100は、親の結合サブシステムを作成する(ステップS36)。図8の例で言えば、結合サブシステムM1、M2を作成することになる。
ただし、この時点では、結合サブシステムM1、M2の内容は、まだ何も作成されていない状態であるから、結合モデルの出力図(図8(b))の上で言えば、結合サブシステムM1、M2を表す矩形が描かれるに留まることになる。
Next, the
However, at this point in time, no content has been created for the coupled subsystems M1 and M2, so that in terms of the output diagram of the coupled model (FIG. 8(b)), only rectangles representing the coupled subsystems M1 and M2 are drawn.
次に、モデル作成システム100は、各モジュールに対して、モデルを対応づける(ステップS37)。結合モデルの出力図(図8(b))において、モジュールを表す矩形の中に、対応するモデルのブロック(図3で示した例など)を描いてもよいし、単にコンピュータのメモリ上、これらとの対応づけを行うものとしてもよい。この対応づけを行うことにより、各モジュールに対応するモデルの大きさ、即ち図3に示したモデル等が占める領域の2次元的な面積を特定することができる。従って、ステップS37では、この面積に応じて、各モジュールのサイズを修正してもよい。モデルが示す面積の大きさは、ある程度、そのモデルの複雑さを反映していると考えられるから、このようにモジュールのサイズを修正することにより、各モジュールの複雑さを直感的に認識しやすくなる利点がある。
Next, the
モデル作成システム100は、次に、入出力リストに基づいて入出力ブロックを追加する(ステップS38)。結合モデル全体に対する入出力ブロックは、インタフェース一覧表を参照すれば特定することができる。結合モデル全体に対する入出力は、出力図(図8(b))における入力in、出力outのように、追加される。
The
また、モデル作成システム100は、各モジュールの入力のうち、トリガー信号を抽出する(ステップS39)。各モジュールは、4msごとに起動するもの、16msごとに起動するものなど、種々の起動タイミングが定められている。この起動タイミングは、仕様書データで規定してもよいし、モデル配置図データで規定してもよい。また、これらのデータとは別に、各モジュールの起動タイミングを定めるリストを用意してもよい。各モジュールには、ステップS38で、この起動タイミングに応じたトリガー信号の入力ブロックが追加されているから、モデル作成システム100は、これを抽出するのである。
The
そして、モデル作成システム100は、トリガー信号に基づき重複を回避して、トリガー信号生成ブロックを作成する(ステップS40)。例えば、ステップS39の処理において、4msというトリガー信号のみが抽出されていれば、4msのトリガー信号を生成するトリガー信号生成ブロックのみを作成すればよい。4msと、16msという2種類のトリガー信号が抽出されていれば、これらに対応した2種類のトリガー信号生成ブロックを作成することになる。
トリガー信号生成ブロックは、結合サブシステムM1、M2のそれぞれについて作成される。出力図(図8(b))においては、モジュールm19、m20がそれぞれトリガー信号生成ブロックを表している。トリガー信号生成ブロックは、結合サブシステムM1、M2に共通のブロックとして作成してもよい。
以上でモデル結合処理を終了し、モデル作成システム100は、次に、モジュール間を結線する結線処理に移行する。
Then, the
The trigger signal generating block is created for each of the combined subsystems M1 and M2. In the output diagram (FIG. 8B), modules m19 and m20 each represent a trigger signal generating block. The trigger signal generating block may be created as a block common to the combined subsystems M1 and M2.
This completes the model linking process, and the
図11は、結線処理のフローチャートである。主として図1の結線部117が実行する処理であり、ハードウェア的にはモデル作成システム100のCPUが実行する処理である。
処理を開始すると、モデル作成システム100は、結合モデルを読み込む(ステップS50)。そして、モジュールごとに入出力をリスト化する(ステップS51)。図中の例では、モジュールAについては入力a,bおよび出力dが抽出され、モジュールBについては入力b、cおよび出力eが抽出され、モジュールCについては入力b,d,eおよび出力fが抽出されてリストが作成される。
11 is a flowchart of the wiring process, which is mainly executed by the
When the process starts, the
モデル作成システム100は、このリストに基づき、入力ごとに同じ名称の出力を探して結線する(ステップS52)。ただし、各モジュールの実行順序を考慮して以下の態様で結線を行う。
実行順序が順方向、即ち、先に実行したモジュールの出力が、その後に実行するモジュールの入力となっている場合には、両者を直接結線する。一方、実行順序が逆方向、即ち、後に実行したモジュールの出力を、先に実行するモジュールの入力とする場合には、1/zブロックを介在させて結線する。1/zブロックとは、前のステップの値を入力することを意味するブロックである。こうすることにより、各モジュールに対して適切な入力を実現することができる。
モデル作成システム100は、全ての結線を終了するまで、ステップS52の処理を繰り返し実行して(ステップS53)、結線処理を終了する。
Based on this list, the
When the execution order is forward, that is, the output of the module executed first is the input of the module executed next, the two are directly connected. On the other hand, when the execution order is reversed, that is, the output of the module executed last is the input of the module executed first, the connections are made via a 1/z block. A 1/z block is a block that means that the value of the previous step is input. In this way, appropriate inputs can be provided to each module.
The
なお、図8(c)で説明した通り、本実施例では、結線状態の表示として、入出力間に線を描いて表示する態様、結線すべき入出力に付されたマークを同じ形状、色などで表示する態様の2つを用意した。両者は、開発者の指示によって自在に切り換えることができる。例えば、個別の入力または出力を指定して、表示態様を切り換えるようにしてもよいし、全体の表示態様を一括して、一方の表示から他方の表示に切り換えるようにしてもよい。また、全体の表示を一括して、いずれかの表示態様に統一するようにしてもよい。さらに、結合サブシステムM1など、一定の範囲を指定して、指定した範囲に関する入出力の表示態様を切り換えまたは統一するようにしてもよい。 As explained in FIG. 8(c), in this embodiment, two modes are provided for displaying the connection state: one in which a line is drawn between the inputs and outputs, and one in which marks attached to the inputs and outputs to be connected are displayed in the same shape and color. The two modes can be freely switched at the developer's command. For example, the display mode may be switched by specifying an individual input or output, or the entire display mode may be switched from one display to the other as a whole. The entire display may also be unified into one of the display modes as a whole. Furthermore, a certain range, such as the connection subsystem M1, may be specified, and the display mode of the inputs and outputs related to the specified range may be switched or unified.
なお、結線処理は、結合モデルにおける結線のみならず、モデル間の章(サブシステム)間の結線に用いることもできる。本実施例では、仕様書データに基づいて各章(サブシステム)ごとにモデルを作成し、相互に入出力を結線する処理(図7参照)を行う例を示した。しかし、モデル作成システム100で取り扱うモデルは、かかる態様に限られるものではない。例えば、章(サブシステム)に相当するモデルとして、既存のモデルまたは他のシステムで作成されたモデルを読み込んで処理を行うこともある。結線処理は、このような場合にも適用することができる。具体的には、ステップS50における読み込み対象を、サブシステムに変更すればよい。
The wiring process can be used not only for wiring in a combined model, but also for wiring between chapters (subsystems) between models. In this embodiment, an example is shown in which a model is created for each chapter (subsystem) based on specification data, and the process of wiring the inputs and outputs between them (see Figure 7). However, the models handled by the
E.効果および変形例:
以上で説明したモデル作成システム100によれば、仕様書データに基づいてモデルを作成することができる。また、モデル配置図データを用いてモデル同士を結合、結線することができる。仕様書データは、図2に例示した通り、テキストで表示するため、開発者の意図を理解しやすい利点がある。一方、モデル配置図データには、モデルベース開発における利点、即ち、各モデルの入出力、実行順序などを視覚的に理解しやすい利点がある。
このように本実施例のモデル作成システム100によれば、仕様書データに基づいてモデルを作成するという機能を備えることにより、開発者の意図をくみ取りにくいというモデルベース開発の欠点を補いつつ、その利点も活かしたプログラム開発を実現することができる。
E. Effects and Variations:
According to the
Thus, according to the
本実施例で説明した種々の特徴は、必ずしも全てを備えている必要はなく、適宜、その一部を省略したり組み合わせたりして構成してもよい。また、本実施例のモデル作成システム100は、一例に過ぎず、種々の変形例を構成することも可能である。
The various features described in this embodiment do not necessarily need to be provided in their entirety, and some of them may be omitted or combined as appropriate. Also, the
本発明は、予め定められた処理内容を示すブロックの組み合わせにより制御プログラムの内容を表したモデルの作成に利用することができる。 The present invention can be used to create models that represent the contents of a control program by combining blocks that indicate predetermined processing contents.
10 入力データ
11 仕様書データ
12 モデル配置図データ
100 モデル作成システム
101 仕様書入力部
102 モデル配置図入力部
103 標準化処理部
104 キーワードデータベース
105 リスト作成部
106 モデル作成部
107 変換データベース
110 記憶部
111 入力データ記憶部
112 モデル記憶部
115 モデル結合部
116 トリガー生成部
117 結線部
118 表示制御部
10
Claims (9)
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力部と、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースと、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成部、即ち
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するモデル作成部と、
複数の前記モデルの実行順序を規定する結合指示データを読み込む結合指示データ入力部と、
前記結合指示データで指定された前記モデルを、それぞれ当該結合指示データに従って相互に関係づけることによって、当該結合指示データに対応する制御処理を表す結合モデルを作成するモデル結合部と、
を有し、
前記結合指示データ入力部は、さらに、前記結合モデルに対する外部からの入力、および該結合モデルから外部への出力を規定するインタフェース一覧表を読み込み、
前記モデル作成システムは、さらに、
前記結合指示データで指定された各モデルの入出力に基づいて、前記結合モデルとしての入出力を表す入出力リストを作成するとともに、これと前記インタフェース一覧表との対比により、前記結合指示データの異状を判断するリスト作成部とを備えるモデル作成システム。 A model creation system that creates a model that represents the contents of a control program by combining blocks that indicate predetermined processing contents,
a specification input unit for reading specification data in which the contents of the control program are described in text;
a conversion database storing a correspondence between a plurality of keywords used in the specification data and the blocks;
a model creation unit that creates the model by referring to the conversion database based on the specification data, i.e., that extracts a plurality of the keywords from the beginning of a sentence in the specification data and replaces them with a plurality of the blocks;
a model creation unit that creates the model by connecting corresponding inputs and outputs between the blocks;
a combination instruction data input unit for reading combination instruction data that specifies an execution order of the plurality of models;
a model combining unit that creates a combined model representing a control process corresponding to the combine instruction data by relating the models specified by the combine instruction data to each other in accordance with the combine instruction data;
having
The said connection instruction data input unit further reads an interface list which specifies input from the outside to the said connection model and output from the said connection model to the outside;
The model creation system further comprises:
a list creation unit that creates an input/output list representing the inputs and outputs of the combined model based on the inputs and outputs of each model specified in the combine instruction data, and that determines whether there is an abnormality in the combine instruction data by comparing the input/output list with the interface table.
前記キーワードは、前記処理内容に基づいて階層的に構成されているモデル作成システム。 2. The model creation system of claim 1,
A model creation system in which the keywords are hierarchically structured based on the processing content.
前記処理内容に対する標準のキーワードと、他の表記によるキーワードとを対応づけたキーワードデータベースを有し、
前記モデルの作成に先立って、または前記モデルの作成と並行して、前記仕様書データのキーワードを、前記キーワードデータベースを参照して、標準のキーワードに整える標準化処理部を備えるモデル作成システム。 3. The model creation system according to claim 1,
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, prior to or in parallel with the creation of the model, converts keywords in the specification data into standard keywords by referring to the keyword database;
前記仕様書データには、前記モデルを作成する単位を規定するための所定の記述子が含まれており、
前記モデル作成部は、前記記述子で規定された単位ごとに前記モデルを、単位モデルとして作成するモデル作成システム。 The model creation system according to any one of claims 1 to 3,
the specification data includes a predetermined descriptor for defining a 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 defined by the descriptor.
前記モデル作成部は、さらに、
前記仕様書データの記述に基づいて複数の前記単位モデルの優先順位を設定し、
前記単位モデル間で対応する入出力を結線して、前記仕様書データの全体に対応するモデルを作成するモデル作成システム。 5. The model creation system according to claim 4,
The model creation unit further
setting a priority order for the plurality of unit models based on the description of the specification data;
A model creation system that connects corresponding inputs and outputs between the unit models to create a model that corresponds to the entire specification data.
前記結合指示データで指定された各モデルを起動させるためのトリガー信号作成ブロックを作成するトリガー生成部を備え、
前記トリガー生成部は、
前記結合指示データで指定された各モデルの入力から、該各モデルを起動させるトリガー信号を抽出し、
当該抽出結果に基づいて、重複しないようにトリガー信号作成ブロックを前記結合モデルに追加し、
該トリガー信号作成ブロックを、それぞれ対応する前記モデルに結線するモデル作成システム。 2. The model creation system of claim 1,
a trigger generating unit that generates a trigger signal generating block for activating each model designated by the combination instruction data;
The trigger generation unit is
extracting a trigger signal for activating each model from an input of each model designated by the combination instruction data;
Based on the extraction result, adding a trigger signal generating block to the combined model without overlapping;
A model creation system that connects the trigger signal creation blocks to the corresponding models.
前記結合指示データで指定された各モデル間で対応する入出力を結線する結線部を備え、
該結線部は、
前記結合指示データに基づいて前記各モデルの実行順序を特定し、
前記モデルの出力が、当該モデルの後に実行される他のモデルの入力となる場合は、両者を直接結線し、
前記モデルの出力が、当該モデルの前に実行される他のモデルの入力となる場合は、前の処理における内容を入力することを表すブロックを介在させて両者を結線するモデル作成システム。 2. The model creation system of claim 1,
a connection unit for connecting corresponding inputs and outputs between each model designated by the connection instruction data,
The connection portion is
determining an execution order of each of the models based on the combination instruction data;
If the output of the model is to be the input of another model executed after the model, the two are directly connected.
A model creation system in which, when the output of the model is to be input to another model executed before the model in question, the two are connected via a block representing the input of the contents of the previous process.
前記コンピュータが実行するステップとして、
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力ステップと、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースを参照する参照ステップと、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成ステップ、即ち
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するモデル作成ステップと、
複数の前記モデルの実行順序を規定する結合指示データを読み込む結合指示データ入力ステップと、
前記結合指示データで指定された前記モデルを、それぞれ当該結合指示データに従って相互に関係づけることによって、当該結合指示データに対応する制御処理を表す結合モデルを作成するモデル結合ステップと、
を有し、さらに、
前記結合指示データ入力ステップは、前記結合モデルに対する外部からの入力、および該結合モデルから外部への出力を規定するインタフェース一覧表を読み込むステップであり、
前記モデル作成方法は、さらに、
前記結合指示データで指定された各モデルの入出力に基づいて、前記結合モデルとしての入出力を表す入出力リストを作成するとともに、これと前記インタフェース一覧表との対比により、前記結合指示データの異状を判断するリスト作成ステップとを備えるモデル作成方法。 A model creation method for creating, by a computer, a model that represents the contents of a control program by combining blocks that indicate predetermined processing contents, comprising the steps of:
The steps executed by the computer include:
a specification input step of reading specification data in which the contents of the control program are described in text;
a reference step of referring to a conversion database storing a correspondence between a plurality of keywords used in the specification data and the blocks;
a model creation step of creating the model by referring to the conversion database based on the specification data, i.e., extracting a plurality of the keywords from the beginning of the specification data and replacing them with a plurality of the blocks;
a model creation step of creating the model by connecting corresponding inputs and outputs between the blocks;
a combination instruction data input step of reading combination instruction data that specifies an execution order of the plurality of models;
a model combining step of creating a combined model representing a control process corresponding to the combine instruction data by relating the models specified by the combine instruction data to each other in accordance with the combine instruction data;
and
the step of inputting the binding instruction data is a step of reading an interface list that specifies an input from an external source to the binding model and an output from the binding model to an external source;
The model creation method further comprises:
A model creation method comprising a list creation step of creating an input/output list representing the input/output of the combined model based on the input/output of each model specified in the combine instruction data, and determining whether there is an abnormality in the combine instruction data by comparing this with the interface table.
前記制御プログラムの内容をテキストで記述した仕様書データを読み込む仕様書入力機能と、
前記仕様書データで用いられる複数のキーワードと前記ブロックとの対応関係を記憶した変換データベースを参照する参照機能と、
前記仕様書データに基づいて前記変換データベースを参照して前記モデルを作成するモデル作成機能、即ち
前記仕様書データの文頭から順次、複数の前記キーワードを抽出して、複数の前記ブロックに置換し、
前記ブロック間の対応する入出力を結線することで前記モデルを作成するモデル作成機能と、
複数の前記モデルの実行順序を規定する結合指示データを読み込む結合指示データ入力機能と、
前記結合指示データで指定された前記モデルを、それぞれ当該結合指示データに従って相互に関係づけることによって、当該結合指示データに対応する制御処理を表す結合モデルを作成するモデル結合機能と、
を実現し、さらに、
前記結合指示データ入力機能は、前記結合モデルに対する外部からの入力、および該結合モデルから外部への出力を規定するインタフェース一覧表を読み込む機能であり、
前記コンピュータプログラムは、さらに、
前記結合指示データで指定された各モデルの入出力に基づいて、前記結合モデルとしての入出力を表す入出力リストを作成するとともに、これと前記インタフェース一覧表との対比により、前記結合指示データの異状を判断するリスト作成機能とをコンピュータによって実現するコンピュータプログラム。
A computer program for creating a model that represents the contents of a control program by combining blocks that represent predetermined processing contents by a computer,
a specification input function for reading specification data in which the contents of the control program are described in text;
a reference function for referring to a conversion database storing a correspondence between a plurality of keywords used in the specification data and the blocks;
A model creation function for creating the model by referring to the conversion database based on the specification data, i.e., extracting a plurality of the keywords from the beginning of the specification data and replacing them with a plurality of the blocks;
a model creation function for creating the model by connecting corresponding inputs and outputs between the blocks;
a combination instruction data input function for reading combination instruction data that specifies an execution order of a plurality of said models;
a model combining function for creating a combined model representing a control process corresponding to the combine instruction data by relating the models specified by the combine instruction data to each other in accordance with the combine instruction data;
And further,
the binding instruction data input function is a function for reading an interface list that specifies input from an external source to the binding model and output from the binding model to an external source,
The computer program further comprises:
A computer program that realizes, by a computer, a list creation function of creating an input/output list representing the input/output as the combined model based on the input/output of each model specified in the combined instruction data, and determining whether there is an abnormality in the combined instruction data by comparing this with the interface list.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020153639A JP7572819B2 (en) | 2020-09-14 | 2020-09-14 | Model Creation System |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2020153639A JP7572819B2 (en) | 2020-09-14 | 2020-09-14 | Model Creation System |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2022047714A JP2022047714A (en) | 2022-03-25 |
| JP7572819B2 true JP7572819B2 (en) | 2024-10-24 |
Family
ID=80781226
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2020153639A Active JP7572819B2 (en) | 2020-09-14 | 2020-09-14 | Model Creation System |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP7572819B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117519693B (en) * | 2024-01-02 | 2024-04-02 | 深圳维盛半导体科技有限公司 | 3D conversion method, device, equipment and storage medium for bond wire quota statistics |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005338996A (en) | 2004-05-25 | 2005-12-08 | Denso Corp | Model automatic coupling program and model automatic coupling apparatus |
| JP2011002928A (en) | 2009-06-17 | 2011-01-06 | Hitachi Ltd | Control computing component and component type control system |
| JP2019016121A (en) | 2017-07-06 | 2019-01-31 | 日立オートモティブシステムズ株式会社 | Vehicle control device and vehicle control simulation device |
| US20190130048A1 (en) | 2017-10-27 | 2019-05-02 | Ab Initio Technology Llc | Transforming a specification into a persistent computer program |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH031230A (en) * | 1989-05-29 | 1991-01-07 | Toshiba Corp | Similar functional module detector |
-
2020
- 2020-09-14 JP JP2020153639A patent/JP7572819B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005338996A (en) | 2004-05-25 | 2005-12-08 | Denso Corp | Model automatic coupling program and model automatic coupling apparatus |
| JP2011002928A (en) | 2009-06-17 | 2011-01-06 | Hitachi Ltd | Control computing component and component type control system |
| JP2019016121A (en) | 2017-07-06 | 2019-01-31 | 日立オートモティブシステムズ株式会社 | Vehicle control device and vehicle control simulation device |
| US20190130048A1 (en) | 2017-10-27 | 2019-05-02 | Ab Initio Technology Llc | Transforming a specification into a persistent computer program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP2022047714A (en) | 2022-03-25 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Meinicke et al. | Mastering software variability with FeatureIDE | |
| JP2670345B2 (en) | Automatic program generator | |
| US7434180B2 (en) | Virtual data representation through selective bidirectional translation | |
| US8584062B2 (en) | Tool suite for RTL-level reconfiguration and repartitioning | |
| JPH10232891A (en) | Workgroup computing for electronic design automation | |
| CN105793818A (en) | source code translation | |
| US20080109780A1 (en) | Method of and apparatus for optimal placement and validation of i/o blocks within an asic | |
| Wille et al. | Custom-tailored variability mining for block-based languages | |
| US5987239A (en) | Computer system and method for building a hardware description language representation of control logic for a complex digital system | |
| CN118394176B (en) | Python-based clock network automatic generation method and device | |
| CN120892042A (en) | A definition-driven approach to reusing SysMLv2.0 model libraries | |
| JP7572819B2 (en) | Model Creation System | |
| CN113811849A (en) | System and method for computer-aided computer programming | |
| Djukić et al. | Handling complex representations in visual modeling tools for MDSD/DSM by means of code generator languages | |
| KR102696519B1 (en) | Automatic programming system and method using programming model | |
| CN121399552A (en) | Method and development environment for generating control programs for an automation system | |
| Schröpfer et al. | A Generic Projectional Editor for EMF Models. | |
| JP6993573B2 (en) | Program analysis method, program analysis device and program analysis program | |
| JPS62197826A (en) | Production of system flow specifications | |
| CN117610496B (en) | Automatic generation method of software description document | |
| JP2007011507A (en) | Program tree display method and program generation system | |
| JP2017016416A (en) | Control software development program | |
| JP7795033B1 (en) | Information processing device, information processing method, and program | |
| CN120743256B (en) | Algorithm Visualization Methods Based on Large Models | |
| JP5791797B2 (en) | LSI design apparatus, LSI design method, and program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230706 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240531 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20240531 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240709 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20240730 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20240828 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20240911 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20241011 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 7572819 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |