JPH01312636A - Inference processor - Google Patents

Inference processor

Info

Publication number
JPH01312636A
JPH01312636A JP63145149A JP14514988A JPH01312636A JP H01312636 A JPH01312636 A JP H01312636A JP 63145149 A JP63145149 A JP 63145149A JP 14514988 A JP14514988 A JP 14514988A JP H01312636 A JPH01312636 A JP H01312636A
Authority
JP
Japan
Prior art keywords
knowledge
section
procedure
inference
expert
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.)
Granted
Application number
JP63145149A
Other languages
Japanese (ja)
Other versions
JP2568634B2 (en
Inventor
Hiroyuki Yoshimura
宏之 吉村
Kiyomi Sakamoto
清美 阪本
Yoko Oiwa
陽子 大岩
Masayuki Tsuchida
雅之 土田
Hiroichi Uemura
植村 博一
Hideo Aoe
青江 秀雄
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP63145149A priority Critical patent/JP2568634B2/en
Publication of JPH01312636A publication Critical patent/JPH01312636A/en
Application granted granted Critical
Publication of JP2568634B2 publication Critical patent/JP2568634B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To easily correct knowledge by providing a macro calling a procedure which exists in correspondence with respective elements of a rule in a knowledge base storage part. CONSTITUTION:The knowledge base storage part 17 has the macro 20 which calls the procedure of a procedure storage part 6 existing in correspondence with respective elements of the rule. For changing knowledge, a knowledge processing can easily by resumed without correcting the procedure on the side of a system only by correcting a file in which knowledge is mentioned. Thus, the trouble of re-compiling whenever knowledge is corrected is eliminated and knowledge can easily be corrected.

Description

【発明の詳細な説明】 産業上の利用分野 本発明は、人工知能に用いる推論処理装置に関するもの
である。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to an inference processing device used for artificial intelligence.

従来の技術 従来の推論装置(汎用エキスパートシェル)は推論を行
わせるための推論エンジン及び知識ペースとなるルール
やワーキングメモリから構成されている。特に従来の汎
用エキスパートシェルの特長としてルールに起動をかけ
て推論を行わせる場合、そのエキスパートシェル独自に
規定されているワーキングメモリに推論に必要なデータ
を持たせて推論を行わせる6必要がある。
BACKGROUND OF THE INVENTION A conventional inference device (general-purpose expert shell) is composed of an inference engine for performing inference, and rules and working memory that serve as a knowledge base. In particular, as a feature of conventional general-purpose expert shells, when invoking rules to perform inference, it is necessary to have the data necessary for inference in the working memory specified by that expert shell6 for inference to be performed. .

最近、既存のシステムに知識処理を行わせるために上記
のような汎用エキスパートシェルを利用してエキスパー
トシステムを構築する例がよく見受けられる。
Recently, there have been many cases in which expert systems are constructed using general-purpose expert shells such as those described above in order to make existing systems perform knowledge processing.

この場合ひとつの方法としてエキスパートシェルに知識
処理を行わせるために、既にシステムに存在するデータ
をすべて汎用エキスパートシェルのワーキングメモリに
新たに記述してエキスパートシステムを実現する方法が
ある。
In this case, one method is to create an expert system by newly writing all the data that already exists in the system into the working memory of a general-purpose expert shell in order to have the expert shell perform knowledge processing.

また別の方法として汎用エキスパートシェルのワーキン
グメモリには推論に必要最小限のデータにおさえ既存の
システムにあるデータをシステム側の手続きを経てエキ
スパートシェル側から取りだス形でエキスパートシステ
ムを実現する方法がある。この場合エキスパートシェル
側の知識を修正するということは既存のデータを操作す
るシステム側の手続きを変更するということである。
Another method is to reduce the working memory of a general-purpose expert shell to the minimum amount of data necessary for inference, and to create an expert system by retrieving data from an existing system from the expert shell side through procedures on the system side. There is. In this case, modifying the expert shell's knowledge means changing the system's procedures for manipulating existing data.

上のいずれの場合にも既存のシステムと汎用エキスパー
トシェル間にはなんらかの形でインターフェースが必要
となる。
In each of the above cases, some form of interface is required between the existing system and the general-purpose expert shell.

一般に汎用エキスパートシェルはrlispJやrpr
ologJなどの知識処理言語で記述されている場合が
多いので既存のシステムと汎用エキスパートシェルの使
用言語が異なる場合が多い。
Generally, general-purpose expert shells are rlispJ and rpr.
Because they are often written in a knowledge processing language such as ologJ, the languages used by existing systems and general-purpose expert shells are often different.

このような場合システム側から汎用エキスパートシェル
に起動をかけたり、逆に汎用エキスパートシェルからシ
ステム側に戻るには両者の間に特別な通信手段を用いて
いる。
In such cases, a special means of communication is used between the two to activate the general-purpose expert shell from the system side, or to return from the general-purpose expert shell to the system side.

このような従来の推論処理装置について、CADシステ
ムにこの推論処理装置を組み込んだ例を用いて説明を行
なう。
Such a conventional inference processing device will be explained using an example in which this inference processing device is incorporated into a CAD system.

まず、第2図に推論装置を有しないCADシステムの構
成図を示す。1はCADシステムの本体である。2はマ
ンマシンインタフェース部であり、入出力装置8のキー
ボードなどから入力されたデータを制御したり、結果を
入出力装置8のデイスプレィなどに出力したりするとこ
ろである。3は制御部であり、CADデータ格納部4や
手続き管理部5を制御するところである。4はCADデ
ータ格納部であり、基板及び部品などの情報が蓄えられ
ているところである。5は手続き管理部であり手続き格
納部6の手続きを管理する。6は手続き格納部であり、
部品の配置および配線のための手続き(アルゴリズム)
などを蓄えておくところである。7はCADデータ二次
記憶部であり、基板ごとのCADデータを蓄えておく磁
気テープや磁気ディスケットなどのことである。8は入
出力装置であり、キーボードやデイスプレィなどのこと
である。
First, FIG. 2 shows a configuration diagram of a CAD system without an inference device. 1 is the main body of the CAD system. Reference numeral 2 denotes a man-machine interface section, which controls data input from the keyboard of the input/output device 8 and outputs results to the display of the input/output device 8, etc. A control section 3 controls the CAD data storage section 4 and the procedure management section 5. Reference numeral 4 denotes a CAD data storage section where information on boards, parts, etc. is stored. A procedure management section 5 manages procedures in the procedure storage section 6. 6 is a procedure storage section;
Procedures (algorithms) for placing and routing components
This is where you store things like. Reference numeral 7 denotes a CAD data secondary storage section, which is a magnetic tape, magnetic diskette, or the like that stores CAD data for each board. 8 is an input/output device, such as a keyboard or a display.

以下、このCADシステムによる部品配置を行う場合の
動作を説明する。入出力装置8より入力された信号はマ
ンマシンインタフェース部2を経て、制御部3に渡る。
The operation of arranging parts using this CAD system will be described below. A signal input from the input/output device 8 passes through the man-machine interface section 2 and then passes to the control section 3.

この制御部3により信号が解析されCADデータ格納部
4において基板や部品などの情報を取り出したり、手続
き管理部5を介して手続き格納部6において配置の手続
き処理がされて部品の配置が行われる。部品が配置され
るとマンマシンインタフェース部2を介して入出力装置
8に配置結果が出力される。
The signal is analyzed by the control unit 3, and the information on the board and parts is extracted in the CAD data storage unit 4, and the placement procedure is processed in the procedure storage unit 6 via the procedure management unit 5 to place the parts. . When the parts are placed, the placement results are output to the input/output device 8 via the man-machine interface unit 2.

次にこの既存のCADシステムに汎用のエキスパートシ
ェルを利用する場合の構成図を第3図、第4図に示す。
Next, FIGS. 3 and 4 show configuration diagrams when a general-purpose expert shell is used in this existing CAD system.

第3図および第4図の1から8は第2図と同じものであ
る。22は汎用エキスパートシェルの本体であり、 r
LIsPJやrPr。
1 to 8 in FIGS. 3 and 4 are the same as in FIG. 2. 22 is the main body of the general-purpose expert shell, r
LIsPJ and rPr.

1ogJなどの知識処理言語で書かれた独立したもので
ある。9は推論機構部であり、知識ベース格納部10や
ワーキングメモリ11を制御したり、汎用エキスパート
シェル22とCAD本体1間のインタフェース部13.
14を介してCAD本体1の制御部との通信を行ったり
するところである。
It is an independent entity written in a knowledge processing language such as 1ogJ. Reference numeral 9 denotes an inference mechanism section, which controls the knowledge base storage section 10 and the working memory 11, and serves as an interface section 13.9 between the general-purpose expert shell 22 and the CAD main body 1.
This is where communication is performed with the control section of the CAD main body 1 via the CAD main body 1.

10は知識ベース格納部であり、知識源(以下KSと記
す。)19が格納されている。19はKSでありルール
が記述されている。11はワーキングメモリであり、推
論に必要なデータを一時的に蓄えておくところである。
10 is a knowledge base storage unit, in which a knowledge source (hereinafter referred to as KS) 19 is stored. 19 is a KS in which rules are described. 11 is a working memory, which temporarily stores data necessary for inference.

12は知識゛ベース二次記憶部であり、基板ごとの知識
ベースを蓄えておくファイルなどである。
Reference numeral 12 denotes a knowledge base secondary storage unit, which is a file for storing the knowledge base for each board.

第3図のエキスパートシステムによる自動部品配置を行
う場合の動作の説明をする。入出力装置8より入力され
た信号はマンマシンインタフェース部2を経て、制御部
3に渡る。この制御部3により信号が解析され、部品配
置を汎用エキスパートシェル22側で推論処理により行
わせるために信号はCAD本体1と汎用エキスパートシ
ェル22間のインタフェース部13.14を通じて汎用
エキスパートシェル22の推論機構部9に渡される。推
論機構部9の信号は知識ベース格納部10の配置に関す
るKS19内のルールを解析していき、またその中で推
論に必要なCADデータのマツチングをワーキングメモ
リエ1でおこなって行く。このように部品の配置はこの
汎用エキスパートシェル22の推論のみにより行われる
ことになる。ただしこの汎用エキスパートシェル22に
制御が移される前にCADデータ二次記憶部7よりワー
キングメモリ11に推論に必要なデータは格納されてい
なければならない。推論により自動部品配置された結果
は信号として再びCAD本体1と汎用エキスパートシェ
ル22間のインタフェース部13.14を通じて制御部
3に渡される。制御部3の信号はマンマシンインタフェ
ース部2を介して入出力装置8に配置結果が出力される
The operation when automatically placing parts using the expert system shown in FIG. 3 will be explained. A signal input from the input/output device 8 passes through the man-machine interface section 2 and then passes to the control section 3. The signal is analyzed by the control unit 3, and the signal is sent to the general-purpose expert shell 22 for inference through the interface unit 13.14 between the CAD main body 1 and the general-purpose expert shell 22 in order to perform component placement by inference processing on the general-purpose expert shell 22 side. It is passed to the mechanism section 9. The signals from the inference mechanism unit 9 are used to analyze the rules in the KS 19 regarding the arrangement of the knowledge base storage unit 10, and the working memory 1 performs matching of CAD data necessary for inference. In this way, the placement of parts is performed only by the reasoning of this general-purpose expert shell 22. However, before control is transferred to the general-purpose expert shell 22, the data necessary for inference must be stored in the working memory 11 from the CAD data secondary storage section 7. The result of automatic component placement based on inference is passed back to the control section 3 as a signal through the interface sections 13 and 14 between the CAD main body 1 and the general-purpose expert shell 22. The signal from the control section 3 is outputted as a placement result to the input/output device 8 via the man-machine interface section 2.

次に第4図のエキスパートシステムによる部品配置を行
う場合の動作の説明をする。
Next, the operation when arranging parts using the expert system shown in FIG. 4 will be explained.

入出力装置8より入力された信号はマンマシンインタフ
ェース部2を経て、制御部3に渡る。この制御部3によ
り信号が解析され、部品配置を汎用エキスパートシェル
22側で推論処理により行わせるために信号はCAD本
体1と汎用エキスパートシェル22間のインタフェース
部13.14を通じて汎用エキスパートシェル22の推
論機構部9に渡される。推論機構部9の信号は知識ベー
ス格納部10の配置に関するKS19内のルールを順番
に解析していく。まずひとつのルールの要素が解析され
るとそこに記述しであるCAD本体1の配置に必要な手
続き管理がどれであるかを推論機構部9が理解する。そ
して、13.14のインタフェース部を信号が通ってC
AD本体1の制御部3に渡り、さらに手続き管理部に信
号が渡りそれぞれの手続き処理を手続き格納部6で行な
われ、手続きによる配置がされる。また手続きの中でデ
ータを参照する時、制御部3を介してCADデータ格納
部4でのデータの参照が行われる。制御部3での処理が
終わると信号、は再び13.14のインタフェース部を
通って推論機構部9に戻り、知識ベース格納部10のル
ールの次の要素の解析が行われる。次にまたCAD本体
1に戻り処理が行われる。このように知識ベース格納部
10のルールすべてに対して以上の部品配置の処理が終
わると、部品配置の結果が信号として制御部3に渡され
る。制御部3の信号はマンマシンインタフェース部2を
介して入出力装置8に配置結果が出力される。
A signal input from the input/output device 8 passes through the man-machine interface section 2 and then passes to the control section 3. The signal is analyzed by the control unit 3, and the signal is sent to the general-purpose expert shell 22 for inference through the interface unit 13.14 between the CAD main body 1 and the general-purpose expert shell 22 in order to perform component placement by inference processing on the general-purpose expert shell 22 side. It is passed to the mechanism section 9. The signals from the inference mechanism unit 9 sequentially analyze the rules in the KS 19 regarding the arrangement of the knowledge base storage unit 10. First, when the elements of one rule are analyzed, the inference mechanism section 9 understands which procedure management is necessary for the arrangement of the CAD main body 1 described therein. Then, the signal passes through the interface section of 13 and 14, and the C
A signal is passed to the control unit 3 of the AD main body 1 and further to the procedure management unit, and each procedure is processed in the procedure storage unit 6, and arrangement is performed according to the procedure. Further, when referring to data in a procedure, the data in the CAD data storage section 4 is referred to via the control section 3. When the processing in the control section 3 is completed, the signal passes through the interface section 13 and 14 again and returns to the inference mechanism section 9, where the next element of the rule in the knowledge base storage section 10 is analyzed. Next, the process returns to the CAD main body 1 and processing is performed. When the above component placement processing is completed for all rules in the knowledge base storage section 10, the results of the component placement are passed to the control section 3 as a signal. The signal from the control section 3 is outputted as a placement result to the input/output device 8 via the man-machine interface section 2.

発明が解決しようとする課題 しかしながら前記のように既存のシステムに汎用エキス
パートシェルを利用しようとする場合、多くのデータを
持つ大きなシステムでは汎用エキスパートシェルのワー
キングメモリに膨大なデータを知識として格納しなけれ
ばならな(多くのメモリを必要とするので実現性に乏し
いという問題点を有している。例えば、第3図のエキス
パートシステムは独立した汎用エキスパートシェル22
のため推論に必要なCADデータをCADデータ二次記
憶部7よりすべて汎用エキスパートシェル22のワーキ
ングメモリ11に移さなければならない。そのため多く
のメモリを必要上しこのエキスパートシステムの実現は
難シイ。
Problems to be Solved by the Invention However, when trying to use a general-purpose expert shell in an existing system as described above, in a large system with a lot of data, a huge amount of data must be stored as knowledge in the working memory of the general-purpose expert shell. For example, the expert system shown in FIG. 3 uses an independent general-purpose expert shell 22.
Therefore, all CAD data necessary for inference must be transferred from the CAD data secondary storage unit 7 to the working memory 11 of the general-purpose expert shell 22. Therefore, it requires a large amount of memory, making it difficult to implement this expert system.

また汎用エキスパートシェルのワーキングメモリをすべ
て利用するのではなく、既存のシステムのデータベース
を利用するという方法においても知識ベースを修正する
場合にはシステム側の手続きの変更も必要となりシステ
ムを再コンパイルし直さなければならないという問題を
有している。
Also, even if you use the database of an existing system instead of using all the working memory of a general-purpose expert shell, if you modify the knowledge base, you will also need to change the procedures on the system side, and the system will need to be recompiled. The problem is that it has to be done.

また複雑な推論処理を行う場合、エキスパートシェルと
既存システム間の通信回数が多くなり処理効率が落ちる
という問題を有している。例えば、第4図のエキスパー
トシステムは独立した汎用エキスパートシェル22を利
用しているが推論をすべてワーキングメモリ11で行う
のではなく、知識ベースのルールの要素ごとにCAD本
体1と汎用エキスパートシェル22間のインターフニス
13.14を通ってCAD本体1の配置の手続きを行っ
たり、CADデータを参照するというエキスパートシス
テムになっている。しかしこの場合汎用エキスパートシ
ェルのルールを変更するにはひとつのルールの要素に対
してひとつのCADデータを参照するための配置の手続
きや手続き管理に関するプログラムをを修正しなければ
ならず、システムを再コンパイルする必要が生ずる。こ
のようにこのエキスパートシステムでは知識修正のたび
にシステムを再コンパイルしなければならないという問
題を持っている。また複雑な推論処理を行う場合、CA
D本体1と汎用エキスパートシェル22間の通信回数が
多くなり処理効率が落ちる。
Furthermore, when performing complex inference processing, there is a problem in that the number of communications between the expert shell and the existing system increases, reducing processing efficiency. For example, although the expert system shown in FIG. 4 uses an independent general-purpose expert shell 22, all inferences are not performed in the working memory 11, but between the CAD main body 1 and the general-purpose expert shell 22 for each element of the knowledge base rule. It is an expert system that performs procedures for arranging the CAD main body 1 and refers to CAD data through the interfaces 13 and 14. However, in this case, in order to change the rules of the general-purpose expert shell, it is necessary to modify the placement procedure and procedure management program to refer to one CAD data for one rule element, and the system must be restarted. You will need to compile it. In this way, this expert system has the problem of having to recompile the system every time the knowledge is modified. Also, when performing complex inference processing, CA
The number of communications between the D main body 1 and the general-purpose expert shell 22 increases, reducing processing efficiency.

本発明はかかる点に鑑み、既存のシステムのデータをワ
ーキングメモリに書き換える必要なく、知識ベースを修
正する際に再びフンパイルする必要のない、またエキス
パートシェルと既存システム間の通信回数のための処理
効率が落ちることのない既存のシステムに埋め込まれた
形のエキスパートシェルを提供することを目的とする。
In view of these points, the present invention eliminates the need to rewrite the data of the existing system into the working memory, eliminates the need to re-pile the knowledge base when modifying it, and improves processing efficiency by reducing the number of communications between the expert shell and the existing system. The purpose is to provide an expert shell that can be embedded into existing systems without crashing.

課題を解決するための手段 本発明は、コマンドを入力し処理結果を出力する入出力
部と、全体の制御を行なう制御部と、前記入出力部に入
力されたコマンドを解釈しその内容を前記制御部に渡し
また前記制御部からの内容を解釈して前記入出力部へ送
る処理を行うマンマシンインタフェース部と、処理対象
となるデータを有するデータ格納部と、前記データ格納
部の内容を前記制御部を介して参照しながら手続きによ
る処理を行う手続き格納部と、ルールが記述されている
ファイル及び前記ルールの各要素に対応して存在する前
記手続き格納部の手続きを呼び出すマクロが記述されて
いるファイルを有する知識ベース格納部と、前記知識ベ
ース格納部のルール及びマクロが記述されているファイ
ルの内容を解釈し前記制御部を介し前記手続き格納部の
手続きによる処理に起動をかける推論機構部を有するこ
とを特徴とする推論処理装置である。
Means for Solving the Problems The present invention includes an input/output unit that inputs commands and outputs processing results, a control unit that performs overall control, and interprets the commands input to the input/output unit and transmits the contents to the input/output unit. a man-machine interface section that passes the contents to the control section and interprets the contents from the control section and sends them to the input/output section; a data storage section having data to be processed; A procedure storage section that performs processing according to the procedure while referring to it through a control section, and a file in which rules are described and macros that call procedures in the procedure storage section that exist corresponding to each element of the rule are written. a knowledge base storage section having a file in which rules and macros are described in the knowledge base storage section, and an inference mechanism section that interprets the contents of the file in which rules and macros are described in the knowledge base storage section and activates processing according to the procedure in the procedure storage section via the control section. This is an inference processing device characterized by having the following.

作   用 本発明は前記した構成により、ルールの各要素に対応し
て存在する前記手続き格納部の手続きを呼び出すマクロ
を知識ベース格納部が有していることにより、知識を変
更しようとすると知識が記述しであるフチイルを修正す
るだけでシステム側の手続きまでも修正することなく簡
単に知識処理が再開できるようになったため、知識を修
正する度の再コンパイルの手間がなくなり容易な知識修
正が可能である。
According to the above-described configuration, the knowledge base storage unit has a macro that calls a procedure in the procedure storage unit that corresponds to each element of a rule, so that when an attempt is made to change the knowledge, the knowledge is changed. Knowledge processing can now be easily restarted by simply modifying the edges of the description without having to modify the procedures on the system side, eliminating the need to recompile every time knowledge is modified, making it possible to easily modify knowledge. It is.

実施例 以下、本発明の推論処理装置の一実施例として、既存の
プリント基板配置配線CADシステム(以下CADシス
テムと呼ぶ。)において知識ベースに記述された配置に
関する内容をもとにCADデータの内容を参照しながら
推論処理を行うエキスパートシステムを説明する。
Embodiment Hereinafter, as an embodiment of the inference processing device of the present invention, the content of CAD data will be calculated based on the content related to the layout described in the knowledge base in an existing printed circuit board placement and wiring CAD system (hereinafter referred to as CAD system). An expert system that performs inference processing will be explained with reference to.

第1図は本発明を利用したCADエキスパートシステム
の構成図である。2.3.4.6.7.8は第2図、第
3図、第4図と同じものである。
FIG. 1 is a block diagram of a CAD expert system using the present invention. 2.3.4.6.7.8 are the same as FIGS. 2, 3, and 4.

16.17.18は本発明に基づく推論機構部、知識ベ
ース格納部、知識ベース二次記憶部である。
16, 17, and 18 are an inference mechanism section, a knowledge base storage section, and a knowledge base secondary storage section based on the present invention.

15はCADエキスパートシステムの本体である。15 is the main body of the CAD expert system.

知識ベース格納部17は第1図に示すようにルールが記
述されるKSl9、KSのルールの各要素のマクロ定義
が記述されているマクロ20、推論に必要な知識が記述
されているフレーム21に分かれる。これらの知!、(
KSl マクロ、フレーム)をここでは知識ユニットま
たは単にユニットと呼ぶことする。第5図、第6図、第
7図に上記のKSl  マクロ、フレームのCADシス
テムの配置知識例を示す。
As shown in FIG. 1, the knowledge base storage unit 17 stores a KS19 in which rules are written, a macro 20 in which macro definitions of each element of the KS rules are written, and a frame 21 in which knowledge necessary for inference is written. Divided. These knowledge! ,(
KSl macro, frame) will be referred to herein as a knowledge unit or simply a unit. FIG. 5, FIG. 6, and FIG. 7 show examples of the above-mentioned KSL macro and frame placement knowledge of the CAD system.

以下、本発明の実施例により部品配置を行う場合の動作
を第8図に記す流れ図に基づいて、説明を行う。
The operation when arranging parts according to the embodiment of the present invention will be explained below based on the flowchart shown in FIG.

入出力装置8より入力された信号はマンマシンインタフ
ェース部2を経て、制御部3に渡る。この制御部3によ
り信号が解析され、部品配置を推論処理により行わせる
ために信号は推論機構部16に渡される。推論機構部1
6の信号は知識ベース格納部17の配置に関する知識源
(KS)19のルールの要素を解析した後、その要素に
対応するマクロ20の解析を順に行う。このマクロ20
の解析の中で配置に関する手続きのいずれを行えばよい
かを推論機構部16が認識すれば信号は制御部3を介し
て、手続き格納部6の手続きに移り配置の処理が行われ
る。その中で推論にCADデータが必要であれば制御部
3を介してCADデー夕格納部4のCADデータの参照
が行われる。またフレーム2工の内容が必要であれば制
御部3を介して推論機構部16よりフレーム21の内容
が参照される。手続き格納部6の処理が終わると再び信
号は制御部3を介して推論機構部工6に移り、マクロの
解析に戻る。ひとつのマクロの中で複数の手続きを推論
機構部16が認識すれば上記と同じ処理を繰り返すこと
になる。マクロの解析が終わると再び知識源(KS)1
9のルールの要素の解析が順に行なわれ上記と同じ処理
が知識源(KS)19内のルールの最後までなされる。
A signal input from the input/output device 8 passes through the man-machine interface section 2 and then passes to the control section 3. The control section 3 analyzes the signal, and passes the signal to the inference mechanism section 16 in order to perform component placement through inference processing. Inference mechanism part 1
After analyzing the rule elements of the knowledge source (KS) 19 regarding the arrangement of the knowledge base storage unit 17, the signal No. 6 analyzes the macros 20 corresponding to the elements in order. This macro 20
If the inference mechanism unit 16 recognizes which of the procedures regarding placement should be performed during the analysis, the signal is transferred to the procedure in the procedure storage unit 6 via the control unit 3, and the placement process is performed. If CAD data is required for inference, the CAD data in the CAD data storage section 4 is referenced via the control section 3. Further, if the contents of the frame 2 are required, the contents of the frame 21 are referred to by the inference mechanism section 16 via the control section 3. When the processing in the procedure storage section 6 is completed, the signal is transferred to the inference mechanism section 6 via the control section 3 again, and returns to the macro analysis. If the inference mechanism unit 16 recognizes multiple procedures in one macro, the same process as described above will be repeated. Once the macro analysis is complete, the knowledge source (KS) 1
The elements of the 9 rules are analyzed in order, and the same process as above is performed until the end of the rule in the knowledge source (KS) 19.

推論により自動部品配置された結果は信号として制御部
3に渡される。制御部3の信号はマンマシンインタフェ
ース部2を介して入出力装置8に配置結果が出力される
The result of automatic component placement based on inference is passed to the control unit 3 as a signal. The signal from the control section 3 is outputted as a placement result to the input/output device 8 via the man-machine interface section 2.

第1図にあるようにこのエキスパートシェルは既存のC
ADシステムに埋め込まれた形でCADシステムのデー
タを自由に参照することができるようになっている。
As shown in Figure 1, this expert shell
CAD system data can be freely referenced by being embedded in the AD system.

またこのCADエキスパートシステムでは知識の修正が
あっても知識ベースのルールを変更したければKSが記
述されているファイルだけを書き換えればよい。また、
知識ベースの手続きを変更したければ次で説明するがル
ールの各要素のさらに細かな知識が記述できるマクロ定
義のなかで手続き格納部のいずれの手続きを選んで組み
合せるかをマクロのファイルに書き換えればよい。後は
修正したファイルをロードするだけで容易に知識の修正
ができる。よって第4図のエキスパートシステムのよう
に直接手続きを修正したり、手続きを管理するプログラ
ムを修正することがないので再コンパイルの必要はない
。第4図のエキスパートシステムの場合は複数の手続き
が必要なルールの要素−つに対して手続きを管理するプ
ログラムを用意する必要があったためルールの修正があ
ればどうしてもそれに対応する手続きや手続きを管理す
るプログラムを修正することが多い。ところがこの第1
図のエキスパートシステムでは上述したように一つのル
ール要素はさらにマクロ展開されてより細かな手続きを
選び、組み合せることができるので、手続き格納部6に
あらかじめ配置に関する手続き関数を豊富に用意してお
けば手続き関数を修正することは少ない。これが第4図
のエキスパートシステムでは再コンパイルが必要で第1
図のエキスパートシステムでは再コンパイルの必要がな
い理由である。
Furthermore, in this CAD expert system, even if the knowledge is modified, if the rules of the knowledge base are to be changed, only the file in which the KS is written needs to be rewritten. Also,
If you want to change the procedures in the knowledge base, as will be explained next, you can write more detailed knowledge about each element of the rule in the macro definition. Bye. Afterwards, you can easily modify your knowledge by simply loading the modified file. Therefore, unlike the expert system shown in FIG. 4, there is no need to directly modify the procedure or modify the program that manages the procedure, so there is no need for recompilation. In the case of the expert system shown in Figure 4, it was necessary to prepare a program to manage procedures for each element of a rule that requires multiple procedures, so if a rule is modified, it is necessary to manage the corresponding procedures and procedures. I often modify programs that I use. However, this first
In the expert system shown in the figure, as mentioned above, one rule element can be further macro-expanded to select and combine more detailed procedures, so it is necessary to prepare in advance a wealth of procedure functions related to placement in the procedure storage unit 6. It is rare for procedural functions to be modified. This requires recompilation in the expert system shown in Figure 4.
This is why the expert system shown in the figure does not require recompilation.

このエキスパートシェルの知識ベースである3つの知識
ユニット間およびアプリケーション関数の関係をあられ
す概念図を第9図に示し、知識ユニット間とアプリケー
ション関数との関係を詳しく説明する。ここで推論機構
部16から呼ばれるCADエキスパートシステム15の
手続き格納部6に存在する配置に関する手続き関数のこ
とをここではアプリケーション関数と呼ぶ。アプリケ−
シロン関数とはマクロの中で定義された関数に対応した
ものでCADシステム内の処理を行ったり、CADシス
テム内のデータを操作するためのもので、あらかじめ用
意されている。
FIG. 9 shows a conceptual diagram showing the relationship between the three knowledge units that are the knowledge base of this expert shell and the application functions, and the relationship between the knowledge units and the application functions will be explained in detail. Here, the procedure function related to placement, which is called by the inference mechanism unit 16 and exists in the procedure storage unit 6 of the CAD expert system 15, is referred to as an application function. Application
The Chiron function corresponds to a function defined in a macro, and is used to perform processing within the CAD system or manipulate data within the CAD system, and is prepared in advance.

第9図にあるようにこのエキスパートシェルには複数の
KSを一度に持つことができる。それぞれのKSにはi
 f −t h e n・・・の形式でプロダクシロン
ルールが記述されている。一つのKSが実行されるとそ
のKS内のルールが記述されている順番に評価されてい
く。このルールが評価されていく中で推論に必要な知識
を自由にフレームから取りだすことができる。
As shown in Figure 9, this expert shell can have multiple KSs at once. i for each KS
A production rule is written in the format f-then.... When one KS is executed, the rules within that KS are evaluated in the order in which they are written. As this rule is evaluated, the knowledge necessary for inference can be freely extracted from the frame.

KS内のルールの条件要素(if部)や実行要素(th
en部)はともにマクロ定義がなされていなければなら
ない。このマクロにはKSの中に表現するとかえって繁
雑になるような細かい知識を記述することができる。具
体的にはマクロにはアプリケ−シロン関数のcal1文
が記述される。
The condition element (if part) and execution element (th
en section) must both have macro definitions. This macro can describe detailed knowledge that would be complicated if expressed in the KS. Specifically, the cal1 statement of the application function is written in the macro.

このマクロの中で呼ばれるアプリケーション関数は既存
のCADシステムと同じ言語で書かれた関数でCADシ
ステム内の手続き格納部6に存在する。このアプリケー
ション関数の処理が終わると再びマクロに戻りマクロが
終わるとKS内の次の要素に移る。
The application function called in this macro is written in the same language as the existing CAD system and exists in the procedure storage section 6 within the CAD system. When the processing of this application function is finished, the process returns to the macro again and when the macro is finished, the process moves to the next element in the KS.

次に上で説明した知識処理の流れの実際の実現方法につ
いて述べる。まずCADシステムの部品配置に関する知
識ベースが記述されているファイルがロードされると知
識ユニットであるKS、  マクロ、フレームがどのよ
うなデータ構造で格納されるかを第10図に示す。
Next, we will discuss how to actually implement the knowledge processing flow described above. First, Figure 10 shows the data structure in which the knowledge units, KS, macro, and frame, are stored when a file that describes the knowledge base regarding component placement in a CAD system is loaded.

知識処理が開始されるとどのKSが実行されるのかをそ
のKS名により認識し、そのKSのルール要素文字列が
記述されているデータの先頭に制御が移る(a)。
When knowledge processing is started, which KS is to be executed is recognized by the KS name, and control is transferred to the beginning of the data in which the rule element character string of that KS is described (a).

まずルールの条件要素(if部)文字列を取りだし、マ
クロの左辺文字列とマツチする文字列をマクロ左辺テー
ブルより探す(b)。 (ここでは実行時にKS要素テ
ーブルの文字列とマクロ左辺テーブルの文字列とのマツ
チングをとっているが知識のロード時に先にKSの要素
に対応するマクロを探しておいてKS要素テーブルにマ
クロ左辺テーブルへのポインタを示しておいてもよい。
First, the conditional element (if part) character string of the rule is extracted, and a character string that matches the left-hand character string of the macro is searched from the macro left-hand side table (b). (Here, the character strings in the KS element table and the character strings in the macro left side table are matched at runtime, but when loading knowledge, the macro corresponding to the KS element is first searched and the macro left side is added to the KS element table.) A pointer to the table may also be indicated.

)マクロ左辺が見つかればそれに対応するマクロ右辺の
内容を見るためにマクロ右辺テーブルに制御が移る(C
)。
) If the left side of the macro is found, control is transferred to the macro right side table to see the contents of the corresponding right side of the macro (C
).

マクロ右辺の内容のCADシステム側のアプリケ−シロ
ン関数のcallを認識すれば、CADシステム側に制
御が移りアプリケージジン関数が呼ばれる(d)。
When the call of the applicator function on the CAD system side of the contents of the right side of the macro is recognized, control is transferred to the CAD system side and the applicator function is called (d).

この中でCADシステム内のCADデータベースを参照
したり、知識としてのフレームのデータをフレームのデ
ータ構造より取り出してきて推論に利用する(e)。
In this process, the CAD database in the CAD system is referred to, and frame data as knowledge is extracted from the frame data structure and used for inference (e).

今条件要素を考えているのでこのアプリケージジン関数
の中で条件が溝たされているかどうかの結果をエキスパ
ートシェルに返すことにする。この結果を認識してエキ
スパートシェルはこのルールの実行要素に制御を移すか
次のルールに制御を移すかを判断する。
Since we are currently considering a conditional element, we will return the result of whether the condition is satisfied in this application function to the expert shell. Recognizing this result, the expert shell determines whether to transfer control to the execution element of this rule or to the next rule.

ルールの実行要素(then部)が処理される過程は上
記の条件要素の処理と全く同じであり、ただ異なるのは
アプリケージジン関数が実行されてエキスパートシェル
に戻る時に結果を返さないというところだけである。
The process of processing the execution element (then part) of the rule is exactly the same as the processing of the condition element above, the only difference is that the application function is executed and no result is returned when returning to the expert shell. be.

最後に上記で説明したエキスパートシェルを起動する場
合の簡単なフローを第11図に示す。図にあるようにエ
キスパートシェルを起動させるとまず知識ベースのロー
ドが行われる。つぎにこのロードされた知識ベースをも
とに知識処理が行われる。知識処理が行われた後、知識
の変更があれば再び知識のロードが行われて知識処理を
行うことができる。よって知識の変更があれば知識を再
ロードするだけで同じ知識処理が続行できる。
Finally, FIG. 11 shows a simple flow when starting the expert shell described above. As shown in the figure, when you start the expert shell, the knowledge base is first loaded. Next, knowledge processing is performed based on this loaded knowledge base. After knowledge processing is performed, if there is a change in knowledge, the knowledge is loaded again and knowledge processing can be performed. Therefore, if knowledge changes, the same knowledge processing can be continued simply by reloading the knowledge.

以上説明したように本発明の推論処理装置を既存のCA
Dシステム等にこのエキスパートシェルを埋め込むこと
により、簡単に知識処理のためのデータベースを既存の
CADデータベースの中から取り出すことができ、高速
な知識処理を実現することが可能となる。
As explained above, the inference processing device of the present invention can be applied to an existing CA.
By embedding this expert shell in the D system etc., the database for knowledge processing can be easily extracted from the existing CAD database, and high-speed knowledge processing can be realized.

また知識ベースをファイルに記述することにより知識の
修正があっても修正した知識ユニットだけを再ロードす
るだけで同じ知識処理を続行することができる。さらに
知識ベースを3つの知識ユニットに分けているのでユー
ザーが自由に細かな知識を記述しやすい形となっている
Furthermore, by writing the knowledge base in a file, even if the knowledge is modified, the same knowledge processing can be continued by simply reloading only the modified knowledge unit. Furthermore, the knowledge base is divided into three knowledge units, making it easy for users to freely describe detailed knowledge.

発明の詳細 な説明したように、本発明によれば、既存のシステムに
埋め込まれたエキスパートシェルのため既にあるシステ
ムのデータベースを変更することなく容易に知識処理を
行えるエキスパートシステムを構築することができ、高
速な知識処理が実現できる。
As described in detail, according to the present invention, it is possible to construct an expert system that can easily process knowledge without changing the database of the existing system because of the expert shell embedded in the existing system. , high-speed knowledge processing can be achieved.

また知識を記述するファイルを修正するだけで知識の変
更が容易に行えるためシステムの知識による効果を簡単
に確かめることができる。
Furthermore, since knowledge can be easily changed simply by modifying the file that describes the knowledge, the effect of system knowledge can be easily verified.

さらに知識ベースを知識ユニットに分けているのでユー
ザーが自由に細かな知識を記述しやすい等、その実用的
効果は大きい。
Furthermore, since the knowledge base is divided into knowledge units, it is easy for users to freely describe detailed knowledge, which has great practical effects.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明の推論処理装置をCADシステムに組み
込んだ一実施例の構成図、第2図は既存のCADシステ
ムの構成図、第3図、第4図は前記CADシステムに汎
用エキスパートシェルを利用した場合のエキスパートシ
ステムの構成図、第5図は知識ベースの内のKSの配置
知識例を示す知識表現図、第6図は知識ベースの内のマ
クロの配置知識例を示す知識表現図、第7図は知識ベー
スの内のフレームの配置知識例を示す知識図、第8図は
前記実施例が自動配置を行う時のシステムの流れ図、第
9図はエキスパートシェルの3つの知識ユニット間およ
びアプリケーション関数の関係をあられす概念図、第1
0図は前記実施例におけるKSl マクロ、フレームの
データ格納図、第11図は前記実施例におけるエキスパ
ートシェルを起動するための流れを示す流れ図である。 2…マンマシンイタフ工−ス部、 3・・・制御部、4・・・CADデータ格納部、6・・
・手続き格納部、 7・・・CADデータ二次記憶部、 8・・・入出力装置、 15・・・CADエキスパートシステム本体、16・・
・推論機構部、17・・・知識ベース格納部、18・・
・知識ベース二次記憶部、19・・・KS。 20・・・マクロ、21・・・フレーム。 代理人の氏名 弁理士 中尾敏男 はか1名第2図 1本体 第5図 [KS  CPU配置 if  (Cpuがある) ム(Q/)1.1 * l配置)    ]第66 図マグロ (Cpuか゛ろる )   −−−−−−−(call
  f1屁−Cpu )(cpu翫H己iL  )  
  −−−−−−−(call    pttt−cp
tz )   ]第77 図フレーム CptL昶判ヘ   −−−−−−−基林力中央1;置
く ]第8図 第9図 1−Fa、□印−−−−」
Fig. 1 is a block diagram of an embodiment in which the inference processing device of the present invention is incorporated into a CAD system, Fig. 2 is a block diagram of an existing CAD system, and Figs. 3 and 4 are a general-purpose expert shell installed in the CAD system. Figure 5 is a knowledge representation diagram showing an example of KS placement knowledge in the knowledge base, and Figure 6 is a knowledge representation diagram showing an example of macro placement knowledge in the knowledge base. , Fig. 7 is a knowledge diagram showing an example of frame placement knowledge in the knowledge base, Fig. 8 is a flowchart of the system when the above embodiment performs automatic placement, and Fig. 9 is a diagram showing the relationship between the three knowledge units of the expert shell. Conceptual diagram showing the relationship between and application functions, Part 1
FIG. 0 is a data storage diagram of the KSl macro and frame in the embodiment, and FIG. 11 is a flowchart showing the flow for starting the expert shell in the embodiment. 2...Man-machine interface engineering department, 3...Control unit, 4...CAD data storage unit, 6...
・Procedure storage unit, 7... CAD data secondary storage unit, 8... Input/output device, 15... CAD expert system main body, 16...
・Inference mechanism section, 17...Knowledge base storage section, 18...
-Knowledge base secondary storage, 19...KS. 20...Macro, 21...Frame. Name of agent Patent attorney Toshio Nakao 1 person Figure 2 1 Main body Figure 5 [KS CPU arrangement if (there is CPU) Q/1.1 * l arrangement] Figure 66 Tuna (Cpu or Roru ) -----------(call
f1 fart-Cpu ) (cpu 翫H iL )
----------(call pttt-cp
tz) ] Fig. 77 Frame CptL 昭版 ------- Riki Kibayashi Chuo 1; Place ] Fig. 8 Fig. 9 1-Fa, □ mark----"

Claims (1)

【特許請求の範囲】[Claims] コマンドを入力し処理結果を出力する入出力部と、全体
の制御を行なう制御部と、前記入出力部に入力されたコ
マンドを解釈しその内容を前記制御部に渡しまた前記制
御部からの内容を解釈して前記入出力部へ送る処理を行
うマンマシンインタフェース部と、処理対象となるデー
タを有するデータ格納部と、前記データ格納部の内容を
前記制御部を介して参照しながら手続きによる処理を行
う手続き格納部と、ルールが記述されているファイル及
び前記ルールの各要素に対応して存在する前記手続き格
納部の手続きを呼び出すマクロが記述されているファイ
ルを有する知識ベース格納部と、前記知識ベース格納部
のルール及びマクロが記述されているファイルの内容を
解釈し前記制御部を介し前記手続き格納部の手続きによ
る処理に起動をかける推論機構部を有することを特徴と
する推論処理装置。
an input/output section that inputs commands and outputs processing results; a control section that performs overall control; and an input/output section that interprets the commands input to the input/output section and passes the contents to the control section, and also receives the contents from the control section. a man-machine interface unit that interprets and sends the data to the input/output unit; a data storage unit that has data to be processed; and a procedure-based process while referring to the contents of the data storage unit via the control unit. a knowledge base storage section having a file in which a rule is written and a file in which a macro that calls a procedure in the procedure storage section that exists corresponding to each element of the rule is written; An inference processing device comprising an inference mechanism section that interprets the contents of a file in which rules and macros are described in a knowledge base storage section and activates processing according to procedures in the procedure storage section via the control section.
JP63145149A 1988-06-13 1988-06-13 Inference processor Expired - Fee Related JP2568634B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63145149A JP2568634B2 (en) 1988-06-13 1988-06-13 Inference processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63145149A JP2568634B2 (en) 1988-06-13 1988-06-13 Inference processor

Publications (2)

Publication Number Publication Date
JPH01312636A true JPH01312636A (en) 1989-12-18
JP2568634B2 JP2568634B2 (en) 1997-01-08

Family

ID=15378552

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63145149A Expired - Fee Related JP2568634B2 (en) 1988-06-13 1988-06-13 Inference processor

Country Status (1)

Country Link
JP (1) JP2568634B2 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS622318A (en) * 1985-06-26 1987-01-08 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Collection of data for expert system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS622318A (en) * 1985-06-26 1987-01-08 インタ−ナショナル ビジネス マシ−ンズ コ−ポレ−ション Collection of data for expert system

Also Published As

Publication number Publication date
JP2568634B2 (en) 1997-01-08

Similar Documents

Publication Publication Date Title
Davis A comparison of techniques for the specification of external system behavior
US4853873A (en) Knowledge information processing system and method thereof
JP4669788B2 (en) Restriction condition solving method, restriction condition solving apparatus, and restriction condition solving system
US5778212A (en) Interprocedural analysis user interface
US5291427A (en) Method for assisting the development of a set of communicating automata
JP5147240B2 (en) Method and system for reversible design tree transformation
Reps et al. Language processing in program editors
JPH01312636A (en) Inference processor
US5671431A (en) Method for processing user program on a parallel computer system by inserting a tag during compiling
Dhamdhere et al. Characterization of program loops in code optimization
Zehendner A module-based assembly language with parallel processing constructs and its implementation in the ASTOR architecture
Wiseman et al. Rainbow—a multi‐purpose CAD system
Yin An integrated software design paradigm
Ishijima et al. A Small Engineering Workbench On A Personal Computer
JP2601541B2 (en) FORTRAN input / output list processing method
JPS6379176A (en) Method for producing automatically program by combining parts based on designing specifications
Smyth et al. Code generation for sequential constructiveness
JP3307461B2 (en) Inference equipment
Wiedmann Efficiency in the APL environment—a full arsenal for attacking CPU hogs
JPS6162141A (en) Logic-type information processing device
Lesser DIRECT EMULATION OF CONTROL STRUCTURES BY A PARALLEL MICRO-COMPUTER.
Hassell et al. Generalisation and the Adaptive
MONICA INTERNATIONAL by DEVELOPMENT INC. 111 BDC CORPORATION
Karlov Software for graphic display systems
Citrin et al. A graphical semantics for graphical transformation languages

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees