JPH0644231B2 - Production system interrupt processing method - Google Patents

Production system interrupt processing method

Info

Publication number
JPH0644231B2
JPH0644231B2 JP63254130A JP25413088A JPH0644231B2 JP H0644231 B2 JPH0644231 B2 JP H0644231B2 JP 63254130 A JP63254130 A JP 63254130A JP 25413088 A JP25413088 A JP 25413088A JP H0644231 B2 JPH0644231 B2 JP H0644231B2
Authority
JP
Japan
Prior art keywords
interrupt
inference
rule
data
interrupt processing
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 - Lifetime
Application number
JP63254130A
Other languages
Japanese (ja)
Other versions
JPH02100722A (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.)
Yaskawa Electric Corp
Original Assignee
Yaskawa Electric Corp
Yaskawa Electric Manufacturing Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yaskawa Electric Corp, Yaskawa Electric Manufacturing Co Ltd filed Critical Yaskawa Electric Corp
Priority to JP63254130A priority Critical patent/JPH0644231B2/en
Publication of JPH02100722A publication Critical patent/JPH02100722A/en
Publication of JPH0644231B2 publication Critical patent/JPH0644231B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はプロダクション・システムのインタラプト処理
方式に関する。
The present invention relates to an interrupt processing system for a production system.

〔従来の技術〕[Conventional technology]

プロダクション・システムは第7図に示すように,ワー
キング・メモリ,プロダクション・メモリ及び推論エン
ジンから構成される。ワーキング・メモリには推論用の
データであるワーキング・メモリ要素が格納され,プロ
ダクション・メモリにはIF−THEN形式のプロダク
ション・ルールが格納されている。ワーキング・メモリ
要素の例とプロダクション・ルールの例を第8図に示
す。
As shown in FIG. 7, the production system is composed of a working memory, a production memory and an inference engine. A working memory element, which is data for inference, is stored in the working memory, and an IF-THEN format production rule is stored in the production memory. An example of working memory elements and an example of production rules are shown in FIG.

推論エンジンはワーキング・メモリ内の要素とプロダク
ション・ルールの条件部とを照合し,条件部が満足され
ているルールを探しだす。これらの発火可能なルールは
複数存在しえるので,競合解消を行って(例えば特開昭
61−109148参照),最適なルールが選択され
る。そして,そのルールの実行部が実行される。この推
論エンジンのフローチャートを第9図に示す。
The inference engine compares the elements in the working memory with the conditional part of the production rule and finds a rule that satisfies the conditional part. Since there can be a plurality of rules that can be fired, conflicts are resolved (see, for example, Japanese Patent Laid-Open No. 61-109148), and the optimum rule is selected. Then, the execution part of the rule is executed. A flow chart of this inference engine is shown in FIG.

発火したルールの実行部はワーキング・メモリの内容を
変更するため,新たなルールが発火可能となる。このよ
うにしてルールの連鎖が生じ,推論が進められる。推論
エンジンは最終的な結論が得られるまで第9図に示す照
合−競合解消−実行のサイクルを繰り返す。
Since the execution unit of the fired rule changes the contents of the working memory, a new rule can be fired. In this way, a chain of rules occurs and inference proceeds. The inference engine repeats the matching-conflict resolution-execution cycle shown in FIG. 9 until a final conclusion is obtained.

推論期間中には,プロダクション・システム外部からの
データはルールの実行部に外部データ入力用の実行文を
記述することによってのみ可能である。この結果,推論
のルール連鎖の中で外部データが入力できるのは,外部
データを入力するルールが発火した時点に限られる。
During the inference period, data from outside the production system can be written only by writing an execution statement for external data input in the execution part of the rule. As a result, the external data can be input in the rule chain of inference only when the rule for inputting the external data is fired.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上述したように,従来の推論エンジンは外部からのデー
タあるいは信号は,それらを入力するためのルールが発
火しなければ受け付けられない。この結果,外部からの
データや信号が発生した時点で,インタラプト的にその
データに対する処理を行ったり,あるいは現在の推論を
変更したりすることは不可能である。推論は長時間に及
ぶことがあり,この間外部データによるインタラプト処
理は受け付けられない。これは実時間処理システムへプ
ロダクション・システムを応用する場合に大きな問題と
なる。また,外部の実時間データの変化によって,現在
の推論過程を修正することも困難である。
As described above, the conventional inference engine cannot accept data or signals from the outside unless the rule for inputting them fires. As a result, when data or a signal from the outside is generated, it is impossible to interruptly process the data or change the current inference. Inference can take a long time, and during this time, interrupt processing by external data cannot be accepted. This is a big problem when applying a production system to a real-time processing system. It is also difficult to correct the current reasoning process due to changes in external real-time data.

なお,特開昭63−47839には,ルールを階層化
し,解が得られない場合,すなわち内部要因によって,
他のルールセットを起動する技術が開示されているが,
外部要因によって割込処理が発生するものではない。
Incidentally, in Japanese Patent Laid-Open No. 63-47839, rules are hierarchized, and when a solution cannot be obtained, that is, due to internal factors,
Although the technology to activate other rule sets is disclosed,
Interrupt processing does not occur due to external factors.

本発明は推論エンジン部にインタラプト検出機能を持た
せ,非同期的な外部データや信号によって推論を中断し
たり,推論過程を修正する機能を付加することを目的と
する。
An object of the present invention is to provide an inference engine unit with an interrupt detection function, and to add a function of interrupting inference by an asynchronous external data or signal or correcting an inference process.

〔課題を解決するための手段〕[Means for Solving the Problems]

外部からのインタラプトを検出するため,第1図に示す
ようにインタラプト検出部を推論エンジンの実行部の後
に付け加える。インタラプト検出部のフローチャートを
第2図に示す。
In order to detect an interrupt from the outside, an interrupt detection unit is added after the execution unit of the inference engine as shown in FIG. A flowchart of the interrupt detection unit is shown in FIG.

〔作用〕[Action]

推論エンジンは照合−競合解消−実行の各サイクルの最
後にインタラプトの検出を行う。インタラプト許可フラ
ッグがTRUEであればシステムが持つ可能な外部入力
手段からのインタラプトの発生をテストし,もしインタ
ラプトが発生していれば,前もって規定されているイン
タラプト通知用のワーキング・メモリ要素を生成する。
そのワーキング・メモリ要素には,インタラプトを発生
している外部入力手段の名称等のインタラプト要因を示
す情報を書き込む。このとき,次回の推論サイクルで再
度同じインタラプトが検出されないようにインタラプト
許可フラッグがFALSEに設定される。
The inference engine detects interrupts at the end of each match-conflict resolution-execute cycle. If the interrupt permission flag is TRUE, test the occurrence of an interrupt from the possible external input means of the system, and if an interrupt occurs, generate a working memory element for interrupt notification that is specified in advance. .
In the working memory element, information indicating the interrupt factor such as the name of the external input means that is generating the interrupt is written. At this time, the interrupt permission flag is set to FALSE so that the same interrupt is not detected again in the next inference cycle.

次の推論サイクルではインタラプトに対応するワーキン
グ・メモリ要素が最新の要素となるため,このインタラ
プト要素を条件部に持つインタラプト処理ルールが競合
解消によって選択され実行される。このインタラプト処
理ルールが発火すると現在の推論は中断され,インタラ
プト処理の推論が開始される。インタラプト処理が終了
すると次のインタラプトを受け付けるために,インタラ
プト許可フラッグがTRUEに設定される。そして,イ
ンタラプトによって中断された推論が再開される。この
とき,再開された推論過程が参照するワーキング・メモ
リ要素をインタラプト処理ルール内で変更することによ
り,再開後の推論過程を修正することができる。
In the next inference cycle, the working memory element corresponding to the interrupt becomes the latest element, so the interrupt processing rule having this interrupt element in the condition part is selected and executed by conflict resolution. When this interrupt processing rule fires, the current inference is interrupted and the interrupt processing inference is started. When the interrupt processing is completed, the interrupt permission flag is set to TRUE in order to accept the next interrupt. Then, the inference interrupted by the interrupt is restarted. At this time, by changing the working memory element referenced by the restarted inference process in the interrupt processing rule, the restarted inference process can be corrected.

〔実施例〕〔Example〕

本発明の具体的な実施例として,外部端末からデータが
来た時点で即座にメッセージをその端末に表示するプロ
ダクション・システムの例を示す。このシステムは第4
図に示すように,comm1という通信ポートを介して
端末Aと接続されている。プロダクション・システム内
の推論エンジンはcomm1通信ポートをアクセスする
ことによって端末からのデータの有無やデータの入出力
を行うことができる。この例でのインタラプト検出部の
詳細なフローチャートを第5図に示す。
As a specific embodiment of the present invention, an example of a production system for immediately displaying a message on an external terminal when data comes from the external terminal will be shown. This system is the fourth
As shown in the figure, it is connected to the terminal A through a communication port called comm1. The inference engine in the production system can input / output data from / to the terminal by accessing the comm1 communication port. A detailed flow chart of the interrupt detector in this example is shown in FIG.

インタラプト検出部では,まず,現在の推論過程がイン
タラプト処理中でないことを,インタラプト許可フラッ
グによって調べる。インタラプト処理中でなければ,c
omm1ポートにデータが来ているか調べる。この例で
は,comm1ポートへのデータ入力がインタラプト信
号に対応する。comm1ポートにデータが来ていれば
インタラプトが発生したものとし,それに対応するイン
タラプト通知用のワーキング・メモリ要素(INTER
RUPT ^TYPE COMM1)を生成する。この
ワーキング・メモリ要素例では,INTERRUPTは
インタラプトの通知用の要素であることを示すクラス
名,^TYPEはインタラプトの要因を示す属性名,そ
してCOMM1はインタラプトを発生している通知ポー
ト名を示す^TYPEの属性値である。最後にインタラ
プト処理に入ったことを示すため,インタラプト許可フ
ラッグをFALSEにする。
In the interrupt detection unit, first, the interrupt permission flag is used to check that the current inference process is not in the process of interrupting. If interrupt processing is not in progress, c
Check if data is coming to the omm1 port. In this example, the data input to the comm1 port corresponds to the interrupt signal. If data comes to the comm1 port, it is assumed that an interrupt has occurred, and the corresponding working memory element (INTER) for notification of interrupts.
RUPT ^ TYPE COMM1). In this working memory element example, INTERRUPT is a class name indicating that it is an interrupt notification element, ^ TYPE is an attribute name indicating an interrupt factor, and COMM1 is a notification port name indicating an interrupt. It is an attribute value of TYPE. Finally, the interrupt permission flag is set to FALSE to indicate that the interrupt process is started.

インタラプト用ワーキング・メモリ要素が生成される
と,それに対応したインタラプト処理ルールが次の推論
サイクルで起動される。本実施例におけるインタラプト
処理ルールを第6図に示す。このルールはインタラプト
用ワーキング・メモリ要素(INTERRUPTty
pe COMM1)が生成されると即座に発火し,CO
MM1ポートからデータを読み込み,“INTERRU
PT ACCEPTED”というメッセージをCOMM
1ポートに出力する。端末には,文字を入力した瞬間,
上記メッセージが表示される。インタラプト処理ルール
はインタラプト処理の終了を示すためインタラプト用ワ
ーキング・メモリ要素を消去し,インタラプト許可フラ
ッグをTRUEにする。
When the working memory element for interrupt is generated, the interrupt processing rule corresponding to it is activated in the next inference cycle. FIG. 6 shows the interrupt processing rule in this embodiment. This rule defines the working memory element for interrupts (INTERRUPT ty).
When pe COMM1) is generated, it immediately ignites
Read the data from the MM1 port and click "INTERRU
COMM the message "PT ACCEPTED"
Output to 1 port. On the terminal, the moment you enter the characters,
The above message is displayed. The interrupt processing rule erases the interrupt working memory element to indicate the end of the interrupt processing, and sets the interrupt permission flag to TRUE.

本実施例のインタラプト処理ルールでは,インタラプト
の発生によって単にメッセージを表示するだけである
が,インタラプトを発生した外部入力手段からデータを
読み込むとともに,そのデータの内容を示すワーキング
・メモリ要素を生成するようにすれば,そのワーキング
・メモリ要素に照合するルールが次に発火するので,デ
ータの内容に応じた割り込み処理が行えることは勿論で
ある。また,本実施例では,一つのインタラプト源だけ
を取り扱っているが,複数のインタラプト源に対しても
インタラプト検出部においてそれぞれのインタラプトの
有無を調べることにより容易に対処できる。
According to the interrupt processing rule of this embodiment, a message is simply displayed when an interrupt occurs, but the data is read from the external input means that generated the interrupt, and a working memory element indicating the contents of the data is generated. In this case, since the rule for matching the working memory element is fired next, it goes without saying that interrupt processing according to the content of data can be performed. Further, although only one interrupt source is handled in this embodiment, a plurality of interrupt sources can be easily dealt with by checking the presence or absence of each interrupt in the interrupt detection unit.

〔発明の効果〕〔The invention's effect〕

以上に述べたように,プロダクション・システムの推論
エンジンにインタラプト検出部を付加し,インタラプト
に対応したワーキング・メモリ要素を生成してインタラ
プト処理ルールを発火させるという本発明によって,推
論実行中に外部からのインタラプトによって別の推論処
理を開始したり,現在の推論過程を修正したりすること
が可能になる。また,インタラプト処理自体も通常のル
ールで記述できるという利点があり,インタラプト処理
の変更や修正が容易になる。
As described above, according to the present invention in which the interrupt detection unit is added to the inference engine of the production system, the working memory element corresponding to the interrupt is generated, and the interrupt processing rule is fired, the external processing is performed during the inference. Interrupt allows you to start another inference process or modify the current inference process. In addition, the interrupt process itself has the advantage that it can be described by normal rules, which makes it easy to change or modify the interrupt process.

【図面の簡単な説明】[Brief description of drawings]

第1図は本発明のインタラプト検出部を付加された推論
エンジンのフローチャート,第2図はインタラプト検出
部の詳細なフローチャート,第3図はインタラプト処理
ルールの一例,第4図は端末からのインタラプトを処理
する実施例の構成図,第5図は実施例におけるインタラ
プト検出部のフローチャート,第6図は実施例のインタ
ラプト処理ルール,第7図はプロダクション・システム
の構成図,第8図はプロダクション・ルールの例,第9
図は従来の推論エンジンの動作を示すフローチャートで
ある。 1……プロダクション・システム 2……推論エンジン 3……ワーキング・メモリ 4……プロダクション・メモリ 5……通信ポート 6……端末
FIG. 1 is a flow chart of an inference engine to which an interrupt detection unit of the present invention is added, FIG. 2 is a detailed flow chart of the interrupt detection unit, FIG. 3 is an example of an interrupt processing rule, and FIG. FIG. 5 is a flow chart of an interrupt detection unit in the embodiment, FIG. 6 is an interrupt processing rule of the embodiment, FIG. 7 is a configuration diagram of a production system, and FIG. 8 is a production rule. Example, No. 9
The figure is a flow chart showing the operation of a conventional inference engine. 1 ... Production system 2 ... Inference engine 3 ... Working memory 4 ... Production memory 5 ... Communication port 6 ... Terminal

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】推論用のデータを格納するワーキング・メ
モリと,そのデータに作用するプロダクション・ルール
を格納するプロダクション・メモリと,前記ワーキング
・メモリ内のデータと前記プロダクション・メモリ内の
ルールを比較して発火可能なルールを実行する推論エン
ジンから構成されるプロダクション・システムにおい
て, 前記推論エンジン内部に外部からのインタラプト検出機
構を持ち,前記ルールの連鎖による推論期間中に外部か
らのインタラプトを検出し,その時点でのルールの実行
の直後に,そのインタラプトの要因を示すワーキング・
メモリ要素を生成することによって,インタラプト処理
用のルールを起動するプロダクション・システムのイン
タラプト処理方式。
1. A working memory for storing data for inference, a production memory for storing production rules acting on the data, and a comparison between data in the working memory and rules in the production memory. In a production system consisting of an inference engine that executes a rule that can be fired, an internal interrupt detection mechanism is provided inside the inference engine, and an external interrupt is detected during an inference period based on the rule chain. , Immediately after the execution of the rule at that point, a working
An interrupt processing method for a production system that activates rules for interrupt processing by generating memory elements.
JP63254130A 1988-10-07 1988-10-07 Production system interrupt processing method Expired - Lifetime JPH0644231B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63254130A JPH0644231B2 (en) 1988-10-07 1988-10-07 Production system interrupt processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63254130A JPH0644231B2 (en) 1988-10-07 1988-10-07 Production system interrupt processing method

Publications (2)

Publication Number Publication Date
JPH02100722A JPH02100722A (en) 1990-04-12
JPH0644231B2 true JPH0644231B2 (en) 1994-06-08

Family

ID=17260639

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63254130A Expired - Lifetime JPH0644231B2 (en) 1988-10-07 1988-10-07 Production system interrupt processing method

Country Status (1)

Country Link
JP (1) JPH0644231B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01224842A (en) * 1988-03-04 1989-09-07 Nippon Telegr & Teleph Corp <Ntt> Inferential control system for knowledge-based system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01224842A (en) * 1988-03-04 1989-09-07 Nippon Telegr & Teleph Corp <Ntt> Inferential control system for knowledge-based system

Also Published As

Publication number Publication date
JPH02100722A (en) 1990-04-12

Similar Documents

Publication Publication Date Title
US5070476A (en) Sequence controller
JPS6010643B2 (en) sequence controller
JPH0644231B2 (en) Production system interrupt processing method
US5838898A (en) Microprogram controlled data processing system having a runaway monitor function
JPS58197557A (en) Message control system
JPS62175834A (en) Detecting circuit for runaway of central processing unit
US5007056A (en) Processing circuit having an error detecting and correcting circuit therein
JP2870202B2 (en) Method and apparatus for mutual monitoring between processors
JPS58197555A (en) Information processor
JPH04291646A (en) Write monitoring device
JPS6218054B2 (en)
JPS5922147A (en) Checking system of retrial processing
JPH0534692B2 (en)
CN116996378A (en) Parameter configuration method and device of cluster system, electronic equipment and storage medium
JPH0120778B2 (en)
JPS6074052A (en) History memory control system
JPS6247757A (en) Write error detecting system for time division switch memory
JPS59191662A (en) Detecting system for program runaway
JPH03136147A (en) Software monitor system
JPH0962512A (en) Program transformation device and method having description language transformation function from low-class language to high-class language
JPH0480860A (en) Program loading system
JPS61221937A (en) Detecting system for exceptional phenomenon
JPS6029128B2 (en) microprogram controller
JPS62166449A (en) History storage device for logical unit
JPH04257029A (en) Editor