JPH01292537A - Rule inspection type information processing system - Google Patents

Rule inspection type information processing system

Info

Publication number
JPH01292537A
JPH01292537A JP63122058A JP12205888A JPH01292537A JP H01292537 A JPH01292537 A JP H01292537A JP 63122058 A JP63122058 A JP 63122058A JP 12205888 A JP12205888 A JP 12205888A JP H01292537 A JPH01292537 A JP H01292537A
Authority
JP
Japan
Prior art keywords
rule
file
input
verification
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
JP63122058A
Other languages
Japanese (ja)
Inventor
Hiroshi Watanabe
坦 渡辺
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP63122058A priority Critical patent/JPH01292537A/en
Publication of JPH01292537A publication Critical patent/JPH01292537A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To expand the range of applications of the title system by using a means which replaces both rule and inspection files and a means which detects the discordance between a group of rules of the rule file and the output of the inspection file at replacement of both files. CONSTITUTION:When an input is received, a rule application part 3 applies the rule group to a rule file 6 and produces the corresponding output. In case the abnormality of a rule is detected under such conditions, a control part 1 registers said input into an inspection file 7 and at the same time informs the abnormality to a user via an error display part 15. Thus the user adds a new rule to the file for revision via a rule editing part 2. When the new rule is added, the user applies the replaced rule group to the input example of the file 7 to check whether the corresponding output is obtained or not. If so, the obtained output is registered into the file 7. Thus the contents of both files 6 and 7 are replaced and a rule inspecting part 4 applies the replaced rule group to the input example of the file 7 to check the coincidence with the registered output.

Description

【発明の詳細な説明】 〔産業上の利用分野] 本発明は、入力列に対して適合する処理規則を選択して
出力列を生成する規則検証型情報処理システムに係り、
特に、入力列の個々の構文だけでなく文脈に応じた処理
を容易に誤りなく行なうことのできる規則検証型情報処
理システムに関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a rule verification type information processing system that selects processing rules that match an input string and generates an output string.
In particular, the present invention relates to a rule-verifying information processing system that can easily perform error-free processing according to the context as well as the individual syntax of an input string.

〔従来の技術] 従来、エクスパート用の規則習得システムとして、例え
ば特開昭60−272353号公報に記載のように、専
門情報に関する文章の部分が所定文法に適合しているか
否か検査し、文章が完成した際に該文章を規則に変換す
ることにより、エクスパートシステムの規則を経済的に
作成するものが知られている。しかし、このシステムは
、一つの規則の記述内における文法的整合性の保証にと
どまっていた。
[Prior Art] Conventionally, as a rule learning system for experts, as described in, for example, Japanese Patent Application Laid-Open No. 60-272353, a system inspects whether a part of a sentence related to specialized information conforms to a predetermined grammar. It is known to economically create rules for expert systems by converting sentences into rules when they are completed. However, this system only guarantees grammatical consistency within a single rule description.

一方、文脈を考慮した言語変換規則の作成・選択方法に
ついては、米国誌「ソフ、トウエア・プラ。
On the other hand, for information on how to create and select language conversion rules that take the context into account, please refer to the American magazine "Software Plasma."

クチイス・アンド・エクスペリエンス、第14巻第4号
J  (1984年)第347頁〜第364頁(M  
−Ganapathi;  八ttributed  
Linear  Intermed−iate Rep
resentations for RetarBet
able CodeGenerators、Softw
are−Practice、and Experien
ce。
Cutis and Experience, Vol. 14, No. 4 J (1984), pp. 347-364 (M
-Ganapathi;
Linear Intermed-iate Rep
reservations for RetarBet
able Code Generators, Softw
are-Practice, and Experience
ce.

vol、14.No、4. (八pr、 1984) 
、 pp347−364)に述べられている。これは、
構文要素名に属性値を付記した中間語要素を照合用の一
つの単位とし、この中間語要素列の多数のパタンの各々
に対する変換結果の対応関係を言語変換規則として変換
表に入れ、入力プログラムから作成した中間語要素列を
変換表の中間語パタンとL A L R(Look a
head Leftto Right)構文解析法によ
って照合し、適合した規則に従って入力プログラムを書
き換えることを繰り返えして出力プログラムとしての機
械語列を得るものである。ここでは、規則を書き換える
ことは行なっていない。上記の属性付き構文要素は一つ
のストリング(文字列)として表現され、中間語要素の
パタン照合は、文字列としての一致を求める形をとる。
vol, 14. No, 4. (8 pr, 1984)
, pp. 347-364). this is,
An intermediate language element with an attribute value appended to the syntax element name is used as a unit for collation, and the correspondence of the conversion results for each of the many patterns of this intermediate language element string is entered into a conversion table as a language conversion rule, and the input program The intermediate word element string created from L A L R (Look a
(head, left to right) syntactic analysis method, and the input program is repeatedly rewritten according to the matching rules to obtain a machine language string as an output program. There is no rewriting of the rules here. The attribute-attached syntax element described above is expressed as one string (character string), and pattern matching of the intermediate language element takes the form of seeking a match as a character string.

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

エクスパート用規則習得方法についての上記特開昭公報
に示される従来技術は、一つの規則がその記述用文法に
合っているが否がを検査するのみで、規則の相互関係を
調べる点について配慮されておらず、規則を追加したと
きに他の規則との整合性が保たれなくなるおそれがあっ
た。さらにこれは、文脈に依存する処理については何も
考慮されていす、各々の入力を独立のものとして処理す
るものであり、入力の相互関係や入力列の構造に合わせ
た処理ができないという問題があった。
The conventional technology disclosed in the above-mentioned Japanese Patent Laid-Open Publication No. 2003-120037 regarding the rule learning method for experts only checks whether a single rule matches its descriptive grammar, but does not take into account the point of examining the interrelationships between the rules. Therefore, when rules were added, there was a risk that consistency with other rules would not be maintained. Furthermore, this method does not take any context-dependent processing into consideration; each input is processed independently, and there is a problem that processing cannot be performed in accordance with the interrelationship of inputs or the structure of the input string. there were.

文脈を考慮した言語変換についての上記米国雑誌に示さ
れる従来技術は、前後の文の文脈依存性を考慮すること
について示唆はあるものの、属性を常に構文要素に付随
するものとして扱っているため、場合によって内部処理
過程で作られた属性のみにより規則を選択するというこ
とはできず、規則の選択方法が狭く限定されるという問
題があった。また、属性付き構文要素を一つのストリン
グとして扱うので、ある属性が所定条件を満たすならば
他の属性の値は何でもよいというような照合条件の記述
はむつかしく、そのよ・うな規則による言語変換は′行
ないにくいという問題があった。
The conventional technology shown in the above-mentioned American magazine about language conversion that takes context into account suggests that the context dependence of the preceding and following sentences should be taken into account, but it always treats attributes as attached to syntactic elements. In some cases, it is not possible to select rules based only on attributes created in an internal processing process, and there is a problem in that the method for selecting rules is narrowly limited. In addition, since syntactic elements with attributes are treated as one string, it is difficult to write matching conditions such that if a certain attribute satisfies a predetermined condition, the value of another attribute can be any value, and language conversion using such rules is difficult. 'The problem was that it was difficult to carry out.

さらに、この従来技術では、規則群をはじめから全部記
述して与える形であり、規則群を漸次拡大してゆくこと
は考慮されていす、規則を追加、修正するときに生ずる
不整合の検出も考慮されておらず、対象を綿密に検討し
すみずみまでわかったあとでないと言語変換規則を書け
ないという問題があった。
Furthermore, in this prior art, the rule group is completely described and provided from the beginning, and the gradual expansion of the rule group is not considered, nor is it possible to detect inconsistencies that occur when adding or modifying rules. This was not taken into account, and the problem was that language conversion rules could only be written after thoroughly examining the target and understanding every detail.

従って、本発明の目的は、上記従来技術の問題点を解消
し、言語変換システムやエクスバーl−システム等、変
換規則群によって入力から出力を得る規則検証型情報処
理システムにおいて、対象の全体を認知するに至らなく
ても、わかっている部分について規則を書き、それをも
とに他の規則との間の首尾一貫性を保ちながら規則群を
次第に拡充して行き扱える範囲を拡張可能とすることに
ある。更に、本発明の目的は、上記規則検証情報処理シ
ステムにおいて、個々の入力を別々に扱うのではなく、
入力の構造や与える順序によって、同じ入力パタンに対
しても異なる処理を可能とすることにある。
Therefore, an object of the present invention is to solve the above-mentioned problems of the prior art, and to recognize the entire object in a rule-verifying information processing system that obtains output from input using a group of conversion rules, such as a language conversion system or an Exbar system. Even if it is not possible to do so, it is possible to write rules for the parts that are known, and gradually expand the set of rules based on those rules while maintaining consistency with other rules, thereby expanding the range that can be handled. It is in. Furthermore, an object of the present invention is to, in the above-mentioned rule verification information processing system, not treat each input separately;
The purpose is to enable different processing even for the same input pattern depending on the structure of the input and the order in which it is given.

〔課題を解決するための手段] 上記目的を達成するため、本発明の規則検証型情報処理
システムは、以下の(1)〜(5)のように構成する。
[Means for Solving the Problems] In order to achieve the above object, the rule verification type information processing system of the present invention is configured as shown in (1) to (5) below.

(1)データ処理の規則群を収納した規則ファイルと、
与えられた入力に適合する規則を前記規則ファイルから
探し出して入力を処理する規則適用部とを有する規則検
証型情報処理システムにおいて、特に、多くの典型的入
力例とそれに対する出力の対を収納する検証ファイルと
、前記規則ファイル及び前記検証ファイルのいずれか一
方又は双方を更新する更新手段(規則編集部)と、前記
更新があったときに前記検証用ファイルに収納された入
力例の各々に対して前記規則ファイルの更新後の規則群
を適用(照合)して前記検証用ファイルに収納されてい
る対応する出力と比較し、不一致を検出する確認手段(
規則検証部)とを備える。
(1) A rule file containing a group of data processing rules,
In a rule verification type information processing system having a rule application unit that searches the rule file for a rule that matches a given input and processes the input, the system particularly stores many typical input examples and their corresponding output pairs. A verification file, an updating means (rule editing department) that updates either or both of the rule file and the verification file, and each of the input examples stored in the verification file when the update occurs. a verification means (checking) which applies (verifies) the updated rule group of the rule file and compares it with the corresponding output stored in the verification file to detect a mismatch;
(rule verification section).

(2)前記規則ファイルの規則群に適合しない入力(誤
った入力)が与えられたときに、規則ファイルと該入力
の不一致を使用者に告知すると共に、該人力を前記検証
用ファイルに自動的に入力例として収納して、前記規則
ファイルの改訂を促す1手段を更に備える。
(2) When input that does not conform to the rule group of the rule file (incorrect input) is given, the user is notified of the mismatch between the rule file and the input, and the human power is automatically added to the verification file. The method further includes a means for prompting revision of the rule file by storing the rule file as an input example.

(3)前記規則ファイルの規則群、該規則群を適用する
検証ファイルの入力例、及び、使用者により与えられた
入力に対して、予期された結果が得られないときに、結
果が得られる迄、あるいは、規則の適用を停止する迄、
規則適用過程を表示する手段を設ける。
(3) A result is obtained when the expected result is not obtained for the rule group of the rule file, the input example of the verification file to which the rule group is applied, and the input given by the user. or until the regulation ceases to apply.
Provide a means to display the rule application process.

(4)前記規則ファイルに収納する各々の規則は、属性
指定付き構文要素のパターン記述による平削適用条件と
、規則適用時のデータ処理操作の組合せとじて指定され
るように構成される。
(4) Each rule stored in the rule file is configured to be specified as a combination of a planing application condition based on a pattern description of a syntax element with attribute specification and a data processing operation when applying the rule.

(5)前記規則ファイルの規則の適用条件を指定する際
に、構文要素の属性指定は、該規則の選択に直接関係す
る属性の指定にのみ絞られ、又、前記属性指定はパタン
照合用の対象として構文要素の指定と同等に(差別され
ずに)扱われるように構成される。
(5) When specifying application conditions for rules in the rule file, the attribute specifications of syntax elements are limited to those directly related to the selection of the rule, and the attribute specifications are used for pattern matching. It is constructed so that it is treated as a target in the same way (without discrimination) as the specification of syntactic elements.

なお、構文要素を属性つきのものに限定することなく、
構文要素から離れた過去の履歴による属性に対するパタ
ン照合や、ある属性のみに着目して他の属性の値を問わ
ない形のパタン照合を可能とする規則指定機能を上記の
機能に追加することによって、更に高精度で、規則群を
漸次拡充しかつ文脈に合わせた変換をすることができる
Note that syntactic elements are not limited to those with attributes;
By adding a rule specification function to the above functions that enables pattern matching against attributes based on past history apart from syntax elements, and pattern matching that focuses only on a certain attribute without regard to the values of other attributes. , it is possible to gradually expand the rule set and perform conversions tailored to the context with even higher precision.

〔作用〕[Effect]

上記構成に基づく作用を、特に上記(1)及び(2)の
構成によるものを中心に説明する。
The effects based on the above configuration will be explained, particularly focusing on the configurations (1) and (2) above.

規則は、構文要素や属性から成る構成要素の文脈依存性
を有するパタンと、該パタンに対する処理を表わす行為
部との対によって表現される。検証用ファイルには、種
々の場合側に、多くの典型的な入力例とそれに対する出
力の対が収納されている。
A rule is expressed by a pair of a context-dependent pattern of constituent elements consisting of syntax elements and attributes, and an action portion representing a process for the pattern. The verification file contains many typical input examples and their corresponding output pairs in various cases.

入力があると、規則適用部は該入力に規則ファイルの規
則群を適用して対応する出力を発生させる。このとき、
もしも入力に対応する規則が見つからない等、規則の異
常(入力と規則の不一致等)が検出されると、(制御部
は)該人力をテスト用の入力例として検証用ファイルに
登録(収納)すると共に、誤り表示部により使用者に異
常(誤り、不一致)のあったことを告知する。そこで、
使用者は、規則編集部により規則ファイルに新しく規則
を追加改訂(更新)する。規則が追加(更新)されると
、使用者は更新後の規則群を検証用ファイルの入力例に
適用してみて、対応する(適正な)出力が得られるか否
か調査し、又誤り処理部によりその確認を求める。その
結果適正な出力が得られる場合は、この出力を前記入力
例(テスト用入力例)に対応する出力として検証用ファ
イルに正式に登録する。一方、適正な出力が得られない
場合には、使用者は、誤り処理部により、前記テスト入
力例に対し更に新しい規則群を適用し、その結果適正な
出力が得られれば、同様に、この出力をテスト用人力例
に対応する(適正な)出力として検証用ファイルに正式
に登録する。こうして、規則ファイル及び検証ファイル
の内容が更新されると、規則検証部は、自動的に起動さ
れて、更新後の規則群を検証ファイルの入力例に対し適
用して、登録された出力と一致するか否かを調べる(検
証し確認する)。
Given an input, the rule application section applies a set of rules in a rule file to the input to generate a corresponding output. At this time,
If a rule anomaly (such as a mismatch between the input and the rule) is detected, such as a rule corresponding to the input not being found, (the control unit) registers (stores) the human input in the verification file as a test input example. At the same time, the error display section notifies the user of the occurrence of an abnormality (error, inconsistency). Therefore,
The user adds and revise (updates) new rules to the rule file using the rule editing department. When a rule is added (updated), the user applies the updated rule set to the input example of the verification file, checks whether the corresponding (appropriate) output is obtained, and also performs error handling. The department will request confirmation. If a proper output is obtained as a result, this output is officially registered in the verification file as an output corresponding to the input example (test input example). On the other hand, if an appropriate output is not obtained, the user uses the error processing unit to apply a new set of rules to the test input example, and if an appropriate output is obtained as a result, the user applies the new rule group to the test input example. Officially register the output in the verification file as (appropriate) output corresponding to the human test example. When the contents of the rule file and verification file are updated in this way, the rule verification unit is automatically started and applies the updated rule group to the input example of the verification file to match the registered output. Find out whether or not (verify and confirm).

このようにして、規則ファイルに収納された規則群の首
尾一貫性が典型的入力例に対して常に保証されるので、
誤動作を招くおそれがなく規則群を次第に拡充して行く
ことができる。また、ある入力を与えたときに誤った出
力が与えられたとすると、その入力を検証用ファイルに
自動的に登録し、規則群を訂正した後にその出力も登録
することにより、検証項目を自然に拡充可能とし、首尾
一貫性を保持しやすくできる。すなわち、規則間の整合
性を維持しながら規則集を拡充することができると共に
、その際に文脈に依存した変換を行なうことができる。
In this way, the consistency of the rules stored in the rule file is always guaranteed for typical input examples, so
The rule group can be gradually expanded without fear of causing malfunctions. In addition, if an incorrect output is given when a certain input is given, that input is automatically registered in the verification file, and the output is also registered after the rule group is corrected, so that the verification items can be corrected naturally. It can be expanded and it is easier to maintain consistency. That is, it is possible to expand the rule set while maintaining consistency between rules, and at the same time, it is possible to perform context-dependent conversion.

なお、属性として入力中の構文要素の文脈情報や、過去
の履歴等を表わすよ・うにすれば、画一・的変換でなく
、文脈や履歴に応じた変換を行なう規則を書くことがで
き、高度な情報処理が可能となる。
Furthermore, by representing the context information and past history of the syntax element being input as an attribute, it is possible to write rules that perform conversion according to the context and history, rather than a uniform conversion. Advanced information processing becomes possible.

〔実施例〕〔Example〕

以下、本発明の一実施例を図を用いて説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例の機能構成図であり、入出力
とプログラムの起動を制御する制御部1と、規則ファイ
ル(規則集)6への規則の更新(追加・修正)と規則の
内部表現への変換を行な・う規則編集部2、実行用人力
13に対して規則ファイル6の規則を適用して出力結果
14を得る規則適用部3、検証用ファイル7に入ってい
る入力例に規則ファイル6の規則を適用するとき、その
(検証部の)入力例に対して検証用ファイルに登録され
ている出力が得られるか否かを確認する規則検証部4、
規則適用部3や規則検証部4で誤りがみったつたとき、
それに対する誤り表示15や修正促し16、あるいは誤
りに至る経歴表示17の出力を行なう誤り処理部5を含
む。検証用ファイルへの入力例とそれに対応する出力の
登録は、規則検証部4が検証用入出力例12を読みこん
で行なう。
FIG. 1 is a functional configuration diagram of an embodiment of the present invention, which includes a control unit 1 that controls input/output and program startup, and updates (additions/modifications) of rules to a rule file (rule collection) 6 and rules. Contained in the rule editing unit 2 which performs conversion into internal representation, the rule application unit 3 which applies the rules of the rule file 6 to the execution manual 13 to obtain the output result 14, and the verification file 7. When applying the rules of the rule file 6 to an input example, a rule verification unit 4 checks whether the output registered in the verification file is obtained for the input example (of the verification unit);
When an error is found in the rule application section 3 or rule verification section 4,
It includes an error processing section 5 that outputs an error display 15, a correction prompt 16, or a history display 17 leading to the error. The rule verification unit 4 reads the verification input/output example 12 and registers the input example and the corresponding output in the verification file.

検証用ファイルに登録されている入力から規則検証部が
算出した結果が検証用ファイルに登録されている出力と
一致するか否か調べ、不一致がみつかればその旨使用者
に告知する。
It is checked whether the result calculated by the rule verification unit from the input registered in the verification file matches the output registered in the verification file, and if a discrepancy is found, the user is notified to that effect.

第2図は本実施例における規則の書き方を示したもので
ある。その記法は、13 pJ F([1ackus 
NaurForm )と一般に呼ばれる構文記述形式に
、属性の記述と、その規則に合う入力が与えられたとき
にとる行為文の記述を加えたものである。
FIG. 2 shows how to write rules in this embodiment. The notation is 13 pJ F ([1ackus
This is a syntactic description format generally called NaurForm, in which a description of attributes and a description of the action sentence taken when an input matching the rules is given are added.

属性は、ある構文要素がどんな性質を持つかを主として
表わすもので、構文要素名と属性名の対で記すが、過去
の入力経歴による状態変化等を表わすために属性名単独
で記すこともある。属性は、どんな入力に対してどの規
則を適用するかを、入力としての記号列の形式だけでな
く、その入力記号列がどんな条件のもとで与えられたか
によって選択可能とするために使う。例えば、同じ一つ
の数字でも、それが何桁目の数字かによって意味や読み
方が異なるが、そのような扱いをするときは、入力の構
文要素としての数字や数字列に桁位置や桁数を表わす属
性を付記する。属性は、規則選択のための入力解析の際
に値が決定され、それらは通常、構文要素に付加される
。例えば、後述の第3図で、33に示す規則群の記述例
では、先頭のDigits”°が構成要素を示し、その
後の“[pos2]”が属性を示す。
Attributes mainly indicate what kind of properties a certain syntax element has, and are written as a pair of syntax element name and attribute name, but sometimes the attribute name is written alone to indicate changes in status due to past input history, etc. . Attributes are used to enable selection of which rule to apply to which input, not only based on the format of the input symbol string but also under what conditions the input symbol string is given. For example, even the same number has different meanings and readings depending on which digit it is in. When handling it in this way, it is necessary to indicate the digit position and number of digits in the number or number string as a syntactic element of the input. Add the attribute to represent. Attributes have values determined during input parsing for rule selection, and they are typically attached to syntactic elements. For example, in a description example of a rule group shown in 33 in FIG. 3, which will be described later, the leading Digits"° indicates a component, and the following "[pos2]" indicates an attribute.

規則の適用対象の記述は、入力構成要素(構文要素及び
属性を合せたもの)のパタンとして与える。入力の各構
成要素は、入ノj記号や構文要素名、あるいはそれらに
属性を〔〕で囲んでつけた形で表わすが、入力解析中に
生成された属性をあたかも入力記号のように一つの構成
要素とすることもある。入力構成要素のパターンを満た
すべき属性は、〔〕の中に指定するが、その属性は複数
個あってもよい。また、複数の属性をもつ構文要素に対
し、あるパターンでそのうちのある属性についてのみ着
目すればよい場合には、その属性についての条件のみを
書けばよく、他の属性について書く必要はない。
The description of the object to which the rule applies is given as a pattern of input components (a combination of syntax elements and attributes). Each component of the input is represented by an entry symbol, a syntactic element name, or an attribute enclosed in [ ], but the attributes generated during input parsing are expressed as a single input symbol, as if they were input symbols. It may also be a component. The attributes that should satisfy the pattern of the input component are specified in [ ], but there may be more than one attribute. Furthermore, when it is necessary to focus on only one of the attributes in a certain pattern for a syntax element that has multiple attributes, it is only necessary to write the condition for that attribute, and there is no need to write for the other attributes.

行為文は、一つの入力あるいは人力の一部に対して適合
する規則がみつかったときに行う入力の変換や属性値計
算等を記述する。行為文の一つとして属性値設定文 構文要素・属性名ニー式 があるが、それは代入記号ニーの左辺で指定された構文
要素の属性の値を右辺の式で示される値とすることを表
わす。右辺の式は、定数や他の属性値、あるいはそれら
に算術演算(+、  −、*、 /)第3図は第2図で
示した書き方に従って、3桁以下の数字を英語読みする
規則を書いた例である。
The action statement describes input conversion, attribute value calculation, etc. that are performed when a rule matching one input or a part of human power is found. One of the action sentences is the attribute value setting statement syntax element/attribute name knee expression, which indicates that the value of the attribute of the syntax element specified on the left side of the assignment symbol knee should be the value indicated by the expression on the right side. . The expression on the right side is a constant or other attribute value, or an arithmetic operation (+, -, *, /) on them. Figure 3 shows the rules for reading numbers of three digits or less in English according to the writing style shown in Figure 2. This is an example of what I wrote.

この規則を用いると、1をone、10をten、 I
 11をone hundred and eleve
nのように変換することができる。ここで、大文字で始
まるNumber、 Digi t。
Using this rule, 1 is one, 10 is ten, I
11 one hundred and elevated
It can be converted as n. Here, the Number that starts with a capital letter, Digit.

Digits、 Digi tloはそれぞれ構文要素
名であり、p OSは先頭数字の桁位置を表わす属性名
、outはこれらの構文要素の変換結果を表わす属性名
である。
Digits and Digitlo are syntax element names, p OS is an attribute name representing the digit position of the first digit, and out is an attribute name representing the conversion result of these syntax elements.

一つの入力全体を表わす構文要素Numberのout
属性がその入力の変換結果を表わす。入力された数字の
桁位置を表わす属性posは、入力の解析中に生成され
るものであり、この規則例ではpos=1.POS=2
. pO3=3のいずれかによってそれぞれに対応する
規則を選ぶのに使っている。
out of the syntax element Number that represents one entire input
An attribute represents the result of converting that input. The attribute pos indicating the digit position of the input number is generated during input analysis, and in this rule example, pos=1. POS=2
.. It is used to select the corresponding rule depending on one of pO3=3.

規則群31は1桁から3桁迄の数字全体を表わす構成要
素Numberに対する規則を示し、規則群32は1桁
目の数を表わす構成要素D 1g1tに対する規則を示
し、規則群33は、2桁目の数を表わす構成要素D 1
g1ts [pos・21に対する規則を示し、規則群
34は、10台の数を表わす構成要素Di(BitIO
に対する規則を示し、規則群35は、3桁目の数を表わ
す構成要素に対する規則を示す。
Rule group 31 shows the rules for the component Number, which represents the entire number from 1 to 3 digits, rule group 32 shows the rules for the component D1g1t, which represents the first digit, and rule group 33 shows the rules for the component D1g1t, which represents the whole number from 1 to 3 digits. Component D1 representing the number of eyes
g1ts [The rules for pos・21 are shown, and the rule group 34 is the component Di (BitIO
Rule group 35 shows rules for the component representing the third digit number.

構文要素の属性としては、本実施例では桁数を表わすr
pOsJがある。規則群31と33.35では、属性p
osの何が何であるかが、その規則群が選択されるか否
かあるいはその規則群のうちのどの規則が選択されるか
を左右するので、7それらの属性が明示的に書かれてい
る。しかし、規則群32.34では、pos属性は規則
の選択に影響しないので、規則の上では明示的に書かれ
ていない。このように、規則の記述に当っては、規則の
選択に直接関係する属性指定のみを書けばよい。
In this example, the attribute of the syntax element is r, which represents the number of digits.
There is pOsJ. In rule groups 31 and 33.35, the attribute p
Since what is in the os determines whether or not the rule set is selected or which rule in the rule set is selected, 7 those attributes are written explicitly. . However, in rule group 32.34, the pos attribute does not affect the selection of rules, so it is not explicitly written on the rules. In this way, when writing a rule, it is only necessary to write attribute specifications that are directly related to the selection of the rule.

規則群31の各規則では、posl、pos2゜pos
3という属性指定を構文要素の指定D 1g1tやDi
gitsと同等にパタン照合用の指定として扱っている
In each rule of rule group 31, posl, pos2゜pos
The attribute specification 3 is syntactic element specification D 1g1t or Di
It is treated as a specification for pattern matching in the same way as gits.

第4図は、第3図の規則群を、内部処理しやすいよう、
規則編集部2によって編成し直して作った内部表現を示
す。この例では、丸枠内の記号51゜53.55,57
.59は規則の左辺の構文要素名を表わし、結線52.
54. 56. 5B、 60゜62.64等は入力に
よる場合分けを表わす。結線上の記号は各場合に対応す
る入力記号を表わし、かっこ内の文71,72,73,
74,75,76゜77.78,81,82,83.8
4等は対応する規則が適用された時の処理を表わす行為
文である。下線つき記号61,63,65.66は、別
の部分53.55で定義された構成要素が入力としてそ
の位置にくることを表わす。計算機内部における具体表
現としては、結線はそれにつながる情報の記載位置を示
すポインタ、行為文は行為文の内部表現の位置を示すポ
インタ、構文要素名は文字列、丸枠内の構成要素は、そ
の構成要素に対する規則群の記載位置を示すポインタで
表わされる。
Figure 4 shows the rule group in Figure 3 for easy internal processing.
The internal representation created by reorganization by the rule editing section 2 is shown. In this example, the symbol inside the circle frame is 51°53.55,57
.. 59 represents the name of the syntax element on the left side of the rule, and the connection line 52.
54. 56. 5B, 60°62.64, etc. represent case classification based on input. The symbols on the connections represent the input symbols corresponding to each case, and the sentences in parentheses 71, 72, 73,
74, 75, 76° 77.78, 81, 82, 83.8
4 and the like are action sentences that represent the processing when the corresponding rule is applied. The underlined symbols 61, 63, 65.66 represent that a component defined in another portion 53.55 comes at that position as input. As a concrete representation inside the computer, a connection is a pointer that indicates the location of the information connected to it, an action sentence is a pointer that indicates the position of the internal representation of the action sentence, a syntax element name is a character string, and components inside a circle are the It is represented by a pointer indicating the position of the rule group relative to the component.

第5図は、第3図の規則群の検証のために検証用ファイ
ル7に登録しである入力例とそれに対応する出力を示す
FIG. 5 shows an input example registered in the verification file 7 for verifying the rule group shown in FIG. 3 and the corresponding output.

規則群の適用は、入力の全体を表わす構文要素名を左辺
とする規則と入力の先頭部分との照合から始める。この
例では、Numberを左辺とする規則と入力を照合す
るところから始める。
Application of a rule group starts with matching the rule whose left side is the syntactic element name representing the entire input with the first part of the input. In this example, we start by matching the input with a rule whose left side is Number.

第4図のように表現された第3図の規則群によって第5
図の人力例がどのようにして対応する出力へと変換され
るかを具体的に説明する。1という数字の入力に対して
は、先頭の桁位置が1なので、Numberを左辺とす
る規則群、すなわちNumber51の下につながる規
則群のうち、pos= 1の結線52につながる規則と
照合し、入力記号を1とする規則71が適用され、D 
1g1t、outの値がone″となり、それがDig
itに対する行為文81によってNumberのout
属性へ伝播され、出力”one″が得られる。10とい
う数字の入力に対しては、先頭の桁位置が2なので、N
umberの下のpos= 2の枝54につながる規則
群との照合に絞るが、第1文字が1なので、Digit
lOの規則群59が選ばれる。その次の入力記号がOな
ので、規則73が選ばれ、DiHitl O9o u 
t −” t e n”となり、それがDiI!its
、  o u 5 Number、  o u tへと
イ云播されて最終出力” t e n ”が得られる。
By the rule group in Figure 3 expressed as in Figure 4, the fifth
We will specifically explain how the human input example in the figure is converted into the corresponding output. When inputting the number 1, the first digit position is 1, so it is compared with the rule that connects to the connection 52 with pos=1 out of the rule group with Number as the left side, that is, the rule group that connects under Number 51, Rule 71 with the input symbol as 1 is applied, and D
1g1t, the value of out becomes one'', which is Dig
Number out by act sentence 81 for it
It is propagated to the attribute and the output "one" is obtained. For inputting the number 10, the first digit position is 2, so N
We will narrow down the matching to the rule group connected to the branch 54 of pos = 2 under amber, but since the first character is 1, Digit
A set of rules 59 for lO is selected. Since the next input symbol is O, rule 73 is selected and DiHitl O9o u
t - “t e n” and that is DiI! Its
, o u 5 Number, and o u t to obtain the final output "ten".

11゜12 、−−−−−−−−−、 19という入力
例についても同様にして、出力”eleven”、 ”
 twe l ve” 、−、“n1neteen”が
得られる。21という数字の入力に対しては、pos=
 2の枝54につながるDigits (pos=2)
の規則群55が選ばれたあと、最初の入力記号が2なの
で2に対する結線60をたどり、次の入力記号にはD 
1g1tという構成要素61の規則を適用する。又、D
 1g1tの規則群53の・うちからは、次の入力記号
1をみて71の規則を選び、まずDigit。
Similarly, for the input examples 11゜12, ------------, 19, the outputs are "eleven", "
twe l ve", -, "n1neteen" is obtained. For the input of the number 21, pos=
Digits connected to branch 54 of 2 (pos=2)
After the rule group 55 is selected, the first input symbol is 2, so the connection 60 for 2 is traced, and the next input symbol is D.
Apply the rule for component 61: 1g1t. Also, D
From the rule group 53 of 1g1t, select rule 71 by looking at the next input symbol 1, and first Digit.

o u t−”one″ よし、75の式D 1g1t
 s 、 out成し、それをNumber、outへ
と伝播して出力″twen tyo n e ”を得る
。同様にして、32,43、=−−−−298という入
力に対して、それぞれ“thirty two”。
o u t-”one” Okay, 75 formula D 1g1t
s, out and propagates it to Number, out to obtain the output "twentyone". Similarly, for the inputs 32, 43, =----298, "thirty two" respectively.

tourty three″l ’−”−”l“n1n
ety eight″が得られる。111という入力に
対しては、先頭桁位置が3なのでpos= 3の技56
をたどってD 1g1ts [p os−31の規則群
57を選び、第1文字力月なので入力が1の技62をた
どり、第2〜3文字に対してDigits  (pos
=2)という構成要素63に対する規則群55を適用す
る。111に対してはDigitDigits (po
s=2 〕の結線64の規則を適用することも可能であ
るが、それらは第1文字に対してD jgi tという
1〜9のいずれにも合う規定の仕方をしているのに対し
、結線62の規則は第1人力文字が1であるとより明確
に規定しているので、結線62の規則を優先する。第2
〜3文字に対しては、Digits (pos=2)の
規則群55のうちから74を選んで”eleyen″を
得、D 1g1ts、1.out:それをNumber
、outへ伝播して最終出力とする。
tourty three"l '-"-"l"n1n
ety eight" is obtained. For the input 111, the first digit position is 3, so pos = 3 technique 56
, select the rule group 57 of D 1g1ts [pos-31, trace the technique 62 whose input is 1 because it is the first character, and select Digits (pos
The rule group 55 for the component 63 with =2) is applied. DigitDigits (po
It is also possible to apply the rules for the connection 64 of s=2], but these rules specify that the first character is D jgi t, which matches any of 1 to 9. Since the rule for connection 62 more clearly stipulates that the first human character is 1, priority is given to the rule for connection 62. Second
For ~3 characters, select 74 from rule group 55 of Digits (pos=2) to get "eleyen", D 1g1ts, 1. out: Number it
, out to become the final output.

ここで、Digits、1はこの規則の記述において第
1番目に現われるDigitsを表わし、D 1g1t
s、 2は第2番目に現われるものを表わす。
Here, Digits, 1 represents the first Digits that appears in the description of this rule, and D 1g1t
s, 2 represents the second occurrence.

次に、使用者が200という入力を与えると、規則適用
部3はまずDigits (pos=3 〕::=Di
gitDigits  (pos=2 )の規則64を
選び、第1文字にDigitの規則群53、第2〜3文
字にDigits(pos= 2 )の規則群55を適
用しようとし、D 1g1tでは第1文字が2なので規
則72によってDigits。
Next, when the user inputs 200, the rule application unit 3 first inputs Digits (pos=3]::=Di
Select the rule 64 of gitDigits (pos=2) and try to apply the rule group 53 of Digit to the first character and the rule group 55 of Digits (pos=2) to the second and third characters, and in D1g1t, the first character is 2, so according to rule 72, Digits.

outを”two”とする。ところがD 1g1ts 
[pos= 2 ]の規則群55番こは第2文字である
Oに対応する選択肢が見つからないという異常が検出さ
れる。そこで制御部1は誤り表示部5を起動し、200
という入力を検証用ファイル7に登録したのち、使用者
に対して、規則の選択開始から停止に至る迄の過程を第
6図のように表示し、規則群に不備のあることを示し、
規則の修正を促す。それを見て使用者は規則編集部2を
起動して2つの規則DLgits  (pos=2 )
 ::= ODigit ;do; Digits、o
ut:= Digit、out; end;Digit
::= O; do; Digit、out:=””;
 end;を追加する。保留されている200という入
力に対してこの改訂された規則群を適用すると、出力”
 two hundred ’and″が得られ、誤り
処理部5ばこれでよいか否かの確認を求める。使用者は
まだ異常のあることに気づき、さらに2つの規則Dig
its  (pos=3 ) ::−100;do; 
D 1g1ts、out:=″0(,6hundred
”;end;Digits  (pos=3 ) ::
=Digit、 00 ;を追加する(規則ファイルの
更新)。誤り処理部5は保留されている200という入
力に対して新しい規則群を適用し、出力“’two h
undreds”を得て、正否の確認を求める。使用者
が正しい旨の回答を与えると、”two hundre
ds”が200に対する出力として検証用ファイル7に
登録される。また、使用者は20.30等の入力に対し
て同様の誤りがあってはならないと思い、入力例として
の20とその出力“” twen ty”を検証用ファ
イルに登録する(検証ファイルの更新)。
Let out be "two". However, D 1g1ts
In rule group No. 55 of [pos=2], an abnormality is detected in which an option corresponding to the second character O is not found. Therefore, the control unit 1 starts the error display unit 5 and
After registering this input in the verification file 7, the process from the start of rule selection to the stop is displayed to the user as shown in Figure 6, indicating that there is a defect in the rule group,
Promote amendments to the rules. Seeing this, the user starts the rule editing section 2 and creates two rules DLgits (pos=2).
::= ODigit ;do; Digits, o
ut:= Digit, out; end; Digit
::= O; do; Digit, out:=””;
Add end; Applying this revised set of rules to a pending input of 200 results in the output "
Two hundred 'and'' is obtained, and the error processing unit 5 asks for confirmation whether this is correct.The user notices that there is still an abnormality and adds two more rules.
its (pos=3) ::-100;do;
D 1g1ts, out:=″0(,6hundred
”;end;Digits (pos=3) ::
=Digit, 00; is added (updating the rule file). The error processing unit 5 applies a new set of rules to the pending input 200, and outputs "'two h
undreds" and asks for confirmation of correctness. If the user gives a correct answer, "two hundreds" is obtained.
ds" is registered in the verification file 7 as the output for 200. Also, the user thinks that there should be no similar error for inputs such as 20.30, and so the user registers 20 as an input example and its output " “twenty” is registered in the verification file (verification file update).

規則ファイル6または検証用ファイル7の内容が更新さ
れると制御部1は規則検証部4′を起動する。規則検証
部4の中には、確認手段の主要部が含まれ、この確認手
段は、制御部1が規則適用部2によって規則検証部4を
支援することにより、結果の確認を行なうようになって
いる。規則検証部4は、検証用ファイル7の各入力例に
対して規則ファイルの規則群を適用し、検証用ファイル
に登録されている出力が得られるか否か調べてゆくが、
上記の更新内容に対しては不一致が生じないので使用者
への警告は行わない。規則ファイル6の内容を追加・修
正したとき、規則検証部4による自動検証の結果、誤り
が検出されなければ、使用者に「規則更新内容は検証用
入出力例と矛盾しない」旨の表示を自動的に行なう。
When the contents of the rule file 6 or the verification file 7 are updated, the control section 1 activates the rule verification section 4'. The rule verification section 4 includes a main part of a confirmation means, and this confirmation means is configured so that the control section 1 supports the rule verification section 4 by the rule application section 2 to confirm the result. ing. The rule verification unit 4 applies the rule group of the rule file to each input example of the verification file 7, and checks whether the output registered in the verification file is obtained.
Since no discrepancy occurs with the above updated contents, no warning is given to the user. When adding or modifying the contents of the rule file 6, if no errors are detected as a result of automatic verification by the rule verification unit 4, a message is displayed to the user stating that ``the updated rules do not contradict the verification input/output example.'' Do it automatically.

次に、別の使用者が入力として0を与えるとD 1g1
t:: = O;do; D 1g1t、out:=”
”;end;の規則が選択され、出力は空白となる。そ
の使用者は異常に気づいて誤りがある旨の指示を与える
と、誤り処理部5が起動され、0を検証用ファイルの入
力例として登録し、答を得るに至った規則適用過程を第
7図のように表示する。使用者はそれを見て、Digi
tの規則群のうち入力がOに対する規則が誤っていると
思い、その規則をD igi t: : = 0 ;d
o; D 1(Bit、out:=”zero”;en
dHと変えたとする。誤り処理部は保留されている入力
としてのOに対して規則群を適用し、出力として”ze
ro“″を得る。使用者がそれで正しい旨の指示を与え
ると、0に対する出力として’zero”が検証用ファ
イル7に登録される(検証ファイル更新)。
Next, if another user gives 0 as input, D 1g1
t:: = O;do; D 1g1t, out:=”
”;end; rule is selected and the output is blank. When the user notices the abnormality and gives an instruction that there is an error, the error processing unit 5 is activated and 0 is input as an example of the verification file. The process of applying the rules that led to the answer is displayed as shown in Figure 7.The user sees this and uses Digi.
Among the rules for t, I think that the rule for input O is wrong, so I write that rule as Digi t: : = 0 ;d
o; D 1 (Bit, out: = “zero”; en
Suppose you change it to dH. The error handler applies the rules to O as the pending input, and outputs "ze" as the output.
Get ro"". When the user gives an instruction that it is correct, 'zero' is registered in the verification file 7 as an output for 0 (verification file update).

規則ファイルと検証用ファイルの内容が更新されたので
規則検証部4が自動的に起動されるが、入力例の20に
対する出力が“twenty zero”となり、登録
されているものと異なる旨、第8図のように表示する。
Since the contents of the rule file and the verification file have been updated, the rule verification unit 4 is automatically started, but the output for input example 20 is "twenty zero", and the 8th Display as shown.

そこで使用者は、1桁の数に対するD 1g1tと、複
数桁の中の数字に対するD 1g1tの規則が同一では
うまくゆかないことに気づき、Number::= p
os=L  DigitO;doHNumbe’r、o
ut:=DigitO、out; end;D 1g1
t O: :=0;do; D igi to、out
:=″ze、ro”;end;DigitO::= D
igit; ’do; Digito、Out:=Di
git、outHend;と規則を訂正する(規則ファ
イル更新)。これは、複数桁の中の数字に対してはDi
gitの規則群を適用するが1桁の数字に対してはDi
gitOの規則群を適用すること、DigitOの規則
群は入力がOのときは出力をzero”とするがその他
の入力のときはD 1g1tの規則群を適用することを
表わしている。
Then, the user realized that it would not work if the rules for D 1g1t for single-digit numbers and D 1g1t for numbers in multiple digits were the same, and Number::= p
os=L DigitO; doHNumbe'r, o
ut:=DigitO, out; end; D 1g1
t O: :=0;do; Digi to, out
:=″ze,ro”;end;DigitO::=D
igit; 'do; Digito, Out:=Di
git, outHend; and correct the rule (update the rule file). This means that Di for numbers in multiple digits.
git rules are applied, but for single digit numbers Di
This indicates that the gitO rule group is applied, and the DigitO rule group sets the output to zero when the input is O, but applies the D1g1t rule group for other inputs.

規則ファイル6が更新されたので規則検証部4がまた起
動されるが、検証用ファイルに登録されているすべての
入力例に対して規則検証時の出力と検証用ファイルの登
録された出力との間の不一致は生じないことが確認され
る。このようにして作った3桁迄の数字の英語読み変換
規則群の出来上りを第9図に示し、それを内部表現形式
に変えたものを第10図に示す。第9図及び第10図を
第3図及び第4図と比較すると、追加・修正された部分
がわかるであろう。
Since the rule file 6 has been updated, the rule verification unit 4 is started again, but for all the input examples registered in the verification file, the output at the time of rule verification and the output registered in the verification file are It is confirmed that there is no discrepancy between the two. FIG. 9 shows the resultant set of English reading conversion rules for numbers up to three digits created in this way, and FIG. 10 shows the result converted into an internal representation format. By comparing FIGS. 9 and 10 with FIGS. 3 and 4, added and modified parts will be apparent.

第11図は本実施例を搭載した情報処理装置の構成を示
す図である。これは、制御部1や規則編集部2.規則適
用部3.規則検証部4.誤り処理部5の処理を実行する
中央処理装置191と、その過程で情報を蓄えるのに使
う主記憶装置192゜ff1則ファイル6、検証用ファ
イル7、ならびに使用者からの入力と使用者への出力の
機能を果す入出力端末193とから成る。
FIG. 11 is a diagram showing the configuration of an information processing device equipped with this embodiment. This is done by the control section 1 and the rule editing section 2. Rule application part 3. Rule verification section 4. A central processing unit 191 that executes the processing of the error processing unit 5, and a main storage device 192 used to store information in the process. It consists of an input/output terminal 193 that performs an output function.

第12図は、本実施例において処理の中核となる規則適
用部の処理内容を示すフローチャー1・である。第2図
に示した形で書かれた規則群が与えられたとき、規則フ
ァイルのこれらの規則群を適用する過程を以下に説明す
る。規則群で示された入力構成要素名のうちの入力全体
を表わす構成要素名(第10図ではNumber )を
まず規則適用部の中に設けたスタッカヘスタックしくス
テップ201)、入力の第1記号をとりだす(ステップ
202)。
FIG. 12 is a flowchart 1 showing the processing contents of the rule application section which is the core of the processing in this embodiment. Given a set of rules written in the form shown in FIG. 2, the process of applying these set of rules in the rule file will be described below. Among the input component names shown in the rule group, the component name (Number in FIG. 10) representing the entire input is first stacked into the stacker provided in the rule application section (step 201), and the first symbol of the input is stacked. (step 202).

そして、スタッカの最上端(トップ)にある記号をとり
だしくステップ203)、それが入力記号(本実施例で
は数字)を表わすものか構成要素名(Number、 
 Digit、  Digits等)を表わすものかを
判定しくステップ204)、構成要素名(例えばNum
ber )であればそれに訪問ずみの印をつけ(ステッ
プ21OLその構成要素の下位構成を表わす構成パタン
、すなわち第2図における記号ユニ・の右辺をスタッカ
へ逆向きにスタックしくステップ211L下位構成要素
へ渡す属性の算定を行なう(ステップ212)。スタッ
カのトップ記号が入力記号であれば、それが現入力記ぢ
と一致するか否か調べ(ステップ205)、一致しなげ
ればエラー処理をしくステップ209)、一致していれ
ばその入力記号の属性を算定しくステップ206)、そ
の入力記号をスタッカから取除いたあと(ステップ20
7)、次の入力記−号をとりだす(ステップ208)。
Then, select the symbol at the top of the stacker (step 203), and select whether it represents an input symbol (in this example, a number) or the component name (Number,
Digit, Digits, etc.)), step 204), and the component name (for example, Num
ber), mark it as visited (Step 21OL). Stack the configuration pattern representing the lower configuration of that component, that is, the right side of the symbol UNI in FIG. Calculate the attributes to be passed (step 212). If the top symbol of the stacker is an input symbol, check whether it matches the current input entry (step 205), and if it does not match, perform error handling and step 209), and if they match, calculate the attributes of the input symbol (step 206), and then remove the input symbol from the stacker (step 20).
7), the next input symbol is taken out (step 208).

次に、スタッカのトップ記号が訪問ずみの印のついた構
成要素名であれば(ステップ213Lその属性を算定し
くステップ214)、その構成要素をスタッカから取除
く (ステップ215)。
Next, if the top symbol of the stacker is the name of a component with a visited mark (step 213L, calculate its attributes, step 214), remove that component from the stacker (step 215).

これをスタッカが空になるまで繰返す(ステップ216
)。
This is repeated until the stacker is empty (step 216).
).

本実施例によれば、あらゆる場合を想定した完全な規則
群を作らなくても、わかっている範囲内の入力の条件に
対応する規則群を作ればすくに処理を実行でき、うまく
扱えない例が発生ずるとそれに合わせて規則群を拡充し
てゆけるので、情報処理システムを段階的に精細化し拡
充することが容易になる効果がある。また、新しい規則
や入力例を登録するごとに規則群や入力側全体としての
不整合の有無を自動的に調べ、誤りがあれば訂正を求め
るので、規則適用型の情報処理システムの首尾一貫性を
保持して信頼性を向上させる効果がある。異常の検出さ
れた入力は、以後の規則の追加・修正のさいに自動的に
検査の対象とされるので、類似誤りを防止する効果があ
る。異常検出時には、異常な結果を得るに敗る迄の規則
適用過程を表示するので、異常の発生しないように規則
群を訂正することが容易になる効果がある。
According to this embodiment, even if you do not create a complete set of rules assuming all cases, you can easily execute the process by creating a set of rules that correspond to input conditions within a known range, and cases that cannot be handled well. When a problem occurs, the rule group can be expanded accordingly, which has the effect of making it easy to refine and expand the information processing system step by step. In addition, each time a new rule or input example is registered, it automatically checks whether there are any inconsistencies in the rule group or the input side as a whole, and requests correction if there is an error, which improves the consistency of rule-based information processing systems. This has the effect of retaining and improving reliability. Inputs in which an abnormality has been detected are automatically subject to inspection when adding or modifying rules thereafter, which has the effect of preventing similar errors. When an abnormality is detected, the rule application process up to the point where an abnormal result is obtained is displayed, which has the effect of making it easier to correct the rule group so that the abnormality does not occur.

入力を処理する規則は、入力の構文パタンのみでなく属
性を指定することにより、その入力パタンかどのような
入力構造の中でどのような条件下で使われたかによって
処理仕方を変えられるので、構文のみでなく意味情報を
とり入れた文脈対応の処理を指定可能とする効果がある
。また、属性つき構文要素や属性指定を1つの構文要素
と同等に扱ってパタン照合することにより、文脈依存な
パタン照合を構文解析と同様の方法で実現できるので、
規則適用の処理系を単純化できる効果がある。
By specifying not only the syntactic pattern of the input but also its attributes, rules for processing input can change the processing method depending on what kind of input structure and under what conditions the input pattern is used. This has the effect of making it possible to specify context-sensitive processing that incorporates not only syntax but also semantic information. In addition, by treating a syntax element with an attribute or an attribute specification as the same as a single syntax element and performing pattern matching, context-dependent pattern matching can be achieved in the same way as syntax analysis.
This has the effect of simplifying the processing system for applying rules.

構文要素の属性指定においては、その構文要素の持つ属
性全部ではなく、各パタンごとにそのパタンの識別に必
要な属性のみを指定すればよいので、規則の無用な細分
化を避けられる効果がある。
When specifying the attributes of a syntax element, it is necessary to specify only the attributes necessary for identifying each pattern for each pattern, rather than all the attributes that the syntax element has, which has the effect of avoiding unnecessary fragmentation of rules. .

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

以上詳述したとおり、本発明の規則検証型情報処理シス
テムによれば、規則ファイルに加え、種々の典型的な入
力例とそれに対する出力の対を収納する検証用ファイル
を設けるとともに、規則ファイル及び検証用ファイルの
一方又は双方を更新する手段、及び、更新時に規則ファ
イルの規則群を検証用ファイルに収めた入力例の各々に
適用して前記検証用ファイルに収められている対応する
出力と比較し、不一致を検出する確認する手段を設けた
ので、最初から完全な規則群を作成しなくても、既知の
範囲の入力条件に対応する規則群を作ることで処理を実
行でき、不適合例が生じれば規則群を更新(追加・拡充
)してその都度更新された規則群や入力例の全体として
の整合性の有無を自動的に調べ、誤りがあれば訂正を促
して更に総合的な首尾一貫性を保持しながら規則群を書
き替え書き促して、より綿密な高精度の広範囲に迫るシ
ステムを作成して行くことができる等、優れた効果を奏
する。
As described in detail above, according to the rule verification type information processing system of the present invention, in addition to the rule file, there is provided a verification file that stores pairs of various typical input examples and their corresponding outputs. means for updating one or both of the verification files, and applying a rule group of the rule file to each of the input examples stored in the verification file at the time of updating and comparing with the corresponding output stored in the verification file; However, we have provided a means to detect and confirm inconsistencies, so you can execute processing by creating a rule group that corresponds to a known range of input conditions, without having to create a complete rule group from the beginning, and you can eliminate nonconforming examples. If errors occur, the rule group is updated (added/enhanced), and the updated rule group and input examples are automatically checked for consistency as a whole, and if errors are found, corrections are prompted to make the process more comprehensive. It has excellent effects, such as encouraging the rewriting of rule groups while maintaining consistency, allowing the creation of a more thorough, highly accurate, and wide-ranging system.

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

第1図は本発明の規則検証型情報処理システムの一実施
例の構成図、第2図は第1図の実施例に適用される規則
の表現形式を示す図、第3図は第2図の規則に従って書
かれた規則群の一例で数字の英語読み規則群を示す図、
第4図は第3図の規則群の内部表現例を示す図、第5図
は検証用ファイルの内容の一例を示す図、第6図は規則
群と入力の不一致に対する警告の一例を示す図、第7図
は規則適用経歴の表示例を示す図、第8図は検証用ファ
イルに基づく不備の検出例を示す図、第9図は第3回の
規則群に対する改訂後の規則群を示す図、第10図は第
9図の内部表現例を示す図、第11図は本発明の規則検
証型情報処理システムを搭載した計算機システムのブロ
ック図、第12図は規則適用部のフローチャートである
。 1−−−−−−一制御部、2−一−−−−−規則編集部
、3・−・−規則適用部、4−−−−一規則検証部、5
−−−一−−誤り処理部、6−−−−規則ファイル、7
−−−−−検証用ファイル、11一=−−−−−規則改
訂人力、12−−−−一検証用入出力例、13−−−−
−−−実行用入力、14−−−−一出力結果、15−−
−−−−誤り表示、16−−−−−修正促し、17−−
−−−−経歴表示、31〜35−一−−−−数字の英語
読みのための規則群、51、 53. 55. 57.
 59−−−−−一構成要素とその規則群、52,54
,56,58,60,62゜64−一一−−−−人力の
場合分けに対する適用規則を示す結線、61. 63.
 65. 66.−−−−一定義済み構成要素、71〜
78.81〜811−−−−−・−規則適用に伴う行為
文を示す式、191−−−−−一中央処理装置、192
−−−−−一主記憶装置、193−−−一人出力端末。 代理人 弁理士  武 顕次部(外1名)(第1図 第 2 因
FIG. 1 is a block diagram of an embodiment of the rule verification type information processing system of the present invention, FIG. 2 is a diagram showing the expression format of rules applied to the embodiment of FIG. 1, and FIG. A diagram showing a group of English reading rules for numbers as an example of a group of rules written according to the rules of
Figure 4 is a diagram showing an example of internal representation of the rule group in Figure 3, Figure 5 is a diagram showing an example of the contents of a verification file, and Figure 6 is a diagram showing an example of a warning for mismatch between the rule group and input. , Figure 7 shows an example of displaying the rule application history, Figure 8 shows an example of defect detection based on the verification file, and Figure 9 shows the revised rule group for the third rule group. 10 is a diagram showing an example of internal representation in FIG. 9, FIG. 11 is a block diagram of a computer system equipped with the rule verification type information processing system of the present invention, and FIG. 12 is a flowchart of the rule application section. . 1-----1 control section, 2-1--rule editing section, 3.--rule application section, 4-----1 rule verification section, 5
---1--Error processing unit, 6-----Rules file, 7
------Verification file, 11-----Revision of rules manually, 12-----1 Verification input/output example, 13-----
--- Input for execution, 14 --- One output result, 15 ---
---Error display, 16-----Prompt for correction, 17--
----- History display, 31-35-1 ----- Rules for reading numbers in English, 51, 53. 55. 57.
59----One component and its rule group, 52, 54
, 56, 58, 60, 62゜64-11---Connection showing applicable rules for manual case classification, 61. 63.
65. 66. ----One predefined component, 71~
78.81~811--Formula showing action sentence accompanying rule application, 191--Central processing unit, 192
-----One main storage device, 193---One output terminal. Agent: Patent attorney Kenjibu Take (1 other person) (Figure 1, No. 2)

Claims (1)

【特許請求の範囲】 1、データ処理の規則群を収納した規則ファイルと、与
えられた入力に適合する規則を前記規則ファイルから探
し出して入力を処理する規則適用部とを有する規則検証
型情報処理システムにおいて、種々の典型的入力例とそ
れに対する出力の対を収納する検証ファイルと、前記規
則ファイル及び前記検証ファイルのいずれか一方又は双
方を更新する更新手段と、前記更新があつたときに前記
検証用ファイルに収納された入力例の各々に対して前記
規則ファイルの規則群を適用して前記検証用ファイルに
収納されている対応する出力と比較し、不一致を検出す
る確認手段とを備えたことを特徴とする規則検証型情報
処理システム。 2、前記規則ファイルの規則群に適合しない入力が与え
られたときに、規則ファイルと該適合しない入力の不一
致を告知する手段と、前記適合しない入力を前記検証用
ファイルに収納する手段とを備え、前記規則ファイルの
改訂を促すように構成したことを特徴とする請求項1記
載の規則検証型情報処理システム。 3、前記規則ファイルの規則群、該規則群を適用する検
証ファイルの入力例、及び、与えられた入力に対して予
期された結果が得られないときに、結果を得るに至る迄
、あるいは、規則の適用を停止する迄、規則適用過程を
表示する手段を備えたことを特徴とする請求項1又は2
記載の規則検証型情報処理システム。 4、前記規則ファイルに収納する各々の規則は、属性指
定付き構成要素のパターン記述による規則適用条件と、
規則適用時のデータ処理操作の組合せによつて指定され
るように構成したことを特徴とする請求項3記載の規則
検証型情報処理システム。 5、前記規則ファイルの規則適用条件を指定する際に、
構文要素の属性指定は、該規則の選択に直接関係する属
性の指定にのみに絞られ、又、前記属性指定はパタン照
合用の対象として構文要素の指定と同等に扱われるよう
に構成したことを特徴とする請求項4記載の規則検証型
情報処理システム。
[Claims] 1. Rule verification type information processing that includes a rule file that stores a group of rules for data processing, and a rule application unit that searches the rule file for a rule that matches a given input and processes the input. In the system, a verification file storing pairs of various typical input examples and their corresponding outputs; updating means for updating either or both of the rule file and the verification file; and confirmation means for applying a rule group of the rule file to each input example stored in the verification file and comparing it with a corresponding output stored in the verification file to detect a discrepancy. A rule verification type information processing system characterized by: 2. When an input that does not conform to the rule group of the rule file is given, means for notifying the mismatch between the rule file and the input that does not conform, and means for storing the input that does not conform to the verification file. 2. The rule verification type information processing system according to claim 1, wherein the rule verification type information processing system is configured to prompt revision of the rule file. 3. A rule group of the rule file, an input example of a verification file to which the rule group is applied, and when the expected result is not obtained for the given input, until the result is obtained, or, Claim 1 or 2 characterized by comprising means for displaying the rule application process until the application of the rule is stopped.
The described rule verification type information processing system. 4. Each rule stored in the rule file includes a rule application condition based on a pattern description of a component with attribute specification;
4. The rule verification type information processing system according to claim 3, wherein the rule verification type information processing system is configured to be specified by a combination of data processing operations when rules are applied. 5. When specifying the rule application conditions of the rule file,
Attribute specifications of syntax elements are limited to those directly related to the selection of the rule, and the attribute specifications are treated as objects for pattern matching in the same manner as syntax element specifications. 5. The rule verification type information processing system according to claim 4.
JP63122058A 1988-05-20 1988-05-20 Rule inspection type information processing system Pending JPH01292537A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63122058A JPH01292537A (en) 1988-05-20 1988-05-20 Rule inspection type information processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63122058A JPH01292537A (en) 1988-05-20 1988-05-20 Rule inspection type information processing system

Publications (1)

Publication Number Publication Date
JPH01292537A true JPH01292537A (en) 1989-11-24

Family

ID=14826580

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63122058A Pending JPH01292537A (en) 1988-05-20 1988-05-20 Rule inspection type information processing system

Country Status (1)

Country Link
JP (1) JPH01292537A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8849968B2 (en) 2005-06-20 2014-09-30 Microsoft Corporation Secure and stable hosting of third-party extensions to web services

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8849968B2 (en) 2005-06-20 2014-09-30 Microsoft Corporation Secure and stable hosting of third-party extensions to web services

Similar Documents

Publication Publication Date Title
Javanbakht et al. Advanced finite element simulation with MSC Marc
Schwartz et al. Programming with sets: An introduction to SETL
US4853873A (en) Knowledge information processing system and method thereof
JP2008515078A (en) Automatic text correction
JPS6375835A (en) Apparatus for generating intended code, program, list and design document
Donat Automating formal specification-based testing
US7822621B1 (en) Method of and system for populating knowledge bases using rule based systems and object-oriented software
O’Neill et al. The formal verification of safety-critical assembly code
EP1099173A1 (en) Configuration description language system
JP2008276525A (en) Control program development support device for plc
JPH01292537A (en) Rule inspection type information processing system
US20230016615A1 (en) Artificial intelligence approach to solving industrial data transformation problems
JP6369177B2 (en) Development support program, development support method, and development support apparatus
Contractor et al. Improving program matching to automatically repair introductory programs
JP2018018197A (en) Source code evaluation program
Wilkin et al. Parallel communicating grammar systems with context-free components are Turing complete for any communication model
Burgess Compile-time error diagnostics in syntax-directed compilers
KR100290623B1 (en) A method of controlling data of database
JPH0756923A (en) Japanese sentence generating device capable of eliminating ambiguity
Contractor Improving the Flexibility of CLARA's Automated Matching and Repair Processes
Panthaplackel Facilitating software evolution through natural language comments and dialogue
Goldberg Reproduction in Whole or in Part is Permitted for any Purpose of the United States Government
JPH11296406A (en) Program correction supporting system
CN117406995A (en) Auxiliary method for code writing, online code editor, equipment and medium
CN117971534A (en) LLM model-based kernel defect repairing method