JPH04320529A - Knowledge system and its structuring processor - Google Patents

Knowledge system and its structuring processor

Info

Publication number
JPH04320529A
JPH04320529A JP3088811A JP8881191A JPH04320529A JP H04320529 A JPH04320529 A JP H04320529A JP 3088811 A JP3088811 A JP 3088811A JP 8881191 A JP8881191 A JP 8881191A JP H04320529 A JPH04320529 A JP H04320529A
Authority
JP
Japan
Prior art keywords
rule
rule set
program
processing
predetermined
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
JP3088811A
Other languages
Japanese (ja)
Inventor
Keiji Kagiwada
鍵和田 圭二
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 JP3088811A priority Critical patent/JPH04320529A/en
Publication of JPH04320529A publication Critical patent/JPH04320529A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To provide the knowledge system which includes rule sets having a constant form and free forms and its structuring processor by constituting the rule sets constituting the knowledge system by a free program as to a knowledge system which advances inference by executing the rule sets. CONSTITUTION:An inference processing part 11 is a system which performs the inference process by repeating a process, wherein one rule set in a rule set group 10 is selected by a specific selecting process and executed, until a specific end condition is met. The rule sets are provided with 1st and 2nd kinds of processing form and the 1st kind of rule sets 12 has a rule main body 13 of specific condition, and the rule main body is an array of >=1 rule 14 and each rule has a condition decision process and a procedure executed when the condition is satisfied. The 2nd kind of rule set 15 is so constituted as to have a rule main body 16 consisting of a procedure in optional processing form for executing a necessary process.

Description

【発明の詳細な説明】[Detailed description of the invention]

【0001】0001

【産業上の利用分野】本発明は、ルール集合の実行によ
って推論を進めるようにした知識システム及びその構築
を行なう処理装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a knowledge system in which inference is advanced by executing a set of rules, and a processing device for constructing the knowledge system.

【0002】0002

【従来の技術】図2は知識システム処理装置の構成例で
あって、推論処理部1はルール集合群2によって推論を
実行するために起動されると、先ず所定の前処理4を実
行して環境を準備した後、ルール集合群2から推論起動
メッセージ3で指定されたルール集合を処理5で選択し
、そのルール集合の実行に入る。
2. Description of the Related Art FIG. 2 shows an example of the configuration of a knowledge system processing device. When an inference processing unit 1 is activated to perform inference based on a rule set group 2, it first executes predetermined preprocessing 4. After preparing the environment, the rule set specified by the inference activation message 3 is selected from the rule set group 2 in process 5, and the execution of that rule set is started.

【0003】ルール集合群2は1以上のルール集合から
なり、各ルール集合は前処理、ルール本体、後処理から
なる。ルール本体は1以上のルールからなり、各ルール
は条件判定と、その条件成立時に実行する手続きとを主
要部とする一定の処理形式になっていて、条件成立時に
その手続きの実行によって、いわゆるイベントを操作し
て、イベントの生起状態を更新する。
The rule set group 2 consists of one or more rule sets, and each rule set consists of a preprocessing, a rule body, and a postprocessing. The rule body consists of one or more rules, and each rule has a certain processing format whose main parts are a condition judgment and a procedure to be executed when the condition is met.By executing the procedure when the condition is met, a so-called event is generated. to update the occurrence status of the event.

【0004】推論処理部1は、ルール集合のルールを先
頭から順に処理して、条件の成立するルールの手続きを
実行し、実行したルール(即ち条件の成立したルール)
の個数が一定数になるか、全ルールを処理すると、その
ルール集合の実行を終了とする。終了の条件を一定の処
理形式で検出するプログラムも、ルール集合の中に埋め
込まれている。
[0004] The inference processing unit 1 processes the rules of the rule set in order from the beginning, executes the procedure of the rule for which the condition is satisfied, and extracts the executed rule (that is, the rule for which the condition is satisfied).
When the number of rules reaches a certain number or all rules have been processed, execution of that rule set ends. A program that detects termination conditions using a certain processing format is also embedded in the rule set.

【0005】1つのルール集合の処理を終わると、終了
判定処理6に行き、終了すべき判定結果でなければイベ
ント選択処理7で、所定の方法でその時点のイベントの
発生状態に基づいて、再びルール集合の一つを選択して
、前記のようにルール集合を処理する。
[0005] When the processing of one rule set is finished, the process goes to end judgment process 6, and if the judgment result is not to end, then in event selection process 7, the process is performed again based on the occurrence state of the event at that time using a predetermined method. Select one of the rule sets and process the rule set as described above.

【0006】このようにして、ルール集合の選択、実行
を反復することにより、状態がある終了条件を満足すれ
ば終了判定処理6から後処理8に進んで、推論処理を完
了する。
In this way, by repeating the selection and execution of the rule set, if the state satisfies a certain termination condition, the process proceeds from termination determination process 6 to post-processing 8, and the inference process is completed.

【0007】[0007]

【発明が解決しようとする課題】前記のように、ルール
集合は条件判定とその条件成立時に実行する手続きから
なる一定形式のルールからなるルール本体を主要部とし
て構成され、このようなルールによって必要な推論を構
成するようにしなければならない。このような形式には
当然公知のような利点があるものの、問題によってはこ
のような形式が人の思考、判断の過程となじみ難い場合
がある。そのような場合には、イベント発行によって推
論を進める環境の中でも、自由な形式のプログラミング
でイベントを操作できることが望まれる。
[Problem to be Solved by the Invention] As mentioned above, a rule set is composed of a main part of a rule body consisting of rules in a certain format consisting of condition judgment and a procedure to be executed when the condition is met. You must try to formulate reasonable inferences. Although such a format naturally has well-known advantages, depending on the problem, such a format may be difficult to adapt to human thinking and judgment processes. In such cases, it is desirable to be able to manipulate events using free-form programming even in environments where inference is advanced by issuing events.

【0008】本発明は、知識システムを構成するルール
集合を、自由なプログラムで構成できるようにし、一定
形式と自由形式のルール集合が混在した知識システム及
びその構築処理装置を目的とする。
[0008] The present invention enables a rule set constituting a knowledge system to be constructed by a free program, and aims to provide a knowledge system in which fixed-form rule sets and free-form rule sets coexist, and a construction processing device thereof.

【0009】[0009]

【課題を解決するための手段】図1は、本発明の構成を
示すブロック図である。図1(a)は知識システムの構
成であって、1以上のルール集合からなるルール集合群
10と、推論処理部11を有し、推論処理部11は、ル
ール集合群10の1ルール集合を所定の選択処理で選択
して実行する処理を、所定の終了条件が生起するまで反
復することによって推論処理を行なうシステムである。
Means for Solving the Problems FIG. 1 is a block diagram showing the configuration of the present invention. FIG. 1(a) shows the configuration of a knowledge system, which includes a rule set group 10 consisting of one or more rule sets and an inference processing section 11. This system performs inference processing by repeating processes selected and executed in a predetermined selection process until a predetermined termination condition occurs.

【0010】該ルール集合に、第1及び第2の種類の処
理形式を設け、第1の種類のルール集合12は、所定の
構成のルール本体13を有し、該ルール本体は1以上の
ルール14からなるルールの並びであり、各該ルールは
条件判定処理と、該条件が満足される場合に実行される
手続きとを有する。
The rule set is provided with first and second types of processing formats, and the first type of rule set 12 has a rule body 13 having a predetermined configuration, and the rule body includes one or more rules. This is a list of 14 rules, each of which has a condition determination process and a procedure that is executed when the condition is satisfied.

【0011】第2の種類のルール集合15は、所要の処
理を実行する任意の処理形式の手続きによって構成した
ルール本体16を有する。図1(b)は知識システム構
築処理装置の構成であって、前記知識システムのルール
集合を生成するに際し、プレコンパイラ20と、コンパ
イラ21とを設ける。
[0011] The second type of rule set 15 has a rule body 16 configured by a procedure of an arbitrary processing type that executes a required process. FIG. 1(b) shows the configuration of a knowledge system construction processing device, which includes a precompiler 20 and a compiler 21 when generating a rule set for the knowledge system.

【0012】プレコンパイラ20は、所定の規約に従っ
て該ルール集合を記述したプログラム22を解析して、
該プログラムに所定の指定文を有する場合には、該ルー
ル集合を前記第2の処理形式のプログラムとして処理し
て、該指定文に続く部分を無条件に該コンパイラの入力
とする。
[0012] The precompiler 20 analyzes the program 22 in which the rule set is written according to a predetermined convention, and
If the program has a predetermined specification statement, the rule set is processed as a program of the second processing format, and the portion following the specification statement is unconditionally input to the compiler.

【0013】該指定文が無い場合には、該ルール集合を
前記第1の処理形式のプログラムとして処理して、該プ
ログラムを所定の処理形式に基づいて解析し、所要の変
換を行なって、該プログラムを所定のプログラミング言
語で記述されたプログラムに変換して該コンパイラの入
力とする。
[0013] If the specified statement does not exist, the rule set is processed as a program in the first processing format, the program is analyzed based on the predetermined processing format, and the necessary conversion is performed. A program is converted into a program written in a predetermined programming language and is input to the compiler.

【0014】コンパイラ21は、プレコンパイラ20の
処理した結果のプログラム23を当該ルール集合を実行
する目的プログラム24に変換する。
The compiler 21 converts the program 23 resulting from processing by the precompiler 20 into a target program 24 that executes the rule set.

【0015】[0015]

【作用】本発明の知識システムにより、ルール集合は定
型のルールからなるルール集合と、任意の手続きで処理
を記述したルール集合との混成とすることができる。
[Operation] According to the knowledge system of the present invention, a rule set can be a mixture of a rule set consisting of fixed rules and a rule set in which processing is described using an arbitrary procedure.

【0016】両種類のルール集合の原始プログラムは指
定文で識別できるようにし、プレコンパイラは定型であ
れば定型処理の記述規約に基づいて解析、検査し、要す
れば変換して、例えばCOBOL言語の原始プログラム
にして出力する。又定型でなければ、COBOL言語で
記述した手続きをそのまゝ出力する。
The source programs for both types of rule sets can be identified by specified statements, and if the precompiler is a standard program, it will be analyzed and inspected based on the description rules for the standard process, and if necessary, it will be converted and converted into a COBOL language, for example. Output it as a source program. If the procedure is not a fixed format, the procedure written in the COBOL language is output as is.

【0017】コンパイラは、一般のCOBOLコンパイ
ラでよく、プレコンパイラの出力を処理して、ルール集
合を実行する目的プログラムを生成する。
[0017] The compiler may be a general COBOL compiler, and processes the output of the precompiler to generate a target program that executes the rule set.

【0018】[0018]

【実施例】図1(a)の推論処理部11はルール集合群
10について、前記図2の従来の推論処理部1と同様に
推論処理を進める。
Embodiment The inference processing unit 11 shown in FIG. 1A performs inference processing on the rule set group 10 in the same manner as the conventional inference processing unit 1 shown in FIG.

【0019】図3はルール集合の原始プログラムの一般
形の一例を示し、COBOL言語を使用する場合の例で
あって、「PROCEDURE DIVISION」に
処理プログラムが記述され、図3(a)は定型の規約に
従うルールからなるルール本体を持つ第1の種類の処理
形式の場合である。
FIG. 3 shows an example of a general form of a source program for a rule set, and is an example when using the COBOL language. A processing program is described in "PROCEDURE DIVISION", and FIG. 3(a) shows a typical form of a source program. This is the case of the first type of processing format, which has a rule body consisting of rules that follow conventions.

【0020】図3(b)は自由型式の手続きでイベント
操作等を記述する場合の例で、3行目の指定文「FRE
E−FORMAT.」によって、以後のプログラムが自
由型式のプログラムで構成されていることを表示してい
る。
FIG. 3(b) is an example of describing event operations etc. in a free-form procedure.
E-FORMAT. ” indicates that the following program consists of free-form programs.

【0021】図4はプレコンパイラ20の処理の流れの
一例を示し、処理ステップ30で指定文「FREE−F
ORMAT.」の有無を識別し、指定が無ければ処理ス
テップ31で定型の記述規約に基づく構文解析と必要な
変換を行い、エラーが無ければ処理ステップ32を経て
処理ステップ33で結果のプログラム23をコンパイラ
に渡し、エラーがあればエラーメッセージを出力する。
FIG. 4 shows an example of the processing flow of the precompiler 20. In processing step 30, the specified statement "FREE-F
ORMAT. ”, and if there is no specification, the syntax analysis and necessary conversion are performed based on the standard description convention in processing step 31, and if there is no error, the resulting program 23 is passed through processing step 32 and processed to the compiler in processing step 33. and outputs an error message if there is an error.

【0022】指定文「FREE−FORMAT.」があ
れば、通常のCOBOLプログラムとして処理すればよ
いので、処理ステップ34でそのまゝをプログラム23
としてコンパイラに渡す。
[0022] If there is a specified statement "FREE-FORMAT.", it can be processed as a normal COBOL program, so in processing step 34 the program 23 is
Pass it to the compiler as

【0023】[0023]

【発明の効果】以上の説明から明らかなように本発明に
よれば、ルール集合の実行によって推論を進めるように
した知識システムにおいて、知識システムを構成するル
ール集合を、自由なプログラムで構成できるようにし、
一定形式と自由形式のルール集合が混在した知識システ
ムを構成できるので、必要な設計条件、例えば変更の可
能性の高い部分を変更し易くする等の条件、の導入が容
易になり、システム構築の生産性を向上できるという著
しい工業的効果がある。
[Effects of the Invention] As is clear from the above explanation, according to the present invention, in a knowledge system in which inference is advanced by executing a set of rules, the set of rules constituting the knowledge system can be configured by a free program. west,
Since it is possible to configure a knowledge system that includes a mixture of fixed-form and free-form rule sets, it is easier to introduce necessary design conditions, such as making it easier to change parts that are likely to change, and to improve system construction. It has a significant industrial effect of improving productivity.

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

【図1】  本発明の構成を示すブロック図[Figure 1] Block diagram showing the configuration of the present invention

【図2】 
 従来の構成例を示すブロック図
[Figure 2]
Block diagram showing a conventional configuration example

【図3】  ルール集
合の一般形を説明する図
[Figure 3] Diagram explaining the general form of a rule set

【図4】  プレコンパイラの
処理の流れ図
[Figure 4] Flowchart of precompiler processing

【符号の説明】[Explanation of symbols]

1、11  推論処理部 2、10  ルール集合群 12、15  ルール集合 13、16  ルール本体 14  ルール 20  プレコンパイラ 21  コンパイラ 22、23  プログラム 24  目的プログラム 30〜34  処理ステップ 1, 11 Inference processing section 2, 10 Rule set group 12, 15 Rule set 13, 16 Rule body 14 Rules 20 Precompiler 21 Compiler 22, 23 Program 24 Purpose program 30-34 Processing steps

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】  1以上のルール集合からなるルール集
合群(10)と、推論処理部(11)を有し、該推論処
理部は、該ルール集合群の1ルール集合を所定の選択処
理で選択して実行する処理を、所定の終了条件が生起す
るまで反復することによって推論処理を行なうシステム
であって、該ルール集合に、第1及び第2の種類の処理
形式を設け、第1の種類の該ルール集合(12)は、所
定の構成のルール本体(13)を有し、該ルール本体は
1以上のルール(14)からなるルールの並びであり、
各該ルール(14)は条件判定処理と、該条件が満足さ
れる場合に実行される手続きとを有し、第2の種類の該
ルール集合(15)は、所要の処理を実行する任意の処
理形式の手続きによって構成したルール本体(16)を
有することを特徴とする知識システム。
1. A rule set group (10) consisting of one or more rule sets, and an inference processing section (11), wherein the inference processing section performs a predetermined selection process on one rule set of the rule set group. A system that performs inference processing by repeating selected and executed processing until a predetermined termination condition occurs, wherein the rule set is provided with first and second types of processing formats, and the first type of processing format is provided in the rule set. The rule set (12) of the type has a rule body (13) with a predetermined configuration, and the rule body is a rule sequence consisting of one or more rules (14),
Each rule (14) has a condition determination process and a procedure to be executed when the condition is satisfied, and the second type of rule set (15) has an arbitrary process that executes the required process. A knowledge system characterized by having a rule body (16) configured by a processing type procedure.
【請求項2】  請求項1記載のルール集合を生成する
に際し、プレコンパイラ(20)と、コンパイラ(21
)とを設け、該プレコンパイラ(20)は、所定の規約
に従って該ルール集合を記述したプログラム(22)を
解析して、該プログラムに所定の指定文を有する場合に
は、該ルール集合を前記第2の処理形式のプログラムと
して処理して、該指定文に続く部分を無条件に該コンパ
イラの入力とし、該指定文が無い場合には、該ルール集
合を前記第1の処理形式のプログラムとして処理して、
該プログラムを所定の処理形式に基づいて解析し、所要
の変換を行なって、該プログラムを所定のプログラミン
グ言語で記述されたプログラムに変換して該コンパイラ
の入力とし、該コンパイラ(21)は、該プレコンパイ
ラの処理した結果のプログラム(23)を当該ルール集
合を実行する目的プログラム(24)に変換するように
構成されていることを特徴とする知識システム構築処理
装置。
2. When generating the rule set according to claim 1, a precompiler (20) and a compiler (21
), and the precompiler (20) analyzes the program (22) in which the rule set is written according to a predetermined convention, and if the program has a predetermined specification statement, the precompiler (20) converts the rule set into the above-described code. Process it as a program in the second processing format, and use the part following the specified statement as input to the compiler unconditionally, and if there is no specified statement, process the rule set as a program in the first processing format. Process it and
The program is analyzed based on a predetermined processing format, necessary conversion is performed, and the program is converted into a program written in a predetermined programming language, which is input to the compiler, and the compiler (21) A knowledge system construction processing device, characterized in that it is configured to convert a program (23) resulting from processing by a precompiler into a target program (24) that executes the rule set.
JP3088811A 1991-04-19 1991-04-19 Knowledge system and its structuring processor Pending JPH04320529A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3088811A JPH04320529A (en) 1991-04-19 1991-04-19 Knowledge system and its structuring processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3088811A JPH04320529A (en) 1991-04-19 1991-04-19 Knowledge system and its structuring processor

Publications (1)

Publication Number Publication Date
JPH04320529A true JPH04320529A (en) 1992-11-11

Family

ID=13953281

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3088811A Pending JPH04320529A (en) 1991-04-19 1991-04-19 Knowledge system and its structuring processor

Country Status (1)

Country Link
JP (1) JPH04320529A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011159651A (en) * 2010-01-29 2011-08-18 Fujifilm Corp Method of manufacturing photoelectric conversion device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011159651A (en) * 2010-01-29 2011-08-18 Fujifilm Corp Method of manufacturing photoelectric conversion device

Similar Documents

Publication Publication Date Title
US5504902A (en) Multi-language generation of control program for an industrial controller
JPH0895821A (en) Method and device for multitask program debugging
CN109522005A (en) Cross-platform GRAPHICAL PROGRAMMING method
JPH04320529A (en) Knowledge system and its structuring processor
JPS617903A (en) Sequence control device
JPH0488438A (en) One-instruction execution system of debugger for source program in high-level language
JPS62259142A (en) Processing system for instruction scheduling
JPH01224842A (en) Inferential control system for knowledge-based system
JPS61285544A (en) Program executing method
JPH0193826A (en) System for counting dynamic step of high grade language
JPH04336330A (en) Language interpreter
JPS62236044A (en) Basic interpreter
JPH01161443A (en) Dynamic dispatching system
JPH03220669A (en) Multiple loop vectorization compiling system
JPH02211542A (en) Module management information calculating system
JPH03144830A (en) Parallel processing system
JPH04209026A (en) Rule inference device
JPH03266029A (en) List output method in logical type language processing system
JPH04340628A (en) Fuzzy inference process compile system
JPH06250989A (en) Compiler
JPH0991146A (en) Automatic programming method
JPH01274241A (en) Instruction string generating system
JPS62239236A (en) Compiler for program
JPH04115347A (en) Automatic formation system for interactive program
JPH05143352A (en) Microprocessor

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19990907