JPH0616266B2 - High-speed processing method for computer system - Google Patents

High-speed processing method for computer system

Info

Publication number
JPH0616266B2
JPH0616266B2 JP58177955A JP17795583A JPH0616266B2 JP H0616266 B2 JPH0616266 B2 JP H0616266B2 JP 58177955 A JP58177955 A JP 58177955A JP 17795583 A JP17795583 A JP 17795583A JP H0616266 B2 JPH0616266 B2 JP H0616266B2
Authority
JP
Japan
Prior art keywords
block
associative
term
rule
common part
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
JP58177955A
Other languages
Japanese (ja)
Other versions
JPS6072031A (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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP58177955A priority Critical patent/JPH0616266B2/en
Priority to US06/654,487 priority patent/US4779208A/en
Priority to EP84111496A priority patent/EP0137414B1/en
Priority to DE8484111496T priority patent/DE3485999T2/en
Publication of JPS6072031A publication Critical patent/JPS6072031A/en
Publication of JPH0616266B2 publication Critical patent/JPH0616266B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models
    • G06N5/046Forward inferencing; Production systems

Description

【発明の詳細な説明】 〔発明の利用分野〕 本発明は、経験則や自然の法則と初期事実から新事実や
仮説を推論する(プロダクション)システムの高速制御
方法に係わり、特に、大規模で時間がかかりすぎたり、
リアルタイム性を要求される場合に好適な、高速推論の
ための計算機システムの高速処理方法に関する。
The present invention relates to a high-speed control method for a system that infers new facts or hypotheses from empirical rules or laws of nature and initial facts, and particularly relates to large-scale control. It takes too long,
The present invention relates to a high-speed processing method of a computer system for high-speed inference, which is suitable when real-time processing is required.

〔発明の背景〕[Background of the Invention]

規則と事実から推論を行なうのに、推論の各サイクル毎
に全ての規則と事実の照合をとって実行規則を決めるの
がプロダクションシステムであるが、規則と事実の増大
と共に推論時間が爆発的に増大し実用規模では有用でな
い。これを防止するため、規則や事実のコード化とその
インデキシングを行なっている。特に、弁別ネットを用
いた高速方式が効率・適用性において優れているが、規
則の各項目によっては弁別ネットのオーバヘッドは大き
く、リアルタイムシステムへの実用化上問題がある。
Although the production system decides the execution rule by comparing all rules and facts in each cycle of inference when inferring from rules and facts, the inference time explodes with the increase of rules and facts. Increased and not useful on a practical scale. To prevent this, we code rules and facts and index them. In particular, the high-speed method using the discrimination net is excellent in efficiency and applicability, but the overhead of the discrimination net is large depending on each item of the rule, and there is a problem in practical application to a real-time system.

〔発明の目的〕[Object of the Invention]

経験則や自然法則などのルールをプロダクションメモリ
に、事実や仮説をワーキングメモリに持ち、条件部の内
容がワーキングメモリに存在するルールを順次適用する
ことにより計算機に推論を行わすプロダクションシステ
ムが存在する。本発明の目的はプロダクションシステム
の推論速度を、実用上充分高速に、しかも、従来のよう
にルールや条件の数、事実数に依存しない処理方法を提
供することにある。
There is a production system that infers a computer by sequentially applying rules that have rules such as empirical rules and natural laws in the production memory, facts and hypotheses in the working memory, and the contents of the conditional part exist in the working memory. . It is an object of the present invention to provide a processing method in which the inference speed of a production system is practically sufficiently high, and which does not depend on the number of rules and conditions and the number of facts as in the prior art.

〔発明の概要〕[Outline of Invention]

規則の条件部と結論部を調べて、どの条件が成立すると
どの規則が起動され、結論部の実行により、どの規則の
条件が新たに成立したり不成立になったりするのかの関
係をネットワーク構造にして登録しておく。ただし、規
則に変数を含む場合の処理を行うために、変数の具体値
により照合する可能性のある条件項と結論項をグループ
化し、その代表を連想項とし、連想項の個別部により事
実を貯えるようにし、連想項を核に上記ネットワークを
構成した。
Examine the condition part and the conclusion part of the rule, and if the condition is satisfied, which rule is activated, and by executing the conclusion part, the relation of which condition of the rule is newly satisfied or not established is made into a network structure. To register. However, in order to perform processing when the rule includes variables, the conditional terms and conclusion terms that may be matched by the concrete values of the variables are grouped, the representative of them is defined as an association term, and the facts are identified by the individual parts of the association term. The network was constructed with the association term as the core.

〔発明の実施例〕Example of Invention

以下、本発明の一実施例を、第1〜第15図により説明
する。
An embodiment of the present invention will be described below with reference to FIGS.

第1A図は、本発明の方法を実現するためのシステム構
成である。
FIG. 1A is a system configuration for implementing the method of the present invention.

連想ネット作成プロセッサ100は、規則ファイル10
3から、規則を取出し、規則の起動条件やその起動が他
の規則の起動や推論に及ぼす影響を分析し、その結果を
連想ネット(但し、事実組込み前のもの)106として
出力する。また、初期事実を連想ネットに効率良く組込
むための連想フィルタ105を作成する。初期事実組込
みプロセッサ101は、初期事実ファイル104から事
実を取出し、連想ネット106の該当場所に組込む。推
論実行プロセッサ102は、連想ネット106をベース
に、高速推論を行ない推論結果107を出力する。
The associative net creation processor 100 uses the rule file 10
The rule is extracted from 3, and the rule activation condition and the influence of the activation on the activation and inference of other rules are analyzed, and the result is output as an associative net (however, before the fact incorporation) 106. Further, the associative filter 105 for efficiently incorporating the initial fact into the associative net is created. The initial fact-embedded processor 101 extracts a fact from the initial fact file 104 and incorporates the fact into the relevant place of the associative net 106. The inference execution processor 102 performs high-speed inference based on the associative net 106 and outputs an inference result 107.

第1B図は、本発明の方法の計算機システム上での実現
構成図である。
FIG. 1B is a configuration diagram of an implementation of the method of the present invention on a computer system.

連想ネット作成プロセッサ100、初期事実組込みプロ
セッサ101、推論実行プロセッサ102、連想フィル
タ105は、推論プログラム151として、また、連想
ネット106は推論用知識152として、それぞれCP
U150に置かれる。
The associative net creation processor 100, the initial fact incorporation processor 101, the inference execution processor 102, and the associative filter 105 serve as an inference program 151, and the associative net 106 serves as an inference knowledge 152, respectively.
It is placed on U150.

コンソールディスプレー153(キーボード,コンソー
ルタイプライタでも良い)から、規則や初期事実を入力
する。実際のシステムでは、初期事実の入力は、センサ
ーなども用いることも可能である。推論の実行(あるい
は連想ネット106の作成など推論の準備)など推論制
御指令160もコンソールディスプレー153から入力
する。
Rules and initial facts are input from the console display 153 (may be a keyboard or console typewriter). In an actual system, a sensor or the like can be used as the input of the initial facts. Inference control commands 160 such as execution of inference (or preparation of inference such as creation of the associative net 106) are also input from the console display 153.

推論結果は、(ライン)プリンタ154やCRT155、
あるいは、ディスクやM/Tなどの補助記憶装置156
に出力する。推論制御指令160により、推論結果に至
るまでの推論経過の出力も可能である。
The inference result is (line) printer 154, CRT 155,
Alternatively, an auxiliary storage device 156 such as a disk or M / T
Output to. With the inference control command 160, it is possible to output the inference progress up to the inference result.

補助記憶装置156には、規則ファイル103、初期事
実ファイル104、連想ネット106を保存し、エラー
回復や前処理に利用出来る。
The rule file 103, the initial fact file 104, and the associative net 106 are stored in the auxiliary storage device 156 and can be used for error recovery and preprocessing.

以下、具体的な事実や規則とこれを用いた連想ネットワ
ークの作成について説明する。
The specific facts and rules and the creation of an associative network using them will be described below.

第1C図は上記プロダクションシステムで用いるルール
集合の具体例を示す。同図において、>FはFが変数で
あることを示し、>のつかない文字は定数であることを
示す。Fは女性、Mは男性、またPは人を示す。さら
に、行動項 (then項)中のadは追加されるべき項目、rdは
除去されるべき項目をそれぞれ示す。
FIG. 1C shows a specific example of the rule set used in the production system. In the figure,> F indicates that F is a variable, and characters without a> indicate a constant. F indicates a woman, M indicates a man, and P indicates a person. Further, in the action item (then item), ad indicates an item to be added, and rd indicates an item to be removed.

初期事実が第1D図に示すものであると仮定して、実行
関係を表わすネットワーク、すなわち、初期事実にもと
づく連想ネットワークが第1E図のように具体化され
る。
Assuming that the initial facts are those shown in FIG. 1D, a network representing the execution relation, that is, an associative network based on the initial facts is embodied as shown in FIG. 1E.

第1E図において、ルール番号R1〜R5で示される水
平線はその上側及び下側が、それぞれ第1C図に示され
るルール集合のうちの関連するルールのif部及びth
en部に対応することを表わしている。水平線の下につ
けた小さい丸印はここから発する矢印で示される大きい
丸印が除去されるべき項目であることを示すものであ
る。
In FIG. 1E, the horizontal lines indicated by the rule numbers R1 to R5 have upper and lower sides, respectively, of the if part and th of the related rule in the rule set shown in FIG. 1C.
This means that it corresponds to the en part. The small circle below the horizontal line indicates that the large circle indicated by the arrow from here is the item to be removed.

第1F図は第1D図の事実を第1E図上にはめ込んだ状
態を示す。第1F図において、大きい丸印中の実線の長
円は入力済の事実を示し、点線の長円は新しい初期事実
(例:Kate comes from Paris)がそこに加えられる時
の状態を示す。さらに、長円を囲む円はルールの項目を
示し、点線で結ばれた項目は関連する項目であることを
示す。
FIG. 1F shows the fact of FIG. 1D inset on FIG. 1E. In FIG. 1F, the solid oval in the large circle indicates the fact that it has been input, and the dotted oval indicates the state when a new initial fact (eg, Kate comes from Paris) is added to it. Furthermore, the circles surrounding the ellipse indicate rule items, and the items connected by dotted lines indicate related items.

第2図は高速に推論を実行するための連想ネット106
の構成を示す。
FIG. 2 shows an associative net 106 for executing inference at high speed.
Shows the configuration of.

200は、規則のリストであり、その要素201はコー
ド化された規則210であり、条件部211と行動部2
12から成る。条件部、行動部の各項220もコード化
されており、それぞれ条件項213、行動項215〜2
17から構成される。行動項は、さらに、削除項21
5、追加項216、停止項217などに分れる。
Reference numeral 200 is a list of rules, element 201 of which is a coded rule 210, and condition part 211 and action part 2
It consists of 12. Each item 220 of the condition part and the action part is also coded, and the condition item 213 and the action item 215-2 are respectively coded.
It is composed of 17. The action item is further deleted item 21.
5, additional terms 216, stop terms 217, etc.

上記の各項220は、項コード221、項を条件部に持
つ規則(連想規則251)のリスト250を値として持
つ規則連想属性222、共通の型の項(連想項245)
のリスト(連想項リスト244)を、値として持つ項連
想属性223、連想項間の共通部230を値として持つ
共通部属性224、個別な部分(個別構造240その要
素は個別要素243)を値として持つ個別部属性22
5、項が既知事実かどうかを示す事実属性226項が含
む変数(関数でも良い。以後同様)242を順番に並べ
た変数列241を値に持つ変数属性227、項の内容2
46(その要素を247に示す。)を値として持つ内容
層性228、から構成される。
Each of the above terms 220 is a term code 221, a rule associative attribute 222 having as a value a list 250 of rules (associative rules 251) having terms in the condition part, and a common type term (associative term 245).
List (associative term list 244) as a value, an item associative attribute 223, a common part attribute 224 as a value having a common part 230 between associative terms, and an individual part (individual structure 240, whose element is an individual element 243) Individual attribute 22
5. Fact attribute 226 indicating whether the term is a known fact Variable included in the term (function may be used. The same applies hereinafter) Variable attribute 227 having variable string 241 in which values are arranged in order, content 2 of term
The content layer 228 has a value of 46 (the element is shown in 247) as a value.

具体値(列)リスト248は、項の変数の具体値の列
(具体値列249)のリストであり、項が変数242を
含む時の事実属性226の値である。
The concrete value (column) list 248 is a list of concrete value columns (concrete value column 249) of the variable of the term, and is the value of the fact attribute 226 when the term includes the variable 242.

共通部230は、そのコード235と、その内容である
共通構造(その要素である共通要素234は、項の要素
のうちの個別要素243に対応するものを“−”(アン
ダーライン)に変換し、他の項の要素はそのままにした
もの)233を値として持つ構造属性231と、この共
通部を持つすべての項(共通部連想項236)のリスト
である共通部連想項リスト235を値として持つ連想項
属性232とから成る。
The common unit 230 converts the code 235 and the common structure that is the content thereof (the common element 234 that is the element converts the element corresponding to the individual element 243 of the terms into “-” (underline)). , The elements of the other terms are left as they are), and the structure attribute 231 having 233 as a value, and the common part associative term list 235 that is a list of all the terms (common part associative term 236) having this common part as values. And associated item attribute 232.

候補規則リスト260は、(実行)候補規則261のリ
ストである。
The candidate rule list 260 is a list of (execution) candidate rules 261.

以上の説明における連想項の他、共通部、個別構造、具
体値リスト、規則などの各項はデータブロックとして計
算機のメモリに保存される。これらのデータブロックは
一般にグラフ理論でノードと呼ばれる。各項(ノード)
はその属性値により他の項をポイントすることにより相
互に枝を張ることにより接続される。
In addition to the associative terms in the above description, common terms, individual structures, concrete value lists, rules, and other terms are stored as data blocks in the memory of the computer. These data blocks are commonly called nodes in graph theory. Each item (node)
Are connected by branching from each other by pointing to other terms according to their attribute values.

例えば、第2図における連想項220からは、個別部属
性225と個別構造240へ直接に枝を張り、共通部属
性224からポイントされた共通部230とその連想項
属性232からポイントされた連想項リスト235との
2ノードを経由してこの連想項リスト235の要素であ
る連想項236に間接に枝を張ることによりノード間を
接続することにより連想ネットワークを形成する。
For example, from the associative item 220 in FIG. 2, branches are directly formed to the individual part attribute 225 and the individual structure 240, and the associative item pointed from the common part 230 and its associated item attribute 232 pointed to by the common part attribute 224. An associative network is formed by connecting nodes by indirectly branching an associative term 236, which is an element of the associative term list 235, via two nodes of the list 235.

第3図は、コードリストのデータ構造を示す。すなわ
ち、コード化した項220を登録するコードリスト30
0は、項の内容221と対応するコード246から成る
コードペア301を要素とするリストである。項のコー
ド化(後述。ブロック602)に用いる。
FIG. 3 shows the data structure of the code list. That is, the code list 30 for registering the coded terms 220
0 is a list having as elements the code pair 301 composed of the code 246 corresponding to the content 221 of the term. It is used for encoding the term (described later, block 602).

第4図は、連想ネット共通部のデータ構造である。本デ
ータ構造は、連想ネット共通部作成(ブロック603。
後述)の途中段階のものである。すなわち共通部候補4
01は、共通部の候補であり、連想ネット共通部作成処
理終了時点以降は、共通部230と一致する。同様に、
共通部リスト400は、共通部作成中は共通部候補40
1、作成後は共通部230を要素とするリストである。
共通部コード402、構造属性403、項連想属性40
4、共通要素406、連想項リスト405も、共通部候
補に関するものであることを除いては、第2図で説明し
た共通部に関するそれらと同様である。
FIG. 4 shows the data structure of the common part of the associative net. This data structure is created by an association net common part (block 603.
It will be described later). That is, common part candidate 4
01 is a common part candidate, and coincides with the common part 230 after the end of the associative net common part creation processing. Similarly,
The common part list 400 is a common part candidate 40 while the common part is being created.
1. A list having the common unit 230 as an element after being created.
Common part code 402, structure attribute 403, item association attribute 40
4, the common element 406, and the associative term list 405 are also the same as those related to the common part described in FIG. 2 except that they are related to the common part candidate.

第5図は、連想フィルタ105の構成を示す。FIG. 5 shows the structure of the associative filter 105.

連想フィルタは、初期ノード(ノード番号501が0の
ノード)から始まるノード500のトリー構造体であ
る。各ノード500は、ノード番号501、変数特徴属
性502、定数特徴属性503、終端属性504から成
る。システムは、ノード上を動きながら、初期事実の要
素(定数,変数)を読み込むが、変数特徴属性502は
変数を読み込んだ時にシステムが動く先のノード(次ノ
ード507)を、定数特徴属性503は、どの定数50
8を読み込んだら次ノード509がどのノードであるか
のペア506を要素とする表(定数特徴属性値505)
を、それぞれ値として持つ。この値が設定されたノード
を非終端ノードと呼び、後述の第10図のブロック10
04において共通項の要素が取出せたときのブロック1
007及び1011における現ノードがこれに相当す
る。終端属性504は、ノード500が共通部リスト4
00に登録された共通部のいずれかをシステムが読み込
んだ時、初期ノードから到達する先のノ−ドである時、
その共通部230の共通部コード235を、そうでない
時には空を値として持つ。
The associative filter is a tree structure of the node 500 starting from the initial node (node whose node number 501 is 0). Each node 500 includes a node number 501, a variable characteristic attribute 502, a constant characteristic attribute 503, and a termination attribute 504. The system reads the elements (constants, variables) of the initial fact while moving on the node. The variable feature attribute 502 is the node (next node 507) to which the system moves when the variable is read, and the constant feature attribute 503 is , Which constant 50
When 8 is read, a table having a pair 506 as an element indicating which node the next node 509 is (constant feature attribute value 505)
Respectively as a value. A node in which this value is set is called a non-terminal node, and will be described later in block 10 of FIG.
Block 1 when common element can be extracted in 04
The current nodes in 007 and 1011 correspond to this. The end attribute 504 is the common part list 4 of the node 500.
When any one of the common parts registered in 00 is read by the system, when the node is the destination from the initial node,
The common part code 235 of the common part 230 has an empty value otherwise.

この値が空でないノードを終端ノードと呼び、後述の第
10図のブロック1005における現ノードがこれに相
当する。このノードの終端属性には共通部リストの要素
(共通部コード)がセットされる。
A node whose value is not empty is called an end node, and the current node in block 1005 of FIG. 10 described later corresponds to this. The element of the common part list (common part code) is set to the terminal attribute of this node.

第6図は連想ネット作成処理を示す。FIG. 6 shows an associative net creation process.

まず、規則の項のうちその内容が記号列として互いに異
なるものにユニークな番号をつけるために、新コード番
号を1に、規則の項を取出すためのポインタを1に初期
設定する(ブロック600)。次に、規則ファイル10
3から規則の項を取出すとともにポインタを更新する
(ブロック601)。取出した項は、照合の高速化のた
めにコード化して、連想ネット106の規則210に埋
込むとともに、規則連想属性222を設定する(ブロッ
ク602)。さらに、連想ネット106の共通部230
を作成する。以上の処理を規則ファイル103の全ての
規則の項に対して行なった後、連想ネット106の個別
構造240を作成する(ブロック604)。また、連想
フィルタ105を作成する(ブロック605)。
First, a new code number is initialized to 1 and a pointer for retrieving a rule term is initialized to 1 in order to give a unique number to a rule term whose contents are different from each other as a symbol string (block 600). . Next, rule file 10
The rule term is fetched from 3 and the pointer is updated (block 601). The fetched term is coded for speeding up the matching, embedded in the rule 210 of the associative net 106, and the rule associative attribute 222 is set (block 602). Furthermore, the common part 230 of the associative net 106
To create. After the above processing is performed for all the rule items of the rule file 103, the individual structure 240 of the associative net 106 is created (block 604). Also, the associative filter 105 is created (block 605).

第7図は、項をコード化した規則210を作成し、規則
連想属性222を設定するための処理である。
FIG. 7 shows a process for creating a rule 210 in which terms are coded and setting a rule associated attribute 222.

ブロック701では、ブロック601で取出した規則の
項が、コードリスト300に既登録かどうかをチェック
する。既登録なら、登録されている該コードを現コード
とする(ブロック702)。未登録なら、項の内容24
6と新コード番号のペア(コードペア301)を、コー
ドリスト300に追加し(ブロック703)、現コード
番号の値を新コード番号の値に設定し、新コード番号を
更新する(ブロック704)。ブロック705では、現
コード番号にユニークに対応する項コード221を持つ
項220の変数属性227として、取出した項が含む変
数242を先頭から順にリスト結合したもの(変数リス
ト241)を、内容属性228として、項の内容246
を設定する。
In block 701, it is checked whether the rule item extracted in block 601 is already registered in the code list 300. If already registered, the registered code is set as the current code (block 702). If not registered, the content of the section 24
A pair of 6 and the new code number (code pair 301) is added to the code list 300 (block 703), the value of the current code number is set to the value of the new code number, and the new code number is updated (block 704). . In the block 705, as the variable attribute 227 of the term 220 having the term code 221 that uniquely corresponds to the current code number, the variable 242 included in the retrieved term is joined in a list in order from the beginning (variable list 241), and the content attribute 228. As the content of the section 246
To set.

さて、ブロック702あるいは、ブロック705の処理
が終了したら規則210の項220の項コード221を
現コードとし、条件部211、もしくは行動部212か
らネットワークを張って、連想ネット106の一部とす
る(ブロック706)。さらに、処理中の項が、条件項
213なら、その規則連想属性222の値、つまり連想
規則リスト250の要素251として、自項が属する規
則の規則コード214を追加する。
Now, when the processing of the block 702 or the block 705 is completed, the term code 221 of the term 220 of the rule 210 becomes the current code, and the condition section 211 or the action section 212 establishes a network to make it part of the associative net 106 ( Block 706). Further, if the term being processed is the conditional term 213, the rule code 214 of the rule to which the subject term belongs is added as the value of the rule association attribute 222, that is, the element 251 of the association rule list 250.

第8図は、連想ネット106の項の共通部230を抽
出、作成するための処理フローである。
FIG. 8 is a processing flow for extracting and creating the common part 230 of the terms of the associative net 106.

ブロック801では、ブロック601で取出した規則の
項の変数(関数を含む、以後同様)を−に変えたものを
(共通部)候補項401とする。この候補項のコード
(将来の共通部コード)402は、たとえば、取出した
項のコードがfiのときaiとする。次に、ブロック8
02では、候補項401の項連想属性404として、上
記の候補項のコード402を設定する。
In block 801, a variable (including a function, which is the same hereinafter) of the rule term extracted in block 601 is changed to − as a (common part) candidate term 401. The code of the candidate term (future common part code) 402 is, for example, ai when the code of the retrieved term is fi. Next, block 8
In 02, the code 402 of the above candidate item is set as the item association attribute 404 of the candidate item 401.

さて、ブロック803では、(共通部)候補項401
と、共通部リスト400に登録ずみの各候補項との照合
をとり、既登録かどうかのチェックを行なう。ただし、
この照合では、−はどの要素(定数,変数)とも照合が
成功するものとする。
Now, in block 803, (common part) candidate item 401
And the candidate items already registered in the common part list 400 are collated to check whether or not they have already been registered. However,
In this collation, − is assumed to succeed in collating with any element (constant, variable).

既登録なら、まず、候補項と照合した共通部リスト内の
候補項の−以外の要素406のうち、候補項の−と照合
した要素を−に置替えたものを、改めて候補項とする。
この候補項のコードは、上記の照合した共通部リスト内
の候補項のコード402とする(ブロック804)。次
に、この新しい候補項の連想項リストに、もとの候補項
の連想項リストを結合する(ブロック806)。さら
に、もとの候補項と照合した共通部リスト内の候補項を
共通部リスト400から削除する。ブロック803から
ブロック806までの処理を、ブロック803の処理結
果が既登録である間中くり返し、結果が未登録になれ
ば、連想ネット106の共通部リスト400に候補項4
01を追加して(ブロック807)、ブロック601で
取出した項に対する共通部作成処理を終了する。
If already registered, first, among the elements 406 other than-of the candidate term in the common part list matched with the candidate term, the element matched with-of the candidate term-is replaced with-to be a new candidate term.
The code of this candidate term is the code 402 of the candidate term in the above-mentioned collated common part list (block 804). The associative term list of the new candidate terms is then combined with the associative term list of the original candidate terms (block 806). Further, the candidate term in the common part list that matches the original candidate term is deleted from the common part list 400. The processing from block 803 to block 806 is repeated while the processing result of block 803 is already registered. If the result is unregistered, candidate item 4 is added to the common part list 400 of the associative net 106.
01 is added (block 807), and the common part creation processing for the term extracted in block 601 ends.

第9図は、連想ネット106のうち各項に個別な部分
(個別構造240)を、作成するための処理方法を示
す。
FIG. 9 shows a processing method for creating an individual portion (individual structure 240) of each item in the associative net 106.

共通部リスト400の要素、つまり共通部230(以後
の処理では、共通部リストが確定しているので、(共通
部)候補項401は、すべて共通部230になる。)を
順次取出し(ブロック901)、その項連想属性223
の値、つまり連想項リスト244をとり出す(ブロック
902)。次に、その要素、つまり、共通部を共有する
連想項のグループ(連想グループ)のメンバーとなる項
(連想項245)を順次取出す(ブロック903)。連
想項リストの要素の取出しが全て終了すれば、ブロック
901に戻って、共通部リスト400から次の要素を取
出し、共通部リストの要素を全て取出すまで繰返し同じ
処理を行う。
The elements of the common part list 400, that is, the common part 230 (in the subsequent processing, since the common part list is fixed, all the (common part) candidate items 401 become the common part 230) are sequentially taken out (block 901). ), The item associated attribute 223
Value, that is, the associative term list 244 is extracted (block 902). Next, that element, that is, an item (associative item 245) that is a member of a group of associative items (associative group) sharing a common part is sequentially taken out (block 903). When all the elements of the associative term list have been fetched, the process returns to block 901 to fetch the next element from the common part list 400, and the same process is repeated until all the elements of the common part list are fetched.

さて、ブロック904では、取出した連想項904に対
して、共通部230の共通構造233の要素234の値
が−である要素の共通構造内の相対位置にある連想項の
要素247を取出してリストにしたものを同連想項の個
別部属性226の値として、個別構造240に設定す
る。次に、連想項の共通部属性224として、ブロック
901で取出した共通部230のコード235を設定し
(ブロック905)、ブロック903の処理に戻る。
Now, in block 904, with respect to the extracted associative term 904, the element 247 of the associative term at the relative position in the common structure of the element in which the value of the element 234 of the common structure 233 of the common part 230 is − is taken out and the list is obtained. The selected value is set in the individual structure 240 as the value of the individual part attribute 226 of the associative term. Next, the code 235 of the common part 230 extracted in the block 901 is set as the common part attribute 224 of the associative term (block 905), and the process returns to the block 903.

以上、第6〜9図に連想ネット作成法のうち事実や仮説
を組込む前の部分を述べたが、これを第1C図と第1E
を図いた具体例で説明する。
The parts of the associative net creation method before incorporating the facts and hypotheses have been described above with reference to FIGS. 6C and 1C.
This will be described with reference to a specific example.

第6図のブロック600で初期化後、601で規則R1
の項(>F likes wine)を取出し、ブロック602つ
まり第7図の処理を行なう。上記の項をコード化し、コ
ードリスト(300)に設定し(703)、コード化さ
れた項の変数属性227にその変数のリスト(上例では
>Fだけ)を、内部属性228には項の内容、つまり>
F,likes,wineを要素とするリストを設定する(ブロッ
ク705)。ブロック706で規則R1に対応する条件
項213に上記の項のコードを設定し、上記の項が条件
項か判定し(707)、条件項なので、この項の規則連
想属性222に規則R1の識別コードを設定する(70
8)。以上でブロック602の処理を終り、次に603
の処理、つまり第8図の処理を行う。まず項(>F li
ke wine)の変数>Fを特別コード(特殊記号)で置
換えた(likes wineを候補項とし(801),連想項
リスト(236.最初は空)に項のコードを加える(8
02)。上記候補項は共通部リスト(400,最初はこ
れも空)に未登録なので(803),共通部リストに
上記候補項(のコード)を加える(807)。
After initialization at block 600 of FIG. 6, rule R1 at 601.
(> F likes wine) is taken out, and the processing of block 602, that is, FIG. 7 is performed. The above term is coded and set in the code list (300) (703), and the variable attribute 227 of the coded term is the list of that variable (only> F in the above example), and the internal attribute 228 is the term Content, that is >
A list having F, likes, and wine as elements is set (block 705). In block 706, the code of the above term is set in the conditional term 213 corresponding to the rule R1 and it is judged whether the above term is a conditional term (707). Since it is a conditional term, the rule association attribute 222 of this term identifies the rule R1. Set the code (70
8). With the above, the processing of block 602 is completed, and then 603.
Process, that is, the process shown in FIG. First, the term (> F li
The variable> F of ke wine) is replaced with a special code (special symbol) - ( - likes wine is a candidate term (801), and the term code is added to the associative term list (236. initially empty) (8
02). Since the candidate item is not registered in the common part list (400, which is also initially empty) - (803), the candidate item (code thereof) is added to the common part list (807).

以上でブロック603の処理を終り、601に戻り、規
則R1の次の項(>F is female)を取出す。以下、
上記と同様の処理を行ない共通部リスト(400)の値
は(likes wine)と(is female)から構成される
ルストとなる。また規則R1の条件部には(>F is f
emale)のコードも追加される。
The processing of block 603 is finished as described above, and the processing returns to 601 and the next term (> F is female) of rule R1 is extracted. Less than,
The value of the common part list (400) performs the same processing as described above will be Rust composed of - - (I am female) (likes wine) and. In the condition part of rule R1, (> F is f
emale) code is also added.

次に、規則R1の項(John likes>F)が601で取出
されるが、この場合、規則R1の行動部212にそのコ
ードが設定される(ブロック706)。項の内容をコー
ドに入替えるだけなのでad(追加),rm(削除)な
どの情報は保存される。さて、第8図のブロック801
でこの項は(John likes)と変形され候補項となる
が、共通部リスト(400)には(likes wine)が存在
する。そこで803でJohnとwineのいずれもに照合す
るため、804で(likes)が改めて候補項とな
り、805でその連想項リスト(>F like wine)の
コードに807で作成した連想項リスト((John likes
>F)のコードだけを要素とするリスト)をつなぐ。次
に照合した(John like)を共通部リスト(400)
から削除し、803に戻り、新しい候補項(like
s)が共通部リスト(400)にないことをチェック
し、これを共通部リスト(400)に加える(80
7)。
Next, the item of the rule R1 (John likes> F) is fetched at 601. In this case, the code is set in the action part 212 of the rule R1 (block 706). Information such as ad (addition) and rm (deletion) is saved because the content of the term is simply replaced with the code. Now, block 801 in FIG.
Then, this term is transformed into (John likes ) and becomes a candidate term, but (likes wine) exists in the common part list (400). Therefore, in 803, both John and wine are checked against , so in −804 ( likes ) becomes a candidate item again, and in 805, the association item list (> F like wine) code is created in 807. ((John likes
> Lists that have only the code of F) as elements. Next, the collated (John like ) is searched for in the common part list (400).
Remove from, back to the 803, the new candidate term (- like
It is checked that s ) is not in the common part list (400), and this is added to the common part list (400) (80
7).

以上でブロック601に再び戻り、(Adam likes>F)
を取出し、上記と同様の処理を行ない、共通部リスト
(400)は(is female)のコードと((like
s)のコードを要素とするリストとなる。また後者の
要素に対する(共通部)連想項リスト236は(Adam l
ikes>F),(John likes>F),(>F likes win
e)のそれぞれのコードを要素とするリストとなる。
Now, go back to block 601 again (Adam likes> F)
The extraction, the same processing as in the above, the common unit list (400) - and code (IS female from) ((- like
It becomes a list whose elements are the code of s ). Also, the (common part) associative term list 236 for the latter element is (Adam l
ikes> F), (John likes> F), (> F likes win)
It becomes a list with each code of e) as an element.

以上を第1C図の全規則(R1〜R5)の全項に対して
繰返し、処理終了後、ブロック604つまり、第9図の
処理を行ない、連想ネット個別部を作成することによ
り、第1E図の連想ネット(事実や仮設の組込まれてい
ないもの)が作成できる。詳細には共通部リスト(40
0)の要素、例えば(like)に対応するコードを取
出し(901)、その連想項リスト(235)を取出し
(902)その要素つまり連想項220(Adam likes>
F),(John…),(>F likes wine))を取出し
(903),共通部(likes)のの位置にある例
えばAdam,>Fのリストを個別部属性(225)の値
(240)として設定し(904)、共通部属性224
に共通部(likes)のコードを設定する(905)
を全連想項に対して繰返す。
The above is repeated for all the terms of all rules (R1 to R5) in FIG. 1C, and after the processing is completed, block 604, that is, the processing in FIG. You can create an associative net (no facts or temporary items). For details, see the common section list (40
0 elements), for example (- like -) corresponding to take-out the code (901), the extraction associative term list (235) (902) elements thereof, that the associative claim 220 (Adam likes>
Of Adam,> the list of F individual section attributes (225) - F), (John ...), taken out (> F likes wine)) to (903), the common unit (- likes -) of - in the position for example of Set as the value (240) (904), and the common part attribute 224
Common portion (- likes -) to set the code (905)
Is repeated for all associative terms.

第10図は、初期事実104を連想ネット106に組込
むための連想フィルタ105を作成するための処理方法
を示す。
FIG. 10 shows a processing method for creating the associative filter 105 for incorporating the initial fact 104 into the associative net 106.

ブロック1001では連想フィルタ105のノードに与える
番号(新ノード番号)を1に設定する。次に、共通部リ
スト400から順次、その要素235を取出す(ブロッ
ク1002)。取出す要素がなくなれば処理を終了する。取
出す要素があれば、まず、現在のノードを出発ノード
(例えば、番号0のノード)とする(ブロック1004)。
次に、共通部230の要素234を順次取出す(ブロッ
ク1004)。ブロック1006では、取出した要素234が、
−(変数に対応)かどうかをチェックし(ブロック100
6)、Yesなら、現在にノード500の変数特徴属性50
2の値が空かどうかを調らべ(ブロック1007)、空な
ら、新ノード番号を現ノードの変数特徴属性502とし
て設定する(ブロック1008)。空でなければ、変数特徴
属性502の値を現ノードとする(ブロック1010)。ブ
ロック1006の処理結果がNoなら、ブロック1004で取出
した要素234が、現在のノード500の定数特徴属性
502に含まれるかどうかをチェックし(ブロック101
1)、含まれなければ、取出した要素234と新ノード
番号の対を現在のノードの定数特徴属性503に追加し
(ブロック1012)、含まれれば、マッチした定数特徴属
性値505の要素506に対応するノード507を現在
のノードとする。また、ブロック1008,1012の処理が終
了すれば、ブロック1009において、新ノード番号のノー
ドを現ノードにし、新ノード番号を更新する。ブロック
1009,1010,1013の処理の後1004に戻り、共通部230
の要素234がなくなるまで、ブロック1006以下の処理
を繰返す。取出す要素がなくなると、現在のノード50
0の終端属性504に、ブロック1002で取出した共通部
230のコード235を設定する(ブロック1005)。
In block 1001, the number given to the node of the associative filter 105 (new node number) is set to 1. Next, the elements 235 are sequentially extracted from the common part list 400 (block 1002). When there are no more elements to extract, the process ends. If there is an element to be extracted, first, the current node is set as the starting node (for example, the node having the number 0) (block 1004).
Next, the elements 234 of the common part 230 are sequentially taken out (block 1004). In block 1006, the extracted element 234 is
-(Corresponds to variable) is checked (block 100
6) If Yes, the variable feature attribute 50 of the node 500 is currently
It is checked whether the value of 2 is empty (block 1007). If it is empty, the new node number is set as the variable feature attribute 502 of the current node (block 1008). If it is not empty, the value of the variable characteristic attribute 502 is set as the current node (block 1010). If the processing result of the block 1006 is No, it is checked whether the element 234 extracted in the block 1004 is included in the constant feature attribute 502 of the current node 500 (block 101).
1) If not included, the pair of the fetched element 234 and the new node number is added to the constant characteristic attribute 503 of the current node (block 1012), and if included, it is added to the element 506 of the matched constant characteristic attribute value 505. The corresponding node 507 is set as the current node. When the processing of blocks 1008 and 1012 is completed, the node having the new node number is made the current node and the new node number is updated in block 1009. block
After processing 1009, 1010, and 1013, the process returns to 1004 and the common unit 230
The processing of the block 1006 and the subsequent steps is repeated until the element 234 of is eliminated. When there are no more elements to extract, the current node 50
The code 235 of the common part 230 extracted in the block 1002 is set to the terminal attribute 504 of 0 (block 1005).

以上が連想フィルタ105の作成法であるが、第1C図
の規則に対して、連想フィルタを構成した具体例が第1
G図である。この具体例で連想フィルタの作成法を述べ
る。
The above is the method of creating the associative filter 105. The first specific example of constructing the associative filter is based on the rule of FIG. 1C.
FIG. A method of creating an associative filter will be described in this specific example.

まず、第1C図の規則から第8図に従って共通部リスト
を作成する。第8図によると、変数やそれに対応する位
置にある定数は全て特別コードによって置き換えられ
共通部リストに設定される。従って共通部リストは((
likes)(loves)(lies)(is female)
is beautiful)(is young)(comes from Par
is))となる。
First, a common part list is created according to the rules of FIG. 1C and FIG. According to FIG. 8, variables and constants at positions corresponding to them are all replaced by the special code and set in the common part list. Therefore, the common part list is ((
Likes ) ( loves ) ( lies) ( is female)
(- is beautiful) (- is young) (- comes from Par
is)).

第10図のブロック1002で上記共通部リストの各要
素(共通項)、例えば(likes)を取り出す。10
04でこの要素の要素であるやlikesを順次取出す。
なら変数特徴属性(第5図の502)に次ノード番号
を、likesなど以外なら定数特徴属性(第5図の5
03に定数値(この場合likes)と次ノード番号の対
(第5図の506)を追加する。これを繰返してネット
ワークのパスを構成する。共通項の要素を全て取出した
ら、現ノードの終端属性(第5図の504)に共通項の
識別コード(共通部コード)をセットする(第10図の
ブロック1005)。上記の共通部リストの全要素に対
し以上の処理を終了すると第1G図の連想フィルタが構
成できる。
Each element of the common unit list in block 1002 of FIG. 10 (a common term), for example taken out (- - likes). 10
04 is an element of this element - and likes sequentially take out the.
- if the variable characteristic attributes (502 of FIG. 5) the next node number, - likes etc. - constant feature attribute (Figure 5 if other than 5
A constant value (likes in this case) and a next node number pair (506 in FIG. 5) are added to 03. This is repeated to configure the network path. When all the elements of the common item are taken out, the identification code (common part code) of the common item is set in the terminal attribute (504 of FIG. 5) of the current node (block 1005 of FIG. 10). When the above processing is completed for all the elements of the common part list, the associative filter of FIG. 1G can be constructed.

第11図は、初期事実104を連想ネット106に組込
むための処理を示す。
FIG. 11 shows a process for incorporating the initial fact 104 into the associative net 106.

まず、初期事実ファイル104から事実を先頭から順に
取出し(ブロック1100)、取出す事実がある間、以下の
処理を行う。つまり、ブロック1101では、事実を連想フ
ィルタ105に通して、対応する共通部230と個別具
体値を取出す(事実のフィルタリング処理(第12
図))。つぎに、この共通部230の連想項リスト23
5の中から、上で取出した個別具体値に、その個別構造
240が照合する連想項236を選択し、その事実属性
226に具体値列249を追加する(ブロック1102)。
First, the facts are sequentially fetched from the initial fact file 104 (block 1100), and while the facts are fetched, the following processing is performed. In other words, in block 1101, the fact is passed through the associative filter 105 to extract the corresponding common unit 230 and the individual concrete value (fact filtering process (twelfth).
(Figure)). Next, the associative term list 23 of the common unit 230
The associative term 236 with which the individual structure 240 collates is selected from the 5 to the individual concrete value extracted above, and the concrete value string 249 is added to the fact attribute 226 (block 1102).

第12図は、事実のフィルタリング処理を示す。FIG. 12 shows a fact filtering process.

まず、個別具体値(リスト)を空に設定し、さらに、現
在のノード500を出発ノード(ノード番号0)とし
(ブロック1201)、ブロック1100で取出した事実に対し
て、その要素(すなわち事実の文を構成する定数や変
数)を、前から順次取出す(ブロック1202)。
First, the individual concrete value (list) is set to empty, the current node 500 is set as the starting node (node number 0) (block 1201), and the element (that is, the fact The constants and variables that make up the statement are fetched sequentially from the front (block 1202).

取出した要素に対して、それが、現在のノード500の
定数特徴属性値505に含まれるかどうかをチェックし
(ブロック1203)、含まれなければ、現在のノードの変
数特徴属性502の値が空かどうかをチェックし(ブロ
ック1204)、空なら、事実フィルタリング処理の結果に
空を設定(ブロック1208)し処理を終了する。空でなけ
れば、ブロック1202で取出した要素を個別具体値(リス
ト)に追加する。この後、あるいは、ブロック1203の処
理結果がYesの時、前者では変数特徴属性502によ
って示される次ノードを、後者では、取出した要素とそ
の定数部508が一致する定数特徴属性値505の要素
の次ノード部の509が示す次ノードを現在のノード5
00とし、ブロック1202の処理に戻る。ブロック1202で
取出す要素がなくなれば、現在のノード500の終端属
性504が空かどうかをチェックし(ブロック1207)、
空でないことが確認できたら、事実のフィルタリング処
理の結果として、終端属性504の値(つまり共通部コ
ード235)と、個別具体値(リスト)を設定する(ブ
ロック1209)。終端属性504が空なら、事実のフィル
タリング処理の結果を空とする(ブロック1208)。
For the fetched element, it is checked whether it is included in the constant feature attribute value 505 of the current node 500 (block 1203), and if not included, the value of the variable feature attribute 502 of the current node is empty. It is checked whether or not (block 1204), and if it is empty, the result of the fact filtering process is set to empty (block 1208) and the process ends. If it is not empty, the element fetched in block 1202 is added to the individual concrete value (list). After this, or when the processing result of the block 1203 is Yes, in the former case, the next node indicated by the variable characteristic attribute 502, and in the latter case, the element having the constant characteristic attribute value 505 in which the extracted element and the constant part 508 thereof match The next node indicated by 509 in the next node section is the current node 5.
00 and returns to the processing of block 1202. If there are no elements to be fetched in block 1202, it is checked whether the termination attribute 504 of the current node 500 is empty (block 1207),
If it is confirmed that it is not empty, the value of the terminal attribute 504 (that is, the common part code 235) and the individual concrete value (list) are set as a result of the fact filtering process (block 1209). If the termination attribute 504 is empty, the result of the fact filtering process is empty (block 1208).

事実を連想ネットワークに組み込むための連想フィルタ
の使用法は以上の通りである。これをより具体的に第1
D図の事実を第1E図の連想ネットワークに連想フィル
タ第1G図を用いて組込む例で説明する(第11〜13
図参照)。第1G図において、枝上の定数(lies,isな
ど)はすぐ上側にあるノード(○印)の定数特徴属性の
要素値である。終端ノード(◎印)はそれぞれ( )付
文の識別コードをその終端属性として持つ。例えば第1
D図の事実の最終の(Kate comes from Paris)に対し
ては、第1G図の連想フィルタのパスのうち、その構成
要素である各枝が全て上記の事実の構成要素と一致する
パスである(>F,>M,>Pなど>を付加した変数に
対応する枝はどれにも一致する)第1G図の右端のパス
(>P comes from Paris)が第12図のブロック12
01〜1207の処理によって選ばれる。
The usage of the associative filter for incorporating the facts into the associative network is as described above. This is more specifically the first
The fact of FIG. D will be described with an example of incorporating it into the associative network of FIG. 1E using the associative filter of FIG. 1G (11 to 13).
See figure). In FIG. 1G, the constants on the branch (lies, is, etc.) are the element values of the constant feature attribute of the node (marked with ○) immediately above. Each terminal node (double circle) has the identification code of () as a terminal attribute. For example, the first
For the final fact (Kate comes from Paris) in FIG. D, among the paths of the associative filter in FIG. 1G, each branch that is a constituent element is a path in which all the constituent elements of the above fact match the constituent elements. (>F,>M,> P, etc., the branch corresponding to the variable added with> matches any branch) The path at the right end (> P comes from Paris) in FIG. 1G is block 12 in FIG.
It is selected by the processing of 01 to 1207.

より詳細には、まずブロック1201で現ノードが第1
G図の出発ノードに設定され、上例の事実である(Kate
comes from Paris)の要素Kateが第12図の1202
で取出される。第1G図の出発ノードからは特別コード
(変数)に対応する枝しか出てない、つまり定数特徴属
性は空なのでブロック1203では“No”で、ブロック
1204で“Yes”となり、ブロック1205でKateが
対応する変数(この場合>P)の個別具体値として設定
され、ブロック1205で先のノードが現ノードにな
る。再びブロック1202に戻り、次の要素comesが取
出され、ブロック1203でcomesが現ノードの定数特
徴属性に含まれることが分り(第1G図の出発ノードの
すぐ下の○印ノードからcomesの枝が出ていることから
分り)、ブロック1206で、対応する枝の先のコード
(第1G図の3段目の右端のノード)に現ノードが移
り、再び1202に戻り、次の要素fromを取り出す。以
下、同様の処理の反復により、第1G図の右端のパスの
最下端の◎印のノードが現ノードとなり、ブロック12
07に入る。このノードの終端属性は(comes from P
aris)の識別コードであり、空でないから終端ノードで
あり、ブロック1209に進む。
More specifically, first in block 1201, the current node is first
It is set at the departure node of the G diagram and is the fact of the above example (Kate
The element Kate (from comes Paris) is 1202 in FIG.
Taken out in. Only the branch corresponding to the special code (variable) is output from the departure node in FIG. 1G, that is, since the constant feature attribute is empty, it is “No” in block 1203, “Yes” in block 1204, and Kate in block 1205. It is set as the individual concrete value of the corresponding variable (> P in this case), and the previous node becomes the current node in block 1205. Returning again to block 1202, the next element comes is extracted, and it is found in block 1203 that comes is included in the constant feature attribute of the current node (the branch of comes from the circle marked node immediately below the departure node in FIG. 1G). As can be seen from the output, the current node moves to the code at the end of the corresponding branch (the node at the right end of the third row in FIG. 1G) in block 1206, returns to 1202 again, and extracts the next element from. After that, by repeating the same processing, the node at the bottom of the rightmost path in FIG.
Enter 07. End attributes of this node (- comes from P
aris) identification code, which is a non-empty terminal node, and the processing proceeds to block 1209.

さて、1209で、この終端属性、つまり(comes from
Paris)の識別コード(共通部コード735の値)が取
出される。同時に個別具体値(−つまり変数)に対応す
る部分の定数値も取出される。以上が、第11図のブロ
ック1101つまり、事実のフィルタリングの結果とし
て取出されるものである。次に、取出した共通部コード
に対する連想項の事実属性に個別具体値を設定する(ブ
ロック1102)。即ち、まず、取出した共通部コード
(の値)を持つ共通部(第2図の230)を取出し、そ
の連想項属性(232)から共通部連想項リスト235
を取出す(1301)。さらに、このリストの要素(連
想項236)が指す全ての項(220)に対して、その
事実属性226の指す具体値リスト248に、上記の個
別具体値(本例ではKate)を設定する(第13図の13
06)。以上を繰返すことにより、連想ネット第1E図
の中空の円内に第1D図の事実が第1G図の連想フィル
タを用いて組込まれ第1F図の様に事実を(円内に)組
込んだ連想ネットを作成できる。
Now, in 1209, this termination attribute, that is, (comes from
The identification code of Paris) (the value of the common part code 735) is taken out. At the same time, the constant value of the part corresponding to the individual concrete value (ie, variable) is also taken out. The above is taken out as a result of the filtering of facts, that is, the block 1101 of FIG. Next, an individual concrete value is set to the fact attribute of the associative term for the extracted common part code (block 1102). That is, first, the common part (230 in FIG. 2) having the extracted common part code (value thereof) is taken out, and the common part associative item list 235 is obtained from the associative item attribute (232).
Take out (1301). Furthermore, for all the terms (220) pointed to by the elements (associative terms 236) of this list, the above-mentioned individual concrete values (Kate in this example) are set in the concrete value list 248 indicated by the fact attribute 226 ( 13 of FIG.
06). By repeating the above, the facts of FIG. 1D are incorporated into the hollow circle of FIG. 1E using the associative filter of FIG. 1G, and the facts are incorporated (inside the circle) as shown in FIG. 1F. You can create an associative net.

第13図は、初期事実に対応する事実属性226の値と
して、具体値列249を組込むための処理(事実属性設
定処理)である。
FIG. 13 shows a process (fact attribute setting process) for incorporating the concrete value sequence 249 as the value of the fact attribute 226 corresponding to the initial fact.

ブロック1301では、事実のフィルタリング処理の結果が
空でなければ、共通部の項連想属性232の値、つま
り、(共通部)連想項リスト235を取出す。結果空な
ら事実属性設定処理を終了する。次に、(共通部)連想
項リスト235から連想項236を先頭から順に取出し
(ブロック1302)、以下の処理を行う。
In block 1301, if the result of the fact filtering process is not empty, the value of the item association attribute 232 of the common part, that is, the (common part) associative item list 235 is extracted. If the result is empty, the fact attribute setting process ends. Next, associative terms 236 are taken out from the (common part) associative term list 235 in order from the beginning (block 1302), and the following processing is performed.

まず、事実のフィルタリング処理の結果である事実の個
別具体値と上記の連想項236の個別構造240との照
合をとる。個別構造240の要素243が変数の時は、
対応する位置の個別具体値の要素が、その変数に対する
変数具体値として設定される(ブロック1303)。照合が
不成功ならブロック1302に戻り、次の連想項をとり出
す。照合が成功すれば、上記の連想項236の変数属性
227の値が空かどうかをチェックし(ブロック130
4)、空なら、さらに事実属性226が空かどうかをチ
ェックする(ブロック1308)。空でなければ、すでに、
連想ネットに組込み済みの事実であるから、ブロック13
02に戻り、次の連想項の処理を行う。空であれば、上記
の連想項の事実属性を空以外、例えばtに設定し(ブロ
ック1309)、同じく規則連想属性222の値である連想
規則リスト250を、候補規則リスト260に結合し
(ブロック1307)、ブロック1302に戻る。
First, the individual concrete value of the fact, which is the result of the fact filtering process, is compared with the individual structure 240 of the associative term 236. When the element 243 of the individual structure 240 is a variable,
The element of the individual concrete value at the corresponding position is set as the variable concrete value for the variable (block 1303). If the collation is unsuccessful, the process returns to block 1302 to fetch the next associative term. If the matching is successful, it is checked whether or not the value of the variable attribute 227 of the associative term 236 is empty (block 130).
4) If it is empty, it is further checked whether the fact attribute 226 is empty (block 1308). If not empty, already
Since it is a fact that has already been incorporated in the association network, block 13
Returning to 02, the next associative item is processed. If it is empty, the fact attribute of the above-mentioned associative term is set to other than empty, for example, to t (block 1309), and the associative rule list 250 that is also the value of the rule associative attribute 222 is combined with the candidate rule list 260 (block 1307) and returns to block 1302.

ブロック1304で、連想項の変数属性値が空でなければ、
ブロック1303で設定した変数具体値(列)が連想項の事
実属性226の値(具体値リスト248)の要素である
具体値列249のどれか一致するかをチェックし(ブロ
ック1305)、一致すれば、ブロック1302に戻り、次の連
想項の処理を行う。一致しなければ、変数具体値(列)
を具体値リスト248に追加し、ブロック1307の処理を
行う。
At block 1304, if the variable attribute value of the associative term is not empty,
It is checked whether the variable concrete value (column) set in the block 1303 matches any of the concrete value columns 249 that are the elements of the value (concrete value list 248) of the fact attribute 226 of the associative term (block 1305), and if there is a coincidence. For example, the process returns to block 1302 and the next associative term is processed. If they do not match, the concrete value of the variable (column)
Is added to the concrete value list 248, and the process of block 1307 is performed.

第14図は、推論実行プロセッサ102の処理方式を示
す。
FIG. 14 shows a processing method of the inference execution processor 102.

推論の実行のためには、まず、候補規則リスト260が
空かどうかをチェックし(ブロック1401)、空なら推論
実行処理を終了する。空でなければ、候補規則リスト2
60の要素である候補規則261の中から最初に実行す
る規則を選択する(ブロック1402…競合解消処理)。こ
の場合、不変属性が設定されている規則は、推論結果が
新事実の生成や事実の削除など、環境の変化に寄与しな
いので選択の対象外とする。次に、選択された規則を実
行し(ブロック1403)、その結果が変化(上記の環境の
変化に寄与する場合)なら、候補規則261で不変属性
が設定されているものは、すべてその不変属性を解除し
(ブロック1404)、ブロック1401へ戻る。結果が不変な
ら、実行した規則に不変属性を設定し(ブロック1405)
ブロック1401へ戻る。結果が不成立なら(規則の条件が
成立しない場合)実行した規則261を、候補規則リス
ト260から削除し(ブロック1406)、やはり、ブロッ
ク1401へ戻る。結果が“停止”なら、本処理(推論実行
処理)を終了する。
In order to execute the inference, it is first checked whether the candidate rule list 260 is empty (block 1401), and if it is empty, the inference execution process is terminated. Candidate rule list 2 if not empty
The rule to be executed first is selected from the candidate rules 261 which are the elements of 60 (block 1402 ... Conflict resolution processing). In this case, the rule for which the invariant attribute is set is excluded from the selection because the inference result does not contribute to changes in the environment such as generation of new facts and deletion of facts. Next, the selected rule is executed (block 1403), and if the result is a change (if it contributes to the above-mentioned change in the environment), all the invariant attributes set in the candidate rules 261 are the invariant attributes. Is canceled (block 1404) and the process returns to block 1401. If the result is immutable, set the immutable attribute in the rule that fired (block 1405)
Return to block 1401. When the result is not satisfied (when the condition of the rule is not satisfied), the executed rule 261 is deleted from the candidate rule list 260 (block 1406), and the process also returns to the block 1401. If the result is "stop", this process (inference execution process) is terminated.

第15図は規則実行処理(ブロック1403)を示したもの
である。まず、結果を、“不成立”にし(ブロック150
0)、次に実行規則の条件部211が満足されるかどう
かをチェックする。変数に対しては具体値が矛盾なく決
めることができるかをチェックする(以下ブロック150
1)。条件が不成立なら、本処理(規則実行処理)を直
ちに終了する。条件が成立すれば、行動部212を実行
し(ブロック1502)、その結果が“不変”なら本処理の
結果を“不変”とし(ブロック1505)、ブロック1501に
戻り、条件部211が、異なる具体値の組に対して成立
するかをチェックする。行動部実行結果が“停止”なら
規則実行処理結果を“停止に設定し(ブロック1503)、
“変化”なら本処理の結果を“変化”にして(ブロック
1504)、規則実行処理を終了する。
FIG. 15 shows the rule execution processing (block 1403). First, the result is set to “not satisfied” (block 150
0) Next, it is checked whether the condition part 211 of the execution rule is satisfied. For variables, check whether concrete values can be determined consistently (block 150 below).
1). If the condition is not satisfied, this process (rule execution process) is immediately terminated. If the condition is satisfied, the action unit 212 is executed (block 1502), and if the result is “invariant”, the result of this processing is set to “invariant” (block 1505), the process returns to block 1501, and the condition unit 211 changes Check if it holds for a set of values. If the action part execution result is "stop", the rule execution processing result is set to "stop" (block 1503),
If it is "change", change the result of this process to "change" (block
1504), and ends the rule execution process.

第16図は実行条件判定処理(ブロック1501)を示す。FIG. 16 shows the execution condition determination processing (block 1501).

実行規則の条件部211の先頭から順に条件項213を
取出し(ブロック1601)、取出した条件項213の事実
属性226をチェックし(ブロック1602)、その値がt
(つまり変数を含まない項でしかも条件が成立する)な
ら、次の条件項を取出すためにブロック1601に戻る。事
実属性の値が空なら、条件が不成立であるから、条件判
定処理の結果を“不成立”に設定して(ブロック160
6)、本処理、すなわち、実行条件判定処理を終了す
る。事実属性の値が、tや空以外であれば、その要素、
つまり具体値列249を順次取出し(ブロック1603)、
取出した具体値列と変数属性227の値(変数列24
1)との照合をとる(条件項変数部照合処理…ブロック
1604)。照合が成功すれば、すなわち変数の具体値が矛
盾なく定まれば(詳細は第17図)、次の条件項を調べ
るためにブロック1601に戻り、照合が成功しなければ、
次の具体値を取出すために、ブロック1603に戻る。ブロ
ック1603において、次に取出すべき具体値列がなくなれ
ば、ブロック1606の処理を行う。ブロック1601で、次に
取出すべき条件項がなくなれば、条件判定処理の結果を
“成立”に設定して(ブロック1605)、本処理を終了す
る。
Condition items 213 are sequentially fetched from the beginning of the condition part 211 of the execution rule (block 1601), and the fact attribute 226 of the fetched condition items 213 is checked (block 1602), and the value is t.
If so (that is, the term does not include a variable and the condition is satisfied), the process returns to block 1601 to fetch the next conditional term. If the value of the fact attribute is empty, the condition is not satisfied, so the result of the condition determination processing is set to “not satisfied” (block 160
6), this process, that is, the execution condition determination process ends. If the value of the fact attribute is not t or empty, the element,
That is, the concrete value sequence 249 is sequentially fetched (block 1603),
The extracted concrete value sequence and the value of the variable attribute 227 (variable sequence 24
1) Matches with (condition term variable part matching process ... block)
1604). If the matching is successful, that is, if the concrete values of the variables are determined consistently (details are shown in FIG. 17), the process returns to block 1601 to check the next conditional term, and if the matching is not successful,
Return to block 1603 to fetch the next concrete value. In block 1603, if there is no more concrete value sequence to be taken out next, the process of block 1606 is performed. If there are no more conditional terms to be taken out at block 1601, the result of the condition determination processing is set to "established" (block 1605) and this processing ends.

第17図は、条件項変数部照合処理(ブロック1604)を
示す。
FIG. 17 shows the conditional variable matching process (block 1604).

変数列241から、その要素である変数242を順番に
取出し(ブロック1701)、取出した変数1702の値が、同
じ規則内の前の条件項との照合においてすでに定まって
いるか(つまり既束縛変数かどうか)をチェックし(ブ
ロック1702)、未束縛なら該変数を未束縛変数列に加
え、具体値列の対応要素を束縛値とし(ブロック170
3)、次の変数を処理するためにブロック1701に戻る。
既束縛変数に対しては、束縛値と具体値列249の対応
要素が一致するかどうかチェックし、一致すればブロッ
ク1701に戻り、一致しなければ、未束縛変数列の変数を
すべて未束縛にし、未束縛変数列をクリアし(ブロック
1705)、本処理(条件項変数部照合処理)の結果を“照
合不成功”に設定し(ブロック1706)、本処理を終了す
る。
The variable 242 that is the element is fetched from the variable string 241 in order (block 1701), and the value of the fetched variable 1702 has already been determined in the collation with the previous conditional term in the same rule (that is, whether it is a bound variable or not). (Block 1702), if it is unbound, add the variable to the unbound variable string and set the corresponding element of the concrete value string as the bound value (block 1702).
3), return to block 1701 to process next variable.
For a bound variable, it is checked whether the bound value and the corresponding element of the concrete value sequence 249 match, and if they match, the process returns to block 1701. If they do not match, all variables in the unbound variable string are unbound. , Clear unbound variable string (block
1705), the result of this process (condition term variable part collation process) is set to "unsuccessful collation" (block 1706), and this process ends.

さて、ブロック1701において、変数列241から取出す
べき要素がなくなれば、本処理の結果を“照合成功”に
設定して(ブロック1707)、本処理を終了する。
Now, in block 1701, when there are no more elements to be taken out from the variable string 241, the result of this processing is set to "successful collation" (block 1707), and this processing ends.

第18図は、行動部実行処理(第15図のブロック150
2)を示す。
FIG. 18 shows an action part execution process (block 150 in FIG. 15).
2) is shown.

まず、本処理(行動部実行処理)の処理結果を、“不
変”に初期設定する(ブロック1801)。つぎに、実行規
則の行動部212の行動項215〜217を先頭から順
番に取出す((ブロック1802)。取出した行動項が追加
項216かどうかチェックし(ブロック1803)、追加項
なら、追加処理を行う(ブロック1804)。次に、行動項
が削除項215かどうかをチェックし(ブロック180
5)、もしそうなら削除処理を行ない(ブロック180
6)、そうでないなら停止項かどうかをチェックし(ブ
ロック1807)、停止項217なら行動部実行処理の結果
を“停止”に設定して(ブロック1809)本処理を終え
る。行動項が以上のいずれの項でもなければ、該当する
処理を行ない(ブロック1808)、ブロック1802に戻り次
の行動項の処理を行う。ブロック1804,1806の処理の後
も、同様にブロック1802に戻る。ブロック1802で取出す
べき行動項がなくなれば、変数242の束縛値をクリア
し(ブロック1810)、本処理を終了する。
First, the processing result of this processing (action section execution processing) is initialized to "invariant" (block 1801). Next, the action items 215 to 217 of the action part 212 of the execution rule are taken out in order from the beginning ((block 1802). It is checked whether the taken action item is the additional item 216 (block 1803), and if it is the additional item, the additional processing is performed. (Block 1804) Next, it is checked whether the action item is the deletion item 215 (block 180).
5) If yes, perform delete processing (block 180
6) If not, a check is made to see if it is a stop item (block 1807), and if it is a stop item 217, the result of the action part execution process is set to "stop" (block 1809), and this process ends. If the action item is not any of the above items, the corresponding process is performed (block 1808), the process returns to block 1802, and the process of the next action item is performed. After the processes of blocks 1804 and 1806, the process similarly returns to block 1802. If there is no action item to be taken out in block 1802, the bound value of the variable 242 is cleared (block 1810), and this processing ends.

第19図は、追加処理(第18図のブロック1804)を示
す。
FIG. 19 shows the add process (block 1804 in FIG. 18).

まず、追加値216の事実属性226の値をチェックす
る(ブロック1900)。t(追加項は変数を含まず、かつ
既知事実である。)なら、直ちに追加処理を終了する。
空なら、追加項の変数属性227が空かどうかをチェッ
クし(ブロック1903)、Yesなら追加項の事実属性2
26にtをセットし(ブロック1904)、Noなら追加項
の事実属性226に、変数属性227の値、つまり変数
列241の各要素242を具体化させたもの(以下、変
数の具体値と呼ぶ)を追加する(ブロック1902)。ブロ
ック1900の結果が、tあるいは空以外なら、追加項の変
数の具体値が、具体値リスト248の要素のどれかと一
致するかをチェットし(ブロック1901)、一致すれば追
加項目は既知事実であるから追加処理を終了し、不一致
なら、上述のブロック1902の処理を行う。ブロック190
2、ブロック1904の処理の後、行動部実行結果を“変
化”にセットし(ブロック1905)、追加項の規則連想属
性222の値、つまり連想規則リスト250を候補規則
リスト260に結合する(ブロック1906)。
First, the value of the fact attribute 226 of the additional value 216 is checked (block 1900). If t (the additional term does not include a variable and is a known fact), the additional process is immediately terminated.
If it is empty, it is checked whether the variable attribute 227 of the additional term is empty (block 1903). If Yes, the fact attribute 2 of the additional term is checked.
26 is set to t (block 1904), and if No, the fact attribute 226 of the additional term is the value of the variable attribute 227, that is, each element 242 of the variable sequence 241 is embodied (hereinafter referred to as a concrete value of the variable). ) Is added (block 1902). If the result of block 1900 is not t or empty, it is checked whether the concrete value of the variable of the additional term matches any of the elements of the concrete value list 248 (block 1901). If they match, the additional item is a known fact. Therefore, the addition process is terminated, and if they do not match, the process of the above block 1902 is performed. Block 190
2. After the processing of block 1904, the action part execution result is set to “change” (block 1905), and the value of the rule association attribute 222 of the additional term, that is, the association rule list 250 is combined with the candidate rule list 260 (block 1906).

次に、追加項の項連想属性223をとり出す(ブロック
1907)。項連想属性223が空なら追加処理を終了し、
空でないなら、その値の要素(連想項245)を順次取
出す(ブロック1908)。連想項245の処理が全て終了
すれば、追加処理を終了する。そうでなければ、連想項
の個別構造240と、追加項の個別構造(ただし変数は
具体化されている。)との照合をとる(ブロック190
9)。照合が不成功ならブロック1908に戻り次の連想項
を取出す。照合が成功すれば、連想項の変数の具体値
(ブロック1902で説明したもの。)が連想項の具体値リ
スト248の要素249のどれかと一致するかチェック
し、(ブロック1910)、どれかと一致すれば、直ちに、
どれとも一致しなければ、連想項245の規則連想属性
222の値、すなわち連想規則リスト250を候補規則
260に結合した(ブロック1911)後、ブロック1908に
戻り、次の連想項の処理を行なう。
Next, the term association attribute 223 of the additional term is extracted (block
1907). If the item association attribute 223 is empty, the adding process is terminated,
If it is not empty, elements of that value (associative term 245) are sequentially fetched (block 1908). When all the processes of the associative item 245 are completed, the addition process is completed. If not, the individual structure 240 of the associative term is compared with the individual structure of the additional term (however, the variable is embodied) (block 190).
9). If the collation is unsuccessful, the process returns to block 1908 to fetch the next associative term. If the matching is successful, it is checked whether the concrete value of the variable of the associative term (as described in block 1902) matches any of the elements 249 of the concrete value list 248 of the associative term (block 1910), and it matches any of them. If you do, immediately
If they do not match, the value of the rule association attribute 222 of the associative item 245, that is, the associative rule list 250 is combined with the candidate rule 260 (block 1911), and then the process returns to the block 1908 to process the next associative item.

第20図は、削除処理(第18図のブロック1806)を示
す。
FIG. 20 shows the deletion process (block 1806 in FIG. 18).

まず、削除項215の事実属性226の値をチェックす
る(ブロック2001)。空なら削除処理を終了する。t
(削除項は変数を含まず、しかも既知事実である。)な
ら、削除項215の事実属性226を空にし(2004)、
さらに、候補規則リスト260から削除項215の規則
連想属性222の値、つまり連想規則リストの要素25
1を全て削除する(ブロック2005)。ブロック2001の結
果が、tや空以外なら、削除項215の変数属性227
の値(変数列241)の各要素(変数242)を具体化
させたもの(変数の具体値。ブロック1902で定義したも
のと同じ。)が、同じ削除項215の具体値リスト24
8の要素249のどれかと一致するかをチェックし(ブ
ロック2002)、一致しなければ、削除処理を終了し、一
致すれば、上記の変数の具体値を、削除項215の事実
属性226の値、すなわち具体値列リストから削除する
(ブロック2003)。ブロック2003、ブロック2005の終了
後、行動部実行結果を、“変化”に設定する(ブロック
2006)。
First, the value of the fact attribute 226 of the deletion item 215 is checked (block 2001). If it is empty, the deletion process ends. t
(If the deletion term does not include a variable and is a known fact.), The fact attribute 226 of the deletion term 215 is emptied (2004),
Furthermore, the value of the rule association attribute 222 of the deletion term 215 from the candidate rule list 260, that is, the element 25 of the association rule list
Delete all 1s (block 2005). If the result of block 2001 is other than t or empty, variable attribute 227 of deletion item 215
Of each element (variable 242) of the value (variable string 241) (the concrete value of the variable, the same as the one defined in block 1902) is the concrete value list 24 of the same deletion term 215.
No. 8 element 249 is matched (block 2002), and if not matched, the deletion processing is terminated, and if matched, the concrete value of the above variable is set to the value of the fact attribute 226 of the deleted term 215. , I.e., deleted from the concrete value column list (block 2003). After the end of blocks 2003 and 2005, the action part execution result is set to “change” (block
2006).

次に、削除項215の項連想属性223をチェックする
(ブロック2007)。空なら、削除処理を終了する。空で
なければ、項連想属性の値、すなわち、連想項リスト2
44の要素(連想項245)を順次取出す(ブロック20
08)。全ての連想項を取出せば、削除処理を終了する。
連想項に対しては、その個別構造240が、削除項の個
別構造(ただし変数要素を具体化したもの)と照合する
か(具体化してない変数は全ての定数と照合することを
前提とする。)をチェックし(ブロック2009)、照合が
不成功なら、次の連想項の処理をするためにブロック20
08に戻る。照合が成功した場合、連想項の変数属性22
7が空かどうかをチェックし(ブロック2010)、空でな
ければ、連想項の変数の具体値(ブロック2002で定義し
たもの)が、同じ連想項の具体値リスト248の要素2
49のいずれかと一致すればこれを削除して、いずれと
も一致しなければ何もしないで、ブロック2008に戻る。
ブロック2010の結果が空なら、連想項は定義しか含まな
いなら、まず、連想項の事実属性226を空にし(ブロ
ック2012)、次に、候補規則リスト260から連想項の
規則連想属性222の値、つまり連想規則リスト250
の要素251を全て削除し(ブロック2013)、ブロック
2008に戻る。
Next, the item association attribute 223 of the deletion item 215 is checked (block 2007). If it is empty, the deletion process ends. If not empty, the value of the term associative attribute, that is, the associative term list 2
44 elements (associative item 245) are sequentially extracted (block 20)
08). When all the associative terms have been taken out, the deletion process ends.
For the associative term, the individual structure 240 matches with the individual structure of the deletion term (however, the variable element is embodied) (variables that are not materialized are assumed to match all constants). .) (Block 2009) and if the match fails, block 20 to process the next associative term.
Return to 08. If the matching is successful, the variable attribute 22 of the associative term
7 is empty (block 2010), and if it is not empty, the concrete value of the variable of the associative term (defined in block 2002) is the element 2 of the concrete value list 248 of the same associative term.
If it matches with any of 49, it is deleted, and if it does not match with any, nothing is done, and the process returns to block 2008.
If the result of block 2010 is empty, and if the associative term includes only the definition, the fact attribute 226 of the associative term is first emptied (block 2012), and then the value of the rule-associative attribute 222 of the associative term from the candidate rule list 260. , That is, the association rule list 250
Delete all the elements 251 of (block 2013), block
Return to 2008.

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

(1)ある規則の実行後、次に起動される可能性のある規
則群が事前に連想ネットに保存されているので、次に実
行する規則を探す時間が全体の規則数に依存しない。
(1) After the execution of a certain rule, the group of rules that may be activated next time is stored in advance in the associative net, so the time to search for the next rule to execute does not depend on the total number of rules.

(2)条件項が事実かどうかを事実属性として保持してい
るため、従来のように事実空間内の全事実と照合をとる
必要がない。つまり、条件項が事実かどうかのチェック
に要する時間が事実の数に依存することがない。このこ
とと(1)とから、推論時間が規則×事実の数に独立にな
る。規則数か数100事実数が50以上の実用的な推論
システムでは、このための効率向上は基本的なオーバヘ
ッドを考慮しても数百倍以上となる。
(2) Since the condition item holds whether it is a fact or not as a fact attribute, it is not necessary to collate with all the facts in the fact space as in the past. In other words, the time required to check whether a conditional term is a fact does not depend on the number of facts. From this fact and (1), the inference time becomes independent of the number of rules multiplied by the number of facts. In a practical reasoning system in which the number of rules or hundreds of facts is 50 or more, the efficiency improvement for this purpose is several hundred times or more even if the basic overhead is taken into consideration.

(3)マルチプロセッサや連想メモリ等の特殊なアーキテ
クチャーの計算機、素子を用いていないので安価に高速
化が実現できる。また、ソフトウエアの移行性も高い。
(3) High speed can be realized at low cost because no computer or element with special architecture such as multiprocessor or associative memory is used. In addition, the software is highly transferable.

(4)規則の実行によって追加されたり削除されたりする
事実に対しては、その定数要素などの共通要素の関連は
事前に分析し連想ネットに組み込んであるので、変数要
素の具体値(実行時に変数のとる値)だけ既存の事実と
照合すればよく、オーバヘッドの大半を占める照合時間
が短縮される。通常、事実を表わす文の変数要素は、文
の要素の1〜2割程度であるから照合時間は、5〜10
倍に向上すると考える。
(4) For the fact that rules are added or deleted by the execution of rules, the relations of common elements such as constant elements are analyzed in advance and incorporated in the associative net. Only the value taken by the variable) needs to be compared with existing facts, and the matching time that accounts for most of the overhead is shortened. Usually, the variable elements of a sentence representing facts are about 10 to 20% of the elements of the sentence, so the matching time is 5 to 10
I think it will double.

(5)定数要素や変数要素を文の任意の位置に書いた規
則、つまり、自然語的に表現された規則や事実を入力
し、推論結果もこの形式(自然語的な表現形式)で出力
するので、マンマシンインタフェース、操作性が性能向
上と引き換えに損われることがない。
(5) Input rules and facts expressed in natural language, that is, rules and facts written in arbitrary positions in the sentence, and output inference results in this format (natural language expression format) Therefore, the man-machine interface and operability are not impaired in exchange for improved performance.

(6)条件項で、その一部の変数要素が特別な定数値と指
定してあるものとないものを統合し、連想項グループと
して効率良く処理できるため、知識の記述・表現などシ
ステムの操作性を損わずに効率の向上が可能である。
(6) In conditional terms, some variable elements that are specified as special constant values and those that are not specified can be integrated, and can be efficiently processed as an associative term group. The efficiency can be improved without impairing the property.

(7)初期事実の連想ネットへの組込みは、連想フィルタ
を用いたため、組込み時間は、(全規則の項の総数)×
(事実数)に比例する時間かかるはずのものが、その対
数時間に減少する。
(7) Since the associative filter was used to incorporate the initial facts into the associative net, the incorporation time is (total number of terms in all rules) ×
What should take time proportional to (the number of facts) decreases to the logarithmic time.

(8)事実を削除した時、連想項のうち定数型のものを条
件部に持つ規則だけを候補規則集合から削除することに
より、少ないオーバヘッドで無駄な規則の条件チェック
数を減らせるので全体の処理速度が向上する。
(8) When the facts are deleted, by deleting only the rules that have constant type of associative terms in the condition part from the candidate rule set, the number of condition checks of unnecessary rules can be reduced with a small overhead. The processing speed is improved.

(9)実行した結果、新事実の追加や削除などにより環境
を変化させることのなかった規則に不変属性を設定して
実行を抑止することにより、無駄な条件チェック時間、
実行時間が減り、全体の処理速度が向上する。
(9) As a result of executing, by setting an invariant attribute to the rule that did not change the environment due to addition or deletion of new facts and suppressing execution, unnecessary condition check time,
It reduces the execution time and improves the overall processing speed.

(10)実行の結果、新事実の追加や削除などにより環境変
化が生じた場合は、他の変数具体値に対して同じ規則の
実行を行うのでなく、候補規則集合をチェックして環境
の変化により先に実行すべき規則ができたらそれを実行
するので自然な競合解消処理が行える。
(10) When the environment changes due to addition or deletion of new facts as a result of execution, the same rule is not executed for other variable concrete values, but the candidate rule set is checked to change the environment. By doing so, if a rule to be executed first is created, it is executed, so natural conflict resolution processing can be performed.

(11)候補規則集合(リスト)に、追加あるいは削除すべ
き規則が、項を構成する変数の照合だけで決定できるた
め、不要となった定数部の照合時間だけ、全体の処理効
率が増す。
(11) Since the rules to be added or deleted from the candidate rule set (list) can be determined only by collating the variables forming the terms, the overall processing efficiency is increased by the collation time of the unnecessary constant part.

(12)事実は変数に対応する部分のみ、その変数の具体値
として記憶するため、項ごとに事実を記憶しても所要メ
モリは少なくて済む。
(12) Only facts corresponding to variables are stored as concrete values of the variables. Therefore, even if the facts are stored for each term, the required memory is small.

(13)連想フィルタにおいて終端ノード(最終状態)を特
に作成せず、ノードが終端と非終端の両属性を持てる方
式であるため、処理が簡単な上、メモリ効率も良い。
(13) In the associative filter, the terminal node (final state) is not created in particular, and the node can have both the terminal attribute and the non-terminal attribute. Therefore, the processing is simple and the memory efficiency is good.

(14)不変属性((9)参照)を、他の規則が実行されて環
境が変化したらクリアすることは、その環境の変化が不
変属性を持つ規則の処理結果が、新環境を変化させるか
という複雑な処理を行うことなく、不変属性を持つ規則
の新環境での実行の機会を与える。
(14) Clearing the invariant attribute (see (9)) when another rule is executed to change the environment means that the result of the rule with the invariant attribute changes the new environment. It gives an opportunity to execute a rule with an invariant attribute in a new environment without performing complicated processing.

(15)実行時に条件が成立しないことが判明した規則は、
候補規則集合から削除されるので、無駄な条件照合チェ
ックにより処理効率が低下することがない。
(15) The rule found that the condition is not satisfied at the time of execution is
Since it is deleted from the candidate rule set, the processing efficiency does not decrease due to useless condition check.

(16)事実が追加されることによって規則の条件項のうち
1つでも満足されれば、その規則を候補規則とし(候補
規則集合に加え)、その規則の他の条件のチェックは実
行時に行なうため、全実行条件が満足されないと候補規
則に加えない方式と比べて(この方式では、事実が削除
された時の処理が複雑になる。)簡単なチェックで候補
規則が絞れるために全体の処理効率が向上する。
(16) If one of the conditional terms of a rule is satisfied by adding facts, the rule is made a candidate rule (in addition to the candidate rule set), and other conditions of the rule are checked at runtime. Therefore, compared to the method that does not add to the candidate rule unless all execution conditions are satisfied (this method complicates the processing when facts are deleted.) Efficiency is improved.

(17)連想フィルタは共通項のみを識別すれば良いので、
同一状態(ノード)にある時、多種の変数を入力した場
合のような複雑な変数処理が不要であるため、処理が簡
単で処理効率が良い。特に、連想フィルタは、事実の組
込みなど多用され全体の性能に影響を与えるので、その
処理効率の向上は、システム全体の性能の向上に寄与す
る。
(17) Since the associative filter only needs to identify common terms,
When in the same state (node), complicated variable processing such as the case of inputting various variables is unnecessary, so that the processing is simple and the processing efficiency is good. In particular, since the associative filter is frequently used such as incorporating facts and affects the overall performance, the improvement of its processing efficiency contributes to the improvement of the performance of the entire system.

なお、上述した説明では推論について説明したが、上述
した方法は、一般の情報処理にも当てはまる。
Although the inference is explained in the above description, the above-mentioned method is also applicable to general information processing.

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

第1A図は本発明の方法を実現するためのシステム構成
図、第1B図は本発明の方法の計算機システム上での実
現構成図、第1C図はルール集合の1例を示す図、第1
D図は初期事実の1例を示す図、第1E図は初期事実に
もとづく連想ネットワークの1例を示す図、第1F図は
第1D図の事実を第1E図上にはめ込んだ状態を示す
図、第1G図は連想フィルタの具体例を示す図、第2図
は連想ネットの構成図、第3図および第4図は、それぞ
れコードリストおよび連想ネット共通部(作成時)のデ
ータ構造の一例を示す図、第5図は連想フィルタの構成
図、第6図は連想ネット作成処理フローを示す図、第7
〜10図はその詳細処理フローを示す図、第11〜13
図は(初期)事実組込み処理フローを示す図、第14〜
20図は、推論実行処理フローを示す図である。 100…連想ネット作成プロセッサ、101…初期事実
組込みプロセッサ、102…推論実行プロセッサ、10
3…規則ファイル、104…初期事実ファイル、105
…連想フィルタ、106…連想ネット、200…規則リ
スト、210…規則、213…条件項、215…削除
項、216…追加項、221…項コード、251…連想
規則、245…連想項、240…個別構造、249…具
体値列、241…変数列、230…共通部、233…共
通構造、261…候補規則。
FIG. 1A is a system configuration diagram for realizing the method of the present invention, FIG. 1B is a configuration diagram of the method of the present invention on a computer system, and FIG. 1C is a diagram showing an example of a rule set.
FIG. D is a diagram showing an example of initial facts, FIG. 1E is a diagram showing an example of an associative network based on initial facts, and FIG. 1F is a diagram showing a state in which the facts of FIG. 1D are fitted on FIG. 1E. , FIG. 1G is a diagram showing a specific example of the associative filter, FIG. 2 is a block diagram of the associative net, and FIGS. 3 and 4 are examples of the data structure of the code list and the common part of the associative net (at the time of creation). FIG. 5, FIG. 5 is a block diagram of an associative filter, FIG. 6 is a diagram showing an associative net creation processing flow, and FIG.
10 to 11 are diagrams showing the detailed processing flow, 11 to 13
The figure shows the (initial) fact incorporation process flow, No. 14-
FIG. 20 is a diagram showing an inference execution processing flow. Reference numeral 100 ... Associative net creation processor, 101 ... Initial fact embedded processor, 102 ... Inference execution processor, 10
3 ... rule file, 104 ... initial fact file, 105
... associative filter, 106 ... associative net, 200 ... rule list, 210 ... rule, 213 ... condition term, 215 ... delete term, 216 ... additional term, 221 ... term code, 251 ... association rule, 245 ... associative term, 240 ... Individual structure, 249 ... Concrete value sequence, 241 ... Variable sequence, 230 ... Common part, 233 ... Common structure, 261 ... Candidate rule.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】その要素として定数の他に変数も含みう
る、条件項と行動項を持つ、少なくとも1個の規則と事
実が与えられた時、該規則に従って事実を変更する推論
サイクルを繰返すことにより情報処理を行う計算機シス
テムにおいて、 (イ)上記規則に対応するデータブロック (210)と、上記各項に対応した連想項と呼ぶデータ
ブロック(220)と、上記各項のうち定数の位置と値
が同じ部分を抽出し、その構造を記述した共通部と呼ぶ
データブロック(230)と、上記各項からそれぞれの
共通部の定数を除いた残りである個別要素を記述した個
別構造と呼ぶデータブロック(240)と、個別要素の
具体値を格納する具体値列リストと呼ぶデータブロック
(248)とをノードとして含み、連想項と共通部の
間、連想項と規則との間、および連想項から個別構造
と、連想項から具体値列リストとに枝を張ることによ
り、あるいは、更に同じ共通項を持つ連想項の間に直接
に枝を張ったり、個別構造や具体値列リストを連想項に
含めることにより、連想ネットワークをあらかじめ作成
し、 (ロ)終端ノードと非終端ノードと呼ぶ異種のノードを持
ち、終端ノードは上記共通部の識別コードを持ち、非終
端ノードは次ノードの番号を持ち、次ノードの番号は上
記事実と共通部の要素を順に比較し(1004,100
6)、両方の要素が共に定数である場合に定数の位置を
一致させ(1007,1008,1009,101
0)、定数の値を一致させ(1009,1011,10
12,1013)、該位置と値が一致した同じ構造の状
態で全要素を比較終了した(1004,1005)時
に、該同じ構造の共通部の識別コードを持つ終端ノード
に遷移する(1009,1010,1013)様に変数
と定数の値に対応したものである、連想フィルタを作成
し、 (ハ)与えられた事実を連想フィルタに通して、同じ構造
を持つ共通部を取出し、連想ネットワークの枝をたどっ
て該共通部の構造を持つ連想項を取出し、その具体値列
リストに共通部の定数以外の事実を組込み、 (ニ)上記連想ネットワークをたどって、上記事実の要素
を変更して上記推論サイクルを繰り返すことにより推論
処理を実行する計算機システムの高速処理方法。
1. When at least one rule and fact having a condition term and an action term, which can include a variable as well as a constant as an element thereof, are given, repeating an inference cycle for changing the fact according to the rule. In a computer system that performs information processing according to (a), a data block (210) corresponding to the above rule, a data block (220) called an associative term corresponding to each of the above terms, and a constant position of each of the above terms A data block (230) called a common part that describes the structure by extracting the part with the same value, and data called an individual structure that describes the individual elements that are the rest of the above items except the constants for each common part. A block (240) and a data block (248) called a concrete value sequence list that stores concrete values of individual elements are included as nodes, and between the association term and the common part, the association term and the rule. By branching between an associative term and an individual structure, and from an associative term to a concrete value sequence list, or by directly branching between associative terms having the same common term, individual structures and concrete values An associative network is created in advance by including the column list in the associative term, and (b) it has different types of nodes called terminal node and non-terminal node, the terminal node has the identification code of the above common part, and the non-terminal node is the next node. , And the number of the next node compares the above facts with the elements of the common part in order (1004, 100
6) When both elements are constants, the positions of the constants are matched (1007, 1008, 1009, 101).
0) and the values of the constants are matched (1009, 1011, 10
12, 1013), and when all the elements have been compared in the state of the same structure in which the position and the value are the same (1004, 1005), a transition is made to the terminal node having the common part identification code of the same structure (1009, 1010). , 1013) corresponding to the values of variables and constants, and (c) the given facts are passed through the associative filter to extract the common part having the same structure and branch the associative network. To extract the associative terms having the structure of the common part, incorporate the facts other than the constants of the common part in the concrete value sequence list, and (d) trace the above associative network and change the elements of the above facts. A high-speed processing method for a computer system that executes inference processing by repeating an inference cycle.
JP58177955A 1983-09-28 1983-09-28 High-speed processing method for computer system Expired - Lifetime JPH0616266B2 (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP58177955A JPH0616266B2 (en) 1983-09-28 1983-09-28 High-speed processing method for computer system
US06/654,487 US4779208A (en) 1983-09-28 1984-09-26 Information processing system and method for use in computer systems suitable for production system
EP84111496A EP0137414B1 (en) 1983-09-28 1984-09-26 High speed processing system for computer system
DE8484111496T DE3485999T2 (en) 1983-09-28 1984-09-26 HIGH-SPEED PROCESSING SYSTEM FOR COMPUTER SYSTEM.

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP58177955A JPH0616266B2 (en) 1983-09-28 1983-09-28 High-speed processing method for computer system

Publications (2)

Publication Number Publication Date
JPS6072031A JPS6072031A (en) 1985-04-24
JPH0616266B2 true JPH0616266B2 (en) 1994-03-02

Family

ID=16040000

Family Applications (1)

Application Number Title Priority Date Filing Date
JP58177955A Expired - Lifetime JPH0616266B2 (en) 1983-09-28 1983-09-28 High-speed processing method for computer system

Country Status (1)

Country Link
JP (1) JPH0616266B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5245699A (en) * 1988-05-12 1993-09-14 Kabushiki Kaisha Toshiba Inference processor using metal knowledge
JPH01284928A (en) * 1988-05-12 1989-11-16 Toshiba Corp Inference processor

Also Published As

Publication number Publication date
JPS6072031A (en) 1985-04-24

Similar Documents

Publication Publication Date Title
US6853992B2 (en) Structured-document search apparatus and method, recording medium storing structured-document searching program, and method of creating indexes for searching structured documents
US4779208A (en) Information processing system and method for use in computer systems suitable for production system
JP2726568B2 (en) Character recognition method and device
US7490078B2 (en) Stream data processing system and method for avoiding duplication of data process
JP3302988B2 (en) Character processing method and character identification method
JPH02109127A (en) Specification processing method
CN105138335A (en) Function call path extracting method and device based on control flow diagram
US5027305A (en) Interrogating device for changing the priority of the inference rules
JP2669601B2 (en) Information retrieval method and system
JPH08292955A (en) Language processing method and data processor applying the same
CN111209753B (en) Entity naming identification method and device
JP3777666B2 (en) Database processing method and system
JPH0616266B2 (en) High-speed processing method for computer system
JPH0616267B2 (en) High-speed processing method for computer system
CN116304347A (en) Git command recommendation method based on crowd-sourced knowledge
JP2001325284A (en) Method and device for extracting information from table structure area and recording medium stored with information extracting program
JP2585951B2 (en) Code data search device
US11009845B2 (en) Method for transforming a sequence to make it executable to control a machine
JP2982244B2 (en) Character recognition post-processing method
WO2020240831A1 (en) File management device, file management method, and program
JPH08297579A (en) Punctuation word processing system for text data
CN116301824A (en) Document-guided API (application program interface) use sequence searching method
WO2020240820A1 (en) File management device, file management method, and program
JPH10187725A (en) Document editing system
CN103793378A (en) Translation method and device