JPH0954704A - Automatic test program generating system for language processor - Google Patents

Automatic test program generating system for language processor

Info

Publication number
JPH0954704A
JPH0954704A JP7205667A JP20566795A JPH0954704A JP H0954704 A JPH0954704 A JP H0954704A JP 7205667 A JP7205667 A JP 7205667A JP 20566795 A JP20566795 A JP 20566795A JP H0954704 A JPH0954704 A JP H0954704A
Authority
JP
Japan
Prior art keywords
test
program
test item
syntax
item
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
JP7205667A
Other languages
Japanese (ja)
Inventor
Shigenori Tanji
茂典 丹治
Masao Koike
政男 小池
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 JP7205667A priority Critical patent/JPH0954704A/en
Publication of JPH0954704A publication Critical patent/JPH0954704A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)
  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain comprehensibility for all program syntax and functions by generating a test item not depending on the program syntax and generating a test program according to the test item. SOLUTION: A test item generation processing part 10 generates the test item not depending on the program syntax for the range of number of structure and number of nests in one test program based on the input of an operator. Then, comparative evaluation is performed with the test item generated by a test item evaluation processing part 11, and the duplication of syntax of the test item is excluded by eliminating the same syntax. Also, a program constituent sampling part 12 samples program constituents such as structure, a text, an equation and an element, etc., from the program syntax of a language processor set as a test target. Then, a test program generating part 13 automatically generates the test program based on the program constituent and the test item from which duplication is eliminated. In this way, the test of the language processor is performed with high efficiency.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、言語プロセッサ(Lang
uage Processor)のテストプログラムの作成技術に関
し、特に、各言語プロセッサの言語仕様に対応したテス
トプログラムを効率良く作成するのに好適な言語プロセ
ッサのテストプログラム自動作成システムに関するもの
である。
BACKGROUND OF THE INVENTION The present invention relates to a language processor (Lang
TECHNICAL FIELD The present invention relates to a technique for creating a test program for a language processor, and more particularly to a test program automatic creation system for a language processor suitable for efficiently creating a test program corresponding to the language specification of each language processor.

【0002】[0002]

【従来の技術】言語プロセッサは、各々固有の言語仕様
(プログラム構文)を持ち、そのプログラム構文に従っ
て記述された原始プログラムを入力して構文解析を行な
い、その解析情報を用いて、言語プロセッサ内部で使用
する内部中間語に変換し、実行形式である目的プログラ
ムを生成する。また、言語プロセッサは、目的プログラ
ムの実行速度を上げるために、プログラム構文から抽出
した式や文、ループ構造などのプログラムの構成要素に
着目した最適化処理機能を備えているものがほとんどで
あり、さらに、ループに対するベクトル化命令の適用を
行なうベクトル化処理機能を備えているものもある。
2. Description of the Related Art Language processors each have a unique language specification (program syntax). A source program written in accordance with the program syntax is input to perform syntax analysis, and the analysis information is used inside the language processor. Convert to the internal intermediate language to be used and generate the target program that is the execution format. Also, most language processors have an optimization processing function that focuses on the constituent elements of the program such as expressions and statements extracted from the program syntax, loop structure, etc. in order to increase the execution speed of the target program, Further, some of them have a vectorization processing function for applying a vectorization instruction to a loop.

【0003】言語プロセッサは、原始プログラムの構文
解析で得た解析情報のパターンによって、異なった様々
な処理を実行する。従って、これらの言語プロセッサの
テストを行なうに当たっては、文とデータの属性、およ
び、文と文の組合せ(プログラムパターン)等に着目し
たテストが必要であり、このようなテスト項目を人為的
に作成して、そのテスト項目に基づいてテストプログラ
ムを作成する必要がある。
The language processor executes various different processes depending on the pattern of analysis information obtained by the syntax analysis of the source program. Therefore, when testing these language processors, it is necessary to test the attributes of sentences and data, and the combinations of sentences (sentences) (program patterns), and to artificially create such test items. Then, it is necessary to create a test program based on the test item.

【0004】特に、最適化処理機能やベクトル化処理機
能では、文と文の組み合わせ、または変数や式の出現位
置など、テスト条件の組み合わせが膨大にあり、それよ
うにテスト項目やテストプログラムを人為的に作成する
ことは不可能であり、コンピュータによる自動作成およ
び自動評価が必要である。さらに、言語仕様が複雑にな
るにつれて、プログラム構文を理解し、これに即した検
査項目の作成・評価を人為的に行なうことは困難であ
る。
In particular, in the optimization processing function and the vectorization processing function, there are a huge number of combinations of test conditions such as a combination of sentences and the appearance positions of variables and expressions, and thus the test items and test programs are artificially changed. It is impossible to create it automatically, and automatic creation and automatic evaluation by computer are necessary. Further, as the language specifications become more complicated, it is difficult to understand the program syntax and artificially create and evaluate the inspection items in accordance with this.

【0005】このようなテスト項目やテストプログラム
を自動的に作成する技術、また、例えば本発明の発明者
等による特願平4−145239号公報に記載のよう
に、テスト項目とテストプログラムの両方を自動的に作
成する技術が知られている。テストプログラムの自動作
成技術としては、システムテストするデータ項目の属性
と、一定のテスト実行結果を得るための基本命令を記述
したテスト項目記述とをパラメータとして入力・解析
し、これによって、データ項目の組合せを全て使った基
本命令のテストプログラムと、テストプログラムを実行
するためのジョブ制御言語を作成するものが知られてい
る。また、複数のテストプログラムを自動的に併合し、
組合せにより新たなテストプログラムを複数作成する技
術が知られている。
A technique for automatically creating such a test item or a test program, or both a test item and a test program as described in, for example, Japanese Patent Application No. 4-145239 by the inventors of the present invention. A technique for automatically creating is known. As an automatic test program creation technology, the attributes of the data items to be system tested and the test item description that describes the basic instructions for obtaining a certain test execution result are input and analyzed as parameters, and the data item It is known to create a test program of basic instructions using all combinations and a job control language for executing the test program. It also automatically merges multiple test programs,
A technique of creating a plurality of new test programs by combining them is known.

【0006】また、テスト項目とテストプログラムの両
方を自動的に作成する技術(特願平4−145239号
公報)では、まず、予め構造データ、文データ、式デー
タ、要素データの各ファイルにデータ記述パラメータを
用いて記述されたテスト条件の、言語プロセッサの最適
化機能やベクトル化機能などに対応した組み合わせ方法
の指定を入力し、これら最適化機能やベクトル化機能な
どのテスト項目として必要なプログラムの条件、プログ
ラム中の文、式、要素の種別、および、出現位置の条件
を全て組み合わせたテスト項目を作成する(テスト項目
生成処理)。次に、作成したテスト項目を相互に比較評
価して重複の無いものとする(テスト項目比較・抽出処
理)。そして、残ったテスト項目を入力して、これらの
テスト項目に即したテストプログラムを作成する(テス
トプログラム生成処理)。このようにして、テスト項
目、および、そのテスト項目に対応したテストプログラ
ムを自動的に作成することができる。
In the technique for automatically creating both test items and test programs (Japanese Patent Application No. 4-145239), first, data is previously stored in each file of structure data, sentence data, formula data, and element data. A program that is required as a test item for the optimization function or vectorization function by inputting the specification of the combination method corresponding to the optimization function or vectorization function of the language processor of the test conditions described using the description parameters. A test item is created by combining all of the conditions, the statement in the program, the expression, the type of element, and the condition of the appearance position (test item generation process). Next, the created test items are compared and evaluated with each other so that there is no duplication (test item comparison / extraction processing). Then, the remaining test items are input to create a test program suitable for these test items (test program generation process). In this way, a test item and a test program corresponding to the test item can be automatically created.

【0007】しかし、これらの従来技術は、言語仕様に
強く依存したテスト項目を作成し、そのテスト項目に基
づきテストプログラムを自動作成するものである。従っ
て、全てのプログラム構文に対して網羅性のあるテスト
プログラムの作成はできない。また、基本命令に対する
テスト項目やテストプログラム、または最適化処理機能
やベクトル化処理機能に対するテスト項目やテストプロ
グラムといった、ある特定の機能に着目したテスト項目
やテストプログラムを作成することはできるが、全ての
機能について網羅性のあるテスト項目およびテストプロ
グラムを作成することはできない。
However, these conventional techniques create test items that strongly depend on language specifications and automatically create a test program based on the test items. Therefore, it is impossible to create a complete test program for all program syntaxes. You can also create test items and test programs that focus on certain specific functions, such as test items and test programs for basic instructions, or test items and test programs for optimization processing functions and vectorization processing functions. It is not possible to create test items and test programs that are comprehensive about the functions of.

【0008】[0008]

【発明が解決しようとする課題】解決しようとする問題
点は、従来の技術では、プログラム構文に依存しないテ
スト項目を作成することができない点である。本発明の
目的は、これら従来技術の課題を解決し、全てのプログ
ラム構文および機能に対して網羅性のあるテストプログ
ラムを作成でき、言語プロセッサのテストの高効率化を
可能とする言語プロセッサのテストプログラム自動作成
システムを提供することである。
The problem to be solved is that the conventional technique cannot create a test item that does not depend on the program syntax. An object of the present invention is to solve these problems of the prior art, to create a test program that is comprehensive for all program syntaxes and functions, and to improve the efficiency of language processor testing. It is to provide an automatic program creation system.

【0009】[0009]

【課題を解決するための手段】上記目的を達成するた
め、本発明の言語プロセッサのテストプログラム自動作
成システムは、操作者からの入力に基づき、「1つのテ
ストプログラム中の構造の数の範囲およびネスト数の範
囲」、「1つの構造中の文数の範囲」、「1つの文中の
式の数の範囲」、「1つの式中の要素の数の範囲」等、
言語仕様に依存しないテスト項目を作成するテスト項目
作成処理部10と、このテスト項目作成処理部10で作
成したテスト項目から重複するテスト項目を取り除くテ
スト項目評価処理部11と、テスト対象となる言語プロ
セッサのプログラム構文から、少なくとも構造、文、
式、要素を含むプログラム構成要素を抽出するプログラ
ム構成要素抽出処理部12と、このプログラム構成要素
抽出処理部12で抽出したプログラム構成要素、およ
び、テスト項目作成処理部10で作成しテスト項目評価
処理部11で重複を取り除いたテスト項目に基づき、テ
ストプログラムを作成するテストプログラム作成処理部
13とを少なくとも具備することを特徴とする。
In order to achieve the above object, an automatic test program creation system for a language processor according to the present invention provides a "range of the number of structures in one test program and a range based on an input from an operator. "Nest number range", "Sentence number range in one structure", "Expression number range in one sentence", "Number of elements in one expression", etc.
A test item creation processing unit 10 that creates test items that do not depend on language specifications, a test item evaluation processing unit 11 that removes duplicate test items from the test items created by the test item creation processing unit 10, and a language to be tested. From the program syntax of the processor, at least the structure, statement,
A program component extraction processing unit 12 for extracting program components including expressions and elements, a program component extracted by the program component extraction processing unit 12, and a test item evaluation process created by the test item creation processing unit 10. At least a test program creation processing unit 13 that creates a test program based on the test items from which duplication has been removed by the unit 11 is provided.

【0010】[0010]

【作用】本発明においては、まず、オペレータが入力し
たテスト方針に基づき、1つのテストプログラム中の構
造の数の範囲およびネスト数の範囲、1つの構造中の文
数の範囲、1つの文中の式の数の範囲、1つの式中の要
素の数の範囲等、プログラム構文(言語仕様)に依存し
ないテスト項目を作成する。次に、作成したテスト項目
に同一のものがないか否か比較評価を行ない、同一のも
のを排除してテスト項目の重複を防ぐ。また、テスト対
象となる言語プロセッサのプログラム構文から、構造、
文、式、要素などのプログラム構成要素を抽出し、コン
ピュータ処理に適した構造に変換する。そして、変換し
たプログラム構成要素、および、重複が排除されたテス
ト項目とに基づき、テストプログラムを自動作成する。
このように、プログラム構文に依存しないテスト項目を
作成し、このテスト項目に従ってテストプログラムを作
成するので、このテストプログラムは、全てのプログラ
ム構文および機能に対して網羅性のあるものとなる。
According to the present invention, first, based on the test policy input by the operator, the range of the number of structures and the range of the number of nests in one test program, the range of the number of statements in one structure, and the range of the number of statements in one structure Create test items that do not depend on the program syntax (language specification), such as the range of the number of expressions and the range of the number of elements in one expression. Next, the created test items are compared and evaluated to see if they are the same, and the same items are excluded to prevent duplication of the test items. In addition, from the program syntax of the language processor to be tested, the structure,
Extracts program components such as sentences, expressions, and elements, and transforms them into a structure suitable for computer processing. Then, a test program is automatically created on the basis of the converted program components and the duplicated test items.
As described above, since the test item that does not depend on the program syntax is created and the test program is created according to this test item, the test program is complete for all program syntaxes and functions.

【0011】[0011]

【実施例】以下、本発明の実施例を、図面により詳細に
説明する。図1は、本発明の言語プロセッサのテストプ
ログラム自動作成システムの本発明に係る構成の一実施
例を示すブロック図である。本図1において、1はCP
U(Central Processing Unit、中央処理装置)やメイ
ンメモリを具備して蓄積プログラム方式により本発明に
係るテストプログラム作成を含む種々の処理を行なう情
報処理装置、2はキーボードやCRT(Cathode Ray Tu
be、陰極線管)等からなるデータターミナル、3は磁気
ディスク等からなる記憶装置である。
Embodiments of the present invention will now be described in detail with reference to the drawings. FIG. 1 is a block diagram showing an embodiment of a configuration according to the present invention of an automatic test program creation system for a language processor of the present invention. In FIG. 1, 1 is CP
An information processing device 2 having a U (Central Processing Unit) and a main memory and performing various processes including a test program creation according to the present invention by a storage program method, a keyboard 2 and a CRT (Cathode Ray Tu).
be, a cathode ray tube) and the like, and a data terminal 3 including a magnetic disk and the like.

【0012】情報処理装置1には、本発明に係る言語プ
ロセッサのテストプログラム自動作成を行なうテスト項
目作成処理部10、テスト項目評価処理部11、プログ
ラム構文要素抽出部12、テストプログラム作成処理部
13が設けられている。また、記憶装置3には、情報処
理装置1の各処理部で参照、あるいは作成されるテスト
項目ファイル30、テスト項目作成履歴ファイル31、
テスト項目マスタファイル32、プログラム構文記述フ
ァイル33、プログラム構成要素ファイル34、テスト
プログラムファイル35が格納されている。
The information processing apparatus 1 includes a test item creation processing unit 10, a test item evaluation processing unit 11, a program syntax element extraction unit 12, and a test program creation processing unit 13 for automatically creating a test program for a language processor according to the present invention. Is provided. In the storage device 3, a test item file 30, a test item creation history file 31, which is referred to or created by each processing unit of the information processing device 1,
A test item master file 32, a program syntax description file 33, a program component file 34, and a test program file 35 are stored.

【0013】以下、このような構成のテストプログラム
自動作成システムによる言語プロセッサのテストプログ
ラムの作成動作を説明する。まず、テストプログラムの
作成者が、データターミナル2から、テスト方針に基づ
き、例えば、新規に自動作成するテストプログラム全体
の行数や、1つのテストプログラム中の構造の数の範囲
およびネスト数の範囲、1つの構造中の文数の範囲、1
つの文中の式の数の範囲、1つの式中の要素の数の範囲
等、プログラム構文(言語仕様)に依存しないデータ
を、入力パラメータとして入力すると、情報処理装置1
は、テスト項目作成処理部10の図6に詳細を示す処理
により、図2にその詳細を示す内容のテスト項目ファイ
ル30を作成する。
The operation of creating a test program for a language processor by the test program automatic creation system having the above-described configuration will be described below. First, the test program creator uses the data terminal 2 based on the test policy, for example, the number of lines of the entire test program to be newly automatically created, the range of the number of structures in one test program, and the range of the number of nests. Range of number of sentences in one structure, 1
When data that does not depend on the program syntax (language specification) such as the range of the number of expressions in one sentence and the range of the number of elements in one expression is input as an input parameter, the information processing device 1
2 creates the test item file 30 having the details shown in FIG. 2 by the process shown in FIG. 6 by the test item creation processing unit 10.

【0014】すなわち、テスト項目作成処理部10は、
図6の処理において、まず、入力パラメータを解析する
(ステップ100)。次に、その解析結果に基づき、1
つのプログラム中の構造の数の範囲および、ネスト数の
範囲の決定(ステップ101)、1つの構造中の文数の
範囲の決定(ステップ102)、1つの文中の式数の範
囲の決定(ステップ103)、1つの式中の要素データ
数の範囲の決定(ステップ104)、および、プログラ
ムの行数(ステップ数)の決定(ステップ105)を行
なう。そして、決定された各数の範囲を組み合わせるこ
とによって、組み合わせテスト項目を自動的に作成し
(ステップ106)、作成した組み合わせテスト項目を
テスト項目ファイルへ出力する(ステップ107)。
That is, the test item creation processing unit 10
In the process of FIG. 6, first, the input parameters are analyzed (step 100). Next, based on the analysis result,
Determination of range of number of structures and nest number in one program (step 101), determination of range of number of statements in one structure (step 102), determination of range of number of expressions in one sentence (step) 103) The range of the number of element data in one formula is determined (step 104), and the number of lines (the number of steps) of the program is determined (step 105). Then, the combination test items are automatically created by combining the determined number ranges (step 106), and the created combination test items are output to the test item file (step 107).

【0015】この処理の結果、図2に示すように、テス
ト項目ファイル30には、各項目番号(1,2〜10)
別にテスト項目データが登録される。例えば、項目番号
「1」として、ステップ数「100」、1つのプログラ
ム中の構造の数の範囲「3以上5未満」、ネスト数の範
囲「10以上20未満」、1つの構造中の文の数の範囲
「5以上15未満」、1つの文中の式の数の範囲「3以
上20未満」、そして、1つの式中の要素の数の範囲
「2以上4未満」の組み合わせテスト項目が登録され
る。
As a result of this processing, as shown in FIG. 2, each item number (1, 2 to 10) is stored in the test item file 30.
Test item data is registered separately. For example, as the item number “1”, the number of steps is “100”, the range of the number of structures in one program is “3 or more and less than 5”, the range of the nest number is “10 or more and less than 20”, and the number of statements in one structure is Combination test items of number range “5 or more and less than 15”, number range of expressions in one sentence “3 or more and less than 20”, and range of number of elements in one expression “2 or more and less than 4” are registered. To be done.

【0016】これら、テスト項目ファイル30に登録さ
れているテスト項目は、プログラム構文に依存しないも
のであるが、これらのテスト項目は、図1のテスト項目
作成処理部10により重複して作成されている可能性が
ある。しかし、これらのテスト項目は、一定の規則で表
現されているので、構造の数、文の数、式の数などは、
新しく作成したものと同じものが図1のテスト項目作成
履歴ファイル31にあるか否かを容易に調べることがで
き、同一か否かの評価が可能である。そこで、図1のテ
スト項目評価処理部11により、図7に詳細を示す比較
評価処理を行ない、このような重複を回避する。その結
果、図1におけるテスト項目マスタファイル32が得ら
れる。
Although the test items registered in the test item file 30 do not depend on the program syntax, these test items are redundantly created by the test item creation processing unit 10 in FIG. There is a possibility that However, since these test items are expressed by a certain rule, the number of structures, the number of sentences, the number of expressions, etc.
It is possible to easily check whether or not the same as the newly created one exists in the test item creation history file 31 in FIG. 1, and it is possible to evaluate whether or not the same. Therefore, the test item evaluation processing unit 11 of FIG. 1 performs the comparative evaluation process shown in detail in FIG. 7 to avoid such duplication. As a result, the test item master file 32 in FIG. 1 is obtained.

【0017】すなわち、図1のテスト項目評価処理部1
1は、図7の処理において、図1のテスト項目作成処理
部10により作成されたテスト項目データを入力し(ス
テップ200)、以下の処理を、最後のテスト項目まで
繰り返す。まず、図1のテスト項目作成履歴ファイル3
1の登録内容と比較し(ステップ202)、同一項目が
存在するか否かを判別する(ステップ203)。存在し
なければ、新しいテスト項目と判断して、図1のテスト
項目作成履歴ファイル31を更新し(ステップ20
4)、図1のテスト項目マスタファイル32への出力を
行なう(ステップ205)。尚、ステップ203の処理
において、同一項目が存在すれば、ステップ200に戻
り次のテスト項目データを入力する。
That is, the test item evaluation processing unit 1 of FIG.
1 inputs the test item data created by the test item creation processing unit 10 of FIG. 1 in the process of FIG. 7 (step 200), and repeats the following processes up to the last test item. First, the test item creation history file 3 in FIG.
It is compared with the registered content of 1 (step 202) and it is determined whether or not the same item exists (step 203). If it does not exist, it is judged as a new test item and the test item creation history file 31 of FIG. 1 is updated (step 20).
4), output to the test item master file 32 of FIG. 1 (step 205). If the same item exists in the process of step 203, the process returns to step 200 to input the next test item data.

【0018】このようにして、図1のテスト項目評価処
理部11の処理が終了すると、図1の情報処理装置1
は、図1のプログラム構成要素抽出処理部12を起動
し、図8に詳細を示す処理を行なう。すなわち、図1の
プログラム構成要素抽出処理部12は、図8の処理にお
いて、図1のプログラム構文記述ファイル33に登録さ
れている(図3にその具体例を示す)テスト対象となる
言語プロセッサのプログラム構文から、構成要素を入力
し(ステップ300)、以下の処理を、最後の構成要素
入力まで繰り返す。
When the processing of the test item evaluation processing unit 11 of FIG. 1 is completed in this way, the information processing apparatus 1 of FIG.
Activates the program component extraction processing unit 12 of FIG. 1 and performs the processing shown in detail in FIG. That is, the program component extraction processing unit 12 of FIG. 1 is a test target language processor registered in the program syntax description file 33 of FIG. 1 (a specific example thereof is shown in FIG. 3) in the process of FIG. A component is input from the program syntax (step 300), and the following processing is repeated until the last component input.

【0019】入力した構成要素の要素種別が「要素」で
あるか(ステップ302)、「式」であるか(ステップ
303)、「文」であるか(ステップ304)、あるい
は「構造」であるか(ステップ305)を順に判定し、
それぞれの要素種別に対応して構成要素の登録を行なう
(ステップ306〜309)。尚、ステップ305にお
いて否(N)であれば、「予約語(各プログラム言語の
中で意味や用法が予め決められており、ユーザが独自の
変数名などに使用することができない綴り)」の登録を
行なう(ステップ310)。そして、最後の構成要素に
対する処理が終了したならば、それぞれ登録したプログ
ラム構成要素を、図1のプログラム構成要素ファイル3
4に出力して(ステップ311)、処理を終了する。
The element type of the input component is "element" (step 302), "expression" (step 303), "sentence" (step 304), or "structure". Or (step 305) is determined in order,
The constituent elements are registered corresponding to each element type (steps 306 to 309). If the answer is NO in step 305, "reserved word (spelling in which meaning and usage are predetermined in each programming language and cannot be used by the user for unique variable name)" Registration is performed (step 310). Then, when the processing for the last component is completed, the registered program component is changed to the program component file 3 in FIG.
4 (step 311), and the process ends.

【0020】図3は、図1におけるプログラム構文記述
ファイルの記述例を示す説明図である。本例は、テスト
対象の言語プロセッサのプログラム構文のデータファイ
ル構成の一例を示し、この記述規則に従ってテスト対象
の言語プロセッサのプログラム構文が全て図1のプログ
ラム構文記述ファイル33において記述されている。
FIG. 3 is an explanatory diagram showing a description example of the program syntax description file in FIG. This example shows an example of the data file structure of the program syntax of the language processor to be tested, and the program syntax of the language processor to be tested is all described in the program syntax description file 33 of FIG. 1 according to this description rule.

【0021】図4は、図1におけるプログラム構成要素
抽出処理部が参照する表の記述例を示す説明図である。
本図は、図1,図3におけるプログラム構文記述ファイ
ルで使用される各データ記述パラメータの意味を説明す
る表を示している。本例では、データ記述パラメータは
「|」,「 '」,「[ ]」,「{ ! }」,「 ; 」の5種
類があり、図1のプログラム構成要素抽出処理部12
は、これらの各データ記述パラメータに対する意味を参
照して、図3に示すプログラム構成記述の内容を、図5
に示すデータ構成のプログラム構成要素ファイルに変換
する。
FIG. 4 is an explanatory diagram showing a description example of a table referred to by the program component extraction processing unit in FIG.
This figure shows a table for explaining the meaning of each data description parameter used in the program syntax description file in FIGS. In this example, there are five types of data description parameters, "|", "'", "[]", "{!}", And ";", and the program component extraction processing unit 12 of FIG.
Referring to the meanings of these data description parameters, the contents of the program configuration description shown in FIG.
Convert to a program component file with the data structure shown in.

【0022】図5は、図1におけるプログラム構成要素
ファイルの記述例を示す説明図である。本図は、図1の
プログラム構成要素抽出処理部12により、図3に示す
プログラム構文記述ファイル33から抽出したプログラ
ム構成要素のデータ構成ファイルを示しており、構成要
素名「if文」や「ブロック」等に対応する構文が格納
されている。
FIG. 5 is an explanatory diagram showing a description example of the program component file in FIG. This figure shows a data configuration file of program components extracted from the program syntax description file 33 shown in FIG. 3 by the program component extraction processing unit 12 of FIG. , Etc. are stored.

【0023】このようにしてプログラム構文から抽出さ
れたプログラム構成要素と、図6,図7における処理で
作成・評価されたテスト項目とに基づき、図1のテスト
プログラム作成処理部13により、図9に詳細を示すテ
ストプログラム作成処理を行ない、テストプログラムを
自動的に作成し、図1におけるテストプログラムファイ
ル35が得られる。
Based on the program components extracted from the program syntax in this manner and the test items created and evaluated in the processing in FIGS. 6 and 7, the test program creation processing unit 13 in FIG. The test program creation process shown in FIG. 1 is performed to automatically create the test program, and the test program file 35 in FIG. 1 is obtained.

【0024】すなわち、図1のテストプログラム作成処
理部13は、図9の処理において、図1のテスト項目マ
スタファイル32からテスト項目を入力して(ステップ
400)、以下の処理を、最後のテスト項目入力まで繰
り返す(ステップ401)。まず、構造の決定を行い
(ステップ402)、以下、文、式、要素の決定を行う
(ステップ403〜405)。次に、変数名称の割当て
を行ない(ステップ406)、変数宣言文の生成(ステ
ップ407)と、結果出力文の生成を行い(ステップ4
08)、そして、図1のテストプログラムファイル35
へ出力する(ステップ409)。
That is, the test program creation processing unit 13 of FIG. 1 inputs test items from the test item master file 32 of FIG. 1 in the process of FIG. 9 (step 400), and executes the following process as the final test. Repeat until item input (step 401). First, the structure is determined (step 402), and then the sentences, expressions, and elements are determined (steps 403-405). Next, a variable name is assigned (step 406), a variable declaration statement is generated (step 407), and a result output statement is generated (step 4).
08), and the test program file 35 of FIG.
(Step 409).

【0025】以上、図1〜図9を用いて説明したよう
に、本実施例の言語プロセッサのテストプログラム自動
作成システムでは、まず、操作者からの入力に基づき、
「1つのテストプログラム中の構造の数の範囲」および
「ネスト数の範囲」、「1つの構造中の文数の範囲」、
「1つの文中の式の数の範囲」、「1つの式中の要素の
数の範囲」等、プログラム構文(言語仕様)に依存しな
いテスト項目を作成し、次に、作成した各テスト項目の
比較・評価を行い、重複のないテスト項目を登録する。
このように、テスト項目を、プログラム構文に依存しな
いものとすることにより、全てのプログラム構文に対し
て網羅性を持たせることができ、言語プロセッサテスト
の基本項目から組み合わせ項目までの重複の無いテスト
項目を容易に自動作成することができる。
As described above with reference to FIGS. 1 to 9, in the test program automatic generation system for the language processor of this embodiment, first, based on the input from the operator,
"Range of number of structures in one test program" and "range of number of nests", "Range of number of statements in one structure",
Create test items that do not depend on the program syntax (language specification) such as "range of the number of expressions in one sentence" and "range of the number of elements in one expression". Perform comparison / evaluation and register test items without duplication.
In this way, by making the test items independent of the program syntax, it is possible to have completeness for all program syntaxes, and to ensure that there are no duplicated tests from the basic items of the language processor test to the combination items. Items can be automatically created easily.

【0026】また、予め登録されたプログラム構文を入
力・解析することによって構造、文、式、要素等のプロ
グラム構成要素を抽出する。そして、作成・評価し登録
したテスト項目と抽出したプログラム構成要素に基づ
き、テストプログラムの作成を行なう。このことによ
り、全てのプログラム構文に対して網羅性のあるテスト
プログラムの作成が可能となる。尚、本発明は、図1〜
図9を用いて説明した実施例に限定されるものではな
く、その要旨を逸脱しない範囲において種々変更可能で
ある。
Further, by inputting / analyzing a program syntax registered in advance, program constituent elements such as structures, sentences, expressions and elements are extracted. Then, a test program is created based on the created / evaluated and registered test items and the extracted program components. This makes it possible to create a test program that is comprehensive for all program syntaxes. The present invention is shown in FIGS.
The embodiment is not limited to the embodiment described with reference to FIG. 9, and various modifications can be made without departing from the spirit of the invention.

【0027】[0027]

【発明の効果】本発明によれば、プログラム構文に依存
しないテスト項目を作成することができ、全てのプログ
ラム構文および機能に対して網羅性のあるテストプログ
ラムを作成でき、言語プロセッサのテストの高効率化が
可能である。
According to the present invention, a test item that does not depend on the program syntax can be created, a test program that is complete for all program syntaxes and functions can be created, and the test of the language processor can be improved. Efficiency can be improved.

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

【図1】本発明の言語プロセッサのテストプログラム自
動作成システムの本発明に係る構成の一実施例を示すブ
ロック図である。
FIG. 1 is a block diagram showing an embodiment of a configuration according to the present invention of a language processor test program automatic generation system of the present invention.

【図2】図1におけるテスト項目ファイルのデータ構成
例を示す説明図である。
FIG. 2 is an explanatory diagram showing a data configuration example of a test item file in FIG.

【図3】図1におけるプログラム構文記述ファイルの記
述例を示す説明図である。
FIG. 3 is an explanatory diagram showing a description example of a program syntax description file in FIG.

【図4】図1におけるプログラム構成要素抽出処理部が
参照する表の記述例を示す説明図である。
4 is an explanatory diagram showing a description example of a table referred to by a program component extraction processing unit in FIG. 1. FIG.

【図5】図1におけるプログラム構成要素ファイルの記
述例を示す説明図である。
5 is an explanatory diagram showing a description example of a program component file in FIG. 1. FIG.

【図6】図1におけるテスト項目作成処理部の本発明に
係る処理動作例を示すフローチャートである。
FIG. 6 is a flowchart showing an example of the processing operation according to the present invention of the test item creation processing unit in FIG.

【図7】図1におけるテスト項目評価処理部の本発明に
係る処理動作例を示すフローチャートである。
7 is a flowchart showing an example of the processing operation according to the present invention of the test item evaluation processing unit in FIG.

【図8】図1におけるプログラム構成要素抽出処理部の
本発明に係る処理動作例を示すフローチャートである。
FIG. 8 is a flowchart showing an example of the processing operation according to the present invention of the program component extraction processing unit in FIG.

【図9】図1におけるテストプログラム作成処理部の本
発明に係る処理動作例を示すフローチャートである。
9 is a flowchart showing an example of the processing operation according to the present invention of the test program creation processing unit in FIG.

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

1:情報処理装置、2:データターミナル、3:記憶装
置、10:テスト項目作成処理部、11:テスト項目評
価処理部、12:プログラム構成要素抽出処理部、1
3:テストプログラム作成処理部、30:テスト項目フ
ァイル、31:テスト項目作成履歴ファイル、32:テ
スト項目マスタファイル、33:プログラム構文記述フ
ァイル、34:プログラム構成要素ファイル、35:テ
ストプログラムファイル。
1: Information processing device, 2: Data terminal, 3: Storage device, 10: Test item creation processing unit, 11: Test item evaluation processing unit, 12: Program component extraction processing unit, 1
3: test program creation processing unit, 30: test item file, 31: test item creation history file, 32: test item master file, 33: program syntax description file, 34: program component file, 35: test program file.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 言語プロセッサのテストプログラムを自
動作成するシステムであって、操作者からの入力に基づ
き、言語仕様に依存しないテスト項目を作成するテスト
項目作成手段と、該テスト項目作成手段で作成したテス
ト項目から重複するテスト項目を取り除くテスト項目評
価手段と、テスト対象となる言語プロセッサのプログラ
ム構文から、少なくとも構造、文、式、要素を含むプロ
グラム構成要素を抽出するプログラム構成要素抽出手段
と、該抽出したプログラム構成要素、および、上記作成
して重複を取り除いたテスト項目に基づき、テストプロ
グラムを作成するテストプログラム作成手段とを少なく
とも具備することを特徴とする言語プロセッサのテスト
プログラム自動作成システム。
1. A system for automatically creating a test program for a language processor, comprising: a test item creating means for creating a test item independent of a language specification based on an input from an operator; and a test item creating means for creating the test item. A test item evaluation means for removing duplicate test items from the tested test item, and a program component extraction means for extracting a program component including at least a structure, a sentence, an expression, and an element from the program syntax of the language processor to be tested, An automatic test program creation system for a language processor, comprising at least a test program creation means for creating a test program based on the extracted program components and the test items created and removed of the duplicated test items.
JP7205667A 1995-08-11 1995-08-11 Automatic test program generating system for language processor Pending JPH0954704A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP7205667A JPH0954704A (en) 1995-08-11 1995-08-11 Automatic test program generating system for language processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP7205667A JPH0954704A (en) 1995-08-11 1995-08-11 Automatic test program generating system for language processor

Publications (1)

Publication Number Publication Date
JPH0954704A true JPH0954704A (en) 1997-02-25

Family

ID=16510703

Family Applications (1)

Application Number Title Priority Date Filing Date
JP7205667A Pending JPH0954704A (en) 1995-08-11 1995-08-11 Automatic test program generating system for language processor

Country Status (1)

Country Link
JP (1) JPH0954704A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001028585A (en) * 1999-07-13 2001-01-30 Sony Corp Distribution content generating method, method and device for distributing content, and code converting method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001028585A (en) * 1999-07-13 2001-01-30 Sony Corp Distribution content generating method, method and device for distributing content, and code converting method

Similar Documents

Publication Publication Date Title
US6941546B2 (en) Method and apparatus for testing a software component using an abstraction matrix
US5920830A (en) Methods and apparatus for generating test vectors and validating ASIC designs
CN110008113B (en) Test method and device and electronic equipment
US20010037492A1 (en) Method and apparatus for automatically extracting verification models
US8701084B1 (en) Preview of auto-fix changes to software code
US20020100022A1 (en) Method and apparatus for automatic verification of properties of a concurrent software system
JPH08202545A (en) Object-oriented system and method for generation of target language code
CN112328226B (en) Embedded system automatic test code generation method and device
CN112416788B (en) Hierarchical standard Web application UI automatic test method
CN108563561B (en) Program implicit constraint extraction method and system
JP2001522084A (en) Method of generating ISA simulator and assembler from machine language description
US11500619B1 (en) Indexing and accessing source code snippets contained in documents
CN108932225B (en) Method and system for converting natural language requirements into semantic modeling language statements
Monteiro et al. Combining natural language processing and blockchain for smart contract generation in the accounting and legal field
Zhang et al. Automated Extraction of Grammar Optimization Rule Configurations for Metamodel-Grammar Co-evolution
JPH11306046A (en) Test case generation system and method
Murawski et al. A contextual equivalence checker for IMJ
JPH08314760A (en) Program development supporting device
JPH0954704A (en) Automatic test program generating system for language processor
CN112965909A (en) Test data, test case generation method and system, and storage medium
Grigorev et al. String-embedded language support in integrated development environment
Cyre et al. Generating validation feedback for automatic interpretation of informal requirements
JPH07146785A (en) Method for automatically generating program and device therefor
JPH09330212A (en) Programming language processing system
Bicarregui et al. Supporting co-use of VDM and B by translation