WO2012104907A1 - プログラムの実行性能評価のためのテストデータ生成方法 - Google Patents
プログラムの実行性能評価のためのテストデータ生成方法 Download PDFInfo
- Publication number
- WO2012104907A1 WO2012104907A1 PCT/JP2011/000556 JP2011000556W WO2012104907A1 WO 2012104907 A1 WO2012104907 A1 WO 2012104907A1 JP 2011000556 W JP2011000556 W JP 2011000556W WO 2012104907 A1 WO2012104907 A1 WO 2012104907A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- source program
- loop
- test data
- basic block
- execution
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3684—Test management for test design, e.g. generating new test cases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/34—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
- G06F11/3409—Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
- G06F11/3414—Workload generation, e.g. scripts, playback
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3624—Software debugging by performing operations on the source code, e.g. via a compiler
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3668—Software testing
- G06F11/3672—Test management
- G06F11/3676—Test management for coverage analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/865—Monitoring of software
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2201/00—Indexing scheme relating to error detection, to error correction, and to monitoring
- G06F2201/88—Monitoring involving counting
Definitions
- This relates to the generation of test data used when evaluating the execution performance of a program executed on a computer.
- An evaluation of execution performance is one of the program test processes. This is done in order to confirm that the developed program can achieve the processing performance standards requested by customers during actual operation.
- test data In order to accurately evaluate the performance of the program during actual operation, it is necessary to prepare test data similar to the data input during actual operation and execute the program using the test data. Therefore, a technique for generating test data for performance evaluation tests is required.
- Patent Document 1 exists as a conventional technique for generating test data for performance evaluation. With this technique, test data can be generated by providing schema information and data generation rules of a database.
- Patent Document 2 shows a method for generating a program used for generating test data for performance evaluation.
- the first problem is that the user needs to specify a method for generating test data. Therefore, in order to generate test data so that the behavior of the performance evaluation target program is similar to that in actual operation, the user needs to investigate the source program and devise appropriate test data generation rules or patterns. .
- the test data generation methods that can be specified are limited, there are cases where an appropriate test data generation method cannot be specified even if it is determined what test data should be generated.
- the second problem is that the prior art is a technique for generating test data for a database and can only be used for performance evaluation of a database program.
- a source program for performance evaluation, sample data, and generation parameters used to determine the size of generated test data are received from the input device.
- the processor executes the source program using the sample data, and obtains the number of executions for each of a plurality of statements in the source program. Furthermore, the test data has a size that is twice the generation parameter of the sample data size, and the execution frequency of each of the plurality of statements in the source program corresponds to each of the plurality of portions when the source program is executed using the sample data. The processor generates test data that is the same as the execution frequency with respect to the number of executions acquired.
- test data of any size that has commonality between sample data and execution characteristics simply by preparing small sample data reflecting the tendency of data input during actual operation. This can reduce the development man-hours required for program performance evaluation.
- FIG. 1 is a diagram showing a configuration example of a computer system in which a test data generation apparatus operates.
- the computer system includes a CPU 101, a main storage device 102, an external storage device 103, an output device 104 such as a display device, and an input device 105 such as a keyboard.
- a source program 106, sample data 107, and a generation parameter 108 which are performance evaluation targets are input from an input device and stored.
- An external storage device 103 in which the source program 106, sample data 107, and generation parameters 108 are stored may be connected to be accessible from the CPU 101 via an interface.
- the main memory 102 holds a test data generation program 109, a compiler 110, a profiler 111, a program executor 112, an execution code 113, intermediate information 114, execution frequency information 115, and test data 116.
- the test data generation process is performed by the CPU 101 executing software stored in the main storage device 102.
- the keyboard 105 is used to give a command from the user to the test data generation program 109.
- the display device 104 notifies the user of the end of test data generation.
- Fig. 2 is a flowchart showing the flow of test data generation processing.
- step 201 the CPU 101 executes the compiler 110, and as a result, the execution code 113 is generated from the source program 106.
- step 201 the compiler first generates a basic block graph from the program.
- a basic block graph is a graph having a basic block (a sequence of statements without a branch) as a node, and is generally used in a compiler to simplify the generation of executable code.
- a method for generating a basic block graph is shown in Non-Patent Document 1.
- the statements in the basic block are executed in order from the top, and after execution of all the statements, the subsequent basic block of that basic block (the basic block corresponding to the end point of the directed edge starting from that basic block) is executed. Move.
- Fig. 13 shows an example of a basic block graph for the program (a) shown in Fig. 4.
- Symbols such as B1 and B2 at the head in each node represent basic block numbers.
- the numbers of the basic block B and the sentence numbers included in the basic block B are represented by ID (B) and STMT (B), respectively.
- the compiler inserts a statement “printf (“ ID (B), ”);” that outputs the basic block number ID (B) as intermediate information 114 at the top of each basic block B.
- the compiler displays the basic block number corresponding to the entry node of the basic block graph of the main function (B1 in FIG. 13), a sequence of the basic block numbers of all the basic blocks and the sentence numbers of the statements constituting the basic block. Is output as intermediate information 114.
- the compiler generates the execution code 113 from the basic block graph in which the printf statement is inserted based on the processing of a normal compiler.
- the execution code 113 when executed, the relationship between the basic block number and the corresponding sentence number column, and the executed basic block number column are recorded as the intermediate information 114.
- the method shown here is an example of a method for acquiring execution frequency information, and has a feature that profile processing can be simplified.
- step 202 the execution code 113 is executed on the sample data 107 by the program executor 112 to generate the intermediate information 114.
- the sample data is input data described in a format that can be processed by the program.
- An example of sample data is data (b) shown in FIG. This example includes three numerical data elements and a terminal symbol (-1) and can be processed by the program (a) shown in FIG.
- FIG. 8 shows intermediate information 114 obtained by executing the execution code 113 obtained from the program (a) shown in FIG. 4 on the data (b) shown in FIG.
- a sequence of basic block numbers and sentence numbers of the sentences making up the basic block is represented for each basic block number by delimiting with a “:” symbol.
- the sentence number columns corresponding to the basic block number B13 are 13,14.
- the last line is a column of executed basic block numbers. This indicates that the basic blocks are executed in the order described from the basic block number B1.
- the profiler 111 generates the execution frequency information 115 from the intermediate information 114.
- the execution frequency information is obtained by arranging the program statement numbers in the order in which the statements are executed.
- An example of the execution frequency information is shown in FIG.
- This example is execution frequency information 115 generated from intermediate information 114 obtained by executing execution code 113 obtained from program (a) shown in FIG. 4 on data (b) shown in FIG. is there.
- the first five in the column are [1,2,3,7,8], which means that the program was executed in the order of statement 1, statement 2, statement 3, statement 7, and statement 8. Represents that.
- the generation of the execution frequency information 115 is performed by replacing the sequence of basic block numbers recorded in the intermediate information 114 with the sequence of statement numbers of the sentences constituting each basic block.
- the execution frequency information 115 in FIG. 5 is generated from the intermediate information 114 in FIG.
- a general profiler has various statistical processing functions such as a function for displaying the number of executions of a function and a function for displaying the number of executions for each statement.
- the present invention requires a statement execution order. It is only a function to obtain a column.
- the test data generation program 109 generates test data 116 for performance evaluation from the source program 106, the generation parameter 108, and the execution frequency information 115.
- the generation parameter is a parameter used to specify the size of the test data to be generated.
- the test data generation program 109 generates test data having a size (size) that is twice the generation parameter of the sample data size.
- FIG. 3 is a flowchart illustrating in detail the flow of processing performed by the CPU 101 executing the test data generation program 109 in step 204.
- a set of all loops is obtained from the source program 106 (referred to as LS).
- the loop is composed of a header that is a sentence for determining an end condition and a main body that is a set of sentences that perform repetition processing. Such information can be obtained using the loop analysis method of Non-Patent Document 1.
- step 302 it is checked whether or not an unprocessed loop remains in the loop set LS. If it remains, the process proceeds to step 304, and one loop is extracted (the extracted loop is L, the L header is H, L Let the body be B).
- step 305 the number of executions of B is obtained based on the execution frequency information 115 (assumed to be N).
- step 306 based on the execution frequency information 115, all paths (program execution paths) in B and the number of times each path is executed are obtained.
- Let PF be the set of paths and their number of executions.
- the path in B can be obtained by taking out the partial sequence sandwiched by the loop header H from the execution frequency information 115, excluding the sentence other than B from each partial sequence, and further eliminating the duplication. For example, in the execution frequency information 115 of FIG.
- step 307 the number of expansions is obtained as the product of the generation parameter and N (denoted as PN).
- step 308 the variable X that holds the sentence string is initialized to empty.
- step 309 it is determined whether the processing in steps 310 to 312 has been executed PN times (whether the repetition has reached PN times). If so, go to Step 313, otherwise go to Step 310.
- step 310 H is duplicated, and the last iteration judgment sentence of the duplicated H is converted into an assert sentence that guarantees that the iteration is established, and added to the end of X.
- step 311 select one path from PF (P).
- the selection is made based on the number of executions of each pass. That is, a multiple set is created by duplicating each path of the PF as many times as the number of executions, and is randomly selected therefrom. For example, if PF includes three paths p1, p2, and p3, and the number of executions is 1, 2, and 3, respectively, create a multiple set ⁇ p1, p2, p2, p3, p3, p3 ⁇ Then, the elements are selected randomly from there. As a result, each path is selected in proportion to the number of executions.
- step 312 duplicate P, convert the conditional branch statement in the duplicated P into an assert statement, and add it to the end of X.
- step 313 L in the source program is replaced with X.
- the result of replacement is PR. Thereafter, the process returns to step 302, and the process moves to an unprocessed loop.
- step 314 input data that passes through all statements of X in PR is generated as test data.
- the generation can be performed using the method of Non-Patent Document 2.
- the generation method is based on the symbol execution method.
- a condition for executing a specified path is obtained while a program is virtually executed using a logical expression expression of an execution state called a symbol state.
- the symbol state is composed of memory contents (such as variable values) and path execution conditions.
- the memory content in the initial state is a logical expression indicating that the value of a variable whose initial value is explicitly specified in the program is equal to the specified value, and the execution condition is true.
- the state is updated based on the meaning of the sentence while sequentially processing the specified path (sentence string). For example, in the case of an assignment statement, a logical expression representing the value on the right side is calculated based on the current state, and the value on the left side is replaced with that expression.
- a logical expression representing the content of the specified condition based on the current state is calculated and added to the execution condition.
- the function defined in the program moves to the beginning of the function and continues execution. For a function defined outside the program, such as a function for obtaining input data, the result is expressed by introducing a new logical variable.
- the final test data is a column in which the values of logical variables representing the results of the input data acquisition function are arranged in the order of appearance.
- the input data has a structure and is composed of repetition of data elements and terminal symbols, and that there is a dependency determined by the structure of the program between the data elements.
- the flow of program execution changes greatly between when the program is executed using test data generated by simply copying sample data and when the program is executed using sample data. Therefore, appropriate performance evaluation cannot be performed. Therefore, the use of test data generated by the method shown in FIGS. 2 and 3 is important for the performance evaluation of an appropriate program.
- sentences (line numbers) 1 to 5 are loops that sequentially process input data.
- sample data (b) in FIG. 4 ⁇ 1 is a terminal symbol indicating the end of data.
- the execution frequency information 114 shown in FIG. 5 is generated as a result of step 203 in FIG.
- test data is generated based on the structure of the source program.
- step 301 a loop set is obtained from the source program.
- ⁇ (2, [3,4,5]) ⁇ is obtained as the loop set LS.
- the loop (2, [3,4,5]) which is an element of LS is composed of a set of a header 2 and a main body [3,4,5].
- step 302 it is checked whether an unprocessed loop remains in the loop set LS, and the process proceeds to step 304, and one unprocessed loop is taken out.
- (2, [3,4, 5]) is extracted as the loop L.
- the header H is 2, and the main body B is [3,4,5].
- step 305 the number of executions N of B is obtained based on the execution frequency information. Since the first sentence of B (statement 3) is always executed every time B is executed, the number of executions of B is equal to the number of executions of sentence 3. From the execution frequency information shown in FIG. 5, 3 should be obtained as N.
- step 306 a set PF of a set of all paths in B and the number of executions thereof is obtained based on the execution frequency information. From the information in FIG. 5, ⁇ ([3,4,5], 2), ([3,5], 1) ⁇ is obtained as the PF.
- ⁇ ([3,4,5], 2), ([3,5], 1) ⁇ is obtained as the PF.
- step 307 the product PN of the generation parameter and N is obtained. Since the generation parameter (c) shown in FIG. 4 is now “2”, 6 is obtained as the PN.
- step 308 L is expanded 6 times.
- step 308 the variable X holding the sentence string is initialized to empty. Subsequently, steps 310 to 312 are repeated 6 times.
- step 311 one path is selected from the PF based on the execution frequency of each path.
- P [3,4,5] is selected as the path.
- step 312 duplicate P, convert the conditional branch statement in P to an assert statement, and add it to the end of X.
- step 313 L in the source program 106 is replaced with X.
- the main function as a result of the replacement is shown in FIG.
- Step 303 the process returns to Step 302, and since there is no unprocessed loop remaining in the LS, the process proceeds to Step 303.
- step 303 input data that passes through all sentences corresponding to X in the program of FIG. 6 is generated as test data.
- test data as shown in FIG. 7 can be obtained.
- Explain that the test data in Fig. 7 reflects the trend of sample data.
- the sample data (a) in Fig. 4 consists of three elements (1, 1, 2) and a terminal symbol (-1). If you run the program with this as input, the first element (1) and the third element (2) are inserted (insert () is called), but the second element (1) is already the same Not inserted because the value is inserted. That is, it contains data for which insert () is called and data for which it is not, in a ratio of 2: 1.
- the first (3), third (4), fourth (5), and sixth (6) elements are inserted, and the second (3) And the fifth (3) element is not inserted. That is, like sample data, it contains data for which insert () is called and data that is not so at a ratio of 2: 1.
- the sample data and the generated test data have the same execution frequency of the source program (that is, the ratio of the number of executions of the source program).
- the sample data is simply duplicated and doubled, it will be duplicated to the terminal symbol -1, so the amount of data to be processed will not double. If the terminal symbol is specially processed manually, the data obtained is “1 1 2 1 1 2 ⁇ 1”. If the program is executed with this as input, the first (1), third (2) elements are inserted, and the second (1), fourth (1), fifth (1) and sixth (2) The element of is not inserted. That is, unlike the sample data, the data for which insert () is called and the data that is not so are included at a ratio of 1: 2, so the execution frequency is significantly different from the trend of the sample data. ------- Application 2 ------- The source program (a) shown in FIG. 4 used in Application Example 1 has only one input processing loop.
- each sentence (execution instruction) in the source program (a) is indicated by using the line number of the source program (a) shown in FIG.
- sentences (line numbers) 2 to 5 and 7 to 9 are loops for sequentially processing input data.
- sample data (b) of FIG. 9 are markers indicating the end of data.
- the execution frequency information shown in FIG. 10 is generated.
- step 204 test data is generated based on the structure of the source program.
- step 301 a loop set is obtained from the source program.
- ⁇ (2, [3,4,5]), (7, [8,9]) ⁇ is obtained as the loop set LS.
- the loops (2, [3,4, 5]) and (7, [8, 9]), which are elements of the LS, are a set of a header and a main body, respectively.
- step 302 it is checked whether an unprocessed loop remains in the loop set LS, and the process proceeds to step 304, and one unprocessed loop is taken out.
- (2, [3,4, 5]) is extracted as the loop L.
- the header H is 2, and the main body B is [3,4,5].
- step 305 to step 313 The processing from step 305 to step 313 is the same as in the first application example.
- step 302 the process returns to step 302 to check whether an unprocessed loop remains in the LS.
- the process proceeds to step 304, and one unprocessed loop is taken out.
- (7, [8, 9]) is extracted as the loop L.
- the header H is 7, and the main body B is [8, 9].
- step 305 the number of executions N of B is obtained based on the execution frequency information. It should be possible to obtain 2 as N from the execution frequency information shown in FIG.
- step 306 a set PF of a set of all paths in B and the number of executions thereof is obtained based on the execution frequency information. From the information shown in FIG. 5, ⁇ ([8,9], 2) ⁇ is obtained as the PF.
- step 307 the product PN of the generation parameter and N is obtained. Since the generation parameter is now “2” from the information in FIG. 4C, 4 is obtained as the PN.
- step 308 L is expanded 4 times.
- step 308 the variable X holding the sentence string is initialized to empty. Subsequently, steps 310 to 312 are repeated 6 times.
- step 311 one path is selected from the PF based on the execution frequency of each path.
- P [8,9] is selected as the path.
- step 312 duplicate P, convert the conditional branch statement in P to an assert statement, and add it to the end of X.
- step 313 L in the source program 106 is replaced with X.
- FIG. 11 shows the main function as a result of the replacement.
- Step 303 the process returns to Step 302, and since there is no unprocessed loop remaining in the LS, the process proceeds to Step 303.
- step 303 input data that passes through all statements corresponding to X in the program of FIG. 11 is generated as test data.
- test data as shown in FIG. 12 is obtained.
- this invention is not limited to the above-mentioned Example, Various modifications are included.
- the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described.
- a part of the configuration of a certain embodiment can be replaced with another configuration, and another configuration can be added to the configuration of a certain embodiment.
- each of the above-described configurations, functions, processing units, processing means, and the like may be realized by hardware by designing a part or all of them with, for example, an integrated circuit.
- Each of the above-described configurations, functions, and the like may be realized by software by interpreting and executing a program that realizes each function by the processor.
- Information such as programs and files for realizing each function can be stored in a memory, a hard disk, a recording device such as an SSD (Solid State Drive), or a recording medium such as an IC card, an SD card, or a DVD.
Abstract
Description
次にステップ306で、実行頻度情報115をもとにB内のすべてのパス(プログラムの実行経路)と各パスの実行回数を求める。パスとその実行回数の組の集合をPFとする。尚、B内のパスは、実行頻度情報115から、ループヘッダHではさまれた部分列を取り出し、各部分列からBの文以外を除き、さらに重複を除くことで得られる。たとえば図5の実行頻度情報115においては、ループヘッダである文2ではさまれた部分列は[3,7,8,12,4,13,14,5]、[3,7,8,9,10,5]、[3,7,8,9.11,8,9,11,8,12,4,13,14,5]の3つである。ここからBの文以外を除くと[3,4,5]、[3,5]、[3,4,5]となり、重複を除くと[3,4,5]および[3,5]の2つのパスが得られる。各パスの実行回数は上記で重複を除く前の出現回数となる。先ほどの例ではパス[3,4,5]の実行回数は2回、パス[3,5]の実行回数は1回となる。
本適用例では、入力データとして、図4に示すソースプログラム(a)、サンプルデータ(b)、および生成パラメータ(c)を用いる。
尚、本適用例では、ソースプログラム(a)の行番号を用いて、ソースプログラム内の各文(実行命令)を示す。
適用例1で使用した図4に示すソースプログラム(a)は入力処理ループが1つしか存在しなかった。そこで適用例2として、入力処理ループが複数存在する場合を示す。本適用例では、入力データとして、図9に示すソースプログラム(a)、 サンプルデータ(b)、および生成パラメータ(c)を用いる。尚、本適用例では、図9に示すソースプログラム(a)の行番号を用いて、ソースプログラム(a)内の各文(実行命令)を示す。
図2のステップ203の結果、図10に示す実行頻度情報が生成される。
次にステップ204で、ソースプログラムの構造にもとづくテストデータ生成を行う。
102 主記憶装置
103 外部記憶装置
104 ディスプレイ装置
105 キーボード
106 ソースプログラム
107 サンプルデータ
108 生成パラメータ
109 テストデータ生成プログラム
110 コンパイラ
111 プロファイラ
112 プログラム実行器
113 中間情報
114 実行頻度情報
Claims (12)
- プログラムの性能評価に用いられるテストデータを生成する方法であって、
性能評価対象のソースプログラムと、サンプルデータと、生成されるテストデータのサイズを決めるために用いられる生成パラメータとを入力装置から受け取る入力ステップと、
プロセッサが前記サンプルデータを用いて前記ソースプログラムを実行し、当該ソースプログラム中の複数の文各々について、実行回数を取得する実行回数取得ステップと、
前記サンプルデータのサイズの前記生成パラメータ倍のサイズを有するテストデータであって、前記ソースプログラム中の前記複数の文各々についての実行頻度が、前記サンプルデータを用いて前記ソースプログラムを実行した際の当該複数の分各々についての実行頻度と同じとなるテストデータを、取得された前記実行回数に基いて前記プロセッサが生成するテストデータ生成ステップとを有することを特徴とするテストデータ生成方法。 - 請求項1記載のテストデータ生成方法であって、前記実行頻度とは、前記ソースプログラムの各文の実行回数の比であることを特徴とするテストデータ生成方法。
- 請求項1記載のテストデータ生成方法であって、
前記実行回数取得ステップは、
前記ソースプログラムから当該ソースプログラムを構成する複数の基本ブロックを有する基本ブロックグラフを生成するステップと、
前記複数の基本ブロックの各々について当該基本ブロックの基本ブロック番号と当該基本ブロックに含まれる一以上の文各々の文番号とを出力するための第一の命令を前記基本ブロックグラフに挿入するステップと、
前記複数の基本ブロックの各々について、当該基本ブロック中に当該基本ブロックの基本ブロック番号を出力するための第二の命令を挿入するステップと、
前記第一の命令および一以上の前記第二の命令が挿入された基本ブロックグラフをコンパイルして実行コードを生成するステップと、
前記サンプルデータを用いて前記実行コードを実行することにより、前記第一の命令および一以上の前記第二の命令によって出力される情報を中間情報として得るステップと、
前記中間情報から、前記ソースプログラム中の複数の文各々についての、前記実行回数を取得するステップを有することを特徴とするテストデータ生成方法。 - 請求項3記載のテストデータ生成方法であって、
前記テストデータ生成ステップは、
前記ソースプログラムをループ解析して、当該ソースプログラムに含まれる一以上のループを抽出するループ解析ステップと、
前記実行回数に基いて、前記一以上のループ各々について、当該ループの実行回数であるループ実行回数を取得するステップと、
前記一以上のループ各々について、当該ループ内のプログラム実行経路である一以上のパスと当該パスの実行回数であるパス実行回数を取得するステップと、
前記一以上のループ各々について、当該ループを前記生成パラメータと当該ループのループ実行回数の積の値倍に展開するループ展開ステップと、
ループ展開後のソースプログラムに含まれる全ての文を通るような入力データを生成するデータ生成ステップとを有することを特徴とするテストデータ生成方法。 - 請求項4記載のテストデータ生成方法であって、
前記データ生成ステップは、記号実行法を用いて前記ループ展開後のソースプログラムに含まれる全ての文を通るような入力データを生成することを特徴とするテストデータ生成方法。 - 請求項4記載のテストデータ生成方法であって、
前記ループ展開ステップは、前記一以上のループ各々について、当該ループに含まれる各パスのパス実行回数に基いて、当該ループを展開することを特徴とするテストデータ生成方法。 - プログラムの性能評価に用いられるテストデータを生成するための計算機であって、
性能評価対象のソースプログラムと、サンプルデータと、生成されるテストデータのサイズを決めるために用いられる生成パラメータとを受け付ける入力装置と、
前記サンプルデータを用いて前記ソースプログラムを実行し、当該ソースプログラム中の複数の文各々について、実行回数を取得する実行回数取得ステップと、
前記サンプルデータのサイズの前記生成パラメータ倍のサイズを有するテストデータであって、前記ソースプログラム中の前記複数の文各々についての実行頻度が、前記サンプルデータを用いて前記ソースプログラムを実行した際の当該複数の分各々についての実行頻度と同じとなるテストデータを、取得された前記実行回数に基いて生成するテストデータ生成ステップとを実行するプロセッサを有する計算機。 - 請求項7記載の計算機であって、
前記実行回数取得ステップにおいて前記プロセッサは、
前記ソースプログラムから当該ソースプログラムを構成する複数の基本ブロックを有する基本ブロックグラフを生成し、
前記複数の基本ブロックの各々について当該基本ブロックの基本ブロック番号と当該基本ブロックに含まれる一以上の文各々の文番号とを出力するための第一の命令を前記基本ブロックグラフに挿入し、
前記複数の基本ブロックの各々について、当該基本ブロック中に当該基本ブロックの基本ブロック番号を出力するための第二の命令を挿入し、
前記第一の命令および一以上の前記第二の命令が挿入された基本ブロックグラフをコンパイルして実行コードを生成し、
前記サンプルデータを用いて前記実行コードを実行することにより、前記第一の命令および一以上の前記第二の命令によって出力される情報を中間情報として取得し、
前記中間情報から、前記ソースプログラム中の複数の文各々についての、前記実行回数を取得することを特徴とする計算機。 - 請求項8記載の計算機であって、
前記テストデータ生成ステップにおいて前記プロセッサは、
前記ソースプログラムをループ解析して、当該ソースプログラムに含まれる一以上のループを抽出し、
前記実行回数に基いて、前記一以上のループ各々について、当該ループの実行回数であるループ実行回数を取得し、
前記一以上のループ各々について、当該ループ内のプログラム実行経路である一以上のパスと当該パスの実行回数であるパス実行回数を取得し、
前記一以上のループ各々について、当該ループに含まれる各パスのパス実行回数に基いて、前記生成パラメータと当該ループのループ実行回数の積の値倍に当該ループを展開し、
ループ展開後のソースプログラムに含まれる全ての文を通るような入力データを生成することを特徴とする計算機。 - プログラムの性能評価に用いられるテストデータを生成するたに計算機で実行されるプログラムを記録した記録媒体であって、
性能評価対象のソースプログラムと、サンプルデータと、生成されるテストデータのサイズを決めるために用いられる生成パラメータとを受け付けるためのコードと、
前記サンプルデータを用いて前記ソースプログラムを実行し、当該ソースプログラム中の複数の文各々について、実行回数を取得する実行回数取得ステップを実行するためのコードと、
前記サンプルデータのサイズの前記生成パラメータ倍のサイズを有するテストデータであって、前記ソースプログラム中の前記複数の文各々についての実行頻度が、前記サンプルデータを用いて前記ソースプログラムを実行した際の当該複数の分各々についての実行頻度と同じとなるテストデータを、取得された前記実行回数に基いて生成するテストデータ生成ステップを実行するためのコードとを有するプログラムを記録した記録媒体。 - 請求項10記載の記録媒体であって、
前記実行回数取得ステップを実行するためのコードは、
前記ソースプログラムから当該ソースプログラムを構成する複数の基本ブロックを有する基本ブロックグラフを生成し、
前記複数の基本ブロックの各々について当該基本ブロックの基本ブロック番号と当該基本ブロックに含まれる一以上の文各々の文番号とを出力するための第一の命令を前記基本ブロックグラフに挿入し、
前記複数の基本ブロックの各々について、当該基本ブロック中に当該基本ブロックの基本ブロック番号を出力するための第二の命令を挿入し、
前記第一の命令および一以上の前記第二の命令が挿入された基本ブロックグラフをコンパイルして実行コードを生成し、
前記サンプルデータを用いて前記実行コードを実行することにより、前記第一の命令および一以上の前記第二の命令によって出力される情報を中間情報として取得し、
前記中間情報から、前記ソースプログラム中の複数の文各々についての、前記実行回数を取得するためのコードを有することを特徴とする記録媒体。 - 請求項11記載の記録媒体であって、
前記テストデータ生成ステップを実行するためにおいて前記プロセッサは、
前記ソースプログラムをループ解析して、当該ソースプログラムに含まれる一以上のループを抽出し、
前記実行回数に基いて、前記一以上のループ各々について、当該ループの実行回数であるループ実行回数を取得し、
前記一以上のループ各々について、当該ループ内のプログラム実行経路である一以上のパスと当該パスの実行回数であるパス実行回数を取得し、
前記一以上のループ各々について、当該ループに含まれる各パスのパス実行回数に基いて、前記生成パラメータと当該ループのループ実行回数の積の値倍に当該ループを展開し、
ループ展開後のソースプログラムに含まれる全ての文を通るような入力データを生成するためのコードを有することを特徴とする記録媒体。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2011/000556 WO2012104907A1 (ja) | 2011-02-02 | 2011-02-02 | プログラムの実行性能評価のためのテストデータ生成方法 |
US13/880,464 US9092577B2 (en) | 2011-02-02 | 2011-02-02 | Method for generating test data for evaluating program execution performance |
JP2012555559A JP5450840B2 (ja) | 2011-02-02 | 2011-02-02 | プログラムの実行性能評価のためのテストデータ生成方法 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2011/000556 WO2012104907A1 (ja) | 2011-02-02 | 2011-02-02 | プログラムの実行性能評価のためのテストデータ生成方法 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2012104907A1 true WO2012104907A1 (ja) | 2012-08-09 |
Family
ID=46602161
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2011/000556 WO2012104907A1 (ja) | 2011-02-02 | 2011-02-02 | プログラムの実行性能評価のためのテストデータ生成方法 |
Country Status (3)
Country | Link |
---|---|
US (1) | US9092577B2 (ja) |
JP (1) | JP5450840B2 (ja) |
WO (1) | WO2012104907A1 (ja) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103218297A (zh) * | 2013-05-15 | 2013-07-24 | 百度在线网络技术(北京)有限公司 | 测试数据的筛选方法及装置 |
JP2015153323A (ja) * | 2014-02-18 | 2015-08-24 | 富士通株式会社 | シンボリック実行プログラム、シンボリック実行方法及びシンボリック実行装置 |
JP2017500646A (ja) * | 2013-12-18 | 2017-01-05 | アビニシオ テクノロジー エルエルシー | データ生成 |
CN110659208A (zh) * | 2019-09-17 | 2020-01-07 | 北京声智科技有限公司 | 测试数据集的更新方法和装置 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9336115B1 (en) * | 2014-02-24 | 2016-05-10 | The Mathworks, Inc. | User interface driven real-time performance evaluation of program code |
US9916187B2 (en) | 2014-10-27 | 2018-03-13 | Oracle International Corporation | Graph database system that dynamically compiles and executes custom graph analytic programs written in high-level, imperative programming language |
US10506016B2 (en) | 2016-05-19 | 2019-12-10 | Oracle International Corporation | Graph analytic engine that implements efficient transparent remote access over representational state transfer |
US11907099B2 (en) | 2020-09-22 | 2024-02-20 | International Business Machines Corporation | Performance evaluation method using simulated probe data mapping |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03244043A (ja) * | 1990-02-21 | 1991-10-30 | Nec Corp | テストデータ生成装置 |
JPH09259006A (ja) * | 1996-03-26 | 1997-10-03 | Mitsubishi Electric Corp | プログラム評価システム |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6173440B1 (en) * | 1998-05-27 | 2001-01-09 | Mcdonnell Douglas Corporation | Method and apparatus for debugging, verifying and validating computer software |
JP3366257B2 (ja) | 1998-07-07 | 2003-01-14 | エヌイーシーシステムテクノロジー株式会社 | データウェアハウステストデータ作成装置 |
US6959431B1 (en) * | 1999-05-13 | 2005-10-25 | Compuware Corporation | System and method to measure and report on effectiveness of software program testing |
JP2003216454A (ja) * | 2002-01-28 | 2003-07-31 | Mitsubishi Electric Corp | 試験手順生成装置及び試験手順生成方法及び試験手順生成プログラム及び記録媒体 |
US7290048B1 (en) * | 2002-03-29 | 2007-10-30 | Hyperformix, Inc. | Method of semi-automatic data collection, data analysis, and model generation for the performance analysis of enterprise applications |
US7873945B2 (en) * | 2007-06-29 | 2011-01-18 | Microsoft Corporation | Automatically generating test cases for binary code |
US8473915B2 (en) * | 2007-08-03 | 2013-06-25 | International Business Machines Corporation | Coverage analysis tool for testing database-aware software applications |
JP2009134662A (ja) | 2007-12-03 | 2009-06-18 | Hitachi Ltd | 性能テストデータ構築ツール |
-
2011
- 2011-02-02 JP JP2012555559A patent/JP5450840B2/ja not_active Expired - Fee Related
- 2011-02-02 US US13/880,464 patent/US9092577B2/en not_active Expired - Fee Related
- 2011-02-02 WO PCT/JP2011/000556 patent/WO2012104907A1/ja active Application Filing
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03244043A (ja) * | 1990-02-21 | 1991-10-30 | Nec Corp | テストデータ生成装置 |
JPH09259006A (ja) * | 1996-03-26 | 1997-10-03 | Mitsubishi Electric Corp | プログラム評価システム |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103218297A (zh) * | 2013-05-15 | 2013-07-24 | 百度在线网络技术(北京)有限公司 | 测试数据的筛选方法及装置 |
CN103218297B (zh) * | 2013-05-15 | 2018-05-04 | 百度在线网络技术(北京)有限公司 | 测试数据的筛选方法及装置 |
JP2017500646A (ja) * | 2013-12-18 | 2017-01-05 | アビニシオ テクノロジー エルエルシー | データ生成 |
US10185641B2 (en) | 2013-12-18 | 2019-01-22 | Ab Initio Technology Llc | Data generation |
US10437701B2 (en) | 2013-12-18 | 2019-10-08 | Ab Initio Technology Llc | Data generation |
JP2015153323A (ja) * | 2014-02-18 | 2015-08-24 | 富士通株式会社 | シンボリック実行プログラム、シンボリック実行方法及びシンボリック実行装置 |
CN110659208A (zh) * | 2019-09-17 | 2020-01-07 | 北京声智科技有限公司 | 测试数据集的更新方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
US9092577B2 (en) | 2015-07-28 |
US20130305095A1 (en) | 2013-11-14 |
JP5450840B2 (ja) | 2014-03-26 |
JPWO2012104907A1 (ja) | 2014-07-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5450840B2 (ja) | プログラムの実行性能評価のためのテストデータ生成方法 | |
JP2007528059A (ja) | ソフトウェアのモデル化、抽象、および分析のためのシステムと方法 | |
US20130318504A1 (en) | Execution Breakpoints in an Integrated Development Environment for Debugging Dataflow Progrrams | |
US9524366B1 (en) | Annotations to identify objects in design generated by high level synthesis (HLS) | |
US7523029B2 (en) | Logic verification and logic cone extraction technique | |
US9626468B2 (en) | Assertion extraction from design and its signal traces | |
US10592703B1 (en) | Method and system for processing verification tests for testing a design under test | |
Jaffar et al. | A path-sensitively sliced control flow graph | |
JP2010267209A (ja) | 検証支援プログラム、検証支援装置および検証支援方法 | |
US10579761B1 (en) | Method and system for reconstructing a graph presentation of a previously executed verification test | |
JP6790921B2 (ja) | プログラム分析装置、プログラム分析方法及びプログラム分析プログラム | |
DeOrio et al. | Inferno: Streamlining verification with inferred semantics | |
JP2013065258A (ja) | 情報処理装置、情報処理方法及び情報処理プログラム | |
JP6002507B2 (ja) | ソフトウェア検証用プログラムおよびソフトウェア検証システム | |
JP6437396B2 (ja) | トレース情報管理システム、方法、及びプログラム | |
JP5120103B2 (ja) | デバッグ方法およびデバッグプログラム | |
JP6279750B2 (ja) | ソースコード等価性検証装置 | |
JP6081144B2 (ja) | ソースコード解析装置 | |
Thacker et al. | A new verification method for embedded systems | |
JP5875607B2 (ja) | 性能モデル検査装置、方法およびプログラム | |
Saddler et al. | EventFlowSlicer: Goal based test generation for graphical user interfaces | |
JP2015069400A (ja) | ソフトウェアテストシステム | |
KR20120009991A (ko) | 테스트 스윗 생성 장치 및 방법 | |
JP2018190219A (ja) | ソフトウェア仕様分析装置、及びソフトウェア仕様分析方法 | |
GB2539961A (en) | Code hotspot encapsulation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11857785 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2012555559 Country of ref document: JP Kind code of ref document: A |
|
WWE | Wipo information: entry into national phase |
Ref document number: 13880464 Country of ref document: US |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 11857785 Country of ref document: EP Kind code of ref document: A1 |