JP3732530B2 - Data flow computer execution control device - Google Patents

Data flow computer execution control device Download PDF

Info

Publication number
JP3732530B2
JP3732530B2 JP15384193A JP15384193A JP3732530B2 JP 3732530 B2 JP3732530 B2 JP 3732530B2 JP 15384193 A JP15384193 A JP 15384193A JP 15384193 A JP15384193 A JP 15384193A JP 3732530 B2 JP3732530 B2 JP 3732530B2
Authority
JP
Japan
Prior art keywords
node
token
execution
arc
function
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.)
Expired - Fee Related
Application number
JP15384193A
Other languages
Japanese (ja)
Other versions
JPH0713958A (en
Inventor
晴元 福田
直久 高橋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP15384193A priority Critical patent/JP3732530B2/en
Publication of JPH0713958A publication Critical patent/JPH0713958A/en
Application granted granted Critical
Publication of JP3732530B2 publication Critical patent/JP3732530B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Multi Processors (AREA)

Description

【0001】
【産業上の利用分野】
本発明は、非同期並列実行制御を行うデータフロー計算機の実行制御装置に関する。
【0002】
【従来の技術】
データフロー計算機は、プログラムをノードとノード間の経路を示すアークからなるデータフローグラフで表現し、グラフ構造内をトークンと呼ぶデータの値を更新しながら流すことにより計算を実行する。
【0003】
ノードには演算ノードと制御ノードがある。演算ノードでは、トークンの値を受け取り、与えられた演算を行い、結果をトークンの値として出力する。制御ノードでは、トークンを流す経路を制御する。
【0004】
データフロー計算機に実行制御装置として、データ駆動実行制御装置、要求駆動実行制御装置がある。
【0005】
データ駆動実行制御装置:
データ駆動実行制御装置は、データフローグラフの全てのノードに対して以下に示す方法で処理を施す。
【0006】
1.全ての入力アーク上にトークンが到達するまでノードを待機させる。
【0007】
2.入力アーク上にトークンが揃った後、ノードに与えられた機能を実行させる。これをノードの発火と呼ぶ。このとき、入力アーク上のトークンを取り除く。
【0008】
3.実行結果を出力アーク上にトークンとして出力する。
【0009】
それぞれのノードを上記実行方法に従って発火させることにより、グラフ全体を非同期並列に実行する。
【0010】
従来のデータ駆動実行制御装置の構成例を図5に示す。以下図5の各手段の機能について説明する。
(発火制御手段10C)
トークン到着監視機能12は、全ての入力アーク上にトークンが揃ったノードを検出し、発火させる。ノード分類機能13は、発火したノードを演算ノードと制御ノードに分類し、対応する命令実行手段に制御信号を送る。なお、演算命令を持つノードを演算ノード、制御命令を持つノードを制御ノードと呼ぶ。
(演算命令実行手段20C)
入力トークン処理機能21Aは、発火したノードの入力アーク上のトークンを全て消去し、トークンの値を演算実行機能22に送る。演算実行機能22はトークンの値に対し、演算命令で与えられた演算を行い、結果をトークン出力機能23Cに送る。トークン出力機能23Cは、演算結果をトークンの値に代入し、トークンを発火したノードの出力アーク上に置く。
(制御命令実行手段30C)
制御命令デコード機能31では、制御ノードの命令を識別し、対応する命令実行機能に送る。命令実行機能では、与えられたノード種別に従って制御を行う。制御ノードには次のような種類がある。
【0011】
・(分配ノード(D)32C)1入力n出力のノードである。入力アーク上のトークンを消去し、値をコピーしたトークンを全ての出力アーク上へ置く。
【0012】
・(分岐ノード(SW)33)2入力2出力のノードである。第2入力アーク上のトークンの値が真のとき、第1入力アーク上のトークンを第1出力アーク上へ置く。偽のときは、第1入力アーク上のトークンを第2出力アーク上へ置く。
【0013】
・(手続き呼出しノード(CALL)34A)2入力1出力のノードである。第2入力アーク上のトークンをコピーし、第1入力トーク上のトークンの値として格納されている関数名から関数の手続き開始ノードを求め、そのノードの第1入力アーク上に置く。また、出力アークの名前を値としたトークンを生成する。第1入力アーク上のトークンの値として格納されている関数名から関数の手続き復帰ノードを求め、そのノードの第1入力アーク上に、生成したトークンを置く。入力アーク上のトークンを消去する。
【0014】
・(手続き開始ノード(ENTRY)36)1入力1出力のノードである。入力アーク上のトークンのコピーを出力アーク上に置く。入力アーク上のトークンを消去する。
【0015】
・(手続き復帰ノード(RETURN)35C)2入力0出力のノードである。第2入力アーク上の値をコピーしてトークンを生成する。第1入力アーク上のトークンの値として、指定されたアークに生成したトークンを置く。
【0016】
図6に実行例を示す。図中で黒丸はトークン、白丸ノードは演算ノード、白丸に十字のノードは分配ノードを表す。また、網掛けノードは実行を終ったノードを表す。図中の太線のノードに注目して動作を説明する。
【0017】
1.トークン到着監視機能12は、入力アーク上にトークンが揃っていないため(図6(1)〜(3))、太線のノードを発火させない。
【0018】
2.入力アーク上にトークンが揃った後(図6(4))、トークン到着監視機能12はノードを発火させる。
【0019】
3.ノード分類機能13は、発火したノードを演算ノードであると識別し、演算命令実行手段20Cへ制御信号を送る。
【0020】
4.入力トークン処理機能21Aは、入力アーク上のトークンを取り除く。
【0021】
5.演算実行機能22により演算が行われる。
【0022】
6.トークン出力機能23は、出力アーク上にトークンを置く(図6(5))。
【0023】
以上のように実行を行うことにより、グラフ全体を実行していく。
【0024】
要求駆動実行制御装置:
要求駆動実行制御装置は、指定したノードに至る経路上のノードだけを選択し、計算を行う。この実行制御装置は、データフローグラフの全てのノードに対して以下に示す方法で処理を施す。
【0025】
1.(a)出力アーク上に要求信号(デマンド)が到着するまでノードを待機させる。
【0026】
(b)出力アーク上にデマンドが到達した後、入力ア−クにデマンドを出力する。
【0027】
(c)全ての入力アーク上にトークンが到達するまでノード待機させる。
【0028】
2.入力アーク上にトークンが揃った後、ノードを発火させる。このとき入力アーク上のトークンを取り除く。
【0029】
3.演算結果を出力アークに出力する。
【0030】
図7に実行例を示す。図中で白丸のノードは演算ノード、白丸に十字のノードは分配ノード、黒丸はトークン、右下りの八ッチングが施された丸はデマンドを表す。また、左下りのハッチングが施されたノードはデマンドを受けたノード、網掛けのノードは発火したノードを表す。上記のように各ノードを個別に実行させると、グラフ全体の動作は以下のようになる。
【0031】
1.指定したノードより、グラフ上の各ノードの出力側から入力側へデマンドを伝播させる(図7(1)〜(5))。
【0032】
2.全てのデマンドが開始ノードまで伝播すると、開始ノードから出力アークへトークンを送出する(図7(6))。
【0033】
3.デマンドを受けたノードからなる部分グラフをデータ駆動実行する(図7(7)〜(10))。
【0034】
以上により、デマンドを受け取ったノードのみが選択的に実行される。
【0035】
色付きトークン方式:
データフロー計算機において、複数実行環境下での多重実行方式として、色付きトークン方式がある。トークンに色と呼ぶタグを付け、実行環境毎に色を設定する。データ駆動実行制御装置の1,2,3項、要求駆動実行制御装置の1(c),2,3項を以下のように変更することにより、色付きトークン方式による実行制御が実現される。
【0036】
1.全ての入力アーク上に、色の等しいトークンが到達するまで、ノードを待機させる(1(c)も同様)。
【0037】
2.入力アーク上に色の等しいトークンが揃った後、ノードを発火させる。このとき、入力アーク上の色の等しいトークンを取り除く。
【0038】
3.結果を出力アークに出力する。このとき、入力アーク上にあったトークンの色をコピーして出力する。
【0039】
以上の実行方式を用いると、1つのグラフを、複数の実行環境下で(色別に)、互いに影響を及ぼさずに並列に実行させることができる。
【0040】
従来の色付きトークン方式を使用した実行制御装置の構成例を図8に示す。以下図8の各手段の機能について説明する。
(発火制御手段10D)
色付きトークン到着監視機能16は、全ての入力アーク上に同じ色のトークンが揃ったノードを検出し、発火させる。ノード分類機能13は、発火したノードを演算ノードと制御ノードに分類し、対応する命令実行手段に制御信号を送る。(演算命令実行手段20D)
入力トークン処理機能21Bは、発火したノードの入力アーク上の、同じ色を持つトークンを全て消去し、トークンの値を演算実行機能22に送る。演算実行機能22はトークンの値に対し、演算命令で与えられた演算を行い、結果をトークン出力機能23Dに送る。トークン出力機能23Dは、演算結果をトークンの値に代入し、入力アーク上より消去したトークンの色をコピーし、出力アーク上にトークンを置く。
(制御命令実行手段30D)
制御命令デコード機能31では、制御ノードの命令を識別し、対応する命令実行機能に送る。命令実行機能では、与えられたノード種別に従って制御を行う。制御ノードには次のような種類がある。
【0041】
・(分配ノード(D)32B)1入力n出力のノードである。入力アーク上のトークンを消去し、値と色をコピーしたトークンを全ての出力アーク上へ置く。
【0042】
・(分岐ノード(SW)33)2入力2出力のノードである。第2入力アーク上のトークンの値が真のとき、第1入力アーク上のトークンを第1出力アーク上へ置く。偽のときは、第1入力アーク上のトークンを第2出力アーク上へ置く。
【0043】
・(手続き呼出しノード(CALL)34C)2入力1出力のノードである。発火した際に、データフローグラフ上のどのトークンも使用していない色を求める。第2入力アーク上のトークンの値と、新たに生成した色によりトークンを生成する。第1入力アーク上のトークンの値より関数名を知り、生成したトークンを手続き開始ノードの第1入力アーク上に置く。また、入力アーク上のトークンの色と出力アークの名前の対を値とし、生成した色を付与したトークンを生成する。第1入力アーク上のトークンの値として格納されている関数名から関数の手続き復帰ノードを求め、そのノードの第1入力アーク上に生成したトークンを置く。入力アーク上のトークンを消去する。
【0044】
・(手続き開始ノード(ENTRY)36)1入力1出力のノードである。入力アーク上のトークンのコピーを出力アーク上に置く。入力アーク上のトークンを消去する。
【0045】
・(手続き復帰ノード(RETURN)35D)2入力0出力のノードである。第1入力アーク上のトークンより手続き呼出し前の色を求め、第2入力アーク上の値をコピーしてトークンを生成する。第1入力アーク上のトークンの値として指定されたアークに生成したトークンを置く。
【0046】
実際の実行例を図9に示す。図中で黒丸(K,a)は、値K色aのトークンを表す。ここでは、1つのノードを注目して実行例を示す。
【0047】
1.色付きトークン到着監視機能16は、全ての入力アーク上に同じ色(i)のトークンが揃ったことを検知し、ノードを発火させる(図9(3))。
【0048】
2.ノード分類機能13は、発火したノードを演算ノードであると識別し、演算命令手段20Dへ制御信号を送る。
【0049】
3.入力トークン処理機能21Bは、入力アーク上の色(i)のトークンを取り除く。
【0050】
4.演算実行機能は演算22を行う。
【0051】
5.トークン出力機能23Dは、同じ色(i)を持つトークンを、出力アークへ出力する(図9(4))。
【0052】
【発明が解決しようとする課題】
例えば、教育支援プログラムでは、基礎知識を持っていない学習者に対して多くの問題を与え、より多くの基礎知識を持っている学習者には、それら問題の一部を選択させたい場合がある。ここで、基礎知識の差をレベルの差ととらえ、基礎知識を多く持っているほどレベルが高いとする。
【0053】
レベルの高い学習者は、基礎知識をそれほど必要としない。これに対して、レベルの低い学習者はより多くの問題により基礎知識を修得しなければならない。つまり、レベルの高い学習者が必要とする問題に、レベルの低い学習者が必要とする基礎知識を獲得するための問題を付け加えることにより、レベルの低い学習者用の問題が揃うと考えられる。このような場合には、レベルの高い学習者が必要とする問題は、レベルの低い学習者の必要とする問題の部分集合となる。
【0054】
ここで、ある1つの問題を提示する機能をノードとし、提示する順序をアークとした問題提示プログラムを表現することを考える。複数レベルに対応する問題提示を行う場合に、各ノードについてレベル毎に選択的に実行する機能を与えられているときには、問題提示プログラムを1つ作成し、各レベルで共有すればよい。このような機能がない場合には、レベル毎に別個のプログラムを作成しなければならない。このように、レベル毎にプログラムを作ると、あるレベルに対応するプログラムを修正した場合には、そのレベル以下のプログラムに対して同じ修正を加えなければならない。このとき、共通部分を修正する場合には、修正しなければならないプログラム数は、さらに増えることになる。このような問題を解決するために、レベル毎にノードを選択的に実行させる機能が必要である。
【0055】
レベル毎にノードを選択的に実行させる機能の実現方法として、条件分岐を利用する方法が考えられる。すなわち、ノードの前に分岐用のプログラムを付け加えて、条件を満たすトークンだけをノードに送ることにより、レベルに応じてノードを選択的に実行させることができる。この方法では全てのノードに対して分岐用プログラムを付与しなければならない。このため、問題の提示レベルを変更する場合に、分岐プログラムの修正が必要となるという問題がある。このように、条件分岐を利用する方法では、プログラムの作成時・修正時に、条件分岐に関する箇所の作成・修正作業が必要となり、プログラム作成者の負担が増大することになる。このような問題を解決するために、データフロー計算機にレベル毎にノードを選択的に実行させる機能を持たせる必要がある。
【0056】
データ駆動実行制御装置では、入力アーク上にトークンが揃った場合に発火を行うことにより実行が進められる。この装置では、分岐命令と手続き呼出し命令で実行経路を選択する手段を与えている。要求駆動実行制御装置では、上記命令による選択の他に、デマンドを伝播させ、デマンドの到達したノードを選択的に実行させることができる。しかし、これらの装置では、レベルに応じて選択的にノードを発火する機能を持たない。
【0057】
色付きトークンモデルは、実行環境の違いをトークンの色で表し、実行時には実行環境の違いを検出し、同じ実行環境のトークンにより実行を進める技術である。この方法は、レベルの違いに対応する技術ではなく、トークンはグラフ全体を、もしくはデマンドの伝播したノード全てをトークンの色別に実行することになる。従って、レベルに応じて選択的にノードを発火する機能を持たない。
【0058】
本発明の目的は、レベルに応じてノードを選択的に実行させる、データフロー計算機の実行制御装置を提供することにある。
【0059】
【課題を解決するための手段】
本発明の、データフロー計算機の実行制御装置は、
環境レベルと呼ぶ数値が付与されたノードと、ノード間を結合するアークとで構成されたデータフローグラフでプログラムを表現し、実行環境レベルと呼ぶ数値が付与されたトークンの値を前記データフローグラフに基づき更新していくことにより計算を実行するデータフロー計算機の実行制御装置において、
トークンが前記データフローグラフ上の経路に沿って伝播する途中でトークンの入力アークへの到着を監視し、指定された前記実行環境レベルを持つトークンが、該実行環境レベル以上の前記環境レベルを持つノードからアークで連結されたノードXへ向かう全ての入力アーク上に揃うと、当該ノードXに対応づけられた命令を識別する発火制御手段と、
当該ノードXが前記発火制御手段で演算命令と識別された場合、到着したトークンを入力して演算を行い、該演算結果をトークンの値に代入し、該トークンを、該トークンの前記実行環境レベル以上の環境レベルを持つノードに向かう出力アーク上に伝播させる演算命令実行手段と、
当該ノードXが前記発火制御手段で制御命令と識別された場合、当該ノードXの命令内容に従って到着したトークンの経路を変更し、該トークンを、該トークンの前記実行環境レベル以上の前記環境レベルを持つノードに向かう出力アーク上に伝播させる制御命令実行手段を有する。
【0060】
【作用】
本発明は、データフロー計算機の実行制御装置が、環境依存発火機能と環境依存分配機能を有することを特徴とする。
【0061】
環境依存発火機能とは、ある実行環境レベルmを持つトークンがあるノードnに到達したときに、m以上の環境レベルを持つノードからノードnへ向かう全ての入力アーク(環境入力アークと呼ぶ)上に実行環境レベルmのトークンが揃った場合にノードnを発火させる機能である。環境依存分配機能とは、トークンの実行環境レベル以上の環境レベルを持つノードに向かう全ての出力アーク(環境出力アークと呼ぶ)上に、そのトークンを出力する機能である。
【0062】
環境依存発火機能は、全ての環境入力アーク上にトークンが全て揃うまでノードを待機させ、全ての環境入力アーク上にトークンが揃った後、ノードを発火させる。また、環境依存分配機能は、全ての環境出力アーク上に実行環境レベルを与えたトークンを出力する機能である。従って、ある実行環境レベルmをトークンに付与してプログラムの実行を開始させると、m以上の環境レベルを持つノード間にだけトークンを伝播させ、m以上の環境レベルを持つノードだけを実行させることができる。
【0063】
【実施例】
次に、本発明の実施例について図面を参照して説明する。
【0064】
ノードの集合をNとする。ノードnに対し、環境レベルとしてtag(n)を付与する。さらに、実行環境レベルmをトークンに付与する。ノードnの第i入力アークの先に接続されたノードの環境レベルをtagin(n,i)、ノードnの第j出力アークの先に接続されたノードの環境レベルをtagout (n,j)と表す。このとき、m≦tagin(n,i)を満たす環境レベルを持つノードからノードnへ張られたアークがノードnの環境入力アークであり、ノードnからm≦tagout (n,j)を満たす環境レベルを持つノードへ張られたアークが環境出力アークである。
【0065】
図1は環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置の構成を示すブロック図である。それぞれの機能について以下で説明する。
(発火制御手段10A)
入力アーク選定機能10は、ノードの入力アークから、トークンの実行環境レベル以上の環境レベルを持つノードを先のノードとして有する入力アークを環境入力アークとして選定する。トークン到着監視機能12は、全ての環境入力アーク上にトークンが揃ったノードを検出し、発火させる。ノード分類機能13は、発火したノードを演算ノードと制御ノードに分類し、対応する命令実行手段に制御信号を送る。
(演算命令実行手段20A)
入力トークン処理機能21Aは、発火したノードの環境入力アーク上のトークンを全て消去し、トークンの値を演算実行機能22に送る。演算実行機能22は、トークンの値に対して与えられた演算を行い、結果をトークン出力機能23に送る。トークン出力機能23Aは、演算結果をトークンの値に代入し、実行環境レベルを与えたトークンを環境出力アーク上に置く。
(制御命令実行手段30A)
制御命令デコード機能31では、制御ノードの命令を識別し、対応する命令実行機能に送る。命令実行機能では、与えられたノード種別に従って制御を行う。制御ノードには次のような種類がある。
【0066】
・(分配ノード(D)32A)1入力n出力のノードである。入力アーク上ののトークンを消去し、値と実行環境レベルをコピーしたトークンを全ての環境出力アーク上へ置く。
【0067】
・(分岐ノード(SW)33)2入力2出力のノードである。第2入力アーク上のトークンの値が真のとき、第1入力アーク上のトークンを第1出力アーク上へ置く。偽のときは、第1入力アーク上のトークンを第2出力アーク上へ置く。
【0068】
・(手続き呼出しノード(CALL)34A)2入力1出力のノードである。第2入力アーク上のトークンをコピーし、第1入力アーク上のトークンの値として格納されている関数名から関数の手続き開始ノードを求め、その第1入力アーク上に置く。また、出力アークの名前を値としたトークンを生成する。第1入力アーク上のトークンの値として格納されている関数名から関数の手続き復帰ノードを求め、そのノードの第1入力アーク上に生成したトークンを置く。入力アーク上のトークンを消去する。
【0069】
・(手続き開始ノード(ENTRY)36)1入力1出力のノードである。入力アーク上のトークンのコピーを出力アーク上に置く。入力アーク上のトークンを消去する。
【0070】
・(手続き復帰ノード(RETURN)35A)2入力0出力のノードである。第2入力アーク上のトークンの値と実行環境レベルをコピーしトークンを生成する。第1入力アーク上のトークンとして指定されたアークに生成したトークンを置く。
【0071】
図2に実行例を示す。環境レベルとしてt1,t2,t3(t1<t2<t3)を用いる。図中で黒丸はトークン、白丸ノードは演算ノード、白丸に十字のノードは分配ノードを表す。また、網掛けノードは実行の終ったノードを表す。ノードの左上の数字はノード番号を表し、右上の数字は環境レベルを表す。ノードxよりyに張られたアークをx→yと表す。アーク番号は、左から1,2・・・と付ける。
【0072】
ここでは、実行環境レベルt2のトークンが伝播している場合について動作を説明する。まず、ノード4に注目し、動作を説明する。
【0073】
1.i=2,3においてt2≦tagin(4,i)となる。従って、入力アーク選定機能11は、アーク2→4,3→4を環境入力アークと識別する。
【0074】
2.これらの環境入力アーク上にトークンが揃うと(図2(2))、ノード4を発火する。
【0075】
3.ノード分類機能13は、ノード4を演算ノードと識別し、演算命令実行手段20Aへ制御信号を送る。
【0076】
4.その後、入力トークン処理機能21Aは、入力アーク上のトークンを取り除く。
【0077】
5.演算実行機能22は演算を行う。
【0078】
6.最後に、トークン出力機能23Aは、t2≦tagout (4,1)から4→5を環境出力アークと判定し、実行環境レベルt2のトークンを出力する(図2(3))。
【0079】
次に、ノード5に注目する。
【0080】
1.入力アーク選定機能11は、t2≦tagin(5,1)からアーク4→5を環境入力アークであると判定する。環境入力アーク上にトークンが揃っているため、ノード5を発火させる。
【0081】
2.ノード分類機能13により、制御命令実行手段30Aへ制御信号が送られ、制御命令デコード機能31により、分配ノードと判断される。
【0082】
3.j=1,2において、t2≦tagout (5,j)は満たされる。このため、分配ノードでは、アーク5→6,5→7を環境出力アークと判定し、これらのアーク上に実行環境レベルt2のトークンを出力する(図2(4))。
【0083】
以上のようにして、環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置は実行を行う。
【0084】
要求駆動実行制御装置の実施例:
デマンド伝播に関しては、〔従来の技術〕と同様である。デマンドの伝播したノード、および、その入力アークからなる部分グラフを、実行するデータフローグラフとする。このグラフを環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置により実行させる。
【0085】
色付きトークン方式によるデータ駆動実行制御装置への応用:
図3は、環境依存発火装置と環境依存分配機能を有するデータ駆動実行制御装置(色付きトークン方式)の構成を示すブロック図である。それぞれの機能について以下で説明する。
(発火制御手段10B)
発火制御手段10Bは、それぞれのノードに対して以下の処理を行う。
【0086】
1.色検出機能14は、入力アーク上のトークンの全ての色を検出する。
【0087】
2.色別入力アーク選定機能15は、色検出機能14により検出された色の中で、未処理の色を選出する。次に、ノードの入力アークから、選出したトークンの実行環境レベル以上の環境レベルを持つノードを先のノードとして有する入力アークを環境入力アークとして選定する。
【0088】
3.トークン到着監視機能12は全ての環境入力アーク上に、選出した色と同じ色を持つトークンが揃ったノードを検出し、発火させる。発火が行われずに、かつ、色検出機能14により検出された色のうち、未処理の色がある場合、1に戻る。
【0089】
4.ノード分類機能13は、発火したノードを演算ノードと制御ノードに分類し、対応する命令実行手段に制御信号を送る。色検出機能14により検出された色のうち、未処理の色がある場合、1に戻る。
(演算命令実行手段20B)
入力トークン処理機能21Bは、発火したノードの環境入力アーク上で、同じ色を持つトークンを全て消去し、トークンの値を演算実行機能22に送る。演算実行機能22はトークンの値に対し、与えられた演算を行い、結果をトークン出力機能23Bに送る。トークン出力機能23Bは、演算結果をトークンの値に代入し、入力アーク上より消去したトークンの色と実行環境レベルを与えたトークンを環境出力アーク上に置く。
(制御命令実行手段30B)
制御命令デコード機能31では、制御ノードの命令を識別し、対応する命令実行機能に送る。命令実行機能では、与えられたノード種別に従って制御を行う。制御ノードには次のような種類がある。
【0090】
・(分配ノード(D)32B)1入力n出力のノードである。入力アーク上ののトークンを消去し、値と色と実行環境レベルをコピーしたトークンを全て環境出力アーク上へ置く。
【0091】
・(分岐ノード(SW)33)2入力2出力のノードである。第2入力アーク上のトークンの値が真のとき、第1入力アーク上のトークンを第1出力アーク上へ置く。偽のときは、第1入力アーク上のトークンを第2出力アーク上へ置く。
【0092】
・(手続き呼出しノード(CALL)34B)2入力1出力のノードである。発火した際に、データフローグラフ上のどのトークンも使用していない色を求める。第2入力アーク上のトークンの値と実行環境レベルと、新たに生成した色によりトークンを生成する。第1入力アーク上のトークンの値より関数名を知り、生成したトークンを手続き開始ノードの第1入力アーク上に置く。また、入力アーク上のトークンの色と出力アークの名前の対を値とし、実行環境レベルと新たに生成した色によりトークンを生成する。第1入力アーク上のトークンの値として格納されている関数名から関数の手続き復帰ノードを求め、そのノードの第1入力アーク上に生成したトークンを置く。入力アーク上のトークンを消去する。
【0093】
・(手続き開始ノード(ENTRY)36)1入力1出力のノードである。入力アーク上のトークンのコピーを出力アーク上に置く。入力アーク上のトークンを消去する。
【0094】
・(手続き復帰ノード(RETURN)35B)2入力0出力のノードである。第1入力アーク上のトークンより手続き呼出し前の色を求め、第2入力アーク上のトークンの値と実行環境レベルをコピーしてトークンを生成する。第1入力アーク上のトークンの値として指定されたアークに生成したトークンを置く。
【0095】
図4に実行例を示す。環境レベルとして、t1,t2,t3(t1<t2<t3)を用いる。ノードの左上の数字はノード番号を表し、右上の数字は環境レベルを表す。黒丸のトークンは、色aを持ち、実行環境レベルとしてt1を与えている。黒の四角のトークンは、色bを持ち、実行環境レベルとしてt2を与えている。白丸のノードは演算ノード、白丸に十字のノードは分配ノードを表す。ノードxよりyに張られたアークをx→yと表す。アーク番号は、左から1,2,・・・と付ける。まず、ノード4に注目して動作を説明する。
【0096】
1.色検出機能14は、色aとbが存在することを検出する。
【0097】
2.色別入力アーク選定機能15は、まず色aのトークンのタグより、実行環境レベルがt1であることを知る。ノード4では、i=1,2,3において、t1≦tagin(4,i)となる。従って、色別入力アーク選定機能15はアーク1→4,2→4,3→4を環境入力アークと判定する。
【0098】
3.トークン到着監視機能12は、この環境入力アーク上に色aのトークンが揃っていないため(図4(1))、ノード4をまだ発火させない。
【0099】
4.次に、色別入力アーク選定機能15は、色bのトークンのタグより実行環境レベルがt2であることを知る。i=2,3において、t2≦tagin(4,i)となる。従って、色別入力アーク選定機能15はアーク2→4と3→4を環境入力アークと判定する。
【0100】
5.トークン到着監視機能12は、この環境入力アーク上に色bのトークンが揃っているため(図4(1))、ノード4を発火させる。
【0101】
6.ノード分類機能13は、ノード4を演算ノードと識別し、演算命令実行手段20Bへ制御信号を送る。
【0102】
7.入力トークン処理機能21Bは、環境入力アーク上の色bのトークンを取り除く。
【0103】
8.演算実行機能22は演算を行う。
【0104】
9.トークン出力機能23Bは、t2≦tagout (4,1)からアーク4→5を環境出力アークと判別し、入力トークンの色をコピーし、実行環境レベルt2としたトークンをアーク4→5に出力する(図4(2))。
【0105】
次に、ノード5に注目する。
【0106】
1.色検出機能14は、色bが存在することを検出する。
【0107】
2.色別入力アーク選定機能15は、色bのトークンのタグより実行環境レベルがt2であることを知る。t2≦tagin(5,1)が満たされるため、色別入力アーク選定機能15は、アーク4→5を環境入力アークと判定する。
【0108】
3.色別入力アーク選定機能15は、環境入力アーク上に色bのトークンが揃っているため(図4(2))、ノード5を発火させる。
【0109】
4.ノード分類機能13は、制御命令実行手段30Bへ制御信号を送る。制御命令デコード機能31がこのノードを分配ノードと判断する。
【0110】
5.j=1,2においてt2≦tagout (5,j)であるので、分配ノードではアーク5→6,5→7を環境出力アークであると判定する。入力トークンの色をコピーし、実行環境レベルt2としたトークンを、これらの環境出力アーク上に出力する(図4(3))。
【0111】
以上のようにして、環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置(色付きトークンモデルを使用)は実行を行う。
【0112】
色付きトークンモデルによる要求駆動実行制御法への実施例:
デマンド伝播に関しては、〔従来の技術〕と同様である。デマンドの伝播したノード、および、その入力アークからなる部分グラフを、実行するデータフローグラフとする。この部分グラフを環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置(色付きトークンモデルを使用)により実行させる。
【0113】
【発明の効果】
以上示したように、本発明は、トークンに実行環境レベル、ノードに環境レベルを与えて、環境依存発火機能と環境依存分配機能を実行制御装置が有することにより、1つのデータフローグラフを複数の環境レベルで共有して同時に計算を進めても、互いに独立にそれぞれの環境レベルに応じた必要最小限の計算だけを行わせることが可能となる効果がある。
【図面の簡単な説明】
【図1】環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置の構成例を示すブロック図である。
【図2】環境レベルを用いた計算経路制御例を示す図である。
【図3】環境依存発火機能と環境依存分配機能を有するデータ駆動実行制御装置の構成例(色付きトークン方式)を示すブロック図である。
【図4】色付きトークン方式における環境レベルに応じた発火制御の例を示す図である。
【図5】従来のデータ駆動実行制御装置の構成例を示す図である。
【図6】データ駆動実行例を示す図である。
【図7】要求駆動実行例を示す図である。
【図8】従来のデータ駆動実行装置の構成例(色付きトークン)を示すブロック図である。
【図9】色付きトークンによる発火例を示す図である。
【符号の説明】
10A,10B,10C,10D 発火制御手段
20A,20B,20C,20D 演算命令実行手段
30A,30B,30C,30D 制御命令実行手段
11 入力アーク選定機能
12 トークン到着監視機能
13 ノード分類機能
14 色検出機能
15 色別入力アーク選定機能
16 色付きトークン到着監視機能
21A,21B 入力トークン処理機能
22 演算実行機能
23A,23B,23C,23D トークン出力機能
31 制御命令デコード機能
32A,32B,32C 分配ノード(D)
33 分配ノード(SW)
34A,34B,34C 手続き呼出しノード(CALL)
35A,35B,35C,35D 手続き復帰ノード(RETURN)
36 手続き開始ノード(ENTRY)
[0001]
[Industrial application fields]
The present invention relates to an execution control apparatus for a data flow computer that performs asynchronous parallel execution control.
[0002]
[Prior art]
The data flow computer expresses a program as a data flow graph composed of arcs indicating paths between nodes, and executes a calculation by flowing data values called tokens while updating the graph structure.
[0003]
Nodes include operation nodes and control nodes. The operation node receives the token value, performs the given operation, and outputs the result as the token value. The control node controls the route through which the token flows.
[0004]
The data flow computer includes a data driven execution control device and a request driven execution control device as execution control devices.
[0005]
Data driven execution control device:
The data driving execution control apparatus performs processing on all nodes of the data flow graph by the following method.
[0006]
1. Causes the node to wait until a token reaches all input arcs.
[0007]
2. After the tokens are arranged on the input arc, the function given to the node is executed. This is called node firing. At this time, the token on the input arc is removed.
[0008]
3. The execution result is output as a token on the output arc.
[0009]
By firing each node according to the execution method described above, the entire graph is executed in asynchronous parallel.
[0010]
A configuration example of a conventional data drive execution control device is shown in FIG. The function of each means in FIG. 5 will be described below.
(Ignition control means 10C)
The token arrival monitoring function 12 detects and fires a node with tokens on all input arcs. The node classification function 13 classifies the fired node into an operation node and a control node, and sends a control signal to the corresponding instruction execution means. A node having an operation instruction is called an operation node, and a node having a control instruction is called a control node.
(Calculation instruction execution means 20C)
The input token processing function 21A erases all tokens on the input arc of the fired node, and sends the token value to the operation execution function 22. The operation execution function 22 performs the operation given by the operation instruction on the token value and sends the result to the token output function 23C. The token output function 23C substitutes the calculation result for the token value and places the token on the output arc of the node that fired the token.
(Control command execution means 30C)
The control instruction decode function 31 identifies the instruction of the control node and sends it to the corresponding instruction execution function. In the instruction execution function, control is performed according to a given node type. There are the following types of control nodes.
[0011]
(Distribution node (D) 32C) 1 input n output node. Delete the token on the input arc and place the token with the copied value on all output arcs.
[0012]
(Branch node (SW) 33) A node with two inputs and two outputs. When the value of the token on the second input arc is true, the token on the first input arc is placed on the first output arc. If false, place the token on the first input arc on the second output arc.
[0013]
(Procedure call node (CALL) 34A) This is a node with two inputs and one output. The token on the second input arc is copied, the procedure start node of the function is obtained from the function name stored as the value of the token on the first input talk, and placed on the first input arc of that node. In addition, a token having a value corresponding to the name of the output arc is generated. A procedure return node of the function is obtained from the function name stored as the token value on the first input arc, and the generated token is placed on the first input arc of the node. Erase the token on the input arc.
[0014]
(Procedure start node (ENTRY) 36) This is a node with one input and one output. Place a copy of the token on the input arc on the output arc. Erase the token on the input arc.
[0015]
(Procedure return node (RETURN) 35C) This is a node with 2 inputs and 0 outputs. Copy the value on the second input arc to generate a token. As the token value on the first input arc, the generated token is placed in the designated arc.
[0016]
FIG. 6 shows an execution example. In the figure, a black circle represents a token, a white circle node represents an operation node, and a white circle and cross node represent a distribution node. A shaded node represents a node that has finished execution. The operation will be described by paying attention to the bold line nodes in the figure.
[0017]
1. The token arrival monitoring function 12 does not ignite the thick line node because the tokens are not aligned on the input arc (FIGS. 6 (1) to (3)).
[0018]
2. After the tokens are arranged on the input arc (FIG. 6 (4)), the token arrival monitoring function 12 fires the node.
[0019]
3. The node classification function 13 identifies the fired node as an operation node, and sends a control signal to the operation instruction execution means 20C.
[0020]
4). The input token processing function 21A removes tokens on the input arc.
[0021]
5). Calculation is performed by the calculation execution function 22.
[0022]
6). The token output function 23 places a token on the output arc (FIG. 6 (5)).
[0023]
By executing as described above, the entire graph is executed.
[0024]
Request driven execution control device:
The request driving execution control device selects only the node on the route to the designated node and performs calculation. This execution control apparatus performs processing on all the nodes of the data flow graph by the following method.
[0025]
1. (A) The node is made to wait until a request signal (demand) arrives on the output arc.
[0026]
(B) After the demand reaches the output arc, the demand is output to the input arc.
[0027]
(C) The node waits until the token reaches all input arcs.
[0028]
2. After the tokens are aligned on the input arc, fire the node. At this time, the token on the input arc is removed.
[0029]
3. The calculation result is output to the output arc.
[0030]
FIG. 7 shows an execution example. In the figure, a white circle node represents an operation node, a white circle and cross node represent a distribution node, a black circle represents a token, and a circle with right-bottom eight hatching represents a demand. Also, the nodes with left-down hatching indicate the nodes that have received demand, and the shaded nodes indicate the nodes that have fired. When each node is executed individually as described above, the operation of the entire graph is as follows.
[0031]
1. The demand is propagated from the designated node to the input side from the output side of each node on the graph (FIG. 7 (1) to (5)).
[0032]
2. When all demands have propagated to the start node, a token is sent from the start node to the output arc (FIG. 7 (6)).
[0033]
3. Data driven execution is performed on a subgraph composed of nodes that have received demand (FIGS. 7 (7) to (10)).
[0034]
As described above, only the node receiving the demand is selectively executed.
[0035]
Colored token method:
In a data flow computer, there is a colored token method as a multiple execution method under a multiple execution environment. A tag called color is attached to the token, and a color is set for each execution environment. The execution control by the colored token method is realized by changing the items 1, 2 and 3 of the data drive execution control device and the items 1 (c), 2 and 3 of the request drive execution control device as follows.
[0036]
1. The node is made to wait until tokens of the same color arrive on all input arcs (the same applies to 1 (c)).
[0037]
2. After the tokens with the same color are aligned on the input arc, the node is fired. At this time, tokens having the same color on the input arc are removed.
[0038]
3. The result is output to the output arc. At this time, the token color on the input arc is copied and output.
[0039]
Using the above execution method, one graph can be executed in parallel under a plurality of execution environments (by color) without affecting each other.
[0040]
FIG. 8 shows a configuration example of an execution control apparatus using a conventional colored token method. The function of each means in FIG. 8 will be described below.
(Ignition control means 10D)
The colored token arrival monitoring function 16 detects and fires a node having tokens of the same color on all input arcs. The node classification function 13 classifies the fired node into an operation node and a control node, and sends a control signal to the corresponding instruction execution means. (Calculation instruction execution means 20D)
The input token processing function 21B deletes all tokens having the same color on the input arc of the fired node, and sends the token value to the calculation execution function 22. The operation execution function 22 performs the operation given by the operation instruction on the token value, and sends the result to the token output function 23D. The token output function 23D substitutes the calculation result for the token value, copies the erased token color from the input arc, and places the token on the output arc.
(Control command execution means 30D)
The control instruction decode function 31 identifies the instruction of the control node and sends it to the corresponding instruction execution function. In the instruction execution function, control is performed according to a given node type. There are the following types of control nodes.
[0041]
(Distribution node (D) 32B) 1 input n output node. Erasing tokens on the input arc and placing tokens with copied values and colors on all output arcs.
[0042]
(Branch node (SW) 33) A node with two inputs and two outputs. When the value of the token on the second input arc is true, the token on the first input arc is placed on the first output arc. If false, place the token on the first input arc on the second output arc.
[0043]
(Procedure call node (CALL) 34C) is a node with two inputs and one output. When firing, find the color that is not used by any token on the data flow graph. A token is generated based on the token value on the second input arc and the newly generated color. The function name is obtained from the token value on the first input arc, and the generated token is placed on the first input arc of the procedure start node. In addition, a token with the generated color is generated using a pair of the color of the token on the input arc and the name of the output arc as a value. The procedure return node of the function is obtained from the function name stored as the value of the token on the first input arc, and the generated token is placed on the first input arc of that node. Erase the token on the input arc.
[0044]
(Procedure start node (ENTRY) 36) This is a node with one input and one output. Place a copy of the token on the input arc on the output arc. Erase the token on the input arc.
[0045]
(Procedure return node (RETURN) 35D) This is a node with 2 inputs and 0 outputs. The color before the procedure call is obtained from the token on the first input arc, and the value on the second input arc is copied to generate a token. Place the generated token in the arc specified as the value of the token on the first input arc.
[0046]
An actual execution example is shown in FIG. In the figure, black circles (K, a) represent tokens of value K color a. Here, an execution example is shown with attention paid to one node.
[0047]
1. The colored token arrival monitoring function 16 detects that tokens of the same color (i) are arranged on all the input arcs, and fires the node (FIG. 9 (3)).
[0048]
2. The node classification function 13 identifies the fired node as an operation node, and sends a control signal to the operation command means 20D.
[0049]
3. The input token processing function 21B removes the token of color (i) on the input arc.
[0050]
4). The calculation execution function performs calculation 22.
[0051]
5). The token output function 23D outputs a token having the same color (i) to the output arc (FIG. 9 (4)).
[0052]
[Problems to be solved by the invention]
For example, in an educational support program, you may want to give more problems to learners who do not have basic knowledge, and let learners who have more basic knowledge select some of those problems. . Here, the difference in basic knowledge is regarded as a difference in level, and it is assumed that the more basic knowledge there is, the higher the level.
[0053]
High level learners do not need much basic knowledge. In contrast, learners with lower levels must acquire basic knowledge with more problems. In other words, it is considered that a problem for a learner at a low level is prepared by adding a problem for acquiring basic knowledge required by a learner at a low level to a problem required by a learner at a high level. In such a case, the problem that is required by a high-level learner is a subset of the problems that are required by a low-level learner.
[0054]
Here, let us consider expressing a problem presentation program in which a function for presenting a certain problem is a node and the order of presentation is an arc. When problem presentations corresponding to a plurality of levels are performed, if a function for selectively executing each node is given for each level, one problem presentation program may be created and shared at each level. If there is no such function, a separate program must be created for each level. As described above, when a program is created for each level, when a program corresponding to a certain level is corrected, the same correction must be made to a program below that level. At this time, when the common part is corrected, the number of programs to be corrected further increases. In order to solve such a problem, a function for selectively executing a node for each level is required.
[0055]
As a method for realizing a function of selectively executing a node for each level, a method using a conditional branch is conceivable. That is, by adding a branch program in front of the node and sending only tokens that satisfy the condition to the node, the node can be selectively executed according to the level. In this method, a branch program must be assigned to all nodes. Therefore, there is a problem that the branch program needs to be corrected when the problem presentation level is changed. As described above, in the method using the conditional branch, when the program is created / modified, it is necessary to create / modify a location related to the conditional branch, which increases the burden on the program creator. In order to solve such a problem, the data flow computer needs to have a function of selectively executing a node for each level.
[0056]
In the data driven execution control device, execution is advanced by firing when tokens are arranged on the input arc. In this apparatus, means for selecting an execution path is provided by a branch instruction and a procedure call instruction. In the request drive execution control device, in addition to the selection based on the above command, the demand can be propagated, and the node to which the demand has reached can be selectively executed. However, these devices do not have a function of selectively firing a node according to the level.
[0057]
The colored token model is a technology that expresses the difference in execution environment by the color of the token, detects the difference in execution environment at the time of execution, and advances the execution by using the token of the same execution environment. This method is not a technique corresponding to the difference in level, and the token is executed for the entire graph or all the nodes to which the demand has been propagated according to the color of the token. Therefore, it does not have a function of selectively firing a node according to the level.
[0058]
An object of the present invention is to provide an execution control device for a data flow computer that selectively executes nodes according to levels.
[0059]
[Means for Solving the Problems]
  The execution control device of the data flow computer of the present invention is
  A node with a numerical value called the environmental level,Express a program with a data flow graph composed of arcs that connect nodes,Token with a numerical value called execution environment levelIn the execution control device of the data flow computer that executes the calculation by updating the value of the value based on the data flow graph,
  Token propagates along the path on the data flow graphDoThe arrival of the token at the input arc is monitored, and a token having the specified execution environment level is received from a node having the environment level equal to or higher than the execution environment level.Node X connected by arcWhen all the input arcs heading toNode X concernedFiring control means for identifying a command associated with
  ConcernedNode XIs determined to be an operation instruction by the firing control means, an operation is performed by inputting the arrived token, the operation result is substituted into a token value, and the token is stored in an environment higher than the execution environment level of the token. Arithmetic instruction execution means for propagating on an output arc toward a node having a level;
  ConcernedNode XIs identified as a control command by the ignition control means,Node XAnd a control instruction execution means for changing the path of the token that has arrived in accordance with the contents of the instruction and propagating the token on an output arc toward a node having the environment level equal to or higher than the execution environment level of the token.
[0060]
[Action]
The present invention is characterized in that an execution control device of a data flow computer has an environment-dependent firing function and an environment-dependent distribution function.
[0061]
The environment-dependent firing function means that when a token having a certain execution environment level m reaches a node n, all input arcs (referred to as environment input arcs) from the node having the environment level of m or higher to the node n are called. This is a function for igniting node n when tokens of execution environment level m are prepared. The environment-dependent distribution function is a function for outputting a token on all output arcs (referred to as environment output arcs) directed to nodes having an environment level equal to or higher than the token execution environment level.
[0062]
The environment-dependent firing function causes a node to wait until all tokens are arranged on all environment input arcs, and fires a node after tokens are arranged on all environment input arcs. The environment-dependent distribution function is a function for outputting a token giving an execution environment level on all environment output arcs. Therefore, when a certain execution environment level m is given to a token and program execution is started, the token is propagated only between nodes having an environment level of m or higher and only nodes having an environment level of m or higher are executed. Can do.
[0063]
【Example】
Next, embodiments of the present invention will be described with reference to the drawings.
[0064]
Let N be the set of nodes. For node n, tag (n) is assigned as the environment level. Further, the execution environment level m is assigned to the token. Tag the environment level of the node connected before the i-th input arc of node nin(N, i), tag the environmental level of the node connected to the tip of the j-th output arc of node nout (N, j). At this time, m ≦ taginThe arc extending from the node having the environment level satisfying (n, i) to the node n is the environment input arc of the node n, and m ≦ tag from the node n.out An arc extending to a node having an environment level that satisfies (n, j) is an environment output arc.
[0065]
FIG. 1 is a block diagram showing a configuration of a data driven execution control apparatus having an environment dependent firing function and an environment dependent distribution function. Each function is described below.
(Ignition control means 10A)
The input arc selection function 10 selects an input arc having a node having an environment level equal to or higher than the token execution environment level as an environment input arc from the node input arc. The token arrival monitoring function 12 detects and fires a node on which all tokens are arranged on all environment input arcs. The node classification function 13 classifies the fired node into an operation node and a control node, and sends a control signal to the corresponding instruction execution means.
(Calculation instruction execution means 20A)
The input token processing function 21A erases all tokens on the environment input arc of the fired node, and sends the token value to the operation execution function 22. The calculation execution function 22 performs a given calculation on the token value and sends the result to the token output function 23. The token output function 23A substitutes the calculation result for the token value, and places the token given the execution environment level on the environment output arc.
(Control command execution means 30A)
The control instruction decode function 31 identifies the instruction of the control node and sends it to the corresponding instruction execution function. In the instruction execution function, control is performed according to a given node type. There are the following types of control nodes.
[0066]
(Distribution node (D) 32A) 1 input n output node. Delete the token on the input arc, and place the token with the copied value and execution environment level on all environment output arcs.
[0067]
(Branch node (SW) 33) A node with two inputs and two outputs. When the value of the token on the second input arc is true, the token on the first input arc is placed on the first output arc. If false, place the token on the first input arc on the second output arc.
[0068]
(Procedure call node (CALL) 34A) This is a node with two inputs and one output. The token on the second input arc is copied, the procedure start node of the function is obtained from the function name stored as the value of the token on the first input arc, and placed on the first input arc. In addition, a token having a value corresponding to the name of the output arc is generated. The procedure return node of the function is obtained from the function name stored as the value of the token on the first input arc, and the generated token is placed on the first input arc of that node. Erase the token on the input arc.
[0069]
(Procedure start node (ENTRY) 36) This is a node with one input and one output. Place a copy of the token on the input arc on the output arc. Erase the token on the input arc.
[0070]
(Procedure return node (RETURN) 35A) 2 input 0 output node. A token is generated by copying the value of the token on the second input arc and the execution environment level. Place the generated token in the arc designated as the token on the first input arc.
[0071]
FIG. 2 shows an execution example. T1, t2, t3 (t1 <t2 <t3) are used as the environmental level. In the figure, a black circle represents a token, a white circle node represents an operation node, and a white circle and cross node represent a distribution node. A shaded node represents a node that has been executed. The number at the upper left of the node represents the node number, and the number at the upper right represents the environmental level. An arc extending from node x to y is expressed as x → y. The arc numbers are 1, 2, ... from the left.
[0072]
Here, the operation will be described in the case where the token of the execution environment level t2 is propagated. First, paying attention to the node 4, the operation will be described.
[0073]
1. At i = 2, 3, t2 ≦ tagin(4, i). Therefore, the input arc selection function 11 identifies the arcs 2 → 4, 3 → 4 as environment input arcs.
[0074]
2. When tokens are aligned on these environmental input arcs (FIG. 2 (2)), the node 4 is fired.
[0075]
3. The node classification function 13 identifies the node 4 as an operation node and sends a control signal to the operation instruction execution means 20A.
[0076]
4). Thereafter, the input token processing function 21A removes the token on the input arc.
[0077]
5). The calculation execution function 22 performs calculation.
[0078]
6). Finally, the token output function 23A has t2 ≦ tagout 4 → 5 from (4, 1) is determined as an environment output arc, and a token of execution environment level t2 is output (FIG. 2 (3)).
[0079]
Next, attention is paid to the node 5.
[0080]
1. The input arc selection function 11 is t2 ≦ taginFrom (5, 1), it is determined that arc 4 → 5 is an environmental input arc. Since the tokens are arranged on the environment input arc, the node 5 is fired.
[0081]
2. The node classification function 13 sends a control signal to the control instruction execution means 30A, and the control instruction decode function 31 determines that it is a distribution node.
[0082]
3. At j = 1, 2, t2 ≦ tagout (5, j) is satisfied. Therefore, the distribution node determines that arcs 5 → 6, 5 → 7 are environment output arcs, and outputs a token of execution environment level t2 on these arcs (FIG. 2 (4)).
[0083]
As described above, the data driven execution control device having the environment dependent firing function and the environment dependent distribution function executes.
[0084]
Example of request-driven execution control device:
Demand propagation is the same as in [Prior Art]. A partial graph composed of the node to which the demand is propagated and its input arc is defined as a data flow graph to be executed. This graph is executed by a data driven execution control device having an environment dependent firing function and an environment dependent distribution function.
[0085]
Application to data-driven execution controller by colored token method:
FIG. 3 is a block diagram illustrating a configuration of a data driven execution control device (colored token method) having an environment dependent firing device and an environment dependent distribution function. Each function is described below.
(Ignition control means 10B)
The firing control means 10B performs the following processing for each node.
[0086]
1. The color detection function 14 detects all colors of tokens on the input arc.
[0087]
2. The color-specific input arc selection function 15 selects an unprocessed color among the colors detected by the color detection function 14. Next, an input arc having a node having an environment level equal to or higher than the execution environment level of the selected token is selected as the environment input arc from the input arcs of the nodes.
[0088]
3. The token arrival monitoring function 12 detects and fires a node having tokens having the same color as the selected color on all environment input arcs. If ignition is not performed and there is an unprocessed color among the colors detected by the color detection function 14, the process returns to 1.
[0089]
4). The node classification function 13 classifies the fired node into an operation node and a control node, and sends a control signal to the corresponding instruction execution means. If there is an unprocessed color among the colors detected by the color detection function 14, the process returns to 1.
(Calculation instruction execution means 20B)
The input token processing function 21B deletes all tokens having the same color on the environment input arc of the fired node, and sends the token value to the operation execution function 22. The operation execution function 22 performs the given operation on the token value and sends the result to the token output function 23B. The token output function 23B substitutes the calculation result for the token value, and places the token given the erased token color and execution environment level on the environment output arc.
(Control command execution means 30B)
The control instruction decode function 31 identifies the instruction of the control node and sends it to the corresponding instruction execution function. In the instruction execution function, control is performed according to a given node type. There are the following types of control nodes.
[0090]
(Distribution node (D) 32B) 1 input n output node. Delete the tokens on the input arc, and place all the tokens whose values, colors, and execution environment levels are copied onto the environment output arc.
[0091]
(Branch node (SW) 33) A node with two inputs and two outputs. When the value of the token on the second input arc is true, the token on the first input arc is placed on the first output arc. If false, place the token on the first input arc on the second output arc.
[0092]
(Procedure call node (CALL) 34B) This is a 2-input 1-output node. When firing, find the color that is not used by any token on the data flow graph. A token is generated based on the token value on the second input arc, the execution environment level, and the newly generated color. The function name is obtained from the token value on the first input arc, and the generated token is placed on the first input arc of the procedure start node. Also, a token is generated based on an execution environment level and a newly generated color, with a pair of the name of the token color on the input arc and the name of the output arc as a value. The procedure return node of the function is obtained from the function name stored as the value of the token on the first input arc, and the generated token is placed on the first input arc of that node. Erase the token on the input arc.
[0093]
(Procedure start node (ENTRY) 36) This is a node with one input and one output. Place a copy of the token on the input arc on the output arc. Erase the token on the input arc.
[0094]
(Procedure return node (RETURN) 35B) This is a node with 2 inputs and 0 outputs. The color before the procedure call is obtained from the token on the first input arc, and the token value on the second input arc and the execution environment level are copied to generate a token. Place the generated token in the arc specified as the value of the token on the first input arc.
[0095]
FIG. 4 shows an execution example. As environmental levels, t1, t2, and t3 (t1 <t2 <t3) are used. The number at the upper left of the node represents the node number, and the number at the upper right represents the environmental level. The black circle token has the color a and is given t1 as the execution environment level. The black square token has the color b and is given t2 as the execution environment level. White circle nodes represent calculation nodes, and white circle cross nodes represent distribution nodes. An arc extending from node x to y is expressed as x → y. The arc numbers are 1, 2, ... from the left. First, the operation will be described by paying attention to the node 4.
[0096]
1. The color detection function 14 detects the presence of colors a and b.
[0097]
2. The color-specific input arc selection function 15 first knows that the execution environment level is t1 from the tag of the token of color a. In node 4, at i = 1, 2, 3, t1 ≦ tagin(4, i). Accordingly, the color-specific input arc selection function 15 determines that arcs 1 → 4, 2 → 4, 3 → 4 are environment input arcs.
[0098]
3. The token arrival monitoring function 12 does not fire the node 4 yet because the tokens of the color a are not prepared on the environment input arc (FIG. 4 (1)).
[0099]
4). Next, the color-specific input arc selection function 15 knows that the execution environment level is t2 from the tag of the token of color b. At i = 2, 3, t2 ≦ tagin(4, i). Therefore, the color-specific input arc selection function 15 determines arcs 2 → 4 and 3 → 4 as environment input arcs.
[0100]
5). The token arrival monitoring function 12 fires the node 4 because the tokens of the color b are arranged on the environment input arc (FIG. 4 (1)).
[0101]
6). The node classification function 13 identifies the node 4 as an operation node and sends a control signal to the operation instruction execution means 20B.
[0102]
7). The input token processing function 21B removes the token of color b on the environmental input arc.
[0103]
8). The calculation execution function 22 performs calculation.
[0104]
9. The token output function 23B is t2 ≦ tagout From (4, 1), it is determined that arc 4 → 5 is an environment output arc, the color of the input token is copied, and a token having execution environment level t2 is output to arc 4 → 5 (FIG. 4 (2)).
[0105]
Next, attention is paid to the node 5.
[0106]
1. The color detection function 14 detects the presence of the color b.
[0107]
2. The color-specific input arc selection function 15 knows that the execution environment level is t2 from the tag of the token of color b. t2 ≦ taginSince (5, 1) is satisfied, the color-specific input arc selection function 15 determines that the arc 4 → 5 is an environmental input arc.
[0108]
3. The color-specific input arc selection function 15 fires the node 5 because the tokens of the color b are arranged on the environment input arc (FIG. 4 (2)).
[0109]
4). The node classification function 13 sends a control signal to the control command execution means 30B. The control instruction decode function 31 determines this node as a distribution node.
[0110]
5). At j = 1, t2 ≦ tagout Since (5, j), the distribution node determines that arcs 5 → 6, 5 → 7 are environmental output arcs. The token having the execution environment level t2 copied by copying the color of the input token is output on these environment output arcs ((3) in FIG. 4).
[0111]
As described above, the data driven execution control device (using the colored token model) having the environment dependent firing function and the environment dependent distribution function executes.
[0112]
Example of request-driven execution control method with colored token model:
Demand propagation is the same as in [Prior Art]. A partial graph composed of the node to which the demand is propagated and its input arc is defined as a data flow graph to be executed. This partial graph is executed by a data driven execution control device (using a colored token model) having an environment dependent firing function and an environment dependent distribution function.
[0113]
【The invention's effect】
As described above, the present invention gives an execution environment level to a token and an environment level to a node, and the execution control device has an environment-dependent firing function and an environment-dependent distribution function. Even if the calculation is performed at the same time shared at the environmental level, there is an effect that only the minimum necessary calculation corresponding to each environmental level can be performed independently of each other.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration example of a data driven execution control apparatus having an environment dependent firing function and an environment dependent distribution function.
FIG. 2 is a diagram illustrating an example of calculation path control using an environmental level.
FIG. 3 is a block diagram showing a configuration example (colored token method) of a data driven execution control device having an environment dependent firing function and an environment dependent distribution function.
FIG. 4 is a diagram illustrating an example of firing control according to an environmental level in a colored token scheme.
FIG. 5 is a diagram illustrating a configuration example of a conventional data drive execution control device.
FIG. 6 is a diagram illustrating an example of data driving execution.
FIG. 7 is a diagram illustrating an example of request drive execution.
FIG. 8 is a block diagram showing a configuration example (colored token) of a conventional data driven execution device.
FIG. 9 is a diagram illustrating an example of firing by a colored token.
[Explanation of symbols]
10A, 10B, 10C, 10D Ignition control means
20A, 20B, 20C, 20D arithmetic instruction execution means
30A, 30B, 30C, 30D Control command execution means
11 Input arc selection function
12 Token arrival monitoring function
13 Node classification function
14 color detection function
15 Input arc selection function for each color
16 Colored token arrival monitoring function
21A, 21B Input token processing function
22 Calculation execution function
23A, 23B, 23C, 23D Token output function
31 Control instruction decode function
32A, 32B, 32C Distribution node (D)
33 Distribution node (SW)
34A, 34B, 34C Procedure call node (CALL)
35A, 35B, 35C, 35D Procedure return node (RETURN)
36 Procedure Start Node (ENTRY)

Claims (1)

環境レベルと呼ぶ数値が付与されたノードと、ノード間を結合するアークとで構成されたデータフローグラフでプログラムを表現し、実行環境レベルと呼ぶ数値が付与されたトークンの値を前記データフローグラフに基づき更新していくことにより計算を実行するデータフロー計算機の実行制御装置において、
トークンが前記データフローグラフ上の経路に沿って伝播する途中でトークンの入力アークへの到着を監視し、指定された前記実行環境レベルを持つトークンが、該実行環境レベル以上の前記環境レベルを持つノードからアークで連結されたノードXへ向かう全ての入力アーク上に揃うと、当該ノードXに対応づけられた命令を識別する発火制御手段と、
当該ノードXが前記発火制御手段で演算命令と識別された場合、到着したトークンを入力して演算を行い、該演算結果をトークンの値に代入し、該トークンを、該トークンの前記実行環境レベル以上の環境レベルを持つノードに向かう出力アーク上に伝播させる演算命令実行手段と、
当該ノードXが前記発火制御手段で制御命令と識別された場合、当該ノードXの命令内容に従って到着したトークンの経路を変更し、該トークンを、該トークンの前記実行環境レベル以上の前記環境レベルを持つノードに向かう出力アーク上に伝播させる制御命令実行手段を有する、
データフロー計算機の実行制御装置。
A program is represented by a data flow graph composed of nodes assigned with numerical values called environment levels and arcs connecting between the nodes, and the values of tokens assigned numerical values called execution environment levels are expressed in the data flow graph. In the execution control device of the data flow computer that executes the calculation by updating based on
Token monitoring the arrival of the input arcs of the middle tokens propagating along a path on the data flow graph, the token with the specified said execution environment level, with the environmental level above said execution environment level Firing control means for identifying an instruction associated with the node X when all the input arcs from the node toward the node X connected by the arc are aligned;
If the node X is identified as an operation instruction by the firing control means, an incoming token is input to perform an operation, the operation result is substituted into a token value, and the token is set to the execution environment level of the token. Arithmetic instruction execution means for propagating on the output arc toward the node having the above environmental level,
When the node X is identified as a control command by the firing control means, the path of the token that has arrived is changed according to the command content of the node X , and the token is set to the environment level equal to or higher than the execution environment level of the token. Having control command execution means for propagating on the output arc toward the node with
Data flow computer execution control device.
JP15384193A 1993-06-24 1993-06-24 Data flow computer execution control device Expired - Fee Related JP3732530B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP15384193A JP3732530B2 (en) 1993-06-24 1993-06-24 Data flow computer execution control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP15384193A JP3732530B2 (en) 1993-06-24 1993-06-24 Data flow computer execution control device

Publications (2)

Publication Number Publication Date
JPH0713958A JPH0713958A (en) 1995-01-17
JP3732530B2 true JP3732530B2 (en) 2006-01-05

Family

ID=15571274

Family Applications (1)

Application Number Title Priority Date Filing Date
JP15384193A Expired - Fee Related JP3732530B2 (en) 1993-06-24 1993-06-24 Data flow computer execution control device

Country Status (1)

Country Link
JP (1) JP3732530B2 (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
AU2008302144B2 (en) 2007-09-20 2014-09-11 Ab Initio Technology Llc Managing data flows in graph-based computations
WO2009131007A1 (en) 2008-04-22 2009-10-29 日本電気株式会社 Simd parallel computer system, simd parallel computing method, and control program
JP5599987B2 (en) 2009-06-12 2014-10-01 スパンション エルエルシー Auxiliary PE for multiplexing and semiconductor integrated circuit
JP5904525B2 (en) * 2011-06-24 2016-04-13 国立研究開発法人情報通信研究機構 Logical reasoning system and logic reasoning method
JP7207316B2 (en) * 2017-09-26 2023-01-18 ソニーグループ株式会社 Information processing device, autonomous mobile device, method, and program

Also Published As

Publication number Publication date
JPH0713958A (en) 1995-01-17

Similar Documents

Publication Publication Date Title
JP2772604B2 (en) Data processing system
JPH08329036A (en) Data-driven type information processor
JPH07319677A (en) Method and apparatus for creation of flowchart by using programmed computer for automatic generation of structured program
JP3732530B2 (en) Data flow computer execution control device
JPH06124352A (en) Data driven type information processor
Till et al. Teach yourself Perl 5 in 21 days
US20170277519A1 (en) Method, mobile device and system for creating new mobile application by fusing existing program stacks
JP2001282765A (en) Self-synchronized transfer control circuit and data- driven information processor using the same
JPS6081641A (en) Tracing device of register
KR940022302A (en) Dynamic Information Processing System and Method
JPH0981540A (en) Data driven information processor
JPH11272645A (en) Information processor of data driving type
JP2927634B2 (en) Memory interface device
US5226110A (en) Parallel inferencing method and apparatus for rule-based expert systems
JP3635667B2 (en) Data flow graph verification device
US5542080A (en) Method for controlling execution of data driven type information processor
JP2001005678A (en) Device and method for network type information processing
JPH06139220A (en) Neuro computer
JPH0644389A (en) Data driving information processor
JP2579185B2 (en) Data flow program execution control method
JP2748404B2 (en) Binary data memory
JP2520481B2 (en) Data detection circuit and copy method in data flow computer
JPH07200530A (en) Simulation method
JPH1185506A (en) Data processor having plural condition code processing function
JP2014017019A (en) Data processor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20050316

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20050513

A911 Transfer of reconsideration by examiner before appeal (zenchi)

Free format text: JAPANESE INTERMEDIATE CODE: A911

Effective date: 20050606

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: 20051011

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20051013

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091021

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101021

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101021

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111021

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111021

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121021

Year of fee payment: 7

LAPS Cancellation because of no payment of annual fees