JPH0212336A - Knowledge base system and knowledge base conversion system - Google Patents

Knowledge base system and knowledge base conversion system

Info

Publication number
JPH0212336A
JPH0212336A JP63161232A JP16123288A JPH0212336A JP H0212336 A JPH0212336 A JP H0212336A JP 63161232 A JP63161232 A JP 63161232A JP 16123288 A JP16123288 A JP 16123288A JP H0212336 A JPH0212336 A JP H0212336A
Authority
JP
Japan
Prior art keywords
knowledge
knowledge base
data
diagnostic
inference
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP63161232A
Other languages
Japanese (ja)
Inventor
Ritsu Katayama
片山 立
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.)
Sanyo Electric Co Ltd
Original Assignee
Sanyo Electric 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 Sanyo Electric Co Ltd filed Critical Sanyo Electric Co Ltd
Priority to JP63161232A priority Critical patent/JPH0212336A/en
Publication of JPH0212336A publication Critical patent/JPH0212336A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To quickly start a knowledge base system by converting a knowledge base with which the development is through into the knowledge structure data described in a procedure type language via a knowledge base conversion module, connecting said structure data to an inference function library via a compiler and producing a program exclusive for application of the knowledge base system. CONSTITUTION:A knowledge base system consists of a knowledge base 1, a diagnosis type inference module 2, a knowledge base editor 3, a knowledge base conversion module 4, a structure data memory 5, a compiler 6, and an inference function library 7. The knowledge base 1 produced by the editor 3 is converted into the structure data described in a procedure type language by the module 4. Then the structure data is translated by the compiler 6 and connected to the library 7 to produce a program exclusive for application which includes the base 1 as a part of an exclusive program. In such a constitution, the knowledge base system is quickly started.

Description

【発明の詳細な説明】 イ)産業上の利用分野 本発明は、診断機知識表現形式によって記述された知識
ベースを持つ知識ベースシステムに関する。
DETAILED DESCRIPTION OF THE INVENTION A) Field of Industrial Application The present invention relates to a knowledge base system having a knowledge base described in a diagnostic machine knowledge expression format.

1)従来の技術 最近、知識工学の発達に伴い、人工知能技術の産業への
適用が著しく広がっておシ、特にエキスパートシステム
に代表される知識ベースシステムはその代表的なもので
ある。知識ベースシステムは、宣言的に記述された問題
領域固有の専門知識やノウハウを格納した知識ベースと
、知識ベースとは分離され知識ベース内の知識の解釈や
推論を実行する推論モジエール(推論機構)から構成さ
れる。知識ベースと推論モジエールが分離して構成され
るため、従来の手続き型言語(例えば、PASCAL、
 C,FORTIセAN等)に比べ、プログラムの開発
効率、保守性、可読性、拡張性が著しく向上されている
1) Conventional technology Recently, with the development of knowledge engineering, the application of artificial intelligence technology to industry has expanded significantly, and in particular, knowledge-based systems represented by expert systems are a typical example. A knowledge base system consists of a knowledge base that stores declaratively described problem domain-specific expertise and know-how, and an inference module that is separated from the knowledge base and performs interpretation and inference of the knowledge within the knowledge base. It consists of Because the knowledge base and inference module are configured separately, traditional procedural languages (e.g., PASCAL,
C, FORTI SEAN, etc.), program development efficiency, maintainability, readability, and extensibility are significantly improved.

さて、診rIfrmの知識ベースシステム(エキスパー
トシステム)は、典型的に、診断型知識表現によりて記
述さnた知識ベース、診断歴推論モジュール、知識ベー
スを構築するための知識ベースエデイタにて構成され、
知識ベースを構築するための知識ベースエデイタによっ
て知識ベースを構築し、診断戯推論モジュールによりて
知識ベース内の知識の検証を行なうことの繰り返しによ
り知識ベースシステムの開発が行われる。以下、知識ベ
ースを構築するための知識ベースエデイタヒ診断屋推論
モジュールを合わせて診断型シェルと呼ぶ。
Now, the knowledge base system (expert system) of a diagnosis rIfrm typically consists of a knowledge base described by a diagnostic knowledge representation, a diagnostic history inference module, and a knowledge base editor for constructing the knowledge base. ,
A knowledge base system is developed by repeatedly constructing a knowledge base using a knowledge base editor and verifying the knowledge within the knowledge base using a diagnostic reasoning module. Hereinafter, the knowledge base editor diagnostic inference module for constructing a knowledge base will be collectively referred to as a diagnostic shell.

ま九、診断型問題に対する知識表現形式には、IF T
HI  形式のルールや、結論にいたるまでの判断基準
をタライテリアフレームと呼ばれる表形式にまとめたタ
ライテリア盤知識表現などがある。ルールを知識表現と
しているルールベースシステムにおいては、個々のルー
ル(知識)のモジュール性がよい反面、複雑な問題に対
処するなめにルール数が増大してくると、個々のルール
の関連や、推論時のシステムの挙jE!lを把握するの
が―しくなり、知識ベースの開発や保守が困廟になると
いう難点がある。一方、これに対し、タライテリア型知
識表現は、関連のある知識群を構造化して記述するとい
う知識表現であり、診断型問題に対する推論過程の把握
や大規模な知識ベースの開発効率、保守性が向上すると
いった利点があるので、この知識表現を用いた診断型エ
キスパートシステム構築ツール(診断型シェル)が提案
されている(「知識工学入門」上野晴樹著、オーム社発
行参照)。
9. The knowledge expression format for diagnostic problems is IF T.
There is a Taliteria board knowledge expression that summarizes the rules of the HI format and the criteria for reaching a conclusion in a tabular format called a Taliteria frame. In a rule-based system where rules are used as knowledge expressions, the modularity of individual rules (knowledge) is good, but as the number of rules increases to deal with complex problems, the relationships between individual rules and inferences become difficult. The history of the time system! The problem is that it becomes difficult to understand the information, making it difficult to develop and maintain the knowledge base. On the other hand, Taliteria-type knowledge representation is a knowledge representation that describes a group of related knowledge in a structured manner, and it is easy to understand the reasoning process for diagnostic problems, develop efficiency and maintainability of large-scale knowledge bases. Since it has the advantage of improving knowledge representation, a diagnostic expert system construction tool (diagnostic shell) using this knowledge representation has been proposed (see "Introduction to Knowledge Engineering" by Haruki Ueno, published by Ohmsha).

ハ)発明が解決しようとする課題 さて、従来このタライテリア型知識表現をベースとした
診断型シェルを用いて構築され九知識ベースを運用・配
布する場合、すなねち知識ベースの開発が終了してエン
ドユーザにアプリケーションシステムとして配布する場
合は、開発段階と全く同様に知識ベースと知識ベースを
構築するための知識ベースエデイタと紛断盤モジエール
とで構成される形態か、知識ベースと知識ベースをロー
ドする丸めの知識ペースローダモジエールを付加した診
断型推論モジュールとで構成される形態、のどちらかで
アプリケーションシステムの実行がされていた。
C) Problems that the invention aims to solve Now, conventionally, when operating and distributing a knowledge base constructed using a diagnostic shell based on this Taliteria type knowledge representation, the development of the knowledge base is completed. If you want to distribute it as an application system to end users, you can either use a form that consists of a knowledge base, a knowledge base editor for building the knowledge base, and a cutting board module, just like in the development stage, or a knowledge base and a knowledge base module. The execution of the application system was carried out either in the form of a diagnostic inference module and a knowledge pace loader module to load rounding.

しかし、このような形、態で開発した知識ベースシステ
ムであるアプリケーションシステムの実行がさnる場合
には、次の様な問題点があった。
However, when an application system, which is a knowledge-based system developed in this manner, is difficult to execute, there are the following problems.

即ち、システム起動時、知識ベースを構築するための知
識ベースエデイタないし推論モジュールを起動した後、
外部記憶手段(例えばフロッピィディスク等)に記憶さ
れている知識ベースを本体にロードする必要があシ、知
識ベースの容量(サイズ)が大きいときは、ロード時間
に多くの時間を必要とし、アプリケーションシステムの
起動が遅くなる。
That is, when the system starts up, after starting the knowledge base editor or inference module for building the knowledge base,
It is necessary to load the knowledge base stored in external storage means (such as a floppy disk) into the main unit, and when the capacity (size) of the knowledge base is large, it takes a long time to load, and the application system starts up slowly.

tt1アプリケージlνシステムは診断型シェルと知識
ベースとに分離されているため、知識ベースの内容を、
エンドエーザから保護したい場合(即ち二ンドエーザに
対してはアプリケーションシステムが提供する問題解決
支援機能にけを提供し、知識ベース自体の内容は秘密に
しておきたい場合)でも、エンドエーザが知識ベースを
構築するための知識ベースエデイタないしそれと同等の
機能を有するユーティリティを持っていれば、容易に知
識ベースを読まれてしまい、エンドニーずに対して知1
ベースの機密性を保持することができない。
Since the tt1 application lν system is separated into a diagnostic shell and a knowledge base, the contents of the knowledge base can be
Even if you want to protect the knowledge base from end users (i.e., you want to provide only the problem-solving support function provided by the application system to the second user and keep the contents of the knowledge base secret), the end user may build the knowledge base. If you have a knowledge base editor or a utility with equivalent functionality, your knowledge base can easily be read, and the end user's knowledge will be lost.
base confidentiality cannot be maintained.

=3!I題を解決する九めの手段 本発明は、推論を行う丸めに必要な事実や所見を示すフ
ァクトと、中間的な事実や仮説を示す中間仮説やファク
トにもとづいて結論を導くtめの判断基準を実質的に表
形式にまとめ九結論仮説とにより診断盤間d解決のため
の知識が表現され蓄積さル九知識ベースと、該知識ベー
ス内の知識にもとづいて問題解決あるいはその支援をす
るための推論を行う診断微推論モジュールと、前記知識
ベースを構築する九めの知識ベースを構築するための知
識ベースエデイタと、前記知識ベースに蓄積さnた知識
を手続き型言語による構造体データに変換する知識ベー
ス変換手段と、罰記珍所型推論モジュールと同様な推論
を行うPilI記手絖き型言1層の推論131故ライブ
ラリと、前記構造体データを翻訳し′@ml推論IA数
ライブラリと結合させるコンパイラとを備える矧a銭ベ
ースシステムである。
=3! Ninth Means for Solving Problem I The present invention is based on facts that indicate facts and observations necessary for rounding up inferences, and intermediate hypotheses and facts that indicate intermediate facts and hypotheses. The criteria are essentially summarized in a table format, and the knowledge for solving the problem is expressed and accumulated through the nine conclusion hypotheses and the knowledge base is created, and the problem is solved or supported based on the knowledge within the knowledge base. a diagnostic micro-inference module that performs inference for the purpose of the invention, a knowledge base editor for constructing the ninth knowledge base, and a knowledge base editor for constructing the ninth knowledge base, and converting the knowledge accumulated in the knowledge base into structured data using a procedural language. A knowledge base conversion means to convert, a PilI scribe type language 1 layer inference 131 library that performs the same inference as the punishment type inference module, and a '@ml inference IA number that translates the structure data. It is a coin-based system that includes a library and a compiler that combines it.

ホ)作 用 知識ベースを構築するための知識ベースエデイタにより
構築された知識ベースは知識ベース変換手段にて手続き
匿言冶で記述さn14造体データに変換され、更にこの
構造体データはコンパイラにて翻訳され推論関数ライブ
ラリと結合されて、知1識ベースが専用のプログラムの
一部として組み込まれた問題固有の専用プログラム(ア
プリケーションシステム)として生成さrLる。
e) The knowledge base constructed by the knowledge base editor for constructing the operational knowledge base is converted into n14 structure data written in procedural agnostic language by the knowledge base conversion means, and furthermore, this structure data is sent to the compiler. The knowledge base is translated and combined with the inference function library to generate a problem-specific dedicated program (application system) in which the knowledge base is incorporated as part of the dedicated program.

へ)実施例 第1図は本発明の一部1例を示す概略構成図である。(
1)は知識ベースで、珍l19?型間1解決のための知
識、ツクハク、手法を、推論を行なう九めに必要な事実
や所見を示すファクトと、中間的な事実や仮説を示す中
間仮説と、ファクトや中間仮説にもとづいて結論を導く
ための判断基準を表形式Ktとめた結論仮説からなる診
断型知識表現(タライテリア屋知識表現)形式によつて
記述された知識が蓄積されている。
f) Embodiment FIG. 1 is a schematic diagram showing one example of a part of the present invention. (
1) is knowledge-based and rare? The knowledge, tricks, and methods for solving Type 1 are divided into facts that indicate the facts and findings necessary for making inferences, intermediate hypotheses that indicate intermediate facts and hypotheses, and conclusions based on the facts and intermediate hypotheses. Knowledge described in a diagnostic type knowledge expression (Taraiteria knowledge expression) format consisting of a conclusion hypothesis with a table format Kt as a judgment criterion for deriving the results is accumulated.

(2(は知識ベース(11(知識)を解釈、実行して推
論を行う九めの診断型推論モジュール、(3)は前記知
識ベースは)をm築するための知識ベースを構築するた
めの知識ベースエデイタである。通常はこの知識ベース
(11、診断型推論モジュール(2)、および知識ベー
スを構築するための知識ベースエデイタ(3)にて診断
型知識ベースシステム(診断壓エキスパートシステム)
が構成されるが、本発明一実施例では更に以下の構成を
備える。
(2) is the ninth diagnostic inference module that interprets and executes the knowledge base (11 (knowledge) and makes inferences; (3) is the knowledge base). This is a knowledge base editor.Usually, this knowledge base (11), a diagnostic inference module (2), and a knowledge base editor (3) for constructing a knowledge base are used to create a diagnostic knowledge base system (diagnosis expert system).
However, one embodiment of the present invention further includes the following configuration.

(4)は知識ベース+11を手続き型言語によるプログ
ラム(以下手続き塁プログラムという)である構造体デ
ータに変換するための知識ベース変換量ジュール、(5
)は該知識ベース変換モジュール中にて変換された手続
き盤プログラムの構造体データC以下知識構造体データ
という〕を保持する構造体データメモリである。
(4) is the amount of knowledge base conversion joules required to convert knowledge base +11 into structure data that is a program written in a procedural language (hereinafter referred to as a procedural base program), (5
) is a structure data memory that holds structure data C (hereinafter referred to as knowledge structure data) of the procedure board program converted in the knowledge base conversion module.

!61は知識ベース変換モジュール(4)で変換される
手続き型プログラムに用いられる手続キ聾言語のコンパ
イラで、翻訳回&)(狭義のコンパイラ)とアセンブラ
とリンカを備え、知識構造体データを′4vL雀のライ
ブラリとリンク可能なり味ケータプルな形式に変換する
! 61 is a procedural deaf language compiler used for procedural programs converted by the knowledge base conversion module (4), and is equipped with a translation section &) (compiler in a narrow sense), an assembler, and a linker, and converts knowledge structure data into '4vL. It converts to a tasteful format that can be linked with the sparrow library.

(7)は前述の手続き型言語の推論関数ライブラリで知
識ベース111を診断型推論モジュール(2(が解釈・
実行するのと同様に、知識構造体データを解釈、実行す
るための知識構造体のアクセス関数や推論関数などから
なる。
(7) uses the aforementioned procedural language inference function library to interpret and interpret the knowledge base 111 using the diagnostic inference module (2).
It consists of knowledge structure access functions, inference functions, etc. for interpreting and executing knowledge structure data in the same way as for execution.

さて、基本的な知識ベースシステムは、知識ベースを構
築するための知識ベースエデイタ(3)によりて知識ベ
ース(13を構築し、参断個推論モジュール(21によ
りて知識ベースllj内の知識の検証を行なうというサ
イクルを繰り返すことで開発される。診断型シェル(診
断型推論モジニール(2)及び知識ベースを構築するた
めの知識ベースエデイタ(3))によって開発された知
識ベースil+は知識ベース変換モジエール(4)によ
って知識構造体データVcyR換される。
Now, the basic knowledge base system constructs a knowledge base (13) using a knowledge base editor (3) for constructing a knowledge base, and verifies the knowledge in the knowledge base llj using an inference module (21). The knowledge base il+ developed by the diagnostic shell (diagnostic inference module (2) and knowledge base editor for building a knowledge base (3)) is a knowledge base conversion module. The knowledge structure data is converted to VcyR by (4).

知識ベース111 K訃いては、診断型問題に対する知
識は、前述のとおプクライテリア盟知識表現で記述され
、知識データ盤としてファクト、中間仮説、および結論
仮説に区別される。第2図人5BsC夫々にファクト、
中間仮説、結論仮説の記述例を示す。第2図に示す様に
、知識は1つの単位ごとに $知識データ型  知識データ名 ?属性名1   属性値1 ?属性名2   属性値2 $ の如く記述される。
Knowledge Base 111 In the knowledge base 111, the knowledge for diagnostic problems is described using the Criterion Knowledge Expression as described above, and is divided into facts, intermediate hypotheses, and conclusion hypotheses as a knowledge database. Figure 2 Facts for each person 5BsC,
Examples of descriptions of intermediate and conclusion hypotheses are shown. As shown in Figure 2, knowledge is divided into units of $Knowledge data type Knowledge data name? Attribute name 1 Attribute value 1? It is written as Attribute name 2 Attribute value 2 $.

知識ベース変換モジュール(4)には、診断型シェルに
て解釈、実行可能な知識データ型(ここでは3種類だが
、もっと多くの種類が存在する場合もある)が登録され
、各知識データ型に対応した属性名を登録しておく属性
登録テーブルを備えている。第3図にファクトに対する
属性登録テーブルの−例を示す。
The knowledge base conversion module (4) registers knowledge data types (three types here, but there may be more types) that can be interpreted and executed by the diagnostic shell, and each knowledge data type It has an attribute registration table in which corresponding attribute names are registered. FIG. 3 shows an example of an attribute registration table for facts.

第5図において、構造体毛はその知識データ型(ファク
ト]を手続き型言語(本実施例では手続き型言語として
Ct語を例として説明する)の構造体に変換した場合の
構造体毛でs t)’I)@defは横遺体の宣言のマ
クロ名(この例ではC言語のtypd6f宣言rtyp
ed6f  5truct  fact+さ 」を意味している)を示している。
In Fig. 5, the structure is the structure when the knowledge data type (fact) is converted into a structure of a procedural language (in this example, the procedural language will be explained using Ct language as an example). 'I) @def is the macro name of the horizontal body declaration (in this example, the C language typd6f declaration rtyp
ed6f 5truct fact+sa).

く属性名定義〉のフィールドには、知識データ臘で定!
iさnているJ!4性名が記述され、くメンバ定義〉の
フィールドには、属性名に対応し一#、構造体のデータ
置とメシパ名が記述される。例えば、属性名「値」に対
応したくメンバ定義〉は、1ntvalueである。
The attribute name definition field is defined by the knowledge data 臘!
i-san teru J! The attribute name is written, and in the field ``Member Definition'', the data location and name of the structure are written corresponding to the attribute name. For example, the member definition corresponding to the attribute name "value" is 1ntvalue.

くデフォルト〉は、知識記述において、対応する属性名
と属性値の対が記述されていない場合の既定値を記述し
ておくフィールドである。またく置換ルール〉杜、属性
値を構造体のメン?(の値として代入する場合に、連部
な置換を行ないたい場合のルールを記述しておくフィー
ルドである。例えは第5図の属性「盟」の置換ルールは
、プールm−>ll Man−>t  実a型−>2で
あるので、属性「型」の属性値として、例えば「プール
型」と記述さrtてぃればrOJが、構造体のメンバの
typeの値として初期化さnる。
Default> is a field in which a default value is written when a corresponding attribute name and attribute value pair is not described in the knowledge description. Multi-replacement rule〉Du, attribute value to structure member? This field is used to write rules for performing continuous replacement when substituting the value of >t Real type a -> 2, so if the attribute value of the attribute "type" is written as "pool type", for example, rOJ is initialized as the value of type of the structure member. Ru.

尚、く属性名定義〉、〈メンバ定義〉のフィールドに記
述されたデータにしたがって、知識を手続I5型゛δ語
(C言語)によるJA構造体知識構造体〕として表曵す
るための、宣言文が生成されており、生成され九#I造
体の宣言文は、ヘッダファイルとして予めまとめておき
、あとで生成する知識h゛考造体データプログラムに含
ませてコンパイルざルる。矧識データ戯毎に禰性盆緑テ
ーブルが定義されるのと同様に、知識構造体のd言文も
矧1.1データ型毎に生成される。第4図にファクトの
構造体の宣言文(Cぎ語による)の例を示す。
In addition, a declaration is made to express knowledge as a procedure I5 type [JA structure knowledge structure in δ language (C language)] according to the data described in the fields of Attribute Name Definition and Member Definition. The sentences have been generated, and the declaration sentences of the generated 9#I structures are compiled in advance as a header file, and later included in the knowledge structure data program to be generated and compiled. In the same way that the Nesei Bonryoku table is defined for each knowledge data type, the d language of the knowledge structure is also generated for each data type. FIG. 4 shows an example of a declaration statement (in C language) for a fact structure.

知識ベース変換モジュール(4)におけるR漠処理の概
略を第5図に示す。開発され之知識ベース(1)が知識
ベース変換モジュール(4)に入力されると、個々の知
識単位毎に知識データ屋が判別される。
FIG. 5 shows an outline of the R-data processing in the knowledge base conversion module (4). When the developed knowledge base (1) is input to the knowledge base conversion module (4), a knowledge database is identified for each knowledge unit.

知−データ溢が判別されると、その知識データ型に対応
する属性登録テーブルを参照しながら、後述する構造体
生成用テーブルが作成される。次に構造体生成用テーブ
ルt−属性登録テーブルに基づいてデフォルト、置換処
理を行i、そして知識構造体データが出力される。これ
らの処理は知識ベースは一円の未処理の知識単位がなく
なるまでく9かえされる。
When knowledge data overflow is determined, a structure generation table to be described later is created with reference to the attribute registration table corresponding to the knowledge data type. Next, default and replacement processing is performed based on the structure generation table t and the attribute registration table i, and the knowledge structure data is output. These processes are repeated nine times in the knowledge base until there is no unprocessed knowledge unit of one yen.

更に詳細に説明すると、入力された知識ベース(13の
知識毎に、知識構造体データを生成するためVζ、筐ず
1$知識データ#IIIt−識別する。知識データ型が
識別さnると、それに対応し電属性登録テーブルに従り
九構造体生成用テーブルがセットされる。例えば、識別
された知識データ塵が弄予権孝坤の場合(即ち1$カテ
キデ+1)、第5kiiuの属性登録テーブルに従った
[6図に示すJI4性値のフィールドが窒出であるテー
ブルがセットされる。そして知識データ名t−読み込み
、第6図のテーブルの該当するフィールドに書き込む。
To explain in more detail, in order to generate knowledge structure data for each of the input knowledge bases (13 knowledges), Vζ, 1$ knowledge data #IIIt- is identified. Correspondingly, the table for generating nine structures is set according to the electric attribute registration table.For example, if the identified knowledge data dust is a categorization (i.e. 1$catekide + 1), the attribute registration of the 5th kiiu is set. According to the table [FIG. 6], a table is set in which the JI4 value field is nitride.Then, knowledge data name t- is read and written to the corresponding field in the table of FIG.

次に読み込んだ1文字が1$1であれば、この知識(1
知識率位)についての記述が終了したことになるので、
知識構造体データを生成する次の処理へと移る。′$1
でなければ、現在セットされている構造体生成用テーブ
ル(第6図)に書き込むべき属性値があることを意味し
ているので、′?“を検出後、属性名と属性値の対を読
み込み、構造体生成用テーブルの該当する属性値の欄に
jtIき込む。
If the next character read is 1$1, this knowledge (1
This means that we have finished writing about knowledge rate).
Move on to the next process of generating knowledge structure data. '$1
If not, it means that there is an attribute value to be written to the currently set structure generation table (Figure 6), so '? After detecting ", the attribute name and attribute value pair is read and jtI is entered into the corresponding attribute value column of the structure generation table.

この処理を、知識記述の終了を示す1$“を検出するま
で繰〕返す。そして第6図に示す様な構造体生成用テー
ブルが作成される。第7図に構造体生成用テーブルの作
成のためのフローチャートを示す。
This process is repeated until "1$" is detected, which indicates the end of the knowledge description.Then, a structure generation table as shown in Figure 6 is created.Figure 7 shows the creation of a structure generation table. shows a flowchart for.

告知m(各知識単位]毎に構造体生成用テーブルが作成
されたら、属性値のデフォルト処理、置換処理を行つて
知識構造体を生成する。この処理を第8図のフローチャ
ートを参照して説明する。
Once a structure generation table is created for each announcement m (each knowledge unit), a knowledge structure is generated by performing attribute value default processing and replacement processing.This processing will be explained with reference to the flowchart in FIG. do.

まず、構造体生成用テーブルより項番に属性名と属性値
の対を読み込む。この時、属性値が未定義であれば、対
応する知識データ型の属性登録テーブルを参照して、そ
の該当する属性のくデフオルト〉のフィールドに記述さ
れているデフォルト値を書き込む(デフォルト処理)。
First, a pair of attribute name and attribute value is read into the item number from the structure generation table. At this time, if the attribute value is undefined, the attribute registration table of the corresponding knowledge data type is referred to and the default value described in the field of the corresponding attribute is written (default processing).

また、属性値が定義ずみの場合、属性登録テーブルのく
置換ルール〉のフィールドを参照して、1換ルールが記
述してあればそれにしたがって構造体生成用テーブルの
属性値を−fi4変える。置換ルールがなければ1、属
性値はその11とする。以上の処理を、構造体生成用テ
ーブルに記述さnているすべての属性について行なう。
If the attribute value has already been defined, the attribute value in the structure generation table is changed by -fi4 by referring to the ``replacement rule'' field in the attribute registration table, and if a 1-replacement rule is written, it is changed accordingly. If there is no replacement rule, it is set to 1, and the attribute value is set to 11. The above processing is performed for all attributes described in the structure generation table.

第9図に第6図の!、4遺体生成用テーブルを、第5図
の属性登録テーブルに基づいてデフォルト処理、置換処
理を行なったものを示す。dlS9図では、属性値が未
定義の「説明文」には、デフォルト値である空白文字r
” Jが書き込まnている。
Figure 6 in Figure 9! , 4 body generation table is shown after performing default processing and replacement processing based on the attribute registration table of FIG. In the dlS9 diagram, the blank character r, which is the default value, is added to the "description text" whose attribute value is undefined.
” J wrote n.

また置換ルールによシ属性「型」の属性値「実数型」は
「2」に、「評価フラグ」の属性値「確定」は「1」に
置換されている。
Also, according to the replacement rule, the attribute value "real number type" of the attribute "type" is replaced with "2", and the attribute value "determined" of the "evaluation flag" is replaced with "1".

そしてデフォルト処理、置換処理のされた構造体生成用
テーブルに従うて、手続き盟言H(C言語)による知識
構造体データが出力され、構造体データメモIJ (5
1に格納さnる。第10図は、知識ベース11+内の知
識として第2図人に示されるファクトが、該ファクトに
対応して作成された第9図の構造体生成用テーブルに従
って変換されたファクト構造体を示す。ここでは7アク
ト構造体のマクロ名であるrFAcTJ 、次にファク
トへのポインタ「家FIJ、代入記号の「城」、次にフ
ァクト構造体の書くメンバの初期値のならび1値1゜値
2.・・・値N)、最後に文の区切りを示す「;」が出
力される。
Then, according to the structure generation table that has been subjected to default processing and replacement processing, knowledge structure data in procedural language H (C language) is output, and structure data memo IJ (5
Stored in 1. FIG. 10 shows a fact structure in which the facts shown to the person in FIG. 2 as knowledge in the knowledge base 11+ are converted according to the structure generation table of FIG. 9 created corresponding to the facts. Here, rFAcTJ is the macro name of the 7-act structure, then the pointer to the fact "house FIJ", the assignment symbol "castle", then the initial values of the members written in the fact structure, 1 value 1 degree value 2. . . . value N), and ";" indicating a sentence break is output at the end.

第2図人に記述される知識(ファクト)と第10図の手
続き型言語による知識構造体データの対応関係をみると
、知識データ型であるファクトが構造体FACTに、知
識データ名F1が構造体FACTへのポインタに、各属
性名が第10図における構造体FACTの各メンバ定義
に各属性値が第10図における構造体FACTの各メン
バの初期値に対応している。
Looking at the correspondence between the knowledge (facts) described in Figure 2 and the knowledge structure data written in a procedural language in Figure 10, the knowledge data type Fact is in the structure FACT, and the knowledge data name F1 is in the structure. In the pointer to the structure FACT, each attribute name corresponds to each member definition of the structure FACT in FIG. 10, and each attribute value corresponds to the initial value of each member of the structure FACT in FIG.

尚、知識構造体データとして、第10図は構造体の初期
値設定によるものであるが、第11図の様に構造体の各
メンバに対して明示的に属性値を代入するものでも曳い
Although the knowledge structure data shown in FIG. 10 is based on the initial value setting of the structure, it is also possible to explicitly assign attribute values to each member of the structure as shown in FIG. 11.

斯様にしてタライテリア盟知識表現における知識は手続
き型言語(本実施例ではC言語)の構造体データに変換
される。例示しない中間仮説や結論仮説についても、例
示したファクトと同様の処理によって手続き型言語の知
識構造体データに変換される。
In this way, the knowledge in the Taliteria knowledge representation is converted into structure data in a procedural language (C language in this embodiment). Intermediate hypotheses and conclusion hypotheses that are not exemplified are also converted into knowledge structure data in a procedural language through the same processing as the exemplified facts.

このようにして診11Taシェルを用いて開発された知
識ベース(1)が、知識ベース変換モジエール(4)に
よりていったん手続き型言語による知識構造体データに
変換されると、従来の手続!型言語によるプログラム開
発と同様な処理(ソースデクグラムからオプジヱクトプ
ログラムへの変換処理)によって、アプリケージ目ンプ
ログラムが作成される。即ち、手続き型言語による知識
構造体データは、コンパイラ(6)にて、該当する手続
き型言語(C言語)の翻訳同語とアセンブラによって、
推論I!A数ライブラリ(7)とリンク可能なリロケー
タブルな形式に変換され、更にリンカによって推論関数
ライブラリ(7)とリンクされ、アプリケージ冒ν専用
プログラムとして作成される。
Once the knowledge base (1) developed using the Shinken 11Ta shell is once converted into knowledge structure data in a procedural language using the knowledge base conversion module (4), it can be converted into knowledge structure data using a procedural language. A program for application cages is created by a process similar to that used in program development using a typed language (conversion process from a source degram to an object program). That is, knowledge structure data written in a procedural language is processed by a compiler (6) using a translation tautology and an assembler for the corresponding procedural language (C language).
Reasoning I! It is converted into a relocatable format that can be linked with the A number library (7), and further linked with the inference function library (7) by a linker, and created as a program exclusively for the application game.

ところで、知識ベースシステムにおける推論機構(推論
モジュール)は、どのような推論メカニズムであれ、基
本的には知識ベース内の各知識のアクセス(属性値の参
照・代入処理)機能をベースにしているので、推論関数
ライブラリ(71にて提供される推論関数は、診断凰シ
王ルの診断臘推論毎ジエールの機能のうち、知識ペース
アク竜ス機能の部分を、変換された手続き型プログラム
の知識構造体データに対するアクセス関数でおきかえた
ものに相当する。
By the way, the inference mechanism (inference module) in a knowledge base system is basically based on the function of accessing each knowledge within the knowledge base (referencing and assigning attribute values), no matter what the inference mechanism is. , The inference function provided in the inference function library (71) is a knowledge structure of a procedural program that converts the knowledge pace function part of the diagnosis function of the diagnosis function library (71) into the knowledge structure of the procedural program. This corresponds to the replaced data access function.

ト)発明の効果 本発明は以上の説明から明らかな如く、開発が終了した
知識ベースを、知識ベース変換モジュールによって手続
き型言語による知識構造体データに変換し、コンパイラ
によって推論関数ライブラリと結合させて知識ベースシ
ステムのアプリケージ目ン専用のデクグラムを作成する
ことができる。このため、従来のように完成した診断屋
エキスパートシステムを診断屋シェルと知識ベースとの
対の形で運用・配布する場合と比較して、作成したアプ
リケ−71ン専用のデコグラムを用いたアプリケージ冒
νシステムでは、その起動が迅速にな〕、また、知識ベ
ースも実行形式である専用プログラムの一部として組み
込まれてしまうので知識ベースを不可視化することがで
き構築に多大なコストをかけた知識ベースをよ)強固に
保護することが可能となる。更に、専用プログラムとし
て生成された実行モジエールには、知識ベース開発のた
めには必要であるがアプリケージ曹ν実行時には不要な
知識ベースを構築するための知識ベースエデイタなどの
知識ベース開発支援モジュールが含まれていないので、
診断機シェルと知識ベースに分層したかtちで運用・配
布する場合と比較して、実行モジエールのtイズが小さ
くなるという利点も生ずる。
g) Effects of the Invention As is clear from the above description, the present invention converts a knowledge base that has been developed into knowledge structure data in a procedural language using a knowledge base conversion module, and combines it with an inference function library using a compiler. It is possible to create dekugrams specifically for the application cage of the knowledge base system. For this reason, compared to the conventional case where a completed diagnostician expert system is operated and distributed in the form of a pair of diagnostician shell and knowledge base, application In the blasphemous system, the startup is quick], and the knowledge base is also incorporated as part of a dedicated program in executable format, making the knowledge base invisible and eliminating the huge cost of construction. It becomes possible to strongly protect the knowledge base. Furthermore, the execution module generated as a dedicated program includes knowledge base development support modules such as a knowledge base editor for building a knowledge base that is necessary for knowledge base development but is not required when running the app. Since it is not included,
There is also the advantage that the size of the execution module is smaller than when operating and distributing the diagnostic machine shell and the knowledge base separately.

尚、本実施例では、手続*m言語としてC言語管用いて
説明しているが、他の手続11盟芦語を用いても良い。
In this embodiment, the C language is used as the procedure*m language, but other procedure*m languages may also be used.

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

図面はいずれも本発明一実施例に関し、第1図はシステ
ムの概略構成図、第2図人乃至Cは知識の記述例を示す
図、第5図は属性登録テーブルの一例を示す図、第4図
はファクトの構造体の宣言文の一例を示す図、第5図は
知識ベース変換処理の概略を示すフローチャート、第6
図及び第9図は構造体生成用テーブルの一例を示す図、
第7図及び第8図は構造体生成用テーブルと知識構造体
データの作成の7クーチヤート、第10図及び第11図
は7アクト構造体データの異なる例を示す図である。
The drawings all relate to an embodiment of the present invention; FIG. 1 is a schematic diagram of the system configuration, FIG. 2 is a diagram showing an example of knowledge description, FIG. Figure 4 is a diagram showing an example of a declaration statement of a fact structure, Figure 5 is a flowchart showing an overview of knowledge base conversion processing, and Figure 6 is a flowchart showing an overview of knowledge base conversion processing.
9 and 9 are diagrams showing an example of a structure generation table,
FIGS. 7 and 8 are diagrams showing seven steps for creating a structure generation table and knowledge structure data, and FIGS. 10 and 11 are diagrams showing different examples of seven-act structure data.

Claims (1)

【特許請求の範囲】 1)推論を行うために必要な事実や所見を示すファクト
と、中間的な事実や仮説を示す中間仮説やファクトにも
とづいて結論を導くための判断基準を実質的に表形式に
まとめた結論仮説とにより診断型問題解決のための知識
が表現され蓄積された知識ベースと、該知識ベース内の
知識にもとづいて問題解決あるいはその支援をするため
の推論を行う診断型推論モジュールと、前記知識ベース
を構築するための知識ベースエデイタと、前記知識ベー
スに蓄積された知識を手続き型言語による構造体データ
に変換する知識ベース変換手段と、前記診断型推論モジ
ュールと同様な推論を行う前記手続き型言語の推論関数
ライブラリと、前記構造体データを翻訳し前記推論関数
ライブラリと結合させるコンパイラとを備えることを特
徴とする知識ベースシステム。 2)診断型知識表現で知識が表現された知識ベースにお
ける知識の知識データ型に対応した属性からなる属性登
録テーブルを備え、知識ベース内の知識の知識データ型
を判別し、判別された知識データ型に対応する属性登録
テーブルの属性と前記知識の属性値を対応させた構造体
生成用テーブルを作成し、該構造体生成用テーブルに従
って前記知識を手続き型言語による構造体データに変換
することを特徴とする知識ベース変換方式。
[Scope of Claims] 1) Facts indicating facts and findings necessary for making an inference, and criteria for drawing a conclusion based on intermediate hypotheses and facts indicating intermediate facts and hypotheses. A knowledge base in which knowledge for diagnostic problem solving is expressed and accumulated by conclusion hypotheses summarized in a format, and diagnostic reasoning that makes inferences to solve problems or support them based on the knowledge in the knowledge base. a module, a knowledge base editor for constructing the knowledge base, a knowledge base conversion means for converting the knowledge accumulated in the knowledge base into structured data in a procedural language, and reasoning similar to the diagnostic reasoning module. A knowledge base system comprising: an inference function library for the procedural language; and a compiler that translates the structure data and combines it with the inference function library. 2) An attribute registration table consisting of attributes corresponding to the knowledge data type of knowledge in the knowledge base in which knowledge is expressed using diagnostic knowledge expression is provided, and the knowledge data type of knowledge in the knowledge base is determined, and the determined knowledge data Creating a structure generation table in which the attributes of the attribute registration table corresponding to the type correspond to the attribute values of the knowledge, and converting the knowledge into structure data in a procedural language according to the structure generation table. Characteristic knowledge base conversion method.
JP63161232A 1988-06-29 1988-06-29 Knowledge base system and knowledge base conversion system Pending JPH0212336A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63161232A JPH0212336A (en) 1988-06-29 1988-06-29 Knowledge base system and knowledge base conversion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63161232A JPH0212336A (en) 1988-06-29 1988-06-29 Knowledge base system and knowledge base conversion system

Publications (1)

Publication Number Publication Date
JPH0212336A true JPH0212336A (en) 1990-01-17

Family

ID=15731145

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63161232A Pending JPH0212336A (en) 1988-06-29 1988-06-29 Knowledge base system and knowledge base conversion system

Country Status (1)

Country Link
JP (1) JPH0212336A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03269631A (en) * 1990-03-19 1991-12-02 Fujitsu Ltd Constitution processing system for rule base system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03269631A (en) * 1990-03-19 1991-12-02 Fujitsu Ltd Constitution processing system for rule base system

Similar Documents

Publication Publication Date Title
RU2421784C2 (en) Modelling of relations
Smith KIDS: A semiautomatic program development system
US4860204A (en) Computer based workstation for development of graphic representation of computer programs
JP2015212972A (en) Processing data using vector fields
Çetinkaya et al. Model continuity in discrete event simulation: A framework for model-driven development of simulation models
JPH08202545A (en) Object-oriented system and method for generation of target language code
JPH01201753A (en) Asn.1 information data system
Algehed et al. Simple noninterference from parametricity
Cohen et al. Applying software engineering to agent development
JP2801931B2 (en) Logic design processing device, circuit conversion rule translation device, and circuit conversion rule translation method
Zhou et al. InstructPipe: Building Visual Programming Pipelines with Human Instructions
JPH0212336A (en) Knowledge base system and knowledge base conversion system
Kallat et al. CLS-SMT: bringing together combinatory logic synthesis and satisfiability modulo theories
Śmiałek et al. Runtime semantics of use case stories
Sintzoff Understanding and expressing software construction
Vandevelde et al. Interactive feature modeling with background knowledge for validation and configuration
Meyer Formalization of visual mathematical notations
CN112579059A (en) Compiling method supporting finite field data type and operator
Pfister et al. A Framework for Concurrent Design of Metamodels and Diagrams-Towards an Agile Method for the Synthesis of Domain Specific Graphical Modeling Languages.
Luck et al. Agent-Oriented Software Engineering VIII: 8th International Workshop, AOSE 2007, Honolulu, HI, USA, May 14, 2007, Revised Selected Papers
Tsushima et al. A common framework using expected types for several type debugging approaches
KR102143602B1 (en) Service package authoring method and robot service development system
AU595155B1 (en) Expert system apparatus and methods
Serrano Formal specifications of software design methods
Gunter Forms of semantic specification