JPH03269631A - Constitution processing system for rule base system - Google Patents

Constitution processing system for rule base system

Info

Publication number
JPH03269631A
JPH03269631A JP2069452A JP6945290A JPH03269631A JP H03269631 A JPH03269631 A JP H03269631A JP 2069452 A JP2069452 A JP 2069452A JP 6945290 A JP6945290 A JP 6945290A JP H03269631 A JPH03269631 A JP H03269631A
Authority
JP
Japan
Prior art keywords
rule
source
rule base
compiler
rules
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
JP2069452A
Other languages
Japanese (ja)
Inventor
Masami Yamazaki
山崎 正実
Hisayo Fukushima
久代 福島
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2069452A priority Critical patent/JPH03269631A/en
Priority to US07/627,151 priority patent/US5204939A/en
Publication of JPH03269631A publication Critical patent/JPH03269631A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To facilitate a large scale and the maintenance of a rule base by providing a knowledge source list and a main function name designating part in a control block when the source of the rule base is once translated by a rule base compiler. CONSTITUTION:A control block 2 is previously provided with a knowledge source list 6, and this list 6 is translated by a rule base compiler. Thus a knowledge list can be produced for an inference engine and a rule base source 1 can be turned into plural files. At the same time, a main function name pointing the source 1 is stored in the block 2 and therefore an object program can be produced and a base system is constituted with inference engine. Furthermore a priority table 9 is contained in a knowledge source block 4, and the priority of rules can be changed just with the change of the table 9 only and without changing the bases, i.e., the rules 10 and 11 and the parts adjacent to these rules. A procedure evaluation part 13 is also provided for optimization of the processing.

Description

【発明の詳細な説明】 〔概 要〕 ルールベースのソースを一旦ルールベースコンパイラに
より翻訳する方式によるルールベースシステムの構成処
理方式に関し。
[Detailed Description of the Invention] [Summary] This invention relates to a configuration processing method for a rule-based system in which a rule-based source is once translated by a rule-based compiler.

大規模化及び保守の容易化を目的とし。The purpose is to increase the scale and facilitate maintenance.

所定のルール記述言語で記述されたルールベースのソー
スをルールベースコンパイラ及びコンパイラで翻訳して
生成される所定の言語のプログラムと、前記所定の言語
による推論エンジンとをリンカで結合編集して構成され
るルールベースシステムにおいて、前記ルールベースの
ソースを制御ブロックと複数の知識源ブロックとで構成
し、前記制御ブロックに、予め当該ルールベースのソー
スに含まれる前記複数の知識源ブロックの一覧を記述し
てなる知taS一覧リストを設け、前記ルールベースコ
ンパイラ及びコンパイラが前記知vhfl一覧リストを
翻訳することにより、前記推論エンジンのための知識源
リストを生成するように構成する。
It is constructed by combining and editing a rule base source written in a predetermined rule description language with a rule base compiler and a program in a predetermined language generated by the compiler, and an inference engine in the predetermined language using a linker. In a rule-based system, the rule-based source is composed of a control block and a plurality of knowledge source blocks, and a list of the plurality of knowledge source blocks included in the rule-based source is written in advance in the control block. A knowledge source list for the inference engine is generated by providing a knowledge TaS list consisting of a knowledge vhfl list and having the rule base compiler and the compiler translate the knowledge vhfl list.

(産業上の利用分野) 本発明はルールベースシステム構成処理方式に関し、更
に詳しくは、ルールベースのソースを一旦ルールベース
コンパイラにより翻訳する方式によるルールベースシス
テム構成処理方式に関する。
(Industrial Application Field) The present invention relates to a rule-based system configuration processing method, and more particularly to a rule-based system configuration processing method using a method in which a rule-base source is once translated by a rule-base compiler.

ルールベース(又はプロダクション)システムは、エキ
スパートシステムの実現手段の1つであり、エキスパー
トシステムにおける知識をプログラムと切り離してルー
ルとしてルールベースに格納し、これを推論エンジンか
ら逐次呼び出して実行して問題を解決するものである。
A rule-based (or production) system is one of the means for realizing an expert system, and the knowledge in the expert system is separated from the program and stored as rules in a rule base, and these are sequentially called and executed from an inference engine to solve problems. It is something to be solved.

〔従来の技術〕[Conventional technology]

ルールベースシステムは、従来のアルゴリズム主体の汎
用プログラム言語では処理の困難であった。試行錯誤に
よりシステムを11m1シたりするようなプログラム、
問題を解決するようなプログラム等に広く使用されてい
る。ルールベースシステムは、当初、ルールを特別なそ
れに適した文法で記述しこれをコンパイラ言語で処理す
るという事が容易でなかったため、LISPの欅なイン
タプリタによる記号処理言語を核としたシステムとして
構築されていた。
Rule-based systems have been difficult to process using conventional algorithm-based general-purpose programming languages. A program that changes the system by trial and error,
It is widely used in programs that solve problems. Initially, rule-based systems were constructed as systems based on a symbolic processing language using the powerful interpreter of LISP, since it was not easy to write rules in a special grammar suitable for the rules and process them with a compiler language. was.

しかし、LISPのようなインタプリタ言語を用いると
、処理が低速でまた使用メモリ量が大きいため、大規模
システムを構築することができなかった。この為、コン
パイラ言語によるルールベースシステムが開発された。
However, when using an interpreted language such as LISP, the processing speed is slow and the amount of memory used is large, making it impossible to construct a large-scale system. For this reason, a rule-based system using a compiler language was developed.

このような方式のルールベースシステムにおいては、ル
ールベースシステムのソースは、ルールの記述に適した
ルール記述言語で記述される。−方、推論エンジンは9
例えばC言語等のコンパイラ言語で記述される。ルール
ベースのソースが。
In such a rule-based system, the source of the rule-based system is written in a rule description language suitable for writing rules. - On the other hand, the inference engine is 9
For example, it is written in a compiler language such as C language. A rule-based source.

−旦、ルールベースコンパイラにより、ベースとなる言
語即ちこの場合はC言語に翻訳され、ソースプログラム
が生成される。このソースプログラムと推論エンジンと
を、各々コンパイラにより翻訳し、結合編集することに
より、ルールベースシステムを構成する。
- Then, a rule-based compiler translates it into a base language, that is, C language in this case, to generate a source program. A rule-based system is constructed by translating this source program and an inference engine using a compiler and combining and editing them.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

従来のルールベースシステムの構成にあっては。 In the configuration of traditional rule-based systems.

以下の如き問題がある。There are problems as follows.

従来のルールベース記述方式では、推論エンジンで必要
となる知識源のリストなどの制御情報を。
In traditional rule-based description methods, control information such as a list of knowledge sources required by an inference engine is required.

ルールベースのソースの翻訳時にその全体を検索して求
めるため、ルールベースのソースを一つのファイルとす
る必要があった。このため、数万行を越えるような大規
模なルールベースの翻訳やルールベースの保守が困難で
ある。
Since the entire rule base source is searched for when translating it, it was necessary to make the rule base source a single file. For this reason, it is difficult to translate a large-scale rule base that exceeds tens of thousands of lines and to maintain the rule base.

また、電子回路の合成などの大きな問題の処理を目的と
するシステムでは、全体をルールベースとするより、目
的に適した部分のみにルールベースの処理方式を採用し
、他の部分はアルゴリズムにより高速化を図るなどがシ
ステム全体の性能向上のために要求される。しかし、従
来のルールベースシステムでは、ルールベースそれ自身
がシステムのメインプログラムとなるため、その実現が
難しい。
In addition, in systems whose purpose is to process large problems such as electronic circuit synthesis, rather than making the entire system rule-based, a rule-based processing method is adopted only for the parts that are suitable for the purpose, and other parts are processed faster by algorithms. In order to improve the performance of the entire system, it is necessary to improve the performance of the entire system. However, in conventional rule-based systems, this is difficult to achieve because the rule base itself is the main program of the system.

また9例えば、電子回路の台底でその回路の最適化処理
を行う際、設計者の要求での回路の規模を最小にしたい
、■回路の遅延時間を最小にしたい1等の背反する条件
を満たさなければならない場合がある。しかし、従来の
ルールベースの知識源内部のルールはその並びにより、
優先順位がきまっているため、同時にこれら2つの用件
をみたす知識源を作成することができない。
9 For example, when performing optimization processing on an electronic circuit at the base of the circuit, there are conflicting conditions such as the designer's desire to minimize the scale of the circuit and the desire to minimize the circuit delay time. There are some cases that must be met. However, due to the arrangement of rules within traditional rule-based knowledge sources,
Since the priority order is fixed, it is not possible to create a knowledge source that satisfies these two requirements at the same time.

また、ルールベースのルールは一般的に“もし〜ならば
〜せよ”の形式である。一方9例えば電子回路の最小化
のようにn個のルールの内で複数のm個のルールが成立
する場合、その中で一番効果のあるルールを選択するよ
うにしたほうが、生成回路品質を向上できる。ところが
、前記したルールの一般形ではこのような要求を満足で
きない。
Additionally, rule-based rules are generally in the form of "if...then...". On the other hand9, for example, when multiple m rules are established out of n rules, such as minimization of electronic circuits, it is better to select the most effective rule among them to improve the quality of the generated circuit. You can improve. However, the general form of the rule described above cannot satisfy this requirement.

本発明は、大規模化及び保守の容易化を可能としたルー
ルベースシステム構成処理方式を提供することを目的と
する。
SUMMARY OF THE INVENTION An object of the present invention is to provide a rule-based system configuration processing method that enables scale-up and easy maintenance.

また1本発明は、ルールベースシステムをサブプログラ
ムとして呼び出すことを可能としたルールベースシステ
ム構成処理方式を提供することを目的とする。
Another object of the present invention is to provide a rule-based system configuration processing method that makes it possible to call a rule-based system as a subprogram.

また9本発明は1種々な要求に応じた知識源を作成する
ことを可能としたルールベースシステム構成処理方式を
提供することを目的とする。
Another object of the present invention is to provide a rule-based system configuration processing method that makes it possible to create knowledge sources that meet various requirements.

〔課題を解決するための手段〕[Means to solve the problem]

第1図は本発明の原理構成図である。 FIG. 1 is a diagram showing the principle configuration of the present invention.

第1図において、1はルールベースのソース2は制御ブ
ロック、3及び4は知識源ブロック。
In FIG. 1, 1 is a rule-based source 2 is a control block, and 3 and 4 are knowledge source blocks.

5はメイン関数名指定部、6は知識源一覧リスト。5 is a main function name specification section, and 6 is a knowledge source list.

7は優先制御部、8はサイズ指定部、9は優先順位テー
ブル、10及び11はルール、12は手続き選択部、1
3は手続き評価部である。
7 is a priority control section, 8 is a size specification section, 9 is a priority table, 10 and 11 are rules, 12 is a procedure selection section, 1
3 is a procedure evaluation section.

ルールベースのソース1は、1つの制?I フロッリ2
と、1又は複数の知msブロック3及び4から構成され
る。
Is rule-based source 1 one system? I Flori 2
and one or more knowledge blocks 3 and 4.

制御フ゛ロック2は、当該ルールベースのソースlに含
まれるl又は複数の知識源ブロック3・及び4の一覧を
記述してなる知識源一覧リストロと。
The control block 2 is a knowledge source list list that describes a list of one or more knowledge source blocks 3 and 4 included in the source l of the rule base.

当該ルールベースのソース1を指す(1対lに対応する
)メイン関数名を格納するメイン関数名指定部5とを、
予め備える。
a main function name specifying section 5 that stores a main function name pointing to the source 1 of the rule base (corresponding to 1:l);
Prepare in advance.

知識源ブロック3及び4は、■又は複数のルールから構
成される。複数のルールは、その優先順に配列される。
Knowledge source blocks 3 and 4 are composed of (1) or a plurality of rules. Multiple rules are arranged in order of priority.

知識源ブロック3及び4(例えば4)は、必要に応じて
、優先順位テーブル9を備える。優先順位テーブル9は
、複数のルールについて、その配列順によって定まる優
先順とは独立に、その優先順を記述する。即ち、配列に
よる優先順を変更する。
The knowledge source blocks 3 and 4 (for example 4) are provided with a priority order table 9 as required. The priority order table 9 describes the priority order of a plurality of rules independently of the priority order determined by the order in which they are arranged. That is, the priority order based on the array is changed.

1つのルール(例えば11)は、必要に応じて。One rule (e.g. 11) as needed.

複数の詳細ルールにより構成される。更に、複数の詳細
ルールを含む場合には、ルール11は、必要に応じて、
詳細ルールを評価するための手続き評価部13と、1つ
の詳細ルールを選択するための手続き選択部12とを備
える。
Consists of multiple detailed rules. Furthermore, when including a plurality of detailed rules, rule 11 may include, as necessary,
It includes a procedure evaluation section 13 for evaluating detailed rules and a procedure selection section 12 for selecting one detailed rule.

〔作 用〕[For production]

制御ブロック2が予め知識源一覧リストロを備えている
ので、ルールベースコンパイラ(及びコンパイラ)がこ
れを翻訳することにより、推論エンジンのための知識源
リストを生威することができる。従って、ルールベース
コンパイラが、a訳時にルールベースのソースlを検索
して当該リスト6を作成する必要がなくなる。これによ
り、ルールベースのソース1を複数ファイルとすること
ができるので、ルールベースの大規模化、保守の容易化
を図ることができる。
Since the control block 2 is provided with a knowledge source list list in advance, the rule base compiler (and compiler) can translate this to produce a knowledge source list for the inference engine. Therefore, the rule base compiler does not need to search the rule base source l and create the list 6 when translating a. This allows the rule base source 1 to be made up of multiple files, making it possible to increase the scale of the rule base and facilitate maintenance.

また、制御ブロック2が当該ルールベースのソース1を
指すメイン関数名を格納しているので。
Also, since the control block 2 stores the main function name pointing to the source 1 of the rule base.

上位システム側から指定されたメイン関数名に対応する
ルールベースのソースをルールベースコンパイラ(及び
コンパイラ)によって翻訳してオブジェクトプログラム
を生威し、これと推論エンジンとでルールベースシステ
ムを構成することができる。即ち、1つのルールベース
システムをメイン関数名によりサブシステムとして呼び
出すことができるので、ルールベースシステムを1つの
大[Iシステムの1部としたり5?3[数のルールベー
スシステムを統合したシステムを構成したりすることが
可能となる。
The rule base source corresponding to the main function name specified from the upper system side is translated by the rule base compiler (and the compiler) to create an object program, and this and the inference engine can configure the rule base system. can. That is, since one rule-based system can be called as a subsystem by the main function name, it is possible to make a rule-based system part of one large [I system] or to create a system that integrates five to three [number of rule-based systems]. It becomes possible to configure.

また、知識源ブロック(例えば4)が優先順位テーブル
9を備えているので、ルールベース(ルール10.11
及びその並びの部分)の変更なしで、優先順位テーブル
9の変更のみで、ルールの優先順を変更できる。即ち、
ルールベースコンパイラが優先順位テーブル9の記述に
従ってルール10.11を評価する。これにより、ルー
ルの評価の順を容易に変更できるので1種々の条件が設
定された問題についても最適化処理が可能となる。
Also, since the knowledge source block (for example 4) is equipped with the priority table 9, the rule base (rule 10.11
The priority order of the rules can be changed only by changing the priority order table 9 without changing the rules (and the sequence thereof). That is,
The rule-based compiler evaluates rule 10.11 according to the description in priority table 9. This allows the order of evaluation of rules to be easily changed, making it possible to perform optimization processing even for problems in which various conditions are set.

また、ルール11が複数の詳細ルール、手続き評価部1
3及び手続き選択部12を備えているので、ルールベー
スコンパイラがルール11をll訳することにより、詳
細ルールの各々について2手続き評価部13で評価を行
い、これに基づいて手続き選択部12で1つの詳細ルー
ルを選択できる。
In addition, the rule 11 is a plurality of detailed rules, the procedure evaluation unit 1
3 and a procedure selection unit 12, the rule base compiler translates the rule 11, the two procedure evaluation units 13 evaluate each detailed rule, and based on this, the procedure selection unit 12 You can select two advanced rules.

従って、?j[数の詳細ルールのうちで1問題の解決の
ために最適なものを、評価に基づいて選択することがで
き、最適化処理が可能となる。
Therefore? The optimal one for solving one problem can be selected from among the detailed rules of the number j[, based on the evaluation, and optimization processing becomes possible.

〔実施例〕〔Example〕

第1図について、更に説明する。 FIG. 1 will be further explained.

第1図は、ルールベースのソースlの構造を示している
。ルールベースのソース1は、ルールの記述に適したル
ール記述言語で記述される。
FIG. 1 shows the structure of a rule-based source l. The rule base source 1 is written in a rule description language suitable for writing rules.

制御ブロック2は、ルールベースシステムの初期化や終
了化の手続き等のための制御情報を記述する。制御ブロ
ック2は、ルールベースのソース1の先頭に設けられ、
制御情報の1つとして、メイン関数名指定部5及び知識
源一覧リストロを備える。
Control block 2 describes control information for procedures such as initialization and termination of the rule-based system. Control block 2 is provided at the beginning of rule-based source 1,
A main function name designation section 5 and a knowledge source list list are provided as one of the control information.

知識源ブロック3及び4は、ルールベースのソースl内
に複数設けられる。以下、優先順位テープル9及び手続
き選択部121手続き評価部13を備えたものを知識源
ブロック4とし、備えないものを知識源ブロック3とし
て区別する。
A plurality of knowledge source blocks 3 and 4 are provided within the rule-based source l. Hereinafter, a block including the priority table 9, a procedure selection unit 121, and a procedure evaluation unit 13 will be referred to as a knowledge source block 4, and a block without such a block will be referred to as a knowledge source block 3.

知識源ブロック4において、優先順位テーブル9は、サ
イズ指定部8と共に、優先制御部7に設けられる。優先
制御部7は、当該知識源ブロック4におけるルールの評
価の優先順位を制御する情報を格納し、このために、知
識源ブロック4の先頭に設けられる。サイズ指定部8は
、優先順位テーブル9のテーブルサイズを指定する機能
を備える。サイズ指定部8によりテーブルサイズを変更
することにより、優先順位テーブル9における記述の変
更が可能となり、実質的に優先順位テーブル9及びルー
ルベースの変更なしで、ルールの優先順位を変更できる
In the knowledge source block 4, the priority table 9 is provided in the priority control unit 7 together with the size designation unit 8. The priority control unit 7 stores information for controlling the priority order of evaluation of rules in the knowledge source block 4, and is provided at the head of the knowledge source block 4 for this purpose. The size specifying unit 8 has a function of specifying the table size of the priority table 9. By changing the table size using the size specifying unit 8, the description in the priority order table 9 can be changed, and the priority order of rules can be changed without substantially changing the priority order table 9 or the rule base.

ルール10及び11は、知識源ブロック4(及び3)内
に複数設けられる。以下、?J[数の詳細ルールを含む
ものをルール11とし、含まないものをルールlOとし
て区別する。
A plurality of rules 10 and 11 are provided in the knowledge source block 4 (and 3). below,? Rules that include detailed rules for numbers are designated as rule 11, and rules that do not include rules are designated as rules 10.

ルール11において、1つにまとめられた詳細のルール
(ケース)の各々は、同一の尺度により評価され、かつ
、その評価を数値で表し得る形式のルールである。即ち
、その各々について評価結果から手続き評価”部13が
数値により評価を得て。
In rule 11, each of the detailed rules (cases) that are grouped together is a rule that is evaluated using the same scale and whose evaluation can be expressed numerically. That is, the procedure evaluation section 13 obtains numerical evaluations from the evaluation results for each of them.

これに基づいて手続き選択部12が最適のもの。Based on this, the procedure selection unit 12 selects the optimal one.

例えば最大(最小)の評価値を持つ詳細ルールを選ぶ。For example, select the detailed rule with the maximum (minimum) evaluation value.

なお、優先制御部7とルール11とは同一の知識源ブロ
ック4に存在する必要はない。
Note that the priority control unit 7 and the rules 11 do not need to exist in the same knowledge source block 4.

第2図はルールベースシステム構成処理説明図である。FIG. 2 is an explanatory diagram of the rule-based system configuration process.

第2図において、15はルールベースコンパイラ、16
はソースプログラム、17はコンパイラ。
In Figure 2, 15 is a rule-based compiler, 16
is the source program, and 17 is the compiler.

18はオブジェクトプログラム、19は推論エンジン、
20はリンカ、21はロードモジュールである。
18 is an object program, 19 is an inference engine,
20 is a linker, and 21 is a load module.

所定のルール記述言語(例えばLi5p、 Prolo
g等)で記述されたルールベースのソース1は、ルール
ベースコンパイラ15によって、−旦、所定の言語のソ
ースプログラム16に翻訳される。この言語は、推論エ
ンジン19を記述している言語であり1通常、コンパイ
ラ言語1例えばC言語である。
A predetermined rule description language (e.g. Li5p, Prolo
A rule base source 1 written in a computer program (e.g., g, etc.) is first translated into a source program 16 in a predetermined language by a rule base compiler 15. This language is the language in which the inference engine 19 is written, and is usually a compiler language, such as the C language.

このソースプログラム16をコンパイラ17によって翻
訳して、ルールベースのオブジェクトプログラム18を
生成する。
This source program 16 is translated by a compiler 17 to generate a rule-based object program 18.

そして、推論エンジン(のオブジェクトプログラム)1
9とルールベースのオブジェクトプログラム18とをリ
ンカ20によって結合編集することにより、ルールベー
スシステムのロードモジュール(実行可能プログラム)
21を生成する。
And the inference engine (object program) 1
9 and the rule-based object program 18 by the linker 20, a load module (executable program) of the rule-based system is created.
21 is generated.

ルールベースコンパイラ15は、ルールベースのソース
1が第1図図示の如き構成を備えていることにより、そ
の翻訳時、推論エンジン用の知識源リスト(のソースプ
ログラム16における記述)を知識源一覧リストロから
生成する。また。
Since the rule base source 1 has the configuration shown in FIG. 1, the rule base compiler 15 converts the knowledge source list (description in the source program 16) for the inference engine into the knowledge source list list when translating the rule base source 1. Generate from. Also.

ソースプログラム16(即ちルールベースのメインプロ
グラム)の名前として、メイン関数名指定部5の持つメ
イン関数名を用いる。即ち、指定された名前の関数を生
成する。
The main function name held in the main function name designation section 5 is used as the name of the source program 16 (that is, the main program of the rule base). That is, a function with the specified name is generated.

また、ロードモジュール21が実行されると。Also, when the load module 21 is executed.

その推論エンジン19は、ルールベースのソースlの構
成に従って、優先順位テーブル9における順にルール1
0.11等を呼び出して実行し評価する。また、ルール
11の評価に従って、最適の手続き(詳細ルール)を選
択する。
The inference engine 19 orders rules 1 in order in the priority table 9 according to the configuration of the rule base source l.
0.11 etc., execute and evaluate. Also, according to the evaluation of rule 11, the optimal procedure (detailed rule) is selected.

次に、ルールベースのソース1の構成の詳細につき、第
3図ないし第6図を用いて説明する。
Next, details of the configuration of the rule-based source 1 will be explained using FIGS. 3 to 6.

第3図はルールベースのソース構成国である。Figure 3 shows the rule-based source countries.

第3図はルールベースのソースlの構成を示すものであ
り、第1図に対応する構成を実際のルール記述言語によ
る記述として示している。
FIG. 3 shows the structure of the rule-based source 1, and shows the structure corresponding to FIG. 1 as a description in an actual rule description language.

図において、r$cONTROL」により制御ブロック
2(及び実質的な当該ソース1)の開始が示され、r$
END−CONTROL、により制御ブロック2の終了
が示される。
In the figure, r$cONTROL'' indicates the start of control block 2 (and essentially the source 1), and r$cONTROL''
END-CONTROL indicates the end of control block 2.

r$cONTROL、の次に、メイン関数名指定部5が
’func  nawbe」として設けられ、ココニ適
当な関数名が外部から記述される。
Next to r$cONTROL, a main function name designation section 5 is provided as 'func nowbe', and an appropriate function name is written from outside.

また、制御情報として、当該ルールベースが起動された
時に初期設定のために呼び出すべき関数名rinit 
 func」、推論エンジンによる推論の終了条件をチ
エツクするために呼び出すべき関数名’term  f
unc」、当該ルールベースの終了時に後処理のために
呼び出すべき関数名rpost  func」。
Also, as control information, the function name rinit that should be called for initial settings when the rule base is started.
'func', the name of the function to be called to check the termination condition of inference by the inference engine 'term f
unc", "rpost func", the name of the function to be called for post-processing when the rule base ends.

イベント選択用の関数名reventselector
 Jが設けられる。
Function name for event selection reventselector
J is provided.

また、r$KsLIsT、の次に、知識源一覧リストロ
がrksname−L ksname−2+ −」の如
く設けられる。  rksname−1」が1つの知識
源1例えば知識源ブロック3についての名前等を示す。
Further, after r$KsLIsT, a knowledge source list list is provided such as rksname-L ksname-2+ -. rksname-1" indicates the name of one knowledge source 1, for example, the knowledge source block 3.

r$KS、及びr$END−KSJは、各々。r$KS and r$END-KSJ, respectively.

知識源ブロック3,4の開始及び終了を示す0例えばr
 $ K S ksnaa+e−I Jは、知識源ブ0
7す3の開始とその名前の定義を示す、また1例えば。
0, e.g. r, indicating the start and end of knowledge source blocks 3 and 4
$K S ksnaa+e-I J is knowledge source block 0
For example, 1 shows the beginning of 7 and 3 and the definition of its name.

r$RULE1」はルール1の開始を示す、「$END
−RULEJは、ルールの配列の終了を示す。
r$RULE1” indicates the start of rule 1, “$END
-RULEJ indicates the end of the array of rules.

知識源ブロック3は、ルール1.ルール2.・・・等を
含み、その選択戦略はrS IN(1;LJと指定され
ている。rsINGLJは、最初に成立したルールの手
続き部(THEN部)のみ実行することを示している。
Knowledge source block 3 is based on rule 1. Rule 2. ..., etc., and its selection strategy is designated as rS IN (1; LJ. rsINGLJ indicates that only the procedure part (THEN part) of the rule that is established first is executed.

従って、知!Ik?l[ブロック3においては、配列の
最初のルールから順に評価される。
Therefore, knowledge! Ik? l [In block 3, the first rule in the array is evaluated in order.

即ち、ルールの配列が優先順としての意味を持つ。That is, the arrangement of rules has a meaning as a priority order.

最初のルールにおいては、r$IF;条件11」により
、「もし条件11が成立したら1手続き部を実行する」
ことがルールとして定められている。
In the first rule, "r$IF; Condition 11" says, "If condition 11 is met, execute 1 procedure division."
This is established as a rule.

ここで、その手続き部(THEN部)における記述rP
ROPO3EJはイベントの発行を示す。
Here, the description rP in the procedure division (THEN division)
ROPO3EJ indicates issuance of an event.

イベントは、rPROPO5E (“ksname−2
”にXXに)」の場合、 XXXXで示されたデータに
ついである知識源ブロック、この場合は知識源ブロック
4を起動することである0発行されたイベントについて
、イベントキューと呼ぶ待ち行列に、起動すべき知識源
ブロックの名前と、その知識源ブロックを適用するデー
タへのポインタ(xxxx )が登録される。登録され
たイベントは、制御ブロック2で定義されたイベント選
択関数(eventselect。
The event is rPROPO5E (“ksname-2
For the 0 issued event, which is to trigger a knowledge source block, in this case knowledge source block 4, following the data indicated by XXXX, in a queue called the event queue, The name of the knowledge source block to be activated and the pointer (xxxx) to the data to which the knowledge source block is applied are registered. The registered event is selected by the event selection function (eventselect) defined in control block 2.

r)により、現在実行中の知識源ブロックの処理が終了
した後選択され、これにより、新たな知i%m[ブロッ
クが起動される。ルールベースシステムの推論とは、こ
の繰り返しの事を言い、この制御をするのが推論エンジ
ン部である。
r) is selected after the processing of the currently executing knowledge source block is completed, and thereby a new knowledge source block is activated. Inference in a rule-based system refers to this repetition, and the inference engine section controls this.

知識源ブロック4は、その名前がr ksname−2
)であり、その選択戦略がrMULTI、であり。
Knowledge source block 4 has its name r ksname-2
), and its selection strategy is rMULTI.

ルール10及びルール11を含み、優先制御部7がr 
P RI O(size、 table) Jとして設
けられている。
Including rules 10 and 11, the priority control unit 7
It is provided as PRI O(size, table) J.

rMULTIJは成立したルール全ての手続き部を実行
する。
rMULTIJ executes the procedure parts of all established rules.

優先制御部rPRIOJは、ルールの優先順を格納した
優先順位テーブル9を示す変数名をrtable Jに
、そのサイズを格納する変数名をrsize」に、各々
指定する。優先制御部’ P RI O(size。
The priority control unit rPRIOJ specifies a variable name indicating the priority table 9 that stores the priority order of rules as rtable J, and a variable name that stores the size thereof as ``rsize''. Priority control unit' PRI O(size.

table) Jの記述があることにより、当該ルール
11におけるルールの優先順は、外部から制御される。
Table) Due to the description of J, the priority order of the rules in the rule 11 is controlled from the outside.

即ち、  rsize」及びr table Jは外部
から指定可能である。従って、  raize」がサイ
ズ指定部8に、  rtable Jが優先順位テーブ
ル9に対応するが、実際は、優先制御部7においては変
数名のみが格納されている。
That is, "rsize" and rtable J can be specified from the outside. Therefore, "raize" corresponds to the size specification section 8, and rtable J corresponds to the priority order table 9, but in reality, only variable names are stored in the priority control section 7.

第4図に優先順位テーブル9の一例を示す、対応する知
識源ブロック内にn個のルールが存在する場合、優先順
1からnまでのルールのルール番号がその順に格納され
ている。従って、知識源ブロック内におけるルールの配
列順とは無間係に即ち配列による優先順を変更して、当
該テーブル9における順に従って、ルールが実行、評価
される。ここで、  ’5ize」を「n個」から例え
ば「n−1個」に減じると、最も優先順の低い1つのル
ールが(推論エンジンに対して)マスクされるので、そ
の評価は行われない、即ち、知識源ブロックの変更なし
に、実質的に当該ルールを削除することが可能である。
FIG. 4 shows an example of the priority order table 9. When n rules exist in the corresponding knowledge source block, the rule numbers of the rules from priority order 1 to n are stored in that order. Therefore, the rules are executed and evaluated in accordance with the order in the table 9, irrespective of the arrangement order of the rules in the knowledge source block, that is, the order of priority according to the arrangement is changed. Here, if we reduce '5ize' from 'n' to e.g. 'n-1', the one rule with the lowest priority will be masked (to the inference engine) and its evaluation will not take place. That is, it is possible to substantially delete the rule without changing the knowledge source block.

この処理は1例えば9回路合威システムで、0M03回
路やELC回路などの回路テクノロジに対して共通のル
ールベースを作威し、ルールによってはCMOS回路で
は使用するが、ECL回路では使用しない等に有効であ
る。なお9 これができない場合はECL回路用とCM
OS回路用のルールを別に作威しなければならず、似た
知識源を各テクノロジ毎に作成する必要が生しる。従っ
て。
For example, in a 9-circuit integration system, this process creates a common rule base for circuit technologies such as 0M03 circuits and ELC circuits, and some rules are used in CMOS circuits but not in ECL circuits. It is valid. Note 9: If this is not possible, use the ECL circuit and CM
Rules for OS circuits must be created separately, and similar knowledge sources must be created for each technology. Therefore.

この処理はルールベースの一元化による開発の効率化な
どに非常に効果がある。
This process is very effective in streamlining development by unifying the rule base.

なお、マスクする順は、優先順の高い側からであっても
よい。
Note that the order of masking may be from the higher priority side.

ルール11は、r$IF・・・$T)(EN・・・」構
成のルール10とは異なる構成を持つ、この前提として
、ルール11は、詳細ルール(ケース)を複数まとめて
構成し、その内で最適な詳細ルールを1つ実行する構成
を採る。
Rule 11 has a different configuration from rule 10, which has a configuration of "r$IF...$T)(EN...". As a premise, rule 11 is configured by combining multiple detailed rules (cases), A configuration is adopted in which one of the most suitable detailed rules is executed.

r$5ELEcT」及びr$END−3ELECTJに
より、各々1手続き選択部12の開始及び終了が示され
る。「$EvAL」及びr$END−EVALJにより
、各々1手続き評価部13の開始及び終了が示される。
r$5ELEcT'' and r$END-3ELECTJ indicate the start and end of the 1-procedure selection section 12, respectively. “$EvAL” and r$END-EVALJ indicate the start and end of one procedure evaluation unit 13, respectively.

r$CASEJ及びr$END−CASE、により、各
々、1つの詳細ルール(ケース)の開始及び終了が示さ
れる。
r$CASEJ and r$END-CASE each indicate the start and end of one detailed rule (case).

rMAX2Jは、「2つ」のケースのうち評価値が最大
(rMAXJ )のものを実行することを示す、なお、
rMiNJであれば、評価値が最小のものを実行する。
rMAX2J indicates that the one with the maximum evaluation value (rMAXJ) is executed among the "two" cases.
If it is rMiNJ, the one with the smallest evaluation value is executed.

CASEl及び2の手続き部についての評価値が各々の
rvar Jに与えられ、比較される0例えばCASE
Iの評価値が最大であった時は$WHENIの手続きが
実行される。この時、評価値がその他のものは手続き部
の実行が不可である。もし、すべての評価値が「0」の
時はどの手続き部も実行されず、そのルールは実行され
なかった事となる。この時、そのルールが属する知識源
ブロックのルール選択戦略がS I NGLであれば1
次のルールの評価が行われ1手続きが実行された時はそ
の知識源ブロックの実行を終わる。
The evaluation values for the procedure divisions of CASEl and 2 are given to each rvar J and compared to 0 e.g. CASE
When the evaluation value of I is the maximum, the $WHENI procedure is executed. At this time, if the evaluation value is other than that, the procedure division cannot be executed. If all evaluation values are "0", no procedure division is executed and that rule is not executed. At this time, if the rule selection strategy of the knowledge source block to which the rule belongs is S I NGL, 1
When the next rule is evaluated and one procedure is executed, the execution of that knowledge source block ends.

このようなルールの処理は9例えば、第5図に示すよう
な電子回路のゲートを圧縮するルールに有効である。即
ち、第5図(A)及び(B)に図示の詳細ルール(ケー
ス)を同図(C)図示のゲートの圧縮に適用するとする
Such rule processing is effective for, for example, a rule for compressing the gate of an electronic circuit as shown in FIG. That is, it is assumed that the detailed rules (cases) shown in FIGS. 5(A) and 5(B) are applied to the compression of the gate shown in FIG. 5(C).

この場合、ケース1及び2共に成立するが、ケース2を
適用した方が削除できるインバータの数が1個だけ多く
なる。これは、適用対象の回路が変われば、逆となるこ
ともある。従って、このような場合、r$IF・・・$
THEN・・・」の構成によっては最適化は不可能であ
る。
In this case, both cases 1 and 2 hold, but applying case 2 increases the number of inverters that can be deleted by one. This may be reversed if the circuit to which it is applied changes. Therefore, in such a case, r$IF...$
Optimization is not possible depending on the configuration of "THEN...".

そこで、第5図(A)及び(B)に図示した2つの詳細
ルールをまとめて、第6図図示の如き1つのルールとす
る。なお、このルールは、第3図における知識源ブロッ
ク4のルール11に対応している。このようにすれば、
実際に2つの詳細ルールを評価した上で、その結果に基
づいて最適の詳細ルールを選択できる。
Therefore, the two detailed rules shown in FIGS. 5(A) and 5(B) are combined into one rule as shown in FIG. 6. Note that this rule corresponds to rule 11 of knowledge source block 4 in FIG. 3. If you do this,
After actually evaluating two detailed rules, the optimal detailed rule can be selected based on the results.

以上の構成のルールベースのソース1について。Regarding rule base source 1 with the above configuration.

ルールベースコンパイラ15が翻訳し、ソースプログラ
ム16を生成する。この生成を第7図ないし第11図に
従って説明する。
A rule base compiler 15 translates and generates a source program 16. This generation will be explained according to FIGS. 7 to 11.

第7図は、ルールベースコンパイラ15による制御ブロ
ック2の翻訳処理フローについて示している。即ち、r
$cONTROL」ないし「$END−CONTROL
Jの文から、r$cONTROL  func  na
me」で指定されたメイン関数名を持つ関数(プログラ
ム)を生成する。
FIG. 7 shows the flow of translation processing of the control block 2 by the rule base compiler 15. That is, r
$cCONTROL” or “$END-CONTROL”
From the sentence J, r$cONTROL func na
Generates a function (program) with the main function name specified by "me".

■ 変数INITIALIZOR,TERMINATO
R,PO5TPROCESSOR,EVENTSELE
CTORの各々を、制御ブロック2の’$INTT  
1nit func」、 r$TERMterm  f
urlc」、  r$PO3T  post  fun
c」。
■ Variable INITIALIZOR, TERMINATO
R, PO5T PROCESSOR, EVENTSELE
CTOR to '$INTT' in control block 2.
1nit func”, r$TERMterm f
urlc”, r$PO3T post fun
c”.

r$EVENT  5ELECT  eventsel
ector Jで指定された関数のアドレスとする。
r$EVENT 5ELECT eventsel
This is the address of the function specified by ector J.

■   r  $  K S  L  I  S T 
  ksna+5e−1,ksnawe−2−Jで指定
されたKS(知識源ブロック)名とこれに対応する関数
アドレスからKSテーブルを作成する。このKSテーブ
ルは、推論エンジン19がイベントを処理するために必
須のものである。
■ r $ K S L I S T
A KS table is created from the KS (knowledge source block) name specified by ksna+5e-1 and ksnawe-2-J and the corresponding function address. This KS table is essential for the inference engine 19 to process events.

■ 推論エンジン19を呼び出す。■ Call the inference engine 19.

第8図にKSテーブルの構成を示す。FIG. 8 shows the structure of the KS table.

変数KSLISTには、先頭のKSテーブルへのポイン
タが格納される。また、各KSテーブルは1次テーブル
へのポインタと、当該KSテーブルのKSの名前と、当
該KSに対応する関数(プログラム)のアドレスからな
る。
A pointer to the first KS table is stored in the variable KSLIST. Furthermore, each KS table consists of a pointer to the primary table, the name of the KS in the KS table, and the address of the function (program) corresponding to the KS.

このKSテーブルは、ルールベースのソース1内を検索
することなく9制御ブロツク2の「$KSLISTJの
記述によって生成できる。
This KS table can be generated by the description of ``$KSLISTJ'' in control block 2 without searching the source 1 of the rule base.

また、初期設定や終了処理のための関数名も制御ブロッ
ク2内に記述されている。
Further, function names for initialization and termination processing are also written in the control block 2.

この様にルールベースを動作させるメインプログラムを
生成するのに必要な情報を、すべて「$C0NTR0L
〜$END−CONTROLJにまとめた事により、メ
インプログラムを生成するのに必要であったルールベー
スのソースファイルの検索を不要にできる。この結果、
知tI&源は各々別のファイルに記述されていても良い
ので、大規模ルールベースシステムを構築する事が出来
る。
All the information necessary to generate the main program that operates the rule base in this way can be found in the $C0NTR0L
~ By organizing the programs into $END-CONTROLJ, it is possible to eliminate the need to search for rule-based source files that were necessary to generate the main program. As a result,
Since knowledge and sources may be described in separate files, it is possible to construct a large-scale rule-based system.

また、当該メインプログラムには、メイン関数名指定部
5で指定した名前を付すことができる。従って、このメ
インプログラムにより動作させられるルールベースシス
テムを1つのサブプログラムとして呼び出すことが可能
となる。
Further, the main program can be given a name designated by the main function name designation section 5. Therefore, the rule base system operated by this main program can be called as one subprogram.

第911いしIII 2図は、ルールベースコンパイラ
15による知識源ブロック(KS)3.4の翻訳につい
て示している。即ち、1個の知識源ブロック3.4であ
るr$KS、ないLr$ENDKSJ毎に、1個の関数
(プログラム)が生成される。この関数名は、知#i源
プロ・ンクの名前に等しい、知識源ブロックは、ルール
の選択戦略とルールの優先順の指定の有無とに依存して
、異なる手続きの関数が生成される。
911-III2 illustrate the translation of the knowledge source block (KS) 3.4 by the rule-based compiler 15. That is, one function (program) is generated for each knowledge source block 3.4 r$KS and Lr$ENDKSJ. This function name is equal to the name of the knowledge source block. In the knowledge source block, different procedure functions are generated depending on the rule selection strategy and whether or not the priority order of the rules is specified.

第9図は9選択戦略がrSINGL、かつ優先制御部7
による優先順の制御がない場合について示している。
In FIG. 9, the selection strategy 9 is rSINGL, and the priority control unit 7
This example shows the case where there is no priority order control.

この場合、優先順の制御がないので、当該知識源ブロッ
ク3.4内におけるルールの配列順1例えばルール1.
ルール2.・・・ルールnの順で、ルールの条件の成立
の可否が評価される。そして。
In this case, since there is no priority control, the arrangement order of rules in the knowledge source block 3.4 is 1, for example, rule 1.
Rule 2. ...In the order of rule n, whether or not the conditions of the rules are met is evaluated. and.

選択戦略がrs、INGLJであるから、1つのルール
が成立した時点で当該ルールの手続きを実行する関数を
生成して、その知識源ブロックについての処理を終了す
る。
Since the selection strategy is rs and INGLJ, when one rule is established, a function is generated to execute the procedure of that rule, and the processing for that knowledge source block is completed.

第10図は1選択戦略がrMULTIJかつ優先制御部
7による優先順の制御がない場合について示している。
FIG. 10 shows a case where the 1 selection strategy is rMULTIJ and there is no priority order control by the priority control unit 7.

この場合、ルールの評価層は、第9図と同様である。そ
して1選択戦略がrM(JLTr、であるから、全ルー
ルについて評価を繰り返し、tc立する全てのルールの
手続きを実行する関数を生成する。
In this case, the evaluation layer of the rules is the same as in FIG. Since the 1-selection strategy is rM (JLTr), a function is generated that repeatedly evaluates all rules and executes the procedure for all rules that satisfy tc.

第11図は1選択戦略がrsINGLJかつ優先制御部
7による優先順の制御がある場合について示している。
FIG. 11 shows a case where the 1 selection strategy is rsINGLJ and the priority order is controlled by the priority control unit 7.

■ 制御変数iをクリアする。■ Clear control variable i.

■ iを+lカウントアツプした後、サイズ指定部8の
指定するテーブルサイズ’5ize」と比較する。
(2) After counting up i by +1, compare it with the table size '5ize' specified by the size specifying section 8.

i > ’5ize」の場合、ルールが残っていても処
理を終了する。これにより、残ったルールは推論エンジ
ン19からは知ることができない。
If i >'5ize', the process ends even if rules remain. As a result, the remaining rules cannot be known from the inference engine 19.

■ i > rsize」でない場合、優先順位テーブ
ル9のi番目の順位のルールがいずれであるかを調べ、
該当するルールについて評価する。
■ If it is not "i >rsize", check which rule has the i-th order in the priority table 9,
Evaluate the applicable rules.

評価したルールが成立する場合1選択戦略がrsING
L、であるから、当該ルールの手続きを実行する関数を
生成して処理を終了する。
If the evaluated rule holds true, the first selection strategy is rsING.
Since L, a function that executes the procedure of the rule is generated and the process ends.

評価したルールが成立しない場合、処理■以下を繰り返
す。
If the evaluated rule does not hold, repeat the following process.

第12図は3選択戦略がrMULTI」かつ優先制御部
7による優先順の制御がある場合について示している。
FIG. 12 shows a case where the 3 selection strategy is "rMULTI" and the priority order is controlled by the priority control section 7.

処理■及び■は、第11図の場合と同様に行われる。Processes (1) and (2) are performed in the same manner as in the case of FIG.

処理■において2選択戦略がrMULTI、であるから
、  i > rsrze4でない場合の全ルールにつ
いても評価を行い、成立するルールの手続きを実行する
関数を生成する。
Since the 2-selection strategy in process (2) is rMULTI, all rules in the case where i > rsrze4 are not satisfied are also evaluated, and a function is generated to execute the procedure of the rule that holds true.

以上のようにして得たソースプログラム16について、
推論エンジン19が推論を行う、これを第13図及び第
14図により説明する。
Regarding the source program 16 obtained as above,
The inference engine 19 performs inference, which will be explained with reference to FIGS. 13 and 14.

第13図は推論エンジン19の行う推論処理フローを示
す。
FIG. 13 shows the flow of inference processing performed by the inference engine 19.

■ イベントキヱーを空にする等の初期化処理を行った
後、ソースプログラム16の変数INITIAL I 
ZEHに格納されたアドレスの関数を呼び出す、この関
数は、最初に実行すべき知識源ブロック3の名前を格納
しており、これを推論エンジン19に返す。
■ After performing initialization processing such as emptying the event key, the variable INITIAL I of the source program 16 is
This function, which calls the function at the address stored in ZEH, stores the name of the knowledge source block 3 to be executed first, and returns this to the inference engine 19.

■ 当該知識源ブロック30名前により、KSテーブル
を検索し、これに対応する間数のアドレスを知り、当該
関数を呼び出す(知識源の起動に相当する)、ここで、
知識源ブロック3は、最初に実行されて、イベントを発
行するもの、即ち。
■ Search the KS table by the name of the knowledge source block 30, find the address of the corresponding number, and call the function (corresponding to starting the knowledge source);
The knowledge source block 3 is the one that is executed first and issues an event, ie.

rPROPO3EJを含む知識源である。A knowledge source containing rPROPO3EJ.

呼び出された関数(知識源ブロック又はプログラム)は
、その記述に従って処理を実行し、処理rPROPOs
EJによりイベントキューにイベントを登録する。
The called function (knowledge source block or program) executes the process according to its description, and processes rPROPOs.
An event is registered in the event queue by EJ.

ここで、イベントキューの構造を第14図に示す、変数
EVENTL I STには、先頭のイベントテーブル
のアドレスが格納される。また、各イベントテーブルは
9次テーブルのポインタ(アドレス)と、実行すべき知
識S<ブロック)の名前と、引数となるデータとを格納
する。
Here, the structure of the event queue is shown in FIG. 14, and the address of the first event table is stored in the variable EVENTLIST. Furthermore, each event table stores a pointer (address) of the 9th order table, the name of the knowledge to be executed (S<block), and data serving as an argument.

■ イベントキューにイヘントがあるか否かを調べる。■ Check whether there is an event in the event queue.

空であれば、所定の終了処理を行う。If it is empty, predetermined termination processing is performed.

■ 空でなければ、変数TERMINATORにそのア
ドレスが格納されている関数を呼び出す。
■ If it is not empty, call the function whose address is stored in the variable TERMINATOR.

呼び出された関数は、その記述に従って、推論を終了す
べきか否かを調べる。
The called function checks whether inference should be terminated according to its description.

終了すべき場合、所定の終了処理を行う。If it should be terminated, predetermined termination processing is performed.

■ 終了シナイ場合、変数EVENTSELECTOR
に格納されている関数を呼び出し、この関数により次に
処理すべきイベントをイベントキューから取り出す。
■ If the end is not completed, the variable EVENTSELECTOR
Calls the function stored in , which retrieves the next event to be processed from the event queue.

■ 当該イベントのイベントテーブルに格納されている
実行すべき知11に源の名前を用いてKSテーブルを検
索して、起動すべき知#i源に対応する関数のアドレス
を求める。そして、当該イベントテーブルに格納されて
いるデータを引数に、その関数を呼び出して実行する。
(2) Search the KS table using the name of the source of the knowledge 11 to be executed stored in the event table of the event to find the address of the function corresponding to the knowledge #i source to be activated. Then, the function is called and executed using the data stored in the event table as an argument.

以下、イベントキューが空となるまで、又は推論の終了
判断が行われるまで、処理■ないし■が繰り返される。
Thereafter, processes ① to ② are repeated until the event queue is empty or until it is determined that the inference has ended.

■ 処理を終了する場合、変数POSTPROCESS
ORに格納されている関数を呼び出し、終了化処理を行
い推論を終了する。
■ To end the process, set the variable POSTPROCESS
The function stored in OR is called, finalization processing is performed, and inference is ended.

〔発明の効果〕〔Effect of the invention〕

以上説明したように9本発明によれば、ルールベースの
ソースを一旦ルールベースコンパイラにより翻訳する方
式によるルールベースシステム構成処理において、制御
ブロックに知識源一覧リスト及びメイン関数名指定部を
設けることにより。
As explained above, according to the present invention, in the rule-base system configuration process in which the rule-base source is once translated by the rule-base compiler, by providing the knowledge source list and the main function name specification section in the control block, .

ルールベースの大規模化、保守の容易化を図ることがで
き、当該ルールベ−ス て呼び出すことができる.また、知i!i′FA(ブロ
ック)に優先制御部を設けることにより.ルールベース
の変更なしでルールの評価額を変更でき.最適化処理が
可能となる.更に,ルールに手続き選択部及び手続き評
価部を設けることにより,ルールを評価した上でその結
果に基づいて最適のルールを選択できるので,最適化処
理が可能となる。
Rule bases can be made larger and easier to maintain, and can be called based on the rule base. Also, Chii! By providing a priority control section in i'FA (block). You can change the valuation amount of a rule without changing the rule base. Optimization processing becomes possible. Furthermore, by providing a procedure selection section and a procedure evaluation section in the rule, it is possible to evaluate the rule and then select the optimal rule based on the result, thereby enabling optimization processing.

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

第1図は本発明の原理構成図。 第2図はルールベースシステム構成処理説明図。 第3図はルールベースのソース構成図。 第4図は優先順位テーブルの一例を示す図。 第5図はルールの最適化の一例を示す図。 第6図は最適化に向いたルールの構成を示す図第7図は
翻訳処理フローを示す図2 第8図はKSテーブルの構成を示す図。 第9図ないし第12図は翻訳処理フローを示す図。 第13図は推論処理フローを示す図。 第14図はイベントキューの構成を示す図。 1はルールベースのソース、2は制御ブロック。 3及び4は知vh′rAブロック、5はメイン関数名指
定部.6は知識源一覧リスト、7は優先制御部8はサイ
ズ指定部.9は優先順位テーブル、10及び11はルー
ル、12は手続き選択部,13は手続き評価部である。
FIG. 1 is a diagram showing the principle configuration of the present invention. FIG. 2 is an explanatory diagram of the rule-based system configuration process. Figure 3 is a rule-based source configuration diagram. FIG. 4 is a diagram showing an example of a priority order table. FIG. 5 is a diagram showing an example of rule optimization. FIG. 6 shows the configuration of rules suitable for optimization. FIG. 7 shows the flow of translation processing. FIG. 8 shows the configuration of the KS table. 9 to 12 are diagrams showing the flow of translation processing. FIG. 13 is a diagram showing the inference processing flow. FIG. 14 is a diagram showing the configuration of an event queue. 1 is the rule-based source, 2 is the control block. 3 and 4 are the knowledge vh'rA blocks, and 5 is the main function name specification section. 6 is a knowledge source list list, 7 is a priority control section 8 is a size specification section. 9 is a priority table, 10 and 11 are rules, 12 is a procedure selection section, and 13 is a procedure evaluation section.

Claims (4)

【特許請求の範囲】[Claims] (1)所定のルール記述言語で記述されたルールベース
のソース(1)をルールベースコンパイラ(15)及び
コンパイラ(17)で翻訳して生成される所定の言語の
プログラム(18)と、前記所定の言語による推論エン
ジン(19)とをリンカ(20)で結合編集して構成さ
れるルールベースシステムにおいて、 前記ルールベースのソース(1)を制御ブロック(2)
と複数の知識源ブロック(3、4)とで構成し、 前記制御ブロック(2)に、予め当該ルールベースのソ
ース(1)に含まれる前記複数の知識源ブロック(3、
4)の一覧を記述してなる知識源一覧リスト(6)を設
け、 前記ルールベースコンパイラ(15)及びコンパイラ(
17)が前記知識源一覧リスト(6)を翻訳することに
より、前記推論エンジン(19)のための知識源リスト
を生成する ことを特徴とするルールベースシステムの構成処理方式
(1) A program (18) in a predetermined language generated by translating a rule base source (1) written in a predetermined rule description language using a rule base compiler (15) and a compiler (17); In a rule base system configured by combining and editing an inference engine (19) in a language using a linker (20), the rule base source (1) is connected to a control block (2).
and a plurality of knowledge source blocks (3, 4), and the control block (2) includes the plurality of knowledge source blocks (3, 4) included in the rule-based source (1) in advance.
4), a knowledge source list list (6) is provided, which includes the list of the rule base compiler (15) and the compiler (
17) generates a knowledge source list for the inference engine (19) by translating the knowledge source list (6).
(2)所定のルール記述言語で記述されたルールベース
のソース(1)をルールベースコンパイラ(15)及び
コンパイラ(17)で翻訳して生成される所定の言語の
プログラム(18)と、前記所定の言語による推論エン
ジン(19)とをリンカ(20)で結合編集して構成さ
れるルールベースシステムにおいて、 前記ルールベースのソース(1)を制御ブロック(2)
と知識源ブロック(3、4)とで構成し、前記制御ブロ
ック(2)に、当該ルールベースのソース(1)を指す
メイン関数名を格納するメイン関数名指定部(5)を設
け、 指定されたメイン関数名に対応する前記ルールベースの
ソース(1)から生成されるプログラム(18)と、前
記推論エンジン(19)とでルールベースシステムを構
成する ことを特徴とするルールベースシステムの構成処理方式
(2) A program (18) in a predetermined language generated by translating a rule base source (1) written in a predetermined rule description language using a rule base compiler (15) and a compiler (17); In a rule base system configured by combining and editing an inference engine (19) in a language using a linker (20), the rule base source (1) is connected to a control block (2).
and knowledge source blocks (3, 4), and the control block (2) is provided with a main function name specification section (5) that stores a main function name pointing to the source (1) of the rule base. A rule-based system configuration, characterized in that a rule-based system is configured by a program (18) generated from the rule-based source (1) corresponding to the main function name, and the inference engine (19). Processing method.
(3)所定のルール記述言語で記述されたルールベース
のソース(1)をルールベースコンパイラ(15)及び
コンパイラ(17)で翻訳して生成される所定の言語の
プログラム(18)と、前記所定の言語による推論エン
ジン(19)とをリンカ(20)で結合編集して構成さ
れるルールベースシステムにおいて、 前記ルールベースのソース(1)を制御ブロック(2)
と知識源ブロック(4)とで構成し、前記知識源ブロッ
ク(4)を複数のルール(10、11)をその優先順に
配列して構成すると共に、当該知識源ブロック(3、4
)に前記複数のルール(10、11)の配列による優先
順とは独立にその優先順を記述した優先順位テーブル(
9)を設け、前記ルールベースコンパイラ(15)が前
記優先順位テーブル(9)に従って前記ルール(10、
11)を評価する ことを特徴とするルールベースシステムの構成処理方式
(3) A program (18) in a predetermined language generated by translating a rule base source (1) written in a predetermined rule description language using a rule base compiler (15) and a compiler (17); In a rule base system configured by combining and editing an inference engine (19) in a language using a linker (20), the rule base source (1) is connected to a control block (2).
and a knowledge source block (4), the knowledge source block (4) is configured by arranging a plurality of rules (10, 11) in their priority order, and the knowledge source block (3, 4) is configured by arranging a plurality of rules (10, 11) in priority order.
) is a priority order table (
9), and the rule base compiler (15) compiles the rules (10,
11) A configuration processing method for a rule-based system characterized by evaluating.
(4)所定のルール記述言語で記述されたルールベース
のソース(1)をルールベースコンパイラ(15)及び
コンパイラ(17)で翻訳して生成される所定の言語の
プログラム(18)と、前記所定の言語による推論エン
ジン(19)とをリンカ(20)で結合編集して構成さ
れるルールベースシステムにおいて、 前記ルールベースのソース(1)を制御ブロック(2)
と、少なくとも1つのルール(11)を含む知識源ブロ
ック(4)とで構成し、 前記ルール(11)を複数の詳細ルールにより構成する
と共に、当該ルール(11)内に前記詳細ルールを評価
するための手続き評価部(13)と、前記評価に従って
1つの詳細ルールを選択する手続き選択部(12)とを
設け、 前記ルールベースコンパイラ(15)が、当該ルール(
11)を翻訳することにより、前記手続き評価部(13
)で前記評価を行い、前記手続き選択部(12)で1つ
の詳細ルールを選択する ことを特徴とするルールベースシステムの構成処理方式
(4) A program (18) in a predetermined language generated by translating a rule base source (1) written in a predetermined rule description language using a rule base compiler (15) and a compiler (17); In a rule base system configured by combining and editing an inference engine (19) in a language using a linker (20), the rule base source (1) is connected to a control block (2).
and a knowledge source block (4) including at least one rule (11), the rule (11) is configured by a plurality of detailed rules, and the detailed rule is evaluated within the rule (11). a procedure evaluation unit (13) for selecting one detailed rule according to the evaluation, and a procedure selection unit (12) for selecting one detailed rule according to the evaluation, and the rule base compiler (15)
11), the procedure evaluation unit (13) is translated.
), and the procedure selection unit (12) selects one detailed rule.
JP2069452A 1989-12-14 1990-03-19 Constitution processing system for rule base system Pending JPH03269631A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2069452A JPH03269631A (en) 1990-03-19 1990-03-19 Constitution processing system for rule base system
US07/627,151 US5204939A (en) 1989-12-14 1990-12-13 Rule base processing system and rule evaluation control method therein

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2069452A JPH03269631A (en) 1990-03-19 1990-03-19 Constitution processing system for rule base system

Publications (1)

Publication Number Publication Date
JPH03269631A true JPH03269631A (en) 1991-12-02

Family

ID=13403051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2069452A Pending JPH03269631A (en) 1989-12-14 1990-03-19 Constitution processing system for rule base system

Country Status (1)

Country Link
JP (1) JPH03269631A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6425242A (en) * 1987-07-21 1989-01-27 Mitsubishi Electric Corp High quality system in automatic logical circuit conversion
JPS6486622A (en) * 1987-09-28 1989-03-31 Matsushita Electric Ind Co Ltd Data converter
JPH01274243A (en) * 1988-04-26 1989-11-02 Meidensha Corp Inference system
JPH0212336A (en) * 1988-06-29 1990-01-17 Sanyo Electric Co Ltd Knowledge base system and knowledge base conversion system
JPH0267628A (en) * 1988-09-01 1990-03-07 Fujitsu Ltd Command start system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6425242A (en) * 1987-07-21 1989-01-27 Mitsubishi Electric Corp High quality system in automatic logical circuit conversion
JPS6486622A (en) * 1987-09-28 1989-03-31 Matsushita Electric Ind Co Ltd Data converter
JPH01274243A (en) * 1988-04-26 1989-11-02 Meidensha Corp Inference system
JPH0212336A (en) * 1988-06-29 1990-01-17 Sanyo Electric Co Ltd Knowledge base system and knowledge base conversion system
JPH0267628A (en) * 1988-09-01 1990-03-07 Fujitsu Ltd Command start system

Similar Documents

Publication Publication Date Title
EP3239835B1 (en) System architecture with visual modeling tool for designing and deploying complex models to distributed computing clusters
Barbacci A comparison of register transfer languages for describing computers and digital systems
US6996788B2 (en) Hardware-operation description conversion method and program therefor
JPH02183362A (en) Computer system
WO1990011569A1 (en) Computer-aided engineering
US5912819A (en) Method for designing an architectural system
CN106407170A (en) Rapid generation method and system for data report
CN110532072A (en) Distributive type data processing method and system based on Mach
CN113268227A (en) Zero-code visualization software development platform and development method
US5809304A (en) Method of designing application-oriented program
JPH01298435A (en) Automatic programming device
JPH03269631A (en) Constitution processing system for rule base system
Hattori et al. MPGS: a high-level language for microprogram generating system
US20150379176A1 (en) System and method for viewing and modifying configurable rtl modules
US6161081A (en) Simulation model for a digital system
Roman et al. Reasoning about synchronic groups
JPH06231203A (en) Compilation mechanism for simulation model
Rammig Modelling aspects of system level design
JPH027171A (en) Logical circuit synthesizing system
Wang et al. PIMSIM-NN: An ISA-based Simulation Framework for Processing-in-Memory Accelerators
Srinivasan An introduction to CDL1, a computer description language
Ditu The Programming Language TransLucid
Infante et al. Proving structured programs correct, level by level
CN117131813A (en) FPGA platform bridging HLS technology and chip design method of hardware construction
JPS6379176A (en) Method for producing automatically program by combining parts based on designing specifications