JPH04332041A - Rule base type control device - Google Patents
Rule base type control deviceInfo
- Publication number
- JPH04332041A JPH04332041A JP3102262A JP10226291A JPH04332041A JP H04332041 A JPH04332041 A JP H04332041A JP 3102262 A JP3102262 A JP 3102262A JP 10226291 A JP10226291 A JP 10226291A JP H04332041 A JPH04332041 A JP H04332041A
- Authority
- JP
- Japan
- Prior art keywords
- fact
- working memory
- rule
- identifier
- conflict
- 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
- Devices For Executing Special Programs (AREA)
Abstract
Description
【0001】0001
【産業上の利用分野】本発明は、ルールベース型制御装
置に関し、特にワーキングメモリへの事実追加削除管理
、競合集合メモリへの競合集合要素追加削除管理に関す
る。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a rule-based control device, and more particularly to the management of adding and deleting facts to a working memory and the management of adding and deleting conflicting set elements to a conflicting set memory.
【0002】0002
【従来の技術】プロダクションシステムは、IF〜TH
EN〜形式で記述されるプロダクションルール(以下、
単にルールという)を用いて構成したシステムである。
ルールの“IF〜”の部分は条件部、“THEN〜”の
部分は実行部と呼ばれ、ルールの追加、削除が、推論プ
ログラムの変更に相当する。[Prior Art] The production system has IF to TH
Production rules written in EN~ format (hereinafter referred to as
It is a system configured using rules (simply called rules). The "IF~" part of the rule is called the condition part, and the "THEN~" part is called the execution part, and adding or deleting a rule corresponds to changing the inference program.
【0003】また、前向き推論(forward re
asoning )は、与えられた事実をもとに、推論
を繰り返して結論を導き出す方法である。すなわち、与
えられた事実をルールの条件部に入力して、1つの結論
を導き出す。その結論を、新たに加わった事実として扱
い、再びルールの条件部に入力して、さらに次の結論を
導き出す。このような推論動作を繰り返すことで、ルー
ルの検証を先頭から順次行っていく手法である。いわば
、一定の事実から出発して特定の仮説を結論として選択
する手法である。[0003] Also, forward inference
asoning) is a method of repeatedly making inferences and drawing conclusions based on given facts. That is, a given fact is input into the condition part of the rule and a conclusion is drawn. Treat that conclusion as a newly added fact, enter it again into the condition section of the rule, and draw the next conclusion. By repeating such inference operations, the rules are verified sequentially from the beginning. In other words, it is a method of starting from certain facts and selecting a specific hypothesis as a conclusion.
【0004】プロダクションシステム前向き推論を行う
ルールベース型制御装置は、前向き推論を実行するプロ
ダクションシステムであり、ルールを格納するためルー
ルベースを備え、事実を登録するメモリとしてワーキン
グメモリを備える。さらに、パターンマッチの結果とし
て得られる競合集合(conflictset)要素を
格納する競合集合メモリが用いられる。Production System A rule-based control device that performs forward reasoning is a production system that performs forward reasoning, and includes a rule base for storing rules and a working memory as a memory for registering facts. Furthermore, a conflict set memory is used to store conflict set elements obtained as a result of pattern matching.
【0005】[0005]
【発明が解決しようとする課題】しかしながら、従来の
プロダクションシステム前向き推論を行うルールベース
型制御装置では、事実の追加削除が生じた場合の動作に
問題点があった。すなわち、ワーキングメモリの内容に
変化が生じた場合(事実の追加削除が生じた場合)、変
化後のワーキングメモリ中の全事実とルールベース中の
全条件部の比較が行われ新たに競合集合が生成されるこ
とに起因して、以下のような問題が生じていた。However, the conventional production system rule-based control device that performs forward inference has a problem in its operation when facts are added or deleted. In other words, when a change occurs in the contents of the working memory (when facts are added or deleted), all the facts in the working memory after the change are compared with all the condition parts in the rule base, and a new competitive set is created. Due to this generation, the following problems have arisen.
【0006】(1)ワーキングメモリの内容の変化のた
びに競合集合を計算するため、前回計算した競合集合に
係る情報の有効利用に欠ける。(1) Since the conflict set is calculated every time the contents of the working memory change, information regarding the previously calculated conflict set cannot be used effectively.
【0007】(2)また、ワーキングメモリや競合集合
メモリの内容削除動作に時間を要する。(2) Furthermore, it takes time to delete the contents of the working memory and the conflict set memory.
【0008】(3)ワーキングメモリの内容の属性とは
無関係のルールについても計算が行われるため、動作の
高速化が阻まれる。(3) Since calculations are also performed for rules unrelated to the attributes of the contents of the working memory, speeding up of operations is hindered.
【0009】このように、従来、ルールベース上のルー
ルとワーキングメモリ上の事実との高速照合に支障とな
る問題点があった。本発明は、前回計算した競合集合に
係る情報を有効利用して高速照合を実現することを目的
とする。[0009] As described above, conventionally, there has been a problem that hinders high-speed comparison between the rules on the rule base and the facts on the working memory. An object of the present invention is to realize high-speed matching by effectively utilizing information regarding the previously calculated conflict set.
【0010】0010
【課題を解決するための手段】このような目的を達成す
るために、本発明は、ルールベースと、ワーキングメモ
リと、競合集合メモリと、ルール照合データ管理部と、
を備えており、各構成部材が以下のような構成及び機能
を有することを特徴とする。[Means for Solving the Problems] In order to achieve such an object, the present invention provides a rule base, a working memory, a conflict set memory, a rule matching data management unit,
Each component has the following configuration and function.
【0011】まず、ルールベースはルールを格納する。
本発明におけるルールは、条件部及び実行部の他、条件
部が参照する事実の属性を表すワーキングメモリ属性を
有する。さらに、ルールには個々にルール識別子も付与
される。First, the rule base stores rules. In addition to a conditional part and an execution part, a rule in the present invention has a working memory attribute that represents the attribute of the fact referred to by the conditional part. Furthermore, each rule is also given a rule identifier.
【0012】次に、ワーキングメモリには、事実が登録
される。ワーキングメモリに登録される事実には、事実
の内容を表す事実データの他、関係する競合集合要素を
表す競合集合要素識別子及びルールの条件部により参照
される属性が付加される。さらには、事実個々に、ワー
キングメモリ事実識別子が付与される。Next, the facts are registered in the working memory. In addition to the fact data representing the content of the fact, the fact registered in the working memory includes a competition set element identifier representing a related competition set element and an attribute referenced by the condition part of the rule. Furthermore, a working memory fact identifier is assigned to each fact.
【0013】競合集合メモリは、関係するルールを表す
ルール識別子及び関係する事実を表すワーキングメモリ
事実識別子を有する競合集合要素に、さらに競合要素識
別子が個々に付与された競合集合要素を格納する。The conflict set memory stores conflict set elements having rule identifiers representing related rules and working memory fact identifiers representing related facts, as well as conflict set elements to which conflict element identifiers are individually assigned.
【0014】さらに、ルール照合データ管理部は、第1
の指示子、第2の指示子及び第3の指示子を有する。第
1の指示子は、ルールベース上のルールを走査するため
の指示子である。第2の指示子は、ワーキングメモリ上
の新事実を指定するための指示子である。第3の指示子
は、ワーキングメモリ上の古い事実を走査するための指
示子である。[0014]Furthermore, the rule matching data management section includes a first
, a second indicator, and a third indicator. The first indicator is an indicator for scanning rules on the rule base. The second indicator is an indicator for specifying a new fact on the working memory. The third indicator is an indicator for scanning old facts in working memory.
【0015】ルール照合データ管理部は、新事実をワー
キングメモリに登録した場合には、まず第1の指示子、
第2の指示子及び第3の指示子によりルールベースとワ
ーキングメモリの照合を実行する。この照合は、属性ご
とに行う。すなわち、登録した事実の属性と同一のワー
キングメモリ属性を有し(すなわち条件部が当該属性を
参照し)ているルールと、登録すべき事実の属性と同一
の属性を有している事実との照合が実行される。照合が
成立した場合には、これに対応して各部材へ所定の識別
子を書き込む。すなわち、競合集合要素のルール識別子
には照合成立に係るルールを表すルール識別子を書き込
み、競合集合要素のワーキングメモリ事実識別子には照
合成立に係る事実を表すワーキングメモリ事実識別子を
書き込む。競合集合要素には、競合要素識別子を新規付
与する。ルール照合データ管理部は、当該競合要素識別
子をワーキングメモリ上の関係する事実の競合要素識別
子に書き込む。[0015] When a new fact is registered in the working memory, the rule matching data management unit first registers the first indicator,
A comparison between the rule base and the working memory is performed using the second indicator and the third indicator. This verification is performed for each attribute. In other words, a rule that has the same working memory attribute as the attribute of the registered fact (that is, the condition part refers to the attribute) and a fact that has the same attribute as the attribute of the fact to be registered. Matching is performed. If the verification is successful, a predetermined identifier is written into each member in accordance with this. That is, a rule identifier representing a rule related to successful matching is written in the rule identifier of the competitive set element, and a working memory fact identifier representing a fact related to successful matching is written in the working memory fact identifier of the competitive set element. A new conflicting element identifier is assigned to the conflicting set element. The rule matching data management unit writes the conflicting element identifier into the conflicting element identifier of the related fact on the working memory.
【0016】ルール照合データ管理部は、事実をワーキ
ングメモリから削除する場合には、まず、削除すべき事
実を表すワーキングメモリ事実識別子を有する事実をワ
ーキングメモリ上で検索する。この検索は、属性ごとに
行う。すなわち、削除すべき事実の属性と同一の属性を
有している事実を基礎として検索が実行される。さらに
、この検索により発見された事実の競合要素識別子と同
じ競合要素識別子を有する競合集合要素を競合集合メモ
リ上で検索する。ルール照合データ管理部は、これによ
り発見された競合集合要素を競合集合メモリ上から削除
する。ルール照合データ管理部は、検索により発見され
たすべての競合集合要素を削除した後に、ワーキングメ
モリから削除すべき事実を削除する。When deleting a fact from the working memory, the rule matching data management section first searches the working memory for a fact having a working memory fact identifier representing the fact to be deleted. This search is performed for each attribute. That is, a search is performed based on facts that have the same attributes as the attributes of the fact to be deleted. Furthermore, a conflict set element having the same conflict element identifier as the conflict element identifier of the fact discovered by this search is searched on the conflict set memory. The rule matching data management unit deletes the conflicting set element thus discovered from the conflicting set memory. After deleting all conflicting set elements discovered by the search, the rule matching data management unit deletes the facts to be deleted from the working memory.
【0017】[0017]
【作用】本発明においては、属性ごとにルールと事実の
照合、及び削除すべき事実の検索が実行される。すなわ
ち、照合等に当たって関係のない異なる属性に係るルー
ル及び事実が照合の対象から排除される。これにより、
照合動作が迅速化する。また、本発明においては、新事
実登録時に所定の識別子書き込みが実行される結果、従
前に計算された競合集合要素の保存、及び削除動作への
所定情報の利用が実現され、冗長性が低い動作及び削除
動作の高速化が実現される。[Operation] In the present invention, rules and facts are checked for each attribute, and facts to be deleted are searched for. In other words, rules and facts related to different, unrelated attributes are excluded from the verification target. This results in
Verification operation becomes faster. In addition, in the present invention, as a result of writing a predetermined identifier at the time of new fact registration, it is possible to save previously calculated conflict set elements and use predetermined information for deletion operations, resulting in an operation with low redundancy. And speeding up of the deletion operation is realized.
【0018】すなわち、事実登録時において照合が成立
するとルール照合データ管理部によりルール識別子の書
き込みが行われる結果、競合集合要素においてルールと
の関係を表す情報が付せられ、ワーキングメモリ事実識
別子の書き込みが行われる結果、競合集合要素において
事実との関係を表す情報が付せられることになる。さら
には、競合要素識別子の書き込みが行われる結果、ワー
キングメモリ上の関係する事実において競合集合要素と
の関係を表す情報が付せられることになる。That is, when a match is made during fact registration, the rule match data management section writes a rule identifier, and as a result, information representing the relationship with the rule is attached to the conflict set element, and the working memory fact identifier is written. As a result, information representing the relationship with facts is attached to the competitive set element. Furthermore, as a result of writing the competing element identifier, information representing the relationship with the competing set element is added to the related facts in the working memory.
【0019】事実登録動作の後に実行される事実削除動
作においては、同一属性の事実のなかからワーキングメ
モリ事実識別子を利用して削除すべき事実が検索される
。検索の結果得られた事実には、先の事実登録動作にお
いて競合要素識別子が付せられている。従って、これを
利用すれば、関係する競合集合要素を競合集合メモリ上
で検索することができる。検索して得られた競合集合要
素を順次競合集合メモリ上から削除し、一連の競合集合
要素を削除し終えた後にワーキングメモリからの事実削
除を行えば、以前の動作により得られている競合集合要
素の再計算を行うことがなくなり、情報が有効活用され
ることになる。In the fact deletion operation executed after the fact registration operation, a fact to be deleted is searched for among facts with the same attribute using a working memory fact identifier. A competing element identifier has been attached to the fact obtained as a result of the search in the previous fact registration operation. Therefore, by using this, related conflict set elements can be searched on the conflict set memory. If you sequentially delete the conflicting set elements obtained through the search from the conflicting set memory and then delete the fact from the working memory after deleting a series of conflicting set elements, you can delete the conflicting set obtained by the previous operation. There is no need to recalculate elements, and information can be used more effectively.
【0020】[0020]
【実施例】以下、本発明の好適な実施例について図面に
基づき説明する。DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below with reference to the drawings.
【0021】図1には、本発明の一実施例に係るルール
ベース型制御装置の構成が示されている。この図に示さ
れるように、本実施例は、ルールベース10、ワーキン
グメモリ12、競合集合メモリ14及びルール照合デー
タ管理部16から構成されている。FIG. 1 shows the configuration of a rule-based control device according to an embodiment of the present invention. As shown in this figure, this embodiment is composed of a rule base 10, a working memory 12, a conflict set memory 14, and a rule matching data management section 16.
【0022】ルールベース10はルールの集合を格納す
る手段であり、ルールは前述のように条件部及び実行部
から構成されている。本実施例においては、さらに、各
ルール毎にルール識別子が付与されており、かつ、ルー
ルはワーキングメモリ属性を有している。このワーキン
グメモリ属性は条件部において参照している事実属性を
示すものである。The rule base 10 is a means for storing a set of rules, and the rules are composed of a condition part and an execution part as described above. In this embodiment, a rule identifier is further assigned to each rule, and each rule has a working memory attribute. This working memory attribute indicates the fact attribute referred to in the condition part.
【0023】ワーキングメモリ12は、事実データの集
合を格納するメモリである。この実施例においては、図
2に示されるように、事実データ本体のみでなくワーキ
ングメモリ事実識別子、競合集合要素識別子及び属性を
含むデータが事実としてワーキングメモリ12に格納さ
れる。属性は、事実データ本体の属性を示している。例
えば、属性“社名”に対し、事実データ本体“日本無線
株式会社”が対応する如きものである。ワーキングメモ
リ事実識別子は、事実ごとに付与される識別子であり、
競合集合要素識別子は、関係する競合集合要素を表す識
別子である。Working memory 12 is a memory that stores a set of factual data. In this embodiment, as shown in FIG. 2, data including not only the fact data itself but also working memory fact identifiers, competing set element identifiers, and attributes are stored as facts in the working memory 12. The attribute indicates the attribute of the fact data body. For example, the fact data body "Japan Radio Co., Ltd." corresponds to the attribute "company name." A working memory fact identifier is an identifier assigned to each fact.
The conflicting set element identifier is an identifier representing a related conflicting set element.
【0024】競合集合メモリ14は、競合集合要素の集
合を格納するメモリである。競合集合要素は、ルールの
条件部が事実と照合(match )され、照合が成立
したときに構成される集合要素である。図3に示される
ように、競合集合要素は、競合集合要素識別子、ルール
識別子及びワーキングメモリ事実識別子を含んでいる。
競合集合要素識別子は各競合集合要素毎に付与される識
別子であり、ルール識別子及びワーキングメモリ事実識
別子は照合成立に係るルール及び事実を表している。競
合集合要素は、複数のワーキングメモリ事実識別子を有
することもある。The conflict set memory 14 is a memory that stores a set of conflict set elements. A competitive set element is a set element that is constructed when the condition part of a rule is matched with a fact and the match is established. As shown in FIG. 3, the conflict set element includes a conflict set element identifier, a rule identifier, and a working memory fact identifier. The competition set element identifier is an identifier given to each competition set element, and the rule identifier and working memory fact identifier represent rules and facts related to successful matching. A conflict set element may have multiple working memory fact identifiers.
【0025】ルール照合データ管理部16は、3種類の
指示子を有している。第1にルールベース10上のルー
ルを走査する指示子を、第2にワーキングメモリ12上
に新たに事実を追加する領域を指定する指示子を、第3
にワーキングメモリ12上の登録済みの(古い)事実の
格納に係る領域を走査する指示子を有している。ルール
照合データ管理部16は、これらの指示子を用いて照合
、検索等を実行する。次に、本実施例におけるルール照
合データ管理部16の動作について説明する。本実施例
における事実の登録、事実の削除動作は、属性に基づく
ルールの分類の結果に応じて行われる。すなわち、本発
明の第1の特徴たる属性毎の動作は、各ルールが有する
ワーキングメモリ属性を利用した分類の結果として実現
される。異なる属性を参照しているルールは、それぞれ
、別々のルールの集合を形成し、以下の動作は各集合を
単位として実行される。The rule matching data management section 16 has three types of indicators. The first is an indicator for scanning rules on the rule base 10, the second is an indicator for specifying an area on the working memory 12 to add a new fact, and the third is an indicator for scanning rules on the rule base 10.
has an indicator for scanning an area in the working memory 12 where registered (old) facts are stored. The rule matching data management unit 16 uses these indicators to perform matching, searching, and the like. Next, the operation of the rule matching data management section 16 in this embodiment will be explained. In this embodiment, the fact registration and fact deletion operations are performed according to the result of the classification of rules based on attributes. That is, the operation for each attribute, which is the first feature of the present invention, is realized as a result of classification using the working memory attribute of each rule. Rules that refer to different attributes each form a separate set of rules, and the following operations are performed for each set.
【0026】まず、新事実をワーキングメモリ12上に
登録する場合を考える。この場合、ワーキングメモリ1
2上において新事実に係る指示子が指定する領域に、当
該新事実が登録される。ルール照合データ管理部16は
、この後、ルールベース10とワーキングメモリ12の
照合を開始する。First, let us consider the case where a new fact is registered in the working memory 12. In this case, working memory 1
2. The new fact is registered in the area specified by the indicator related to the new fact. The rule matching data management unit 16 then starts matching the rule base 10 and the working memory 12.
【0027】すなわち、ルール照合データ管理部16は
、プロダクションシステム前向き推論の手法に則り、ル
ールに係る指示子を走査することによってルールを順次
指定し、古い事実に係る指示子を走査することによって
順次ワーキングメモリ12上の事実(ただし、古い事実
が登録された領域のみである)を順次指定する。指定さ
れたルールと事実について、公知の手法によって新事実
に係る照合計算が実行される。ただし、この照合は、先
に述べたように属性によって分類された一単位について
のみ実行される。In other words, the rule matching data management unit 16 sequentially specifies rules by scanning the indicators related to the rules, and sequentially specifies the rules by scanning the indicators related to old facts, in accordance with the method of production system forward reasoning. The facts on the working memory 12 (however, only the areas where old facts are registered) are sequentially specified. Verification calculations regarding new facts are performed using a known method for the specified rules and facts. However, as described above, this verification is performed only for one unit classified by attribute.
【0028】この実施例の場合、照合回数Cは、ルール
数をRn、ワーキングメモリ12上の全事実数をWn、
属性の個数をa、1ルールが参照する事実数をPnとす
ると、次の式(1)のように表される。In the case of this embodiment, the number of collations C is determined by the number of rules being Rn, the total number of facts in the working memory 12 being Wn,
Assuming that the number of attributes is a and the number of facts referred to by one rule is Pn, it is expressed as the following equation (1).
【0029】[0029]
【数1】[Math 1]
【0030】ただし、Wn≧1である。[0030] However, Wn≧1.
【0031】ルール照合データ管理部16は、ルールベ
ース10上のルールと、ワーキングメモリ12上に新規
に追加された新しい事実と、古い事実と、との間で照合
が成立した場合、その組み合わせを識別子として競合集
合メモリ14上に書き込む。このとき、ルール照合デー
タ管理部16は、書き込みに係る新しい競合集合要素に
競合集合要素識別子を付与し、これを、ワーキングメモ
リ12上において、当該競合集合要素に関係する事実の
競合集合要素にも書き込む。このようにして、登録時に
事実、競合集合要素、ルールが互いに関係付けられる。[0031] When a match is established between a rule on the rule base 10, a new fact newly added to the working memory 12, and an old fact, the rule matching data management unit 16 stores the combination. It is written on the conflict set memory 14 as an identifier. At this time, the rule matching data management unit 16 assigns a conflict set element identifier to the new conflict set element related to the writing, and also adds this to the conflict set element of the fact related to the conflict set element in the working memory 12. Write. In this way, facts, competing set elements, and rules are related to each other during registration.
【0032】次に、事実を削除する場合を考える。この
場合、図示しない装置からルール照合データ管理部16
に事実削除命令が与えられるのに応じ、ルール照合デー
タ管理部16は、ワーキングメモリ事実識別子によりワ
ーキングメモリ12上を検索し、削除すべき事実を発見
する。なお、先にのべたように、この動作は削除すべき
事実と同一の属性を有する一群の事実について実行され
る。Next, consider the case of deleting facts. In this case, the rule matching data management unit 16 is sent from a device (not shown).
In response to being given a fact deletion command, the rule matching data management unit 16 searches the working memory 12 using the working memory fact identifier and discovers the fact to be deleted. Note that, as mentioned above, this operation is performed on a group of facts that have the same attributes as the facts to be deleted.
【0033】事実が発見されると、発見された事実の競
合集合要素識別子により、競合集メモリ14上が検索さ
れる。すなわち、ルール照合データ管理部16は、発見
された事実の競合集合要素識別子と同一の競合集合要素
識別子を有する競合集合要素を検索し、発見し、削除す
る。ここに、発見された事実は一般に複数の競合集合要
素識別子を有することがあるものとする。ルール照合デ
ータ管理部16は、発見された事実が有する競合集合要
素識別子のすべてについて、競合集合要素の削除が終了
すると、当該発見された事実をワーキングメモリ12上
から削除する。このようにして、事実の削除が行われる
。When a fact is discovered, the conflict set memory 14 is searched using the conflict set element identifier of the discovered fact. That is, the rule matching data management unit 16 searches for, discovers, and deletes a conflict set element having the same conflict set element identifier as the conflict set element identifier of the discovered fact. It is assumed here that a discovered fact may generally have multiple conflicting set element identifiers. The rule matching data management unit 16 deletes the discovered fact from the working memory 12 when the deletion of the conflicting set element is completed for all the conflicting set element identifiers that the discovered fact has. In this way, facts are deleted.
【0034】このように、本実施例によれば、使用者が
まったく意識することなく自動的に、高速で登録削除動
作が実行される。高速となるのは、処理の対象となる事
実を属性分類により減少させていること、先に計算した
競合集合要素を保存していること、識別子を付与しこれ
を有効活用していること、による。As described above, according to this embodiment, the registration deletion operation is automatically executed at high speed without the user being aware of it at all. The high speed is due to the fact that the number of facts to be processed is reduced by attribute classification, the previously calculated competing set elements are saved, and the identifiers are assigned and used effectively. .
【0035】この効果を数式で比較すると、次のように
なる。従来の手法、すなわち事実追加時に全競合集合要
素を計算する手法では、照合回数C´は、
C´=RnWnPn
…
(2)となる。本実施例における照合回数C(ただし、
ルールの分類による減少分は含まない)との比C/C´
は、式(1)を式(2)で徐することにより、
C/C´={1−((Wn−a)/Wn)Pn}/
aPn+1 …(3)と表される。さらに、属性によ
りルールを分類することによって、これをさらに最良1
/a倍に低減できる。Comparing this effect numerically, it is as follows. In the conventional method, that is, the method of calculating all competitive set elements when adding facts, the number of matchings C′ is
C′=RnWnPn
…
(2) becomes. The number of verifications C in this example (however,
(does not include decrease due to rule classification) ratio C/C'
By dividing equation (1) by equation (2),
C/C'={1-((Wn-a)/Wn)Pn}/
It is expressed as aPn+1 (3). Furthermore, by classifying rules by attribute, this can be further improved.
It can be reduced by /a times.
【0036】また、事実削除時には、競合集合要素識別
子を利用することで比較動作を行う必要がないため、高
速化を実現できる。さらに、検索のためにハッシュ関数
を用いること等が可能であり、実現が容易である。Furthermore, when deleting facts, there is no need to perform a comparison operation by using conflicting set element identifiers, so speeding up can be achieved. Furthermore, it is possible to use a hash function for searching, and it is easy to implement.
【0037】[0037]
【発明の効果】以上説明したように、本発明によれば、
識別子の付与、属性に基づく分類及び検索動作により、
処理対象を低減するようにしているため、事実の追加、
削除動作が高速化し、より使用性の高い装置を実現でき
る。[Effects of the Invention] As explained above, according to the present invention,
By assigning identifiers, classifying based on attributes, and searching operations,
Since we are trying to reduce the number of objects to be processed, adding facts,
The deletion operation becomes faster and a device with higher usability can be realized.
【図1】本発明の一実施例に係るルールベース型制御装
置の構成を示す図である。FIG. 1 is a diagram showing the configuration of a rule-based control device according to an embodiment of the present invention.
【図2】この実施例における事実のデータ構造を示す図
である。FIG. 2 is a diagram showing a data structure of facts in this embodiment.
【図3】この実施例における競合集合要素のデータ構造
を示す図である。FIG. 3 is a diagram showing the data structure of a competitive set element in this embodiment.
10 ルールベース 12 ワーキングメモリ 14 競合集合メモリ 16 ルール照合データ管理部 10 Rule base 12 Working memory 14 Contention set memory 16 Rule matching data management department
Claims (1)
の行動を表す実行部、個々に付与されるルール識別子及
び条件部が参照する事実の属性を表すワーキングメモリ
属性を有するプロダクションルールを格納するルールベ
ースと、個々に付与されるワーキングメモリ事実識別子
、事実の内容を表す事実データ、関係する競合集合要素
を表す競合集合要素識別子及びプロダクションルールの
条件部により参照される属性を有する事実が登録される
ワーキングメモリと、個々に付与される競合要素識別子
、関係するプロダクションルールを表すルール識別子及
び関係する事実を表すワーキングメモリ事実識別子を有
する競合集合要素を格納する競合集合メモリと、ルール
ベース上のプロダクションルールを走査する第1の指示
子、ワーキングメモリ上の新事実を指定する第2の指示
子及びワーキングメモリ上の古い事実を走査する第3の
指示子を有するルール照合データ管理部と、を備え、ル
ール照合データ管理部は、新事実をワーキングメモリに
登録した場合には、登録した事実の属性と同一のワーキ
ングメモリ属性を有するプロダクションルールと、登録
した事実の属性と同一の属性を有する事実と、の照合を
第1の指示子、第2の指示子及び第3の指示子により実
行し、照合が成立した場合には、照合成立に係るプロダ
クションルールを表すルール識別子及び事実を表すワー
キングメモリ事実識別子を競合集合要素のルール識別子
及びワーキングメモリ事実識別子に書き込むと共に、競
合集合要素の競合要素識別子を新規付与しかつ当該競合
要素識別子をワーキングメモリ上の関係する事実の競合
要素識別子に書き込み、事実をワーキングメモリから削
除する場合には、削除すべき事実を表すワーキングメモ
リ事実識別子を有する事実をワーキングメモリ上の削除
すべき事実と同一の属性を有する事実から検索し、検索
により発見された事実の競合要素識別子と同じ競合要素
識別子を有する競合集合要素を競合集合メモリ上で検索
し、検索により発見された競合集合要素を競合集合メモ
リ上から削除し、発見されたすべての競合集合要素を削
除した後に、ワーキングメモリから削除すべき事実を削
除することを特徴とするルールベース型制御装置。Claim 1: A production rule having a conditional part representing a condition, an execution part representing an action when the conditional part is true, an individually assigned rule identifier, and a working memory attribute representing an attribute of the fact referenced by the conditional part. A rule base that stores a working memory fact identifier assigned to each fact, fact data representing the content of the fact, a competing set element identifier representing the related competing set element, and a fact having attributes referenced by the condition part of the production rule. a working memory in which is registered; a conflict set memory that stores conflict set elements having conflict element identifiers assigned to each individual, a rule identifier representing a related production rule, and a working memory fact identifier representing a related fact; and a rule base. a rule matching data management unit having a first indicator for scanning the above production rule, a second indicator for specifying a new fact in the working memory, and a third indicator for scanning the old fact in the working memory; When a new fact is registered in the working memory, the rule matching data management unit creates a production rule that has the same working memory attribute as the attribute of the registered fact, and a production rule that has the same working memory attribute as the attribute of the registered fact. and the fact that has been verified using the first indicator, the second indicator, and the third indicator, and if the match is successful, a rule identifier representing a production rule related to the success of the match and a fact are displayed. Writes the working memory fact identifier into the rule identifier and working memory fact identifier of the conflicting set element, adds a new conflicting element identifier to the conflicting set element, and writes the conflicting element identifier to the conflicting element identifier of the related fact in the working memory. , when deleting a fact from the working memory, a fact having a working memory fact identifier representing the fact to be deleted is searched from among the facts having the same attributes as the fact to be deleted in the working memory, and the fact found by the search is Search the conflict set memory for a conflict set element that has the same conflict element identifier as the actual conflict element identifier, delete the conflict set elements found by the search from the conflict set memory, and delete all the conflict set elements found. A rule-based control device that deletes a fact to be deleted from a working memory after the fact is deleted.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3102262A JPH04332041A (en) | 1991-05-08 | 1991-05-08 | Rule base type control device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP3102262A JPH04332041A (en) | 1991-05-08 | 1991-05-08 | Rule base type control device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH04332041A true JPH04332041A (en) | 1992-11-19 |
Family
ID=14322684
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP3102262A Pending JPH04332041A (en) | 1991-05-08 | 1991-05-08 | Rule base type control device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH04332041A (en) |
-
1991
- 1991-05-08 JP JP3102262A patent/JPH04332041A/en active Pending
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US5027305A (en) | Interrogating device for changing the priority of the inference rules | |
| KR100593561B1 (en) | Information Searching Method, Information Searching Program, and Computer-Readable Recording Medium on which Information Searching Program is Recorded | |
| JP3205406B2 (en) | Reference target variable determination processing method and translation processing system | |
| JPH0565892B2 (en) | ||
| JPH04332041A (en) | Rule base type control device | |
| US4989162A (en) | Method of using an accuracy valve in a conflict resolution of a forward inference | |
| WO2005043409A1 (en) | Table-formatted data connection method, connection device, and program | |
| JPH05274145A (en) | Production system | |
| EP0511437A1 (en) | Computer system | |
| JP2001005678A (en) | Network type information processing apparatus and method | |
| Cosson et al. | Asynchronous Collective Tree Exploration: a Distributed Algorithm, and a new Lower Bound | |
| CN118363725A (en) | Decision stream execution method, apparatus, computer device and storage medium | |
| JPH01248233A (en) | Data base retrieving device | |
| JPH0926967A (en) | Database search method | |
| JPH06202869A (en) | Production System Conflict Resolution Method | |
| JPH0243677A (en) | Index control system | |
| JPH06175862A (en) | Electronic computer | |
| JPH03113636A (en) | Inference processing system in knowledge information processing system | |
| JP2000020527A (en) | Search method in database | |
| JPH08137694A (en) | Production system and its conflict resolution method | |
| JPH0512017A (en) | Non-monotonic reasoning type expert system | |
| Shapiro | A Memory Net Structure: Present Implementation and a Proposed Language | |
| JPH0635704A (en) | Inference method for artificial intelligence system | |
| JPH0778081A (en) | Proactive rule-based production system | |
| JPH04257063A (en) | Data base retrieval condition evaluating system |