JP2000076053A - Character string retrieval and display device - Google Patents

Character string retrieval and display device

Info

Publication number
JP2000076053A
JP2000076053A JP10246655A JP24665598A JP2000076053A JP 2000076053 A JP2000076053 A JP 2000076053A JP 10246655 A JP10246655 A JP 10246655A JP 24665598 A JP24665598 A JP 24665598A JP 2000076053 A JP2000076053 A JP 2000076053A
Authority
JP
Japan
Prior art keywords
search
character string
specified
program
function
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
JP10246655A
Other languages
Japanese (ja)
Inventor
Hiroshi Suganuma
弘 菅沼
Kenichi Shintoku
賢一 新徳
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 Software Engineering Co Ltd
Original Assignee
Hitachi Software Engineering Co 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 Software Engineering Co Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP10246655A priority Critical patent/JP2000076053A/en
Publication of JP2000076053A publication Critical patent/JP2000076053A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To easily meaningful retrieval in consideration of the constitution of a program without any waste by retrieving which constituent element includes an arbitrary character string inputted from an input device within a specified retrieval range and finding the description line position of a function including the specified character string by referring to a stored function list. SOLUTION: A character string retrieval setting part 111 is used first and the character string to be retrieved and its retrieval range are specified through an input/output device 102. A character string retrieval part 112 acquires a function list of modules having the same name as a specified module name according to the specified module name and transfers and stores it as a function list 115 in a memory 103. Then the function start line position and function end line position in the function list 115 are obtained. When the module is not at the end, it is checked whether or not there is the specified character string in the obtained line and a character string retrieval result finding part 113 is used to check which function the character string is present in according to the position of the line.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、任意に指定した文
字列をソースプログラム中から検索して表示する文字列
検索表示装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character string search and display device for searching and displaying an arbitrarily designated character string from a source program.

【0002】[0002]

【従来の技術】従来において、任意に指定した文字列を
ソースプログラム中から検索して表示する機能を持つも
のとして、オペレーティングシステムが提供する検索コ
マンドやパーソナルコンピュータのプログラム開発環境
で用いられる検索機能がある。
2. Description of the Related Art Conventionally, a search function provided in an operating system and a search function used in a program development environment of a personal computer are provided as a function having a function of searching for and displaying an arbitrarily designated character string from a source program. is there.

【0003】[0003]

【発明が解決しようとする課題】しかし、上記従来技術
においては、次のような問題がある。 (1)ユーザは、文字列を指定する前に、検索範囲を自
分で調べて指定しなければならない。
However, the above prior art has the following problems. (1) Before specifying a character string, the user must check the search range by himself and specify it.

【0004】(2)有効な検索を行うためには、開発環
境の構成を把握しておく必要がある。
(2) In order to perform an effective search, it is necessary to grasp the configuration of the development environment.

【0005】(3)また、一度に複数の範囲を指定する
ことはできない。そのため、予定の検索を行うのに何回
も検索範囲を変えて行うか、簡単なスクリプトを作成し
て実行させてやる必要がある。
(3) In addition, a plurality of ranges cannot be specified at one time. Therefore, it is necessary to change the search range many times to search for a schedule or to create and execute a simple script.

【0006】(4)更に、検索範囲はディレクトリやフ
ァイルしか指定できず、プログラムの構成を意識した検
索ができない。例えば、あるプログラムを構成する全て
のソースプログラムの中のある検索対象の文字列を容易
に探すことができず、開発環境の構成に応じて検索コマ
ンドを何回か指定して検索を実施しなければならない、
また、ファイルやディレクトリしか指定できないので、
予定していた検索範囲よりも足りない場合や、必要の無
いディレクトリ等まで検索してしまう場合がある。
(4) Further, only a directory or a file can be designated as a search range, and a search in consideration of a program configuration cannot be performed. For example, it is not possible to easily search for a character string to be searched in all the source programs that make up a program, and a search must be performed by specifying a search command several times according to the configuration of the development environment. Must
Also, only files and directories can be specified,
There is a case where the search range is shorter than the planned search range or a case where a search is made to an unnecessary directory.

【0007】(5)また、幾つかのプログラムが共通に
利用しているライブラリ内の関数の使われ方を調べる場
合に、検索コマンドを使う場合だと検索をする前にその
ライブラリがどのプログラムやライブラリに関連してい
るかを調べなければならず、手間がかかり、かつ、検索
範囲を容易に絞れないため、異なるライブラリ内で同一
関数名がある場合に、対象とするプログラムの構成に含
まれないライブラリの側も検索してしまい、ユーザが必
要としない余計な検索結果を出力する可能性がある。
(5) Also, when examining the use of a function in a library that is commonly used by several programs, if a search command is used, the program may determine which program or Since it is necessary to check whether it is related to the library, it is troublesome and the search range cannot be narrowed easily. Therefore, if the same function name exists in different libraries, it is not included in the configuration of the target program The library may also search and output extra search results that the user does not need.

【0008】(6)検索結果は、ファイル名と行・列位
置が提示されるのが普通であるが、どの関数で使用され
ているか等の詳細情報は分からない。そのため、詳細情
報を知るためには、エディタを用いてレポートされた行
・列位置にジャンプしなければならない。
(6) As for the search result, a file name and a row / column position are usually presented, but detailed information such as which function is used is not known. Therefore, in order to know detailed information, it is necessary to jump to the reported row / column position using an editor.

【0009】本発明は、上記のような問題を解決するた
めになされたものであり、その目的は、プログラムの構
成を意識した意味のある検索を無駄なく、容易に行うこ
とができると共に、エディタを逐一起動することなく、
どの関数で使用されているか等の詳細情報を得ることが
できる文字列検索装置を提供することにある。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems. It is an object of the present invention to make it possible to easily perform a meaningful search in consideration of the structure of a program without waste and to use an editor. Without having to start
It is an object of the present invention to provide a character string search device capable of obtaining detailed information such as which function is used.

【0010】[0010]

【課題を解決するための手段】本発明は、上記目的を達
成するために、入力装置から指定された任意の文字列を
記憶装置に記憶させたソースプログラム中から検索して
表示する文字列検索表示装置において、検索対象のソー
スプログラムを構成するライブラリやモジュール等の構
成要素の構造をその関連関係の情報および各構成要素中
で使用されている関数リストを含めて記憶した記憶手段
と、検索対象のソースプログラムの全体または一部の構
成要素を検索範囲として指定する検索範囲設定手段と、
指定された検索範囲を検索対象として前記入力装置から
入力された任意の文字列がいずれの構成要素中に記述さ
れているかを検索する検索手段と、検索された構成要素
中で、指定された文字列が含まれる関数の記述行位置を
前記記憶手段に記憶された関数リストを参照して割出す
割出し手段と、割出された記述位置を含むソースプログ
ラム文を表示させる表示処理手段とを備えることを特徴
とする。
SUMMARY OF THE INVENTION In order to achieve the above object, the present invention provides a character string search for searching and displaying an arbitrary character string designated by an input device from a source program stored in a storage device. A display device, comprising: storage means for storing a structure of a component such as a library or a module constituting a source program to be searched, including information on its relation and a function list used in each component; Search range setting means for designating all or a part of the components of the source program as a search range;
A search means for searching in which component an arbitrary character string input from the input device is described in a specified search range as a search target, and specifying a specified character in the searched component Indexing means for determining the description line position of the function including the column with reference to the function list stored in the storage means, and display processing means for displaying a source program statement including the determined description position It is characterized by the following.

【0011】[0011]

【発明の実施の形態】以下、本発明の文字列検索表示装
置の一実施の形態を図面を参照して詳細に説明する。図
1は、本発明の文字列検索表示装置100の一実施の形
態を示すブロック構成図であり、文字列検索処理を行な
う中央処理装置(CPU)101、入力部102aおよ
び出力部102bとを備え、検索のための各種のコマン
ドや検索対象の文字列を入力したり、検索結果を出力す
る入出力装置102、検索処理のためのデータやプログ
ラムを格納したメモリ103、各種のプログラム間の関
連等を示す設計情報を設計情報データベース104aと
して格納した外部記憶装置104とを備えている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the character string retrieval and display device of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a character string search and display device 100 according to the present invention, which includes a central processing unit (CPU) 101 for performing a character string search process, an input unit 102a, and an output unit 102b. , An input / output device 102 for inputting various commands for search and a character string to be searched, and outputting a search result, a memory 103 storing data and programs for search processing, association between various programs, and the like. And an external storage device 104 in which design information indicating the above is stored as a design information database 104a.

【0012】メモリ103には、文字列検索処理を実現
する処理プログラムである文字列検索設定部111、文
字列検索部112、文字列検索結果割出し部113、文
字列検索結果表示部114が格納されている。また、デ
ータとして、関数リスト115、検索結果情報116を
格納するようになっている。文字列検索設定部111
は、検索対象の文字列や検索範囲を設定するものであ
り、文字列検索部112は指示された文字列の検索を行
なうものである。また、文字列検索結果割出し部113
は、指定の文字列が検索結果により抽出された場合に、
その文字列がどの関数内にあるかを割出すものであり、
文字列検索結果表示部114は検索結果を入出力装置1
02の出力部102bに表示させるものである。
The memory 103 stores a character string search setting section 111, a character string search section 112, a character string search result indexing section 113, and a character string search result display section 114, which are processing programs for realizing a character string search process. Have been. In addition, a function list 115 and search result information 116 are stored as data. String search setting unit 111
Is used to set a character string to be searched and a search range, and the character string search unit 112 searches for the designated character string. The character string search result indexing unit 113
Will return if the specified string is extracted from the search results.
To determine which function the string is in,
The character string search result display unit 114 displays the search result on the input / output device 1
02 is displayed on the output unit 102b.

【0013】外部記憶装置104に格納される設計情報
データベース104aは、図2(a)に示すように、あ
るプログラム開発のプロジェクトにおいて設計中または
設計済みの各種プログラムの識別番号(ID)201、
種別202、名称203、関連先204、関連元20
5、プログラム本体の格納場所ポインタ206等の設計
情報をプログラム単位で格納するように構成されてい
る。図2(a)に示す例では、プロジェクトAAAは、
関連先204に「have:2、have:3、hav
e:4」が設定されていることから、ID=2、ID=
3、ID=4のプログラムoed、ライブラリlibo
lc,liboruを含んでいることが表わされてい
る。
As shown in FIG. 2A, the design information database 104a stored in the external storage device 104 includes identification numbers (ID) 201 of various programs being designed or designed in a certain program development project.
Type 202, name 203, destination 204, source 20
5. Design information such as a storage location pointer 206 of the program body is stored in units of a program. In the example shown in FIG. 2A, the project AAA is
In the related destination 204, “have: 2, have: 3, have
e: 4 ", ID = 2, ID = 2
3, program oed with ID = 4, library libo
lc, liboru.

【0014】また、プログラムoedは、関連先204
に「have:5、have:6」が設定されているこ
とから、ID=5、ID=6、モジュールoed.cお
よびcom.cを含んでいることが表わされている。ま
た、このプログラムoedは、関連先204に「ref
er:3,refer:4」が設定されていることか
ら、ID=3、ID=4のライブラリlibolc,l
iboruと参照関係にあることが表わされている。ま
た、プログラムoedは、関連元205に「have:
1」が設定されていることから、ID=1のプロジェク
トAAAの下位に属するものであることが表わされてい
る。
The program oed is stored in the related destination 204
Since “have: 5, have: 6” is set in the module oed. c and com. c is included. Also, this program oed is sent to the related destination 204 as “ref
er: 3, refer: 4 ”, the library liboc, l of ID = 3 and ID = 4 is set.
It is shown that there is a reference relationship with iboru. In addition, the program oed stores “have:
Since “1” is set, it indicates that the project belongs to a lower level of the project AAA of ID = 1.

【0015】プログラム本体の格納位置ポインタ206
は、それぞれのプログラム名称のプログラム本体が格納
されているアドレスを直接または間接に示すものであ
り、図2(b)に示すようにポインタ206で示される
位置(アドレス)に該当するプログラム本体が格納され
ている。
Storage location pointer 206 of program body
Indicates, directly or indirectly, the address where the program body of each program name is stored. As shown in FIG. 2B, the program body corresponding to the position (address) indicated by the pointer 206 is stored. Have been.

【0016】図3は、ユーザが入出力装置102から指
定した文字列を任意のプログラムから検索する処理を示
すフローチャートであり、ここでは、検索対象のプログ
ラムとしてモジュールを指定し、そのモジュールに対す
る検索を実施する場合について説明する。先ず、文字列
検索設定部111を用い、検索対象の文字列と検索範囲
を入出力装置102から指定する(ステップ301)。本
実施形態における検索範囲の指定の仕方としては、
(1)プロジェクト、プログラム、モジュールというリ
ソース単位で指定する方法、(2)プログラムやモジュ
ールに対して検索レベルで指定する方法、がある。この
検索範囲の指定の仕方については、後述する。ここで
は、検索対象のプログラムとしてある1つのモジュール
ファイルがモジュール名称によって指定されたものと仮
定する。
FIG. 3 is a flowchart showing a process for searching a character string specified by the user from the input / output device 102 from an arbitrary program. In this example, a module is specified as a search target program, and the search for the module is performed. A description will be given of a case where the present invention is implemented. First, a character string to be searched and a search range are specified from the input / output device 102 using the character string search setting unit 111 (step 301). As a method of specifying the search range in the present embodiment,
There are (1) a method of specifying a project, a program, and a module in resource units, and (2) a method of specifying a program and a module at a search level. How to specify the search range will be described later. Here, it is assumed that one module file as a search target program is specified by a module name.

【0017】検索対象の文字列と検索対象のモジュール
名称が指定されたならば、文字列検索部112は、その
指定されたモジュール名称に基づき、当該モジュール名
称と一致する名称203を有するモジュールの関数リス
トを取得し、メモリ103内に関数リスト115として
転送し記憶させる(ステップ302)。
When a character string to be searched and a module name to be searched are specified, the character string search unit 112 performs a function of a module having a name 203 matching the module name based on the specified module name. The list is acquired, transferred and stored as the function list 115 in the memory 103 (step 302).

【0018】関数リスト115は、設計情報データベー
ス104a内の各リソース(プロジェクト、プログラ
ム、ライブラリ、モジュール)を言語解析装置105で
解析し、それぞれのリソースに含まれている関数の識別
子や開始行位置等の情報を抽出した一覧であり、例えば
図4に示すように、関数識別子401、関数開始行位置
402、関数終了行位置403を関数名毎に設定したも
ので構成されている。図4においては、「demo−a
ge.c」というモジュール内で使用されている関数リ
ストを例示している。この関数リストは、検索範囲が指
定された時に、メモリ103内に関数リスト115とし
て転送され、記憶される。但し、転送されるのは、指定
された検索範囲に属するプログラムの関数リストであ
る。これにより、検索対象として指定されたモジュール
に関し、図4に示したように、関数識別子401、関数
開始行位置402、関数終了行位置403から成る関数
リスト115がメモリ103内に記憶される。
The function list 115 is obtained by analyzing each resource (project, program, library, module) in the design information database 104a by the language analysis device 105, and identifying the function included in each resource, the starting line position, and the like. The list is obtained by extracting a function identifier 401, a function start line position 402, and a function end line position 403 for each function name, for example, as shown in FIG. In FIG. 4, "demo-a
ge. The function list used in the module "c" is illustrated. This function list is transferred and stored in the memory 103 as the function list 115 when the search range is specified. However, what is transferred is the function list of the program belonging to the specified search range. As a result, the function list 115 including the function identifier 401, the function start line position 402, and the function end line position 403 is stored in the memory 103 for the module specified as the search target, as shown in FIG.

【0019】次に、文字列検索部112は、関数リスト
115内の関数開始行位置402と関数終了行位置40
3を取得する(ステップ303)。次に、モジュールの終
了(モジュールの最終行)か否かを判定し(ステップ3
04)、モジュールの終了であれば、検索結果を表示す
る(ステップ309)。しかし、モジュールの終了でない
場合は、取得した行内に指定の文字列があるか否かを調
べる(ステップ305)。そして、文字列検索結果割出し
部113を用いて行の位置からどの関数内にあるかを調
べる(ステップ306)。この時、関数リスト115内を
逐一調べ、その行が「関数開始行位置402≦ 行 ≦関
数終了行位置403」にある関数識別子401を取得す
る。そして、検索結果を検索結果情報116として格納
する(ステップ307)。検索結果情報116は、図5に
示すように、プログラム識別子501、モジュール識別
子502、関数識別子503、行位置504、内容50
5から成る。この後、次の行のデータを取得し(ステッ
プ308)、ステップ304に戻って同様の処理を繰り
返す。
Next, the character string search unit 112 determines the function start line position 402 and the function end line position 40 in the function list 115.
3 is acquired (step 303). Next, it is determined whether or not the module is completed (the last line of the module) (step 3).
04) If the module ends, the search result is displayed (step 309). However, if it is not the end of the module, it is checked whether or not the specified character string exists in the obtained line (step 305). Then, using the character string search result indexing unit 113, it is checked which function is in the line position (step 306). At this time, the function list 115 is checked one by one, and the function identifier 401 whose line is “function start line position 402 ≦ line ≦ function end line position 403” is acquired. Then, the search result is stored as search result information 116 (step 307). As shown in FIG. 5, the search result information 116 includes a program identifier 501, a module identifier 502, a function identifier 503, a line position 504, and a content 50.
Consists of five. Thereafter, the data of the next row is obtained (step 308), and the process returns to step 304 to repeat the same processing.

【0020】ステップ309の検索結果の表示処理で
は、文字列検索結果表示部114を使い、検索結果情報
116の内容を表示する。図6は、検索結果表示画面6
00の例を示す図であり、ユーザが指定した検索文字列
である「year」601が画面上部に表示され、この
検索文字列「year」601を関数として含む行が画
面下部の検索結果表示ウインドウ608内に表示されて
いる。
In the search result display processing in step 309, the contents of the search result information 116 are displayed using the character string search result display section 114. FIG. 6 shows a search result display screen 6
00 is a diagram showing an example of the search string “year” 601 which is a search character string specified by the user at the top of the screen, and a line including this search character string “year” 601 as a function is a search result display window at the bottom of the screen. 608.

【0021】この検索結果表示ウインドウ608内の該
当行の関数をマウスポインタ607でダブルクリックす
ると、該当するモジュールのソースプログラムが図7に
示すようにして表示される。この場合、検索文字列「y
ear」601を関数として含む行(この例では第40
行目)704が検索結果表示ウインドウ703のほぼ中
心になるように表示される。なお、図6において、60
2は検索処理を中止させる場合の操作ボタン、603は
検索を実行させるための操作ボタン、604は検索対象
としてモジュールを指定するための操作ボタン、605
は検索対象としてプログラムを指定するための操作ボタ
ン、606は検索対象レベルとしてプロジェクトレベル
を指定するための操作ボタンである。また、図7におい
て、701は行番号の表示を指定するための操作ボタ
ン、702は検索文字列を輝度や色を変えることによっ
て強調表示させるための操作ボタン、703は指定され
た文字列を含む関数である。
When the function on the corresponding line in the search result display window 608 is double-clicked with the mouse pointer 607, the source program of the corresponding module is displayed as shown in FIG. In this case, the search string "y
"ear" 601 as a function (in this example, the 40th
The (line) 704 is displayed so as to be substantially at the center of the search result display window 703. In FIG. 6, 60
2 is an operation button for canceling the search processing, 603 is an operation button for executing the search, 604 is an operation button for designating a module as a search target, 605
Is an operation button for designating a program as a search target, and 606 is an operation button for designating a project level as a search target level. In FIG. 7, reference numeral 701 denotes an operation button for specifying display of a line number, 702 denotes an operation button for highlighting a search character string by changing brightness or color, and 703 includes a specified character string. Function.

【0022】次に、検索範囲を指定して指定の文字列を
含むプログラム行を検索する方法について説明する。本
実施形態においては、前述したように、検索の範囲を指
定する仕方として、(1)プロジェクト、プログラム、
モジュールというリソース単位で指定する方法、(2)
プログラムやモジュールに対して階層方向の検索レベル
で指定する方法がある。
Next, a method of searching for a program line containing a specified character string by specifying a search range will be described. In the present embodiment, as described above, the method of specifying the search range includes (1) project, program,
Method to specify in resource unit called module, (2)
There is a method of specifying a program or module at a search level in the hierarchical direction.

【0023】前者の方法(1)は、指定の範囲が持って
いる(have している)下位階層を順時調べて行くやり
方で、一番下位のレベルであるモジュールのレベルまで
検索を実施する。プロジェクトに対して本方法(1)を
実施した場合の処理手順を図8に示す。図8において、
先ず、プロジェクトが持っているプログラム/ライブラ
リに対する検索処理が終了したか否かを判定し(ステッ
プ801)、終了していなければ、プログラム/ライブ
ラリが持っているか否かを判定し(ステップ802)、
終了していなければ、そのモジュール/インクルードヘ
ッダ内で指定文字列の検索を行なう(ステップ803)。
以上の処理により、プロジェクトが持っている最下位レ
ベルのモジュール/インクルードヘッダまでの検索処理
が終了したならば、検索結果を表示する(ステップ80
4)。
In the former method (1), a search is performed up to the module level, which is the lowest level, by sequentially examining lower layers that the specified range has (have). . FIG. 8 shows a processing procedure when this method (1) is performed on a project. In FIG.
First, it is determined whether or not the search processing for the program / library possessed by the project has been completed (step 801), and if not, it is determined whether the program / library possesses it (step 802),
If not, a search for a specified character string is performed in the module / include header (step 803).
When the search processing up to the lowest level module / include header of the project is completed by the above processing, the search result is displayed (step 80).
4).

【0024】これにより、プロジェクトが持っているプ
ログラムやライブラリの相互関係を調べ、指定文字列が
含まれていると予想されるプログラムやライブラリを一
々指定することなく、プログラムの形式的な構造に依拠
してプロジェクトが持っている最下位レベルのモジュー
ル/インクルードヘッダまでの検索処理を行なうことが
できる。また、プロジェクト内の任意のプログラムを検
索範囲に指定することにより、その指定プログラム内に
限定して指定文字列の検索を行なうことができる。
[0024] Thereby, the interrelationship between the programs and libraries possessed by the project is examined, and the program or library which is expected to contain the specified character string is not specified, and the program or library is relied on formal structure of the program. Then, the search processing can be performed up to the lowest level module / include header of the project. Also, by specifying an arbitrary program in the project as a search range, a search for a specified character string can be performed only within the specified program.

【0025】一方、後者の方法(2)は、プログラムと
ライブラリ、またはライブラリとライブラリとの間で張
られた関連を使って検索する方法である。この関連の一
例を図9に示す。これは、前記の方法(1)のようにプ
ログラムの形式的な結合ではなく、意味のある結合を利
用する点が異なる。図において、プログラム「oed」
は、直接関連のあるものとしてライブラリ「libolc」、
「liboru」、「liborm」、「libocmn」と結合されて
いる。そしてその中でライブラリ「libolc」 はさらに
ライブラリ「liboru」と結合され、またライブラリ「li
boru」 はライブラリ「liborm」、「libocmn」と結合さ
れている。ここで、プログラム「oed」自身を「レベル
1」とした時に、このプログラム「oed」と直接関連の
あるものを「レベル2」、プログラム「oed」と直接関
連のあるものがさらに関連しているものを「レベル3」
という具合に階層レベルを定義しておき、検索レベルを
「レベル1」として与えると、検索範囲は、プログラム
「oed」の中だけとなる。
On the other hand, the latter method (2) is a method of searching using a relation established between a program and a library or a library and a library. FIG. 9 shows an example of this relation. This is different from the method (1) in that a formal combination of programs is used instead of a formal combination. In the figure, the program "oed"
Is directly related to the library "libolc",
It is combined with "liboru", "liborm", and "libocmn". The library “libolc” is further combined with the library “liboru”, and the library “li
boru "is combined with the libraries" liborm "and" libocmn ". Here, when the program “oed” itself is set to “level 1”, those directly related to the program “oed” are further related to “level 2”, and those directly related to the program “oed” are further related. Things "Level 3"
If the hierarchical level is defined in such a manner and the search level is given as "level 1", the search range is only in the program "oed".

【0026】しかし、検索レベルを「レベル2」として
指定すると、プログラム「oed」とライブラリ「libol
c」、「liboru」、「liborm」、「libocmn」が検索対
象となる。このような関連木の下向き方向には、「レベ
ル1」から「レベルN」まで指定することが出来る。
「レベルN」は、プログラム「oed」を根とする木の中
の全探索を行なうものである。
However, if the search level is specified as “level 2”, the program “oed” and the library “libol
"c", "liboru", "liborm", "libocmn" are searched. In the downward direction of such an association tree, "level 1" to "level N" can be designated.
“Level N” is for performing a full search in a tree rooted at the program “oed”.

【0027】また、「レベルM」を用意する。これは、
あるライブラリを指定し、それを参照している各プログ
ラムに対してレベルNの探索を行なう検索処理である。
この「レベルM」を用いることにより、あるライブラリ
を使っている可能性のある範囲から指定の文字列を検索
することが出来る。図10でプログラム「oed」の「レ
ベル2」に属しているライブラリ「libolc」に対して
「レベルM」での検索を行なうと、プログラム「om
s」、「okscc」もライブラリ「libolc」を参照している
ので、検索対象となり、その結果、プログラム「om
s」、「okscc」、「oed」の中に対してそれぞれ「レベ
ルN」の検索が実施される。
Further, "level M" is prepared. this is,
This is a search process in which a library is specified and a level N search is performed for each program referencing the library.
By using this “level M”, a specified character string can be searched from a range in which a certain library may be used. In FIG. 10, when the library “libolc” belonging to “level 2” of the program “oed” is searched at “level M”, the program “om” is obtained.
s "and" okscc "also refer to the library" libolc ", so they are searched, and as a result, the program" om
"Level N" is searched for "s", "okscc", and "oed".

【0028】この検索方法(2)の処理手順を図11に
示す。図11において、先ず、「レベルM」が指定され
たか否かを調べる(ステップ1101)。もし、「レベル
M」が指定されていたならば、その対象を参照している
プログラムを調べ、一覧に格納する(ステップ110
2)。しかし、「レベルM」が指定されていない場合
は、指定された検索対象を一覧に格納する(ステップ1
103)。
FIG. 11 shows the processing procedure of this search method (2). In FIG. 11, first, it is checked whether or not “level M” has been designated (step 1101). If "level M" has been designated, the program referencing the target is checked and stored in the list (step 110).
2). However, if "level M" is not specified, the specified search target is stored in the list (step 1).
103).

【0029】次に、前記の一覧内の全ての要素(プログ
ラム、ライブラリ、モジュール)に対して「レベルN」
の検索処理を行ない(ステップ1105)、検索が終了し
たならば(ステップ1104)、検索結果を表示する
(1106)。
Next, "level N" is applied to all the elements (programs, libraries, modules) in the list.
Is performed (step 1105), and when the search is completed (step 1104), the search result is displayed.
(1106).

【0030】図12は、図11の「レベルN」の検索処
理(ステップ1105)の詳細を示すフローチャートであ
り、先ず、前提として本処理には検索対象と検索レベル
が渡される。この検索対象についてプログラム/ライブ
ラリの検索処理を行なう(ステップ1201)。この処理
の詳細は、後で詳細に述べる。そして、渡された検索レ
ベルを「1」レベル下げた後(ステップ1202)、検索
対象と関連している各ライブラリに対して以下の処理を
行なう。
FIG. 12 is a flowchart showing the details of the "level N" search process (step 1105) in FIG. 11. First, as a premise, a search target and a search level are passed to this process. A program / library search process is performed for this search target (step 1201). The details of this processing will be described later in detail. Then, after lowering the passed search level by "1" (step 1202), the following processing is performed for each library related to the search target.

【0031】すなわち、検索レベルが「レベル1」かど
うかを調べ(ステップ1204)、検索レベルが「レベル
1」ならば、プログラム/ライブラリの検索処理を行な
う(ステップ1205)。しかし、検索レベルが「レベル
1」でない場合は、レベルNの検索処理を行なう(ステ
ップ1206)。そして、自分と関連しているライブラ
リに対する処理が終了したならば、「レベルN」の検索
処理の終了とする。
That is, it is checked whether the search level is "level 1" (step 1204). If the search level is "level 1", a program / library search process is performed (step 1205). However, if the search level is not “level 1”, a search process of level N is performed (step 1206). Then, when the processing for the library associated with the user is completed, the search processing of “level N” is completed.

【0032】図13は、図12のプログラム/ライブラ
リの検索処理(ステップ1201,1205)の詳細を示
すフローチャートであり、先ず、検索対象のプログラム
/ライブラリが未参照であるかを調べる(ステップ13
01)。そして、未参照である場合、検索対象のプログ
ラム/ライブラリが持つ各モジュール/インクルードヘ
ッダについて、指定文字列の検索処理を行い(ステップ
1303)、検索対象のプログラム/ライブラリが持つ
全てのモジュール/インクルードヘッダの検索処理が終
了したならば(ステップ1302)、検索対象としたプ
ログラム/ライブラリに対して参照フラグを付けて(ス
テップ1304)、プログラム/ライブラリの検索処理
の終了とする。
FIG. 13 is a flowchart showing the details of the program / library search process (steps 1201 and 1205) of FIG. 12. First, it is checked whether the program / library to be searched is unreferenced (step 13).
01). If it is not referred to, the specified character string is searched for each module / include header of the search target program / library (step 1303), and all modules / include headers of the search target program / library are searched. Is completed (step 1302), a reference flag is attached to the program / library to be searched (step 1304), and the program / library search process is terminated.

【0033】図14〜図21に入出力装置102に表示
されるプログラム構造の関連図の一例を示す。図14の
画面1400は、プロジェクトが持っているプログラム
の全てをモジュールレベルまで一覧表示したものであ
り、プロジェクトが持っているプログラム「oed」,
ライブラリ「libolc.sl」、「liboru.
sl」、「libocmn.sl」がその下位階層のモ
ジュール名と関連付けて表示されている。
FIGS. 14 to 21 show examples of related diagrams of the program structure displayed on the input / output device 102. FIG. A screen 1400 in FIG. 14 shows a list of all the programs in the project up to the module level, and the programs “oed”,
Libraries “libolc.sl” and “liboru.
sl "and" libocmn.sl "are displayed in association with the module names of the lower layers.

【0034】図15は、プログラム「oed」を指定し
た時の表示画面1500を示すものであり、プログラム
「oed」1501をマウスクリック操作によって指定
すると、図15に示すように、プログラム「oed」1
501が持っている(haveしている)モジュール
「oed.c」1502、「com.c」1503が強
調表示される。
FIG. 15 shows a display screen 1500 when the program "oed" is designated. When the program "oed" 1501 is designated by a mouse click operation, as shown in FIG.
The modules “oed.c” 1502 and “com.c” 1503 that the module 501 has (have) are highlighted.

【0035】図16は、モジュール「oed.c」を指
定した時の表示画面1600を示すものであり、モジュ
ール「oed.c」1601をマウスクリック操作によ
って指定すると、図15に示すように、モジュール「o
ed.c」1601が強調表示される。
FIG. 16 shows a display screen 1600 when the module “oed.c” is designated. When the module “oed.c” 1601 is designated by a mouse click operation, as shown in FIG. "O
ed. "c" 1601 is highlighted.

【0036】図17は、レベル2を指定した時の表示画
面1700を示すものであり、検索範囲としてレベル2
を指定すると、図17に示すように、レベル2のライブ
ラリ「libolc.sl」、「liboru.s
l」、「libocmn.sl」が、その上位階層プロ
グラム「oed」と下位階層のモジュール名と関連付け
て強調表示される。
FIG. 17 shows a display screen 1700 when level 2 is specified.
, The level 2 libraries “libolc.sl” and “liboru.s” as shown in FIG.
“l” and “libocmn.sl” are highlighted in association with the upper layer program “oed” and the module name of the lower layer.

【0037】図18は、プロジェクトを指定したときの
表示画面例を示すものであり、プロジェクトを指定する
と、図18に示すように、プロジェクトが持っているプ
ログラム「oed」,ライブラリ「libolc.s
l」、「liboru.sl」、「libocmn.s
l」がその下位階層のモジュール名と関連付けて強調表
示されている。
FIG. 18 shows an example of a display screen when a project is specified. When a project is specified, as shown in FIG. 18, the program “oed” and the library “liboc.
l "," liboru.sl "," libocmn.s "
“l” is highlighted in association with the module name of the lower hierarchy.

【0038】図19は、プログラム間の関連を表示した
画面1900の表示例を示すものであり、プログラム
「oed」を指定すると、図19に示すようにプログラ
ム「oed」が強調表示されると共に、このプログラム
「oed」と参照関係にあるライブラリが参照関係の向
きを示す矢印を付して表示される。ちなみに、プログラ
ム「oed」とライブラリ「libolc.sl」との
関係は矢印「refer」がライブラリ「libol
c.sl」の方向を向いているため、プログラム「oe
d」がライブラリ「libolc.sl」を参照してい
ることを表わしている。
FIG. 19 shows a display example of a screen 1900 displaying the relation between the programs. When the program "oed" is designated, the program "oed" is highlighted as shown in FIG. A library having a reference relationship with the program “oed” is displayed with an arrow indicating the direction of the reference relationship. By the way, the relationship between the program “oed” and the library “libolc.sl” indicates that the arrow “refer” is the library “libol.
c. sl ", the program" oe "
d "refers to the library" libolc.sl ".

【0039】図20は、レベル2を指定した場合のプロ
グラム間の関連を表示した画面2000の表示例を示す
ものであり、レベル2を指定すると、図20に示すよう
にレベル2のライブラリ「libolc.sl」と「l
iboru.sl」が強調表示されると共に、これらの
ライブラリ「libolc.sl」と「liboru.
sl」と参照関係にあるプログラム「oed」、ライブ
ラリ「libocmn.sl」、「liborm_cl
ient.sl」が参照関係の向きを示す矢印を付して
表示される。
FIG. 20 shows a display example of a screen 2000 displaying the relation between programs when level 2 is designated. When level 2 is designated, as shown in FIG. .Sl "and" l
iboru. sl "are highlighted, and these libraries" libolc.sl "and" liboru.
sl ", the program" oed ", the library" libocmn.sl "," liborm_cl "
event. “sl” is displayed with an arrow indicating the direction of the reference relationship.

【0040】図21は、レベル3のライブラリ「lib
oru.sl」を指定した場合のプログラム間の関連を
表示した画面2100の表示例を示すものであり、レベ
ル3のライブラリ「liboru.sl」を指定する
と、図21に示すようにレベル3のライブラリ「lib
oru.sl」が強調表示されると共に、これと参照関
係にあるライブラリ「libocmn.sl」、「li
borm_client.sl」が参照関係の向きを示
す矢印を付して表示される。以上の図14〜図21で示
した画面により検索範囲を指定し、目的とする文字列を
検索することができる。
FIG. 21 shows a level 3 library "lib".
oru. 21 shows a display example of a screen 2100 displaying the relation between programs when "sl" is specified. When a level 3 library "liboru.sl" is specified, a level 3 library "lib" is displayed as shown in FIG.
oru. sl ”is highlighted, and the libraries“ libocmn.sl ”and“ li ”
beam_client. “sl” is displayed with an arrow indicating the direction of the reference relationship. A search range can be designated on the screens shown in FIGS. 14 to 21 to search for a target character string.

【0041】[0041]

【発明の効果】以上説明したように本発明によれば、プ
ログラムの構成を意識した意味のある検索を無駄なく、
容易に行うことができる。また、エディタを逐一起動す
ることなく、どの関数で使用されているか等の詳細情報
を得ることができるなどの効果がある。
As described above, according to the present invention, a meaningful search conscious of the structure of a program can be performed without waste.
It can be done easily. In addition, there is an effect that detailed information such as which function is used can be obtained without starting the editor one by one.

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

【図1】本発明の文字列検索表示装置の一実施形態を示
すブロック構成図である。
FIG. 1 is a block diagram showing an embodiment of a character string search and display device according to the present invention.

【図2】図1の設計情報データベースの構成を示す図で
ある。
FIG. 2 is a diagram showing a configuration of a design information database of FIG.

【図3】指定した文字列を検索する手順を示すフローチ
ャートである。
FIG. 3 is a flowchart illustrating a procedure for searching for a designated character string.

【図4】関数リストの例を示す図である。FIG. 4 is a diagram illustrating an example of a function list.

【図5】検索結果情報の例を示す図である。FIG. 5 is a diagram illustrating an example of search result information.

【図6】検索結果表示例を示す図である。FIG. 6 is a diagram illustrating a display example of a search result.

【図7】検索結果の文字列が含まれる行を表示した例を
示す図である。
FIG. 7 is a diagram illustrating an example in which a line including a character string of a search result is displayed.

【図8】プログラムのファイル単位で検索範囲を指定す
る場合の手順を示すフローチャートである。
FIG. 8 is a flowchart illustrating a procedure when a search range is specified in file units of a program.

【図9】プログラムの関連の例を示す図である。FIG. 9 is a diagram showing an example of a relation between programs.

【図10】プログラムの関連の他の例を示す図である。FIG. 10 is a diagram showing another example of the relationship between programs.

【図11】検索レベルを指定して目的とする文字列を検
索する手順を示すフローチャートである。
FIG. 11 is a flowchart illustrating a procedure for searching for a target character string by specifying a search level.

【図12】レベルNの検索処理手順を示す図である。FIG. 12 is a diagram showing a level N search processing procedure.

【図13】プログラム/ライブラリの検索処理手順を示
すフローチャートである。
FIG. 13 is a flowchart showing a procedure of a program / library search process.

【図14】検索対象のプログラム構成例の表示画面を示
す図である。
FIG. 14 is a diagram showing a display screen of a configuration example of a program to be searched;

【図15】検索対象としてプログラムを指定した時の表
示画面を示す図である。
FIG. 15 is a diagram showing a display screen when a program is designated as a search target.

【図16】検索対象としてモジュールを指定した時の表
示画面を示す図である。
FIG. 16 is a diagram showing a display screen when a module is designated as a search target.

【図17】検索対象としてレベル2を指定した時の表示
画面を示す図である。
FIG. 17 is a diagram showing a display screen when level 2 is specified as a search target.

【図18】検索対象としてプロジェクトを指定した時の
表示画面を示す図である。
FIG. 18 is a diagram showing a display screen when a project is specified as a search target.

【図19】プログラム関連のレベル1を指定した時の表
示画面を示す図である。
FIG. 19 is a diagram illustrating a display screen when a program-related level 1 is designated.

【図20】プログラム関連のレベル2を指定した時の表
示画面を示す図である。
FIG. 20 is a diagram showing a display screen when a program-related level 2 is designated.

【図21】プログラム関連のレベル3を指定した時の表
示画面を示す図である。
FIG. 21 is a diagram showing a display screen when a program-related level 3 is designated.

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

100…文字列検索表示装置、101…CPU、102
…入出力表示装置、103…メモリ、104…外部記憶
装置、104a…設計情報データベース、105…言語
解析装置、111…文字列検索設定部、112…文字列
検索部、113…文字列検索結果割出し部、114…文
字列検索結果表示部、115…関数リスト、116…検
索結果情報。
100: character string search and display device, 101: CPU, 102
... I / O display device, 103 ... Memory, 104 ... External storage device, 104a ... Design information database, 105 ... Language analysis device, 111 ... Character string search setting unit, 112 ... Character string search unit, 113 ... Character string search result split Output unit, 114: character string search result display unit, 115: function list, 116: search result information.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 新徳 賢一 神奈川県横浜市中区尾上町6丁目81番地 日立ソフトウェアエンジニアリング株式会 社内 Fターム(参考) 5B075 ND03 ND23 ND35 NK02 NK14 NK32 NK37 NK50 PP25 PQ02 PQ32 5B076 DB05  ──────────────────────────────────────────────────の Continuing from the front page (72) Inventor Kenichi Shintoku 6-81 Onoecho, Naka-ku, Yokohama-shi, Kanagawa Prefecture Hitachi Software Engineering Co., Ltd. In-house F-term (reference) 5B075 ND03 ND23 ND35 NK02 NK14 NK32 NK37 NK50 PP25 PQ02 PQ32 5B076 DB05

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 入力装置から指定された任意の文字列を
記憶装置に記憶させたソースプログラム中から検索して
表示する文字列検索表示装置において、 検索対象のソースプログラムを構成するライブラリやモ
ジュール等の構成要素の構造をその関連関係の情報およ
び各構成要素中で使用されている関数リストを含めて記
憶した記憶手段と、 検索対象のソースプログラムの全体または一部の構成要
素を検索範囲として指定する検索範囲設定手段と、 指定された検索範囲を検索対象として前記入力装置から
入力された任意の文字列がいずれの構成要素中に記述さ
れているかを検索する検索手段と、 検索された構成要素中で、指定された文字列が含まれる
関数の記述行位置を前記記憶手段に記憶された関数リス
トを参照して割出す割出し手段と、 割出された記述位置を含むソースプログラム文を表示さ
せる表示処理手段とを備えることを特徴とする文字列検
索表示装置。
1. A character string search and display device for searching and displaying an arbitrary character string designated by an input device from a source program stored in a storage device, wherein a library, a module, etc., constituting a search target source program are provided. Storage means that stores the structure of each component, including information on its relation and a list of functions used in each component, and specifies all or some components of the source program to be searched as a search range Search range setting means for searching, a search means for searching for an arbitrary character string input from the input device described in any of the components with the specified search range as a search target, and a searched component Indexing means for determining a description line position of a function including a specified character string by referring to a function list stored in the storage means, String search display apparatus comprising: a display processing means for displaying the source program statements including the issued described position.
【請求項2】 前記記憶手段に記憶させるライブラリや
モジュール等の構成要素の構造、関連関係の情報および
各構成要素中で使用されている関数リストは、言語解析
装置を用いて検索対象のソースプログラムを予め解析し
て記憶させたものであることを特徴とする請求項1記載
の文字列検索表示装置。
2. The structure of components such as libraries and modules stored in the storage means, information on relations, and a list of functions used in each component are stored in a source program to be searched using a language analyzer. 2. The character string search and display device according to claim 1, wherein the character string is analyzed and stored in advance.
【請求項3】 前記一部の構成要素は、検索対象のソー
スプログラムの階層方向のレベルで指定することを特徴
とする請求項1記載の文字列検索表示装置。
3. The character string search display device according to claim 1, wherein said some components are specified at a hierarchical level of a source program to be searched.
JP10246655A 1998-09-01 1998-09-01 Character string retrieval and display device Pending JP2000076053A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10246655A JP2000076053A (en) 1998-09-01 1998-09-01 Character string retrieval and display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10246655A JP2000076053A (en) 1998-09-01 1998-09-01 Character string retrieval and display device

Publications (1)

Publication Number Publication Date
JP2000076053A true JP2000076053A (en) 2000-03-14

Family

ID=17151657

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10246655A Pending JP2000076053A (en) 1998-09-01 1998-09-01 Character string retrieval and display device

Country Status (1)

Country Link
JP (1) JP2000076053A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018693A (en) * 2004-07-02 2006-01-19 Fujitsu Ltd Similar source code extraction program, similar source code extraction device and similar source code extraction method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006018693A (en) * 2004-07-02 2006-01-19 Fujitsu Ltd Similar source code extraction program, similar source code extraction device and similar source code extraction method

Similar Documents

Publication Publication Date Title
US7313588B1 (en) Locally executing software agent for retrieving remote content and method for creation and use of the agent
US6626953B2 (en) System and method for retrieving software release information
US7333978B2 (en) Searching to identify web page(s)
US6405216B1 (en) Internet-based application program interface (API) documentation interface
US8296654B2 (en) Automatic guide for data analysis
US6502233B1 (en) Automated help system for reference information
US6434554B1 (en) Method for querying a database in which a query statement is issued to a database management system for which data types can be defined
US7797627B2 (en) Method and apparatus for providing a graphical user interface for creating and editing a mapping of a first structural description to a second structural description
US7770123B1 (en) Method for dynamically generating a “table of contents” view of a HTML-based information system
US20030088643A1 (en) Method and computer system for isolating and interrelating components of an application
US20080263434A1 (en) Method, Apparatus, and Program for Creating Bookmark Symlinks
US7661053B2 (en) Methods and apparatus for patternizing device responses
KR100463667B1 (en) System for processing patent materials, its method
JP2000339312A (en) System for editing document and method for generating tag information management table
JPH05135108A (en) Method and apparatus for organizing database
JPH08137678A (en) Program generating method
JP2003141174A (en) Application program interface for semantically labeling string and realizing operation on basis of semantically labeled string
US20060101392A1 (en) Strongly-typed UI automation model generator
JPH08305616A (en) Data management system
JP4084647B2 (en) Information search system, information search method, and information search program
US20090228678A1 (en) Mapping definition creation system and mapping definition creation program
JPH11102289A (en) Screen generating method for operation process
JP2000076053A (en) Character string retrieval and display device
US6564200B1 (en) Apparatus for cross referencing routines and method therefor
EP1428113A2 (en) Navigation in computer software applications developed in a procedural language