JPH04209027A - Rule inference device - Google Patents

Rule inference device

Info

Publication number
JPH04209027A
JPH04209027A JP34073990A JP34073990A JPH04209027A JP H04209027 A JPH04209027 A JP H04209027A JP 34073990 A JP34073990 A JP 34073990A JP 34073990 A JP34073990 A JP 34073990A JP H04209027 A JPH04209027 A JP H04209027A
Authority
JP
Japan
Prior art keywords
rule
rule inference
inference
language
program
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
JP34073990A
Other languages
Japanese (ja)
Inventor
Toshimitsu Ushijima
牛島 敏光
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP34073990A priority Critical patent/JPH04209027A/en
Publication of JPH04209027A publication Critical patent/JPH04209027A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To suppress the development cost by producing a process which depends upon a programming language at the time of executing rule inference as a rule inference module and making a rule inference means common to respective languages. CONSTITUTION:A transaction source program 5 is supplied to the rule inference device 1 and actuated. Then a translation program 2-i translates the transaction source program 5 to generate a transaction object program 6 and also generate a rule inference module 7. When the transaction object program 6 is executed, an indication of rule inference and rule information are passed to a rule inference means 4. In response, the rule inference means 4 performs the rule inference and the rule inference module 7 is called to perform the collation process, etc., of the condition part of a rule.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、各種エキスパートシステム、人工知能応用シ
ステム等のルール型の知識を利用するシステムに関し、
特にそれらのシステムで使用されるルール推論装置に関
するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to systems that utilize rule-based knowledge, such as various expert systems and artificial intelligence application systems.
In particular, it relates to rule inference devices used in those systems.

〔従来の技術〕[Conventional technology]

従来、ルール(プロダクションルール)の機能を持つプ
ログラミング言9nで記述されたソースプログラムを翻
訳してオブジェクトプログラムを生成し、このオブジェ
クトプログラムからの指示に基づき推論動作を行うルー
ル推論装置は、LISPやC等の各言語個別の装置であ
るか、或いは言語独立の装置として実現されていた。
Conventionally, rule inference devices that generate an object program by translating a source program written in a programming language 9n that has a rule (production rule) function, and perform inference operations based on instructions from this object program, are based on LISP or C. It was realized as a separate device for each language, such as, or as a language-independent device.

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

上述した従来のルール推論装置のうち、各言語個別の装
置では、次のような問題点がある。
Among the conventional rule inference devices described above, devices for each language have the following problems.

■ 各言語毎に、ルール推論装置の中核となるルール推
論手段を設計し藺発しなければならず、開発コストが増
大する。  ゛ ■ 各言語毎に機能やインクフェイスが異なると、ルー
ル推論手段の統一的な設計が難しく、統一的な推論メカ
ニズムを複数の言語に対し提供するのが困難になる。
■ Rule inference means, which are the core of the rule inference device, must be designed and developed for each language, which increases development costs.゛■ If the functions and ink faces differ for each language, it becomes difficult to design a unified rule inference means, and it becomes difficult to provide a unified inference mechanism for multiple languages.

また、言語独立のルール推論装置では、次のような問題
点がある。
Furthermore, language-independent rule inference devices have the following problems.

■ 各言語が持つ機能をルールと融合して使いたい場合
でもプログラムが別々になってしまう。
■ Even if you want to combine the functions of each language with rules, the programs will be separate.

■ 既存の言語とは形式の異なる新たな言語をその文法
を含めて全般的に習得することが必要になる。
■ It is necessary to learn a new language whose format is different from existing languages, including its grammar.

そこで本発明の目的は、上記■〜■のような問題点を解
消したルール推論装置を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a rule inference device that solves the problems described above.

(!lit!を解決するための手段〕 本発明のルール推論装置は上記の目的を達成するために
、 それぞれ種類の異なるプログラミング言語の各々にルー
ルの機能を追加した各拡張言語毎の翻訳手段を有し、前
記拡張言語で記述されたソースプログラムをその拡張言
語に対応する翻訳手段を使用して翻訳し、オブジェクト
プログラムとルール推論を行う際の言語依存の処理を司
るルール推論モジュールとを生成する翻訳手段群と、こ
の翻訳手段群で生成されたオブジェクトプログラムから
の指示に基づき前記ルール推論モジュールを適宜呼び出
しながらルール推論を行う各拡張言語共通のルール推論
手段とを有している。
(Means for solving !lit!) In order to achieve the above object, the rule inference device of the present invention has a translation means for each extended language in which rule functions are added to each of different types of programming languages. and translates the source program written in the extended language using a translation means compatible with the extended language to generate an object program and a rule inference module that manages language-dependent processing when performing rule inference. It has a group of translation means, and a rule inference means common to each extended language that performs rule inference while appropriately calling the rule inference module based on instructions from an object program generated by the group of translation means.

(作用〕 本発明のルール推論装置においては、それぞれ種類の異
なるプログラミング言語の各々にルールの機能を追加し
た各拡張言語毎の翻訳手段を有する翻訳手段群が、拡張
言語で記述されたソースプログラムをその拡張言語に対
応する翻訳手段を使用して翻訳し、オブジェクトプログ
ラムとルール推論を行う際の言語依存の処理を司るルー
ル推論モジュールとを生成する。そして、実行に際して
は、ルール推論手段が、上記生成されたオブジェクトプ
ログラムからの指示に基づき前記ルール推論モジュール
を適宜呼び出しながらルール推論を行う。
(Operation) In the rule inference device of the present invention, a group of translation means each having a translation means for each extended language in which rule functions are added to each of different types of programming languages, converts a source program written in the extended language into a translation means group. Translation is performed using a translation means corresponding to the extended language, and an object program and a rule inference module that controls language-dependent processing when performing rule inference are generated.Then, when executing the rule inference module, the rule inference means Rule inference is performed while appropriately calling the rule inference module based on instructions from the generated object program.

〔実施例] 次に、本発明の実施例について図面を参照して詳細に説
明する。
[Example] Next, an example of the present invention will be described in detail with reference to the drawings.

第1図は本発明の一実施例の構成図である。同図におい
て、5は、C0BOL、C等の既存のプログラミング言
語にルールの機能を追加した拡張言語で記述された業務
ソースプログラムであり、本実施例のルール推論装置1
は、このような業務ソースプログラム5を入力して業務
オブジェクトプログラム6とルール推論モジュール7と
を出力する翻訳プログラム群2と、業務オブジェクトプ
ログラム6の実行時にルール推論を行う各拡張言語共通
のルール推論手段4とを有している。
FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, 5 is a business source program written in an extended language in which rule functions are added to existing programming languages such as C0BOL and C, and the rule inference device 1 of this embodiment
is a translation program group 2 that inputs such a business source program 5 and outputs a business object program 6 and a rule inference module 7, and a rule inference common to each extended language that performs rule inference when the business object program 6 is executed. means 4.

翻訳プログラム群2は、C0BOL、C等のそれぞれ異
なる既存のプログラム言語に対応する拡張言語毎の翻訳
プログラム2−1〜2−nで構成されており、各翻訳プ
ログラム2−1〜2−nは業務オブジェクトプログラム
6の生成機能を有すると共に、ルール推論モジュール生
成手段3を内蔵している。翻訳プログラム2−1〜2−
nが生成する業務オブジェクトプログラム6は、従来の
プログラミング言語の翻訳プログラムが出力する通常の
オブジェクトに加えルール推論手段4に対するルール推
論の指示とルール情報とを含んでいる。また、ルール推
論モジュール生成手段3が生成するルール推論モジュー
ル7には、ルール推論を行う際の言語依存の処理が元の
業務ソースプログラム5の内容に応じて実行可能なオブ
ジェクトの形の実行モジュールとして出力されている。
The translation program group 2 is composed of translation programs 2-1 to 2-n for each extended language corresponding to different existing programming languages such as C0BOL and C, and each translation program 2-1 to 2-n is It has a function of generating a business object program 6, and also has a built-in rule inference module generating means 3. Translation program 2-1~2-
The business object program 6 generated by n includes, in addition to normal objects output by a conventional programming language translation program, instructions for rule inference to the rule inference means 4 and rule information. In addition, the rule inference module 7 generated by the rule inference module generation means 3 is an execution module in the form of an object that can execute language-dependent processing when performing rule inference according to the content of the original business source program 5. It is being output.

ルール推論モジュール7中には、業務オブジェクトプロ
グラム6が出すルール推論の指示をルール推論手段4に
受は渡す入口処理、ルール推論の過程で行われるルール
の条件部の照合処理、ルールの実行部の実行における各
言語依存の各種処理、制御を業務オブジェクトプログラ
ム6に戻すときの出口処理等が含まれる。
The rule inference module 7 includes an entry process for receiving and passing the rule inference instructions issued by the business object program 6 to the rule inference means 4, a process for checking the condition part of the rule performed in the process of rule inference, and a process for executing the rule. This includes various language-dependent processes during execution, exit processing when returning control to the business object program 6, and the like.

他方、ルール推論手段4は、業務オブジェクトプログラ
ム6の実行時に、ルール推論モジュール7を通して業務
オブジェクトプログラム6から与えられる指示に基づき
、ルール推論モジュール7中の各処理を適宜呼び出しな
がらルール推論を行う手段である。
On the other hand, the rule inference means 4 is a means for performing rule inference while appropriately calling each process in the rule inference module 7 based on instructions given from the business object program 6 through the rule inference module 7 when the business object program 6 is executed. be.

次に、このように構成された本実施例のルール推論装置
1の動作を説明する。
Next, the operation of the rule inference device 1 of this embodiment configured as described above will be explained.

既存のプログラミング言語にルールの機能を追加した拡
張言語を使用して記述した業務ソースプログラム5をル
ール推論装置1に与えて起動をかけると、内部の翻訳プ
ログラム群2のその記述言語に対応する翻訳プログラム
2−i(i=1〜n)が業務ソースプログラム5を翻訳
し、業務オブジェクトプログラム6を生成すると共に、
そのルール推論モジュール生成手段3によりルール推論
モジュール7を生成する。
When a business source program 5 written using an extended language in which rule functions are added to an existing programming language is given to the rule inference device 1 and activated, translations corresponding to the writing language of the internal translation program group 2 are executed. The program 2-i (i=1 to n) translates the business source program 5 and generates the business object program 6, and
The rule inference module generation means 3 generates a rule inference module 7.

次に、この生成された業務オブジェクトプログラム6を
実行すると、業務オブジェクトプログラム6ではそのル
ール推論に際しルール推論の指示とルール情報とをルー
ル推論モジュール7を通してルール推論手段4に引き渡
す、これに応答してルール推論手段4はルール推論を行
う。そして、ルール推論動作のうち例えばルールの条件
部の照合処理等については、ルール推論モジュール7を
呼び出してそれに処理させる。このようにし°C1指示
されたルール推論の動作を終えると、ルールlll論モ
ジュール7を通して業務オブジェクトプログラム6に制
御を戻し、以下同様の動作が繰り返され、問題解決のた
めの推論が進められる。
Next, when the generated business object program 6 is executed, the business object program 6 passes rule inference instructions and rule information to the rule inference means 4 through the rule inference module 7. The rule inference means 4 performs rule inference. Among the rule inference operations, for example, the process of matching the condition part of the rule is called out to the rule inference module 7 and caused to be processed by it. When the rule inference operation instructed by °C1 is completed in this manner, control is returned to the business object program 6 through the rule theory module 7, and the same operation is repeated to proceed with inference for problem solving.

(発明の効果〕 以上説明した本発明のルール推論装置によれば次のよう
な効果を得ることができる。
(Effects of the Invention) According to the rule inference device of the present invention described above, the following effects can be obtained.

(1)ルール推論を行う際のプログラミング言語に依存
した処理を翻訳手段群がルール推論モジュールとして生
成し、ルール推論手段を各菖°詔共通なものとしたごと
により、唯一のルール推論手段を設計、開発すれば良く
、開発コストが抑えられる。
(1) The translation means group generates the programming language-dependent processing when performing rule inference as a rule inference module, and by making the rule inference means common to each irises, a unique rule inference means is designed. , all you have to do is develop it, and the development cost can be kept down.

(2)ルール推論手段が各言語共通であるため、統一的
な推論メカニズムを複数のプログラミング言語に対し提
供できる。
(2) Since the rule inference means are common to each language, a unified inference mechanism can be provided to multiple programming languages.

(3)既存の言語を拡張した拡張言語が扱えるため、各
言語が持つ機能をルールと融合して使う場合にプログラ
ムを共通化できる。
(3) Since extended languages that extend existing languages can be handled, programs can be standardized when functions of each language are used in combination with rules.

(4)既存の言語にルールの機能を追加した拡張3語で
ソースプログラムを記述するので、各言語全般をあらた
めて習得する必要がない。
(4) Source programs are written in three extended languages that add rule functions to existing languages, so there is no need to learn all the languages in general.

(5)実行時のルール推論動作のうち、言語に依存する
部分については、実行可能な形式のルール推論モジュー
ルとして出力されているので、実行時の負荷が軽減でき
る。
(5) Among the rule inference operations at runtime, language-dependent parts are output as an executable rule inference module, so the load at runtime can be reduced.

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

第1図は本発明の一実施例の構成図である。 図において、 1・・・ルール推論装置 2・・・翻訳プログラム群 2−1〜2−n・・・翻訳プログラム 3・・・ルール推論モジュール生成手段4・・・ルール
推論手段 5・・・業務ソースプログラム 6・・・業務オブジェクトプログラム 7・・・ルール推論モジュール
FIG. 1 is a block diagram of an embodiment of the present invention. In the figure, 1... Rule inference device 2... Translation program group 2-1 to 2-n... Translation program 3... Rule inference module generation means 4... Rule inference means 5... Business Source program 6... Business object program 7... Rule inference module

Claims (1)

【特許請求の範囲】 それぞれ種類の異なるプログラミング言語の各々にルー
ルの機能を追加した各拡張言語毎の翻訳手段を有し、前
記拡張言語で記述されたソースプログラムをその拡張言
語に対応する翻訳手段を使用して翻訳し、オブジェクト
プログラムとルール推論を行う際の言語依存の処理を司
るルール推論モジュールとを生成する翻訳手段群と、 該翻訳手段群で生成されたオブジェクトプログラムから
の指示に基づき前記ルール推論モジュールを適宜呼び出
しながらルール推論を行う各拡張言語共通のルール推論
手段とを有するルール推論装置。
[Scope of Claims] A translation means for each extended language in which a rule function is added to each of different programming languages, and a translation means for translating a source program written in the extended language to the extended language. a group of translation means for translating the object program using the method to generate an object program and a rule inference module that controls language-dependent processing when performing rule inference; A rule inference device having a rule inference means common to each extended language that performs rule inference while appropriately calling a rule inference module.
JP34073990A 1990-11-30 1990-11-30 Rule inference device Pending JPH04209027A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP34073990A JPH04209027A (en) 1990-11-30 1990-11-30 Rule inference device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP34073990A JPH04209027A (en) 1990-11-30 1990-11-30 Rule inference device

Publications (1)

Publication Number Publication Date
JPH04209027A true JPH04209027A (en) 1992-07-30

Family

ID=18339844

Family Applications (1)

Application Number Title Priority Date Filing Date
JP34073990A Pending JPH04209027A (en) 1990-11-30 1990-11-30 Rule inference device

Country Status (1)

Country Link
JP (1) JPH04209027A (en)

Similar Documents

Publication Publication Date Title
JP2801931B2 (en) Logic design processing device, circuit conversion rule translation device, and circuit conversion rule translation method
Ferguson Evolution of the meta-assembly program
JPH04209027A (en) Rule inference device
JPH04209026A (en) Rule inference device
Hooman Program design in PVS
Craigen An application of the m-EVES verification system
Karjoth XFSM: A formal model of communicating state machines for implementation specifications
McDonald et al. Denotational semantics of a command interpreter and their implementation in Standard ML
JPH02230330A (en) Inference device
McLean The design and application of a transportable inference engine (TIE1)
Carciofini et al. LogLisp Programming System Users Manual
Patnaik et al. Implementation of CSP-S for description of distributed algorithms
JP2741904B2 (en) Computer language processing system
JPH05143356A (en) Compiler device
Cowlishaw The design of the REXX language
Horning Yes! High level languages should be used to write systems software
Oudshoorn et al. Generating an implementation of a parallel programming language from a formal semantic definition
JPH02222032A (en) Optimization system for addition/subtraction instruction
BARR et al. Influence of PASCAL compiler construction on hardware design
JPS63317831A (en) Program translation processing method
Grogono Aspects of programming language design
Barta PACOL: A parallel control language
Wolman Operators for manipulating language structures
Vel'bitskiy Metalanguage for formal definition of semantics of programming languages
Suthers et al. Roles and issues of computational media in learning communities