JP2009093310A - Apparatus and method for creating execution code and method of managing source code - Google Patents

Apparatus and method for creating execution code and method of managing source code Download PDF

Info

Publication number
JP2009093310A
JP2009093310A JP2007261523A JP2007261523A JP2009093310A JP 2009093310 A JP2009093310 A JP 2009093310A JP 2007261523 A JP2007261523 A JP 2007261523A JP 2007261523 A JP2007261523 A JP 2007261523A JP 2009093310 A JP2009093310 A JP 2009093310A
Authority
JP
Japan
Prior art keywords
assertion
execution code
code
execution
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.)
Granted
Application number
JP2007261523A
Other languages
Japanese (ja)
Other versions
JP4887256B2 (en
Inventor
Shigeto Oeda
成人 大條
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 JP2007261523A priority Critical patent/JP4887256B2/en
Publication of JP2009093310A publication Critical patent/JP2009093310A/en
Application granted granted Critical
Publication of JP4887256B2 publication Critical patent/JP4887256B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To solve the following problems that causes the decrease in reliability and increase in man hours: in a conventional method of verifying specifications, the method serves only to verify functional specifications without taking into consideration the verification of performance specifications such as processing time and the amount of memory required; and it is necessary to take measures such as checking performance specifications by adding performance-measuring codes for checking performance to source codes in addition to the framing of function verification, with the result that in such a method a technique for verifying specifications differs between verification of functional specifications and verification of performance specifications, thereby making it impossible to unify the operations of verifying specifications. <P>SOLUTION: An apparatus for creating execution codes, such as a compiling means, is provided with an assertion function that can add the descriptions of the process of verifying performance specifications. The assertion function can designate an assertion as either valid or invalid. Further, based on assertion designation information that can set only the assertion function of a particular performance verification process to be either valid or invalid, it is possible to set the assertion function of the particular performance verification process to be either valid or invalid. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明はソフトウェアの仕様検証に関する技術を提供するものである。   The present invention provides a technique related to software specification verification.

従来から、ソフトウェアの仕様検証に関しては機能仕様に関する検証をおこなう方法や検証装置が広く用いられている。例えばJava(登録商標)言語では、アサーション機能とよばれる仕様検証処理を記述・実行するための機能をもち、機能仕様に関する検証をおこなう枠組みを言語レベルで提供している。当該アサーションに関する検証に関して、例えば、特許文献1に開示があるものである。   2. Description of the Related Art Conventionally, methods and verification apparatuses for verifying function specifications have been widely used for software specification verification. For example, the Java (registered trademark) language has a function for describing and executing a specification verification process called an assertion function, and provides a framework for verifying a functional specification at a language level. Regarding verification regarding the assertion, there is a disclosure in Patent Document 1, for example.

特開2007−11467号公報JP 2007-11467 A

ソフトウェアの機能仕様の検証に関しては、実行するプログラムの処理を記述するソースコードに機能仕様検証のための検証処理記述を追記し、該当部分のソースコード実行時に、実行結果が検証処理記述と合致しているかの判定をおこなう。   For software functional specification verification, add a verification processing description for functional specification verification to the source code that describes the processing of the program to be executed, and when the corresponding part of the source code is executed, the execution result matches the verification processing description. Judgment is made.

例えば変数「n」が、処理のある段階で「15」となることが機能仕様で規定されているとする。このような場合にはソースコードの該当箇所に変数「n」が「15」かの判定をおこなう機能検証処理の記述を追加する。   For example, it is assumed that the function specification defines that the variable “n” becomes “15” at a certain stage of processing. In such a case, a description of the function verification process for determining whether the variable “n” is “15” is added to the corresponding part of the source code.

コンパイラなどの実行コード生成装置で前記ソースコードを実行可能なコードに変換する際に、実行コード生成装置に対して機能検証処理を有効にするか否かの指定が可能となっており、機能検証処理を有効に設定して実行コードを生成し、該当コードを実行した場合には先の機能検証処理が実行され、変数「n」が機能仕様値である「15」を満足しているか否かの判定が可能となる。   When converting the source code into executable code by an executable code generation device such as a compiler, it is possible to specify whether or not the function verification processing is enabled for the execution code generation device. When the execution code is generated by setting the process to be effective and the corresponding code is executed, the previous function verification process is executed and whether or not the variable “n” satisfies the function specification value “15”. Can be determined.

上記方法は機能仕様の検証に有効であるが、処理時間・要求メモリ量などの性能仕様の検証に関しては考慮されておらず、上記機能検証の枠組みとは別に性能確認のための性能測定用コードをソースコードに追加し、性能仕様の確認をおこなうことなどが必要となる。   The above method is effective for functional specification verification, but verification of performance specifications such as processing time and required memory capacity is not taken into consideration, and a performance measurement code for performance verification separately from the functional verification framework described above. It is necessary to add to the source code and check the performance specifications.

上記方法では仕様検証のための手法が、機能仕様の検証と性能仕様の検証とで異なってしまい、仕様検証作業を一元化できないことで、信頼性低下・作業工数増大などの問題があった。   In the above method, the method for specification verification differs between the verification of the functional specification and the verification of the performance specification, and the specification verification work cannot be unified, resulting in problems such as a decrease in reliability and an increase in work man-hours.

さらに上記方法では、複数の測定用コードをソースコードに追加した場合に、測定対象となる処理の中に他の測定用コード処理が含まれてしまう場合があり、測定値に他の測定用コードの処理時間が含まれてしまい、測定精度が低下するという問題がある。   Furthermore, in the above method, when a plurality of measurement codes are added to the source code, the measurement target process may include other measurement code processes, and the measurement values may include other measurement codes. There is a problem in that the measurement accuracy is reduced.

これに対しては、複数の測定用コード相互の測定精度に関する影響を考慮し、個々の測定用コードを個別にソースコードに追加するなどの工夫を利用者が個別におこなう必要がある。   For this, it is necessary for the user to individually devise such as adding individual measurement codes to the source code in consideration of the influence on the measurement accuracy among the plurality of measurement codes.

ところで、性能仕様の確認は、ソースコードに変更が加わる度に実施する場合が多く、このような測定用コードの追加・削除作業が繰り返し必要となることが一般的である。   By the way, confirmation of performance specifications is often performed every time a change is made to the source code, and it is generally necessary to repeatedly add and delete such measurement code.

この対策としてコンパイル条件記述などによって測定用コードの追加・削除をコンパイル条件で指定することも考えられるが、コンパイル条件の設定や測定用コードとの対応は利用者が個別に実施する必要があるという点に関しては変わらない。   As a countermeasure, it may be possible to specify the addition / deletion of measurement code in the compile condition description etc., but it is necessary for the user to individually set the compile condition and correspond to the measurement code. There is no change in terms.

これらの方法では作業工数の増加に加えて、測定用コードの追加・削除作業誤りなどの可能性を内包しており、測定精度低下の問題がある。   In these methods, in addition to the increase in work man-hours, there is a possibility of errors in addition / deletion of measurement codes, and there is a problem of a decrease in measurement accuracy.

従って、本発明では、これらの問題を改善することを課題とする。   Accordingly, it is an object of the present invention to improve these problems.

コンパイル手段などの実行コード生成装置に、性能仕様検証処理の記述を追加可能なアサーション機能を設けた。該アサーション機能はアサーションの有効・無効を利用者が指定可能な構成とした。   An execution code generation device such as a compiling means is provided with an assertion function that can add a description of performance specification verification processing. The assertion function has a configuration in which the user can specify validity / invalidity of the assertion.

更に、特定の性能検証処理のアサーション機能のみを有効・無効設定可能なアサーション指定情報に基づいて、特定の性能検証処理のアサーション機能の有効・無効設定が可能なアサーション機能を設けた
本発明の目的は性能仕様検証処理を実行可能なコードを、仕様機能の実行コードに付与するアサーション機能をもつ実行コード生成装置を提供することである。
更に、特定の性能検証処理のアサーション機能のみを有効・無効設定可能なアサーション指定情報に基づいて、特定の性能検証処理のアサーション機能の有効・無効設定が可能なアサーション機能をもつ実行コード生成装置を提供することである。
Furthermore, an assertion function is provided that can enable / disable a specific performance verification processing assertion function based on assertion designation information that can enable / disable only a specific performance verification processing assertion function. Is to provide an execution code generation device having an assertion function for giving a code capable of executing a performance specification verification process to an execution code of a specification function.
Furthermore, an execution code generation device having an assertion function capable of enabling / disabling the assertion function of a specific performance verification process based on assertion designation information capable of enabling / disabling only the assertion function of a specific performance verification process is provided. Is to provide.

このために、本発明では性能仕様検証処理を実行コードに付加可能なアサーション機能を設けた。   For this purpose, the present invention provides an assertion function that can add performance specification verification processing to the execution code.

本発明の実行コード生成装置により、性能仕様検証処理のためのコードを、仕様機能を実装した実行コードに付加可能となる。また、機能仕様検証処理と性能仕様検証処理を同じアサーション機能を用いた仕様検証処理として一元化することが可能となり、検証の信頼性向上が可能となる。   With the execution code generation device of the present invention, a code for performance specification verification processing can be added to an execution code in which a specification function is installed. In addition, the functional specification verification process and the performance specification verification process can be unified as a specification verification process using the same assertion function, and the reliability of verification can be improved.

更に本発明の実行コード生成装置によれば、複数個所で性能仕様検証処理のためのコードをソースコードに追加したために、測定対象となる処理の中に他の性能仕様検証処理が含まれてしまう場合でも、測定値に他の性能仕様検証処理の時間が含まれないよう、特定の性能仕様検証処理のアサーション機能のみを有効とすることが可能となり、測定精度の低下を防止可能となる。   Furthermore, according to the execution code generation device of the present invention, since the code for performance specification verification processing is added to the source code at a plurality of locations, other performance specification verification processing is included in the processing to be measured. Even in this case, it is possible to validate only the assertion function of a specific performance specification verification process so that the measurement value does not include the time of other performance specification verification processes, and it is possible to prevent a decrease in measurement accuracy.

本発明によれば、従来よりもソフトウェアの仕様検証を改善するものである。   According to the present invention, software specification verification is improved as compared with the prior art.

以下、本発明の実施例を図1から図4を用いて説明する。   Embodiments of the present invention will be described below with reference to FIGS.

図1は本実施例の実行コード生成装置の構成を示す機能ブロック図、図2は従来の仕様機能と機能仕様検証処理を記述したソースコードの例、図3は本発明の実施例について、性能仕様検証処理のための記述を追記したソースコードの例、図4は本実施例の性能仕様検証処理の追加機能(以下、性能仕様検証アサーション機能と称する)の動作を示すフローチャートである。   FIG. 1 is a functional block diagram showing the configuration of the execution code generation apparatus of this embodiment, FIG. 2 is an example of source code describing a conventional specification function and a function specification verification process, and FIG. 3 is a performance chart of the embodiment of the present invention. FIG. 4 is a flowchart showing the operation of an additional function (hereinafter referred to as a performance specification verification assertion function) of the performance specification verification process of this embodiment.

図1において、101は要求される仕様機能などを記述したソースコード、102はコード生成の対象となるソースコードの指定や、実行コード生成時の最適化指定など実行コード生成に必要な設定情報を記述した実行手順スクリプト、103はソースコード101から実行手順スクリプト102の設定情報に応じて実行コード107を生成する実行コード生成装置、104はソースコードをバイナリ形式に変換するコンパイル手段、105はコンパイラ104が生成したバイナリ形式の情報を実行可能なコードに変換するリンク手段、106は性能仕様検証処理を追加可能な性能仕様検証アサーション機能、107はソースコードを実行可能な形式に変換した実行コードである。   In FIG. 1, 101 is a source code describing a required specification function, 102 is setting information necessary for execution code generation, such as specification of a source code to be code generation and optimization specification at the time of execution code generation. The described execution procedure script, 103 is an execution code generation device that generates the execution code 107 from the source code 101 according to the setting information of the execution procedure script 102, 104 is a compiling unit that converts the source code into a binary format, and 105 is a compiler 104 Is a link means for converting the binary format information generated into the executable code, 106 is a performance specification verification assertion function to which performance specification verification processing can be added, and 107 is an execution code converted from the source code into an executable format. .

図2に、機能仕様を検証する処理を追記した従来のソースコード例を示す。図2において、202行目から205行目までと、207行目から209行目までは仕様機能の記述部分となる。206行目が機能仕様の検証処理の記述となる。206行目では、変数「i」が100以下であることを検証しており、性能仕様検証アサーション機能を有効として実行コードを生成・実行した場合に、前記変数「i」の値の合否が検証される。   FIG. 2 shows a conventional source code example in which processing for verifying the functional specification is added. In FIG. 2, lines 202 to 205 and lines 207 to 209 are specification function description parts. The 206th line is a description of the functional specification verification process. In line 206, it is verified that the variable “i” is 100 or less, and when the execution code is generated and executed with the performance specification verification assertion function enabled, the pass / fail of the value of the variable “i” is verified. Is done.

図2のソースコードは、図示していない従来の実行コード生成装置の機能仕様検証アサーション機能で機能仕様検証処理の追加・実行が可能となる。   The source code shown in FIG. 2 can be added to and executed by a functional specification verification process using a functional specification verification assertion function of a conventional execution code generator (not shown).

以下、本実施例の動作を図1・図3・図4を用いて説明する。   The operation of this embodiment will be described below with reference to FIGS.

図3は、本発明の性能仕様を検証する処理を追記したソースコードの例である。図3において、303行目から308行目までは仕様機能の記述部分となる。302行目、309行目が性能仕様の検証処理の記述となる。   FIG. 3 is an example of source code in which processing for verifying the performance specification of the present invention is added. In FIG. 3, the description from the 303rd line to the 308th line is a description part of the specification function. Lines 302 and 309 are descriptions of performance specification verification processing.

302行目で時刻変数「t302」を用いて処理時間の測定を開始することを記述し、309行目で処理時間の測定を終了することを記述している。309行目では合わせて、時刻変数「t302」が示す303行目から308行目までの処理に要した時間が500[mS]未満であるか否かを検証する。   Line 302 describes starting measurement of processing time using time variable “t302”, and line 309 describes ending measurement of processing time. In line 309, it is also verified whether the time required for processing from line 303 to line 308 indicated by the time variable “t302” is less than 500 [mS].

図4に本実施例の性能仕様検証アサーション機能の処理を示す。処理401で実行手順スクリプト102から性能仕様検証アサーション機能の設定情報を取得する。   FIG. 4 shows the processing of the performance specification verification assertion function of this embodiment. In processing 401, setting information of the performance specification verification assertion function is acquired from the execution procedure script 102.

処理402で性能仕様検証アサーション機能に関する設定が有効か否かを判定し、性能仕様検証アサーション機能が有効である場合には処理403を実行、それ以外の場合には処理404を実行する。   In the process 402, it is determined whether or not the setting related to the performance specification verification assertion function is valid. If the performance specification verification assertion function is valid, the process 403 is executed. Otherwise, the process 404 is executed.

性能仕様検証アサーション機能が有効である場合には、処理403でソースコード101に記載されている性能仕様の検証処理のための記述を有効とする。この条件でコンパイル手段104はソースコード101をコンパイルし、リンク手段105で性能仕様の検証処理が有効となった実行コード107を生成する。この実行コード107を実行することで、302行目に相当する処理で時刻変数「t302」が「0」に初期化されるとともに、時刻変数「t302」を用いた時刻計測が開始される。   If the performance specification verification assertion function is valid, the description for the performance specification verification process described in the source code 101 is validated in process 403. Under this condition, the compiling unit 104 compiles the source code 101 and generates an execution code 107 in which the performance specification verification processing is validated by the linking unit 105. By executing the execution code 107, the time variable “t302” is initialized to “0” in the process corresponding to the 302th line, and time measurement using the time variable “t302” is started.

次に処理303から処理308に応答する処理が実行され、この処理完了直後に309行目で時刻計測が終了し、終了時点での時刻変数「t302」の値が保持される。   Next, a process in response to the process 308 is executed from the process 303. Immediately after the completion of the process, the time measurement is finished in the 309th line, and the value of the time variable “t302” at the end time is held.

次にこの時刻変数「t302」の値が500[mS]未満であるかの判定が実行され、判定結果が通知される。以上の処理が性能仕様検証アサーション機能が有効である場合の実施例である。   Next, it is determined whether the value of the time variable “t302” is less than 500 [mS], and the determination result is notified. The above processing is an embodiment when the performance specification verification assertion function is valid.

一方、実行手順スクリプトで性能仕様検証アサーション機能に関する設定が無効と設定されている場合には、処理402の判定で処理404が起動され、性能仕様検証アサーション処理が無効となり、ソースコードに記載されている性能仕様の検証処理のための記述を無効とする。   On the other hand, if the setting related to the performance specification verification assertion function is set to invalid in the execution procedure script, the processing 404 is activated by the determination of the processing 402, and the performance specification verification assertion processing becomes invalid and is described in the source code. The description for the verification process of the specified performance specification is invalidated.

この条件でコンパイル手段104はソースコード101をコンパイルし、リンク手段105から性能仕様の検証処理が無効となった実行コード107が生成される。この実行コード107を実行すると、処理302に対応する処理はなく、処理303から処理308に対応した処理が実行される。   Under this condition, the compiling unit 104 compiles the source code 101, and the execution unit 107 is generated from the linking unit 105 in which the performance specification verification processing is invalidated. When the execution code 107 is executed, there is no process corresponding to the process 302, and processes corresponding to the process 303 to the process 308 are executed.

さらに処理309に対応する処理は無く、全体の処理が完了する。以上の処理で性能仕様検証アサーション機能が無効な場合には、ソースコードに記載された性能仕様検証処理に関する記述は無視され、本来の仕様機能を記述した処理の部分のみが実行可能となる。以上の処理が性能仕様検証アサーション機能が無効である場合の実施例とである。   Further, there is no process corresponding to the process 309, and the entire process is completed. When the performance specification verification assertion function is invalid in the above processing, the description regarding the performance specification verification processing described in the source code is ignored, and only the processing portion describing the original specification function can be executed. The above processing is an embodiment when the performance specification verification assertion function is invalid.

以上、本実施例の処理によれば特定処理の処理時間を、性能仕様検証処理記述を追記することで検証可能となる。   As described above, according to the processing of this embodiment, the processing time of the specific processing can be verified by adding the performance specification verification processing description.

また、機能仕様検証処理と性能仕様検証処理を同じアサーション機能を用いた仕様検証処理として一元化することが可能となり、検証の信頼性向上が可能となる。   In addition, the functional specification verification process and the performance specification verification process can be unified as a specification verification process using the same assertion function, and the reliability of verification can be improved.

また本実施例によれば、実行手順スクリプトに記載した性能仕様検証アサーション機能の有効・無効設定に応じて、ソースコードに記載された性能仕様検証処理のための記述を実行または無視することが可能となり、性能仕様検証処理を仕様機能の実行コードに適宜追加することで、性能仕様の検証が容易に可能となる。   In addition, according to this embodiment, it is possible to execute or ignore the description for the performance specification verification process described in the source code according to the valid / invalid setting of the performance specification verification assertion function described in the execution procedure script. Thus, it is possible to easily verify the performance specification by appropriately adding the performance specification verification process to the execution code of the specification function.

なお、本実施例においては性能仕様検証アサーション機能の有効・無効設定を実行手順スクリプトに記載する構成としたが、有効・無効設定を実行コード生成装置の起動時に直接指定する構成など他の構成も可能であり、性能仕様検証アサーション機能の有効・無効設定の指定方法は特にこれを限定しない。   In this embodiment, the configuration for describing the valid / invalid setting of the performance specification verification assertion function is described in the execution procedure script. This is possible, and the specification method of the valid / invalid setting of the performance specification verification assertion function is not particularly limited.

また、本実施例においては実行コード生成装置103にコンパイラ手段104とリンク手段105をもつ構成としたが、ソースコードがインタプリタ型言語で記述される場合には、実行コード生成装置は実行コードを実行する情報処理装置上で動作するインタプリタ処理機能ももつ装置となる。実行コード生成装置の構成は利用するソースコードに応じた構成が可能であり、構成に関しては特にこれを限定しない。   In this embodiment, the execution code generation apparatus 103 has the compiler means 104 and the link means 105. However, when the source code is described in an interpreted language, the execution code generation apparatus executes the execution code. The apparatus also has an interpreter processing function that operates on the information processing apparatus. The configuration of the execution code generation device can be configured according to the source code to be used, and the configuration is not particularly limited.

また、本実施例においては性能検証アサーション機能を機能検証アサーション機能と別にもつ構成としたが、本実施例の性能仕様検証アサーション機能に従来の機能仕様検証アサーション機能を含める構成など他の構成も可能であり、アサーション機能の構成は特にこれを限定しない。   In this embodiment, the performance verification assertion function is provided separately from the function verification assertion function. However, other configurations such as a configuration in which the conventional functional specification verification assertion function is included in the performance specification verification assertion function of this embodiment are possible. The structure of the assertion function is not particularly limited.

以下、本発明の他の実施例を、図5・6を用いて説明する。図5は本発明の性能仕様検証処理を追記したソースコードの例、図6は本実施例の性能仕様検証アサーション機能の動作を示すフローチャートである。   Hereinafter, another embodiment of the present invention will be described with reference to FIGS. FIG. 5 is an example of source code in which the performance specification verification process of the present invention is added, and FIG. 6 is a flowchart showing the operation of the performance specification verification assertion function of this embodiment.

以下、本実施例の動作を、図5・6を用いて説明する。図5において、503行目から508行目までと、510行目、512行目は本来の仕様機能の記述部分となる。502行目、509行目、511行目、513行目が性能仕様検証処理の記述となる。図5に示したソースコードに対する実行コード生成装置の処理を、性能仕様検証アサーション機能に関する設定が有効な場合に関して説明する。502行目で時刻変数「t502」を用いた時刻計測を開始する。この計測の終了ポイントは513行目で503行目から512行目までの処理に要する時間の性能資料検証を目的としている。同様に509行目で時刻変数「t509」を用いた時刻計測を開始する。この計測の終了ポイントは511行目で、510行目の処理に要する時間の性能仕様検証を目的としている。   The operation of this embodiment will be described below with reference to FIGS. In FIG. 5, lines 503 to 508, lines 510, and 512 are descriptions of the original specification function. Lines 502, 509, 511, 513 are descriptions of the performance specification verification process. The processing of the execution code generation apparatus for the source code shown in FIG. 5 will be described with respect to the case where the setting related to the performance specification verification assertion function is valid. Time measurement using the time variable “t502” is started on the 502nd line. The end point of this measurement is the 513th line, and the purpose is to verify performance data for the time required for processing from the 503rd line to the 512th line. Similarly, time measurement using the time variable “t509” is started in the 509th line. The end point of this measurement is the 511st line, and the purpose is to verify the performance specifications of the time required for the 510th line process.

先の実施例で示したように、全ての性能仕様検証アサーション機能に関する設定を有効にした場合には、前述のように502行目、513行目で性能仕様を検証している処理時間の中に、509行目、511行目の性能機能検証のための処理時間が含まれており、測定精度が低下している。   As shown in the previous example, when the settings related to all the performance specification verification assertion functions are enabled, the processing time during which the performance specifications are verified in the 502nd and 513th lines as described above. In addition, the processing time for performance function verification in the 509th line and the 511th line is included, and the measurement accuracy is lowered.

本実施例の性能仕様検証アサーション機能では、特定の性能仕様検証処理のみを有効にすることができる。例えば先の実施例の図1と同様の構成において、実行手順スクリプトに「-epa」と記述すると、すべての性能仕様検証関連の処理が有効となる。同様に実行手順スクリプトに「-epa t1,t2」と記載すると時刻変数「t1」、「t2」を使用している性能仕様検証処理のみが有効となる。   In the performance specification verification assertion function of this embodiment, only specific performance specification verification processing can be validated. For example, in the same configuration as that of FIG. 1 of the previous embodiment, if “-epa” is described in the execution procedure script, all the performance specification verification-related processing becomes valid. Similarly, if “-epa t1, t2” is described in the execution procedure script, only the performance specification verification process using the time variables “t1” and “t2” is valid.

本実施例の性能仕様検証アサーション機能の処理を、図6を用いて説明する。処理601で実行手順スクリプトから性能仕様検証アサーション機能の設定情報を取得する。   Processing of the performance specification verification assertion function of this embodiment will be described with reference to FIG. In step 601, setting information of the performance specification verification assertion function is acquired from the execution procedure script.

処理602で性能仕様検証アサーション機能に関する設定が有効か否かを判定し、性能仕様検証アサーション機能が有効である場合には処理604を実行、それ以外の場合には処理603を実行する。性能仕様検証アサーション機能が有効である場合には、処理604で性能仕様検証アサーション機能指定が「-epa t1,t2」といった特定の時刻変数を伴って指定されているか否かを判定する。   In process 602, it is determined whether or not the setting related to the performance specification verification assertion function is valid. If the performance specification verification assertion function is valid, process 604 is executed, and otherwise, process 603 is executed. If the performance specification verification assertion function is valid, it is determined in step 604 whether the performance specification verification assertion function specification is specified with a specific time variable such as “-epa t1, t2”.

特定の時刻変数指定で有効となっている場合には、処理605で指定された時刻変数を使用している性能仕様検証処理のみを有効とする。処理604の判定で、特定の時刻変数の指定がない場合には、すべての性能仕様検証処理を有効とする。   If the time variable specified by the specific time variable is valid, only the performance specification verification process using the time variable specified in the process 605 is valid. If it is determined in step 604 that no specific time variable is specified, all performance specification verification processing is validated.

例えば、実行手順スクリプトに「-epa t502」という設定がある場合、本実施例の性能仕様検証アサーション機能により502行目と513行目の性能仕様検証処理が有効となり、509行目と511行目の性能仕様検証処理は無効となる。これにより502行目と513行目の性能仕様検証処理が対象とする処理に、他の性能仕様検証処理が含まれてしまうことを防止でき、性能仕様検証のために精度のよい処理時間が計測可能となる。   For example, when there is a setting “-epa t502” in the execution procedure script, the performance specification verification process of the 502nd line and the 513th line is enabled by the performance specification verification assertion function of this embodiment, and the 509th line and the 511th line The performance specification verification process is invalid. As a result, it is possible to prevent other performance specification verification processes from being included in the processes targeted by the performance specification verification processes on the 502nd and 513th lines, and to measure the processing time with high accuracy for performance specification verification. It becomes possible.

本実施例によれば、複数個所で性能仕様検証処理のためのコードをソースコードに追加したために、測定対象となる処理の中に他の性能仕様検証処理が含まれてしまう場合においても、測定値に他の性能仕様検証処理の時間が含まれないよう、特定の性能仕様検証処理のアサーション機能のみを有効とすることが可能となり、測定精度の低下を防止可能となる。   According to the present embodiment, since the code for performance specification verification processing is added to the source code at a plurality of locations, measurement is performed even when other performance specification verification processing is included in the processing to be measured. Only the assertion function of a specific performance specification verification process can be validated so that the value does not include the time of other performance specification verification processes, and a decrease in measurement accuracy can be prevented.

以上の実施例では性能仕様検証処理の測定項目を処理時間としたが、処理を実行するのに必要メモリ量または、処理実行時点で利用可能な空きメモリ量を性能仕様項目として指定可能な性能仕様検証処理を実行可能な実行コード生成装置の性能仕様検証アサーション機能も可能である。   In the above example, the measurement item of the performance specification verification process is the processing time, but the performance specification that can specify the amount of memory required to execute the process or the amount of free memory available at the time of the process execution as the performance specification item A performance specification verification assertion function of an executable code generation device capable of executing verification processing is also possible.

この場合は、ソースコード上に例えば「assertUsedMemory mem < 1024」といった性能仕様検証処理を記述することで、この例では該当箇所実行時点で実行コードが消費するメモリ量が1[KB]未満であることを検証可能となる。さらに使用メモリ量の計測を実行コード領域・スタック領域などに分けて検証する構成や、使用メモリ量の代わりに、空きメモリ量を検証する構成なども可能である。   In this case, by describing performance specification verification processing such as “assertUsedMemory mem <1024” in the source code, the amount of memory consumed by the execution code is less than 1 [KB] at the time of execution of the relevant location in this example. Can be verified. Further, a configuration in which the measurement of the used memory amount is verified by dividing it into an execution code area and a stack area, and a configuration in which the free memory amount is verified instead of the used memory amount are possible.

以上本実施例によれば、処理時間に加えてメモリ量を性能仕様検証の測定項目に利用可能となり、性能仕様検証で検証できる性能項目が拡充され検証の信頼性が向上可能となる。   As described above, according to the present embodiment, the amount of memory can be used as a measurement item for performance specification verification in addition to the processing time, and the performance items that can be verified by performance specification verification are expanded and the reliability of verification can be improved.

以上の実施例では性能仕様検証処理の測定項目を処理時間やメモリ容量としたが、処理を実行するのに必要なCPUリソースを性能仕様項目として指定可能な性能仕様検証処理を実行可能な実行コード生成装置の性能仕様検証アサーション機能も可能である。   In the above example, the measurement items of the performance specification verification process are the processing time and memory capacity, but the execution code that can execute the performance specification verification process that can specify the CPU resource required to execute the process as the performance specification item A generation device performance specification verification assertion function is also possible.

この場合は、ソースコード上に例えば「assertCPUusage cpu < 0.6」といった性能仕様検証処理を記述することで、この例では該当箇所実行時点で実行コードが消費するCPUリソースが0.6未満(60%未満)であることを検証可能となる。   In this case, by describing performance specification verification processing such as “assertCPUusage cpu <0.6” on the source code, in this example, the CPU resource consumed by the execution code at the time of execution of the corresponding location is less than 0.6 (less than 60% ) Can be verified.

以上本実施例によれば、処理時間に加えてCPUリソースを性能仕様検証の測定項目に利用可能となり、性能仕様検証で検証できる性能項目が拡充され検証の信頼性が向上可能となる。   As described above, according to the present embodiment, the CPU resource can be used as a measurement item for performance specification verification in addition to the processing time, and the performance items that can be verified by the performance specification verification can be expanded to improve the reliability of the verification.

なお、以上の実施例では処理時間・メモリ量・CPUリソースなどを性能仕様検証処理の測定項目としたが、例えばネットワーク転送速度など他の測定項目を用いた性能仕様検証処理も可能であり、測定項目は特にこれを限定しない。   In the above embodiment, processing time, memory amount, CPU resource, etc. are the measurement items for performance specification verification processing, but performance specification verification processing using other measurement items such as network transfer speed is also possible. The item does not particularly limit this.

また、以上の実施例において性能仕様検証処理を含んだソースコードと含まないソースコードを別々に管理することや、別々の部品としてコンパイル手段でコンパイルすることも可能である。これにより性能仕様検証処理を含んだシステムコードの管理・再利用が容易となる。更に管理の単位に関しては、例えば性能仕様検証処理の処理時間・必要メモリ量など測定項目毎にソースコードやバイナリを管理・部品化する構成も可能であり、性能仕様検証処理に着目した管理・部品化の分類方法は特にこれを限定しない。   In the above embodiment, the source code including the performance specification verification process and the source code not including the performance specification verification process can be managed separately, or can be compiled by the compiling means as separate parts. This facilitates management and reuse of system codes including performance specification verification processing. In addition, with regard to the management unit, for example, it is possible to configure and manage source code and binaries for each measurement item such as processing time of performance specification verification processing and required memory amount, and management / parts focusing on performance specification verification processing There is no particular limitation on the classification method.

本発明の実行コード生成手段のもつアサーション機能により、性能仕様検証処理のコードを、仕様機能を実装した実行コードに付加可能となる。また、機能仕様検証処理と性能仕様検証処理を同じアサーション機能を用いた仕様検証処理として一元化することが可能となる
更に、複数の測定用コードをソースコードに追加した場合に、測定対象となる処理の中に他の測定用コード処理が含まれてしまう場合でも、測定値に他の測定用コードの処理時間が含まれないように特定の性能検証処理のアサーション機能のみを有効とすることが可能となる。
With the assertion function of the execution code generation means of the present invention, the performance specification verification processing code can be added to the execution code that implements the specification function. In addition, functional specification verification processing and performance specification verification processing can be unified as specification verification processing using the same assertion function. Furthermore, when multiple measurement codes are added to the source code, the measurement target processing Even if other measurement code processing is included in the, only the specific performance verification processing assertion function can be enabled so that the measurement value does not include the processing time of other measurement code It becomes.

これにより、性能仕様の検証処理において信頼性向上と、測定精度の低下防止が可能となる。   As a result, it is possible to improve the reliability and prevent the measurement accuracy from being lowered in the performance specification verification process.

実行コード生成装置の構成を示す機能ブロック図Functional block diagram showing the configuration of the execution code generator 従来のソースコード例Conventional source code example 本発明の実施例におけるソースコード例Example of source code in an embodiment of the present invention 性能仕様検証アサーション機能の動作を示すフローチャートFlowchart showing the operation of the performance specification verification assertion function 本発明の実施例におけるソースコード例Example of source code in an embodiment of the present invention 性能仕様検証アサーション機能の動作を示すフローチャートFlowchart showing the operation of the performance specification verification assertion function

符号の説明Explanation of symbols

101 ソースコード
102 実行手順スクリプト
103 実行コード生成装置
104 コンパイル手段
105 性能仕様検証アサーション機能
106 リンク手段
107 実行コード
101 Source code 102 Execution procedure script 103 Execution code generation device 104 Compiling means 105 Performance specification verification assertion function 106 Link means 107 Execution code

Claims (14)

演算処理装置で実行する実行コードをソースコードから生成する実行コード生成装置において、
前記実行コードの処理時間に関する性能検証処理を実行するコードを、前記実行コードに付与する機能を有するアサーション機能を設けたことを特徴とする実行コード生成装置。
In an execution code generation device that generates an execution code to be executed by an arithmetic processing device from a source code,
An execution code generation apparatus comprising an assertion function having a function of giving a code for executing a performance verification process related to a processing time of the execution code to the execution code.
請求項1記載の実行コード生成装置において、
前記アサーション機能の有効・無効を設定するアサーション指定情報が入力され、
当該アサーション指定情報がアサーション機能の有効を示す場合は、性能検証処理を実行するコードを付与して、前記実行コードを生成することを特徴とする実行コード生成装置。
The execution code generation device according to claim 1,
Assertion specification information for setting validity / invalidity of the assertion function is input,
An execution code generation device, wherein, when the assertion designation information indicates that the assertion function is valid, a code for executing a performance verification process is added to generate the execution code.
請求項1記載の実行コード生成装置において、
前記アサーション機能の有効・無効を設定するアサーション指定情報が入力され、
当該アサーション指定情報が特定の性能検証処理のアサーション機能の有効を示す場合に、当該特定の性能検証処理を実行するコードを付与して、前記実行コードを生成することを特徴とする実行コード生成装置。
The execution code generation device according to claim 1,
Assertion specification information for setting validity / invalidity of the assertion function is input,
When the assertion designation information indicates the validity of the assertion function of a specific performance verification process, an execution code generation apparatus is provided that generates the execution code by adding a code for executing the specific performance verification process .
請求項1、2、3の内の何れかに記載の実行コード生成装置において、
前記実行コードの実行における実行処理時間を性能項目とする性能検証処理を実行するコードを、仕様機能を実行する実行コードに付与することを特徴とする実行コード生成装置。
The execution code generation device according to any one of claims 1, 2, and 3,
An execution code generation apparatus characterized in that a code for executing a performance verification process having an execution processing time in execution of the execution code as a performance item is added to an execution code for executing a specification function.
演算処理装置で実行する実行コードをソースコードから生成する実行コード生成装置において、
前記実行コードの実行における必要メモリ量または空きメモリ量に関する性能検証処理を実行するコードを、前記実行コードに付与する機能を有するアサーション機能を設けたことを特徴とする実行コード生成装置。
In an execution code generation device that generates an execution code to be executed by an arithmetic processing device from a source code,
An execution code generation apparatus comprising an assertion function having a function of giving a code for executing a performance verification process related to a necessary memory amount or an empty memory amount in execution of the execution code to the execution code.
請求項5記載の実行コード生成装置において、
前記アサーション機能の有効・無効を設定するアサーション指定情報が入力され、
当該アサーション指定情報がアサーション機能の有効を示す場合は、性能検証処理を実行するコードを付与して、前記実行コードを生成することを特徴とする実行コード生成装置。
The execution code generation device according to claim 5, wherein
Assertion specification information for setting validity / invalidity of the assertion function is input,
An execution code generation device, wherein, when the assertion designation information indicates that the assertion function is valid, a code for executing a performance verification process is added to generate the execution code.
請求項5記載の実行コード生成装置において、
前記アサーション機能の有効・無効を設定するアサーション指定情報が入力され、
当該アサーション指定情報が特定の性能検証処理のアサーション機能の有効を示す場合に、当該特定の性能検証処理を実行するコードを付与して、前記実行コードを生成することを特徴とする実行コード生成装置。
The execution code generation device according to claim 5, wherein
Assertion specification information for setting validity / invalidity of the assertion function is input,
When the assertion designation information indicates the validity of the assertion function of a specific performance verification process, an execution code generation apparatus is provided that generates the execution code by adding a code for executing the specific performance verification process .
演算処理装置で実行する実行コードをソースコードから生成する実行コード生成装置において、
前記実行コードの実行における演算処理装置の利用率に関する性能検証処理を実行するコードを、前記実行コードに付与する機能を有するアサーション機能を設けたことを特徴とする実行コード生成装置。
In an execution code generation device that generates an execution code to be executed by an arithmetic processing device from a source code,
An execution code generation apparatus comprising an assertion function having a function of giving a code for executing a performance verification process relating to a utilization rate of an arithmetic processing unit in execution of the execution code to the execution code.
請求項8記載の実行コード生成装置において、
前記アサーション機能の有効・無効を設定するアサーション指定情報が入力され、
当該アサーション指定情報がアサーション機能の有効を示す場合は、性能検証処理を実行するコードを付与して、前記実行コードを生成することを特徴とする実行コード生成装置。
The execution code generation device according to claim 8.
Assertion specification information for setting validity / invalidity of the assertion function is input,
An execution code generation device, wherein, when the assertion designation information indicates that the assertion function is valid, a code for executing a performance verification process is added to generate the execution code.
請求項8記載の実行コード生成装置において、
前記アサーション機能の有効・無効を設定するアサーション指定情報が入力され、
当該アサーション指定情報が特定の性能検証処理のアサーション機能の有効を示す場合に、当該特定の性能検証処理を実行するコードを付与して、前記実行コードを生成することを特徴とする実行コード生成装置。
The execution code generation device according to claim 8.
Assertion specification information for setting validity / invalidity of the assertion function is input,
When the assertion designation information indicates the validity of the assertion function of a specific performance verification process, an execution code generation apparatus is provided that generates the execution code by adding a code for executing the specific performance verification process .
演算処理装置で実行する実行コードをソースコードから生成する実行コード生成方法において、
前記実行コードの処理時間に関する性能検証処理を実行するコードを、前記実行コードに付与する機能を有するアサーション処理を設けたことを特徴とする実行コード生成方法。
In an execution code generation method for generating an execution code to be executed by an arithmetic processing unit from a source code,
An execution code generation method comprising an assertion process having a function of giving a code for executing a performance verification process related to a processing time of the execution code to the execution code.
演算処理装置で実行する実行コードをソースコードから生成する実行コード生成方法において、
前記実行コードの実行における必要メモリ量または空きメモリ量に関する性能検証処理を実行するコードを、前記実行コードに付与する機能を有するアサーション処理を設けたことを特徴とする実行コード生成方法。
In an execution code generation method for generating an execution code to be executed by an arithmetic processing unit from a source code,
An execution code generation method comprising: an assertion process having a function of giving a code for executing a performance verification process related to a necessary memory amount or a free memory amount in execution of the execution code to the execution code.
演算処理装置で実行する実行コードをソースコードから生成する実行コード生成方法において、
前記実行コードの実行における演算処理装置の利用率に関する性能検証処理を実行するコードを、前記実行コードに付与する機能を有するアサーション処理を設けたことを特徴とする実行コード生成方法。
In an execution code generation method for generating an execution code to be executed by an arithmetic processing unit from a source code,
An execution code generation method comprising: an assertion process having a function of giving a code for executing a performance verification process related to a utilization rate of an arithmetic processing unit in execution of the execution code to the execution code.
請求項1、5、8の内の何れかに記載の実行コード生成装置において、性能検証処理記述を含むソースコードと当該性能検証処理記述を含まないソースコードとを異なるソースコードグループとして管理することを特徴とするソースコードの管理方法。   9. The execution code generation device according to claim 1, wherein source code including a performance verification process description and source code not including the performance verification process description are managed as different source code groups. Source code management method characterized by
JP2007261523A 2007-10-05 2007-10-05 Execution code generation apparatus, execution code generation method, and source code management method Active JP4887256B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007261523A JP4887256B2 (en) 2007-10-05 2007-10-05 Execution code generation apparatus, execution code generation method, and source code management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007261523A JP4887256B2 (en) 2007-10-05 2007-10-05 Execution code generation apparatus, execution code generation method, and source code management method

Publications (2)

Publication Number Publication Date
JP2009093310A true JP2009093310A (en) 2009-04-30
JP4887256B2 JP4887256B2 (en) 2012-02-29

Family

ID=40665269

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007261523A Active JP4887256B2 (en) 2007-10-05 2007-10-05 Execution code generation apparatus, execution code generation method, and source code management method

Country Status (1)

Country Link
JP (1) JP4887256B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011253426A (en) * 2010-06-03 2011-12-15 Nippon Telegr & Teleph Corp <Ntt> Memory consumption amount measurement method and memory consumption amount measurement program

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03186945A (en) * 1989-12-18 1991-08-14 Oki Electric Ind Co Ltd Measurement system for program execution characteristic
JPH05334124A (en) * 1992-05-28 1993-12-17 Mitsubishi Electric Corp Device for predicting required time of program
JPH0721061A (en) * 1993-07-05 1995-01-24 Hitachi Ltd Program performance analyzing method
JP2002082926A (en) * 2000-09-06 2002-03-22 Nippon Telegr & Teleph Corp <Ntt> Distributed application test and operation management system
JP2003058392A (en) * 2001-08-09 2003-02-28 Fujitsu Ltd Software development environmental program, its recording medium, program debugging device and method
JP2005242879A (en) * 2004-02-27 2005-09-08 Nec Corp Performance information acquiring device and method, and control program
JP2007207173A (en) * 2006-02-06 2007-08-16 Fujitsu Ltd Performance analysis program, performance analysis method, and performance analysis device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03186945A (en) * 1989-12-18 1991-08-14 Oki Electric Ind Co Ltd Measurement system for program execution characteristic
JPH05334124A (en) * 1992-05-28 1993-12-17 Mitsubishi Electric Corp Device for predicting required time of program
JPH0721061A (en) * 1993-07-05 1995-01-24 Hitachi Ltd Program performance analyzing method
JP2002082926A (en) * 2000-09-06 2002-03-22 Nippon Telegr & Teleph Corp <Ntt> Distributed application test and operation management system
JP2003058392A (en) * 2001-08-09 2003-02-28 Fujitsu Ltd Software development environmental program, its recording medium, program debugging device and method
JP2005242879A (en) * 2004-02-27 2005-09-08 Nec Corp Performance information acquiring device and method, and control program
JP2007207173A (en) * 2006-02-06 2007-08-16 Fujitsu Ltd Performance analysis program, performance analysis method, and performance analysis device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011253426A (en) * 2010-06-03 2011-12-15 Nippon Telegr & Teleph Corp <Ntt> Memory consumption amount measurement method and memory consumption amount measurement program

Also Published As

Publication number Publication date
JP4887256B2 (en) 2012-02-29

Similar Documents

Publication Publication Date Title
JP6307140B2 (en) System and method for safety critical software automatic requirement based test case generation
CN107943469B (en) Intelligent contract issuing method and device
CN106095654B (en) Performance verification device, performance verification system, and performance verification method
US8601433B2 (en) Method and apparatus for generating virtual software platform based on component model and validating software platform architecture using the platform
US20150033212A1 (en) Testing program, testing method, and testing device
BR102016018127A2 (en) design method based on critical security software model
US20120124556A1 (en) Computing device and device driver debugging method
EP3234851B1 (en) A system and method for facilitating static analysis of software applications
US20120030652A1 (en) Mechanism for Describing Values of Optimized Away Parameters in a Compiler-Generated Debug Output
US20110126179A1 (en) Method and System for Dynamic Patching Software Using Source Code
US10095512B2 (en) Program development support device, non-transitory storage medium storing thereon computer-readable program development support program, and program development support method
US9274755B2 (en) Infrastructure for generating code using annotation and template generators
JP4887256B2 (en) Execution code generation apparatus, execution code generation method, and source code management method
US9646252B2 (en) Template clauses based SAT techniques
US9880813B2 (en) RTE code generating method and apparatus performing the same
JP6107455B2 (en) Test schedule determination device and program
US9710360B2 (en) Optimizing error parsing in an integrated development environment
US8352234B2 (en) Model generation based on a constraint and an initial model
CN112783705B (en) Test method, device, system, chip and electronic equipment
CN115168175A (en) Program error solving method, device, electronic equipment and storage medium
JP5093508B2 (en) Loop optimization system, loop optimization method, and loop optimization program
US10088834B2 (en) Control system having function for optimizing control software of numerical controller in accordance with machining program
KR20100069768A (en) Method, apparatus and computer-readable recording medium with program for generating runtime environment
JP6398456B2 (en) Software generator
JP2016029547A (en) Execution module generation apparatus and electronic control unit

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100316

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20110602

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110614

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110801

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110823

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20111021

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20111115

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20111212

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141216

Year of fee payment: 3

R151 Written notification of patent or utility model registration

Ref document number: 4887256

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20141216

Year of fee payment: 3