JP2016018269A - Information processing apparatus, information processing method, and program - Google Patents
Information processing apparatus, information processing method, and program Download PDFInfo
- Publication number
- JP2016018269A JP2016018269A JP2014138945A JP2014138945A JP2016018269A JP 2016018269 A JP2016018269 A JP 2016018269A JP 2014138945 A JP2014138945 A JP 2014138945A JP 2014138945 A JP2014138945 A JP 2014138945A JP 2016018269 A JP2016018269 A JP 2016018269A
- Authority
- JP
- Japan
- Prior art keywords
- program
- resource amount
- component module
- component
- consumed
- 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
Links
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、情報処理装置、情報処理方法及びプログラムに関する。 The present invention relates to an information processing apparatus, an information processing method, and a program.
PC上で開発したプログラムを組み込み機器に移植する場合、PCと組み込み機器とではCPUのクロック周波数や、メモリ量等が大きく異なるため、そのプログラムを組み込み機器で実行したときに必要とされるメモリ量や処理時間を予測することは困難であった。同様にPC上で開発したプログラムをハードウェア実装に移植する場合にも、その回路規模(メモリ量を含む)や処理時間を予測することは困難であった。
また、プログラムをPC上で動作させれば、プロファイリングすることにより、PC上で動作させたときのメモリ量や処理時間は測定できる。しかしながら、そのためには、プログラムを完成させ、コンパイル等して実行形式に変換して、実際に動作させる必要がある。従って、完成途中のプログラムでは、PC上で動作させる場合のメモリ量や処理時間であっても、測定することは困難であった。以降、メモリ量、処理時間、回路規模のように、あるプログラムを実行するのに必要な空間的、時間的資源をリソースと総称することにする。
このように、実際にターゲットとなる環境でプログラムを動かしてみるまで、必要となるリソース量の予測が困難であった。そのため、実際に移植作業を行った後に、予測していたリソース量と、実際に必要となったリソース量との乖離が判明することがある。その場合、リソース量に関して設定されていた仕様(許容リソース量と呼ぶ)内に、実際のリソース量を収めることができなくなるといった問題も発生する。
When a program developed on a PC is ported to an embedded device, the CPU clock frequency and the amount of memory differ greatly between the PC and the embedded device, so the amount of memory required when the program is executed on the embedded device. It was difficult to predict the processing time. Similarly, when a program developed on a PC is ported to a hardware implementation, it is difficult to predict the circuit scale (including the amount of memory) and processing time.
If the program is run on the PC, the amount of memory and the processing time when the program is run on the PC can be measured by profiling. However, for that purpose, it is necessary to complete the program, compile, etc., convert it into an execution form, and actually operate it. Therefore, it is difficult to measure a program in the middle of completion even if it is a memory amount or processing time when operating on a PC. Hereinafter, spatial and temporal resources necessary for executing a certain program, such as the amount of memory, processing time, and circuit scale, are collectively referred to as resources.
As described above, until the program is actually run in the target environment, it is difficult to predict the required amount of resources. For this reason, after actually performing the porting operation, a divergence between the predicted resource amount and the actually required resource amount may be found. In that case, there also arises a problem that the actual resource amount cannot be contained within the specification (referred to as the allowable resource amount) set for the resource amount.
この問題に対して、特許文献1、特許文献2には、プログラム部品情報データベースに記録された情報を用いてシミュレーションすることで、プログラムの実行に要する時間を予測する手法が開示されている。
また、特許文献3には、モデルベース開発において、モデルの構成要素毎にリソース消費見積量を管理しておくことで、モデルの構成要素から、そのモデルのマイコンリソース消費見積もり量を算出する手法が開示されている。
また、特許文献4に開示されている手法は、例えば、システム管理者によって入力された複数の処理手順及び複数のポリシーを用い、複数の処理手順に対応するワークフローを実行した際の状態遷移モデルを生成する。更に、この手法では、この状態遷移モデル及びシステム管理者によって入力された複数の制約を用い、複数のワークフローを実行した際に制約違反が発生するか否かを判定する。そして、制約違反が発生すると判定された場合、処理手順、ポリシー及び制約の何れか一つ又は複数に変更を加え、この変更を加えた後の処理手順、ポリシー及び制約を含むワークフロー定義を代替ワークフロー定義としてシステム管理者に提示することができる。これにより、複数のワークフロー間でのリソースの取り合い回避することができる。
In order to solve this problem,
In addition, the technique disclosed in
以上のように、実際にターゲットとなる環境でプログラムを動かしてみなくても、必要なリソース量を予測する手法が提案されているが、それぞれ以下のような問題点がある。
特許文献1、特許文献2、特許文献3に開示されている手法では、リソース消費見積もり量を算出することはできるが、見積もり量が許容リソース量を超えてしまった場合に、どこをどう修正するのかは、プログラム設計者の経験と勘とに依存していた。
特許文献4に開示されている手法では、ポリシーや制約を変更することで、複数のワークフロー間でのリソース調整は行われるが、そもそもリソース消費量の絶対量を減らすことを考慮していない。また、この手法は、単一のプログラムに関してリソース違反が発生した場合には適用することができない。
本発明は、プログラム開発において、消費リソース量が許容リソース量を満たすプログラムの設計を支援する技術を提供することを目的とする。
As described above, there have been proposed methods for predicting the necessary resource amount without actually running the program in the target environment, but each has the following problems.
The methods disclosed in
The technique disclosed in
An object of the present invention is to provide a technique for supporting design of a program in which a consumed resource amount satisfies an allowable resource amount in program development.
そこで、本発明の情報処理装置は、複数の部品モジュールから構成されるプログラムの設計において許容される許容リソース量を設定する設定手段と、前記プログラムの実行にあたり消費される消費リソース量を取得する取得手段と、前記取得手段により取得された消費リソース量が前記設定手段により設定された許容リソース量よりも大きい場合、前記プログラムを構成する複数の部品モジュールのうち代替可能な部品モジュールを前記プログラムの設計変更可能箇所として抽出する抽出手段と、前記抽出手段により抽出された部品モジュールに基づいて前記設計変更可能箇所の選択肢を提示する提示手段と、を有することを特徴とする。 Therefore, the information processing apparatus of the present invention obtains the setting means for setting the allowable resource amount allowed in the design of the program composed of a plurality of component modules, and the consumed resource amount consumed in executing the program And when the consumed resource amount acquired by the acquiring unit is larger than the allowable resource amount set by the setting unit, a substitute component module among the plurality of component modules constituting the program is designed for the program Extracting means for extracting as a changeable location, and presenting means for presenting options for the design changeable location based on the component module extracted by the extraction means.
本発明によれば、プログラム開発において、消費リソース量が許容リソース量を満たすプログラムの設計を支援する技術を提供することができる。 According to the present invention, it is possible to provide a technique for supporting design of a program whose consumed resource amount satisfies an allowable resource amount in program development.
以下、本発明を実施するための最良の形態について図面を用いて説明する。
<実施形態1>
実施形態1として、モデルベース開発手法を用いるプログラム開発を行う場合に本発明によるプログラム設計支援装置(情報処理装置)を用いる例を示す。モデルベース開発手法とは、一般的なソフトウェア開発であるソースコードによる開発とは異なり、予め用意されたプログラム部品モデル(部品モジュールと呼ぶ)を組み合わせて用いることで、所望の処理を実現するプログラムを作成しようとする開発手法である。
まず、本発明によるプログラム設計支援装置のハードウェア構成及び機能構成の説明を行い、続いてプログラム設計支援装置を使ったプログラム設計の手順について説明する。
The best mode for carrying out the present invention will be described below with reference to the drawings.
<
First, the hardware configuration and functional configuration of the program design support apparatus according to the present invention will be described, and then the program design procedure using the program design support apparatus will be described.
図1は、本発明によるプログラム設計支援装置のハードウェア構成の一例を示す図である。CPU11は、HD14やROM13から読み出したプログラムをRAM12に格納して実行することにより、後述するプログラム設計支援装置の機能構成及び後述するフローチャートの処理を実現する。RAM12は、プログラム設計支援装置のメインメモリである。ROM13は、プログラム設計支援装置の電源投入時に最初に読み込まれるプログラム等を格納する。HD14は、各種のプログラム及びCPU11が実行する処理に要する各種のデータを格納する。入力装置15は、プログラム設計支援装置を操作するキーボード、マウス、入力キー等で構成されている。表示装置16は、ディスプレイ等で構成されている。なお、表示装置16は、ディスプレイをタッチすることにより操作が可能なタッチパネルであってもよい。インターフェース装置17は、プログラム設計支援装置をネットワークに接続するインターフェースである。
FIG. 1 is a diagram showing an example of a hardware configuration of a program design support apparatus according to the present invention. The
図2は、本発明によるプログラム設計支援装置の機能構成の一例を示す図である。ここでは、図2に示す機能構成はCPU11がHD14等に格納されているプログラムを実行することにより実現されるものとしているが、ハードウェアによって実現されるようにしてもよい。
プログラム設計部108は、所望の処理をするプログラムの設計を、モデルベース開発を用いたビジュアルなプログラミング手法で行う。プログラム設計部108は、プログラム設計の際に、部品モジュール情報管理データベース(記憶領域)107にアクセスし、所望の部品モジュールを取り込み、それらの部品モジュールを組み合わせて動作順序を規定することで、プログラムの設計を進めていく。なお、本実施形態を含む以下の実施形態では、複数のデータを記憶するHD等の記憶領域のことを含めてデータベースという。
プログラム設計部108は、今設計しているプログラムを構成している部品モジュールの一覧情報と、その接続状態情報とを合わせた情報を、プログラム構成情報として出力する。また、プログラム設計部108は、設計変更可能箇所抽出部103から代替部品モジュール情報が入力された場合には、その代替部品モジュールを用いたプログラム構成情報を出力する。プログラム設計部108と設計変更可能箇所抽出部103との情報のやりとりに関しての詳細説明は、設計変更可能箇所抽出部103の説明の際に行う。
FIG. 2 is a diagram showing an example of a functional configuration of the program design support apparatus according to the present invention. Here, the functional configuration shown in FIG. 2 is realized by the
The
The
ここで代替部品モジュールとは、元の部品モジュールと同様の処理を行うが、その消費リソース量が異なるようなモジュールをいう。また、ここでいうリソースとは、メモリ量、処理時間、回路規模のように、ある所望の処理を実行するのに必要な空間的、時間的資源のことを指す。例えば、ある処理を実現する部品モジュールがあったときに、その部品モジュールを動作させたときに必要なメモリ量や処理時間が、消費リソース量となる。
ある処理を実現するのに所定のメモリ量と処理時間とがリソースとして必要な部品モジュールに対し、同様の処理を実現するが使用するメモリ量が多く処理時間が短いような部品モジュールがあった場合、それらはお互いに代替部品モジュールになる。従って上記の代替部品モジュールを用いたプログラム構成情報とは、プログラム構成情報のうち、代替可能な部品モジュールを代替部品モジュールに置き換えたものを指す。
Here, an alternative component module refers to a module that performs the same processing as the original component module, but has a different amount of resource consumption. Further, the resource here refers to a spatial and temporal resource necessary for executing a desired process such as a memory amount, a processing time, and a circuit scale. For example, when there is a component module that realizes a certain process, the amount of memory and the processing time required when the component module is operated become the consumed resource amount.
When there is a component module that achieves the same processing but uses a large amount of memory and has a short processing time for a component module that requires a certain amount of memory and processing time as resources to realize a certain process , They become a substitute part module for each other. Therefore, the program configuration information using the above-described alternative component module refers to information obtained by replacing an alternative component module with an alternative component module in the program configuration information.
図3には、プログラム設計部108において設計されたプログラムの一例として、画像処理プログラムを実現した例が示されている。図3に示すプログラムでは、入力画像を部品モジュールAに入力し、その処理結果を部品モジュールB並びに部品モジュールCに入力する。更に、部品モジュールCの処理結果は部品モジュールDに入力され、その処理結果は、部品モジュールBの処理結果と共に部品モジュールEに入力され、出力画像として出力される。
図3に示すようなプログラムは、プログラム設計部108が部品モジュール情報管理データベース107にアクセスして、それぞれの部品モジュールを取得し、それらの間を結線することで作成できる。
図4に、図3に示すプログラムのプログラム構成情報の一例を示す。図4は、例えば部品モジュールAの入力側はプログラム全体の入力と接続され、出力側は部品モジュールB並びに部品モジュールCと接続されていることを示している。プログラム設計部108は、このプログラム構成情報を、図3に示す構成から容易に抽出することができる。また、プログラムの入力や出力は本来部品モジュールではないが、後述する動作順序の探索等で統一的な扱いができるようにするため、図4では入力や出力も仮想的に部品モジュールとして扱うこととしている。
FIG. 3 shows an example in which an image processing program is realized as an example of a program designed by the
A program as shown in FIG. 3 can be created by the
FIG. 4 shows an example of the program configuration information of the program shown in FIG. FIG. 4 shows that, for example, the input side of the component module A is connected to the input of the entire program, and the output side is connected to the component module B and the component module C. The
図2に示す許容リソース量設定部101は、設計変更可能箇所抽出部103に対して、今設計しているプログラムに許容されるリソース量(許容リソース量)を設定する。許容リソース量設定部101は、今設計しているプログラムが最終的に実行される環境(ターゲット環境と呼ぶ)を想定して、ターゲット環境で許容されるような設定値を許容リソース量として設定する。例えば、プログラムが組み込み機器で実行されるのであれば、許容リソース量設定部101は、組み込み機器に課せられた外部仕様(メモリ量、処理時間等)から、許容されるリソース量を推定して設定する。また、プログラムがハードウェア化されて実行されるのであれば、許容リソース量設定部101は、ハードウェアチップに課せられた外部仕様(回路規模、処理時間等)から、ハードウェア化された場合に許容されるリソース量を推定して設定する。
The allowable resource
図2に示す消費リソース量算出部102は、プログラム設計部108で設計中のプログラムが、ターゲット環境で消費するリソース量(消費リソース量)を算出し、設計変更可能箇所抽出部103に出力する。なお、消費リソース量算出部102が実行する処理は、消費リソース量を算出して取得する取得処理の一例である。消費リソース量算出部102には、設計中のプログラムで想定されているターゲット環境情報が設定される。これにより、どのような種類のリソースに関して消費リソース量を見積もればよいのかが指定される。例えば、ターゲット環境がハードウェア化であれば、回路規模や処理時間のリソースを算出するように指示される。
更に消費リソース量算出部102には、複数のリソースの種類のうち、どのリソースに関して優先的にリソース量を算出するかという優先リソースが設定される。優先リソースは、消費リソース量算出部102がリソース量を算出する際に複数の算出方法があったときに、優先リソースが最も小さくなるような算出方法を選択して消費リソース量を算出するために設定される。例えば、優先リソースとして回路規模が設定されている場合に、回路規模が大きくて処理時間が短くなるようなリソース算出方法Aと、回路規模が小さくて処理時間が長くなるようなリソース算出手法Bとがあるとする。この場合、消費リソース量算出部102は、リソース算出方法Bを選択して消費リソース量を算出する。
2 calculates the resource amount (consumed resource amount) consumed by the program being designed by the
Furthermore, the resource
次に、図5を用いて、消費リソース量算出部102による、設計中のプログラムにおける消費リソース量の見積もり方法を詳細に説明する。図5は、本実施形態における消費リソース量算出部102の処理の一例を示すフローチャートである。
まずS301において、消費リソース量算出部102は、設計しているプログラムの消費リソース量を算出するために、プログラム設計部108からプログラム構成情報を取得する。プログラム設計部108から取得するプログラム構成情報としては、現在設計しているプログラムに対するプログラム構成情報の場合と、そのプログラム中の代替可能部品モジュールを代替部品モジュールで置き換えたプログラムのプログラム構成情報の場合とがある。
S302において、消費リソース量算出部102は、取得したプログラム構成情報と、設定されたターゲット環境情報とを用いて、消費リソース量管理データベース(記憶領域)106にアクセスし、部品モジュール毎の消費リソース量を読み出す。消費リソース量管理データベース106で管理している部品モジュール毎の消費リソース量としては、入力データ量、出力データ量、処理時間等が挙げられる。消費リソース量管理データベース106の詳細は後述する。
Next, a method for estimating the consumed resource amount in the program under design by the consumed resource
First, in step S301, the consumed resource
In S302, the consumed resource
S303において、消費リソース量算出部102は、部品モジュールの動作順序のパターン(動作順序パターン)を抽出する。ある部品モジュールは、その上流側の部品モジュールからデータが出力されたのを受けて動作するので、部品モジュールが直列に並んだだけのプログラムでは、部品モジュールの動作順序は一意に定まる。しかしながら、図3のように部品モジュールが並列に並んだ箇所を含むようなプログラムでは、動作順序として複数のパターンが存在する。消費リソース量算出部102は、その動作順序パターンを抽出する。
消費リソース量算出部102による動作順序パターンの抽出は、次のような規則に従って行われる。1.各部品モジュールは、動作に必要なデータが全て揃った場合に動作する。2.プログラムを構成する全ての部品モジュールを調査し、動作できるものがあれば動作させる。3.もし、動作できる部品モジュールが複数あれば、それぞれを動作させた場合について独立に動作順序を抽出する。以上の規則に従って動作順序の抽出が行われる。
上記では部品モジュールを動作させると説明したが、動作順序パターンの抽出では、実際に部品モジュールを動作させる必要はなく、動作させたという想定で、その部品モジュールの出力データが下流側の部品モジュールに届いた、ということを意味する。
In S303, the consumed resource
The extraction of the operation order pattern by the consumed resource
In the above description, the component module is operated. However, in the extraction of the operation sequence pattern, it is not necessary to actually operate the component module. Assuming that the component module is operated, the output data of the component module is transferred to the downstream component module. It means that it has arrived.
図6は、S303における処理の詳細の一例を示すフローチャートである。図6のフローチャートを用いて、消費リソース量算出部102が、図3のプログラムに対して動作順序パターンの抽出を行う場合について説明する。
本フローチャートにおいて、消費リソース量算出部102は、動作順序パターンの抽出を行うために、部品モジュールを動作させる度に動作可能な部品モジュールの抽出を行う。その際に、消費リソース量算出部102は、全ての部品モジュールのうちまだ動作していない部品モジュールを管理する未動作部品モジュールリストと、未動作部品モジュールリストに登録されている部品モジュールのうち、動作可能か否かのチェックがまだ行われていない部品モジュールを管理する未調査部品モジュールリストとを用いる。動作可能な部品モジュールの抽出では、未動作部品モジュールリストの部品モジュール一つ一つに対して動作可能か否かをチェックして行うため、そのチェックを行ったか否かを管理するために未調査部品モジュールリストが用いられる。
FIG. 6 is a flowchart illustrating an example of details of the processing in S303. A case where the consumed resource
In this flowchart, the consumed resource
まずS601において、消費リソース量算出部102は、プログラムを構成する全ての部品モジュールを未動作部品モジュールリストに登録する。図3の場合、消費リソース量算出部102は、部品モジュールA〜Eの5部品モジュールを未動作部品モジュールとして登録する。
S602において、消費リソース量算出部102は、プログラムに入力データを投入する。図3では、部品モジュールAに対して入力データを投入することになるが、ここでは部品モジュールAに対して実際に入力データを投入する必要はなく、部品モジュールAが動作できる状態になった、ということを意味するものである。
S603において、消費リソース量算出部102は、全ての未動作部品モジュールを未調査部品モジュールリストに登録する。今の場合、消費リソース量算出部102は、部品モジュールA〜Eまでの5部品モジュールを未調査部品モジュールとして登録する。
S604〜S608において、消費リソース量算出部102は、未調査部品モジュールリストに登録されている部品モジュールのうち、動作可能な部品モジュールを特定する。より具体的には、S604において、消費リソース量算出部102は、未調査部品モジュールリストからある未調査部品モジュールを選択し、選択した未調査部品モジュールを未調査部品モジュールリストから削除する。そして、S605において、消費リソース量算出部102は、選択した部品モジュールは動作可能か判定する。今の場合、入力データがそろっているのは部品モジュールAのみであるので、S607において、消費リソース量算出部102は、全ての未調査部品モジュールの調査が終了したか判定し、終了していればS609に進み、終了していなければS608に進む。S608において、消費リソース量算出部102は、未調査部品モジュールの一つを選択してS605に戻る。
First, in step S601, the consumed resource
In step S602, the consumed resource
In step S <b> 603, the consumed resource
In S604 to S608, the consumed resource
S609において、消費リソース量算出部102は、動作可能部品モジュールの一つを選択し、動作させる。そして、消費リソース量算出部102は、動作させた部品モジュールを未動作部品モジュールリストから削除する。ここで、部品モジュールを動作させるとしているが上述のように、実際に部品モジュールをプログラムとして動作させる必要はなく、動作させたという想定で、その部品モジュールの出力データが下流側の部品モジュールに届いた、ということを意味するものである。今の場合、動作可能部品モジュールは部品モジュールAだけなので、部品モジュールAを動作させたと想定して、その出力データが出力されたとする。
S610において、消費リソース量算出部102は、プログラム全体としての出力データが揃ったか(即ちプログラムが最後まで実行されたか)チェックする。今の場合、まだ揃ってないので、S603に戻り、消費リソース量算出部102は、次の動作可能部品モジュールの探索を繰り返す。先ほど部品モジュールAの処理が終了し、出力データが出力されたので、この時点での動作可能部品モジュールは、部品モジュールBと部品モジュールCとになる。
In step S609, the consumed resource
In step S610, the consumed resource
このように、複数の部品モジュールが動作可能部品モジュールとなる場合には、S608において、消費リソース量算出部102は、複数の部品モジュールそれぞれを別に動作させたものと想定して、それぞれを独立した複数の動作順序パターンとして抽出する。即ち、今の場合、消費リソース量算出部102は、動作順序として、部品モジュールAの次に部品モジュールBを動作させる動作順序パターンと、部品モジュールAの次に部品モジュールCを動作させる動作順序パターンとを抽出する。このように、複数の部品モジュールが動作可能部品モジュールとなる場合には、動作順序のパターンが増えていく。
このようにして消費リソース量算出部102は、部品モジュールの動作順序パターンを抽出する。図3の場合、動作順序として、「入力⇒A⇒B⇒C⇒D⇒E⇒出力」というパターンと、「入力⇒A⇒C⇒B⇒D⇒E⇒出力」というパターンと、「入力⇒A⇒C⇒D⇒B⇒E⇒出力」というパターンと、の3通りが抽出される。以上がS303で消費リソース量算出部102が行う処理である。
Thus, when a plurality of component modules become operable component modules, in S608, the consumed resource
In this way, the consumption resource
図5の説明に戻る。
S304において、消費リソース量算出部102は、消費リソース量管理データベース106から取得した部品モジュール毎の消費リソース量と、抽出した動作順序のパターンとを用いて、今設計しているプログラムの消費リソース量を算出する。S304で算出する消費リソース量としては、メモリ量や処理時間、回路規模等が考えられる。
S304で消費リソース量算出部102が処理時間に関する消費リソース量を算出する場合、S302で取得した部品モジュール毎の消費リソースに含まれる処理時間を、S303で抽出した動作順序に従って加算していくことにより算出できる。このとき、消費リソース量算出部102は、S303で抽出した全ての動作順序パターンに従って加算し、処理時間に関する消費リソース量を動作順序パターン数分算出する。ただし、本実施形態の場合には、動作順序パターンの抽出に並列動作が考慮されていないので、動作順序パターンによらず処理時間は同じになる。並列動作を考慮した場合の手順は実施形態2に示す。回路規模も処理時間と同様の手順にて消費リソース量が算出できる。
Returning to the description of FIG.
In step S304, the consumed resource
When the consumed resource
S304で消費リソース量算出部102がメモリ量に関する消費リソース量を算出する場合、S301で取得したプログラム構成情報と、S302で取得した部品モジュール毎の入力データ量、出力データ量と、S303で抽出した動作順序パターンとを用いて算出する。消費リソース量算出部102がメモリ量に関する消費リソース量を算出する場合には、まず、各部品モジュールの入力データ量、出力データ量から、それらを格納するための入力データ格納メモリ量、出力データ格納メモリ量を算出する。ただし、これらのメモリ量を処理時間の場合や回路規模の場合と同様に単純に加算すると、メモリの使いまわし(時分割で使いまわす)等のメモリの有効活用が考慮されない。
また、プログラム構成情報上でお互いに接続している部品モジュールであれば、上流側部品モジュールの出力データ格納メモリと、下流側部品モジュールの入力データ格納メモリとは共有されるので、それぞれを別に持つ必要はない。例えば図3では、部品モジュールAの出力データ格納メモリと、部品モジュールBの入力データ格納メモリとは共有されるので、何れか一方があればよい。
When the consumed resource
Also, if the component modules are connected to each other in the program configuration information, the output data storage memory of the upstream component module and the input data storage memory of the downstream component module are shared. There is no need. For example, in FIG. 3, since the output data storage memory of the component module A and the input data storage memory of the component module B are shared, only one of them is sufficient.
このようなメモリの共通化を考慮したメモリ量算出手順を図7に示す。図7は、メモリ量算出処理の一例を示すフローチャートである。図7の手順は、S303において抽出した全ての動作順序パターンそれぞれについて独立に行われ、図7において算出される最大メモリ量(ある瞬間に必要とされるメモリ量の最大のもの)が、その動作順序パターンで使用するメモリ量となる。従って、メモリ量は動作順序パターン数分算出されことになる。以降の図7の説明では、動作理解を助けるために、図3において、「入力⇒A⇒B⇒C⇒D⇒E⇒出力」で示される動作順序に関してメモリ量を算出している場合の手順を例題として説明する。
まず、S701において、消費リソース量算出部102は、メモリ確保リストと最大メモリ量とを初期化する。メモリ管理リストは、ある時点で必要となるメモリ量を調査するために用いられる。メモリ確保リストには、そのメモリを入力データ格納メモリとして使用する部品モジュール名(そのメモリから見るとこの部品モジュールは後段に位置することになるので、この部品モジュールを後段接続部品モジュールと呼ぶ)と、メモリ量とが記載される。そのメモリの後段接続部品モジュール名は、プログラム構成情報から抽出できる。メモリ量は、消費リソース量管理データベース106から得た情報により算出できる。また、そのメモリが、ある時点以降で使用されるか否かを管理するための動作済みチェック情報(詳細説明はS704、S705の手順の説明で行う)もメモリ確保リストで管理される。
FIG. 7 shows a memory amount calculation procedure in consideration of such memory sharing. FIG. 7 is a flowchart illustrating an example of the memory amount calculation process. The procedure of FIG. 7 is performed independently for each of the operation sequence patterns extracted in S303, and the maximum memory amount calculated in FIG. 7 (the maximum memory amount required at a certain moment) is the operation amount. This is the amount of memory used for the order pattern. Therefore, the memory amount is calculated for the number of operation order patterns. In the following description of FIG. 7, in order to help understand the operation, the procedure in the case where the memory amount is calculated with respect to the operation sequence indicated by “input → A → B → C → D → E → output” in FIG. 3. Will be described as an example.
First, in S701, the consumed resource
S702において、消費リソース量算出部102は、プログラムの入力データ分のメモリをメモリ確保リストに登録する。例題手順では、部品モジュールAの入力データ格納メモリをメモリ確保リストに登録する。このとき、メモリ量としては、入力データ格納メモリ量(A_inとする)を登録する。このメモリの後段接続部品モジュール名としては、部品モジュールAを登録する。このときのメモリ確保リストの内容を図8の(A)に示す。
S703において、消費リソース量算出部102は、次に動作させる部品モジュールの出力データ格納メモリをメモリ確保リストに登録する。どの部品モジュールが次に動作するのかは、動作順序を見ればわかる。例題手順では、まだ動作した部品モジュールがないので、最初に動作する部品モジュールである部品モジュールAの出力データ格納メモリをメモリ確保リストに登録する。このとき、メモリ量としては、出力データ格納メモリ量(A_outとする)を登録する。このメモリの後段接続部品モジュール名としては、プログラム構成情報を参照して、部品モジュールBと部品モジュールCとを登録する。このときのメモリ確保リストの内容を図8の(B)に示す。
S704において、消費リソース量算出部102は、現時点でメモリ確保リストに登録されているメモリ量を算出する。消費リソース量算出部102は、メモリ量を算出する際に、そのメモリの後段接続部品モジュールの全てが動作済みになっているメモリを除外して算出する。除外する理由は、後段接続部品モジュールの全てが動作済みになっているメモリに格納されているデータは、その時点で不要(今後使われることはない)になっているので、そのメモリ量を確保しておく必要がなくなっているからである。例題手順では、メモリ確保リストは図8の(B)のようになっているので、メモリ量は、A_in+A_outとなる。
In step S <b> 702, the consumed resource
In step S <b> 703, the consumption resource
In step S <b> 704, the consumed resource
S705において、消費リソース量算出部102は、動作順序を一つ進める。例題手順では、部品モジュールAの動作が済んだとする。このときに、今動作させた部品モジュールが、メモリ確保リストの後段接続部品モジュールとなっている場合、メモリ登録リストの対応する動作済みチェック欄を動作済みにする。今の場合、後段接続部品モジュールが部品モジュールAとなっていれば動作済みとする。このときの例題手順でのメモリ確保リストの内容を図8の(C)に示す。
S706、S707において、消費リソース量算出部102は、S705で算出したメモリ量が最大メモリ量より大きければ、最大メモリ量を更新する。
S708において、消費リソース量算出部102は、動作順序が最後まで進んだかをチェックし、最後まで進んでいなければS703に戻り、次に動作させる部品モジュールに関する手順を続ける。次に動作させるのは、部品モジュールBであるので、この時点での例題手順でのメモリ確保リストの内容は図8の(D)のようになり、S704で算出するメモリ量はA_out+B_outとなる。
以降、例題手順で動作順序を進めるたびに、S703でのメモリ確保リストの様子がどうなるかを図8の(E)〜(G)に示す。これらの場合のメモリ量は、それぞれ、A_out+B_out+C_out、B_out+C_out+D_out、B_out+D_out+E_outとなる。これらの算出されたメモリ量の中の最大のものが、例題手順でのメモリ量となる。ここで、部品モジュールB、C、D、Eの出力データ格納メモリ量をB_out、C_out、D_out、E_outとしている。このようにして、動作順序のパターン毎にメモリ量が算出される。
In step S <b> 705, the consumed resource
In S706 and S707, the consumed resource
In step S708, the consumed resource
Hereinafter, each time the operation order is advanced in the example procedure, the state of the memory allocation list in S703 is shown in (E) to (G) of FIG. The memory amounts in these cases are A_out + B_out + C_out, B_out + C_out + D_out, and B_out + D_out + E_out, respectively. The largest of these calculated memory amounts is the memory amount in the example procedure. Here, the output data storage memory amounts of the component modules B, C, D, and E are B_out, C_out, D_out, and E_out. In this way, the memory amount is calculated for each operation order pattern.
以上のようにして、S304における消費リソース量の算出(取得)が行われる。S304では、動作順序のパターン毎に、処理時間、メモリ量、回路規模等が算出されることになる。この算出結果を動作順序パターン別消費リソース量と呼ぶ。図3の場合に関して、このようにして得られた動作順序パターン別消費リソース量を模式的に示した図を図9に示す。図9に示したようなリストを、動作順序パターン別消費リソース量リストと呼ぶ。図9では、ターゲット環境として、組み込みソフトウェアが設定された場合が例示されている(組み込みソフトウェアがターゲットなので、回路規模に関する消費リソース量は算出されていない)。上記で示した3種類の動作順序パターンに関して、それぞれメモリ量(MEM_1、MEM_2、MEM_3とした)、処理時間(TIME_1、TIME_2、TIME_3とした)が算出されている様子を示している。ただし、本実施形態においては、上述のようにTIME_1、TIME_2、TIME_3は同じ値となる。
図5の説明に戻る。
S305において、消費リソース量算出部102は、優先リソースを最小にする動作順序パターンと、そのときの消費リソース量とを特定する。この特定された動作順序を優先動作順序パターンと呼ぶ。例えば、メモリ量が優先リソースに設定されていたなら、メモリ量が最小になるような動作順序パターンを優先動作順序パターンとする。消費リソース量算出部102は、動作順序パターン別消費リソース量と、優先動作順序パターンと、優先動作順序パターンのときの消費リソース量とを出力する。例えば、図9のMEM_3が一番小さい値であったとすると、消費リソース量算出部102は、優先動作順序パターンとして動作順序パターン3を、そのときの消費リソース量として、MEM_3とTIME_3とを出力する。
As described above, the calculation (acquisition) of the consumed resource amount in S304 is performed. In S304, the processing time, the amount of memory, the circuit scale, and the like are calculated for each operation order pattern. This calculation result is referred to as a consumption resource amount by operation sequence pattern. FIG. 9 is a diagram schematically showing the consumed resource amount for each operation order pattern obtained in the above manner in the case of FIG. The list as shown in FIG. 9 is referred to as an operation order pattern consumption resource amount list. FIG. 9 exemplifies a case where embedded software is set as the target environment (since the embedded software is the target, the amount of consumed resources regarding the circuit scale is not calculated). With respect to the three types of operation order patterns shown above, the memory amounts (MEM_1, MEM_2, and MEM_3) and the processing times (TIME_1, TIME_2, and TIME_3) are calculated. However, in the present embodiment, as described above, TIME_1, TIME_2, and TIME_3 have the same value.
Returning to the description of FIG.
In step S305, the consumed resource
図2に示す設計変更可能箇所抽出部103は、許容リソース量設定部101から送られる許容リソース量と、消費リソース量算出部102から送られる消費リソース量とを比較する。そして、設計変更可能箇所抽出部103は、その比較結果に応じて、プログラム設計部108で設計されているプログラムで設計変更可能な箇所を抽出する。本実施形態では、消費リソース量の何れかのリソースが、許容リソース量の対応するリソース量を超えた場合に、設計変更可能箇所抽出部103が設計変更可能箇所の抽出を行うとする。設計変更可能箇所の抽出を行う目的は、消費リソース量を許容リソース量以下に納めることができるような部品モジュールの変更又は動作順序の変更を探索することである。
設計変更可能箇所の抽出は以下のように行われる。まず、設計変更可能箇所抽出部103は、プログラム設計部108から送られるプログラム構成情報から、今設計しているプログラムを構成する部品モジュールの一覧を得る。次に、設計変更可能箇所抽出部103は、それぞれの部品モジュールに関して、その代替部品モジュールの有無を部品モジュール情報管理データベース107にアクセスすることで判別する。部品モジュール情報管理データベース107に関する詳細については後述する。もし、代替部品モジュールが存在する部品モジュールがあれば、設計変更可能箇所抽出部103は、その情報をプログラム設計部108に送る。プログラム設計部108は、設計変更可能箇所抽出部103から代替部品モジュール情報が入力された場合には、代替部品モジュールを用いたプログラム構成情報を出力する。
The design changeable
Extraction of design changeable parts is performed as follows. First, the design changeable
図2に示す変更選択肢提示部104は、消費リソース量算出部102から送られてくる動作順序パターン別消費リソース量を変更選択肢として提示する。図3の場合では、動作順序パターンが3通りあるので、現在、優先動作順序パターンとなっている動作パターン以外の動作パターンに関する動作順序パターン別消費リソース量を選択肢として示す。また、消費リソース量算出部102は、代替部品モジュールを用いた場合のプログラム構成情報に対しても動作順序パターン別消費リソース量リストを作成する。そのため、それらが作成された場合には、変更選択肢提示部104は、代替部品モジュールを用いた場合の動作順序パターン別消費リソース量を選択肢として示す。このように、変更選択肢提示部104は、元のプログラムの動作順序パターン別消費リソース量リストと、元のプログラムの代替可能部品モジュールを代替部品モジュールで置き換えたプログラムに対する動作順序パターン別消費リソース量リストとを、変更選択肢として示す。
図2に示す設計変更選択部105は、変更選択肢提示部104から提示される変更選択肢から、今のプログラムに対する変更指示として適当なものを選択する。この際の選択の基準は予め定められており、例えば、設計変更選択部105は、許容リソース量設定部101で設定された許容リソース量に違反しない範囲内で、優先リソースが最小になるような選択肢を選択する。設計変更選択部105は、選択した選択肢に対応する動作順序や代替部品モジュールの使用をプログラム設計部108に指示する。
The change
The design change selecting unit 105 shown in FIG. 2 selects an appropriate change instruction for the current program from the change options presented by the change
上述したように図2に示す消費リソース量管理データベース106には、部品モジュール毎の消費リソース量が管理されている。部品モジュール毎の消費リソース量は、何らかのプロファイル手法を用いて予め調査されているものとする。プロファイル手法は公知の手法でよい。
図10に、消費リソース量管理データベース106で管理されている部品モジュール毎の消費リソース量の例を示す。図10では、部品モジュールAと部品モジュールBとに対して管理されている消費リソース量を示している。消費リソース量は一般的にターゲット環境に応じて変化するので、ターゲット環境別に管理されている。また、消費リソース量がパラメータに応じて変化する場合には、パラメータ毎の消費リソース量、又はパラメータ化された消費リソース量として管理されている。例えば、部品モジュールAが画像データに対して輝度変換を行うようなモジュールの場合、入力データ量、出力データ量は入力画像サイズに応じて変化する。このような場合には、入力データ量、出力データ量は入力画像サイズにパラメータ化されて管理される。また、消費リソース量のうち回路規模は、ターゲット環境として、ハードウェア化だった場合にしか関係ないので、組み込みCPUがターゲットであった場合には、管理対象外となる。このようにターゲット環境によっては、管理されない消費リソース量も存在する。
As described above, the consumed resource
FIG. 10 shows an example of the consumed resource amount for each component module managed by the consumed resource
また、上述したように図2に示す部品モジュール情報管理データベース107には、プログラム設計部108で使用する部品モジュールが管理されている。プログラム設計部108は、部品モジュール情報管理データベース107で管理している部品モジュールを組み合わせて、所望のプログラムを作成する。
更に、部品モジュール情報管理データベース107には、互いに代替部品モジュールとなっている部品モジュールも管理されている。従ってある部品モジュールに対して、その代替となりうる部品モジュールの有無を知ることができる。また、代替部品モジュールがある場合には、その代替部品モジュールを参照することができる。部品モジュール同士が代替部品モジュールとなりうるかどうかは、予め何らかの基準で調べて登録しておく。例えば、同一の入力データに対して、全く同一の出力を出す部品モジュールであれば、全て互いに代替部品モジュールとしてもよい。また、同一の入力データに対して、全く同一の出力を出さなくても、所定の誤差以内であれば、全て互いに代替部品モジュールとしてもよい。
以上が本発明によるプログラム設計支援装置の機能による動作の説明になる。
Further, as described above, the component module
Furthermore, the component module
The above is the description of the operation by the function of the program design support apparatus according to the present invention.
続いて本発明によるプログラム設計支援装置を使ったプログラム設計のフローについて説明する。図11は、プログラム設計支援装置によるプログラム設計処理の一例を示すフローチャートである。
S1001において、消費リソース量算出部102は、今から設計しようとしているプログラムが使用されるターゲット環境情報の設定を受け付ける。また、消費リソース量算出部102は、このプログラムを設計していくうえで最も気を遣うべきリソースを優先リソースとする設定を受け付ける。例えば組み込み機器をターゲット環境としており、搭載メモリ量が極めて少量であることが予想されるような場合には、メモリ量を優先リソースとすればよい。
S1002において、許容リソース量設定部101は、ターゲット環境で許容されるリソース量を設定する。許容リソース量設定部101は、例えば処理時間、メモリ量、回路規模等に関して具体的な値を設定する。
S1003において、プログラム設計部108は、部品モジュール情報管理データベース107で管理している部品モジュールを組み合わせて、所望のプログラムを作成する。
S1004において、消費リソース量算出部102は、現在作成しているプログラムがターゲット環境で消費する消費リソース量を算出する。消費リソース量の算出手順は、消費リソース量算出部102の説明で詳述したのでここでは省略する。消費リソース量を算出するタイミングは特に問わない。例えば、プログラム設計に並行してリアルタイムで行われてもよいし、プログラムが完成した時点でもよいし、プログラムのあるまとまりが完成した時点でもよい。
Next, a program design flow using the program design support apparatus according to the present invention will be described. FIG. 11 is a flowchart illustrating an example of a program design process performed by the program design support apparatus.
In step S <b> 1001, the consumed resource
In S1002, the allowable resource
In step S <b> 1003, the
In step S1004, the consumed resource
S1005において、設計変更可能箇所抽出部103は、現在設計しているプログラムがリソース違反を起こすものであるか否かを判定する。この判定は、設計変更可能箇所抽出部103が、算出された消費リソース量と設定された許容リソース量とを比較することで行う。両リソース量の比較は、消費リソース量と許容リソース量との間で対応するリソース同士にて行われる。図11の例では、設計変更可能箇所抽出部103が、消費リソース量の何れかのリソース量が許容リソース量の対応するリソース量を超えるか否かを判定する。ただし、この比較方法に限らず、設計変更可能箇所抽出部103は、許容リソース量から消費リソース量を引いた量(リソースの余裕に相当する量)と、予め定められた閾値との比較を行うようにしてもよい。S1005において、設計変更可能箇所抽出部103は、判定の結果、リソース違反を起こすものではないと判定すればS1008に進み、プログラム完成かどうかをチェックする。一方、S1005において、設計変更可能箇所抽出部103は、リソース違反を起こすものであると判定すればS1006に進む。
S1006において、設計変更可能箇所抽出部103は、プログラムで変更可能な代替部品モジュールの探索を行う。更に、消費リソース量算出部102は、今のプログラムで他の動作順序を想定したときの動作順序パターン別消費リソース量リストや、代替部品モジュールを用いたプログラムでの動作順序パターン別消費リソース量リストを算出する。そして、変更選択肢提示部104は、プログラム設計変更の選択肢として提示する。探索の結果、代替部品モジュールが複数見つかった場合には、消費リソース量算出部102は、それらを代替する/代替しないにおける全ての組み合わせにおいて、代替部品モジュールを用いたプログラムでの動作順序パターン別消費リソース量リストを算出する。
S1007において、設計変更選択部105は、提示された選択肢のうちから最適なものを選択し、その選択に基づいてプログラムの変更を行う。即ち、設計変更選択部105は、その選択の結果を反映させてプログラムを変更する。選択の基準については上述したため、ここでの説明は省略する。消費リソース量算出部102は、変更されたプログラムについて、再度、消費リソース量を算出する。そして、設計変更選択部105は、再度S1005に戻り、リソース違反のチェックを行う。
In step S1005, the design changeable
In step S1006, the design changeable
In S1007, the design change selection unit 105 selects an optimum one from the presented options, and changes the program based on the selection. That is, the design change selection unit 105 changes the program to reflect the selection result. Since the selection criteria have been described above, a description thereof is omitted here. The consumed resource
以上、上述したように、本発明によるプログラム設計支援装置を用いることで、プログラムを開発している時点で、そのプログラムが消費する消費リソース量を見積もることが可能となる。また、見積もった消費リソース量が、予め設定された許容リソース量を超えてしまった場合(又は、超えそうになった場合)に、その事態を回避するために、どのようにプログラム変更をすればよいかの選択肢を提示することができる。
また、プログラム設計者は、今設計しているプログラムがターゲット環境でどのくらいのリソースを消費することになるのかを知ることができるので、今設計しているプログラムの善し悪し(リソース量に関する善し悪し)を早期に判定することができる。これらのことから、プログラム開発時にそのアルゴリズム的な性能(例えば画像圧縮プログラムを作成しているのであれば圧縮率や復元画像の再現具合等)だけを追求してしまい、その結果生じる不便を解消することができる。より具体的には、プログラムが完成した後に、消費リソース量が許容リソース量を大幅に超過していることが判明し、大きな手戻りが発生する、というような事態を未然に防ぐことが可能となる。
なお、本実施形態では、部品モジュール毎の消費リソース量を管理している消費リソース量管理データベース106と、プログラム設計時に使用する部品モジュールや、代替部品モジュールの管理を行っている部品モジュール情報管理データベース107とを別のデータベースとして説明したが、この二つを単一の共通のデータベースとしてもよい。
As described above, by using the program design support apparatus according to the present invention, it is possible to estimate the amount of resource consumed by a program when the program is developed. Also, if the estimated consumed resource amount exceeds (or is likely to exceed) the preset allowable resource amount, how can the program be changed to avoid this situation? You can present a good choice.
In addition, since the program designer can know how much resources the designed program will consume in the target environment, the quality of the designed program (good or bad regarding the amount of resources) can be quickly determined. Can be determined. For these reasons, only the algorithmic performance (for example, if the image compression program is created, the compression ratio and the reproduction state of the restored image, etc.) are pursued at the time of program development, and the resulting inconvenience is eliminated. be able to. More specifically, it is possible to prevent a situation in which, after the program is completed, the amount of resource consumption greatly exceeds the allowable resource amount and a large rework occurs. Become.
In this embodiment, the consumption resource
<実施形態2>
実施形態1では、消費リソース量算出部102での動作順序パターンの抽出において、複数の部品モジュールが同時に動作するような動作順序(並列処理動作)を考慮しない場合の例を示した。本実施形態では、並列動作順序を考慮する場合の例を示す。本実施形態と実施形態1とで異なるのは、消費リソース量算出部102において、動作順序パターン別消費リソース量リストを算出する手順だけである。従ってその部分を中心に説明を行い、それ以外の説明は省略する。
本実施形態での消費リソース量算出部102における動作順序パターンの抽出では、実施形態1で示した直列処理動作の動作順序パターンの抽出に加えて、並列動作順序の動作順序パターンも抽出する。また、それに伴って、消費リソース量算出部102は、並列動作順序の場合の消費リソース見積もりも行う。消費リソース量算出部102が並列動作順序の抽出を行うのは、ターゲット環境として、ハードウェア化を想定している場合や、マルチコアのプロセッサを想定している場合等である。
<
In the first embodiment, an example in which an operation order (parallel processing operation) in which a plurality of component modules operate simultaneously is not considered in the extraction of the operation order pattern in the consumed resource
In the extraction of the operation order pattern in the consumed resource
図12は、本実施形態における消費リソース量算出部102の処理の一例を示すフローチャートである。本実施形態での消費リソース量算出部102の動作フローは、実施形態1で示した図5のS303及びS304の処理が、S1101、S1102及びS1103の処理に置き換わったものである。それ以外の処理は同じなので、同じ符号を付与し、ここでの説明を省略する。
S1101において、消費リソース量算出部102は、並列動作可能(同時動作可能)な部品モジュールの抽出を行う。そのためにまず、消費リソース量算出部102は、プログラム構成情報を用いて、プログラムの入力から部品モジュールを下流側に辿っていき経路部品モジュールリストを作成する。消費リソース量算出部102は、途中で分岐があると(複数の接続先を持つ部品モジュールがあると)、分岐毎に、下流側部品モジュールのリストを作成する。例えば図3のようなプログラムの場合(図4のようなプログラム構成情報の場合)、消費リソース量算出部102は、プログラムの入力から下流側に部品モジュールを辿っていく。部品モジュールAの出力には2つの部品モジュールが接続されている(即ち分岐が発生している)ので、消費リソース量算出部102は、分岐それぞれ毎に経路部品モジュールリストを作成する。この場合、経路部品モジュールリストが2系統作成され、それぞれ「入力⇒A⇒B⇒E⇒出力」と、「入力⇒A⇒C⇒D⇒E⇒出力」とになる。
FIG. 12 is a flowchart illustrating an example of processing of the consumed resource
In step S <b> 1101, the consumed resource
次に、消費リソース量算出部102は、それぞれの経路部品モジュールリストを突き合わせて、2つ以上の経路部品モジュールリストに共通に属している部品モジュール系列(共通系列と呼ぶ)を抽出する。抽出された共通系列のうち、経路部品リスト上で第3の共通系列を跨がない2つの共通系列の間が並列処理可能な部品モジュールとなる。例えば図3の場合には、「入力⇒A」と「E⇒出力」との2つの共通系列が抽出される。従ってその間のBとC、Dとが並列処理可能な部品モジュール対となる。
S1101での動作の理解を助けるために、図13の(A)、(B)に示す別のプログラムの場合に並列動作可能な部品モジュールの抽出を行う例を示す。
まず、図13の(A)では、経路部品リストが4系統作成される。それぞれ、系統1:「入力⇒A⇒B⇒E⇒G⇒出力」と、系統2:「入力⇒A⇒B⇒E⇒F⇒出力」と、系統3:「入力⇒A⇒C⇒D⇒E⇒G⇒出力」と、系統4:「入力⇒A⇒C⇒D⇒E⇒F⇒出力」とになる。系統1と系統2との共通系列は「入力⇒A⇒B⇒E」と「出力」とになるので、その間のFとGとが並列動作可能な部品モジュール対となる。系統1と系統3との共通系列は「入力⇒A」と「E⇒G⇒出力」とになるので、その間のBとC、Dとが並列動作可能な部品モジュール対となる。系統1と系統4との場合は、「入力⇒A」と「E」と「出力」との3つの共通系列が得られる。このうち経路部品リスト上で第3の共通系列を跨がない2つの共通系列の間が並列処理可能な部品モジュール対となる。従って、共通系列である「入力⇒A」と「E」の間のBとC、Dとが並列動作可能な部品モジュール対となり、更に共通系列である「E」と「出力」の間のFとGとが並列動作可能な部品モジュール対となる。共通系列である「入力⇒A」と「出力」との間には第3の共通系列「E」があるので、消費リソース量算出部102は、「入力⇒A」と「出力」との間では並列動作可能な部品モジュールの抽出を行わない。続いて、消費リソース量算出部102は、系統2と系統3、系統2と系統4、系統3と系統4に関しても、同様の手順で並列動作可能な部品モジュールの抽出を行う。
Next, the consumed resource
In order to help understand the operation in S1101, an example of extracting component modules that can be operated in parallel in the case of another program shown in FIGS. 13A and 13B will be described.
First, in FIG. 13A, four systems of route parts lists are created. System 1: "Input ⇒ A ⇒ B ⇒ E ⇒ G ⇒ Output", System 2: "Input ⇒ A ⇒ B ⇒ E ⇒ F ⇒ Output", and System 3: "Input ⇒ A ⇒ C ⇒ D ⇒ “E⇒G⇒output” and system 4: “input⇒A⇒C⇒D⇒E⇒F⇒output”. Since the common series of the
続いて図13の(B)では、経路部品リストが3系統作成され、それぞれ、系統1:「入力⇒A⇒B⇒E⇒G⇒出力」と、系統2:「入力⇒A⇒C⇒D⇒E⇒G⇒出力」と、系統3:「入力⇒A⇒F⇒G⇒出力」とになる。
系統1と系統2との共通系列は「入力⇒A」と「E⇒G⇒出力」とになるので、その間のBとC、Dとが並列動作可能な部品モジュール対となる。系統1と系統3との共通系列は「入力⇒A」と「G⇒出力」とになるので、その間のB、EとFとが並列動作可能な部品モジュール対となる。系統2と系統3との共通系列は「入力⇒A」と「G⇒出力」とになるので、その間のC、D、EとFとが並列動作可能な部品モジュール対となる。
S1101では、以上のようにして並列動作可能なモジュールの抽出が行われる。
Subsequently, in (B) of FIG. 13, three path parts lists are created, and system 1: “input → A → B → E → G → output” and system 2: “input → A → C → D”, respectively. ⇒ E ⇒ G ⇒ Output ”and System 3:“ Input ⇒ A ⇒ F ⇒ G ⇒ Output ”.
Since the common series of the
In S1101, extraction of modules capable of parallel operation is performed as described above.
S1102において、消費リソース量算出部102は、並列動作順序を含む動作順序のパターンを全て抽出する。動作順序パターンの抽出の手順は以下のように行われる。
まず、S1101で抽出した並列処理可能部品モジュールを括りだして一つの部品モジュールとし、新たなプログラム構成情報を作成する。例えば図3に示すプログラムの場合、前述のようにS1101にてBとC、Dとが並列動作可能部品モジュール対として抽出される。このBとC、Dとを新たな部品モジュールB_CDとして括りだした図を図14に示す(図14の点線で示した部品モジュールが部品モジュールB_CDを示す)。更に、図15に図14のプログラムのプログラム構成情報を示す。
続いて、消費リソース量算出部102は、新たに作成したプログラム構成情報を用いて動作順序パターンの抽出を行う。この場合、並列動作可能部品モジュールは、新たに作成した部品モジュール内に存在し、明には出てこないので、実施形態1で説明したS303の場合と同じ手順で動作順序パターンの抽出が行える。図15の場合、動作順序パターンとして「入力⇒A⇒B_CD⇒E⇒出力」という動作順序パターンが抽出される。
In step S1102, the consumed resource
First, the parallel processable component modules extracted in S1101 are bundled into one component module, and new program configuration information is created. For example, in the case of the program shown in FIG. 3, as described above, B, C, and D are extracted as a pair of component modules that can be operated in parallel in S1101. A diagram in which B, C, and D are grouped as a new component module B_CD is shown in FIG. 14 (the component module indicated by the dotted line in FIG. 14 indicates the component module B_CD). Further, FIG. 15 shows program configuration information of the program of FIG.
Subsequently, the consumed resource
次に、消費リソース量算出部102は、並列動作可能部品モジュールの動作順序パターン、即ち新たに作成した部品モジュール内の動作順序パターンを抽出する。消費リソース量算出部102は、新たに作成した部品モジュール内の動作順序パターンの抽出を、並列動作順序を含む場合と、含まない場合とに分けて行う。
並列動作順序を含まない場合の動作順序パターンの抽出は、実施形態1で説明したS303の場合と同じなので、ここでの説明を省略する。図14に示す部品モジュールB_CDの場合、「B⇒C⇒D」と「C⇒B⇒D」と「C⇒D⇒B」との3通りが抽出される。
並列動作順序を含む場合の動作順序パターンの抽出は、並列動作可能な部品モジュール同士に対して、全ての並列動作の組み合わせを設定して行う。例えば部品モジュールB_CDの場合には、BとC、Dとが並列処理可能なので、全ての並列動作の組み合わせは、「BとCとが並列動作」の場合と、「BとDとが並列動作」の場合と、「BとC⇒Dとが並列動作」の場合との3通り考えられる。従って、動作順序パターンとしては、「[B/C]⇒D」と「C⇒[B/D]」と「[B/C⇒D]」とが考えられる。ここで[ ]の記号で囲まれている部分は/の記号の前後の部品モジュールが並列動作することを示している。
Next, the consumed resource
The extraction of the operation order pattern when the parallel operation order is not included is the same as that in S303 described in the first embodiment, and thus description thereof is omitted here. In the case of the component module B_CD shown in FIG. 14, three types of “B⇒C⇒D”, “C⇒B⇒D”, and “C⇒D⇒B” are extracted.
The extraction of the operation order pattern when the parallel operation order is included is performed by setting all the combinations of the parallel operations for the component modules that can be operated in parallel. For example, in the case of the component module B_CD, since B, C, and D can be processed in parallel, the combinations of all parallel operations are “B and C are in parallel operation” and “B and D are in parallel operation”. ”And“ B and C⇒D operate in parallel ”. Therefore, as the operation order pattern, “[B / C] → D”, “C → [B / D]”, and “[B / C → D]” can be considered. Here, the part surrounded by the symbol [] indicates that the component modules before and after the symbol / are operated in parallel.
次に、消費リソース量算出部102は、並列動作可能部品モジュールを明に含まない動作順序パターンと、並列動作可能部品モジュールの動作順序パターンとを組み合わせて、全体の動作順序パターンを作成する。図14のような場合には、並列動作可能部品モジュールを明に含まない動作順序パターンとして、「入力⇒A⇒B_CD⇒E⇒出力」が抽出される。更に並列動作可能部品モジュールの動作順序パターンとして、「B⇒C⇒D」、「C⇒B⇒D」、「C⇒D⇒B」、「[B/C]⇒D」、「C⇒[B/D]」、「[B/C⇒D]」の6通りが抽出される。従って、これらを組み合わせて、「入力⇒A⇒B⇒C⇒D⇒E⇒出力」、「入力⇒A⇒C⇒B⇒D⇒E⇒出力」、「入力⇒A⇒C⇒D⇒B⇒E⇒出力」、「入力⇒A⇒[B/C]⇒D⇒E⇒出力」、「入力⇒A⇒C⇒[B/D]⇒E⇒出力」、「入力⇒A⇒[B/C⇒D]⇒E⇒出力」の6通りが動作順序パターンとして抽出される。
Next, the consumed resource
S1101の説明のときと同様、S1102の動作の理解を助けるために、図13の(A)、(B)に示す別のプログラムの場合に動作順序パターンの抽出を行う例を示す。
図13の(A)のプログラムから、並列処理可能部品モジュールを括りだして一つの部品モジュールとしたプログラムを図16に示す。図13の(A)に示すプログラムの場合、BとC、D並びにFとGとが並列動作可能部品モジュール対として抽出されるので、それぞれを部品モジュールB_CD並びに部品モジュールF_Gとしている。
図16の場合には、並列動作可能部品モジュールを明に含まない動作順序パターンとして、「入力⇒A⇒B_CD⇒E⇒F_G⇒出力」が抽出される。更に部品モジュールB_CD内の並列動作可能部品モジュールの動作順序パターンとして、「B⇒C⇒D」、「C⇒B⇒D」、「C⇒D⇒B」、「[B/C]⇒D」、「C⇒[B/D]」、「[B/C⇒D]」の6通りが抽出され、部品モジュールF_G内の並列動作可能部品モジュールの動作順序パターンとして、「G⇒F」、「F⇒G」、「[G/F]」の3通りが抽出される。全体の動作順序パターンを抽出する場合には、これらの全組合せになるので、6×3=18通りの動作順序パターンが抽出される。
As in the description of S1101, in order to help understand the operation of S1102, an example of extracting an operation sequence pattern in the case of another program shown in FIGS. 13A and 13B is shown.
FIG. 16 shows a program in which parallel-processable component modules are grouped into one component module from the program shown in FIG. In the case of the program shown in FIG. 13A, B and C, D, and F and G are extracted as a component module pair that can be operated in parallel, so that they are designated as a component module B_CD and a component module F_G, respectively.
In the case of FIG. 16, “input → A → B_CD → E → F_G → output” is extracted as an operation order pattern that does not explicitly include a parallel-operation capable component module. Furthermore, the operation sequence patterns of component modules that can be operated in parallel in the component module B_CD are “B⇒C⇒D”, “C⇒B⇒D”, “C⇒D⇒B”, “[B / C] ⇒D”. , “C⇒ [B / D]”, “[B / C⇒D]” are extracted, and “G⇒F”, “ Three types of “F⇒G” and “[G / F]” are extracted. When the entire operation order pattern is extracted, all of these combinations are obtained, and therefore 6 × 3 = 18 operation order patterns are extracted.
更に同様に、図13の(B)のプログラムから、並列処理可能部品モジュールを括りだして一つの部品モジュールとしたプログラムを図17の(A)、(B)、(C)に示す。図13の(B)に示すプログラムの場合、BとC、D並びにB、EとF並びにC、D、EとFが並列動作可能部品モジュール対として抽出されるので、それぞれを部品モジュールB_CD並びに部品モジュールBE_F並びに部品モジュールCDE_Fとしている。図13の(B)の場合は、複数の並列動作可能部品モジュール対に属する部品モジュール(例えば部品モジュールB)が存在するため、一つの図に表現できないので、図17の(A)、(B)、(C)のように並列動作可能部品モジュール対毎に別々に表現している。
図17の(B)、(C)に関しては、これまで述べたように、並列動作可能部品モジュールを明に含まない動作順序パターンと、並列動作可能部品モジュールの動作順序パターンとを組み合わせて、全体の動作順序パターンを作成すればよい。例えば図17の(B)に関しては、並列動作可能部品モジュールを明に含まない動作順序パターンとして、「入力⇒A⇒C⇒D⇒BE_F⇒G⇒出力」が抽出される。更に並列動作可能部品モジュールの動作順序パターンとして、「B⇒E⇒F」、「B⇒F⇒E」、「F⇒B⇒E」、「[B/F]⇒E」、「B⇒[E/F]」、「[F/B⇒E]」の6通りが抽出される。消費リソース量算出部102は、全体の動作順序パターンを抽出するには、これらの全組合せを抽出すればよい。
Further, similarly, a program that bundles parallel processable component modules into one component module from the program of FIG. 13B is shown in FIGS. 17A, 17B, and 17C. In the case of the program shown in FIG. 13B, B and C, D and B, E and F, and C, D, E and F are extracted as a pair of component modules that can be operated in parallel. The component module BE_F and the component module CDE_F are used. In the case of FIG. 13B, since there are component modules (for example, component module B) belonging to a plurality of parallel operable component module pairs, it cannot be expressed in one diagram. ), And (C), each component module pair that can be operated in parallel is represented separately.
17 (B) and 17 (C), as described above, the operation sequence pattern that does not explicitly include the parallel-operational component module and the operation sequence pattern of the parallel-operational component module are combined, It is sufficient to create an operation order pattern. For example, with respect to FIG. 17B, “input → A → C → D → BE_F → G → output” is extracted as an operation order pattern that does not explicitly include a parallel-operational component module. Furthermore, as the operation order pattern of component modules capable of parallel operation, “B⇒E⇒F”, “B⇒F⇒E”, “F⇒B⇒E”, “[B / F] ⇒E”, “B⇒ [ E / F] ”and“ [F / B⇒E] ”are extracted. The consumed resource
図17の(A)に関しては、この状態で更に並列動作可能部品モジュールが抽出できるので、まずはそれを行う。図17の(A)に対して、並列動作可能部品モジュールの抽出を行うと、B_CD、EとFが並列動作可能部品モジュール対として抽出される。これらの並列処理可能部品モジュールを括りだして一つの部品モジュール(部品モジュールαとする)する。この状態で、消費リソース量算出部102は、並列動作可能部品モジュールを明に含まない動作順序パターンと、並列動作可能部品モジュールの動作順序パターンとを組み合わせて、全体の動作順序パターンを作成すればよい。この場合、並列動作可能部品モジュールを明に含まない動作順序パターンとして、「入力⇒A⇒α⇒G⇒出力」が抽出される。更に並列動作可能部品モジュールの動作順序パターンとして、「B_CD⇒E⇒F」、「B_CD⇒F⇒E」、「F⇒B_CD⇒E」、「[B_CD/F]⇒E」、「B_CD⇒[E/F]」、「[F/B_CD⇒E]」の6通りが抽出される。ただし、B_CDは内部に更に並列動作可能部品モジュールを含むので、更にその動作パターン「B⇒C⇒D」、「C⇒B⇒D」、「C⇒D⇒B」、「[B/C]⇒D」、「C⇒[B/D]」、「[B/C⇒D]」を組み合わせる必要がある。
S1102では、以上のようにして動作順序パターンの抽出が行われる。
Regarding (A) of FIG. 17, since it is possible to further extract parallel-operable component modules in this state, this is performed first. When extraction of parallel operable component modules is performed on FIG. 17A, B_CD, E, and F are extracted as parallel operable component module pairs. These parallel processable component modules are bundled into one component module (referred to as component module α). In this state, the consumed resource
In S1102, the operation order pattern is extracted as described above.
S1103において、消費リソース量算出部102は、動作順序パターン毎の消費リソース量を見積る。見積もりの手順は、実施形態1の場合と基本的に同じであるが、本実施形態では並列動作が考慮されているので、その点が異なる。ここでは異なる点を中心に説明する。
消費リソース量算出部102は、処理時間に関する消費リソース量を算出する場合には、S302で取得した部品モジュール毎の消費リソース量に含まれる処理時間を、S1102で抽出した動作順序に従って加算していくことにより算出できる。このとき、消費リソース量算出部102は、動作順序中に並列動作が含まれている場合には、並列動作する部品モジュール同士の処理時間を比較し、大きいほうだけを加算する。例えば、図3のプログラムの場合には、並列動作を含む動作順序パターンは、「入力⇒A⇒[B/C]⇒D⇒E⇒出力」、「入力⇒A⇒C⇒[B/D]⇒E⇒出力」、「入力⇒A⇒[B/C⇒D]⇒E⇒出力」の3通りがある。ここで、消費リソース量算出部102は、[B/C]に関して処理時間を算出する場合は、部品モジュールBと部品モジュールCの処理時間のうち大きい方の値を用いる。[B/D]についても同様である。[B/C⇒D]では、部品モジュールBの処理時間と、部品モジュールCと部品モジュールDの処理時間の合算値との比較を行い、大きい方の値を用いる。
In step S1103, the consumed resource
When calculating the consumed resource amount related to the processing time, the consumed resource
S1103において、消費リソース量算出部102がメモリ量に関する消費リソース量を算出する場合の手順も、基本的には、図7に示したものと同じである。ただし、本実施形態では、ある部品モジュールの出力データに対して、並列動作する部品モジュールが同時にアクセスするような動作順序が存在する場合がある。その場合には、出力データに対して全ての並列動作する部品モジュールが同時にアクセスできるように、出力データ格納メモリを複数用意する必要がある。
例えば、図3のプログラムの場合の動作順序パターンが、「入力⇒A⇒[B/C]⇒D⇒E⇒出力」や「入力⇒A⇒[B/C⇒D]⇒E⇒出力」の場合には、部品モジュールAの出力データに対して部品モジュールBと部品モジュールCとが同時にアクセスすることになる。この場合、同時アクセスを可能にするために、部品モジュールAの出力データ格納メモリを2つ用意し、それぞれに出力データを格納するようにする。このような同時アクセスが発生するか否かは、プログラム構成情報と動作順序パターンとから判定できる。即ち、プログラム構成情報から部品モジュールAの出力は、部品モジュールBと部品モジュールCとに接続していることがわかる。更に動作順序パターンから部品モジュールBと部品モジュールCとは同時に動作することがわかる。この両者から、この動作順序パターンでは、部品モジュールAの出力データに対して部品モジュールBと部品モジュールCとが同時にアクセスすることになることが判明する。
In S1103, the procedure when the consumed resource
For example, the operation sequence pattern in the case of the program of FIG. 3 is “input⇒A⇒ [B / C] ⇒D⇒E⇒output” or “input⇒A⇒ [B / C⇒D] ⇒E⇒output”. In this case, the component module B and the component module C simultaneously access the output data of the component module A. In this case, in order to enable simultaneous access, two output data storage memories of the component module A are prepared, and output data is stored in each of them. Whether or not such simultaneous access occurs can be determined from the program configuration information and the operation sequence pattern. That is, it can be seen from the program configuration information that the output of the component module A is connected to the component module B and the component module C. Furthermore, it can be seen from the operation sequence pattern that the component module B and the component module C operate simultaneously. From these, it is found that the component module B and the component module C simultaneously access the output data of the component module A in this operation order pattern.
本実施形態の場合における図7の手順を、実施形態1との違いをメインに説明する。動作理解を助けるために、図3において、消費リソース量算出部102が、「入力⇒A⇒[B/C]⇒D⇒E⇒出力」で示される動作順序に関してメモリ量を算出している場合の手順を例題手順として説明する。
まず、S701、S702の処理は実施形態1と同じである。この時点でのメモリ確保リストの内容を図18の(A)に示す。
S703において、消費リソース量算出部102は、次に動作させる部品モジュールの出力データ格納メモリをメモリ確保リストに登録する。ただし、消費リソース量算出部102は、この出力データ格納メモリに対して、複数の部品モジュールからの同時アクセスが発生する場合には、その同時アクセス分の出力データ格納メモリをメモリ確保リストに登録する。例題手順では、次に動作させる部品モジュールである部品モジュールAの出力データ格納メモリは上述のように2つの部品モジュールからの同時アクセスが発生するので、消費リソース量算出部102は、2つ分の出力データ格納メモリをメモリ確保リストに登録する。このときのメモリ確保リストの内容を図18の(B)に示す。
The procedure of FIG. 7 in the case of the present embodiment will be described mainly with respect to differences from the first embodiment. In FIG. 3, when the consumption resource
First, the processes in S701 and S702 are the same as those in the first embodiment. The contents of the memory reservation list at this time are shown in FIG.
In step S <b> 703, the consumption resource
S704において、消費リソース量算出部102は、現時点でメモリ確保リストに登録されているメモリ量を算出する。例題手順では、メモリ確保リストは図18の(B)のようになっているので、メモリ量は、A_in+2×A_outとなる。
S705において、消費リソース量算出部102は、動作順序を一つ進める。例題手順では、部品モジュールAの動作が済んだとするので、このときの例題手順でのメモリ確保リストの内容は図18の(C)のようになる。
S706、S707において、消費リソース量算出部102は、S705で算出したメモリ量が最大メモリ量より大きければ、最大メモリ量を更新する。
S708において、消費リソース量算出部102は、動作順序が最後まで進んだかをチェックし、最後まで進んでいなければ、S703に戻り、次に動作させる部品モジュールに関する手順を続ける。次に動作するのは部品モジュールBと部品モジュールCなので、この時点での例題手順でのメモリ確保リストの内容は図18の(D)のようになり、S704で消費リソース量算出部102が算出するメモリ量は2×A_out+B_out+C_outとなる。以降、例題手順で動作順序を進める度に、S703でのメモリ確保リストの様子がどうなるかを図18の(E)〜(F)に示す。これらの場合のメモリ量は、それぞれ、B_out+C_out+D_out、B_out+D_out+E_outとなる。これらの算出されたメモリ量の中で最大のものが、例題手順でのメモリ量となる。
S1103では、以上のようにして動作順序パターン毎の消費リソース量の算出が行われる。
In step S <b> 704, the consumed resource
In step S <b> 705, the consumed resource
In S706 and S707, the consumed resource
In S708, the consumption resource
In S1103, the consumption resource amount for each operation order pattern is calculated as described above.
以上、消費リソース量算出部102は、並列動作する部品モジュールがある場合には、それらを考慮して消費リソース量を算出し、動作順序パターン別消費リソース量リストを算出することができる。即ち、本発明によるプログラム設計支援装置は、並列動作する部品モジュールを考慮してプログラムの設計を支援することができる。
As described above, when there are component modules that operate in parallel, the consumption resource
<実施形態3>
実施形態1では、設計変更可能箇所抽出部103における設計変更可能箇所の抽出において、設計中のプログラムで使用している部品モジュール毎に代替部品モジュールの有無をチェックしていた。しかしながら、本発明による設計変更可能箇所の抽出はこれに限るものではない。設計変更可能箇所抽出部103は、設計中のプログラムで使用している部品モジュール群(複数の部品モジュールで構成されている)毎に、代替部品モジュールの有無をチェックするようにしてもよい。その場合には、部品モジュール情報管理データベース107には、互いに代替部品モジュールとなっている部品モジュール群も管理されるようにすればよい。
例えば図3に示すようなプログラムの場合に、設計変更可能箇所抽出部103は、部品モジュールCと部品モジュールDとに対して代替部品モジュールのチェックを行うようにしてもよい。このとき、部品モジュール情報管理データベース107において、部品モジュールCと部品モジュールDとに対する代替部品モジュールとして部品モジュールβが管理されていたとする。その場合、設計変更可能箇所抽出部103は、部品モジュールCと部品モジュールDとに対する代替部品モジュール情報として部品モジュールβを出力すればよい。このような場合には、代替される対象の部品モジュールである部品モジュールCと部品モジュールDとの間の接続状態(部品モジュールCの出力を部品モジュールDの入力とする等)も含めて、部品モジュール情報管理データベース107で管理しておくことになる。
<
In the first embodiment, in the extraction of the design changeable part by the design changeable
For example, in the case of a program as shown in FIG. 3, the design changeable
また、逆に設計中のプログラムで使用している部品モジュールに対して管理されている代替部品モジュールが複数の部品モジュールから構成されるものであってもよい。例えば図3に示すようなプログラムの場合に、部品モジュール情報管理データベース107において、部品モジュールCに対する代替部品モジュールとして部品モジュールγと部品モジュールδとが管理されていたとする。その場合、設計変更可能箇所抽出部103は、部品モジュールCに対する代替部品モジュール情報として部品モジュールγと部品モジュールδとを出力すればよい。このような場合には、部品モジュール情報管理データベース107で、部品モジュールγと部品モジュールδとの間の接続状態(部品モジュールγの出力を部品モジュールδの入力とする等)も含めて代替部品モジュールとして管理しておくことになる。
更には、上記の2つの場合が組み合わされたような場合も考えられる。即ち、設計中のプログラムで使用している部品モジュール群毎に管理されている代替部品モジュールが複数の部品モジュールから構成されるものであってもよい。
Conversely, an alternative component module managed for a component module used in a program under design may be composed of a plurality of component modules. For example, in the case of the program shown in FIG. 3, it is assumed that the component module γ and the component module δ are managed as alternative component modules for the component module C in the component module
Furthermore, a case where the above two cases are combined is also conceivable. That is, the alternative component module managed for each component module group used in the program under design may be composed of a plurality of component modules.
このように、複数の部品モジュールを組み合わせたり、逆に複数の部品モジュールに分解したりすることによって、その部品モジュール(群)が実現する処理に対する最適化が行いやすくなり、消費リソース量が変化することが考えられる。従って、設計変更の選択肢としてこのような場合を考慮しておけば、本発明をより有効に活用できる。例えば、画像データに対して2次元ガウスフィルター処理を行う部品モジュールがあった場合、それを一次元ガウスフィルターを行う部品モジュール2つ(縦方向のフィルター処理と横方向のフィルター処理)に分解すると、処理速度が変化することが考えられる。
また、カラー画像データに対してグレイスケール変換する部品モジュールと縮小処理を行う部品モジュールとが直列に適用されているような場合、これら2つの部品モジュールの代替モジュールとして、縮小処理を行う部品モジュールとグレイスケール変換する部品モジュールとを直列に接続したもの(部品モジュールの順序を逆にしたもの)が適用されてもよい。この場合、代替モジュールに変更すれば、縮小処理が最初に行われるので、メモリ量に関してもとの場合より有利になることが予想される。
In this way, by combining a plurality of component modules, or conversely disassembling into a plurality of component modules, it becomes easier to optimize the processing realized by the component module (group), and the amount of resource consumption changes. It is possible. Therefore, if such a case is taken into consideration as a design change option, the present invention can be used more effectively. For example, if there is a component module that performs two-dimensional Gaussian filter processing on image data, disassemble it into two component modules that perform a one-dimensional Gaussian filter (vertical filter processing and horizontal filter processing) It is conceivable that the processing speed changes.
Further, when a component module that performs gray scale conversion on color image data and a component module that performs reduction processing are applied in series, a component module that performs reduction processing as an alternative module of these two component modules, A component in which component modules to be grayscale converted are connected in series (in which the order of component modules is reversed) may be applied. In this case, if the module is changed to an alternative module, the reduction process is performed first, so that it is expected that the memory amount is more advantageous than the original case.
<その他の実施形態>
上述した実施形態では、リソースの種類として、メモリ量、処理時間、回路規模を例に挙げて説明を行ったが、本発明が対象とするリソースの種類はこれらに限らない。ある処理を実行するのに必要な空間的、時間的資源であればどのようなものでもよい。
また、ターゲット環境も上述した実施形態中に挙げたものに限らない。例えば、クラウド環境がターゲット環境となってもよい。
また、上述した実施形態では、モデルベース開発手法を用いるプログラム開発を行う場合に本発明によるプログラム設計支援装置を用いる例を示したが、プログラムの開発手法はこれに限らない。通常のソースコードベースのプログラム開発に対して、本発明によるプログラム設計支援装置を用いてもよい。その場合には、関数等で表現される処理の塊を部品モジュールとすればよい。
<Other embodiments>
In the above-described embodiment, the description has been given by taking the amount of memory, the processing time, and the circuit scale as examples of the resource type, but the resource type targeted by the present invention is not limited thereto. Any spatial and temporal resources necessary to execute a certain process may be used.
Further, the target environment is not limited to that described in the above-described embodiment. For example, a cloud environment may be the target environment.
In the above-described embodiment, an example is shown in which the program design support apparatus according to the present invention is used when program development using a model-based development technique is performed. However, the program development technique is not limited to this. The program design support apparatus according to the present invention may be used for normal source code based program development. In that case, a block of processing expressed by a function or the like may be used as a component module.
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(又はCPUやMPU等)がプログラムを読み出して実行する処理である。 The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, etc.) of the system or apparatus reads the program. It is a process to be executed.
以上、上述した各実施形態によれば、プログラム開発において、消費リソース量が許容リソース量を満たすプログラムの設計を支援する技術を提供することができる。
より具体的には、プログラムを開発している時点で、そのプログラムが消費する消費リソース量を見積もることが可能となる。また、見積もった消費リソース量が、予め設定された許容リソース量を超えてしまった場合(又は、超えそうになった場合)に、その事態を回避するために、どのようにプログラム変更すればよいかを提示することができる。これにより、従来、実際にターゲットとなる環境でプログラムを動かしてみるまで困難であったリソース量の予測が可能になり、更に、問題が発生しそうになった場合には回避方法も提示されるので、プログラム開発の手戻りを防止することができる。
As described above, according to each of the above-described embodiments, it is possible to provide a technology that supports design of a program that satisfies the allowable resource amount in the program development.
More specifically, when a program is developed, it is possible to estimate the amount of resource consumed by the program. If the estimated consumed resource amount exceeds (or is likely to exceed) a preset allowable resource amount, how to change the program in order to avoid the situation Can be presented. This makes it possible to predict the amount of resources that would have been difficult until the program was actually run in the target environment. In addition, if a problem is likely to occur, an avoidance method is also presented. It is possible to prevent rework of program development.
以上、本発明の好ましい形態について詳述したが、本実施形態は係る特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形・変更が可能である。 The preferred embodiment of the present invention has been described in detail above, but the present embodiment is not limited to the specific embodiment, and various modifications can be made within the scope of the gist of the present invention described in the claims.・ Change is possible.
101 許容リソース量設定部、102 消費リソース量算出部、103 設計変更可能箇所抽出部、104 変更選択肢提示部、105 設計変更選択部、106 消費リソース量管理データベース、107 部品モジュール情報管理データベース、108 プログラム設計部
DESCRIPTION OF
Claims (14)
前記プログラムの実行にあたり消費される消費リソース量を取得する取得手段と、
前記取得手段により取得された消費リソース量が前記設定手段により設定された許容リソース量よりも大きい場合、前記プログラムを構成する複数の部品モジュールのうち代替可能な部品モジュールを前記プログラムの設計変更可能箇所として抽出する抽出手段と、
前記抽出手段により抽出された部品モジュールに基づいて前記設計変更可能箇所の選択肢を提示する提示手段と、
を有することを特徴とする情報処理装置。 Setting means for setting an allowable resource amount allowed in the design of a program composed of a plurality of component modules;
Obtaining means for obtaining a consumed resource amount consumed in executing the program;
When the consumed resource amount acquired by the acquiring unit is larger than the allowable resource amount set by the setting unit, a replaceable component module among a plurality of component modules constituting the program can be changed in the design of the program Extraction means for extracting as:
Presenting means for presenting options of the design-changeable location based on the component module extracted by the extracting means;
An information processing apparatus comprising:
複数の部品モジュールから構成されるプログラムの設計において許容される許容リソース量を設定する設定ステップと、
前記プログラムの実行にあたり消費される消費リソース量を取得する取得ステップと、
前記取得ステップにより取得された消費リソース量が前記設定ステップにより設定された許容リソース量よりも大きい場合、前記プログラムを構成する複数の部品モジュールのうち代替可能な部品モジュールを前記プログラムの設計変更可能箇所として抽出する抽出ステップと、
前記抽出ステップにより抽出された部品モジュールに基づいて前記設計変更可能箇所の選択肢を提示する提示ステップと、
を含むことを特徴とする情報処理方法。 An information processing method executed by an information processing apparatus that supports design of a program composed of a plurality of component modules,
A setting step for setting an allowable resource amount allowed in the design of a program composed of a plurality of component modules;
An acquisition step of acquiring a consumed resource amount consumed in executing the program;
When the consumed resource amount acquired in the acquiring step is larger than the allowable resource amount set in the setting step, a replaceable component module among a plurality of component modules constituting the program can be changed in the design of the program An extraction step to extract as
A presenting step of presenting options of the design-changeable location based on the component module extracted by the extracting step;
An information processing method comprising:
複数の部品モジュールから構成されるプログラムの設計において許容される許容リソース量を設定する設定ステップと、
前記プログラムの実行にあたり消費される消費リソース量を取得する取得ステップと、
前記取得ステップにより取得された消費リソース量が前記設定ステップにより設定された許容リソース量よりも大きい場合、前記プログラムを構成する複数の部品モジュールのうち代替可能な部品モジュールを前記プログラムの設計変更可能箇所として抽出する抽出ステップと、
前記抽出ステップにより抽出された部品モジュールに基づいて前記設計変更可能箇所の選択肢を提示する提示ステップと、
を実行させるためのプログラム。 A computer that supports the design of a program composed of multiple component modules.
A setting step for setting an allowable resource amount allowed in the design of a program composed of a plurality of component modules;
An acquisition step of acquiring a consumed resource amount consumed in executing the program;
When the consumed resource amount acquired in the acquiring step is larger than the allowable resource amount set in the setting step, a replaceable component module among a plurality of component modules constituting the program can be changed in the design of the program An extraction step to extract as
A presenting step of presenting options of the design-changeable location based on the component module extracted by the extracting step;
A program for running
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014138945A JP2016018269A (en) | 2014-07-04 | 2014-07-04 | Information processing apparatus, information processing method, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2014138945A JP2016018269A (en) | 2014-07-04 | 2014-07-04 | Information processing apparatus, information processing method, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2016018269A true JP2016018269A (en) | 2016-02-01 |
Family
ID=55233481
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2014138945A Pending JP2016018269A (en) | 2014-07-04 | 2014-07-04 | Information processing apparatus, information processing method, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2016018269A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018022424A (en) * | 2016-08-05 | 2018-02-08 | 株式会社日立製作所 | System development support device and system development support method |
JPWO2021192268A1 (en) * | 2020-03-27 | 2021-09-30 | ||
JP2021196912A (en) * | 2020-06-15 | 2021-12-27 | ヤフー株式会社 | Execution apparatus, execution method, and execution program |
-
2014
- 2014-07-04 JP JP2014138945A patent/JP2016018269A/en active Pending
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2018022424A (en) * | 2016-08-05 | 2018-02-08 | 株式会社日立製作所 | System development support device and system development support method |
WO2018025603A1 (en) * | 2016-08-05 | 2018-02-08 | 株式会社日立製作所 | System development assistance device and system development assistance method |
JPWO2021192268A1 (en) * | 2020-03-27 | 2021-09-30 | ||
WO2021192268A1 (en) * | 2020-03-27 | 2021-09-30 | 日本電信電話株式会社 | Resource management device, resource management method, and resource management program |
JP7405242B2 (en) | 2020-03-27 | 2023-12-26 | 日本電信電話株式会社 | Resource management device, resource management method, and resource management program |
JP2021196912A (en) * | 2020-06-15 | 2021-12-27 | ヤフー株式会社 | Execution apparatus, execution method, and execution program |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11016836B2 (en) | Graphical user interface for visualizing a plurality of issues with an infrastructure | |
US8494996B2 (en) | Creation and revision of network object graph topology for a network performance management system | |
US11038947B2 (en) | Automated constraint-based deployment of microservices to cloud-based server sets | |
JP6031196B2 (en) | Tuning for distributed data storage and processing systems | |
CN113168569A (en) | Decentralized distributed deep learning | |
US9736212B2 (en) | Optimized browser rendering process | |
CN107870845A (en) | Towards the management method and system of micro services framework applications | |
JP2017519280A (en) | Optimized browser rendering process | |
US20190034806A1 (en) | Monitor-mine-manage cycle | |
CN111143039A (en) | Virtual machine scheduling method and device and computer storage medium | |
JP2021064049A (en) | Calculator system and mathematical model generation support method | |
CN105446952A (en) | Method and system for processing semantic fragments | |
JP5910499B2 (en) | Extensibility evaluation apparatus, extensibility evaluation method, and extensibility evaluation program | |
JP2016018269A (en) | Information processing apparatus, information processing method, and program | |
US9886271B2 (en) | Change method, apparatus, and recording medium | |
CN110908644B (en) | Configuration method and device of state node, computer equipment and storage medium | |
US9467336B2 (en) | Information processing system and management method thereof | |
US8510693B2 (en) | Changing abstraction level of portion of circuit design during verification | |
US10089151B2 (en) | Apparatus, method, and program medium for parallel-processing parameter determination | |
JP5304972B1 (en) | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM | |
US11119921B1 (en) | State machine generation for multi-buffer electronic systems | |
JP2019140496A (en) | Operation device and operation method | |
US20170185397A1 (en) | Associated information generation device, associated information generation method, and recording medium storing associated information generation program | |
JPWO2013105186A1 (en) | Service level management apparatus, program, and method | |
JP2016139984A (en) | Network evaluation system and network evaluation method |