JPH01276237A - Selector for candidate term to be unified - Google Patents

Selector for candidate term to be unified

Info

Publication number
JPH01276237A
JPH01276237A JP63102609A JP10260988A JPH01276237A JP H01276237 A JPH01276237 A JP H01276237A JP 63102609 A JP63102609 A JP 63102609A JP 10260988 A JP10260988 A JP 10260988A JP H01276237 A JPH01276237 A JP H01276237A
Authority
JP
Japan
Prior art keywords
characteristic value
term
value
bits
bit
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.)
Granted
Application number
JP63102609A
Other languages
Japanese (ja)
Other versions
JPH0664534B2 (en
Inventor
Hiroshi Sakai
浩 酒井
Shigeki Shibayama
柴山 茂樹
Akihiko Nakase
仲瀬 明彦
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.)
National Institute of Advanced Industrial Science and Technology AIST
Original Assignee
Agency of Industrial Science and Technology
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 Agency of Industrial Science and Technology filed Critical Agency of Industrial Science and Technology
Priority to JP63102609A priority Critical patent/JPH0664534B2/en
Publication of JPH01276237A publication Critical patent/JPH01276237A/en
Publication of JPH0664534B2 publication Critical patent/JPH0664534B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE:To cause a term retrieval to be high-speed by detecting a term to be singled with a conditions term from the set of retrieval terms not to contain a variable. CONSTITUTION:Since a third characteristic value M is made into a mask pattern to mask the variable part of the conditions term, by executing the AND of a first characteristic value D and the third characteristic value M, a value, in which only a part corresponding to the variable part of the conditions term is replaced with O to the characteristic value D of the retrieval term, can be obtained. Consequently, the value of a constant part contained in the characteristic value D of the retrieval term remains as information as it is, and in comparison with a characteristic value Q of the conditions term, as to different constants, the difference can be detected. Thus, a probability that the term without a singling probability in fact is decided to have the singling probability by mistake can be widely reduced, and the term retrieval can be made high- speed.

Description

【発明の詳細な説明】 め集合から単一化候補項を選択する技術に関わり、特に
検索項及び条件項を所定ビットの特性値に変−換して単
一化可能性を検証する単一化候補項の選択装置に関する
DETAILED DESCRIPTION OF THE INVENTION It relates to a technique for selecting unification candidate terms from a set, and in particular, a unification method that converts search terms and conditional terms into characteristic values of predetermined bits to verify unification possibility. The present invention relates to a selection device for candidate items.

(従来の技術) 知識ベースシステム、ファイルシステム等においては、
変数を含む項データの単一化を伴う検索に際し、検索対
象を絞り込んで検索効率の向上を図るため、予め検索対
象となる項データの集合から検索項データと単一化可能
性のある単一化候補項を選択することが行われる。この
種の選択処理は、高速に行われることが前提条件となる
ため、従来より検索項データを高速演算処理に適した形
態に変換することが種々行われている。その一つにF 
E W (f’1eld encode word )
法が知られている(Wlse、M、J、、Powers
、D、MJ、、−Indexing PROLOGCl
auses via Superimposed Co
de word andField Encode W
ords’、In Proceeding of th
eIEEE C0nrerenCe Orl Logi
c PrOgrao+Ing、AtrantiC索項と
して、 f (a) f (a、X) f (a、  g (b) ) の3つの項が知識ベースに格納され、条件項として、 f (Y、b) が与えられたとする。なお、ここで各項を構成する要素
のうち、小文字で記述されたf、a、bは定数、大文字
で記述されたX、Yは変数であり、カッコ内の要素は、
左括弧の左に付された要素の引数である。
(Conventional technology) In knowledge base systems, file systems, etc.
When performing a search that involves unification of term data including variables, in order to narrow down the search target and improve search efficiency, we first select a unit that can be unified with the search term data from a set of term data to be searched. Then, selection of candidate terms is performed. Since this type of selection processing requires high-speed execution, various methods have been used to convert search term data into forms suitable for high-speed arithmetic processing. One of them is F
E W (f'1eld encode word)
The law is known (Wlse, M. J., Powers
,D,MJ,,-Indexing PROLOGCl
auses via Superimposed Co
de word and Field Encode W
Ords', In Proceedings of th
eIEEE C0nrerenCe Orl Logi
c PrOgrao+Ing, AtlantiC Three terms, f (a) f (a, Suppose that Note that among the elements constituting each term here, f, a, and b written in lower case letters are constants, X and Y written in upper case letters are variables, and the elements in parentheses are as follows.
This is the argument of the element attached to the left of the left parenthesis.

まず、これら検索項及び条件項は、それぞれ適当なビッ
ト数の特性値に変換される。これら特性値が例えば16
ビツトであるとすると、まず、検索項f (a)は、引
数が1つの関数fと定数aとから構成されるので、第3
図(a)に示すように、16ビツトのフィールドを例え
ば10ビツトと 6ビツトとに分割し、上位10ビツト
に関数fのアスキーコード66H(16進゛数表示)を
割当て、下位6ビー数Xとから構成されるので、第3図
(b)に示すよ□うに、16ビツトのフィールドを例え
ば 8ビツト、4ビツト及び 4ビツトに分割し、上位
 8ビツトに一関数fのアスキーコード66Hを割当て
、真中の4ビツトに定数aのアスキーコード6、IHの
下位4ビツトであるIHを割当て、更に変数Xに対応す
る下位4ビツトには全て1を割当てる。同様に、検索項
f (a、  g (b) )は、引数が2つの関数f
、定数a、引数が1つの定数g1及び定数すより構成さ
れるので、第3図(C)に示すように、16ビツトのフ
ィールドを例えば8ビツト、 4ビツト、 2ビツト及
び 2ビツトに分割し、上位 8ビツトに関数fのアス
キーコード66Hを割当て、次の4ビツトに定数aのア
スキーコード61Hの下位4ビツトであるIHを割当て
、以下、それに続く 2ビツト、2ビツトに、それぞれ
定数g、bのアスキーコードの下位2ビット3H,2H
をそれぞれ割当てる。これにより、各検索項の特性値1
゜2.3を得る。
First, these search terms and condition terms are each converted into characteristic values with an appropriate number of bits. For example, these characteristic values are 16
First, since the search term f(a) consists of a function f with one argument and a constant a, the third
As shown in Figure (a), a 16-bit field is divided into, for example, 10 bits and 6 bits, the ASCII code 66H (hexadecimal representation) of the function f is assigned to the upper 10 bits, and the lower 6 bits are As shown in Figure 3(b), the 16-bit field is divided into, for example, 8 bits, 4 bits, and 4 bits, and the ASCII code 66H of one function f is assigned to the upper 8 bits. , ASCII code 6 of the constant a and IH, which is the lower 4 bits of IH, are assigned to the middle 4 bits, and 1 is assigned to all the lower 4 bits corresponding to the variable X. Similarly, the search term f (a, g (b)) is a function f with two arguments
, constant a, and arguments are composed of one constant g1 and constant s, so we divide the 16-bit field into, for example, 8 bits, 4 bits, 2 bits, and 2 bits, as shown in Figure 3(C). , the ASCII code 66H of the function f is assigned to the upper 8 bits, IH, which is the lower 4 bits of the ASCII code 61H of the constant a, is assigned to the next 4 bits, and the following 2 bits are assigned the constant g, respectively. Lower 2 bits of ASCII code of b 3H, 2H
Assign each. As a result, the characteristic value 1 of each search term
Obtain ゜2.3.

一方、条件項f  (Y、b)は、引数が2つの関66
Hを割当て、変数Yに対応する真中の4ビツトには全て
0を割当て、下位4ビツトには定数bに対応するコード
2Hを割当てる。これにより条件項の特性値4を得る。
On the other hand, the conditional term f (Y, b) is a function 66 with two arguments.
H is assigned, all 0s are assigned to the middle 4 bits corresponding to the variable Y, and code 2H corresponding to the constant b is assigned to the lower 4 bits. As a result, characteristic value 4 of the conditional term is obtained.

このように各検索類及び条件項の特性値1〜4が得られ
たら、検索類の特性値をD1条件項の特性値をQとして
、DとQのビット毎の論理積結果とQとを比較する。こ
れにより、DAQ≠Qであれば、検索類と条件項とは単
一化可能性がないと判定する。たとえば、f (a)と
f (Y、b)とは、 00口1100110100001    (D )A
  0110011000000010  (Q )0
00(1000000(1000(10≠Qであるから
単一化可能性はないと判定される。また、検索類f (
a、X)と条件項f (Y、b)とは、 0110011000011111  (D )公′b
′)とは1 、  0110011000011110   (D 
)A   (H100I100OOOO口10    
(Q)11il 1・  0110011000000
010− Q−−1〜1.。
When characteristic values 1 to 4 of each search class and condition term are obtained in this way, the characteristic value of the search class is D1, the characteristic value of the condition term is Q, and the bitwise AND result of D and Q and Q are compare. As a result, if DAQ≠Q, it is determined that the search class and the conditional term cannot be unified. For example, f (a) and f (Y, b) are 00ku1100110100001 (D )A
0110011000000010 (Q)0
00(1000000(1000(10≠Q), so it is determined that there is no unification possibility. Also, the search class f (
a, X) and conditional term f (Y, b) are 0110011000011111 (D) public'b
') is 1, 0110011000011110 (D
)A (H100I100OOOO mouth 10
(Q) 11il 1・ 0110011000000
010-Q--1~1. .

となるから単一化可能性があると判定される。Therefore, it is determined that there is a possibility of unification.

しかしながら、最後の例についてみると、検索類f (
a、  g (b) )と条件項f (Y、b)とは、
それぞれの第2引数が明らかに異なるので、実際には、
単一化が不可能であるにも拘らず、単一化が可能である
と判定している。つまり、FEW法では、条件項の各要
素に対する特性値の計算において、要素が変数であって
対応するビットに0がセットされる場合と、要素が変数
でなく特性値の計算でたまたまビットに0がセットされ
る場合とが全く同一に取扱われるため、実際には、単一
化できないにも拘らず特性値による判定では単一化可能
であると判定されてしまうことが高い確率で発生する。
However, for the last example, the search class f (
a, g (b) ) and the conditional term f (Y, b) are
Since the second arguments of each are clearly different, in reality,
Even though unification is not possible, it is determined that unification is possible. In other words, in the FEW method, when calculating the characteristic value for each element of the conditional term, there are cases where the element is a variable and the corresponding bit is set to 0, and cases where the element is not a variable and the bit happens to be 0 when calculating the characteristic value. is treated in exactly the same way as the case where is set, so there is a high probability that it will be determined that unification is possible in the determination based on the characteristic value even though in reality it is not possible to unify.

このため、単一化候補の絞り込み効果が低く、項検索の
十分な高速化を図ることができないという問題があった
For this reason, there is a problem in that the effect of narrowing down unification candidates is low and it is not possible to sufficiently speed up the term search.

(発明が解決しようとする課題) でも単一化可能性を判定できる点で優れた方式であるが
、実際には単一化不可能なものまでを単一化可能である
と判定してしまう確率が高く、項検索を十分に高速化す
ることができないという問題があった。一方、検索の対
象となる検索類については変数が含まれない場合も実際
には多くある。
(Problem to be solved by the invention) Although this method is excellent in that it can determine unification possibility, in reality it judges things that cannot be unified as unification possible. There was a problem in that the probability was high and term retrieval could not be made sufficiently fast. On the other hand, there are actually many cases in which variables are not included in the search class that is the object of the search.

そこで、本発明は、このような検索類に変数が含まれな
い場合において、単一化候補項の十分な絞り込み効果が
期待できる単一化候補項の選択装置を提供することを目
的とする。
Therefore, an object of the present invention is to provide a selection device for unification candidate terms that can be expected to have a sufficient effect of narrowing down the unification candidate terms when such a search class does not include a variable.

[発明の構成〕 (課題を解決するための手段) 本発明の単一化候補項の選択装置は、定数のみから構成
される検索類から所定ビットの第1の特性値りを求める
第1の特性値算出手段と、定数及び/又は変数から構成
される条件項から前記第1の特性値りと同一ビットの第
2の特性値Qを求める第2の特性値算出手段と、前記条
件項から前記第1の特性値りと同一ビットの第3の特性
値Mを求める第3の特性値算出手段と、前記第1の特−
性がないと判定する判定手段とを具備している。
[Structure of the Invention] (Means for Solving the Problems) The unification candidate term selection device of the present invention includes a first method for determining a first characteristic value of a predetermined bit from a search class consisting only of constants. a characteristic value calculation means, a second characteristic value calculation means for calculating a second characteristic value Q of the same bit as the first characteristic value from a condition term consisting of constants and/or variables; a third characteristic value calculation means for calculating a third characteristic value M of the same bit as the first characteristic value;
and determining means for determining that there is no gender.

:ここで、前記第1の特性値りは、前記検索類の  □
構造に応じてビットフィールドを分割し、各分割−,フ
ィールドに当該検索項の各要素の数値変換値を対応させ
た値であり、前記第2の特性値Qは、前記条件項の構造
に応じてビットフィールドを分割し、定数要素が対応す
る分割フィールドに当該定数要素の数値変換値を対応さ
せ、変数要素が対応する分割フィールドの全ビットに0
を対応させた値であり、前記第3の特性値Mは、前記検
索類の構造に応じてビットフィールドを分割し、定数要
素が対応する分割フィールドの全ビットに1を対応させ
、変数要素が対応する分割フィールドの全ビットにOを
対応させた値である。
:Here, the first characteristic value is the search type □
The bit field is divided according to the structure, and each divided field is associated with the numerical conversion value of each element of the search term, and the second characteristic value Q is divided according to the structure of the condition term. Divide the bit field, make the numeric conversion value of the constant element correspond to the divided field to which the constant element corresponds, and set all bits of the divided field to which the variable element corresponds to 0.
The third characteristic value M is a value in which the bit field is divided according to the structure of the search class, 1 is made to correspond to all bits of the divided field to which the constant element corresponds, and the variable element is This is a value in which O is associated with all bits of the corresponding division field.

毎の論理積のかわりにビット毎の論理和を使用するよう
にしても良い。
Bitwise logical sum may be used instead of bitwise logical product.

を論理積することで、検索類の特性値りに対し、条件項
の変数部分に対応する部分のみを0に置換1.二えた値
が得られる。従って、検索類の特性値りに含まれる定数
部分の値はそのまま情報として残り、条件項の特性値Q
との比較において、異なる定数についてはその違いを検
出することが可能となる。
By logically multiplying, only the part corresponding to the variable part of the conditional term is replaced with 0 for the characteristic value of the search class.1. The double value is obtained. Therefore, the value of the constant part included in the characteristic value of the search class remains as information, and the characteristic value Q of the conditional term
In comparison with , it is possible to detect the difference between different constants.

よって、本発明によれば、実際には単一化可能性のない
項が誤って単一化可能性があると判定される確率を大幅
に低減することができ、順検索の高速化を図ることがで
きる。
Therefore, according to the present invention, it is possible to significantly reduce the probability that a term that is actually not unifiable is erroneously determined to be unifiable, thereby speeding up the forward search. be able to.

また、特性値Qは、変数要素が対応する分割フット毎の
論理積のかわりにビット毎の論理和を使用する場合も同
様の作用が得られる。
Further, for the characteristic value Q, the same effect can be obtained when the logical sum for each bit is used instead of the logical product for each divided foot to which the variable element corresponds.

(実施例) 以下、図面を参照しながら本発明の一実施例について説
明する。
(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.

とi、条件項を入力して第2の特性値Q及び第3の′ 
1 特性値Mをそれぞれ算出する特性値Qの算出手段、1;
2及び特性値Mの算出手段13と、これら計算手段11
〜13で算出された特性値り、Q、Mから(DAM)と
Qとを比較して検索類についての単一化可能性を判定結
果として出力する判定手段14とにより構成されている
and i, and input the conditional terms to obtain the second characteristic value Q and the third ′
1 Calculating means for calculating characteristic values Q for calculating respective characteristic values M, 1;
2 and characteristic value M calculation means 13, and these calculation means 11
The determination means 14 compares the characteristic values calculated in steps 13 to 13, Q, and (DAM) from M and outputs the possibility of unification for the search class as a determination result.

以上の構成において、いま、検索類として、f (a) f (a、  g (b) ) 条件項として、 f (Y、b) が与えられるとする。特性値り、Q、Mを18ビツトに
設定すると、計算手段11.12は検索類及び条件項を
従来のFEW法と全く同様の方法で特性値り及び特性値
Qにそれぞれ変換する。
In the above configuration, it is assumed that f (a) f (a, g (b)) is given as a search class and f (Y, b) is given as a conditional term. When the characteristic values, Q, and M are set to 18 bits, the calculating means 11.12 converts the search class and condition term into characteristic values, Q, and Q, respectively, in exactly the same manner as in the conventional FEW method.

即ち、検索類f (a)は、引数が1つの定数fと定数
aとで構成されているので、計算手段11は、第2図(
a)に示すように、16ビツトのピッ”=−一 当てる。これにより、検索類f (a)の特性値D? は第2図(a)に21で示す値になる。また、検索類f
 (a、  g (b) )については、引数が2つの
関数f、定数a、引数が1つの定数g1及び定数すより
構成されるので、計算手段11は、第2図(b)に示す
ように、16ビツトのフィールドを例えば 8ビツト、
 4ビツト、 2ビツト及び 2ビツトに分割し、上位
8ビツトに関数fのアスキーコード66Hを割当て、次
の4ビツトに定数aのアスキーコード61Hの下位4ビ
ツトであるIHを割当て、以下、それに続く 2ビツト
、2ビツトに、それぞれ定数g、bのアスキーコードの
下位2ビット3H,2Hをそれぞれ割当てる。これによ
り、検索類f (a、  g (b) )の特性値りは
、第2図(b)に22で示す値になる。
That is, since the search class f(a) consists of one argument, a constant f and a constant a, the calculation means 11 calculates
As shown in Fig. 2(a), the 16-bit pitch "=-1 is matched. As a result, the characteristic value D? of the search class f(a) becomes the value shown by 21 in Fig. 2(a). f
For (a, g (b)), the arguments are two functions f, a constant a, and the arguments are one constant g1 and a constant For example, convert a 16-bit field to 8-bit,
Divide into 4 bits, 2 bits, and 2 bits, assign the ASCII code 66H of the function f to the upper 8 bits, assign IH, which is the lower 4 bits of the ASCII code 61H of the constant a, to the next 4 bits, and proceed as follows. The lower two bits 3H and 2H of the ASCII code of constants g and b are assigned to bits 2 and 2, respectively. As a result, the characteristic value of the search class f (a, g (b)) becomes the value shown at 22 in FIG. 2(b).

また、条件項f (Y、b)については、引数が2つの
関数fと変数Yと定数すとから構成されるので、計算手
段11は、第2図(c)に23で示すように、16ビツ
トのフィールドを例えば8ビツト、 4ビツト及び 4
ビツトに分割し、上位 8ビツ2Hを割当てる。これに
より、条件項の特性値Qは、第2図(C)の23で示す
値となる。
Regarding the conditional term f (Y, b), since the arguments are composed of two functions f, a variable Y, and a constant S, the calculation means 11 calculates For example, you can convert a 16-bit field into 8-bit, 4-bit, and 4-bit fields.
Divide into bits and allocate the upper 8 bits 2H. As a result, the characteristic value Q of the conditional term becomes the value indicated by 23 in FIG. 2(C).

一方、特性値Mの計算手段13は、上記条件項f  (
Y、b)の特性値の16ビツトのフィールドを第2図(
C)の24に示すように、8ビツト、4ビツト及び4ビ
ツトに分割し、定数f、bに対応する上位8ビツトと下
位4ビツトのフィールドの図(c)の24で示すような
定数部分のみを抽出するマスクパターンとなる。
On the other hand, the calculation means 13 for the characteristic value M calculates the condition term f (
The 16-bit field of the characteristic value of Y, b) is shown in Figure 2 (
As shown at 24 in Figure C), it is divided into 8 bits, 4 bits, and 4 bits, and the constant part as shown at 24 in Figure (c) is divided into fields of upper 8 bits and lower 4 bits corresponding to constants f and b. This is a mask pattern that extracts only the

次に、判定手段14は、上記の各特性値り、Q。Next, the determining means 14 determines each of the above characteristic values and Q.

Mを入力して検索項と条件項との単一化可能性を判定す
る。即ち、先ず検索項f (a)と条件項f(y、b)
については、 0001100110100001  (D )A  
1111111100001111  (M )≠01
10011000000010  (Q )ヤあるから
単一化可能性はないと判定される。また、検索項f (
a、  g (b) )と条件項f (Y。
Input M to determine whether the search term and the condition term can be unified. That is, first, the search term f (a) and the condition term f (y, b)
For 0001100110100001 (D)A
1111111100001111 (M)≠01
Since there are 10011000000010 (Q), it is determined that there is no possibility of unification. Also, the search term f (
a, g (b) ) and the conditional term f (Y.

b)とは、 0110011000011110  (D )Δ 1
111111100001111  (Q )≠011
0011000000010  (Q )となるから、
この場合も単一化可能性がないと判定される。
b) means 0110011000011110 (D) Δ 1
111111100001111 (Q)≠011
0011000000010 (Q), so
In this case as well, it is determined that there is no possibility of unification.

この例から分るように、従来のFEW法では、条件項の
特性値において、ビット0が存在すると、検索項の特性
値の対応するビットの値がOと1のいずれであっても、
そのビットに関する限り単一化可能でないと判定できな
かったが、本実施例に係る単一化候補項の選択装置では
、条件項に対する特性値Qの変数部分のマスク作用を、
第3の特性値Mによって得、検索項の特性値り内の重要
な情報が失われないようにしたので、その判定の精度を
飛躍的に向上させることができる。しかも、従来のFE
W法に比べて検索項に対する特性値のを適用することは
可能である。
As can be seen from this example, in the conventional FEW method, if bit 0 exists in the characteristic value of the conditional term, regardless of whether the value of the corresponding bit in the characteristic value of the search term is O or 1,
As far as that bit is concerned, it could not be determined that unification is not possible, but in the unification candidate term selection device according to this embodiment, the masking effect of the variable part of the characteristic value Q on the conditional term is
Since the important information obtained by the third characteristic value M in the characteristic value of the search term is not lost, the accuracy of the determination can be dramatically improved. Moreover, conventional FE
Compared to the W method, it is possible to apply characteristic values to search terms.

第1の方法は、検索項のうち、変数を含まない項につい
ては、上記実施例による方法を適用し、変数を含む項に
ついてはFEW法を適用する方式である。この方法によ
れば、FEW法のみの場合より優れた検索方法となる。
The first method is to apply the method according to the above embodiment to search terms that do not include variables, and apply the FEW method to terms that include variables. This method provides a better search method than the FEW method alone.

−例を挙げると、検索項に対する特性値の大きさを1ビ
ツトだけ大きくし、そこにその項が変数を含むか否かを
示すフラグをセットする。そして、実際に項を検索する
際に、そのフラグビットをまず参照して変数を含まない
場合には、本方式を適用し、変数を含む場合にはFEW
法を適用する。
- For example, increase the size of the characteristic value for the search term by one bit and set a flag there indicating whether the term contains a variable. When actually searching for a term, the flag bit is first referenced, and if it does not contain a variable, this method is applied, and if it does contain a variable, FEW is applied.
Apply the law.

また、第2の方法は、検索項についても条件項と同様に
特性値を2つ用意する方法である。即ち、特性値りを条
件項の特性値Qと同様の方法で求める。また、新たな特
性値りを導入し、それを条件項の特性値Mと同様の方法
で求める。このようにすると、特性値による単一化可能
性の判定には次の式を使用すれば良い。
The second method is to prepare two characteristic values for the search term as well as for the condition term. That is, the characteristic value Q is obtained in the same manner as the characteristic value Q of the conditional term. In addition, a new characteristic value is introduced, and it is obtained in the same manner as the characteristic value M of the conditional term. In this way, the following equation can be used to determine the possibility of unification based on characteristic values.

することにより、両者ともに変数でない部分についての
比較を行なう。この方法も、FEW法よりも優れた判定
結果を与える。しかし、各検索項に対して2つの特性値
を格納している必要があるので、FEW法よりも多くの
格納領域を必要とする。
By doing this, we can compare the parts where both are not variables. This method also provides better determination results than the FEW method. However, since it is necessary to store two characteristic values for each search term, it requires more storage area than the FEW method.

また、本発明は、条件項の特性値として、定数及び関数
子に対応する特性値Qと、変数の位置を示す特性値Mの
2つを用意し、検索項の定数及び関数子に対する特性値
りを条件項の変数の位置を示す特性値Mでマスクするこ
とにより、定数及び関数値に対応する特性値同士の比較
を正確に行ない、判定の精度を向上させた点が特徴であ
る。従って、特性値Qは、変数である部分に1を対応さ
せ、特性値Mは、変数でない部分にOを対応させ、変数
である部分に1をたて、単一化可能性の判定にはビット
毎の論理積のかわりにビット毎の論理和を使用するよう
にしても良い。また、別の実施例として特性値Mを使用
する代わりに、変数の出現位置を記憶し、特性値りと特
性値Mのビット毎の論理積に相当する演算を別事段で行
なうこともまない検索項の集合から条件項と単一化可能
な項を正確に検出できるので、項検索の高速化に大いに
寄与することが可能である。
In addition, the present invention prepares two characteristic values for the conditional term, a characteristic value Q corresponding to the constant and the functor, and a characteristic value M indicating the position of the variable, and the characteristic value for the constant and the functor of the search term. By masking the difference with the characteristic value M indicating the position of the variable in the conditional term, characteristic values corresponding to constants and function values can be accurately compared with each other, thereby improving the accuracy of judgment. Therefore, the characteristic value Q corresponds to 1 to the part that is a variable, the characteristic value M corresponds to O to the part that is not a variable, and 1 is set to the part that is a variable. Bitwise OR may be used instead of bitwise AND. Also, as another example, instead of using the characteristic value M, it is also possible to memorize the appearance position of the variable and separately perform an operation equivalent to the bitwise AND of the characteristic value M and the characteristic value M. Since conditional terms and terms that can be unified can be accurately detected from a set of search terms that do not exist, it is possible to greatly contribute to speeding up term searches.

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

第1図は本発明の一実施例に係る単一化候補項の選択装
置のブロック図、第2図は同装置にて得られる各特性値
を示す図、第3図は従来のFEW法で使用される各特性
値を示す図である。 11・・・特性値りの計算手段、12・・・特性値Qの
計算手段、13・・・特性値Mの計算手段、14・・・
判定手段。 出願人 工業技術院長 飯塚 幸三 第1図 (a)               (b)第2図 (a)                (b)第 3
 区
FIG. 1 is a block diagram of a unitization candidate term selection device according to an embodiment of the present invention, FIG. 2 is a diagram showing each characteristic value obtained by the same device, and FIG. 3 is a diagram of a conventional FEW method. FIG. 3 is a diagram showing each characteristic value used. 11... Means for calculating characteristic value, 12... Means for calculating characteristic value Q, 13... Means for calculating characteristic value M, 14...
Judgment means. Applicant Director of the Agency of Industrial Science and Technology Kozo Iizuka Figure 1 (a) (b) Figure 2 (a) (b) Figure 3
Ward

Claims (2)

【特許請求の範囲】[Claims] (1)定数のみから構成される検索項から所定ビットの
第1の特性値を求める第1の特性値算出手段と、定数及
び/又は変数から構成される条件項から前記第1の特性
値と同一ビットの第2の特性値を求める第2の特性値算
出手段と、前記条件項から前記第1の特性値と同一ビッ
トの第3の特性値を求める第3の特性値算出手段と、前
記第1の特性値と前記第3の特性値との論理積の結果と
前記第2の特性値とを比較して、両者が同一でなければ
、前記検索項は前記条件項と単一化可能性がないと判定
する判定手段とを具備し、前記第1の特性値は、前記検
索項の構造に応じてビットフィールドを分割し、各分割
フィールドに当該検索項の各要素の数値変換値を対応さ
せた値であり、前記第2の特性値は、前記条件項の構造
に応じてビットフィールドを分割し、定数要素が対応す
る分割フィールドに当該定数要素の数値変換値を対応さ
せ、変数要素が対応する分割フィールドの全ビットに1
を対応させた値であり、前記第3の特性値は、前記検索
項の構造に応じてビットフィールドを分割し、定数要素
が対応する分割フィールドの全ビットに1を対応させ、
変数要素が対応する分割フィールドの全ビットに0を対
応させた値であることを特徴とする単一化候補項の選択
装置。
(1) A first characteristic value calculation means for calculating a first characteristic value of a predetermined bit from a search term consisting only of constants; a second characteristic value calculation means for calculating a second characteristic value of the same bit; a third characteristic value calculation means for calculating a third characteristic value of the same bit as the first characteristic value from the condition term; The result of the logical product of the first characteristic value and the third characteristic value is compared with the second characteristic value, and if the two are not the same, the search term can be unified with the condition term. and determining means for determining that the first characteristic value has no property, and the first characteristic value divides the bit field according to the structure of the search term, and assigns a numerical conversion value of each element of the search term to each divided field. The second characteristic value is a value that divides the bit field according to the structure of the conditional term, associates the numerical conversion value of the constant element with the divided field to which the constant element corresponds, and divides the bit field into a variable element. 1 for all bits of the corresponding split field
The third characteristic value is a value that divides the bit field according to the structure of the search term, and makes 1 correspond to all bits of the divided field to which the constant element corresponds,
1. A unification candidate term selection device, wherein a variable element has a value in which all bits of a corresponding divided field correspond to 0.
(2)前記第2の特性値は、前記条件項の構造に応じて
ビットフィールドを分割し、定数要素が対応する分割フ
ィールドに当該定数要素の数値変換値を対応させ、変数
要素が対応する分割フィールドの全ビットに0を対応さ
せた値であり、前記第3の特性値は、前記検索項の構造
に応じてビットフィールドを分割し、定数要素が対応す
る分割フィールドの全ビットに0を対応させ、変数要素
が対応する分割フィールドの全ビットに1を対応させた
値であり、前記判定手段は、前記第1の特性値と前記第
3の特性値との論理和の結果と前記第2の特性値とを比
較して、両者が同一でなければ、前記検索項は前記条件
項と単一化可能性がないと判定することを特徴とする請
求項1に記載の単一化候補項の選択装置。
(2) The second characteristic value is obtained by dividing the bit field according to the structure of the conditional term, making the numerical conversion value of the constant element correspond to the division field to which the constant element corresponds, and dividing the bit field to which the variable element corresponds. The third characteristic value is a value that corresponds to 0 to all bits of the field, and the third characteristic value divides the bit field according to the structure of the search term, and corresponds to 0 to all bits of the divided field to which the constant element corresponds. and the variable element is a value in which 1 corresponds to all bits of the corresponding divided field, and the determining means is configured to calculate the result of the logical sum of the first characteristic value and the third characteristic value and the second characteristic value. and a characteristic value of the unification candidate term according to claim 1, wherein if the two are not the same, it is determined that the search term has no possibility of unification with the conditional term. selection device.
JP63102609A 1988-04-27 1988-04-27 Device for selecting unification candidate terms Expired - Lifetime JPH0664534B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63102609A JPH0664534B2 (en) 1988-04-27 1988-04-27 Device for selecting unification candidate terms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63102609A JPH0664534B2 (en) 1988-04-27 1988-04-27 Device for selecting unification candidate terms

Publications (2)

Publication Number Publication Date
JPH01276237A true JPH01276237A (en) 1989-11-06
JPH0664534B2 JPH0664534B2 (en) 1994-08-22

Family

ID=14331983

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63102609A Expired - Lifetime JPH0664534B2 (en) 1988-04-27 1988-04-27 Device for selecting unification candidate terms

Country Status (1)

Country Link
JP (1) JPH0664534B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0573618A (en) * 1991-09-11 1993-03-26 Agency Of Ind Science & Technol Retrieval method for structural body
JPH06124304A (en) * 1991-02-05 1994-05-06 Agency Of Ind Science & Technol Retrieving method using overlap code for extended item
WO1996010227A1 (en) * 1994-09-28 1996-04-04 Hideki Iwanishi Method of selecting rule used in bottom-up reasoning in system based on knowledge base

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06124304A (en) * 1991-02-05 1994-05-06 Agency Of Ind Science & Technol Retrieving method using overlap code for extended item
JPH0573618A (en) * 1991-09-11 1993-03-26 Agency Of Ind Science & Technol Retrieval method for structural body
WO1996010227A1 (en) * 1994-09-28 1996-04-04 Hideki Iwanishi Method of selecting rule used in bottom-up reasoning in system based on knowledge base

Also Published As

Publication number Publication date
JPH0664534B2 (en) 1994-08-22

Similar Documents

Publication Publication Date Title
US6564206B1 (en) Information search apparatus and method, and storage medium
JP2790466B2 (en) Character string search method and apparatus
US5835635A (en) Method for the recognition and completion of characters in handwriting, and computer system
JPH11212980A (en) Production of index and retrieval method
JPH08255176A (en) Method and system for comparison of table of database
GB2580559A (en) Inclusion dependency determination in a large database for establishing primary key-foreign key relationships
US4908778A (en) Inductive inference method for obtaining rules represented by propositional logic
JPH07177005A (en) Bit pattern detector circuit and bit pattern detecting method
JPH01276237A (en) Selector for candidate term to be unified
JP2720590B2 (en) Pattern recognition device
GB2515867A (en) Searching apparatus utilizing sub-word finite state machines
US5894427A (en) Technique for concurrent detection of bit patterns
JPH087670B2 (en) Adder circuit
US6172623B1 (en) Efficient bit scan mechanism
JP2590698B2 (en) Character string data retrieval device
JP2724235B2 (en) Variable name inference device
JP2722684B2 (en) File system search device
JP2000090110A (en) Full-text search method and apparatus, and recording medium storing full-text search program
JPH0423167A (en) Command retrieving system
JP3018579B2 (en) Name search processor
JPH03108063A (en) System and method for retrieving backward coincidence
JPH04279973A (en) Character string comparison system
JPH04241672A (en) Character string retrieving system
JPH06162096A (en) Record retrieval method
JPH05225248A (en) Database search system

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term