WO2012128120A1 - Test specification generator, test specification generation method, and program - Google Patents

Test specification generator, test specification generation method, and program Download PDF

Info

Publication number
WO2012128120A1
WO2012128120A1 PCT/JP2012/056368 JP2012056368W WO2012128120A1 WO 2012128120 A1 WO2012128120 A1 WO 2012128120A1 JP 2012056368 W JP2012056368 W JP 2012056368W WO 2012128120 A1 WO2012128120 A1 WO 2012128120A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
test
variable
information acquisition
acquisition unit
Prior art date
Application number
PCT/JP2012/056368
Other languages
French (fr)
Japanese (ja)
Inventor
崇央 安藤
銀惠 崔
秀明 西原
Original Assignee
独立行政法人産業技術総合研究所
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 独立行政法人産業技術総合研究所 filed Critical 独立行政法人産業技術総合研究所
Priority to JP2013505910A priority Critical patent/JP5729465B2/en
Publication of WO2012128120A1 publication Critical patent/WO2012128120A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3684Test management for test design, e.g. generating new test cases

Abstract

Provided is a test specification generator comprising: a test information storage unit which can store test information that is information used in a test; a specification description information storage unit which can store specification description information that is information related to a target specification described in a specification description language constituting a language for describing the target specification, that is information including at least one variable declaration, and that is information including test source information for generating the test information; a test information acquisition unit that uses the variable declaration and test source information to acquire at least one item of the test information having at least the input value of at least one variable; and a test information accumulation unit for accumulating, in the test information storage unit, at least one item of the test information acquired by the test information acquisition unit. Thus, if information for test design is described at the time of the target design, information related to the appropriate test specification can be automatically generated.

Description

テスト仕様生成装置、テスト仕様生成方法、およびプログラムTest specification generation apparatus, test specification generation method, and program
 本発明は、仕様記述言語で記述された仕様記述情報から、テスト仕様を生成するテスト仕様生成装置等に関するものである。 The present invention relates to a test specification generation device for generating a test specification from specification description information described in a specification description language.
 従来、UMLのような自然文を含む仕様記述言語による仕様記述において、自然言語の特性から来る作成効率、品質の問題を改善する仕様記述支援方法があった(例えば、特許文献1参照)。かかる仕様記述支援方法において、変更可能部分と変更不能部分とで構成される自然文のテンプレートからひとつを選択し、テンプレートの変更可能部分に用語の入力を行う。また、本仕様記述支援方法において、用語の辞書を有し、未登録の用語について、用語の登録を促すことを特徴とする。 Conventionally, there has been a specification description support method for improving the problem of creation efficiency and quality that comes from the characteristics of natural language in specification description using a specification description language including a natural sentence such as UML (for example, see Patent Document 1). In this specification description support method, one of natural sentence templates composed of a changeable part and an unchangeable part is selected, and a term is input to the changeable part of the template. Further, the specification description support method has a dictionary of terms, and prompts registration of terms for unregistered terms.
特開2008-15879号公報(第1頁、第1図等)Japanese Patent Laid-Open No. 2008-15879 (first page, FIG. 1 etc.)
 しかしながら、従来技術において、設計段階での仕様記述の支援は行えても、テスト工程の支援は不十分で、テスト設計のために多大な労力を要していた。 However, in the conventional technology, although the description description can be supported at the design stage, the test process support is insufficient, and a great deal of labor is required for the test design.
 本第一の発明のテスト仕様生成装置は、テストで利用する情報であるテスト情報を格納し得るテスト情報格納部と、対象の仕様について記述する言語である仕様記述言語で記述された対象の仕様に関する情報であり、1以上の変数の宣言を含む情報であり、テスト情報を生成するためのテスト元情報を含む情報である仕様記述情報を格納し得る仕様記述情報格納部と、変数の宣言およびテスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得するテスト情報取得部と、テスト情報取得部が取得した1以上のテスト情報をテスト情報格納部に蓄積するテスト情報蓄積部とを具備するテスト仕様生成装置である。 The test specification generation device of the first invention includes a test information storage unit that can store test information that is information used in a test, and a target specification described in a specification description language that is a language for describing the target specification. A specification description information storage unit that can store specification description information that is information including one or more variable declarations and includes test source information for generating test information, and variable declaration and Using the test source information, a test information acquisition unit that acquires one or more test information having at least one input value of each of one or more variables, and one or more test information acquired by the test information acquisition unit in the test information storage unit A test specification generation device including a test information storage unit for storing.
 かかる構成により、対象の設計時に仕様に関する情報を形式的に記載すれば、適切なテスト仕様に関する情報が自動生成できる。 With this configuration, if information about specifications is formally described at the time of designing the target, information about appropriate test specifications can be automatically generated.
 また、本第二の発明のテスト仕様生成装置は、第一の発明に対して、変数は、型を有し、仕様記述情報は、1以上の変数のうち、1以上の各変数に対応付けて、各変数が採り得る値の中で、テストで使用する値を特定する情報であるテスト元情報を有し、テスト情報取得部は、仕様記述情報から、テスト元情報を変数と対応付けて取得するテスト元情報取得手段と、仕様記述情報から、テスト元情報を有さない変数と変数の型を取得する変数情報取得手段と、テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値を変数ごとに取得し、かつ、変数情報取得手段が取得した変数と変数の型から入力値を変数ごとに取得するテスト情報取得手段とを具備するテスト仕様生成装置である。 In the test specification generation device according to the second aspect of the present invention, the variable has a type and the specification description information is associated with one or more variables among the one or more variables. The test source information that is information for specifying the value used in the test among the values that each variable can take, and the test information acquisition unit associates the test source information with the variable from the specification description information. From the test source information acquisition means to be acquired, the variable information acquisition means to acquire variables and variable types that do not have test source information from the specification description information, and the test source information acquired by the test source information acquisition means, each test Test information acquisition means for acquiring one or more input values of variables corresponding to the original information for each variable and acquiring the input value for each variable from the variable acquired by the variable information acquisition means and the variable type. This is a test specification generation device.
 かかる構成により、対象の設計時に、形式的に記載された仕様の中で、変数に対応付けてテストで使用する値を特定すれば、適切なテスト仕様に関する情報が自動生成できる。 With such a configuration, information related to appropriate test specifications can be automatically generated by specifying values to be used in tests in association with variables among the specifications described formally at the time of target design.
 また、本第三の発明のテスト仕様生成装置は、第二の発明に対して、テスト情報取得手段は、テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、変数情報取得手段が取得した変数と変数の型から入力値および出力値を変数ごとに取得するテスト仕様生成装置である。 Further, in the test specification generation device according to the third aspect of the invention, in contrast to the second aspect of the invention, the test information acquisition unit includes a variable corresponding to each test source information from the test source information acquired by the test source information acquisition unit. The test specification generation device acquires one or more input values and output values for each variable, and acquires the input value and output value for each variable from the variable and variable type acquired by the variable information acquisition unit.
 かかる構成により、対象の設計時に、形式的に記載された仕様の中で、変数に対応付けてテストで使用する値を特定すれば、適切なテストスイートが自動生成できる。 With such a configuration, an appropriate test suite can be automatically generated by specifying a value to be used in a test in association with a variable in a specification described formally at the time of target design.
 また、本第四の発明のテスト仕様生成装置は、第三の発明に対して、仕様記述情報は、1以上の変数の宣言、および制約に関する記述である1以上の制約情報を有し、テスト情報取得手段は、テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、変数情報取得手段が取得した変数と変数の型から入力値および出力値を変数ごとに取得し、かつ、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するテスト仕様生成装置である。 In addition, the test specification generation device of the fourth aspect of the invention has a specification description information having declarations of one or more variables and one or more pieces of constraint information that is a description about the constraints, as compared with the third aspect of the invention. The information acquisition unit acquires, for each variable, one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit, and the variable information acquisition unit acquires One or more test suites that are a set of one or more input values and one or more output values so that input values and output values are obtained for each variable from the selected variables and variable types, and all constraint information is satisfied. This is a test specification generation device to be acquired.
 かかる構成により、対象の設計時に、形式的に記載された仕様の中で、変数に対応付けてテストで使用する値を特定すれば、適切なテストスイートが自動生成できる。 With such a configuration, an appropriate test suite can be automatically generated by specifying a value to be used in a test in association with a variable in a specification described formally at the time of target design.
 また、本第五の発明のテスト仕様生成装置は、第四の発明に対して、制約情報は、1以上の変数の値の集合を有する状態である遷移前状態と、遷移前状態に対して発生するイベントと、遷移前状態の場合にイベントが発生した場合に移行する状態である遷移後状態とを有する状態遷移情報、または1以上の変数の値の集合を有する第一状態と第一状態の場合に必ず採用される1以上の変数の値の集合を有する第二状態とを有する不変条件情報であるテスト仕様生成装置である。 In addition, the test specification generation device according to the fifth aspect of the present invention is based on the pre-transition state, which is a state having a set of one or more variable values, and the pre-transition state. State transition information having an event that occurs and a post-transition state that is a state to be transitioned to when an event occurs in the pre-transition state, or a first state and a first state having a set of one or more variable values In this case, the test specification generating apparatus is invariant condition information having a second state having a set of values of one or more variables that is always employed in the case of.
 かかる構成により、対象の設計時に、形式的に記載された仕様の中で、変数に対応付けてテストで使用する値を特定すれば、適切なテストスイートが自動生成できる。 With such a configuration, an appropriate test suite can be automatically generated by specifying a value to be used in a test in association with a variable in a specification described formally at the time of target design.
 また、本第六の発明のテスト仕様生成装置は、第五の発明に対して、テスト情報取得手段は、1以上の制約情報が有する遷移前状態とイベントとの組である1以上の前提情報をも制約情報として用いて、すべての制約情報を満たすような、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するテスト仕様生成装置である。 Further, in the test specification generation device of the sixth aspect of the invention, in contrast to the fifth aspect of the invention, the test information acquisition means has one or more premise information that is a set of a pre-transition state and an event included in one or more constraint information. Is a test specification generation device that acquires one or more test suites that are a set of one or more input values and one or more output values that satisfy all the constraint information.
 かかる構成により、状態遷移の前提条件を満たさないテストスイートの生成を防止できる。 This configuration can prevent the generation of test suites that do not satisfy the prerequisites for state transition.
 また、本第七の発明のテスト仕様生成装置は、第五の発明に対して、テスト情報取得部は、イベントに関する制約を示す1以上のイベント制約情報を格納し得るイベント制約情報格納手段をさらに具備し、テスト情報取得手段は、1以上のイベント制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するテスト仕様生成装置である。 The test specification generation device according to the seventh aspect of the present invention further includes an event constraint information storage unit that can store one or more event constraint information indicating a constraint related to an event. The test information acquisition means includes a test suite that is a set of one or more input values and one or more output values so as to satisfy all the constraint information by using one or more event constraint information as constraint information. It is a test specification generation device that acquires one or more.
 かかる構成により、指定したイベントを含むテストスイートの生成を防止できる。 This configuration can prevent the generation of test suites that include specified events.
 また、本第八の発明のテスト仕様生成装置は、第五の発明に対して、テスト情報取得手段は、既に取得したテストスイートに対応する情報から、遷移前状態の情報を削除し、かつ、遷移前状態以外の情報が有する部分の論理否定を構成した1以上の第二制約情報を取得し、1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するテスト仕様生成装置である。 Further, in the test specification generation device of the eighth invention, in contrast to the fifth invention, the test information acquisition unit deletes the information of the pre-transition state from the information corresponding to the already acquired test suite, and To obtain one or more second constraint information that constitutes a logical negation of a part of information other than the pre-transition state, and to satisfy all the constraint information using the one or more second constraint information as constraint information, This is a test specification generation device that acquires one or more test suites that are a set of one or more input values and one or more output values.
 かかる構成により、遷移後状態として既知のものを持つテストスイートの生成を防止できる。 Such a configuration can prevent generation of a test suite having a known post-transition state.
 また、本第九の発明のテスト仕様生成装置は、第五の発明に対して、テスト情報取得手段は、既に取得したテストスイートに対応する情報から、遷移後状態の情報を削除し、かつ、遷移後状態以外の情報が有する部分の論理否定を構成した1以上の第二制約情報を取得し、1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するテスト仕様生成装置である。 Further, in the test specification generation device of the ninth invention, the test information acquisition means, for the fifth invention, deletes post-transition state information from the information corresponding to the test suite already acquired, and To obtain one or more second constraint information that constitutes the logical negation of the part of the information other than the post-transition state, and to satisfy all the constraint information using the one or more second constraint information as the constraint information, This is a test specification generation device that acquires one or more test suites that are a set of one or more input values and one or more output values.
 かかる構成により、遷移前状態として既知のものを持つテストスイートの生成を防止できる。 Such a configuration can prevent generation of a test suite having a known pre-transition state.
 本発明によるテスト仕様生成装置によれば、対象の設計時に、形式的に記載された仕様の中で、テスト設計のための情報を記載すれば、適切なテスト仕様に関する情報が自動生成できる。 The test specification generation apparatus according to the present invention can automatically generate information related to appropriate test specifications if information for test design is described in the specifications described formally at the time of target design.
実施の形態1におけるテスト仕様生成装置のブロック図Block diagram of test specification generation apparatus according to Embodiment 1 同テスト仕様生成装置の動作について説明するフローチャートFlow chart explaining operation of the test specification generation device 同変数表取得処理について説明するフローチャートFlow chart explaining the variable table acquisition process 同命題論理式取得処理について説明するフローチャートFlow chart for explaining the propositional formula acquisition process 同テスト情報取得処理について説明するフローチャートFlow chart explaining the test information acquisition process 同仕様記述情報を示す図Figure showing the same specification description information 同変数表を示す図Figure showing the variable table 同命題論理式の集合の例を示す図Diagram showing an example of a set of propositional formulas 同テスト情報取得手段が取得した数値列を示す図The figure which shows the numerical sequence which the same test information acquisition means acquires 同テスト情報を示す図Diagram showing the test information 同テスト情報取得部の動作の概念について説明する図The figure explaining the concept of operation | movement of the test information acquisition part 同テスト仕様生成装置の処理の流れを説明する図The figure explaining the flow of processing of the test specification generation device 実施の形態2におけるテスト仕様生成装置2のブロック図Block diagram of test specification generation apparatus 2 in Embodiment 2 同仕様記述情報を示す図Figure showing the same specification description information 同変数表を示す図Figure showing the variable table 同命題論理式の集合の例を示す図Diagram showing an example of a set of propositional formulas 同テスト情報取得手段が取得した数値列を示す図The figure which shows the numerical sequence which the same test information acquisition means acquires 同無用なテストスイートの抑制を図る動作を説明する図Diagram explaining the operation to suppress the unnecessary test suite 実施の形態1におけるコンピュータシステムの概観図Overview of the computer system in the first embodiment 同コンピュータシステムのブロック図Block diagram of the computer system
 以下、テスト仕様生成装置等の実施形態について図面を参照して説明する。なお、実施の形態において同じ符号を付した構成要素は同様の動作を行うので、再度の説明を省略する場合がある。 Hereinafter, embodiments of the test specification generation device and the like will be described with reference to the drawings. In addition, since the component which attached | subjected the same code | symbol in embodiment performs the same operation | movement, description may be abbreviate | omitted again.
(実施の形態1)
 本実施の形態において、仕様記述言語で記述された仕様記述情報から、テスト仕様を生成する生成テスト仕様生成装置について説明する。なお、仕様記述言語は、通常、形式的な仕様記述言語であるが、その形式を問わない。仕様記述言語は、通常、ソフトウェアを設計・構築する際に、その仕様を記述するために用いられる言語であるが、ハードウェア記述言語でも良い。また、仕様記述言語で記述された仕様記述情報は、プログラムに自動変換されることは好適であるが、必ずしもプログラムに自動変換される必要はない。
(Embodiment 1)
In the present embodiment, a generation test specification generation apparatus that generates a test specification from specification description information described in a specification description language will be described. The specification description language is usually a formal specification description language, but the format is not limited. The specification description language is usually a language used to describe the specification when designing and constructing software, but may be a hardware description language. Moreover, it is preferable that the specification description information described in the specification description language is automatically converted into a program, but it is not always necessary to be automatically converted into a program.
 図1は、本実施の形態におけるテスト仕様生成装置1のブロック図である。テスト仕様生成装置1は、テスト情報格納部11、仕様記述情報格納部12、受付部13、テスト情報取得部14、テスト情報蓄積部15、およびテスト情報出力部16を備える。 FIG. 1 is a block diagram of the test specification generation device 1 in the present embodiment. The test specification generation device 1 includes a test information storage unit 11, a specification description information storage unit 12, a reception unit 13, a test information acquisition unit 14, a test information storage unit 15, and a test information output unit 16.
 また、テスト情報取得部14は、テスト元情報取得手段141、変数情報取得手段142、およびテスト情報取得手段143を備える。 The test information acquisition unit 14 includes a test source information acquisition unit 141, a variable information acquisition unit 142, and a test information acquisition unit 143.
 テスト情報格納部11は、テスト情報を格納し得る。テスト情報は、対象のテストで利用する情報である。対象とは、仕様記述の対象であり、通常、ソフトウェアであるが、ハードウェアでも良い。また、テスト情報とは、いわゆる1以上のテストケースでも良いし、いわゆる1以上のテストスイートでも良い。テストケースは、テストの際に対象に与える入力の情報(例えば、1以上の入力値)である。テストスイートは、テストの際に対象に与える入力の情報(例えば、1以上の入力値)と、入力の情報を与えた場合の出力の情報(例えば、1以上の出力値)の組である。テスト情報は、テストの実施に役立つ情報であれば良い。テスト情報は、自動テストのための情報でも良いし、手動でのテストで利用される情報でも良い。なお、出力の情報とは、対象の動作の結果である。 The test information storage unit 11 can store test information. The test information is information used in the target test. The target is a target of specification description, which is usually software, but may be hardware. The test information may be so-called one or more test cases or so-called one or more test suites. The test case is input information (for example, one or more input values) given to the subject during the test. The test suite is a set of input information (for example, one or more input values) given to an object during a test and output information (for example, one or more output values) when the input information is given. The test information may be information that is useful for performing the test. The test information may be information for automatic testing or may be information used for manual testing. The output information is a result of the target operation.
 テスト情報格納部11は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。 The test information storage unit 11 is preferably a non-volatile recording medium, but can also be realized by a volatile recording medium.
 仕様記述情報格納部12は、仕様記述情報を格納し得る。仕様記述情報は、仕様記述言語で記述された対象の仕様に関する情報である。また、仕様記述情報は、通常、1以上の変数の宣言を含む情報である。また、仕様記述情報は、テスト情報を生成するためのテスト元情報を含む情報であることは好適である。仕様記述情報は、1以上(n個)の変数のうち、1以上の各変数(m個,n>=m)に対応付けて、各変数が採り得る値の中で、テストで使用する変数の値を特定する情報であるテスト元情報を有しても良い。つまり、テスト元情報は、テストで使用する1以上の値でも良いし、テストで使用する値の範囲(例えば、1~10、など)でも良いし、テストで使用しない1以上の値でも良いし、テストで使用しない値の範囲でも良いし、テストで使用する値の条件(例えば、偶数、3文字以内のアルファベットの組み合わせの文字列等)でも良いし、テストで使用しない値の条件(例えば、3で割り切れる自然数等)でも良い。 The specification description information storage unit 12 can store specification description information. The specification description information is information related to the target specification described in the specification description language. The specification description information is usually information including declaration of one or more variables. The specification description information is preferably information including test source information for generating test information. The specification description information is a variable used in a test among values that each variable can take in association with one or more variables (m, n> = m) among one or more (n) variables. Test source information, which is information for specifying the value of, may be included. In other words, the test source information may be one or more values used in the test, a range of values used in the test (for example, 1 to 10, etc.), or one or more values not used in the test. , A range of values not used in the test, a condition of values used in the test (for example, an even number, a combination of 3 or less alphabetic characters), and a condition of values not used in the test (for example, It may be a natural number divisible by 3).
 また、仕様記述情報は、1以上の変数の宣言、および制約に関する記述である1以上の制約情報を有することは好適である。制約情報は、例えば、状態遷移情報または不変条件情報であることは好適である。また、状態遷移情報とは、状態遷移に関する情報である。状態遷移情報は、遷移前状態とイベントと遷移後状態とアクションとを有することは好適である。状態遷移情報は、遷移前状態とイベントと遷移後状態とを有する情報であっても良い。遷移前状態は、イベントを受け付ける前の状態である。遷移前状態は、1以上の変数の値の集合を有する状態である。イベントは、遷移前状態に対して発生する。遷移後状態とは、遷移前状態の際にイベントが発生した場合に移行する状態である。遷移後状態は、1以上の変数の値の集合を有する状態である。アクションは、明示的に特定のイベントを発生させる。また、不変条件情報は、不変条件を示す。不変条件情報は、第一状態と第二状態とを有する。第一状態は、1以上の変数の値の集合を有する。第二状態は、第一状態の場合に必ず採用される1以上の変数の値の集合を有する。不変条件情報は、第一状態でも第二状態でも変わらず成立する条件を示す。また、ここで、変数は、通常、型を有する。型は、データタイプとも言う。型には、採り得る値や範囲が決まっている型もある。なお、仕様記述情報は、ファイルであることは好適であるが、そのデータ構造は問わない。 In addition, it is preferable that the specification description information includes one or more variable declarations and one or more constraint information that is a description related to the constraints. The constraint information is preferably, for example, state transition information or invariant condition information. The state transition information is information related to state transition. It is preferable that the state transition information includes a pre-transition state, an event, a post-transition state, and an action. The state transition information may be information having a pre-transition state, an event, and a post-transition state. The pre-transition state is a state before accepting an event. The pre-transition state is a state having a set of one or more variable values. An event occurs for the pre-transition state. The post-transition state is a state that is shifted when an event occurs in the pre-transition state. The post-transition state is a state having a set of one or more variable values. An action explicitly raises a specific event. The invariant condition information indicates an invariant condition. The invariant condition information has a first state and a second state. The first state has a set of values of one or more variables. The second state has a set of values of one or more variables that are always adopted in the case of the first state. The invariant condition information indicates a condition that is satisfied in both the first state and the second state. Here, the variable usually has a type. A type is also called a data type. Some types have a fixed value or range. The specification description information is preferably a file, but the data structure is not limited.
 仕様記述情報格納部12は、不揮発性の記録媒体が好適であるが、揮発性の記録媒体でも実現可能である。 The specification description information storage unit 12 is preferably a nonvolatile recording medium, but can also be realized by a volatile recording medium.
 仕様記述情報格納部12に仕様記述情報が記憶される過程は問わない。例えば、記録媒体を介して仕様記述情報が仕様記述情報格納部12で記憶されるようになってもよく、通信回線等を介して送信された仕様記述情報が仕様記述情報格納部12で記憶されるようになってもよく、あるいは、入力デバイスを介して入力された仕様記述情報が仕様記述情報格納部12で記憶されるようになってもよい。 The process in which the specification description information is stored in the specification description information storage unit 12 does not matter. For example, specification description information may be stored in the specification description information storage unit 12 via a recording medium, and specification description information transmitted via a communication line or the like is stored in the specification description information storage unit 12. Alternatively, specification description information input via an input device may be stored in the specification description information storage unit 12.
 受付部13は、指示や情報を受け付ける。指示とは、例えば、テスト情報を生成する指示であるテスト情報生成指示である。また、指示とは、例えば、テスト情報を出力する指示であるテスト情報出力指示である。指示などの入力手段は、キーボードやマウスやメニュー画面によるもの等、何でも良い。受付部13は、キーボード等の入力手段のデバイスドライバーや、メニュー画面の制御ソフトウェア等で実現され得る。 The accepting unit 13 accepts instructions and information. The instruction is, for example, a test information generation instruction that is an instruction for generating test information. The instruction is, for example, a test information output instruction that is an instruction to output test information. The input means such as an instruction may be anything such as a keyboard, mouse, or menu screen. The receiving unit 13 can be realized by a device driver for input means such as a keyboard, control software for a menu screen, or the like.
 テスト情報取得部14は、仕様記述情報が有する変数の宣言およびテスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得する。入力値とは、対象に与える値である。入力値は、変数の初期値や、設定値などでも良い。ここで、取得するとは、生成することも含む。また、取得するとは、記録媒体から読み出すことでも良い。 The test information acquisition unit 14 acquires one or more test information having at least an input value of each one or more variables, using the variable declaration and the test source information included in the specification description information. An input value is a value given to an object. The input value may be an initial value of a variable or a set value. Here, acquiring includes generating. Also, the acquisition may be reading from a recording medium.
 テスト情報取得部14を構成するテスト元情報取得手段141は、仕様記述情報から、テスト元情報を変数と対応付けて取得する。テスト元情報取得手段141は、例えば、仕様記述情報に対して、字句解析および構文解析を行い、テスト元情報を変数と対応付けて取得する。また、テスト元情報取得手段141は、例えば、仕様記述情報に対して、予約語(例えば、”Var”、”testedwith”など)のパターンマッチング等を行い、テスト元情報を変数と対応付けて取得しても良い。つまり、テスト元情報取得手段141は、仕様記述情報から、予め決められた文字列(例えば、予約語)を用いて、テスト元情報を変数と対応付けて取得しても良い。 The test source information acquisition unit 141 constituting the test information acquisition unit 14 acquires the test source information in association with the variable from the specification description information. For example, the test source information acquisition unit 141 performs lexical analysis and syntax analysis on the specification description information, and acquires the test source information in association with variables. In addition, the test source information acquisition unit 141 performs, for example, pattern matching of reserved words (for example, “Var”, “testedwith”, etc.) on the specification description information, and acquires test source information in association with variables. You may do it. That is, the test source information acquisition unit 141 may acquire the test source information in association with the variable from the specification description information using a predetermined character string (for example, a reserved word).
 変数情報取得手段142は、仕様記述情報から、テスト元情報を有さない変数と当該変数の型を取得する。 The variable information acquisition unit 142 acquires a variable having no test source information and the type of the variable from the specification description information.
 テスト情報取得手段143は、テスト元情報取得手段141が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値を変数ごとに取得する。また、テスト情報取得手段143は、変数情報取得手段142が取得した変数と変数の型から入力値を変数ごとに取得する。 The test information acquisition unit 143 acquires one or more input values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit 141 for each variable. The test information acquisition unit 143 acquires an input value for each variable from the variable acquired by the variable information acquisition unit 142 and the variable type.
 また、テスト情報取得手段143は、テスト元情報取得手段141が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得する。また、テスト情報取得手段143は、変数情報取得手段142が取得した変数と変数の型から入力値および出力値を変数ごとに取得しても良い。 Further, the test information acquisition unit 143 acquires one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit 141 for each variable. The test information acquisition unit 143 may acquire an input value and an output value for each variable from the variable acquired by the variable information acquisition unit 142 and the variable type.
 また、テスト情報取得手段143は、テスト元情報取得手段141が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、すべての制約情報を満たすテストスイートを1以上取得する。また、テスト情報取得手段143は、変数情報取得手段142が取得した変数と変数の型から入力値および出力値を変数ごとに取得し、かつ、すべての制約情報を満たすテストスイートを1以上取得しても良い。 The test information acquisition unit 143 acquires one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit 141 for each variable, and all One or more test suites satisfying the constraint information are acquired. The test information acquisition unit 143 acquires an input value and an output value for each variable from the variable acquired by the variable information acquisition unit 142 and the type of the variable, and acquires one or more test suites that satisfy all the constraint information. May be.
 なお、テストスイートとは、1以上の入力値および1以上の出力値の組である。かかる場合、テスト情報取得手段143は、例えば、テスト元情報取得手段141が取得したテスト元情報と変数の型から、各変数の入力値の候補値を取得する。そして、テスト情報取得手段143は、1以上の各変数の入力値(状態遷移前の値)と出力値(状態遷移後の値)のすべての組み合わせを取得する。なお、この組み合わせがテストスイートの候補である。そして、テスト情報取得手段143は、テストスイートの候補を、すべての制約情報に適用し、すべての制約情報を満たすテストスイートを、利用するテストスイートとして抽出する。なお、1以上の制約情報が存在する場合に、当該1以上の制約情報に与える変数の値の組が、当該1以上の制約情報を満たすか否かを判断する処理は公知技術である。また、テスト情報取得手段143は、1以上のテストスイートの候補を取得してから、1以上の制約情報を1以上のテストスイートに適用して、制約情報を満たさないテストスイートを削除しても良い。また、テスト情報取得手段143は、テストスイートを取得する際に1以上の制約情報を適用しても良い。 Note that a test suite is a set of one or more input values and one or more output values. In such a case, the test information acquisition unit 143 acquires, for example, candidate values of input values for each variable from the test source information acquired by the test source information acquisition unit 141 and the variable type. Then, the test information acquisition unit 143 acquires all combinations of input values (values before state transition) and output values (values after state transition) of one or more variables. This combination is a test suite candidate. Then, the test information acquisition unit 143 applies test suite candidates to all constraint information, and extracts test suites that satisfy all constraint information as test suites to be used. Note that when one or more pieces of constraint information exist, a process for determining whether a set of variable values given to the one or more pieces of constraint information satisfies the one or more pieces of constraint information is a known technique. Further, the test information acquisition unit 143 may acquire one or more test suite candidates, apply one or more constraint information to the one or more test suites, and delete a test suite that does not satisfy the constraint information. good. The test information acquisition unit 143 may apply one or more pieces of constraint information when acquiring a test suite.
 また、制約情報とは、状態遷移情報または不変条件情報であることは好適である。状態遷移情報とは、1以上の変数の値の集合を有する状態である遷移前状態と遷移前状態に対して発生するイベントと遷移前状態の場合にイベントが発生した場合に移行する状態である遷移後状態とアクションとを有する情報である。また、不変条件情報は、1以上の変数の値の集合を有する第一状態と第一状態の場合に必ず採用される1以上の変数の値の集合を有する第二状態とを有する情報である。 Moreover, it is preferable that the constraint information is state transition information or invariant condition information. State transition information is a state that transitions when an event occurs in the pre-transition state, the pre-transition state, and the pre-transition state, which are states having a set of one or more variable values. This is information having a post-transition state and an action. The invariant condition information is information having a first state having a set of values of one or more variables and a second state having a set of values of one or more variables that are always employed in the case of the first state. .
 テスト情報蓄積部15は、テスト情報取得部14が取得した1以上のテスト情報をテスト情報格納部11に蓄積する。 The test information storage unit 15 stores one or more pieces of test information acquired by the test information acquisition unit 14 in the test information storage unit 11.
 テスト情報出力部16は、テスト情報格納部11のテスト情報を出力する。ここで、出力とは、ディスプレイへの表示、プロジェクターを用いた投影、プリンタへの印字、外部の装置への送信、記録媒体への蓄積、他の処理装置や他のプログラムなどへの処理結果の引渡しなどを含む概念である。テスト情報出力部16は、ディスプレイ等の出力デバイスを含むと考えても含まないと考えても良い。テスト情報出力部16は、出力デバイスのドライバーソフトまたは、出力デバイスのドライバーソフトと出力デバイス等で実現され得る。 The test information output unit 16 outputs the test information stored in the test information storage unit 11. Here, output means display on a display, projection using a projector, printing on a printer, transmission to an external device, storage on a recording medium, processing result to another processing device or another program, etc. It is a concept that includes delivery. The test information output unit 16 may be considered as including or not including an output device such as a display. The test information output unit 16 can be implemented by output device driver software, or output device driver software and an output device.
 テスト情報取得部14、テスト元情報取得手段141、変数情報取得手段142、テスト情報取得手段143、およびテスト情報蓄積部15は、通常、MPUやメモリ等から実現され得る。テスト情報取得部14等の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。 The test information acquisition unit 14, the test source information acquisition unit 141, the variable information acquisition unit 142, the test information acquisition unit 143, and the test information storage unit 15 can be usually realized by an MPU, a memory, or the like. The processing procedure of the test information acquisition unit 14 and the like is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
 次に、テスト仕様生成装置1の動作について、図2のフローチャートを用いて説明する。 Next, the operation of the test specification generation device 1 will be described using the flowchart of FIG.
 (ステップS201)受付部13は、テスト情報生成指示を受け付けたか否かを判断する。テスト情報生成指示を受け付ければステップS202に行き、テスト情報生成指示を受け付けなければステップS207に行く。 (Step S201) The receiving unit 13 determines whether a test information generation instruction has been received. If a test information generation instruction is accepted, the process proceeds to step S202. If a test information generation instruction is not accepted, the process proceeds to step S207.
 (ステップS202)テスト情報取得部14は、仕様記述情報格納部12から仕様記述情報を読み出す。 (Step S202) The test information acquisition unit 14 reads the specification description information from the specification description information storage unit 12.
 (ステップS203)テスト情報取得部14は、仕様記述情報を解釈し、変数表を取得する。なお、仕様記述情報の解釈とは、通常、字句解析、構文解析等であり、プログラム言語の処置系(例えば、コンパイラやインタプリタ等)が行う公知の技術である。変数表を取得する変数表取得処理について、図3のフローチャートを用いて説明する。 (Step S203) The test information acquisition unit 14 interprets the specification description information and acquires a variable table. The interpretation of the specification description information is usually lexical analysis, syntax analysis, etc., and is a well-known technique performed by a program language processing system (for example, a compiler or interpreter). A variable table acquisition process for acquiring a variable table will be described with reference to the flowchart of FIG.
 (ステップS204)テスト情報取得部14は、仕様記述情報を解釈し、命題論理式を取得する。命題論理式を取得する命題論理式取得処理について、図4のフローチャートを用いて説明する。ここでの仕様記述情報の解釈も、通常、字句解析、構文解析等であり、プログラム言語の処置系(例えば、コンパイラやインタプリタ等)が行う公知の技術である。 (Step S204) The test information acquisition unit 14 interprets the specification description information and acquires a propositional logical expression. A propositional logical expression acquisition process for acquiring a propositional logical expression will be described with reference to the flowchart of FIG. The interpretation of the specification description information here is usually lexical analysis, syntax analysis, etc., and is a well-known technique performed by a program language processing system (for example, a compiler, interpreter, etc.).
 (ステップS205)テスト情報取得部14は、変数表と命題論理式とを用いて、テスト情報を取得する。テスト情報を取得するテスト情報取得処理について、図5のフローチャートを用いて説明する。 (Step S205) The test information acquisition unit 14 acquires test information using the variable table and the propositional logical expression. Test information acquisition processing for acquiring test information will be described with reference to the flowchart of FIG.
 (ステップS206)テスト情報蓄積部15は、ステップS205で取得されたテスト情報を、テスト情報格納部11に蓄積する。ステップS201に戻る。 (Step S206) The test information storage unit 15 stores the test information acquired in step S205 in the test information storage unit 11. The process returns to step S201.
 (ステップS207)受付部13は、テスト情報出力指示を受け付けたか否かを判断する。テスト情報出力指示を受け付ければステップS208に行き、テスト情報出力指示を受け付けなければステップS201に戻る。 (Step S207) The receiving unit 13 determines whether or not a test information output instruction has been received. If a test information output instruction is accepted, the process proceeds to step S208. If a test information output instruction is not accepted, the process returns to step S201.
 (ステップS208)テスト情報出力部16は、テスト情報格納部11からテスト情報を読み出す。 (Step S208) The test information output unit 16 reads the test information from the test information storage unit 11.
 (ステップS209)テスト情報出力部16は、ステップS208で読み出したテスト情報を出力する。ステップS201に戻る。 (Step S209) The test information output unit 16 outputs the test information read in step S208. The process returns to step S201.
 なお、図2のフローチャートにおいて、電源オフや処理終了の割り込みにより処理は終了する。 In the flowchart of FIG. 2, the process is terminated by turning off the power or interrupting the process.
 次に、ステップS203の変数表取得処理について、図3のフローチャートを用いて説明する。 Next, the variable table acquisition process in step S203 will be described with reference to the flowchart of FIG.
 (ステップS301)変数情報取得手段142は、カウンタiに1を代入する。 (Step S301) The variable information acquisition unit 142 substitutes 1 for the counter i.
 (ステップS302)変数情報取得手段142は、仕様記述情報からi番目の処理単位を読み出す。なお、一の処理単位とは、例えば、1行、一の終端子(例えば、“;”や予約語など)の次の文字列から次の終端子まで、特定の予約語の次の文字列から次の特定の予約語まで、などである。一の処理単位とは、変数の宣言か否かを判断する文字列の単位、または制約か否かを判断する文字列の単位等である。 (Step S302) The variable information acquisition unit 142 reads the i-th processing unit from the specification description information. One processing unit is, for example, a character string next to a specific reserved word from a character string next to one terminal, one terminator (for example, “;” or a reserved word) to the next terminator. To the next specific reserved word, etc. One processing unit is a character string unit for determining whether a variable is declared or a character string unit for determining whether a variable is a constraint.
 (ステップS303)変数情報取得手段142は、ステップS303でi番目の処理単位を読み出せたか否かを判断する。i番目の処理単位を読み出せればステップS304に行き、読み出せなければ上位処理にリターンする。 (Step S303) The variable information acquisition unit 142 determines whether or not the i-th processing unit has been read in Step S303. If the i-th processing unit can be read, the process proceeds to step S304, and if it cannot be read, the process returns to the upper process.
 (ステップS304)変数情報取得手段142は、i番目の処理単位が変数の宣言であるか否かを判断する。変数の宣言であればステップS305に行き、変数の宣言でなければステップS310に行く。なお、処理単位が変数の宣言であるか否かは、例えば、予約語”Var”を含む行か否か、予約語”Var”に続く非予約語であるか否か、変数のタイプ(予約語)を含む行か否か等により判断する。かかる処理単位が変数の宣言であるか否かを判断する処理も公知技術である。 (Step S304) The variable information acquisition unit 142 determines whether or not the i-th processing unit is a variable declaration. If it is a variable declaration, go to step S305, and if it is not a variable declaration, go to step S310. Whether the processing unit is a variable declaration is, for example, whether the line includes the reserved word “Var”, whether it is a non-reserved word following the reserved word “Var”, or the type of the variable (reserved word ) And the like. Processing for determining whether such a processing unit is a variable declaration is also a known technique.
 (ステップS305)変数情報取得手段142は、i番目の処理単位から変数の型を取得する。 (Step S305) The variable information acquisition unit 142 acquires the variable type from the i-th processing unit.
 (ステップS306)テスト元情報取得手段141は、i番目の処理単位に、テスト元情報が存在するか否かを判断する。テスト元情報が存在すればステップS307に行き、テスト元情報が存在しなければステップS311に行く。テスト元情報が存在するか否かは、例えば、テスト元情報を特定する予約語(例えば、”testedwith”)を含むか否かにより行われる。 (Step S306) The test source information acquisition unit 141 determines whether or not test source information exists in the i-th processing unit. If the test source information exists, the process goes to step S307, and if the test source information does not exist, the process goes to step S311. Whether or not the test source information exists is determined, for example, by whether or not a reserved word (for example, “testedwith”) that specifies the test source information is included.
 (ステップS307)テスト元情報取得手段141は、i番目の処理単位からテスト元情報を取得する。なお、テスト元情報取得手段141は、例えば、テスト元情報を特定する予約語(例えば、”testedwith”)に対応するテスト元情報を取得する。 (Step S307) The test source information acquisition unit 141 acquires test source information from the i-th processing unit. Note that the test source information acquisition unit 141 acquires, for example, test source information corresponding to a reserved word (for example, “testedwith”) that specifies the test source information.
 (ステップS308)変数情報取得手段142は、テスト元情報と型、またはテスト元情報を用いて、変数の1以上の入力値、または変数の1以上の入力値と変数の1以上の出力値を取得する。 (Step S308) The variable information acquisition unit 142 uses the test source information and type or the test source information to obtain one or more input values of the variable, or one or more input values of the variable and one or more output values of the variable. get.
 (ステップS309)変数情報取得手段142は、変換表にレコードを追記する。レコードは、変数の1以上の入力値、または変数の1以上の入力値と変数の1以上の出力値を有する。 (Step S309) The variable information acquisition unit 142 adds a record to the conversion table. A record has one or more input values for a variable, or one or more input values for a variable and one or more output values for a variable.
 (ステップS310)変数情報取得手段142は、カウンタiを1,インクリメントする。ステップS303に戻る。 (Step S310) The variable information acquisition unit 142 increments the counter i by one. The process returns to step S303.
 (ステップS311)変数情報取得手段142は、型を用いて、変数の1以上の入力値、または変数の1以上の入力値と変数の1以上の出力値を取得する。ステップS309に行く。なお、変数情報取得手段142は、例えば、型と1以上の値との対応表を保持しており、かかる対応表を用いて、型から1以上の入力値、または1以上の入力値と1以上の出力値とを取得する。 (Step S311) The variable information acquisition unit 142 acquires one or more input values of the variable, or one or more input values of the variable and one or more output values of the variable using the type. Go to step S309. Note that the variable information acquisition unit 142 holds, for example, a correspondence table between types and one or more values. Using the correspondence table, one or more input values from the type, or one or more input values and 1 The above output value is acquired.
 なお、図3のフローチャートにおいて、例えば、デフォルトの変数の情報(例えば、後述する”null#true”など)からレコードを構成し、当該レコードを変数表に書き込んでも良い。かかる場合、変数情報取得手段142は、デフォルトの変数の情報を予め保持している。 In the flowchart of FIG. 3, for example, a record may be configured from default variable information (for example, “null # true” described later), and the record may be written in the variable table. In such a case, the variable information acquisition unit 142 holds default variable information in advance.
 次に、ステップS204の命題論理式取得処理について、図4のフローチャートを用いて説明する。 Next, the propositional logical expression acquisition process in step S204 will be described using the flowchart of FIG.
 (ステップS401)テスト情報取得手段143は、カウンタiに1を代入する。 (Step S401) The test information acquisition unit 143 substitutes 1 for the counter i.
 (ステップS402)テスト情報取得手段143は、仕様記述情報からi番目の処理単位を読み出す。 (Step S402) The test information acquisition unit 143 reads the i-th processing unit from the specification description information.
 (ステップS403)テスト情報取得手段143は、ステップS402でi番目の処理単位を読み出せたか否かを判断する。i番目の処理単位を読み出せればステップS404に行き、読み出せなければ上位処理にリターンする。 (Step S403) The test information acquisition unit 143 determines whether or not the i-th processing unit has been read in Step S402. If the i-th processing unit can be read, the process proceeds to step S404, and if it cannot be read, the process returns to the upper process.
 (ステップS404)テスト情報取得手段143は、i番目の処理単位が制約であるか否かを判断する。制約であればステップS405に行き、制約でなければステップS406に行く。なお、制約とは、仕様記述における、対象が満たさなければならない条件である。テスト情報取得手段143は、例えば、予約語(例えば、”Require”)に続く行であり、次の制約以外を示す予約語が出現するまでの行を、制約情報として判断する。ただし、制約情報の判断手法は問わない。 (Step S404) The test information acquisition unit 143 determines whether or not the i-th processing unit is a constraint. If it is a constraint, go to step S405, and if not, go to step S406. A constraint is a condition that must be satisfied by a target in a specification description. The test information acquisition unit 143 determines, for example, a line following a reserved word (for example, “Require”) until a reserved word indicating other than the next restriction appears as restriction information. However, the method for determining the constraint information is not limited.
 (ステップS405)テスト情報取得手段143は、i番目の処理単位に対応する制約情報を、命題論理式に変換する。なお、制約情報を命題論理式に変換する技術は公知技術である。 (Step S405) The test information acquisition unit 143 converts the constraint information corresponding to the i-th processing unit into a propositional logical expression. A technique for converting constraint information into a propositional logical expression is a known technique.
 (ステップS406)テスト情報取得手段143は、カウンタiを1,インクリメントする。ステップS402に戻る。 (Step S406) The test information acquisition unit 143 increments the counter i by one. The process returns to step S402.
 次に、ステップS205のテスト情報取得処理について、図5のフローチャートを用いて説明する。 Next, the test information acquisition process of step S205 will be described using the flowchart of FIG.
 (ステップS501)テスト情報取得手段143は、カウンタiに1を代入する。 (Step S501) The test information acquisition unit 143 substitutes 1 for the counter i.
 (ステップS502)テスト情報取得手段143は、i番目の入力値のセットを、変数表から取得する。テスト情報取得手段143は、1以上の各変数が入力値として採り得る値の中から、各変数の値を取得し、変数名と値の組を有する1以上の情報を取得する。この変数名と値の組を有する1以上の情報が、入力値のセットである。 (Step S502) The test information acquisition unit 143 acquires the i-th input value set from the variable table. The test information acquisition unit 143 acquires the value of each variable from the values that one or more of each variable can take as an input value, and acquires one or more pieces of information having a pair of variable name and value. One or more pieces of information having this variable name / value pair is a set of input values.
 (ステップS503)テスト情報取得手段143は、ステップS502でi番目の入力値のセットを取得できたか否かを判断する。i番目の入力値のセットを取得できればステップS504に行き、取得できなければ上位処理にリターンする。 (Step S503) The test information acquisition unit 143 determines whether or not the i-th input value set has been acquired in step S502. If the i-th set of input values can be acquired, the process proceeds to step S504, and if it cannot be acquired, the process returns to the upper process.
 (ステップS504)テスト情報取得手段143は、カウンタjに1を代入する。 (Step S504) The test information acquisition unit 143 substitutes 1 for the counter j.
 (ステップS505)テスト情報取得手段143は、j番目の出力値のセットを、変数表から取得する。テスト情報取得手段143は、1以上の各変数が出力値として採り得る値の中から、各変数の値を取得し、変数名と値の組を有する1以上の情報を取得する。この変数名と値の組を有する1以上の情報が、出力値のセットである。 (Step S505) The test information acquisition unit 143 acquires the j-th output value set from the variable table. The test information acquisition unit 143 acquires the value of each variable from the values that one or more of each variable can take as an output value, and acquires one or more information having a pair of variable name and value. One or more pieces of information having this variable name / value pair is a set of output values.
 (ステップS506)テスト情報取得手段143は、ステップS505でj番目の出力値のセットを取得できたか否かを判断する。j番目の出力値のセットを取得できればステップS507に行き、取得できなければステップS516に行く。 (Step S506) The test information acquisition unit 143 determines whether or not the j-th output value set has been acquired in step S505. If the j-th output value set can be acquired, the process goes to step S507, and if not, the process goes to step S516.
 (ステップS507)テスト情報取得手段143は、カウンタkに1を代入する。 (Step S507) The test information acquisition unit 143 substitutes 1 for the counter k.
 (ステップS508)テスト情報取得手段143は、k番目の命題論理式を取得する。ここでの命題論理式は、ステップS204の命題論理式取得処理により取得された1以上の命題論理式の中のk番目の命題論理式である。 (Step S508) The test information acquisition unit 143 acquires the kth propositional logical expression. The propositional formula here is the kth propositional formula among the one or more propositional formulas acquired by the propositional formula acquisition process in step S204.
 (ステップS509)テスト情報取得手段143は、ステップS508でk番目の命題論理式を取得できたか否かを判断する。k番目の命題論理式を取得できればステップS510に行き、k番目の命題論理式を取得できなければステップS513に行く。 (Step S509) The test information acquisition unit 143 determines whether or not the kth propositional logical expression has been acquired in step S508. If the kth propositional logical expression can be acquired, the process proceeds to step S510. If the kth propositional logical expression cannot be acquired, the process proceeds to step S513.
 (ステップS510)テスト情報取得手段143は、i番目の入力値とj番目の出力値とを、k番目の命題論理式に適用する。 (Step S510) The test information acquisition unit 143 applies the i-th input value and the j-th output value to the k-th propositional formula.
 (ステップS511)テスト情報取得手段143は、i番目の入力値とj番目の出力値とが、k番目の命題論理式を満たすか否かを判断する。k番目の命題論理式を満たせばステップS512に行き、満たさなければステップS515に行く。 (Step S511) The test information acquisition unit 143 determines whether or not the i-th input value and the j-th output value satisfy the k-th propositional logical expression. If the kth propositional formula is satisfied, the process goes to step S512, and if not, the process goes to step S515.
 (ステップS512)テスト情報取得手段143は、カウンタkを1,インクリメントする。ステップS508に戻る。 (Step S512) The test information acquisition unit 143 increments the counter k by one. The process returns to step S508.
 (ステップS513)テスト情報取得手段143は、i番目の入力値とj番目の出力値とを有するテスト情報を構成する。 (Step S513) The test information acquisition unit 143 configures test information having an i-th input value and a j-th output value.
 (ステップS514)テスト情報取得手段143は、ステップS513で構成したテスト情報を図示しないバッファに追記する。このバッファは、通常、一時的な記憶媒体である。 (Step S514) The test information acquisition unit 143 adds the test information configured in Step S513 to a buffer (not shown). This buffer is usually a temporary storage medium.
 (ステップS515)テスト情報取得手段143は、カウンタjを1,インクリメントする。ステップS505に戻る。 (Step S515) The test information acquisition unit 143 increments the counter j by one. The process returns to step S505.
 (ステップS516)テスト情報取得手段143は、カウンタiを1,インクリメントする。ステップS502に戻る。 (Step S516) The test information acquisition unit 143 increments the counter i by one. The process returns to step S502.
 以下、本実施の形態におけるテスト仕様生成装置1の具体的な動作について説明する。 Hereinafter, a specific operation of the test specification generation device 1 in the present embodiment will be described.
 今、仕様記述情報格納部12は、図6に示す仕様記述情報を格納している。図6において、(1)(2)は、変数の型の宣言である。(1)のデータの型“onoff_type”の変数は、値”ON”または”OFF”を採り得る。データの型“onoff_type”が値”ON”または”OFF”を採り得るという情報は、テスト仕様生成装置1が保持している。つまり、例えば、テスト仕様生成装置1は「onoff_type:on|off」を保持している。また、(2)は、データの型”m_type”の初期値は”m”であることを示す。 Now, the specification description information storage unit 12 stores the specification description information shown in FIG. In FIG. 6, (1) and (2) are declarations of variable types. The variable of the data type “onoff_type” in (1) can take the value “ON” or “OFF”. Information that the data type “onoff_type” can take the value “ON” or “OFF” is held by the test specification generation device 1. That is, for example, the test specification generation device 1 holds “onoff_type: on | off”. (2) indicates that the initial value of the data type “m_type” is “m”.
 また、図6において、(3)は、変数の宣言の例である。(3)において、テスト元情報の予約語”testedwith”により、テスト元情報{off}が存在することが分かる。テスト元情報{off}は、型“onoff_type”の変数”op”のテストの際に利用する値として、”off”のみであることを示す。つまり、このテスト元情報の記載により、仕様記述情報の作成者の、テストにおける意図が反映できる。なお、”op:onoff_type{off}”の”off”は、変数”op”の初期値が”off”であることを示す。 In FIG. 6, (3) is an example of variable declaration. In (3), it can be seen that the test source information {off} exists by the reserved word “testedwith” of the test source information. The test source information {off} indicates that “off” is the only value used when testing the variable “op” of the type “onoff_type”. That is, the description of the test source information can reflect the intention of the creator of the specification description information in the test. Note that “off” in “op: onoff_type {off}” indicates that the initial value of the variable “op” is “off”.
 また、図6において、(4)も変数の宣言の例であるが、テスト元情報は有さない。そして、変数”lamp”の型は“onoff_type”であり、初期値は”off”である。かかる場合、変数”lamp”の値の中で、テストで利用する値は、変数”lamp”が採り得る値のすべて(ここでは、”on”と”off”)である。 In FIG. 6, (4) is an example of variable declaration, but does not have test source information. The type of the variable “lamp” is “onoff_type”, and the initial value is “off”. In such a case, among the values of the variable “lamp”, the values used in the test are all the values that the variable “lamp” can take (here, “on” and “off”).
 また、図6の(5)は、型”m_type”の変数”ch”の宣言である。 Also, (5) in FIG. 6 is a declaration of a variable “ch” of type “m_type”.
 また、図6の(6)(7)は、制約情報である。予約語“Function”、”Require”が、以降に続く文字列が制約情報であることを示す。また、(6)は、状態遷移情報である。(6)において、”op==on && lamp==off”は遷移前状態、”ch?m”はイベント、”lamp==on”は遷移後状態を示す。つまり、(6)は、”op==on && lamp==off”の場合に、イベント”ch?m”が発生すれば、”lamp==on”に状態が変化していなければならないという制約を示す。また、(7)は不変条件情報である。(7)において、”op==off -> lamp==off”は、”op==off”であれば、”lamp==off”であることを示す。つまり、”A->B”は、「AならばB」であることを示す。 Further, (6) and (7) in FIG. 6 are constraint information. The reserved words “Function” and “Require” indicate that the subsequent character string is constraint information. (6) is state transition information. In (6), “op == on && lamp == off” represents a pre-transition state, “ch? M” represents an event, and “lamp == on” represents a post-transition state. In other words, (6) is a constraint that if “op == on && lamp == off” and the event “ch? M” occurs, the state must change to “lamp == on”. Indicates. (7) is invariant condition information. In (7), “op == off-> lamp == off” indicates “lamp == off” if “op == off”. That is, “A-> B” indicates “B if A”.
 かかる状況において、ユーザは、テスト仕様生成装置1に、テスト情報生成指示を入力した、とする。 In this situation, it is assumed that the user has input a test information generation instruction to the test specification generation device 1.
 すると、受付部13は、テスト情報生成指示を受け付ける。そして、テスト情報取得部14は、仕様記述情報格納部12から、図6の仕様記述情報を読み出す。 Then, the reception unit 13 receives a test information generation instruction. Then, the test information acquisition unit 14 reads the specification description information in FIG. 6 from the specification description information storage unit 12.
 次に、テスト情報取得部14の変数情報取得手段142は、図6の仕様記述情報を解釈し、変数表を取得する。つまり、変数情報取得手段142は、まず、デフォルトの変数の情報”null#true”、”SubsystemCountUp#true”を、図示しない記録媒体(通常、変数情報取得手段142が保持する記録媒体)から取得する。そして、変数情報取得手段142は、取得した各変数の情報に変数の識別符号(以下、変数識別子という)を付してレコードを構成し、当該レコードを空の変数表に書き込む。なお、ここでは、変数識別子は、「1」から順次、インクリメントされる整数である、とする。つまり、変数情報取得手段142は、まず、レコード”1 null#true”、”2 SubsystemCountUp#true”を変数表に書き込む。 Next, the variable information acquisition unit 142 of the test information acquisition unit 14 interprets the specification description information in FIG. 6 and acquires a variable table. That is, the variable information acquisition unit 142 first acquires default variable information “null # true” and “SubsystemCountUp # true” from a recording medium (not shown) (usually a recording medium held by the variable information acquisition unit 142). . Then, the variable information acquisition unit 142 configures a record by attaching a variable identification code (hereinafter referred to as a variable identifier) to the acquired variable information, and writes the record in an empty variable table. Here, it is assumed that the variable identifier is an integer that is sequentially incremented from “1”. That is, the variable information acquisition unit 142 first writes the records “1 null # true” and “2 SubsystemCountUp # true” to the variable table.
 次に、変数情報取得手段142は、図6の”Extern”、”Data onoff_type; // from main”、”Class B”、” Data m_type {m};”を順次、読み出し、変数の宣言ではない、と判断する。なお、ここでの処理単位は、例えば、行である、とする。 Next, the variable information acquisition unit 142 sequentially reads “Extern”, “Data onoff_type; // from main”, “Class B”, “Data m_type {m};” in FIG. 6, not a variable declaration. Judge that. Note that the processing unit here is, for example, a row.
 次に、変数情報取得手段142は、図6の”Var op : onoff_type {off} testedwith {off};”を読み出す。そして、変数情報取得手段142は、予約語”Var”から、この処理単位が変数の宣言である、と判断する。なお、以降に続く処理単位に対して、変数ではない予約語が出現するまで、変数情報取得手段142は、変数の宣言であると判断する、とする。 Next, the variable information acquisition unit 142 reads “Var op: onoff_typeoff {off} testedwith {off};” in FIG. 6. Then, the variable information acquisition unit 142 determines from the reserved word “Var” that this processing unit is a variable declaration. It is assumed that the variable information acquisition unit 142 determines that a variable declaration is made until a reserved word that is not a variable appears in subsequent processing units.
 次に、変数情報取得手段142は、処理単位”Var op : onoff_type {off} testedwith {off};”から変数の型”onoff_type”を取得する。次に、テスト元情報取得手段141は、この処理単位からテスト元情報”testedwith{off}”を取得する。 Next, the variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “Varop: onoff_type {off} testedwith {off};”. Next, the test source information acquisition unit 141 acquires test source information “testedwith {off}” from this processing unit.
 次に、変数情報取得手段142は、テスト元情報”testedwith{off}”を用いて、変数”op”の1以上の入力値、または変数の1以上の入力値と変数の1以上の出力値(次の状態の値)を取得する。つまり、変数情報取得手段142は、変数”op”の入力値”off”、および変数”op”の出力値”off”を取得する。つまり、テスト元情報”testedwith{off}”は、変数”op”のテストの値として利用されるのは”off”だけであり、”on”は利用されないことを示す。そして、変数情報取得手段142は、変数”op”の入力値”off”に変数識別子を付して、レコード”3 op#off”を構成する。なお、”3 op#off”のうちの” op#off”の前に”@”が存在しない場合、それは入力値であることを示す。入力値は、状態の遷移前の値である。また、変数情報取得手段142は、変数”op”の出力値”off”に変数識別子を付して、レコード”4 @op#off”を構成する。なお、”4 @op#off”のうちの”@”は出力値であることを示す。 Next, the variable information acquisition unit 142 uses the test source information “testedwith {off}” to input one or more input values of the variable “op” or one or more input values of the variable and one or more output values of the variable. (The value of the next state) is acquired. That is, the variable information acquisition unit 142 acquires the input value “off” of the variable “op” and the output value “off” of the variable “op”. That is, the test source information “testedwith {off}” indicates that only “off” is used as the test value of the variable “op”, and “on” is not used. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “off” of the variable “op” to configure the record “3 op # off”. If “@” does not exist before “op # off” in “3 op # off”, it indicates that it is an input value. The input value is a value before the state transition. Further, the variable information acquisition unit 142 adds the variable identifier to the output value “off” of the variable “op”, and configures the record “4 @ op # off”. Note that “@” in “4 @ op # off” indicates an output value.
 次に、変数情報取得手段142は、図6の”lamp :onoff_type {off};”を読み出す。そして、変数情報取得手段142は、この処理単位が変数の宣言である、と判断する。 Next, the variable information acquisition unit 142 reads “lamp: onoff_type {off};” in FIG. Then, the variable information acquisition unit 142 determines that this processing unit is a variable declaration.
 次に、変数情報取得手段142は、処理単位”lamp : onoff_type {off};”から変数の型”onoff_type”を取得する。次に、テスト元情報取得手段141は、この処理単位からテスト元情報を取得できない。 Next, the variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “lamp: onoff_type_ {off};”. Next, the test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
 次に、変数情報取得手段142は、型”onoff_type”を用いて、変数”lamp”の1以上の入力値{on,off}と変数”lamp”の1以上の出力値{on,off}を取得する。そして、変数情報取得手段142は、変数”lamp”の入力値”on”に変数識別子を付して、レコード”5 lamp#on”を構成する。また、変数情報取得手段142は、変数”lamp”の入力値”off”に変数識別子を付して、レコード”6 lamp#off”を構成する。また、変数情報取得手段142は、変数”lamp”の出力値”on”に変数識別子を付して、レコード”7 @lamp#on”を構成する。さらに、変数情報取得手段142は、変数”lamp”の出力値”off”に変数識別子を付して、レコード”8 @lamp#off”を構成する。そして、変数情報取得手段142は、これらのレコードを変換表に追記する。 Next, the variable information acquisition unit 142 uses the type “onoff_type” to obtain one or more input values {on, off} of the variable “lamp” and one or more output values {on, off} of the variable “lamp”. get. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “on” of the variable “lamp”, and configures the record “5 lamp # on”. Further, the variable information acquisition unit 142 adds the variable identifier to the input value “off” of the variable “lamp”, and configures the record “6 lamp # off”. Also, the variable information acquisition unit 142 adds the variable identifier to the output value “on” of the variable “lamp”, and configures the record “7 @ lamp # on”. Furthermore, the variable information acquisition unit 142 adds the variable identifier to the output value “off” of the variable “lamp”, and configures the record “8 @ lamp # off”. And the variable information acquisition means 142 adds these records to a conversion table.
 次に、変数情報取得手段142は、図6の”Channel ch : m_type;”を読み出す。そして、変数情報取得手段142は、予約語”Channel”から、この処理単位が変数の宣言である、と判断する。 Next, the variable information acquisition unit 142 reads “Channel ch: m_type;” in FIG. Then, the variable information acquisition unit 142 determines from the reserved word “Channel” that this processing unit is a variable declaration.
 次に、変数情報取得手段142は、処理単位”Channel ch : m_type;”から変数の型” m_type”を取得する。次に、テスト元情報取得手段141は、この処理単位からテスト元情報を取得できない。 Next, the variable information acquisition unit 142 acquires the variable type “m_type” from the processing unit “Channel ch: m_type;”. Next, the test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
 次に、変数情報取得手段142は、型”m_type”を用いて、変数”ch”の入力値{m}を取得する。そして、変数情報取得手段142は、変数”ch”の入力値”m”に変数識別子を付して、レコード”9 ch?m”を構成する。そして、変数情報取得手段142は、変換表にこのレコードを追記する。なお、予約語”Channel”はイベントを示し、入力値のみ存在し、出力値が存在しないことは、予め変数情報取得手段142は知っている。 Next, the variable information acquisition unit 142 acquires the input value {m} of the variable “ch” using the type “m_type”. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “m” of the variable “ch” to configure the record “9 ch? M”. Then, the variable information acquisition unit 142 adds this record to the conversion table. Note that the reserved word “Channel” indicates an event, and the variable information acquisition unit 142 knows in advance that only an input value exists and no output value exists.
 以上の処理により、図7に示す変数表が得られた。変数表において、” c --- CNFNum to VarAssign table ---“、” c --- end ---“、および行頭の”c”は、ここでは重要な意味を持たない、とする。 The variable table shown in FIG. 7 was obtained by the above processing. In the variable table, “c --- CNFNum to VarAssign table ---”, “c --- end ---”, and “c” at the beginning of the line have no significant meaning here.
 次に、テスト情報取得手段143は、図6の仕様記述情報を解釈し、以下のように命題論理式を取得する。 Next, the test information acquisition unit 143 interprets the specification description information in FIG. 6 and acquires a propositional logical expression as follows.
 つまり、テスト情報取得手段143は、例えば、処理単位”Var op : onoff_type {off} testedwith{off};”を読み出し、当該処理単位から状態遷移前の命題論理式「op#off」と、状態遷移後の命題論理式「@op#off」とを得る。テスト情報取得手段143は、処理単位”Var op : onoff_type {off} testedwith {off};”を解釈し、状態遷移前の変数”op”の値は常に”off”であり、状態遷移後の変数”op”の値は常に”off”であると決定する。なお、「op#off」は、状態遷移前の変数”op”の値が”off”であることを示す。また、「@op#off」は、状態遷移後の変数”op”の値が”off”であることを示す。 That is, the test information acquisition unit 143 reads, for example, the processing unit “Var op: onoff_type {off} testedwith {off};”, and from the processing unit, the propositional logical expression “op # off” before the state transition and the state transition We get the later propositional formula "@ op # off". The test information acquisition means 143 interprets the processing unit “Var op: onoff_type {off} testedwith {off};”, the value of the variable “op” before the state transition is always “off”, and the variable after the state transition The value of “op” is always determined to be “off”. “Op # off” indicates that the value of the variable “op” before the state transition is “off”. “@ Op # off” indicates that the value of the variable “op” after the state transition is “off”.
 そして、ここでは、テスト情報取得手段143は、命題論理式「op#off」に対して、図7の変数表を用いて、「op#off」に対応する変数識別子「3」を取得する。そして、「op#off」を「3 0」に置き換える。なお、「3 0」の「0」は、命題論理式の終端を示す。また、命題論理式「op#off」をコメントとして付加する。図8が、テスト情報取得手段143が取得した命題論理式の集合の例である。図8において、命題論理式はコメントアウトされ(行頭にcが付加され)、それと同意義の変数識別子の集合に置き換わっている。図8の(1)が「op#off」に対応し、(2)がそれと同意義の変数識別子の集合に対応する。同様に、図8の(3)が「@op#off」に対応し、(4)がそれと同意義の変数識別子の集合に対応する。なお、テスト情報取得手段143は、コメントアウトされた命題論理式を付加しなくとも良い。 And here, the test information acquisition means 143 acquires the variable identifier “3” corresponding to “op # off” using the variable table of FIG. 7 for the propositional logical expression “op # off”. Then, replace “op # off” with “30”. Note that “0” in “3 0” indicates the end of the propositional logical expression. In addition, the propositional formula “op # off” is added as a comment. FIG. 8 is an example of a set of propositional logical expressions acquired by the test information acquisition unit 143. In FIG. 8, the propositional formula is commented out (c is added to the beginning of the line) and replaced with a set of variable identifiers having the same meaning. (1) in FIG. 8 corresponds to “op # off”, and (2) corresponds to a set of variable identifiers having the same meaning. Similarly, (3) in FIG. 8 corresponds to “@ op # off”, and (4) corresponds to a set of variable identifiers having the same significance. Note that the test information acquisition unit 143 does not need to add the commented propositional logical expression.
 また、テスト情報取得手段143は、例えば、処理単位”op==on&&lamp==off:ch?m: lamp==on;”を読み出し、当該処理単位から命題論理式「op#on∧lamp#off∧ch?m→@lamp#on」を得る。つまり、テスト情報取得手段143は、”op==on”を「op#on」、”lamp==off”を「lamp#off」、”ch?m”を「ch?m」にし、”&&”を「∧」に変換し、遷移前状態イベントとを「∧」で連結する。そして、遷移後状態”lamp==on”を「@lamp#on」に変換し、「→」で連結する。以上の処理により、テスト情報取得手段143は、仕様記述情報から命題論理式を得る。 Further, the test information acquisition unit 143 reads, for example, the processing unit “op == on && lamp == off: ch? M: lamp == on;” and outputs the propositional logical expression “op # on∧lamp # off” from the processing unit. ∧ch? M → @ lamp # on ”. That is, the test information acquisition unit 143 sets “op == on” to “op # on”, “lamp == off” to “lamp # off”, “ch? M” to “ch? M”, and “&&& “” Is converted into “∧”, and the state event before transition is connected with “∧”. Then, the post-transition state “lamp == on” is converted to “@ lamp # on” and connected by “→”. Through the above processing, the test information acquisition unit 143 obtains a propositional logical expression from the specification description information.
 次に、テスト情報取得手段143は、処理単位”op==on&&lamp==off:ch?m: lamp==on;”をコメントアウトし、上述のように、当該命題論理式「op#on∧lamp#off∧ch?m→@lamp#on」を変数識別子の集合に変換する処理を行う。ここで、「op#on」に対応する変数識別子が変数表に存在しないので、テスト情報取得手段143は、命題論理式「op#on∧lamp#off∧ch?m→@lamp#on」を変数識別子の集合に変換できない、と判断する。よって、テスト情報取得手段143は、図8の(5)の情報を得る。 Next, the test information acquisition unit 143 comments out the processing unit “op == on && lamp == off: ch? M: lamp == on;” and, as described above, the propositional logical expression “op # on∧lamp”. # off∧ch? m → @ lamp # on ”is converted into a set of variable identifiers. Here, since the variable identifier corresponding to “op # on” does not exist in the variable table, the test information acquisition unit 143 changes the propositional logical expression “op # on∧lamp # off∧ch? M → @ lamp # on”. Judge that it cannot be converted into a set of variable identifiers. Therefore, the test information acquisition unit 143 obtains the information (5) in FIG.
 次に、テスト情報取得手段143は、処理単位”op==off -> lamp==off;”を読み出し、当該処理単位から状態遷移前の命題論理式「¬op#off∧lamp#off」と、状態遷移後の命題論理式「¬@op#off∧@lamp#off」とを得る。なお、「¬」は否定を示す。 Next, the test information acquisition unit 143 reads out the processing unit “op == off-> lamp == off;” and obtains a propositional logical expression “¬op # off∧lamp # off” before the state transition from the processing unit. Then, the propositional logical expression “¬ @ op # off∧ @ lamp # off” after the state transition is obtained. “¬” indicates negative.
 そして、テスト情報取得手段143は、処理単位”op==off -> lamp==off;”の遷移前の状態をコメントアウトし、図8の(6)を得る。 Then, the test information acquisition unit 143 comments out the state before the transition of the processing unit “op == off-> lamp == off;”, and obtains (6) in FIG.
 そして、テスト情報取得手段143は、状態遷移前の命題論理式「¬op#off∧lamp#off」を変数識別子の集合に変換する処理を行い、「-3 6 0」を得る。そして、テスト情報取得手段143は、図8の(7)を得る。ここで「-3」の「-」は否定を示す。つまり、「¬op#off」から、変数表の「3(op#off)」をマイナスした値である「-3」を得る。また、テスト情報取得手段143は、「lamp#off」を変数表に適用し、「6」を得る。 Then, the test information acquisition unit 143 performs a process of converting the propositional logical expression “¬op # off∧lamp # off” before the state transition into a set of variable identifiers, and obtains “−3.6.0”. And the test information acquisition means 143 obtains (7) of FIG. Here, “−” of “−3” indicates negation. That is, “−3” that is a value obtained by subtracting “3 (op # off)” of the variable table is obtained from “¬op # off”. In addition, the test information acquisition unit 143 applies “lamp # off” to the variable table to obtain “6”.
 次に、テスト情報取得手段143は、処理単位”op==off -> lamp==off;”の遷移後の状態をコメントアウトし、図8の(8)を得る。そして、テスト情報取得手段143は、状態遷移後の命題論理式「¬@op#off∧@lamp#off」を変数識別子の集合に変換する処理を行い、「-4 8 0」を得る。そして、テスト情報取得手段143は、図8の(9)を得る。つまり、「¬@op#off」から、変数表の「4(@op#off)」をマイナスした値である「-4」を得る。また、テスト情報取得手段143は、「@lamp#off」を変数表に適用し、「8」を得る。 Next, the test information acquisition unit 143 comments out the state after the transition of the processing unit “op == off-> lamp == off;” to obtain (8) in FIG. Then, the test information acquisition unit 143 performs a process of converting the propositional logical expression “¬ @ op # off∧ @ lamp # off” after the state transition into a set of variable identifiers, and obtains “−4.80”. And the test information acquisition means 143 obtains (9) of FIG. That is, “−4” which is a value obtained by subtracting “4 (@ op # off)” of the variable table is obtained from “¬ @ op # off”. In addition, the test information acquisition unit 143 applies “@ lamp # off” to the variable table to obtain “8”.
 以上のような処理を、仕様記述情報のすべての処理単位に対して行い、テスト情報取得手段143は、図8の乗法標準形(CNF)のファイルを得る。 The above processing is performed for all processing units of the specification description information, and the test information acquisition unit 143 obtains a multiplicative standard form (CNF) file of FIG.
 次に、テスト情報取得手段143は、状態遷移前の変数”op”の採り得る値”off”と”on”、 状態遷移後の変数”@op”の採り得る値”off”と”on”、状態遷移前の変数”lamp”の採り得る値”off”と”on”、 状態遷移後の変数”@lamp”の採り得る値”off”と”on”、チャネルの変数の採り得る値”m”、デフォルトの”null”の採り得る値”true”と”false”、デフォルトのカウンタ”SubsystemCountUp”の採り得る値”true”と”false”、とすべての組み合わせ(入力値と出力値のセット)が、図8のすべての命題論理式(図8は、正確には命題論理式と同等の変数識別子の集合である)を満足するか否かを判断する。そして、テスト情報取得手段143は、すべての命題論理式を満足する入力値と出力値のセットを取得する。この入力値と出力値のセットが、テスト情報である。ただし、ここでは、テスト情報取得手段143は、入力値と出力値のセットを、変数表を参照して、数値列に変換する。ここで、テスト情報取得手段143が取得した数値列が、図9の(1)(2)(3)である。なお、図9(1)の「-1 2 3 4 -5 6 -7 8 -9」の「-1」は、変数表の「1 null#true」の否定を示す。また、図9(1)の「2」は、変数表の「2 SubsystemCountUp#true」を示す。また、図9(1)の「3」は、変数表の「3 op#off」を示す。 Next, the test information acquisition unit 143 takes the values “off” and “on” that can be taken by the variable “op” before the state transition, and the values “off” and “on” that can take the variable “@op” after the state transition. , Possible values “off” and “on” of variable “lamp” before state transition, Possible values “off” and “on” of variable “@lamp” after state transition, Possible values of channel variable ” m ”, possible values of default“ null ”“ true ”and“ false ”, possible values of default counter“ SubsystemCountUp ”“ true ”and“ false ”, and all combinations (set of input value and output value ) Satisfies all the propositional formulas in FIG. 8 (FIG. 8 is a set of variable identifiers that are equivalent to the propositional formulas). Then, the test information acquisition unit 143 acquires a set of input values and output values that satisfy all the propositional logical expressions. This set of input values and output values is test information. However, here, the test information acquisition unit 143 converts the set of input values and output values into a numeric string with reference to the variable table. Here, the numerical sequence acquired by the test information acquisition unit 143 is (1), (2), and (3) in FIG. Note that “−1” in “−1 2 3 4 -5 6 -7 8 -9” in FIG. 9A indicates the negation of “1 null # true” in the variable table. Also, “2” in FIG. 9A indicates “2 SubsystemCountUp # true” in the variable table. Also, “3” in FIG. 9A indicates “3 op # off” in the variable table.
 次に、テスト情報取得手段143は、図9(1)から(3)の数値列を、(図7)を用いて、入力値と出力値のセットに変換し、図10のテスト情報を得る。図10がテスト情報の一例であり、ここではテストスイートである。なお、図10において、actionの属性は存在しなくても良い。actionの属性は、状態遷移後に明示的に発生させるイベントが代入され得るが、ここでは、すべて”null”である。 Next, the test information acquisition unit 143 converts the numerical sequence shown in FIGS. 9 (1) to (3) into a set of input values and output values using (FIG. 7), and obtains the test information shown in FIG. . FIG. 10 shows an example of test information, which is a test suite here. In FIG. 10, the action attribute may not exist. An event that is explicitly generated after state transition can be assigned to the attribute of action, but here, all are “null”.
 以下に、テスト情報取得部14の動作の概念について、図11を用いて、さらに説明する。図11において、テスト情報取得部14は、T1、T2、T3の3つの処理を行う。 Hereinafter, the concept of the operation of the test information acquisition unit 14 will be further described with reference to FIG. In FIG. 11, the test information acquisition unit 14 performs three processes of T1, T2, and T3.
 T1において、仕様記述情報(ここでは、特に、SENSという仕様記述言語で記述したファイルであるSENS記述ファイル)が入力され、CNFファイルが出力される。詳細には、SENS記述に現れる制約情報が乗法標準形(CNF)の命題論理式に変換され、その命題論理式を表す数列の組が出力される。処理の手順は以下の通りである。なお、以下の処理は、すべてテスト情報取得部14が行う処理である。 At T1, specification description information (here, in particular, a SENS description file that is a file described in a specification description language called SENS) is input, and a CNF file is output. Specifically, the constraint information appearing in the SENS description is converted into a multiplicative normal form (CNF) propositional logical expression, and a set of sequences representing the propositional logical expression is output. The processing procedure is as follows. The following processes are all processes performed by the test information acquisition unit 14.
 1.テスト情報取得部14は、SENS記述中に現れる変数について、その変数が現時刻でどの値をとるかを原子命題で表現し、それら原子命題に対してユニークな整数値を割り当てる。この整数値は原子命題の通し番号であり、その原子命題の真偽値が真であることはその整数値の正の値で、偽であることは負の値で表現される。同様に次の時刻でその変数がどの値をとるかを原子命題で表し、その原子命題に対してもユニークな整数値を割り当てる。 1. The test information acquisition unit 14 expresses, with respect to variables appearing in the SENS description, what value the variable takes at the current time by an atomic proposition, and assigns a unique integer value to the atomic proposition. The integer value is a serial number of the atomic proposition, and the truth value of the atomic proposition is expressed as a positive value of the integer value, and the false value is expressed as a negative value. Similarly, the value that the variable takes at the next time is expressed by an atomic proposition, and a unique integer value is assigned to the atomic proposition.
 例えば、on,offの値を持つSENSの変数lampについて、テスト情報取得部14は、現時刻でlampがonであることを表す命題をlamp#on,offであることを表す命題をlamp#offとし、それぞれ整数値5,6を割り当てる。同様に次の時刻でlampがonであることを表す命題を@lamp#on、offであることを表す命題を@lamp#offとし、それぞれ整数値7,8を割り当てる(図8参照)。 For example, for a SENS variable “lamp” having values of “on” and “off”, the test information acquisition unit 14 sets a proposition that indicates that the lamp is on at the current time as lamp # on and off. And assign integer values 5 and 6, respectively. Similarly, at the next time, a proposition indicating that the lamp is on is @ lamp # on, and a proposition indicating that the lamp is off is @ lamp # off, and integer values 7 and 8 are assigned, respectively (see FIG. 8).
 2.テスト情報取得部14は、SENS記述中に現れる制約情報を命題論理式に変換する。「事前条件:イベント:事後条件,アクション」の形で表現される制約情報は「事前条件∧イベント → 事後条件∧アクション」といった形の命題論理式に変換される。このとき事後条件に現れる変数については、次の時刻の表現として扱う。例えば、SENS記述に現れる「op==on && lamp==off : ch?m : lamp==on;」という記述は、命題論理式「op#on∧lamp#off∧ch?m → @lamp#on」に変換される。 2. The test information acquisition unit 14 converts the constraint information appearing in the SENS description into a propositional logical expression. The constraint information expressed in the form of “precondition: event: postcondition, action” is converted into a propositional formula of the form “precondition 事前 event → postcondition∧action”. At this time, the variable appearing in the postcondition is treated as an expression of the next time. For example, the description `` op == on && lamp == off: ch? M: lamp == on; '' that appears in the SENS description is the propositional formula `` op # on∧lamp # off∧ch? M → @ lamp # is converted to "on".
 3.テスト情報取得部14は、制約情報を表現した命題論理式を乗法標準形に変換する。例えば、命題論理式「op#on∧lamp#off∧ch?m → @lamp#on」を乗法標準形に変換すると「¬op#on∨¬lamp#off∨¬ch?m∨@lamp#on」となる。 3. The test information acquisition unit 14 converts the propositional logical expression expressing the constraint information into a multiplicative standard form. For example, if the propositional formula `` op # on∧lamp # off∧ch? M → @ lamp # on '' is converted to the multiplicative standard form, `` ¬op # on∨¬lamp # off∨¬ch? M∨ @ lamp # on "
 4.乗法標準形の節は、1.で原子命題に割り当てた整数値を使って数列で表現される。このとき否定のリテラルは負の数で表される。テスト情報取得部14は、一つの節に対する数列を一行として、ファイルに出力する。例えば、節「¬op#on∨¬lamp#off∨¬ch?m∨@lamp#on」は、通常、数列に変換されるが、ここでは、テスト元情報により”op”は”off”のみしかテスト情報の対象とならないので、数列に変換できず、数列は出力されない。 4. The clause of the multiplicative standard form is 1. It is expressed as a sequence using the integer value assigned to the atomic proposition. At this time, a negative literal is represented by a negative number. The test information acquisition unit 14 outputs the numerical sequence for one clause as a line to a file. For example, the section “¬op # on∨¬lamp # off∨¬ch? M∨ @ lamp # on” is usually converted to a number sequence, but here “op” is only “off” according to the test source information. However, since it is only the target of the test information, it cannot be converted into a number sequence, and the number sequence is not output.
 5.テスト情報取得部14は、原子命題と整数値の対応表をファイルの末尾にコメントとして書き出す。 5. The test information acquisition unit 14 writes a correspondence table of atomic propositions and integer values as a comment at the end of the file.
 次に、T2において、テスト情報取得部14は、CNFファイルを受け付け、DNFファイルを出力する。つまり、CNFファイルが表現している命題論理式を満足する真偽値割り当ては、SAT-solver(公知技術によるソフトウェア)を用いてすべて探索される。処理の流れは以下の図12の通りである。 Next, at T2, the test information acquisition unit 14 receives the CNF file and outputs the DNF file. That is, all the Boolean value assignments that satisfy the propositional formula expressed by the CNF file are searched using SAT-solver (software by a known technique). The flow of processing is as shown in FIG.
 SAT-solverは値割り当てを加法標準形(DNF)で出力する。その値割り当てを、(a)数列表現でファイルに書き出し、(b)同時にその論理否定をSAT-solverにフィードバックし、次の値割り当てを得る。これを値割り当てが出力されなくなるまで繰り返す。T2の出力ファイル中に現れる各数列は、CNFファイルが表現する論理式を満足する値割り当ての一つを表現している。 SAT-solver outputs value assignments in additive standard form (DNF). The value assignment is written (a) to a file in the form of a numerical sequence. (B) At the same time, the logical negation is fed back to the SAT-solver to obtain the next value assignment. This is repeated until no value assignment is output. Each numerical sequence appearing in the output file of T2 represents one of value assignments that satisfy the logical expression expressed by the CNF file.
 次に、T3の処理を行う。T3において、SENS記述から作成したCNFファイルとDNFファイルを入力し、CSVファイルを出力する。 Next, process T3 is performed. At T3, the CNF file and DNF file created from the SENS description are input, and the CSV file is output.
 DNFファイルの各数列をCNFファイル末尾の対応表を基に論理式と解釈し、SENSの変数とその値の割り当て表を表現するCSV形式に変換する。CSVの一行がテスト実行時の入力と、それに対応する期待される出力を表す。すなわちCSVの一行が一組のテストスイートを表す。例えば、DNFファイルの一行「-1 -2 3 4 -5 6 -7 8 9」を、命題論理式「op#off∧lamp#off∧ch?m∧@op#off∧@lamp#off」と解釈して、CSV形式「off, off, ch?m, off, off, null」に変換する(図10の第二レコードを参照)。 ∙ Each number sequence in the DNF file is interpreted as a logical expression based on the correspondence table at the end of the CNF file, and converted into a CSV format that represents the SENS variable and its value assignment table. One line of CSV represents the input during test execution and the corresponding expected output. That is, one line of CSV represents a set of test suites. For example, the line “-1 -2 3 4 -5 6 -7 8 9” in the DNF file is changed to the propositional formula “op # off∧lamp # off∧ch? M∧ @ op # off∧ @ lamp # off”. Interpretation and conversion into CSV format “off, off, ch? M, off, off, null” (see the second record in FIG. 10).
 以上、本実施の形態によれば、対象の設計時にテスト設計のための情報を記載すれば、適切なテスト仕様に関する情報が自動生成できる。 As described above, according to the present embodiment, if information for test design is described at the time of design of an object, information regarding an appropriate test specification can be automatically generated.
 また、本実施の形態によれば、仕様記述情報の中にテスト元情報が記述できることにより、設計者の意図を反映したテスト情報の生成ができる。 Further, according to the present embodiment, the test source information can be described in the specification description information, so that the test information reflecting the designer's intention can be generated.
 なお、本実施の形態における処理は、ソフトウェアで実現しても良い。そして、このソフトウェアをソフトウェアダウンロード等により配布しても良い。また、このソフトウェアをCD-ROMなどの記録媒体に記録して流布しても良い。なお、このことは、本明細書における他の実施の形態においても該当する。なお、本実施の形態におけるテスト仕様生成装置を実現するソフトウェアは、以下のようなプログラムである。つまり、このプログラムは、記憶媒体に、テストで利用する情報であるテスト情報と、対象の仕様について記述する言語である仕様記述言語で記述された前記対象の仕様に関する情報であり、1以上の変数の宣言を含む情報であり、テスト情報を生成するためのテスト元情報を含む情報である仕様記述情報を格納しており、コンピュータを、前記変数の宣言および前記テスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得するテスト情報取得部と、前記テスト情報取得部が取得した1以上のテスト情報を前記テスト情報格納部に蓄積するテスト情報蓄積部として機能させるためのプログラム、である。 Note that the processing in the present embodiment may be realized by software. Then, this software may be distributed by software download or the like. Further, this software may be recorded on a recording medium such as a CD-ROM and distributed. This also applies to other embodiments in this specification. The software that implements the test specification generation apparatus according to the present embodiment is the following program. In other words, this program is information related to the target specification described in the specification description language, which is the test information that is information used in the test, and the language that describes the target specification, in the storage medium. The specification description information, which is information including test source information for generating test information, is stored, and the computer uses one or more of the declaration of the variable and the test source information. A test information acquisition unit that acquires one or more test information having at least an input value of each variable, and a test information storage unit that stores the one or more test information acquired by the test information acquisition unit in the test information storage unit It is a program for functioning.
 また、上記プログラムにおいて、前記変数は、型を有し、前記仕様記述情報は、前記1以上の変数のうち、1以上の各変数に対応付けて、各変数が採り得る値の中で、テストで使用する値を特定する情報であるテスト元情報を有し、前記テスト情報取得部は、前記仕様記述情報から、前記テスト元情報を前記変数と対応付けて取得するテスト元情報取得手段と、前記仕様記述情報から、テスト元情報を有さない変数と当該変数の型を取得する変数情報取得手段と、前記テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値を変数ごとに取得し、かつ、前記変数情報取得手段が取得した変数と当該変数の型から入力値を変数ごとに取得するテスト情報取得手段を具備するものとして、コンピュータを機能させるためのプログラムであることは好適である。 Further, in the above program, the variable has a type, and the specification description information is associated with one or more variables among the one or more variables, and among the values that each variable can take. Test source information that is information for specifying a value to be used in the test information acquisition unit, the test information acquisition unit acquires the test source information in association with the variable from the specification description information, From the specification description information, a variable that does not have test source information, a variable information acquisition unit that acquires the type of the variable, and a variable corresponding to each test source information from the test source information acquired by the test source information acquisition unit And a test information acquisition unit for acquiring each input value from the variable acquired by the variable information acquisition unit and the type of the variable. It is preferable that a program for causing a data.
 また、上記プログラムにおいて、前記テスト情報取得手段は、前記テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、前記変数情報取得手段が取得した変数と当該変数の型から入力値および出力値を変数ごとに取得するものとして、コンピュータを機能させるためのプログラムであることは好適である。 In the above program, the test information acquisition unit acquires, for each variable, one or more input values and output values of variables corresponding to each test source information from the test source information acquired by the test source information acquisition unit. And it is suitable that it is a program for making a computer function as what acquires an input value and an output value for every variable from the variable which the said variable information acquisition means acquired, and the type of the said variable.
 また、上記プログラムにおいて、前記仕様記述情報は、1以上の変数の宣言、および制約に関する記述である1以上の制約情報を有し、前記テスト情報取得手段は、前記テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、前記変数情報取得手段が取得した変数と当該変数の型から入力値および出力値を変数ごとに取得し、かつ、前記すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するものとして、コンピュータを機能させるためのプログラムであることは好適である。 In the above program, the specification description information includes one or more variable declarations and one or more constraint information that is a description related to the constraints, and the test information acquisition unit is acquired by the test source information acquisition unit. One or more input values and output values of variables corresponding to each test source information are acquired from the test source information for each variable, and the input values and outputs are obtained from the variables acquired by the variable information acquisition means and the types of the variables. To make a computer function as one that acquires one or more test suites that are a set of one or more input values and one or more output values so as to acquire a value for each variable and satisfy all the constraint information It is preferable that the program is.
 また、上記プログラムにおいて、前記制約情報は、1以上の変数の値の集合を有する状態である遷移前状態と当該遷移前状態に対して発生するイベントと前記状態の場合に前記イベントが発生した場合に移行する状態である遷移後状態とを有する状態遷移情報、または1以上の変数の値の集合を有する第一状態と当該第一状態の場合に必ず採用される1以上の変数の値の集合を有する第二状態とを有する不変条件情報であるものとして、コンピュータを機能させるためのプログラムであることは好適である。 In the above program, the constraint information includes a pre-transition state that is a state having a set of one or more variable values, an event that occurs for the pre-transition state, and the event that occurs in the state. State transition information having a post-transition state that is a state to be transferred to, or a first state having a set of one or more variable values and a set of one or more variable values that are always employed in the case of the first state It is preferable that the program is a program for causing a computer to function as the invariant condition information having the second state.
(実施の形態2)
 本実施の形態において、不適切なテストスイートの生成を防止できるテスト仕様生成装置2について説明する。本実施の形態において、第一に、状態遷移情報の前提部分を制約として、状態遷移の前提を満たさないテストスイートの生成を防止するテスト仕様生成装置2について説明する。第二に、イベントに関する制約を設け、指定したイベントを含むテストスイートの生成を防止するテスト仕様生成装置2について説明する。第三に、遷移前状態情報を削除し、残りの部分の論理否定を制約情報とするテスト仕様生成装置2について説明する。第四に、遷移後状態情報を削除し、残りの部分の論理否定を制約情報とするテスト仕様生成装置2について説明する。
(Embodiment 2)
In the present embodiment, a test specification generation apparatus 2 that can prevent generation of an inappropriate test suite will be described. In the present embodiment, first, the test specification generation device 2 that prevents the generation of a test suite that does not satisfy the premise of the state transition will be described using the premise part of the state transition information as a constraint. Secondly, the test specification generation device 2 that provides restrictions on events and prevents the generation of a test suite including a specified event will be described. Third, the test specification generation device 2 that deletes the pre-transition state information and uses the logical negation of the remaining part as constraint information will be described. Fourthly, a description will be given of the test specification generation device 2 in which the post-transition state information is deleted and the logical negation of the remaining part is used as constraint information.
 図13は、本実施の形態におけるテスト仕様生成装置2のブロック図である。テスト仕様生成装置2は、テスト情報格納部11、仕様記述情報格納部12、受付部13、テスト情報取得部24、テスト情報蓄積部15、テスト情報出力部16を備える。 FIG. 13 is a block diagram of the test specification generation apparatus 2 in the present embodiment. The test specification generation apparatus 2 includes a test information storage unit 11, a specification description information storage unit 12, a reception unit 13, a test information acquisition unit 24, a test information storage unit 15, and a test information output unit 16.
 テスト情報取得部24は、イベント制約情報格納手段240、テスト元情報取得手段141、変数情報取得手段142、テスト情報取得手段243を備える。 The test information acquisition unit 24 includes an event constraint information storage unit 240, a test source information acquisition unit 141, a variable information acquisition unit 142, and a test information acquisition unit 243.
 仕様記述情報格納部12が格納している仕様記述情報は、ここでは、1以上の変数の宣言、および1以上の制約情報を有する。また、制約情報は、ここでは、例えば、遷移前状態とイベントと前記状態の場合に遷移後状態とを有する状態遷移情報である。状態遷移情報は、アクションを有しても良い。また、制約情報は、例えば、不変条件情報である。 Here, the specification description information stored in the specification description information storage unit 12 includes one or more variable declarations and one or more constraint information. Further, the constraint information here is, for example, state transition information having a state before transition, an event, and a state after transition in the case of the state. The state transition information may have an action. The constraint information is, for example, invariant condition information.
 テスト情報取得部24は、変数の宣言を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得する。また、テスト情報取得部24は、変数の宣言とテスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得することは好適である。また、ここでのテスト情報は、通常、テストスイートである。 The test information acquisition unit 24 acquires one or more pieces of test information having at least an input value of each of one or more variables using the variable declaration. In addition, it is preferable that the test information acquisition unit 24 acquires one or more pieces of test information having at least an input value of each of one or more variables using the variable declaration and the test source information. The test information here is usually a test suite.
 イベント制約情報格納手段240は、1以上のイベント制約情報を格納し得る。イベント制約情報は、イベントに関する制約を示す情報である。イベント制約情報は、例えば、「¬null」、「¬t?clear」などである。「¬null」は、イベントはnullではないことを示す。また、「¬t?clear」は、イベントは「t?clear」ではないことを示す。 The event constraint information storage unit 240 can store one or more event constraint information. The event constraint information is information indicating constraints related to events. The event constraint information is, for example, “¬null”, “¬t? Clear”, and the like. “¬null” indicates that the event is not null. “¬t? Clear” indicates that the event is not “t? Clear”.
 テスト情報取得部24は、通常、MPUやメモリ等から実現され得る。テスト情報取得部24の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。 The test information acquisition unit 24 can usually be realized by an MPU, a memory, or the like. The processing procedure of the test information acquisition unit 24 is usually realized by software, and the software is recorded in a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
 テスト情報取得手段243は、仕様記述情報から、変数情報取得手段142が取得した変数と当該変数の型から入力値および出力値を変数ごとに取得し、かつ、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する。また、テスト情報取得手段243は、仕様記述情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得しても良い。 The test information acquisition unit 243 acquires the input value and the output value for each variable from the specification description information, the variable acquired by the variable information acquisition unit 142 and the type of the variable, and satisfies all the constraint information. One or more test suites that are a set of one or more input values and one or more output values are acquired. Further, the test information acquisition unit 243 acquires one or more input values and output values of the variables corresponding to each test source information from the specification description information for each variable, and satisfies 1 One or more test suites that are a set of the above input value and one or more output values may be acquired.
 テスト情報取得手段243は、1以上の前提情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。ここで、前提情報とは、1以上の制約情報が有する遷移前状態とイベントとの組である。前提情報は、遷移前状態のみでも良い。また、通常、1以上の前提情報の論理和が制約情報となる。仕様記述情報が有する元の制約情報が「(op==on∧null)-> t!start;  (op==on∧t?ring)-> arg1.ch!m∧arg2.ch!m;」である場合、テスト情報取得手段243は、当該制約情報の前提情報「(op==on∧null)∨(op==on∧t?ring)」を取得し、制約情報に追加する。ここで、「(op==on∧null)-> t!start」は、変数「op」が「on」かつ「null」であればチャネル「t」にメッセージ「start」を送信する、ことを示す。また、「(op==on∧t?ring)-> arg1.ch!m∧arg2.ch!m;」は変数「op」が「on」かつチャネル「t」が「ring」を受信すれば、チャネル「arg1.ch」にメッセージ「m」かつチャネル「arg2.ch」にメッセージ「m」を送信することを示す。 The test information acquisition means 243 acquires one or more test suites that are a set of one or more input values and one or more output values so as to satisfy all the constraint information by using one or more premise information as constraint information. It is preferable to do. Here, the premise information is a set of a pre-transition state and an event included in one or more pieces of constraint information. The precondition information may be only the pre-transition state. Also, the logical sum of one or more pieces of premise information is usually constraint information. The original constraint information contained in the specification description information is `` (op == on∧null)-> t! Start; (op == on∧t? Ring)-> arg1.ch! M∧arg2.ch! M; '' If it is, the test information acquisition unit 243 acquires the prerequisite information “(op == on∨null) ∨ (op == on∧t? Ring)” of the constraint information and adds it to the constraint information. Here, “(op == on∧null)-> t! Start” means that if the variable “op” is “on” and “null”, the message “start” is sent to the channel “t”. Show. Also, if ((op == on∧t? Ring)-> arg1.ch! M∧arg2.ch! M;) is received, the variable “op” is “on” and the channel “t” is “ring” Indicates that the message “m” is transmitted to the channel “arg1.ch” and the message “m” is transmitted to the channel “arg2.ch”.
 また、テスト情報取得手段243は、1以上のイベント制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。ここで、イベント制約情報は、イベント制約情報格納手段240のイベント制約情報である。 In addition, the test information acquisition unit 243 uses one or more event constraint information as constraint information, and a test suite that is a set of one or more input values and one or more output values so as to satisfy all the constraint information. It is preferable to acquire one or more. Here, the event constraint information is event constraint information stored in the event constraint information storage unit 240.
 また、テスト情報取得手段243は、既に取得したテストスイート(解と言っても良い。)に対応する制約情報から、1以上の第二制約情報を取得し、当該1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。ここで、第二制約情報は、既に取得したテストスイートの情報が有する遷移前状態情報を削除したうえで、残りの部分の論理否定をとることにより構成される情報である。また、第二制約情報は、制約情報が有する遷移前状態およびイベントを削除したうえで、残りの部分(遷移後状態)の論理否定をとることにより構成される情報であっても良い。例えば、解「op#off, null#true, @op#off」が得られた場合、テスト情報取得手段243は、第二制約情報「@op#offでないもの」(¬「@op#off」)を、制約情報として追加する。なお、遷移前状態を削除することは、制約情報から、遷移前状態以外の部分を取得することと同意義である。 In addition, the test information acquisition unit 243 acquires one or more second constraint information from the constraint information corresponding to the test suite (which may be referred to as a solution) that has already been acquired, and obtains the one or more second constraint information. Is also used as constraint information, and it is preferable to acquire one or more test suites that are a set of one or more input values and one or more output values so as to satisfy all the constraint information. Here, the second constraint information is information configured by deleting the pre-transition state information included in the already acquired test suite information and logically negating the remaining part. Further, the second constraint information may be information configured by deleting the pre-transition state and the event included in the constraint information and taking the logical negation of the remaining portion (post-transition state). For example, when the solution “op # off, null # true, @ op # off” is obtained, the test information acquisition unit 243 determines that the second constraint information “is not @ op # off” (¬ “@ op # off” ) Is added as constraint information. Note that deleting the pre-transition state is equivalent to acquiring a part other than the pre-transition state from the constraint information.
 また、第二制約情報は、制約情報が有する遷移後状態情報を削除して、かつ、当該制約情報が有する情報であり、前記遷移後状態以外の部分の論理否定により構成される情報であっても良い。また、第二制約情報は、制約情報が有するアクションおよび遷移後状態を削除して、かつ、当該制約情報が有する情報であり、前記削除した部分以外の部分(遷移前状態)の論理否定により構成される情報であっても良い。例えば、解「op#off,null#true,@op#off」が得られた場合、テスト情報取得手段243は、第二制約情報「op#offでない∧イベントがnullでない」(¬(op#off||null#true))を、制約情報として追加する。なお、遷移後状態を削除することは、制約情報から、遷移後状態以外の部分を取得することと同意義である。 Further, the second constraint information is information that is deleted from the post-transition state information included in the constraint information and is included in the constraint information, and is configured by logical negation of a portion other than the post-transition state. Also good. The second constraint information is information that the constraint information deletes the action and post-transition state, and the constraint information has, and is configured by logical negation of a portion other than the deleted portion (pre-transition state) Information may be used. For example, when the solution “op # off, null # true, @ op # off” is obtained, the test information acquisition unit 243 determines that the second constraint information “an event that is not op # off is not null” (¬ (op # off || null # true)) is added as constraint information. Note that deleting the post-transition state is equivalent to acquiring a part other than the post-transition state from the constraint information.
 テスト情報取得手段243は、通常、MPUやメモリ等から実現され得る。テスト情報取得手段243の処理手順は、通常、ソフトウェアで実現され、当該ソフトウェアはROM等の記録媒体に記録されている。但し、ハードウェア(専用回路)で実現しても良い。 The test information acquisition unit 243 can be usually realized by an MPU, a memory, or the like. The processing procedure of the test information acquisition unit 243 is usually realized by software, and the software is recorded on a recording medium such as a ROM. However, it may be realized by hardware (dedicated circuit).
 次に、本実施の形態におけるテスト仕様生成装置2の具体的な動作について説明する。以下、4つの具体例について説明する。 Next, a specific operation of the test specification generation device 2 in the present embodiment will be described. Hereinafter, four specific examples will be described.
(具体例1)
 具体例1は、1以上の前提情報をも制約情報として用いて、無用なテストスイートの抑制を図る場合である。
(Specific example 1)
Specific example 1 is a case where one or more pieces of premise information are also used as constraint information to suppress unnecessary test suites.
 今、仕様記述情報格納部12は、図14に示す仕様記述情報を格納している。図14の仕様記述情報は、図6の仕様記述情報と比較して、(3)の「testedwith{off}」を有しない。図14において、図6と同様、制約情報は(6)(7)である。 Now, the specification description information storage unit 12 stores the specification description information shown in FIG. The specification description information in FIG. 14 does not have “testedwith {off}” in (3) as compared with the specification description information in FIG. In FIG. 14, as in FIG. 6, the constraint information is (6) and (7).
 かかる状況において、ユーザは、テスト仕様生成装置1に、テスト情報生成指示を入力した、とする。 In this situation, it is assumed that the user has input a test information generation instruction to the test specification generation device 1.
 すると、受付部13は、テスト情報生成指示を受け付ける。そして、テスト情報取得部14は、仕様記述情報格納部12から、図14の仕様記述情報を読み出す。 Then, the reception unit 13 receives a test information generation instruction. Then, the test information acquisition unit 14 reads the specification description information in FIG. 14 from the specification description information storage unit 12.
 次に、テスト情報取得部14の変数情報取得手段142は、図14の仕様記述情報を解釈し、変数表を取得する。つまり、変数情報取得手段142は、まず、デフォルトの変数の情報”null#true”、”SubsystemCountUp#true”を、図示しない記録媒体から取得する。そして、変数情報取得手段142は、取得した各変数の情報に変数識別子を付してレコードを構成し、当該レコードを空の変数表に書き込む。 Next, the variable information acquisition unit 142 of the test information acquisition unit 14 interprets the specification description information in FIG. 14 and acquires a variable table. That is, the variable information acquisition unit 142 first acquires default variable information “null # true” and “SubsystemCountUp # true” from a recording medium (not shown). Then, the variable information acquisition unit 142 configures a record by attaching a variable identifier to the acquired information of each variable, and writes the record in an empty variable table.
 次に、変数情報取得手段142は、図14の”Extern”、”Data onoff_type; // from main”、”Class B”、” Data m_type {m};”を順次、読み出し、変数の宣言ではない、と判断する。 Next, the variable information acquisition unit 142 sequentially reads “Extern”, “Data onoff_type; // from main”, “Class B”, and “Data m_type {m};” in FIG. Judge that.
 次に、変数情報取得手段142は、図6の”Var op : onoff_type {off};”を読み出す。そして、変数情報取得手段142は、予約語”Var”から、この処理単位が変数の宣言である、と判断する。なお、以降に続く処理単位に対して、変数ではない予約語が出現するまで、変数情報取得手段142は、変数の宣言であると判断する、とする。 Next, the variable information acquisition unit 142 reads “Var op: onoff_type {off};” in FIG. Then, the variable information acquisition unit 142 determines from the reserved word “Var” that this processing unit is a variable declaration. It is assumed that the variable information acquisition unit 142 determines that a variable declaration is made until a reserved word that is not a variable appears in subsequent processing units.
 次に、変数情報取得手段142は、処理単位”Var op : onoff_type {off};”から変数の型”onoff_type”を取得する。次に、テスト元情報取得手段141は、この処理単位からテスト元情報を取得できない。 Next, the variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “Varop: onoff_type” {off}; ”. Next, the test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
 次に、変数情報取得手段142は、変数の型”onoff_type”から、変数”op”の入力値”on”と”off”、および変数”op”の出力値”on”と”off”を取得する。そして、変数情報取得手段142は、変数”op”の入力値”on”に変数識別子を付して、レコード”3 op#onを構成する。また、変数情報取得手段142は、変数”op”の入力値”off”に変数識別子を付して、レコード”4 op#off”を構成する。また、変数情報取得手段142は、変数”op”の出力値”on”に変数識別子を付して、レコード”5 @op#on”を構成する。また、変数情報取得手段142は、変数”op”の出力値”off”に変数識別子を付して、レコード”6 @op#off”を構成する。 Next, the variable information acquisition unit 142 acquires the input values “on” and “off” of the variable “op” and the output values “on” and “off” of the variable “op” from the variable type “onoff_type”. To do. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “on” of the variable “op” to configure the record “3 op # on. The variable information acquisition unit 142 also sets the variable“ op ”. A variable identifier is added to the input value “off” of the record, and the record “4 op # off” is formed.The variable information acquisition unit 142 adds a variable identifier to the output value “on” of the variable “op”. Record “5 @ op # on”, and variable information acquisition means 142 attaches a variable identifier to the output value “off” of variable “op” and records “6 @ op # off”. Constitute.
 次に、変数情報取得手段142は、図6の”lamp :onoff_type {off};”を読み出す。そして、変数情報取得手段142は、この処理単位が変数の宣言である、と判断する。 Next, the variable information acquisition unit 142 reads “lamp: onoff_type {off};” in FIG. Then, the variable information acquisition unit 142 determines that this processing unit is a variable declaration.
 次に、変数情報取得手段142は、処理単位”lamp : onoff_type {off};”から変数の型”onoff_type”を取得する。次に、テスト元情報取得手段141は、この処理単位からテスト元情報を取得できない。 Next, the variable information acquisition unit 142 acquires the variable type “onoff_type” from the processing unit “lamp: onoff_type_ {off};”. Next, the test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
 次に、変数情報取得手段142は、型”onoff_type”を用いて、変数”lamp”の1以上の入力値{on,off}と変数”lamp”の1以上の出力値{on,off}を取得する。そして、変数情報取得手段142は、変数”lamp”の入力値”on”に変数識別子を付して、レコード”7 lamp#on”を構成する。また、変数情報取得手段142は、変数”lamp”の入力値”off”に変数識別子を付して、レコード”8 lamp#off”を構成する。また、変数情報取得手段142は、変数”lamp”の出力値”on”に変数識別子を付して、レコード”9 @lamp#on”を構成する。さらに、変数情報取得手段142は、変数”lamp”の出力値”off”に変数識別子を付して、レコード”10 @lamp#off”を構成する。そして、変数情報取得手段142は、これらのレコードを変換表に追記する。 Next, the variable information acquisition unit 142 uses the type “onoff_type” to obtain one or more input values {on, off} of the variable “lamp” and one or more output values {on, off} of the variable “lamp”. get. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “on” of the variable “lamp”, and configures the record “7 lamp # on”. Further, the variable information acquisition unit 142 adds the variable identifier to the input value “off” of the variable “lamp”, and configures the record “8 lamp # off”. Further, the variable information acquisition unit 142 adds the variable identifier to the output value “on” of the variable “lamp”, and configures the record “9 @ lamp # on”. Furthermore, the variable information acquisition unit 142 adds the variable identifier to the output value “off” of the variable “lamp”, and configures the record “10 @ lamp # off”. And the variable information acquisition means 142 adds these records to a conversion table.
 次に、変数情報取得手段142は、図14の”Channel ch : m_type;”を読み出す。そして、変数情報取得手段142は、予約語”Channel”から、この処理単位が変数の宣言である、と判断する。 Next, the variable information acquisition unit 142 reads “Channel ch: m_type;” in FIG. Then, the variable information acquisition unit 142 determines from the reserved word “Channel” that this processing unit is a variable declaration.
 次に、変数情報取得手段142は、処理単位”Channel ch : m_type;”から変数の型” m_type”を取得する。次に、テスト元情報取得手段141は、この処理単位からテスト元情報を取得できない。 Next, the variable information acquisition unit 142 acquires the variable type “m_type” from the processing unit “Channel ch: m_type;”. Next, the test source information acquisition unit 141 cannot acquire the test source information from this processing unit.
 次に、変数情報取得手段142は、型”m_type”を用いて、変数”ch”の入力値{m}を取得する。そして、変数情報取得手段142は、変数”ch”の入力値”m”に変数識別子を付して、レコード”11 ch?m”を構成する。そして、変数情報取得手段142は、変換表にこのレコードを追記する。なお、予約語”Channel”はイベントを示し、入力値のみ存在し、出力値が存在しないことは、予め変数情報取得手段142は知っている。 Next, the variable information acquisition unit 142 acquires the input value {m} of the variable “ch” using the type “m_type”. Then, the variable information acquisition unit 142 adds the variable identifier to the input value “m” of the variable “ch” to configure the record “11 ch? M”. Then, the variable information acquisition unit 142 adds this record to the conversion table. Note that the reserved word “Channel” indicates an event, and the variable information acquisition unit 142 knows in advance that only an input value exists and no output value exists.
 以上の処理により、図15に示す変数表が得られた。 The variable table shown in FIG. 15 was obtained by the above processing.
 次に、テスト情報取得手段243は、図14の仕様記述情報を解釈し、以下のように命題論理式を取得する。 Next, the test information acquisition unit 243 interprets the specification description information in FIG. 14 and acquires a propositional logical expression as follows.
 つまり、テスト情報取得手段243は、例えば、処理単位”Var op : onoff_type {off};”を読み出し、当該処理単位から状態遷移前の変数に関する命題論理式「op#on||op#off」と「not(op#on)||not(op#off)」と、状態遷移後変数に関する命題論理式「@op#on||@op#off」と「not(@op#on)||not(@op#off)」とを得る。 In other words, the test information acquisition unit 243 reads, for example, the processing unit “Var op: offonoff_typeoff {off};”, and sets the propositional logical expression “op # on || op # off” regarding the variable before the state transition from the processing unit. “Not (op # on) || not (op # off)” and the propositional formula “@ op # on || @ op # off” and “not (@ op # on) || not (@ op # off) ".
 そして、テスト情報取得手段243は、図15の変数表を用いて、例えば、命題論理式「op#on||op#off」に対して、変数識別子の集合「3 4 0」を得る。なお、「0」は命題論理式の終端を示す。また、テスト情報取得手段243は、図15の変数表を用いて、例えば、命題論理式「not(op#on)||not(op#off)」に対して、変数識別子の集合「-3 -4 0」を得る。なお、「-」は「否定」を示す。つまり、「not(op#on)」は変数識別子「-3」となる。また、テスト情報取得手段243は、図15の変数表を用いて、命題論理式「@op#on||@op#of」に対して、変数識別子の集合「5 6 0」を得る。さらに、テスト情報取得手段243は、図15の変数表を用いて、命題論理式「not(@op#on)||not(@op#off)」に対して、変数識別子の集合「-5 -6 0」を得る。また、テスト情報取得手段243は、上記の命題論理式をコメント(行頭にcを付加)として付加する。そして、テスト情報取得手段243は、図16の(1)(2)(3)(4)を得る。 Then, the test information acquisition unit 243 obtains a variable identifier set “34.0” for the propositional logical expression “op # on || op # off”, for example, using the variable table of FIG. “0” indicates the end of the propositional logical expression. Further, the test information acquisition unit 243 uses the variable table of FIG. 15, for example, for the propositional logical expression “not (op # on) || not (op # off)”, a set of variable identifiers “−3 -4 0 ". “-” Indicates “No”. That is, “not (op # on)” becomes the variable identifier “−3”. Further, the test information acquisition unit 243 obtains a set of variable identifiers “56.0” for the propositional formula “@ op # on || @ op # of” using the variable table of FIG. Further, the test information acquisition unit 243 uses the variable table of FIG. 15 to set the variable identifier set “−5” for the propositional logical expression “not (@ op # on) || not (@ op # off)”. Get -6 0 ". Further, the test information acquisition unit 243 adds the above propositional logical expression as a comment (c is added to the beginning of the line). Then, the test information acquisition unit 243 obtains (1), (2), (3), and (4) in FIG.
 また、テスト情報取得手段243は、例えば、処理単位”op==on&&lamp==off:ch?m: lamp==on;”を読み出し、当該処理単位から命題論理式「op#on∧lamp#off∧ch?m→@lamp#on」を得る。つまり、テスト情報取得手段143は、”op==on”を「op#on」、”lamp==off”を「lamp#off」、”ch?m”を「ch?m」にし、”&&”を「∧」に変換し、遷移前状態イベントとを「∧」で連結する。そして、遷移後状態”lamp==on”を「@lamp#on」に変換し、「→」で連結する。以上の処理により、テスト情報取得手段243は、仕様記述情報から命題論理式を得る。 The test information acquisition unit 243 reads, for example, the processing unit “op == on && lamp == off: ch? M: lamp == on;” and outputs the propositional logical expression “op # on∧lamp # off” from the processing unit. ∧ch? M → @ lamp # on ”. That is, the test information acquisition unit 143 sets “op == on” to “op # on”, “lamp == off” to “lamp # off”, “ch? M” to “ch? M”, and “&&& “” Is converted into “∧”, and the state event before transition is connected with “∧”. Then, the post-transition state “lamp == on” is converted to “@ lamp # on” and connected by “→”. Through the above processing, the test information acquisition unit 243 obtains a propositional logical expression from the specification description information.
 次に、テスト情報取得手段243は、当該命題論理式「op#on∧lamp#off∧ch?m→@lamp#on」を同値な論理式である「¬op#on ∨ ¬lamp#off ∨ ¬ch?m ∨ @lamp#on」に変形し、図15の変数表を用いて、変数識別子の集合に変換する処理を行う。そして、テスト情報取得手段243は、「9 -11 -3 -8 0」を得る。よって、テスト情報取得手段243は、図16の(5)の情報を得る。 Next, the test information acquisition unit 243 obtains the propositional logical expression “op # on∧lamp # off∧ch? M → @ lamp # on” as an equivalent logical expression “¬op # on ∨ ¬lamp # off ∨”. It is transformed into “¬ch? M ∨ @ lamp # on” and is converted into a set of variable identifiers using the variable table of FIG. Then, the test information acquisition unit 243 obtains “9-11-11-3-8”. Therefore, the test information acquisition unit 243 obtains information (5) in FIG.
 テスト情報取得手段243は、以上のような処理を、すべての処理単位に対して行い、図16の命題論理式の集合を得る。つまり、実施の形態1で述べた処理系T1に対して、図14の仕様記述情報を与えれば、図16の命題論理式の集合が得られる。なお、図16の命題論理式の集合はSAT-solverへの入力である。 The test information acquisition unit 243 performs the above processing for all processing units, and obtains a set of propositional logical expressions shown in FIG. That is, if the specification description information of FIG. 14 is given to the processing system T1 described in the first embodiment, a set of propositional logical expressions of FIG. 16 is obtained. Note that the set of propositional formulas in FIG. 16 is an input to the SAT-solver.
 次に、テスト情報取得手段243は、1以上の前提情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する。つまり、テスト情報取得手段243は、図14の仕様記述情報の制約「op==on && lamp==off : ch?m : lamp==on;」の前提情報「op==on && lamp==off && ch?m」を、仕様記述情報の制約情報として追加する。また、テスト情報取得手段243は、図15の変数表を参照して、「 op == on」に対応する変数3、「lamp == off」に対応する変数8、「ch?m」に対応する変数11を拾い出し、図16に、(6)の3行を追加する。
 また、状態遷移に関する制約が二つ以上存在するときには、前提情報のいずれかを満たすという制約を追加する。例えば「op==on && lamp==off : ch?m : lamp==on;」と「op==on && lamp==on : null : true;」が制約として存在する場合、テスト情報取得手段243は、前提情報「op==on && lamp==off && ch?m」と「op==on && lamp==on && null」とから制約「(op==on && lamp==off && ch?m) || (op==on && lamp==on && null)」を作成する。そして、テスト情報取得手段243は、前記制約を、当該制約と同値な論理式「(op==on || op==on) && (op==on || lamp==on) && (op==on ||null) && (lamp==off || op==on) && (lamp==off || lamp==on) && (lamp==off || null) && (ch?m || op==on) && (ch?m || lamp==on) && (ch?m ||null)」に変換したうえで図15の変数表を参照して、以下の9行の情報を得る。そして、テスト情報取得手段243は、9行をCNFファイルに追加する。
3 3 0
3 7 0
3 1 0
8 3 0
8 7 0
8 1 0
11 3 0
11 7 0
11 1 0
Next, the test information acquisition unit 243 uses a test suite that is a set of one or more input values and one or more output values so as to satisfy all the constraint information by using one or more premise information as constraint information. Get one or more. That is, the test information acquisition unit 243 performs the premise information “op == on && lamp ==” of the constraint “op == on && lamp == off: ch? M: lamp == on;” in the specification description information in FIG. "off && ch? m" is added as constraint information of the specification description information. Further, the test information acquisition unit 243 corresponds to the variable 3 corresponding to “op == on”, the variable 8 corresponding to “lamp == off”, and “ch? M” with reference to the variable table of FIG. The variable 11 to be picked up is extracted, and three lines (6) are added to FIG.
Further, when there are two or more constraints related to state transition, a constraint that satisfies any of the premise information is added. For example, if “op == on && lamp == off: ch? M: lamp == on;” and “op == on && lamp == on: null: true;” exist as constraints, test information acquisition means 243 is based on the premise information “op == on && lamp == off && ch? M” and “op == on && lamp == on && null” and the constraint “(op == on && lamp == off && ch ? m) || (op == on && lamp == on && null) ”. Then, the test information acquisition unit 243 converts the constraint into a logical expression “(op == on || op == on) && (op == on || lamp == on) && (op = = on || null) && (lamp == off || op == on) && (lamp == off || lamp == on) && (lamp == off || null) && (ch? m || op == on) && (ch? m || lamp == on) && (ch? m || null) "and referring to the variable table of FIG. 15, the following nine lines of information are obtained. Then, the test information acquisition unit 243 adds nine lines to the CNF file.
3 3 0
3 7 0
3 1 0
8 3 0
8 7 0
8 1 0
11 3 0
11 7 0
11 1 0
 そして、ここで、テスト情報取得手段243が上記の1以上の前提情報をも制約情報として用いる処理を行わない場合、例えば、図16の命題論理式の集合から「op == off , lamp == off, ch?m, @op==on, @lamp == on」というテストスイートが得られる。このテストスイートは、論理式の真偽値の定義上では、図14の仕様記述情報に記載されている制約「op==on && lamp==off : ch?m : lamp==on;」と「op==off -> lamp==off」を満たすが、当該制約に現れる前提情報が有する遷移前条件「op == on && lamp == off」を満たしていない。そこで、テスト情報取得手段243は、図16の(6)を適用し、上記のテストスイートを解としない。 Here, when the test information acquisition unit 243 does not perform the processing using the one or more pieces of premise information as the constraint information, for example, “op 集合 == off 式, lamp == off, ch? m, @ op == on, @lamp == on ”. In the definition of the truth value of the logical expression, this test suite has a constraint “op == on && lamp == off: ch? M: lamp == on;” described in the specification description information of FIG. Although “op == off-> lamp == off” is satisfied, the pre-transition condition “op == on && lamp == off” included in the premise information appearing in the constraint is not satisfied. Therefore, the test information acquisition unit 243 applies (6) of FIG. 16 and does not solve the above test suite.
 以上のように、テスト情報取得手段243は、仕様記述情報から事前条件とイベント発生に相当する記述(前提情報)を抽出し、SAT-solverの入力形態に変換して制約を追加することを機械的に実行する。 As described above, the test information acquisition unit 243 extracts the description (premise information) corresponding to the precondition and the event occurrence from the specification description information, converts it into the input form of the SAT-solver, and adds a constraint. Run it.
(具体例2)
 具体例2は、イベント制約情報をも制約情報として用いて、無用なテストスイートの抑制を図る場合である。
(Specific example 2)
Specific example 2 is a case where event constraint information is also used as constraint information to suppress unnecessary test suites.
 今、仕様記述情報格納部12は、図14に示す仕様記述情報を格納している。また、イベント制約情報格納手段240は「¬null」を格納している、とする。ここで、「¬null」は「イベントが null でない」ことを示す。つまり、テストの実施計画によっては、イベント発生を伴うテストスイートのみに注目したい場合がある。このとき、イベントを伴わないテストスイートを生成することは冗長である。そこで、イベント制約情報格納手段240に「¬null」を格納することによって、無用なテストスイートの発生を抑制する。 Now, the specification description information storage unit 12 stores the specification description information shown in FIG. Further, it is assumed that the event constraint information storage unit 240 stores “¬null”. Here, “¬null” indicates that “the event is not“ null ””. In other words, depending on the test execution plan, it may be desired to focus only on the test suite that accompanies the event occurrence. At this time, generating a test suite without an event is redundant. Therefore, by storing “¬null” in the event constraint information storage unit 240, generation of useless test suites is suppressed.
 テスト情報取得手段243は、イベント制約情報格納手段240から「¬null」を読み出す。そして、テスト情報取得手段243は、「¬null」を制約として追加する。つまり、テスト情報取得手段243は、図15の変数表を参照し、「null#true」に対応する変数「1」を拾い出し、否定を表す「-」の符号を付加して、図16の末尾に(7)の一行を追加する。 The test information acquisition unit 243 reads “¬null” from the event constraint information storage unit 240. Then, the test information acquisition unit 243 adds “¬null” as a constraint. That is, the test information acquisition unit 243 refers to the variable table of FIG. 15, picks up the variable “1” corresponding to “null # true”, adds the sign of “−” representing negative, Add one line (7) at the end.
 そして、テスト情報取得手段243が上記の制約情報として「¬null」を用いる処理を行わない場合、例えば、図16の命題論理式の集合から「op == off , lamp == off, ch?m, @op==on, @lamp == on」というテストスイートが得られる。このテストスイートは、論理式の真偽値の定義上では、図14の仕様記述情報に記載されている制約「op==on && lamp==off : ch?m : lamp==on;」と「op==off -> lamp==off」を満たすが、当該制約に現れる条件「¬(null#true)」を満たしていない。そこで、テスト情報取得手段243は、図16の(7)を適用し、上記のテストスイートを解としない。 When the test information acquisition unit 243 does not perform processing using “¬null” as the constraint information, for example, “op == off, lamp == off, ch? M” from the set of propositional logical expressions in FIG. , @ Op == on, @lamp == on ”. In the definition of the truth value of the logical expression, this test suite has a constraint “op == on && lamp == off: ch? M: lamp == on;” described in the specification description information of FIG. “Op == off-> lamp == off” is satisfied, but the condition “¬ (null # true)” appearing in the constraint is not satisfied. Therefore, the test information acquisition unit 243 applies (7) of FIG. 16 and does not solve the above test suite.
 以上より、テスト情報取得手段243は、図14の仕様を満たし、かつ「イベントが null でない」を満たすテストスイートを探索することとなる。 As described above, the test information acquisition unit 243 searches for a test suite that satisfies the specification of FIG. 14 and satisfies “the event is not“ null ””.
 また、null 以外についても特定のイベント発生を伴うテストスイートの探索を同様の処理で抑制することができる。例えば、タイマのカウントアップを伴うテストスイートの出力を抑制する際には、テスト情報取得手段243は、「SubsystemCountUp」に対応する変数「2」を拾い出して、制約情報「-2 0」を追加すればよい。なお、かかる場合、イベント制約情報「¬SubsystemCountUp」がイベント制約情報格納手段240に格納されている、とする。 Also, the search for test suites with specific event occurrences can be suppressed by the same process for other than null. For example, when suppressing the output of the test suite that accompanies the timer count-up, the test information acquisition means 243 picks up the variable “2” corresponding to “SubsystemCountUp” and adds the constraint information “−2 0”. do it. In this case, it is assumed that the event constraint information “¬SubsystemCountUp” is stored in the event constraint information storage unit 240.
(具体例3)
 具体例3は、遷移前状態情報を削除することにより、無用なテストスイートの抑制を図る場合である。具体例3の動作を図18に示す。
(Specific example 3)
Specific Example 3 is a case where unnecessary test suites are suppressed by deleting the pre-transition state information. The operation of specific example 3 is shown in FIG.
 図16の命題論理式の集合(CNFファイル)から(6)(7)を除いた命題論理式の集合を、実施の形態1で述べたT2で処理すると、DNFファイルが出力される。つまり、従来技術におけるテスト情報取得手段は、図16の命題論理式の集合から(6)(7)を除いた命題論理式の集合から、図17に示すような値割り当てを取得する。なお、従来技術におけるテスト情報取得手段は、本実施の形態におけるテスト仕様生成装置2のテストスイート生成の防止機能を有さない。 When a set of propositional formulas excluding (6) and (7) from the set of propositional formulas (CNF file) in FIG. 16 is processed at T2 described in the first embodiment, a DNF file is output. That is, the test information acquisition means in the prior art acquires the value assignment as shown in FIG. 17 from the set of propositional logical expressions obtained by removing (6) and (7) from the set of propositional logical expressions in FIG. Note that the test information acquisition means in the prior art does not have a test suite generation prevention function of the test specification generation apparatus 2 in the present embodiment.
 図17の一行目の解(a)「-1 -2  3 -4  5 -6 -7  8  9 -10  11」は、図15の変数表を参照すると、「¬null#true ∧¬S ubsys temCountUp#true ∧ op#on ∧ ¬op#off ∧ @op#on ∧ ¬@op#off ∧ ¬lamp#on ∧ lamp#off ∧ @lamp#on ∧ ¬@lamp#off ∧ ch?m」となる。つまり,図17の一行目の解のうち「-1, -2, 3, -4, -7, 8, 11」が遷移前状態情報と発生イベントの情報(op==on かつ lamp==off かつ ch?m)である。また、「5, -6, 9, -10」が遷移後状態の情報(@op==on かつ @lamp==on)である。 The solution (a) “-1 の 一 -2 図 317-4「 5 -6 -7 8 9 -10 11 ”in the first line of FIG. 17 is obtained by referring to the variable table of FIG. 15 as“ ¬null # true ∧¬S ubsys temCountUp. #true ∧ op # on ∧ ¬op # off ∧ @ op # on ∧ ¬ @ op # off ∧ ¬lamp # on ∧ lamp # off ∧ @ lamp # on ∧ ¬ @ lamp # off ∧ ch? m ". That is, “-1, 行 -2, 3, -4, -7, 8, 11” in the solution on the first line in FIG. And ch? M). Further, “5, -6, 9, -10” is information on the post-transition state (@ op == on and @ lamp == on).
 また、テスト情報取得手段243は、その論理否定「null#true ∨S ubsys temCountUp#true ∨ ¬op#on ∨ op#off ∨ ¬@op#on ∨ @op#off ∨ lamp#on ∨ ¬lamp#off ∨ ¬@lamp#on ∨ @lamp#off ∨ ¬ch?m」を符号化した数列「1 2 -3 4 -5 6 7 -8 -9 10 -11 0」を取得し、SAT-solverにフィードバックし、その結果、二つ目の解(b)を計算する。ここで、テスト情報取得手段243は、フィードバックの際に、得られた最初の解の否定ではなく、遷移後状態「5, -6, 9, -10」(@op==on かつ @lamp==on)の否定を取得する。つまり、テスト情報取得手段243は、テストスイートに対応する情報が有する遷移前状態とイベントの情報を削除して、かつ、当該制約情報が有する情報であり、削除した以外の部分の論理否定により構成された情報を取得する。具体的には、テスト情報取得手段243は、制約情報「(@op==on かつ @lamp==on) でないもの」を取得する。つまり、テスト情報取得手段243は、事後状態が(a)とは異なる解となるテストスイートを取得する。図17の(b)は事後状態に相当する部分が「5 -6 9 -10」で(a)と同一であり、制約情報「(@op==on かつ @lamp==on) でないもの」を満たさない。従って、テスト情報取得手段243は、図17の(b)に対応するテストスイートを、最終的に出力しない。 Further, the test information acquisition means 243 obtains the logical negation “null # true ∨S ubsys temCountUp # true ∨ ¬op # on ∨ op # off ∨ ¬ @ op # on ∨ @ op # off ∨ lamp # on ∨ ¬lamp # Get the sequence `` 1 2 -3 4 -5 6 7 -8 -9 10 -11 0 '' that encodes `` off ∨ ¬ @ lamp # on ∨ @ lamp # off ∨ ¬ch? m '' and put it in SAT-solver As a result, the second solution (b) is calculated. Here, the test information acquisition unit 243 does not negate the first solution obtained at the time of feedback, but after the transition state “5, -6, 9, -10” (@ op == on and @ lamp = Get the negation of = on). That is, the test information acquisition unit 243 deletes the pre-transition state and event information included in the information corresponding to the test suite, and is information included in the constraint information, and is configured by logical negation of a portion other than the deleted information. Get information. Specifically, the test information acquisition unit 243 acquires the constraint information “(@ op == on and @ lamp == on) that is not”. That is, the test information acquisition unit 243 acquires a test suite whose posterior state is a solution different from (a). In FIG. 17B, the portion corresponding to the posterior state is “5 -6 9 -10”, which is the same as (a), and the constraint information “(@ op == on and @ lamp == on)” Does not meet. Therefore, the test information acquisition unit 243 does not finally output the test suite corresponding to (b) of FIG.
 一方、図17の(c)は事後状態に相当する部分が「5 -6 -9 10」であり、制約情報「(@op==on かつ @lamp==on) でないもの」を満たす。従って、テスト情報取得手段243は、図17の(c)に対応するテストスイートを、最終的に出力する。以上より、テスト情報取得手段243は、結果として、事後状態に重複のないテストスイートの網羅的なリストを得ることができる。 On the other hand, in FIG. 17 (c), the portion corresponding to the posterior state is “5 -6 -9 10”, which satisfies the constraint information “(@ op == on and @ lamp == on)”. Therefore, the test information acquisition unit 243 finally outputs a test suite corresponding to (c) of FIG. As described above, the test information acquisition unit 243 can obtain an exhaustive list of test suites in which the posterior state does not overlap as a result.
(具体例4)
 具体例4は、事後状態情報を削除することにより、無用なテストスイートの抑制を図る場合である。
(Specific example 4)
Specific example 4 is a case where unnecessary test suites are suppressed by deleting the posterior state information.
 具体例3と同様に、図16の命題論理式の集合(CNFファイル)を、実施の形態1で述べたT2で処理すると、図17に示すような値割り当てが得られる。 Similarly to the specific example 3, when the set of propositional logical expressions (CNF file) in FIG. 16 is processed at T2 described in the first embodiment, value assignment as shown in FIG. 17 is obtained.
 また、図17の一行目の解(a)「-1 -2  3 -4  5 -6 -7  8  9 -10  11」は、図15の変数表を参照すると、「¬null#true ∧¬S ubsys temCountUp#true ∧ op#on ∧ ¬op#off ∧ @op#on ∧ ¬@op#off ∧ ¬lamp#on ∧ lamp#off ∧ @lamp#on ∧ ¬@lamp#off ∧ ch?m」となる。つまり「-1, -2, 3, -4, -7, 8, 11」が事前状態情報と発生イベントの情報(op==on かつ lamp==off かつ ch?m)である。 In addition, the solution (a) “-1 行 -2 3 -4 5 -6 -7 8 9 -10 11” in the first line of FIG. 17 is obtained by referring to the variable table of FIG. 15 as “¬null # true ∧¬S. ubsys temCountUp # true ∧ op # on ∧ ¬op # off ∧ @ op # on ∧ ¬ @ op # off ∧ ¬lamp # on ∧ lamp # off ∧ @ lamp # on ∧ ¬ @ lamp # off ∧ ch? m '' Become. In other words, “-1, -2, 3, -4, -7, 8, 11” is the prior state information and the information of the occurrence event (op == on and lamp == off and ch? M).
 そして、テスト情報取得手段243は、事前状態情報と発生イベントの論理否定「(op==on かつ lamp==off かつ ch?m)の否定」を取得する。そして、テスト情報取得手段243は、元の制約をすべて満たし、かつ「 (op==on かつ lamp==off かつ ch?m) でないもの」を満たすテストスイートを取得する。つまり、図17の(b)が「 (op==on かつ lamp==off かつ ch?m) でないもの」を満たすとして、テスト情報取得手段243は、図17の(b)をテストスイートとして採用する。以上により、テスト情報取得手段243は、結果として、事前状態に重複のないテストスイートの網羅的なリストを得る。 Then, the test information acquisition unit 243 acquires the prior state information and the logical negation of the occurrence event “(op == on and lamp == off and ch? M) denial”. Then, the test information acquisition unit 243 acquires a test suite that satisfies all of the original constraints and satisfies “(op == on and lamp == off and ch? M)”. That is, assuming that (b) in FIG. 17 satisfies “what is not (op == on and lamp == off and ch? M)”, the test information acquisition unit 243 employs (b) in FIG. 17 as a test suite. To do. As a result, the test information acquisition unit 243 obtains an exhaustive list of test suites that do not overlap in the prior state as a result.
 以上、本実施の形態によれば、不適切なテストスイートの生成を防止できる。 As described above, according to the present embodiment, generation of an inappropriate test suite can be prevented.
 さらに、本実施の形態におけるテスト仕様生成装置を実現するソフトウェアは、以下のようなプログラムである。つまり、このプログラムは、記憶媒体に、テストで利用する情報であるテスト情報と、対象の仕様について記述する言語である仕様記述言語で記述された前記対象の仕様に関する情報であり、1以上の変数の宣言を含む情報である仕様記述情報を格納しており、コンピュータを、前記変数の宣言を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得するテスト情報取得部と、前記テスト情報取得部が取得した1以上のテスト情報を前記テスト情報格納部に蓄積するテスト情報蓄積部として機能させるためのプログラム、である。 Furthermore, the software that implements the test specification generation device according to the present embodiment is the following program. In other words, this program is information related to the target specification described in the specification description language, which is the test information that is information used in the test, and the language that describes the target specification, in the storage medium. Test information acquisition unit that stores specification description information, which is information including the declaration of, and uses the declaration of the variable to acquire one or more test information having at least an input value of each of the one or more variables And a program for causing the test information storage unit to function as a test information storage unit that stores one or more pieces of test information acquired in the test information storage unit.
 また、上記プログラムにおいて、前記仕様記述情報は、1以上の変数の宣言、および制約に関する記述である1以上の制約情報を有し、前記テスト情報取得手段は、前記変数情報取得手段が取得した変数と当該変数の型から入力値および出力値を変数ごとに取得し、かつ、前記すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得するプログラムである。 In the above program, the specification description information includes declaration of one or more variables and one or more constraint information that is a description related to the constraint, and the test information acquisition unit includes the variable acquired by the variable information acquisition unit. And one or more test suites that are a set of one or more input values and one or more output values so that the input value and the output value are obtained for each variable from the variable type, and all the constraint information is satisfied. It is a program to acquire.
 また、上記プログラムにおいて、前記制約情報は、1以上の変数の値の集合を有する状態である遷移前状態と当該遷移前状態に対して発生するイベントと前記状態の場合に前記イベントが発生した場合に移行する状態である遷移後状態とを有する状態遷移への制約情報であることは好適である。 In the above program, the constraint information includes a pre-transition state that is a state having a set of one or more variable values, an event that occurs for the pre-transition state, and the event that occurs in the state. It is preferable that the information is constraint information for a state transition having a post-transition state that is a state to be transferred to.
 また、上記プログラムにおいて、前記テスト情報取得手段は、前記1以上の制約情報が有する遷移前状態とイベントとの組である1以上の前提情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。 Further, in the above program, the test information acquisition unit satisfies all constraint information by using, as constraint information, one or more premise information that is a set of a pre-transition state and an event included in the one or more constraint information. As described above, it is preferable to obtain one or more test suites that are a set of one or more input values and one or more output values.
 また、上記プログラムにおいて、前記テスト情報取得部は、イベントに関する制約を示す1以上のイベント制約情報を格納し得るイベント制約情報格納手段をさらに具備し、前記テスト情報取得手段は、前記1以上のイベント制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。 In the above program, the test information acquisition unit further includes an event constraint information storage unit capable of storing one or more event constraint information indicating a constraint regarding the event, and the test information acquisition unit includes the one or more event constraint information. It is preferable to acquire at least one test suite that is a set of one or more input values and one or more output values so that all the constraint information is satisfied using the constraint information as the constraint information.
 また、上記プログラムにおいて、前記テスト情報取得手段は、既に取得したテストスイートに対応する制約情報から、当該制約情報が有する遷移前状態とイベントに関する情報を削除し、かつ、当該遷移前状態以外の当該制約情報が有する部分の論理否定を構成した1以上の第二制約情報を取得し、当該1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。 In the above program, the test information acquisition unit deletes the information about the pre-transition state and the event included in the constraint information from the constraint information corresponding to the test suite that has already been acquired, and the other than the pre-transition state. One or more second constraint information that constitutes a logical negation of the part of the constraint information is acquired, and the one or more second constraint information is also used as the constraint information to satisfy all the constraint information. It is preferable to acquire at least one test suite that is a set of input values and one or more output values.
 また、上記プログラムにおいて、前記テスト情報取得手段は、前記1以上の各制約情報から、各制約情報が有する遷移後状態を削除し、かつ、前記各制約情報が有する部分であり、当該遷移後状態以外の部分の論理否定を構成した1以上の第二制約情報を取得し、当該1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得することは好適である。 Further, in the above program, the test information acquisition unit is a part that the post-transition state included in each constraint information is deleted from each of the one or more pieces of constraint information, and the post-transition state. One or more input values so as to obtain one or more second constraint information that constitutes a logical negation of a part other than, and to satisfy all the constraint information using the one or more second constraint information as constraint information It is preferable to acquire one or more test suites that are a set of one or more output values.
 また、図19は、本明細書で述べたプログラムを実行して、上述した実施の形態のテスト仕様生成装置等を実現するコンピュータの外観を示す。上述の実施の形態は、コンピュータハードウェア及びその上で実行されるコンピュータプログラムで実現され得る。図19は、このコンピュータシステム340の概観図であり、図20は、コンピュータシステム340の内部構成を示す図である。 FIG. 19 shows the external appearance of a computer that executes the program described in this specification and realizes the test specification generation apparatus and the like of the above-described embodiment. The above-described embodiments can be realized by computer hardware and a computer program executed thereon. FIG. 19 is an overview diagram of the computer system 340, and FIG. 20 is a diagram showing an internal configuration of the computer system 340. As shown in FIG.
 図19において、コンピュータシステム340は、FDドライブ3411、CD-ROMドライブ3412を含むコンピュータ341と、キーボード342と、マウス343と、モニタ344とを含む。 19, the computer system 340 includes a computer 341 including an FD drive 3411 and a CD-ROM drive 3412, a keyboard 342, a mouse 343, and a monitor 344.
 図20において、コンピュータ341は、FDドライブ3411、CD-ROMドライブ3412に加えて、MPU3413と、CD-ROMドライブ3412及びFDドライブ3411に接続されたバス3414と、ブートアッププログラム等のプログラムを記憶するためのROM3415とに接続され、アプリケーションプログラムの命令を一時的に記憶するとともに一時記憶空間を提供するためのRAM3416と、アプリケーションプログラム、システムプログラム、及びデータを記憶するためのハードディスク3417とを含む。ここでは、図示しないが、コンピュータ341は、さらに、LANへの接続を提供するネットワークカードを含んでも良い。 In FIG. 20, in addition to the FD drive 3411 and the CD-ROM drive 3412, the computer 341 stores an MPU 3413, a bus 3414 connected to the CD-ROM drive 3412 and the FD drive 3411, and a program such as a bootup program. A RAM 3416 for temporarily storing application program instructions and providing a temporary storage space; and a hard disk 3417 for storing application programs, system programs, and data. Although not shown here, the computer 341 may further include a network card that provides connection to the LAN.
 コンピュータシステム340に、上述した実施の形態のテスト仕様生成装置等の機能を実行させるプログラムは、CD-ROM3501、またはFD3502に記憶されて、CD-ROMドライブ3412またはFDドライブ3411に挿入され、さらにハードディスク3417に転送されても良い。これに代えて、プログラムは、図示しないネットワークを介してコンピュータ341に送信され、ハードディスク3417に記憶されても良い。プログラムは実行の際にRAM3416にロードされる。プログラムは、CD-ROM3501、FD3502またはネットワークから直接、ロードされても良い。 A program that causes the computer system 340 to execute the functions of the test specification generation device or the like of the above-described embodiment is stored in the CD-ROM 3501 or FD 3502, inserted into the CD-ROM drive 3412 or FD drive 3411, and further a hard disk 3417 may be transferred. Alternatively, the program may be transmitted to the computer 341 via a network (not shown) and stored in the hard disk 3417. The program is loaded into the RAM 3416 at the time of execution. The program may be loaded directly from the CD-ROM 3501, the FD 3502, or the network.
 プログラムは、コンピュータ341に、上述した実施の形態のテスト仕様生成装置等の機能を実行させるオペレーティングシステム(OS)、またはサードパーティープログラム等は、必ずしも含まなくても良い。プログラムは、制御された態様で適切な機能(モジュール)を呼び出し、所望の結果が得られるようにする命令の部分のみを含んでいれば良い。コンピュータシステム340がどのように動作するかは周知であり、詳細な説明は省略する。 The program does not necessarily include an operating system (OS) or a third-party program that causes the computer 341 to execute the functions of the test specification generation device according to the above-described embodiment. The program only needs to include an instruction portion that calls an appropriate function (module) in a controlled manner and obtains a desired result. How the computer system 340 operates is well known and will not be described in detail.
 また、上記プログラムを実行するコンピュータは、単数であってもよく、複数であってもよい。すなわち、集中処理を行ってもよく、あるいは分散処理を行ってもよい。 Further, the computer that executes the program may be singular or plural. That is, centralized processing may be performed, or distributed processing may be performed.
 また、上記各実施の形態において、各処理(各機能)は、単一の装置(システム)によって集中処理されることによって実現されてもよく、あるいは、複数の装置によって分散処理されることによって実現されてもよい。 In each of the above embodiments, each process (each function) may be realized by centralized processing by a single device (system), or by distributed processing by a plurality of devices. May be.
 本発明は、以上の実施の形態に限定されることなく、種々の変更が可能であり、それらも本発明の範囲内に包含されるものであることは言うまでもない。 The present invention is not limited to the above-described embodiment, and various modifications are possible, and it goes without saying that these are also included in the scope of the present invention.
 以上のように、本発明にかかるテスト仕様生成装置は、対象の設計時にテスト設計のための情報を記載すれば適切なテスト仕様に関する情報が自動生成できる、という効果を有し、テスト支援装置等として有用である。 As described above, the test specification generation device according to the present invention has an effect that information related to an appropriate test specification can be automatically generated if information for test design is described at the time of target design, such as a test support device. Useful as.
 1、2 テスト仕様生成装置
 11 テスト情報格納部
 12 仕様記述情報格納部
 13 受付部
 14、24 テスト情報取得部
 15 テスト情報蓄積部
 16 テスト情報出力部
 141 テスト元情報取得手段
 141 テスト情報元取得手段
 142 変数情報取得手段
 143、243 テスト情報取得手段
DESCRIPTION OF SYMBOLS 1, 2 Test specification production | generation apparatus 11 Test information storage part 12 Specification description information storage part 13 Reception part 14, 24 Test information acquisition part 15 Test information storage part 16 Test information output part 141 Test source information acquisition means 141 Test information source acquisition means 142 Variable information acquisition means 143, 243 Test information acquisition means

Claims (11)

  1. テストで利用する情報であるテスト情報を格納し得るテスト情報格納部と、
    対象の仕様について記述する言語である仕様記述言語で記述された前記対象の仕様に関する情報であり、1以上の変数の宣言を含む情報であり、テスト情報を生成するためのテスト元情報を含む情報である仕様記述情報を格納し得る仕様記述情報格納部と、
    前記変数の宣言および前記テスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得するテスト情報取得部と、
    前記テスト情報取得部が取得した1以上のテスト情報を前記テスト情報格納部に蓄積するテスト情報蓄積部とを具備するテスト仕様生成装置。
    A test information storage unit that can store test information that is information used in the test;
    Information related to the target specification described in a specification description language, which is a language describing the target specification, information including declaration of one or more variables, and information including test source information for generating test information A specification description information storage unit capable of storing specification description information,
    A test information acquisition unit that acquires at least one test information having at least an input value of each of one or more variables using the declaration of the variable and the test source information;
    A test specification generation apparatus comprising: a test information storage unit that stores one or more pieces of test information acquired by the test information acquisition unit in the test information storage unit.
  2. 前記変数は、型を有し、
    前記仕様記述情報は、
    前記1以上の変数のうち、1以上の各変数に対応付けて、各変数が採り得る値の中で、テストで使用する値を特定する情報であるテスト元情報を有し、
    前記テスト情報取得部は、
    前記仕様記述情報から、前記テスト元情報を前記変数と対応付けて取得するテスト元情報取得手段と、
    前記仕様記述情報から、テスト元情報を有さない変数と当該変数の型を取得する変数情報取得手段と、
    前記テスト情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値を変数ごとに取得し、かつ、前記変数情報取得手段が取得した変数と当該変数の型から入力値を変数ごとに取得するテスト情報取得手段とを具備する請求項1記載のテスト仕様生成装置。
    The variable has a type;
    The specification description information is
    Among the one or more variables, there is test source information that is information for specifying a value used in a test among values that can be taken by each variable in association with one or more variables.
    The test information acquisition unit
    Test source information acquisition means for acquiring the test source information in association with the variable from the specification description information;
    From the specification description information, variable information acquisition means for acquiring a variable having no test source information and the type of the variable;
    One or more input values of variables corresponding to each test source information are acquired for each variable from the test source information acquired by the test information acquisition unit, and the variable acquired by the variable information acquisition unit and the type of the variable The test specification generation apparatus according to claim 1, further comprising test information acquisition means for acquiring an input value for each variable.
  3. 前記テスト情報取得手段は、
    前記テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、前記変数情報取得手段が取得した変数と当該変数の型から入力値および出力値を変数ごとに取得する請求項2記載のテスト仕様生成装置。
    The test information acquisition means includes
    From the test source information acquired by the test source information acquisition means, one or more input values and output values of variables corresponding to each test source information are acquired for each variable, and the variable acquired by the variable information acquisition means The test specification generation apparatus according to claim 2, wherein an input value and an output value are obtained for each variable from the variable type.
  4. 前記仕様記述情報は、
    1以上の変数の宣言、および制約に関する記述である1以上の制約情報を有し、
    前記テスト情報取得手段は、
    前記テスト元情報取得手段が取得したテスト元情報から、各テスト元情報に対応する変数の1以上の入力値および出力値を変数ごとに取得し、かつ、前記変数情報取得手段が取得した変数と当該変数の型から入力値および出力値を変数ごとに取得し、かつ、前記すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する請求項3記載のテスト仕様生成装置。
    The specification description information is
    Has one or more variable declarations and one or more constraint information that is a description of the constraint,
    The test information acquisition means includes
    From the test source information acquired by the test source information acquisition means, one or more input values and output values of variables corresponding to each test source information are acquired for each variable, and the variable acquired by the variable information acquisition means Acquire input values and output values for each variable from the variable type, and acquire one or more test suites that are a set of one or more input values and one or more output values so as to satisfy all the constraint information. The test specification generation device according to claim 3.
  5. 前記制約情報は、1以上の変数の値の集合を有する状態である遷移前状態と当該遷移前状態に対して発生するイベントと前記状態の場合に前記イベントが発生した場合に移行する状態である遷移後状態と明示的にイベントを発生させるアクションとを有する状態遷移情報、または1以上の変数の値の集合を有する第一状態と当該第一状態の場合に必ず採用される1以上の変数の値の集合を有する第二状態とを有する不変条件情報である請求項4記載のテスト仕様生成装置。 The constraint information is a state that has a set of one or more variable values, a state before transition, an event that occurs for the state before transition, and a state that transitions when the event occurs in the state. State transition information having a post-transition state and an action that explicitly generates an event, or a first state having a set of values of one or more variables and one or more variables that are always employed in the case of the first state The test specification generation device according to claim 4, which is invariant condition information having a second state having a set of values.
  6. 前記テスト情報取得手段は、
    前記1以上の制約情報が有する遷移前状態とイベントとの組である1以上の前提情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する請求項5記載のテスト仕様生成装置。
    The test information acquisition means includes
    One or more input values and one or more outputs so as to satisfy all the constraint information by using one or more premise information that is a set of a pre-transition state and an event included in the one or more constraint information as constraint information. The test specification generation apparatus according to claim 5, wherein one or more test suites that are a set of values are acquired.
  7. 前記テスト情報取得部は、
    イベントに関する制約を示す1以上のイベント制約情報を格納し得るイベント制約情報格納手段をさらに具備し、
    前記テスト情報取得手段は、
    前記1以上のイベント制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する請求項5記載のテスト仕様生成装置。
    The test information acquisition unit
    Further comprising event constraint information storage means capable of storing one or more event constraint information indicating constraints on the event;
    The test information acquisition means includes
    6. The test suite, which is a set of one or more input values and one or more output values, is acquired so as to satisfy all the constraint information by using the one or more event constraint information as constraint information. Test specification generator.
  8. 前記テスト情報取得手段は、
    既に取得したテストスイートに対応する制約情報から、当該制約情報が有する遷移前状態とイベントに関する情報を削除し、かつ、当該遷移前状態以外の当該制約情報が有する部分の論理否定を構成した1以上の第二制約情報を取得し、当該1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する請求項5記載のテスト仕様生成装置。
    The test information acquisition means includes
    One or more configured to delete the pre-transition state and event information included in the constraint information from the constraint information corresponding to the test suite that has already been acquired, and to constitute a logical negation of the portion of the constraint information other than the pre-transition state Test that is a set of one or more input values and one or more output values so as to satisfy all the constraint information using the one or more second constraint information as constraint information. The test specification generation apparatus according to claim 5, wherein one or more suites are acquired.
  9. 前記テスト情報取得手段は、
    前記1以上の各制約情報から、各制約情報が有する遷移後状態を削除し、かつ、前記各制約情報が有する部分であり、当該遷移後状態以外の部分の論理否定を構成した1以上の第二制約情報を取得し、当該1以上の第二制約情報をも制約情報として用いて、すべての制約情報を満たすように、1以上の入力値および1以上の出力値の組であるテストスイートを1以上取得する請求項5記載のテスト仕様生成装置。
    The test information acquisition means includes
    The post-transition state possessed by each constraint information is deleted from each of the one or more constraint information, and the part of the constraint information includes one or more firsts that constitute a logical negation of a portion other than the post-transition state. A test suite that is a set of one or more input values and one or more output values is acquired so as to satisfy all the constraint information by using the one or more second constraint information as the constraint information. The test specification generation device according to claim 5, wherein one or more are acquired.
  10. 記憶媒体に、
    テストで利用する情報であるテスト情報と、
    対象の仕様について記述する言語である仕様記述言語で記述された前記対象の仕様に関する情報であり、1以上の変数の宣言を含む情報であり、テスト情報を生成するためのテスト元情報を含む情報である仕様記述情報を格納しており、
    テスト情報取得部、およびテスト情報蓄積部により実現され得るテスト仕様生成方法であって、
    前記テスト情報取得部が、前記変数の宣言および前記テスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得するテスト情報取得ステップと、
    前記テスト情報蓄積部が、前記テスト情報取得ステップで取得された1以上のテスト情報を前記テスト情報格納部に蓄積するテスト情報蓄積ステップとを具備するテスト仕様生成方法。
    In the storage medium,
    Test information that is used for testing,
    Information related to the target specification described in a specification description language, which is a language describing the target specification, information including declaration of one or more variables, and information including test source information for generating test information The specification description information is stored.
    A test specification generation method that can be realized by a test information acquisition unit and a test information storage unit,
    A test information acquisition step in which the test information acquisition unit acquires one or more test information having at least an input value of each of one or more variables using the declaration of the variable and the test source information;
    A test specification generation method, comprising: a test information accumulation step in which the test information accumulation unit accumulates one or more pieces of test information acquired in the test information acquisition step in the test information storage unit.
  11. 記憶媒体に、
    テストで利用する情報であるテスト情報と、
    対象の仕様について記述する言語である仕様記述言語で記述された前記対象の仕様に関する情報であり、1以上の変数の宣言を含む情報であり、テスト情報を生成するためのテスト元情報を含む情報である仕様記述情報を格納しており、
    コンピュータを、
    前記変数の宣言および前記テスト元情報を用いて、1以上の各変数の入力値を少なくとも有する1以上のテスト情報を取得するテスト情報取得部と、
    前記テスト情報取得部が取得した1以上のテスト情報を前記テスト情報格納部に蓄積するテスト情報蓄積部として機能させるためのプログラム。
    In the storage medium,
    Test information that is used for testing,
    Information related to the target specification described in a specification description language, which is a language describing the target specification, information including declaration of one or more variables, and information including test source information for generating test information The specification description information is stored.
    Computer
    A test information acquisition unit that acquires at least one test information having at least an input value of each of one or more variables using the declaration of the variable and the test source information;
    A program for functioning as a test information storage unit that stores one or more pieces of test information acquired by the test information acquisition unit in the test information storage unit.
PCT/JP2012/056368 2011-03-18 2012-03-13 Test specification generator, test specification generation method, and program WO2012128120A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013505910A JP5729465B2 (en) 2011-03-18 2012-03-13 Test specification generation apparatus, test specification generation method, and program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-060199 2011-03-18
JP2011060199 2011-03-18

Publications (1)

Publication Number Publication Date
WO2012128120A1 true WO2012128120A1 (en) 2012-09-27

Family

ID=46879273

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2012/056368 WO2012128120A1 (en) 2011-03-18 2012-03-13 Test specification generator, test specification generation method, and program

Country Status (2)

Country Link
JP (1) JP5729465B2 (en)
WO (1) WO2012128120A1 (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0855041A (en) * 1994-08-16 1996-02-27 Matsushita Electric Ind Co Ltd System test specification generator
JP2007323573A (en) * 2006-06-05 2007-12-13 Internatl Business Mach Corp <Ibm> Functional test script generator
JP2008293382A (en) * 2007-05-25 2008-12-04 Fuji Electric Holdings Co Ltd Automatic test specification generation system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0855041A (en) * 1994-08-16 1996-02-27 Matsushita Electric Ind Co Ltd System test specification generator
JP2007323573A (en) * 2006-06-05 2007-12-13 Internatl Business Mach Corp <Ibm> Functional test script generator
JP2008293382A (en) * 2007-05-25 2008-12-04 Fuji Electric Holdings Co Ltd Automatic test specification generation system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
EUN HYE CHOI ET AL.: "SENS - Specification Language for Embedded Network Systems - toward Automatic Test Generation, Programming Science Technical Report", COLLABORATIVE RESEARCH TEAM FOR VERIFICATION AND SPECIFICATON, NATIONAL INSTITUTE OF ADVANCED INDUSTRIAL SCIENCE AND TECHNOLOGY, August 2011 (2011-08-01), Retrieved from the Internet <URL:http://cfv.jp/cvs/introduction/pdf/PS2011-002.pdf> [retrieved on 20120409] *
TAKAHIRO SEINO ET AL.: "Generating test cases for implementing concurrent systems based on the OTS/CafeOBJ method", IEICE TECHNICAL REPORT, vol. 110, no. 161, 26 July 2010 (2010-07-26), pages 7 - 12 *

Also Published As

Publication number Publication date
JP5729465B2 (en) 2015-06-03
JPWO2012128120A1 (en) 2014-07-24

Similar Documents

Publication Publication Date Title
US11797298B2 (en) Automating identification of code snippets for library suggestion models
US20210011696A1 (en) Blackbox matching engine
US11340896B2 (en) Library model addition
US11494181B2 (en) Automating generation of library suggestion engine models
US7685576B2 (en) System and method for model based system testing of interactive applications
CN106951305B (en) Method for generating midCore script from QVT-R language based on model conversion
US9311077B2 (en) Identification of code changes using language syntax and changeset data
JP2014071899A (en) Software developing method, and system for the same
Brumbulli et al. Automatic verification of BPMN models
CN113157597A (en) Structure analysis method, structure analysis device, electronic equipment and storage medium
Deantoni Modeling the behavioral semantics of heterogeneous languages and their coordination
JP2009009418A (en) Verifcation apparatus and verifcation method
JP2006350729A (en) Application software construction method, application software construction processing program, and application software construction system
Schreiner et al. A new approach for generating view generators
JP2008225898A (en) Conversion device, conversion program, and conversion method
Schmidt et al. Automatic generation of thread communication graphs from SystemC source code
JP5729465B2 (en) Test specification generation apparatus, test specification generation method, and program
CN114020604A (en) Workflow-based automatic testing method and device
EP3255558A1 (en) Syntax analyzing device, learning device, machine translation device and recording medium
Hnětynka et al. Using meta‐modeling in design and implementation of component‐based systems: the SOFA case study
Höver et al. A domain specific language for describing s-bpm processes
JP2006338399A (en) Program developing device, program development software and storage medium
Zaytsev Micropatterns in grammars
Lu et al. DATAM: A model‐based tool for dependability analysis
WO2016085213A1 (en) Computer-executable model reverse engineering method and apparatus

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: 12759955

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2013505910

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 12759955

Country of ref document: EP

Kind code of ref document: A1