JPH04100104A - Execution order automatic determining system for data flow diagram type program - Google Patents
Execution order automatic determining system for data flow diagram type programInfo
- Publication number
- JPH04100104A JPH04100104A JP17071890A JP17071890A JPH04100104A JP H04100104 A JPH04100104 A JP H04100104A JP 17071890 A JP17071890 A JP 17071890A JP 17071890 A JP17071890 A JP 17071890A JP H04100104 A JPH04100104 A JP H04100104A
- Authority
- JP
- Japan
- Prior art keywords
- execution order
- stack
- elements
- data flow
- flow diagram
- 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
Landscapes
- Stored Programmes (AREA)
- Control By Computers (AREA)
- Programmable Controllers (AREA)
Abstract
Description
【発明の詳細な説明】
〔産業上の利用分野〕
本発明は、鉄鋼プラント、化学プラント、製紙プラント
、等の製造現場に設置されるコントローラに関し、特に
そのコントローラのデータフロー図形式のプログラムの
中にある制御や演算を行う素子の実行順序を、自動的に
決定する方式に関するものである。[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a controller installed at a manufacturing site such as a steel plant, a chemical plant, a paper manufacturing plant, etc. This relates to a method for automatically determining the execution order of elements that perform control and calculations.
データフロー図形式のプログラムを使用した技術として
は、本出願人が先に提案した特願平1−193182や
、特願平1−219886がある。Techniques using programs in data flow diagram format include Japanese Patent Application No. 1-193182 and Japanese Patent Application No. 1-219886 previously proposed by the present applicant.
データフロー図形式のプログラム(以下、図面と呼ぶ)
を第8図に示す。Program in data flow diagram format (hereinafter referred to as drawing)
is shown in Figure 8.
第8図を参照すると、各四角形は制御や演算を行う素子
(以下、「素子」と呼ぶ)の象形である。Referring to FIG. 8, each square is a symbol of an element (hereinafter referred to as an "element") that performs control or calculation.
素子の中の数字は素子を識別するための番号(以下、「
素子番号」と呼ぶ)である。素子の上のカッコ内数字は
その素子の実行順番である。番号の小さい素子が先に実
行される。先端に矢印の付いた線は素子間でデータが流
れる経路を示す。線の始端は素子の出力端子であり、終
端は素子の入力端子である。上記のような図面において
は、一つの素子はその全ての入力端子のデータが確定し
ていなければ正しく動作することができない。つまり、
データフローの上流側(第8図では左側)の素子から順
番に実行させなければならない。The numbers inside the element are numbers for identifying the element (hereinafter referred to as "
(referred to as "element number"). The number in parentheses above an element is the execution order of that element. Elements with lower numbers are executed first. Lines with arrows at the ends indicate paths along which data flows between elements. The starting end of the line is the output terminal of the element, and the ending end is the input terminal of the element. In the drawings described above, one element cannot operate correctly unless data at all of its input terminals are determined. In other words,
The elements must be executed in order starting from the upstream side of the data flow (the left side in FIG. 8).
従来のデータフロー図形式のプログラムにおいては、素
子を表示装置などのプログラム作成画面(=図面)上で
生成し、それら素子の入出力端子間を線でつないだあと
、素子の実行順番(第8図におけるカッコ内数字)を人
が設定していた。In conventional data flow diagram format programs, elements are generated on a program creation screen (=drawing) such as a display device, the input and output terminals of these elements are connected with lines, and then the execution order of the elements (8th The numbers in parentheses in the figure) were set by a person.
〔発明が解決しようとしている課題〕
そのために、図面の中の素子の数が少ない場合はよいが
、図面の中の素子の数が多くなると、実行順番が重なっ
ていたり、先に実行させるべき素子をあとから実行させ
る等の間違いが起こりゃす(なる。[Problem to be solved by the invention] For this reason, it is fine if the number of elements in the drawing is small, but if the number of elements in the drawing increases, the execution order may overlap, or elements that should be executed first may be Mistakes such as having to execute it later can happen.
そこで、本発明は、上記のような間違いを防ぐために、
コントローラのアプリケーションプログラムを作成する
ためのエディタの中に、実行順序を自動的に設定するプ
ログラムを組み込むことによって、人手を介さずに実行
順序を設定できる方式を提供するものである。Therefore, in order to prevent the above-mentioned mistakes, the present invention has the following features:
By incorporating a program that automatically sets the execution order into an editor for creating a controller application program, a method is provided in which the execution order can be set without human intervention.
本発明は、データフロー図形式のプログラムに於いては
、素子はその入力端子に接続されている上流側の素子の
出力端子のデータが確定していないと、正しく動作する
ことができないという点に着目し、最も下流にある素子
から出発して、その素子が正しく動作するための前提と
なる」−流側の素子を探索し、その上流側の素子が見つ
かると、さらに前提となる一F流側の素子を探索すると
いうように、下流から上流に向かって動作すべき素子を
順次探索する。探索するときにはスタックを使用する。The present invention is directed to the point that in a data flow diagram format program, an element cannot operate correctly unless the data at the output terminal of an upstream element connected to its input terminal is determined. Starting from the most downstream element, it becomes a prerequisite for the correct operation of that element.'' - Search for the downstream element, and when the upstream element is found, the 1F flow, which is a prerequisite, is determined. The elements to be operated are sequentially searched from downstream to upstream, such as searching for elements on the side. Use the stack when exploring.
つまり実行順序が確定しない素子は、保留するために、
その素子番号をスタックにブシュしてゆく。やがて上流
端の素子に行き着き、スタックのトップには上流端の素
子の素子番号が残る。In other words, in order to suspend elements whose execution order is not determined,
Bush the element number onto the stack. Eventually, the device reaches the upstream end, and the device number of the upstream end device remains at the top of the stack.
このときスタックのなかには、下流端の素子から上流端
の素子に至る一本の経路が残されることになる。次にス
タックのトップの素子番号をポツプし、それを実行順序
を出力するためのバッフ了に移す。この処理を順次繰り
返すと、もとの下流端の素子までの実行順序が確定する
。この処理の途中で複数の入力端子を持つ素子があり、
確定していない経路があれば、そこから上流側への探索
を上記と同じ方法で行う。ただし、フィードバックルー
プを形成している素子が存在していないことを前提とす
る。At this time, one path is left in the stack from the element at the downstream end to the element at the upstream end. Next, pop the element number at the top of the stack and move it to the buffer that outputs the execution order. By sequentially repeating this process, the original execution order up to the downstream end element is determined. During this process, there is an element with multiple input terminals,
If there is a route that has not been determined, a search upstream from there is performed in the same manner as above. However, it is assumed that there are no elements forming a feedback loop.
上記の方法により、どんなに複雑なプログラムでも自動
的にかつ短時間に実行順序の自動設定が行われ、人手に
よる場合に比べてはるかにプログラムの信頼性と生産性
を向上させることが可能となる。With the above method, the execution order of any program, no matter how complex, can be automatically set in a short time, making it possible to improve the reliability and productivity of the program much more than when it is done manually.
以下、本発明の具体的実施例を説明する。 Hereinafter, specific examples of the present invention will be described.
第1図は、実行順序自動設定を実現するだめの機能ブロ
ック図の例である。第1図を参照すると、プログラム1
01は、素子間の結線状態を表す接続表(以後rLsI
Jと呼ぶ)102の内容を入力し、実行順序を求めたあ
と、それを実行順序出力バッファ(以後rLsOJ と
呼ぶ)1o3に出力する。FIG. 1 is an example of a functional block diagram for realizing automatic execution order setting. Referring to Figure 1, program 1
01 is a connection table (hereinafter referred to as rLsI) that represents the connection state between elements.
After inputting the contents of 102 (referred to as rLsOJ) and determining the execution order, it is output to an execution order output buffer (hereinafter referred to as rLsOJ) 1o3.
書込みポインタ(以後rOPJ と呼ぶ)1o4は実行
順序出力バッファ103内で素子番号がどこまで書き込
まれるているかを示すポインタである。A write pointer (hereinafter referred to as rOPJ) 1o4 is a pointer indicating how far into the execution order output buffer 103 the element number has been written.
実行順序を求める際はスタック(以後rSTK」と呼ぶ
)105を使用する。スタックポインタ(以後rSPI
と呼ぶ)106は、スタック105内で探索情報がど
こまで告き込まれているかを示すポインタである。When determining the execution order, a stack (hereinafter referred to as "rSTK") 105 is used. Stack pointer (hereinafter referred to as rSPI
) 106 is a pointer indicating how far in the stack 105 the search information has been pushed.
第2図は、第1図の中の接続表102の例である。この
表は第8図の素子間の接続関係を表で表したものである
。第2図を参照すると、表の一つの行は一つの素子の接
続関係をあられしている。FIG. 2 is an example of the connection table 102 in FIG. This table is a tabular representation of the connection relationships between the elements shown in FIG. Referring to FIG. 2, one row of the table shows the connection relationship of one element.
第1列201は素子番号を示す。第2列202は素子の
入力端子の数を示す。第3列以降203は、第1列の素
子が出力データを入力している相手の素子の素子番号(
以下「入力素子番号」と呼ぶ)を示す。なお、上流端素
子の入力素子番号は204と205のように0となって
いる。The first column 201 shows the element number. The second column 202 shows the number of input terminals of the element. From the third column onwards 203 is the element number (
(hereinafter referred to as "input element number"). Note that the input element numbers of the upstream end elements are 0, such as 204 and 205.
第3図は、第1図の中のプログラム101のアルゴリズ
ムを表したフローチャートである。以下、第3図の各処
理ステップの内容を説明する。FIG. 3 is a flowchart showing the algorithm of the program 101 in FIG. The contents of each processing step in FIG. 3 will be explained below.
(処理301)SPとOPを初期化する。(Process 301) Initialize SP and OP.
(処理302)下流端の素子の素子番号をSTKに格納
する。(Process 302) The element number of the element at the downstream end is stored in STK.
第4図に、第8図の場合にステップ302を実行した結
果を示す。FIG. 4 shows the result of executing step 302 in the case of FIG.
(処理303)STKが空であるかどうかを判断する。(Process 303) Determine whether STK is empty.
空ならば処理を終わる。空でなければ処理304に進む
。If it is empty, processing ends. If it is not empty, the process advances to step 304.
(処理304)STKのトップにある素子番号がOlつ
まり上流端素子の入力素子番号であれば処理307に進
む。そうでなければ処理305に進む。(Process 304) If the element number at the top of STK is Ol, that is, the input element number of the upstream end element, the process advances to process 307. Otherwise, the process advances to step 305.
(処理305)STKのトップにある素子番号がLSO
にすでに含まれているならば処理307に進む。そうで
なければ処理306に進む。(Process 305) The element number at the top of STK is LSO
If it is already included, the process advances to step 307. Otherwise, the process advances to step 306.
(処理!306)STKのトップにある素子の入力素子
番号をLSIから読み出し、STKに格納する。続いて
処理303に進む。第5図に、第8図の場合に処理80
6を実行した結果を示す。(Process! 306) Read the input element number of the element at the top of STK from the LSI and store it in STK. The process then proceeds to process 303. In FIG. 5, the process 80 in the case of FIG.
The results of executing step 6 are shown below.
(処理307)STKのトップから2番目に[:ノマー
クがあれば処理308に進む。そうでなければ処理31
1に進む。(Process 307) If there is a [: mark second from the top of the STK, the process advances to process 308. Otherwise, process 31
Go to 1.
(処理308)STKのトップから3番目にある素子番
号がすてにLSOに含まれているならば処理311に進
む。そうでなければ処理309に進む。(Process 308) If the third element number from the top of the STK is already included in the LSO, the process advances to process 311. Otherwise, the process advances to process 309.
(処理309)STKのトップから3番目にある素子番
号をLSOのトップに格納する。第6図に、第8図の場
合に処理309を実行した結果を示す。(Process 309) Store the third element number from the top of STK at the top of LSO. FIG. 6 shows the result of executing the process 309 in the case of FIG.
(処理310)LSOの書き込みポイントを1つ進める
。(Process 310) Advance the LSO write point by one.
(処理311)STKのトップとトップから2番目の内
容をSTKから排除する。(Process 311) The top of the STK and the second content from the top are excluded from the STK.
第4図は、第8図の処理302が実行された結果、ST
K内に生成される情報を示す。第4図を参照すると、4
01と403は下流端の素子の素子番号である。402
は2つの素子番号を区切るためのマーク(1)である。FIG. 4 shows that the ST
The information generated in K is shown. Referring to Figure 4, 4
01 and 403 are the element numbers of the elements at the downstream end. 402
is a mark (1) for separating two element numbers.
第5図は、第4図の状態から続いて、第S図の処理30
6が実行された結果、STK内に生成される情報を示す
。開始直後の処理経路は、処理301→処理302→処
理308→処理304→処理305→処理306、とな
る。第5図を参照すると、501はそれより右側がその
左側の素子の入力素子番号リストであることを示す記号
(=)である。502と504は入力素子番号である。FIG. 5 shows the process 30 of FIG. S following the state of FIG. 4.
6 shows the information generated in the STK as a result of execution. The processing path immediately after the start is process 301 → process 302 → process 308 → process 304 → process 305 → process 306. Referring to FIG. 5, 501 is a symbol (=) indicating that the right side is the input element number list of the element on the left side. 502 and 504 are input element numbers.
503は入力素子番号を区切るためのマーク(。503 is a mark (.) for separating input element numbers.
)である。).
第6図は、第3図の処理309が実行された結果、最初
に処理順序が確定した素子番号がLSOに書き込まれた
状態を示す。第6図を参照すると、601が第1番目に
実行される素子となる。FIG. 6 shows a state in which the element number whose processing order is determined first is written into the LSO as a result of executing the process 309 in FIG. Referring to FIG. 6, 601 is the first element to be executed.
第7図は、STKとLSOの内部状態の変化をトレース
することによって、実行順序が決定されるプロセスを表
現したものである。5TEPIがら始まって、5TEP
24で終わっている。FIG. 7 represents a process in which the execution order is determined by tracing changes in the internal states of STK and LSO. Starting from 5TEPI, 5TEP
It ends at 24.
以上説明したように本発明により、従来データフロー図
形式のプログラムにおいて、制御や演算を行う機能素子
の実行順序を人手によって設定していたために、プログ
ラムの作成に時間がかかり、またバグの発生をまねいて
いたものを、計算機によって短時間でかつ正確に実行順
序を決定することができるようになる。As explained above, according to the present invention, in conventional data flow diagram format programs, the execution order of functional elements that perform control and calculations is manually set, which takes time to create programs and reduces the occurrence of bugs. It becomes possible to quickly and accurately determine the order of execution using a computer.
第1図は実行順序を決定するプログラムのブロック図、
第2図は素子の接続状態を表す表の例を示す図、第3図
は実行順序を決tするプログラムの処理内容を表すフロ
ーチャートを示す図、第4図は実行順序の決定に先だっ
て最初にスタックに格納される情報例を示す図、第5図
は実行順序を探索している途中におけるスタックの状態
例を示す図、第6図は実行順序を探索している途中にお
ける実行順序出力バッファの状態例を示す図、第7図は
実行順序を探索するプロセスをスタックと実行順序出力
バッファの状態をトレースすることによって表現した例
でを示す図、第8図はデータフロー図形式のプログラム
の例を示す図である。
特許出願人 株式会社 安用電機製作所第
図
第4
好寸寸寸
(’J C匂 CJ (’J (’JcOCf)
If) Cf) ■(f) (0(j) c
c+ G。
Ll”)Llつ LI″l 躊uつ U)ばつUつL
i)ljつ りr−トトトr−r−t′−r−r−r’
−r−r−トcOののののa:lωωのののののの
コの■■の■■■■ののcnの■■Figure 1 is a block diagram of a program that determines the execution order.
Fig. 2 is a diagram showing an example of a table representing the connection state of elements, Fig. 3 is a flowchart showing the processing contents of a program that determines the execution order, and Fig. 4 is a diagram showing an example of a table representing the connection state of elements. Figure 5 shows an example of the information stored in the stack. Figure 5 shows an example of the state of the stack while searching for the execution order. Figure 6 shows the state of the execution order output buffer while searching for the execution order. Figure 7 is a diagram showing an example of a state. Figure 7 is a diagram showing an example of a process for searching the execution order expressed by tracing the status of the stack and execution order output buffer. Figure 8 is an example of a program in data flow diagram format. FIG. Patent applicant Anyo Electric Manufacturing Co., Ltd. Figure No. 4 Good size ('J ('JcOCf)
If) Cf) ■(f) (0(j) c
c+G. Ll") Lltsu LI"l hesitation U) BatsuUtsuL
i) lj tsuri r-tototori r-r-t'-r-r-r'
-r-r-t cO's nonono a: lωω's nononono's ■■'s ■■■■'s cn's ■■
Claims (1)
算を行う機能素子を生成し、それらの機能素子間の結線
が済んだあと、機能素子の実行順序を、 (1)最も下流にある素子から出発して、その素子が正
しく動作するための前提となる上流側の素子を探索し、 (2)実行順序が確定しない素子はその素子番号をスタ
ックに入れて保留し、 (3)上流端の素子に行き着いたときは、スタックのト
ップの素子番号をポップし、それを実行順序を出力する
ためのバッファに移し、 (4)前記(1)から(3)の処理を順次繰し、この処
理の途中で複数の入力端子を持つ素子があり、確定して
いない経路があれば、そこから上流側への探索を上記と
同じ方法で行い、もとの下流端の素子までの実行順序を
確定させる、 ことにより実行順序を決定することを特徴とするデータ
フロー図形式のプログラムにおける実行順序自動決定方
式。[Claims] In a program in data flow diagram format, after creating functional elements that perform control or calculations and completing the connections between these functional elements, the execution order of the functional elements is set to (1) the most downstream; Starting from a certain element, search for upstream elements that are a prerequisite for the correct operation of that element, (2) For elements whose execution order is not determined, the element number is placed in the stack and held, (3) When the element at the upstream end is reached, pop the element number at the top of the stack, move it to the buffer for outputting the execution order, and (4) repeat the processes from (1) to (3) above in sequence. During this process, if there is an element with multiple input terminals and there is an undefined path, search upstream from there using the same method as above and return to the original downstream element. An automatic execution order determination method for a program in a data flow diagram format, characterized by determining the execution order by determining the order.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17071890A JPH04100104A (en) | 1990-06-27 | 1990-06-27 | Execution order automatic determining system for data flow diagram type program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17071890A JPH04100104A (en) | 1990-06-27 | 1990-06-27 | Execution order automatic determining system for data flow diagram type program |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04100104A true JPH04100104A (en) | 1992-04-02 |
Family
ID=15910111
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17071890A Pending JPH04100104A (en) | 1990-06-27 | 1990-06-27 | Execution order automatic determining system for data flow diagram type program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04100104A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7150018B2 (en) * | 2000-02-16 | 2006-12-12 | Microsoft Corporation | Method and system for deterministic ordering of software modules |
-
1990
- 1990-06-27 JP JP17071890A patent/JPH04100104A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7150018B2 (en) * | 2000-02-16 | 2006-12-12 | Microsoft Corporation | Method and system for deterministic ordering of software modules |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP3599775B2 (en) | Finite state coding system for hyphenation rules | |
| KR950012209A (en) | Counterflow Pipeline Processor | |
| CN107590254B (en) | Big data support platform with merging processing method | |
| JPH04100104A (en) | Execution order automatic determining system for data flow diagram type program | |
| US20220269239A1 (en) | Information processing apparatus, control apparatus, control method, method of controlling control apparatus, and recording medium | |
| CN114185462B (en) | Control method and device based on AI and RPA system clone window | |
| JPH04242829A (en) | Program update processing device | |
| JP2820184B2 (en) | Load module unit test support device | |
| JPS61151753A (en) | Computer with guide function | |
| JP2013003729A (en) | Test case automatic generation system, test case automatic generation method, and test case automatic generation program | |
| JP2001343995A (en) | Voice input processing device, voice input processing method, and recording medium storing voice input processing program | |
| JP2601533B2 (en) | Data processing device | |
| JP5047457B2 (en) | Information processing system for improving productivity in system development | |
| JPH0573290A (en) | Program control method for interactive system | |
| JPH03212724A (en) | File format identification system for floppy disk processor | |
| CN114020275A (en) | Code compiling control method, device, medium and equipment for application program | |
| JPH07160536A (en) | Program test support device for interactive system | |
| JPS5846439A (en) | Program editing method of computer | |
| JPS62239241A (en) | Automatic evaluation method for interactive data processing program | |
| JPS60150108A (en) | Programmable controller contact information analysis system | |
| JPS58223825A (en) | Automatic output system of control sentence | |
| JPH01312641A (en) | Batch test system for on-line | |
| JPH03237492A (en) | Scroll system | |
| JP2010040016A (en) | Screen transition design support device and program | |
| JPH07191858A (en) | Simulation interpreter |