JP6854994B1 - Operation check support device, operation check support method and operation check support program - Google Patents
Operation check support device, operation check support method and operation check support program Download PDFInfo
- Publication number
- JP6854994B1 JP6854994B1 JP2020570075A JP2020570075A JP6854994B1 JP 6854994 B1 JP6854994 B1 JP 6854994B1 JP 2020570075 A JP2020570075 A JP 2020570075A JP 2020570075 A JP2020570075 A JP 2020570075A JP 6854994 B1 JP6854994 B1 JP 6854994B1
- Authority
- JP
- Japan
- Prior art keywords
- code
- target arrival
- inspection
- inspection condition
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims description 129
- 238000007689 inspection Methods 0.000 claims abstract description 295
- 238000006243 chemical reaction Methods 0.000 claims abstract description 78
- 238000004458 analytical method Methods 0.000 claims abstract description 47
- 230000014509 gene expression Effects 0.000 claims description 115
- 238000012790 confirmation Methods 0.000 claims description 86
- 230000008569 process Effects 0.000 claims description 79
- 230000007704 transition Effects 0.000 claims description 47
- 238000010586 diagram Methods 0.000 claims description 8
- 238000004364 calculation method Methods 0.000 claims description 5
- 238000012545 processing Methods 0.000 description 24
- 238000012986 modification Methods 0.000 description 16
- 230000004048 modification Effects 0.000 description 16
- 239000000284 extract Substances 0.000 description 11
- 238000004891 communication Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 8
- 230000000694 effects Effects 0.000 description 4
- 238000012795 verification Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000007787 solid Substances 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/28—Error detection; Error correction; Monitoring by checking the correct order of processing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
Abstract
プログラム情報取得部(15)は、入力値を読み込んで動作する動作プログラムのソースコードである動作コードを取得する。検査条件取得部(16)は、前記動作コードの目標到達箇所を含む目標到達箇所に関する情報を検査条件として取得する。検査条件変換部(17)は、前記検査条件取得部が取得した前記検査条件に含まれる目標到達箇所へ到達したことを判定する判定式を生成する。解析部(18)は、前記検査条件変換部が生成した前記判定式を用いて前記目標到達箇所へ到達させる前記入力値として生成値を生成する。The program information acquisition unit (15) acquires an operation code which is a source code of an operation program that operates by reading an input value. The inspection condition acquisition unit (16) acquires information on the target arrival point including the target arrival point of the operation code as the inspection condition. The inspection condition conversion unit (17) generates a determination formula for determining that the target arrival point included in the inspection condition acquired by the inspection condition acquisition unit has been reached. The analysis unit (18) uses the determination formula generated by the inspection condition conversion unit to generate a generated value as the input value for reaching the target arrival point.
Description
本開示は、動作確認支援装置、動作確認支援方法及び動作確認支援プログラムに関する。 The present disclosure relates to an operation confirmation support device, an operation confirmation support method, and an operation confirmation support program.
ソフトウェア開発時、動作確認を行う担当者(以下、担当者という)は開発しているソフトウェア自体の動作、又はソフトウェアにより制御される機器の動作確認をするために、入力値により遷移するソフトウェアの内部状態を特定の状態に遷移させる場合がある。
このような場合、担当者は目標となる特定の状態にソフトウェアの内部状態を遷移させるための入力値を決定する必要がある。そして、担当者は決定した入力値をソフトウェアに入力することで、ソフトウェアの内部状態が実際に目標となる特定の状態へ遷移することが実現できるかを確認する。又は、担当者は、目標となる特定の状態への遷移の実現により、ソフトウェアにより制御される機器が目標となる特定の状態への遷移に対応して動作することができるかを確認する。During software development, the person in charge of checking the operation (hereinafter referred to as the person in charge) is inside the software that transitions according to the input value in order to check the operation of the software itself being developed or the operation of the device controlled by the software. The state may be transitioned to a specific state.
In such a case, the person in charge needs to determine the input value for transitioning the internal state of the software to a specific target state. Then, the person in charge confirms whether the internal state of the software can actually transition to a specific target state by inputting the determined input value into the software. Alternatively, the person in charge confirms whether the device controlled by the software can operate in response to the transition to the specific target state by realizing the transition to the specific target state.
このようなソフトウェア開発時の確認作業の具体例として、ソフトウェアを搭載したECU(Electronic Control Unit)等の組込み機器の動作確認作業がある。組込み機器に搭載されたソフトウェアは、複雑な制御を実現するために、ソフトウェアへの入力により遷移する内部状態を持ち、入力及び内部状態によりソフトウェアの出力が変化する。このような組込み機器の特定の動作確認するために、担当者はソフトウェアの内部状態を特定の状態に遷移させる場合がある。そのために、担当者は、ソフトウェアの仕様情報を基に、ソフトウェアの内部状態を表す内部状態値を、内部状態が特定の状態となる値として目標に設定し、設定した目標から遡ってソフトウェアへ入力する入力値を決定する必要がある。 As a specific example of such confirmation work at the time of software development, there is an operation confirmation work of an embedded device such as an ECU (Electronic Control Unit) equipped with the software. The software installed in the embedded device has an internal state that transitions by input to the software in order to realize complicated control, and the output of the software changes depending on the input and the internal state. In order to confirm the specific operation of such an embedded device, the person in charge may change the internal state of the software to a specific state. Therefore, the person in charge sets an internal state value representing the internal state of the software as a target as a value at which the internal state becomes a specific state based on the software specification information, and inputs it to the software retroactively from the set target. It is necessary to determine the input value to be input.
しかし、ソフトウェア開発における担当者は、必ずしもソフトウェアの仕様を全て把握しているとは限らない。また、担当者がソフトウェアの仕様を把握しているとしても、担当者はソフトウェアの仕様を考慮して、目標の内部状態値に到達する入力値を決定しなければならず、動作確認に必要な入力値の作成には工数がかかっていた。加えて、様々なシステム又は製品に搭載されるソフトウェアは、社会的な要求に応えて機能を充実させることにより、ソフトウェアの仕様は大規模複雑化している。これに伴い、担当者が入力値を手動で作成する工数が増加している。
このソフトウェア開発時の動作確認における入力値の作成に関する工数増加を抑制するために、数学及び論理学に基づいてシステムの性質を証明する形式検証技術を用いて、動作確認に必要な入力値を自動で生成する手法がある。However, the person in charge of software development does not always know all the software specifications. In addition, even if the person in charge knows the software specifications, the person in charge must determine the input value to reach the target internal state value in consideration of the software specifications, which is necessary for operation check. It took a lot of man-hours to create the input value. In addition, the software installed in various systems or products has been enhanced in function in response to social demands, and the specifications of the software have become large-scale and complicated. Along with this, the man-hours for the person in charge to manually create the input value are increasing.
In order to suppress the increase in man-hours related to the creation of input values in the operation check during software development, the input values required for the operation check are automatically calculated using the formal verification technology that proves the properties of the system based on mathematics and logic. There is a method to generate with.
このような形式検証技術を用いた手法の例として、特許文献1に記載された手法がある。特許文献1に記載の手法は、形式検証技術の一つであるモデル検査を用いて、ソフトウェアの動作プログラムの動作確認をする検査装置の手法である。当該文献では、検査装置がソフトウェアへの入力値又はその時系列である入力値列と、ソフトウェアの内部状態値又はその時系列である内部状態値列と、ソフトウェアからの出力値又はその時系列である出力値列とが満たすべき条件が検査条件とされる。そして、SAT(Satisfiability Problem)ソルバを用いて検査条件を満たす入力値列の解を探索し、入力値列の解が存在する場合は、解である入力値列と、内部状態値列と、出力値列とを出力する手法が開示されている。なお、SATソルバは、論理式を取得すると、論理式を真とする解を探索し、探索した結果存在した解を出力する公知の技術である。
As an example of a method using such a formal verification technique, there is a method described in
特許文献1の手法では、ソフトウェアを目標となる特定の内部状態へ遷移させる入力値を求めるために、担当者は目標となる特定の内部状態を表す内部状態値を検査条件として設定する必要がある。つまり、担当者が内部状態に関する仕様情報を参照して、設定対象として目標となる特定の内部状態を選択し、その目標となる特定の内部状態を表す内部状態値を決定する作業が必要となる。したがって、内部状態値を決定する作業により動作確認の工数が増加してしまうといった課題があった。
また、担当者が人手で内部状態値をSATソルバが解析可能な論理式を作成しなければならない作業も必要となる。したがって、内部状態値をSATソルバが解析可能な論理式を作成する作業により動作確認の工数が増加してしまうといった課題があった。
特に、大規模なソフトウェア等では、内部状態が取りうる状態の数は多く複雑である。このようなソフトウェアの動作確認では、目標となる特定の内部状態を選択し、内部状態に関する仕様情報を参照し、その目標となる特定の内部状態を表す内部状態値を決定する作業は困難であり、動作確認の工数が大幅に増加してしまう。In the method of
In addition, it is necessary for the person in charge to manually create a logical expression in which the SAT solver can analyze the internal state value. Therefore, there is a problem that the man-hours for operation confirmation increase due to the work of creating a logical expression in which the SAT solver can analyze the internal state value.
In particular, in large-scale software and the like, the number of states that can be taken as internal states is large and complicated. In checking the operation of such software, it is difficult to select a specific internal state as a target, refer to specification information on the internal state, and determine an internal state value representing the specific internal state as the target. , The man-hours for operation check will increase significantly.
本開示は、ソフトウェアの動作確認作業の工数を削減することを主な目的とする。 The main purpose of this disclosure is to reduce the man-hours for software operation confirmation work.
本開示に係る動作確認支援装置は、
入力値を読み込んで動作する動作プログラムのソースコードである動作コードを取得するプログラム情報取得部と、
前記動作コードの目標到達箇所を含む目標到達箇所に関する情報を検査条件として取得する検査条件取得部と、
前記検査条件取得部が取得した前記検査条件に含まれる目標到達箇所へ到達したことを判定する判定式を生成する検査条件変換部と、
前記検査条件変換部が生成した前記判定式を用いて前記目標到達箇所へ到達させる前記入力値として生成値を生成する解析部とを備える。The operation confirmation support device according to the present disclosure is
A program information acquisition unit that acquires the operation code, which is the source code of the operation program that operates by reading the input value,
An inspection condition acquisition unit that acquires information about a target arrival point including the target arrival point of the operation code as an inspection condition, and an inspection condition acquisition unit.
An inspection condition conversion unit that generates a determination formula for determining that the target reached point included in the inspection condition acquired by the inspection condition acquisition unit has been reached.
It is provided with an analysis unit that generates a generated value as an input value for reaching the target arrival point using the determination formula generated by the inspection condition conversion unit.
本開示によれば、動作確認の作業において、担当者が動作コードと動作コードの目標到達箇所を含む目標到達箇所に関する情報を入力することで、解析部は動作確認の作業に必要な入力値を生成する。したがって、ソフトウェアの動作確認作業の工数を削減することができる。 According to the present disclosure, in the operation confirmation work, the person in charge inputs the information about the target arrival point including the operation code and the target arrival point of the operation code, so that the analysis unit inputs the input value required for the operation confirmation work. Generate. Therefore, the man-hours for the software operation check work can be reduced.
以下、本開示の実施の形態について、図を用いて説明する。各図中、同一又は相当する部分には、同一符号を付している。実施の形態の説明において、同一又は相当する部分については、説明を適宜省略又は簡略化する。
なお、本開示は、以下に説明する実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。例えば、以下に説明する実施の形態のうち、2つ以上の実施の形態が組み合わせられて実施されても構わない。あるいは、以下に説明する実施の形態のうち、1つの実施の形態又は2つ以上の実施の形態の組み合わせが部分的に実施されても構わない。
以下の説明では、本開示の動作確認対象のソフトウェアを被確認ソフトウェアと示す。そして、被確認ソフトウェアのプログラムを動作プログラムと示す。また、動作プログラムのソースコードを動作コードと示す。Hereinafter, embodiments of the present disclosure will be described with reference to the drawings. In each figure, the same or corresponding parts are designated by the same reference numerals. In the description of the embodiment, the description will be omitted or simplified as appropriate for the same or corresponding parts.
The present disclosure is not limited to the embodiments described below, and various modifications can be made as necessary. For example, among the embodiments described below, two or more embodiments may be combined and implemented. Alternatively, of the embodiments described below, one embodiment or a combination of two or more embodiments may be partially implemented.
In the following description, the software whose operation is confirmed in the present disclosure is referred to as confirmed software. Then, the program of the confirmed software is shown as an operation program. In addition, the source code of the operation program is shown as the operation code.
実施の形態1.
本実施の形態について、図1から図7を用いて説明する。
***構成の説明***
図1を参照して、本実施の形態に係る動作確認支援装置10のハードウェア構成例を説明する。
動作確認支援装置10は、コンピュータである。動作確認支援装置10は、プロセッサ11を備えるとともに、メモリ12、通信装置13、及び入出力装置14といった他のハードウェアを備える。プロセッサ11は、信号線を介して他のハードウェアと接続され、これら他のハードウェアを制御する。
なお、動作確認支援装置10の動作手順は、動作確認支援方法に相当する。また、動作確認支援装置10の動作を実現するプログラムは、動作確認支援プログラムに相当する。
The present embodiment will be described with reference to FIGS. 1 to 7.
*** Explanation of configuration ***
A hardware configuration example of the operation
The operation
The operation procedure of the operation
プロセッサ11は、プロセッシングを行うIC(Integrated Circuit)である。プロセッサ11は、具体例としては、CPU(Central Processing Unit)、DSP(Digital Signal Processor)等である。
プロセッサ11は、動作確認支援装置10の動作を実現するプログラムを実行する。動作確認支援装置10の動作を実現するプログラムは、後述の、プログラム情報取得部15、検査条件取得部16、検査条件変換部17、解析部18、及び入力値出力部19の機能を実現するプログラムである。The
The
メモリ12は、記憶装置である。メモリ12は、具体例としては、RAM(Random Access Memory)、フラッシュメモリ又はこれらの組み合わせである。
メモリ12には、動作確認支援装置10の動作を実現するプログラム、動作コード30、及び被確認ソフトウェアの仕様情報が記憶される。被確認ソフトウェアは、任意の種類のソフトウェアでよいが、本実施の形態では組込みソフトウェアであるとして説明を進める。The
The
通信装置13は、信号線を介して接続先との情報の通信処理を実行する電子回路である。通信装置13は、動作確認支援装置10に入力される情報を受信するレシーバと、動作確認支援装置10から出力される情報を送信するトランスミッタとを含む。通信装置13は、具体例としては、通信チップ又はNIC(Network Interface Card)である。
The
入出力装置14は、情報の入出力処理を実行する電子回路である。入出力装置14は、動作確認支援装置10へ入力される入力情報の入力操作に用いられる入力機器又は動作確認支援装置10から出力される出力情報を画面に表示するディスプレイ等の外部装置に接続される。
入力機器は、具体例としては、マウス、キーボード、タッチパネル、又は、これらのうちいくつか、もしくは、すべての組み合わせである。ディスプレイは、具体例としては、LCD(Liquid Crystal Display)である。ディスプレイは、後述のプログラム情報取得部15が取得した動作コード30を表示してもよい。また、ディスプレイは、後述の入力値出力部19が出力した入力値を表示してもよい。なお、入力値出力部19が出力した入力値は、後述の解析部18が生成する入力値と同一であり、以下では生成値34として説明する。The input /
The input device is, for example, a mouse, a keyboard, a touch panel, or a combination of some or all of them. As a specific example, the display is an LCD (Liquid Crystal Display). The display may display the operation code 30 acquired by the program
動作確認支援装置10の動作を実現するプログラムは、メモリ12からプロセッサ11に読み込まれ、プロセッサ11によって実行される。メモリ12には、動作確認支援装置10の動作を実現するプログラムだけでなく、OS(Operating System)も記憶されている。プロセッサ11は、OSの少なくとも一部を実行しながら、動作確認支援装置10の動作を実現するプログラムを実行する。なお、動作確認支援装置10の動作を実現するプログラムの一部又は全部がOSに組み込まれていてもよい。プロセッサ11がOSを実行することで、タスク管理、メモリ管理、ファイル管理、通信制御等が行われる。
動作確認支援装置10の動作を実現するプログラム、動作コード30、被確認ソフトウェアの仕様情報、及びOSは、補助記憶装置に記憶されていてもよい。補助記憶装置は、具体例としては、ハードディスク、フラッシュメモリ又はこれらの組み合わせである。また、補助記憶装置は、SSD(登録商標、Solid State Drive)、SD(登録商標、Secure Digital)メモリカード、CF(登録商標、CompactFlash)、NANDフラッシュ、フレキシブルディスク、光ディスク、コンパクトディスク、ブルーレイ(登録商標)ディスク、DVD(登録商標、Digital Versatile Disk)といった可搬記録媒体又はこれらの組み合わせであってもよい。The program that realizes the operation of the operation
The program that realizes the operation of the operation
動作確認支援装置10の動作を実現するプログラム及びOSは、補助記憶装置に記憶されている場合、補助記憶装置からメモリ12にロードされ、メモリ12からプロセッサ11に読み込まれ、プロセッサ11によって実行される。
動作確認支援装置10は、プロセッサ11を代替する複数のプロセッサを備えていてもよい。これら複数のプロセッサは、動作確認支援装置10の動作を実現するプログラムの実行を分担する。それぞれのプロセッサは、具体例としては、CPUである。
動作確認支援装置10の動作を実現するプログラムにより利用、処理又は出力されるデータ、情報、信号値、及び変数値は、メモリ12、補助記憶装置、又は、プロセッサ11内のレジスタ又はキャッシュメモリの少なくともいずれかに記憶される。When the program and OS that realize the operation of the operation
The operation
The data, information, signal values, and variable values used, processed, or output by the program that realizes the operation of the operation
動作確認支援装置10の動作を実現するプログラムは、コンピュータ読取可能な媒体に記憶されて提供されてもよく、記憶媒体に格納されて提供されてもよく、またプログラムプロダクトとして提供されてもよい。プログラムプロダクトは、見た目形式の物に限られなく、コンピュータ読取可能なプログラムをロードしているものである。また、動作確認支援装置10の動作を実現するプログラムは、ネットワークを介して提供されてもよい。
The program that realizes the operation of the operation
図2を参照して、本実施の形態に係る動作確認支援装置10の機能構成例を説明する。
動作確認支援装置10は、プログラム情報取得部15、検査条件取得部16、検査条件変換部17、解析部18、及び入力値出力部19を備える。An example of the functional configuration of the operation
The operation
プログラム情報取得部15は、動作コード30をメモリ12から、又は通信装置13を介して接続先から取得する。
The program
検査条件取得部16は、検査条件31として、プログラム情報取得部15が取得した動作コード30における動作確認の目標となる目標到達箇所を含む目標到達箇所に関する情報(以下、目標到達箇所情報という)を取得する。本実施の形態に係る検査条件31は、担当者により入出力装置14を介して外部装置から入力される。
検査条件31には、少なくとも1つ以上の目標到達箇所が含まれる。目標到達箇所は、動作コード30における特定の箇所であり、動作確認の目標とする箇所である。より具体的には、目標到達箇所は、動作コード30の行番号である。したがって、目標到達箇所情報は動作コード30の行番号として入力され、検査条件取得部16により検査条件31として取得される。また、それに限らず、入出力装置14を介してディスプレイに表示された動作コード30に直接、目標到達箇所をマーキングし、指定することで目標到達箇所情報が入力されてもよい。As the inspection condition 31, the inspection
The inspection condition 31 includes at least one or more target arrival points. The target reaching location is a specific location in the operation code 30, and is a target location for operation confirmation. More specifically, the target arrival point is the line number of the operation code 30. Therefore, the target arrival location information is input as the line number of the operation code 30, and is acquired as the inspection condition 31 by the inspection
検査条件変換部17は、検査条件取得部16が取得した検査条件31を基に、検査条件31に含まれる目標到達箇所へ到達したことを判定する判定式を生成する。
本実施の形態では、検査条件31に含まれる目標到達箇所へ到達したことを判定する判定式は、解析部18が解析可能な論理式として生成される。この判定式の論理式は、目標到達箇所を示す動作コード30の行番号へ到達したときに満たされる条件を示した条件式の論理式であり、目標到達条件式32ともいう。
また、検査条件変換部17は、検査条件取得部16が取得した検査条件31を基に、目標到達箇所変数を用いた到達判定に用いるコードをプログラム情報取得部15が取得した動作コード30に追加した検査用コードを生成する。そして、検査条件変換部17は、検査用コードを解析部18のSATソルバが解析可能な論理式へ変換して検査用コードの論理式33を生成する。
したがって、検査条件変換部17の出力は、目標到達条件式32と検査用コードの論理式33となる。The inspection
In the present embodiment, the determination formula for determining that the target arrival point included in the inspection condition 31 has been reached is generated as a logical expression that can be analyzed by the
Further, the inspection
Therefore, the output of the inspection
解析部18は、検査条件変換部17が生成した目標到達条件式32を用いて目標到達箇所へ到達させる入力値を探索し、目標到達箇所へ到達させる入力値として生成値34を生成する。より具体的には、解析部18は、SATソルバを用いて、検査条件変換部17が生成した目標到達条件式32と検査用コードの論理式33の論理積を解くことで、目標到達箇所へ到達させる入力値を探索する。そして、解析部18は、目標到達箇所へ到達させる入力値として生成値34を生成する。なお、論理積を解くとは、論理積で表される論理式を充足する解、つまり論理式を真とさせる論理変数の解である入力値を求めることである。
The
入力値出力部19は、解析部18が生成した生成値34を出力する。また、入力値出力部19は、解析部18は探索の結果、生成値34が生成できなかった場合には、生成値34が生成できなかった旨の通知を出力する。
The input
また、プログラム情報取得部15、検査条件取得部16、検査条件変換部17、解析部18、及び入力値出力部19の「部」を、「回路」又は「工程」又は「手順」又は「処理」に読み替えてもよい。
また、動作確認支援装置10は、処理回路により実現されてもよい。処理回路は、例えば、ロジックIC(Integrated Circuit)、GA(Gate Array)、ASIC(Application Specific Integrated Circuit)、FPGA(Field−Programmable Gate Array)である。
この場合は、プログラム情報取得部15、検査条件取得部16、検査条件変換部17、解析部18、及び入力値出力部19は、それぞれ処理回路の一部として実現される。
なお、本明細書では、プロセッサと処理回路との上位概念を、「プロセッシングサーキットリー」という。
つまり、プロセッサと処理回路とは、それぞれ「プロセッシングサーキットリー」の具体例である。
動作確認支援装置10の動作を実現するプログラムは、プログラム情報取得部15、検査条件取得部16、検査条件変換部17、解析部18、及び入力値出力部19により行われる手順をそれぞれプログラム情報取得手順、検査条件取得手順、検査条件変換手順、解析手順及び入力値出力手順としてコンピュータに実行させるプログラムである。Further, the "units" of the program
Further, the operation
In this case, the program
In this specification, the superordinate concept of the processor and the processing circuit is referred to as "processing circuit Lee".
That is, the processor and the processing circuit are specific examples of the "processing circuit Lee", respectively.
The program that realizes the operation of the operation
***動作の説明***
図3から図7を参照して、本実施の形態に係る動作確認支援装置10の動作例を説明する。*** Explanation of operation ***
An operation example of the operation
まず、図3のフローチャートを参照して、本実施の形態に係る動作確認支援装置10の処理動作の例を説明する。
First, an example of the processing operation of the operation
ステップS101において、プログラム情報取得部15は、動作コード30を取得する。そして、処理はステップS102へ進む。
In step S101, the program
次に、ステップS102において、検査条件取得部16は、検査条件31として、動作コード30の目標到達箇所情報を、入出力装置14を介して外部装置から取得する。そして、処理はステップS103へ進む。
Next, in step S102, the inspection
次に、ステップS103において、検査条件変換部17は、ステップS102の処理において検査条件取得部16が取得した検査条件31を基に、目標到達箇所変数を定義する。目標到達箇所変数は、目標到達箇所へ到達したことを判定する到達判定に用いられる変数である。そして、処理はステップS104へ進む。
Next, in step S103, the inspection
次に、ステップS104において、検査条件変換部17は、ステップS102の処理において検査条件取得部16が取得した検査条件31を基に、目標到達箇所変数を用いた到達判定に用いるコードを動作コード30に追加した検査用コードを生成する。
検査用コードは、動作コード30において、目標到達箇所の行へ到達時に必ず実行される、目標到達箇所の行の前後の行のうちどちらか一方に、目標到達箇所変数の演算式で示されるコードを挿入したものとなる。
そして、検査条件変換部17は、検査用コードを解析部18のSATソルバが解析可能な論理式へ変換して検査用コードの論理式33を生成する。そして、処理はステップS105へ進む。Next, in step S104, the inspection
The inspection code is the code indicated by the arithmetic expression of the target arrival point variable in one of the lines before and after the target arrival point line, which is always executed when the target arrival point line is reached in the operation code 30. Is inserted.
Then, the inspection
次に、ステップS105において、検査条件変換部17は、ステップS102の処理において取得された検査条件31を基に、目標到達箇所変数を用いて到達判定に用いる目標到達条件式32を生成する。検査条件変換部17が生成する目標到達条件式32は、検査用コードに含まれる目標到達箇所変数を用いた到達判定に用いるコードを挿入した行が実行されたときに目標到達箇所変数が満たす条件を論理式で示した条件式である。そして、処理はステップS106へ進む。
なお、ステップS105の処理とステップS104の処理とは依存関係がないため、動作確認支援装置10は実行順序を入れ替えて実行したり並行して実行したりしてもよい。Next, in step S105, the inspection
Since there is no dependency between the process of step S105 and the process of step S104, the operation
次に、ステップS106において、解析部18は、SATソルバを用いて検査用コードの論理式33と目標到達条件式32との論理積を解くことで、目標到達箇所へ到達させる入力値を探索する。
論理積の解である入力値が存在した場合、解析部18は、目標到達箇所へ到達させる入力値として生成値34を生成する。そして、処理はステップS107へ進む。
一方、論理積の解である入力値が存在しない場合、解析部18は、生成値34を生成せず、生成値34を生成できなかったことを入力値出力部19に通知する。そして、処理はステップS108へ進む。Next, in step S106, the
When there is an input value that is a solution of the logical product, the
On the other hand, when the input value which is the solution of the logical product does not exist, the
次に、ステップS107において、入力値出力部19は、ステップS106において解析部18が生成した生成値34を、入出力装置14を介して外部装置に出力する。
Next, in step S107, the input
次に、ステップS108において、入力値出力部19は、ステップS106において解析部18が検査用コードの論理式33と目標到達条件式32の論理積の解がなく、生成値34が生成できない旨の通知を出力する。入力値出力部19は、この通知を出力することによって、目標到達箇所で示される特定の内部状態への遷移は、被確認ソフトウェアにおいて起こりえない動作であることを担当者に通知する。
Next, in step S108, the input
図4に示す動作コード30の具体例を用いて、本実施の形態における動作確認支援装置10のより詳細な動作例を説明する。
具体的には、以下の例では、図4に示す動作コード30で生成される被確認ソフトウェアのSLEEPモードでの動作確認のために、動作確認支援装置10が被確認ソフトウェアの内部状態をSLEEPモードへ遷移させる生成値34を生成する動作を説明する。
なお、図4の左端にある数字列は動作コード30の行番号を示す。
本例の動作コード30は、被確認ソフトウェアの内部状態である動作モードを表すモード変数modeと、入力値を代入する2つの入力変数Demo_I_x及びDemo_I_yと、出力値を代入する出力変数Demo_Oとを有する。A more detailed operation example of the operation
Specifically, in the following example, in order to confirm the operation of the confirmed software generated by the operation code 30 shown in FIG. 4 in the SLEEP mode, the operation
The number string at the left end of FIG. 4 indicates the line number of the operation code 30.
The operation code 30 of this example has a mode variable mode representing the operation mode which is the internal state of the software to be confirmed, two input variables Demo_I_x and Demo_I_y for substituting the input value, and an output variable Demo_O for substituting the output value. ..
図3のステップS101において、プログラム情報取得部15は、図4に示す動作コード30を取得する。そして、処理はステップS102へ進む。
なお、本例では動作コード30は1つの関数mainを記述した1ファイルだけだが、これに限らず、複数の関数又は複数のファイルの集合であってもよい。In step S101 of FIG. 3, the program
In this example, the operation code 30 is only one file in which one function main is described, but the operation code 30 is not limited to this, and may be a plurality of functions or a set of a plurality of files.
図3のステップS102において、検査条件取得部16は、動作コード30における目標到達箇所情報を検査条件31として取得する。そして、処理はステップS103へ進む。
本例において、動作コード30における目標到達箇所は、「動作モードがSLEEPモードに遷移した被確認ソフトウェアの内部状態」に相当する図4に示す動作コード30の26行目である。
したがって、本例では、担当者は、入出力装置14を介して検査条件取得部16に直接、「動作コード30の26行目」という情報を、目標到達箇所情報として入力する。
ただし、目標到達箇所情報の入力方法はこれに限らず、図5で示すように、入出力装置14を介してディスプレイに表示された動作コード30に目標到達箇所を視覚的にマーキングする方法等、動作コード30の中の特定箇所を指定して入力する方法であればよい。In step S102 of FIG. 3, the inspection
In this example, the target arrival point in the operation code 30 is the 26th line of the operation code 30 shown in FIG. 4, which corresponds to the “internal state of the confirmed software whose operation mode has changed to the SLEEP mode”.
Therefore, in this example, the person in charge directly inputs the information "26th line of the operation code 30" to the inspection
However, the method of inputting the target arrival point information is not limited to this, and as shown in FIG. 5, a method of visually marking the target arrival point on the operation code 30 displayed on the display via the input /
図3のステップS103において、検査条件変換部17は、「動作コード30の26行目」という1つの検査条件31を基に、1つの目標到達箇所変数reachを定義する。そして、処理はステップS104へ進む。
ここで定義される目標到達箇所変数reachの初期値は0である。In step S103 of FIG. 3, the inspection
The initial value of the target arrival point variable reach defined here is 0.
図3のステップS104において、検査条件変換部17は、「動作コード30の26行目」という検査条件31を基に、図6に示すように、27行目に目標到達箇所変数の演算式(reach++;)のコードを挿入して追加した、検査用コードを生成する。
さらに、検査条件変換部17は、検査用コードをSATソルバが解析可能な論理式に変換して、検査用コードの論理式33を生成する。そして、処理はステップS105に進む。In step S104 of FIG. 3, the inspection
Further, the inspection
図3のステップS105において、検査条件変換部17は、検査条件31を基に定義した目標到達箇所変数reachを基に、目標到達箇所へ到達したときに満たされる目標到達条件式32として「reach>0」を生成する。そして、処理はステップS106へ進む。
In step S105 of FIG. 3, the inspection
図3のステップS106において、解析部18は、SATソルバを用いて検査用コードの論理式33と目標到達条件式32との論理積を解く。そして、解析部18は、被確認ソフトウェアの実行処理が目標到達箇所である動作コード30の26行目に到達するまでに入力変数Demo_I_x及びDemo_I_yへ代入される入力値を探索する。そして、解析部18は、目標到達箇所へ到達させる入力値として生成値34を生成する。
本例では、被確認ソフトウェアの実行処理がreach++;を挿入された検査用コードの27行目に到達し、目標到達条件式32である「reach>0」を真にする解である目標到達箇所へ到達させる入力値が存在する。したがって、目標到達箇所へ到達させる入力値として生成値34が生成される。そのため、処理はステップS107へ進む。In step S106 of FIG. 3, the
In this example, the execution process of the confirmed software reaches the 27th line of the inspection code in which reach ++; is inserted, and the target arrival location is a solution that makes "reach>0", which is the target achievement conditional expression 32, true. There is an input value to reach. Therefore, the generated value 34 is generated as an input value for reaching the target arrival point. Therefore, the process proceeds to step S107.
図3のステップS107において、入力値出力部19は、ステップS106の処理で生成された生成値34を出力する。
In step S107 of FIG. 3, the input
図7では、本例で生成される生成値34及び目標到達箇所へ到達するまでの被確認ソフトウェアの実行順序を示す。
図7の右下の表は、被確認ソフトウェアへの入力として、3回の被確認ソフトウェアの実行周期の各々の周期に入力変数Demo_I_x及びDemo_I_yへ代入される入力値を示す。
具体的には、1周期目に入力変数Demo_I_x及びDemo_I_yへ代入される入力値は、10と3である。また、2周期目に入力変数Demo_I_x及びDemo_I_yへ代入される入力値は、90と3である。また、3周期目に入力変数Demo_I_x及びDemo_I_yへ代入される入力値は、どちらも任意の値を示すxxとyyである。FIG. 7 shows the generated value 34 generated in this example and the execution order of the confirmed software until the target arrival point is reached.
The table at the lower right of FIG. 7 shows the input values assigned to the input variables Demo_I_x and Demo_I_y in each of the three execution cycles of the confirmed software as inputs to the confirmed software.
Specifically, the input values assigned to the input variables Demo_I_x and Demo_I_y in the first cycle are 10 and 3. The input values assigned to the input variables Demo_I_x and Demo_I_y in the second cycle are 90 and 3. Further, the input values assigned to the input variables Demo_I_x and Demo_I_y in the third cycle are both xx and yy indicating arbitrary values.
図7の右上の表は、入力変数Demo_I_x及びDemo_I_yに入力値が代入される前後の出力変数Demo_Oの値及びモード変数modeの値を示す。
具体的には、1周期目の開始時、出力変数Demo_Oは値をもたず、モード変数modeはSTARTである。入力変数Demo_I_x及びDemo_I_yへ10と3が代入されると、動作コード30の8行目及び9行目の処理が実行され、出力変数Demo_Oに100が、モード変数modeにRUNが代入される。そして、1周期目の終了時には出力変数Demo_Oは100となり、モード変数modeはRUNとなる。
また、2周期目の開始時、出力変数Demo_Oは100、モード変数modeはRUNである。入力変数Demo_I_x及びDemo_I_yへ90と3が代入されると、動作コード30の21行目及び22行目の処理が実行され、出力変数Demo_Oに50が、モード変数modeにSLEEPが代入される。そして、1周期目の終了時には出力変数Demo_Oは50となり、モード変数modeはSLEEPとなる。
また、3周期目の開始時、出力変数Demo_Oは50、モード変数modeはSLEEPである。入力変数Demo_I_x及びDemo_I_yへ代入される値がどの値であるかに関わらず、被確認ソフトウェアの実行処理が本例の目標到達箇所を示す動作コード30の26行目に到達する。The table on the upper right of FIG. 7 shows the values of the output variable Demo_O and the value of the mode variable mode before and after the input values are assigned to the input variables Demo_I_x and Demo_I_y.
Specifically, at the start of the first cycle, the output variable Demo_O has no value, and the mode variable mode is START. When 10 and 3 are assigned to the input variables Demo_I_x and Demo_I_y, the processing of the 8th and 9th lines of the operation code 30 is executed, 100 is assigned to the output variable Demo_O, and RUN is assigned to the mode variable mode. Then, at the end of the first cycle, the output variable Demo_O becomes 100, and the mode variable mode becomes RUN.
At the start of the second cycle, the output variable Demo_O is 100 and the mode variable mode is RUN. When 90 and 3 are assigned to the input variables Demo_I_x and Demo_I_y, the processing of the 21st and 22nd lines of the operation code 30 is executed, 50 is assigned to the output variable Demo_O, and SLEEP is assigned to the mode variable mode. Then, at the end of the first cycle, the output variable Demo_O becomes 50, and the mode variable mode becomes SLEEP.
At the start of the third cycle, the output variable Demo_O is 50 and the mode variable mode is SLEEP. Regardless of which value is assigned to the input variables Demo_I_x and Demo_I_y, the execution process of the confirmed software reaches the 26th line of the operation code 30 indicating the target arrival point of this example.
本例では、図7の右下の表で示される、入力変数Demo_I_x及びDemo_I_yへの入力値が、1周期目では10と3、2周期目では90と3、3周期目では各々任意の値、という3周期分の入力値として生成値34が出力される。
このように、本実施の形態では、生成される生成値34は、1周期分のみとは限らず、複数周期分の入力値列として生成されてもよい。In this example, the input values to the input variables Demo_I_x and Demo_I_y shown in the lower right table of FIG. 7 are 10 and 3 in the first cycle, 90 and 3 in the second cycle, and arbitrary values in the third cycle, respectively. The generated value 34 is output as an input value for three cycles.
As described above, in the present embodiment, the generated value 34 to be generated is not limited to one cycle, and may be generated as an input value string for a plurality of cycles.
以上のように生成された生成値34を各々の実行周期で被確認ソフトウェアへ入力して実行することで、被確認ソフトウェアの実行処理は3周期目において動作コード30の26行目に到達し、内部状態がSLEEPモードへと遷移する。したがって、SLEEPモードにおける動作確認を行うことが可能となる。
なお、本例では、検査条件取得部16が1つの目標到達箇所を含む目標到達箇所情報を検査条件31として取得する場合を説明したが、それに限らず、複数の目標到達箇所を含む目標到達箇所情報を検査条件31として取得してもよい。具体例としては、「動作コード30の11行目と26行目」というように、検査条件取得部16は2つの目標到達箇所を示す動作コード30の2つの行番号を検査条件31として取得してもよい。
そして、動作確認支援装置10は、これら「動作コード30の11行目と26行目」という2つの目標到達箇所の両方の目標到達箇所へ到達するような生成値34を生成してもよい。
また、動作確認支援装置10は、2つの目標到達箇所の両方の目標到達箇所へ到達するような生成値34を生成できなかった場合、2つの目標到達箇所の両方の目標到達箇所へ到達するような生成値34を生成できなかったことを通知してもよい。
また、動作確認支援装置10は、2つの目標到達箇所の両方へ到達するような生成値34を生成できず、且ついずれかの目標到達箇所へのみ到達する生成値34を生成できた場合、2つの目標到達箇所の両方の目標到達箇所へ到達するような生成値34を生成できなかったことと共にいずれかの目標到達箇所へしか到達できないことを通知してもよい。By inputting the generated value 34 generated as described above into the confirmed software in each execution cycle and executing it, the execution process of the confirmed software reaches the 26th line of the operation code 30 in the third cycle. The internal state transitions to SLEEP mode. Therefore, it is possible to check the operation in the SLEEP mode.
In this example, the case where the inspection
Then, the operation
Further, when the operation
Further, when the operation
***実施の形態の効果の説明***
以上のように、本実施の形態では、担当者が被確認ソフトウェアの内部状態に関する仕様情報を参照せずとも、動作コード30に目標到達箇所(上記例では26行目)を指定するだけで、動作確認の目標となる特定の内部状態を検査条件31として入力できる。そして、動作確認支援装置10は、この検査条件31を用いて、目標到達箇所へ到達させる生成値34を生成することができる。
よって、上記例では、内部状態を26行目で示される特定の状態へ遷移させる被確認ソフトウェアの動作確認、又はその特定の状態において被確認ソフトウェアにより制御される機器の動作確認に担当者が内部状態値を決定する作業が不要となる。したがって、動作確認に要する工数を削減することができる。*** Explanation of the effect of the embodiment ***
As described above, in the present embodiment, the person in charge does not need to refer to the specification information regarding the internal state of the software to be confirmed, but simply specifies the target arrival point (
Therefore, in the above example, the person in charge internally checks the operation of the confirmed software that transitions the internal state to the specific state shown in the 26th line, or confirms the operation of the device controlled by the confirmed software in the specific state. The work of determining the state value becomes unnecessary. Therefore, the man-hours required for operation check can be reduced.
また、検査条件変換部17が、検査条件31である「動作コード30の26行目」を基に、目標到達箇所変数(reach)を用いた目標到達条件式32(reach>0)を生成する。
よって、解析部18の用いるSATソルバが解析可能な論理式を担当者が人手で作成する必要が無くなる。したがって、動作確認に要する工数の削減に加えて、数学的知識を持っていなくても担当者が動作確認することも可能となる。
また、生成値34が生成できないことを通知することによって、担当者は、検査条件31として入力した目標到達箇所で示される状態への状態遷移が、被確認ソフトウェアにおいて起こりえない動作であることを確認することができる。
したがって、被確認ソフトウェアの振舞いが仕様に従って実装されていない可能性を示すこともできる。Further, the inspection
Therefore, it is not necessary for the person in charge to manually create a logical expression that can be analyzed by the SAT solver used by the
In addition, by notifying that the generated value 34 cannot be generated, the person in charge informs that the state transition to the state indicated by the target arrival point input as the inspection condition 31 is an operation that cannot occur in the confirmed software. You can check.
Therefore, it is possible to indicate that the behavior of the confirmed software may not be implemented according to the specifications.
一方、本実施の形態と比較して、特許文献1の手法では、担当者が被確認ソフトウェアの仕様情報を参照して、動作確認の目標とする内部状態を表す変数を抽出し、その変数が満たすべき内部状態値を設定する作業が必要である。さらに、この内部状態値をSATソルバが解析可能な論理式で記述する作業が発生するため、担当者は数学的知識が必要となる。
On the other hand, as compared with the present embodiment, in the method of
より効果を明確にするために、具体例として、特許文献1の手法を用いて、図4に示す動作コード30で生成される被確認ソフトウェアの内部状態をSLEEPモードへ遷移させる生成値34を作成した場合について説明する。
まず、担当者は、被確認ソフトウェアの仕様情報を参照し、動作確認の目標とするSLEEPモードが、内部状態を表す動作モードにおける特定の状態であり、動作モードはモード変数modeの値により表されることを理解する必要がある。
次に、担当者は、被確認ソフトウェアの仕様情報から、SLEEPモードを表すモード変数modeの値を決定する必要がある。
さらに、このようにして決定したSLEEPモードを表すモード変数modeを、SATソルバが解析可能な論理式に変換する必要がある。
図4の動作コード30は1つの関数mainを記述した1ファイルだけであるが、被確認ソフトウェアが大規模かつ複雑な場合は、動作確認の目標となる内部状態値は多く複雑であるため、動作確認の工数は大幅に増加する。In order to clarify the effect, as a specific example, a generated value 34 for transitioning the internal state of the confirmed software generated by the operation code 30 shown in FIG. 4 to the SLEEP mode is created by using the method of
First, the person in charge refers to the specification information of the software to be confirmed, and the SLEEP mode, which is the target of the operation check, is a specific state in the operation mode representing the internal state, and the operation mode is represented by the value of the mode variable mode. You need to understand that.
Next, the person in charge needs to determine the value of the mode variable mode representing the SLEEP mode from the specification information of the software to be confirmed.
Further, it is necessary to convert the mode variable mode representing the SLEEP mode determined in this way into a logical expression that can be analyzed by the SAT solver.
The operation code 30 in FIG. 4 is only one file in which one function main is described, but when the software to be confirmed is large-scale and complicated, the internal state values targeted for operation confirmation are many and complicated, so the operation is performed. Confirmation man-hours will increase significantly.
***他の構成***
<変形例1>
実施の形態1では、プログラム情報取得部15は、動作コード30を取得する例を説明した。しかし、プログラム情報取得部15は、動作プログラムとしてノード又はブランチを含むAST(Abstract Syntax Tree)で作成されたASTプログラムを取得し、ASTプログラムのソースコードであるASTコードへと変換し、動作コード30としてASTコードを取得してもよい。
変形例1では、担当者は、入出力装置14を介して検査条件取得部16に直接、目標到達箇所を示すノード又はブランチに関する情報を、目標到達箇所情報として入力する。また、目標到達箇所情報の入力方法は、これに限らず、入出力装置14を介してディスプレイに表示されたASTに含まれるノード又はブランチを視覚的に指定して入力する方法であってもよい。
図3のステップS101においてASTコードが取得された場合、図3のステップS102において、検査条件取得部16は、目標到達箇所を示すノード又はブランチに関する情報を検査条件31として、入出力装置14を介して外部装置から取得してもよい。そして、図3のステップS104において、検査条件変換部17は、検査条件31に基づき動作コード30の中から目標到達箇所を示すノード又はブランチに対応するコードの行番号を抽出し、検査用コードの論理式33を生成してもよい。そして、図3のステップS105において、動作コード30の中の目標到達箇所を示すノード又はブランチに対応するコードの行番号へ到達したときに満たされる目標到達条件式32を生成してもよい。*** Other configurations ***
<Modification example 1>
In the first embodiment, the program
In the first modification, the person in charge directly inputs the information regarding the node or branch indicating the target arrival location to the inspection
When the AST code is acquired in step S101 of FIG. 3, in step S102 of FIG. 3, the inspection
<変形例2>
変形例2として、プログラム情報取得部15は、動作プログラムとしてノード又はエッジを含む状態遷移図で作成された状態遷移プログラムを取得し、状態遷移プログラムのソースコードである状態遷移コードへと変換し、動作コード30として状態遷移コードを取得してもよい。
変形例2では、担当者は、入出力装置14を介して検査条件取得部16に直接、目標到達箇所を示すノード又はエッジに関する情報を、目標到達箇所情報として入力する。また、目標到達箇所情報の入力方法は、これに限らず、入出力装置14を介してディスプレイに表示された状態遷移図の中のノード又はエッジを視覚的に指定して入力する方法であってもよい。
図3のステップS101において状態遷移コードが取得された場合、図3のステップS102において、検査条件取得部16は、目標到達箇所を示すノード又はエッジに関する情報を検査条件31として、入出力装置14を介して外部装置から取得してもよい。そして、図3のステップS104において、検査条件変換部17は、検査条件31に基づき動作コード30の中から目標到達箇所を示すノード又はエッジに対応するコードの行番号を抽出し、検査用コードの論理式33を生成してもよい。そして、図3のステップS105において、動作コード30の中の目標到達箇所を示すノード又はエッジに対応するコードの行番号へ到達したときに満たされる目標到達条件式32を生成してもよい。<
As a
In the second modification, the person in charge directly inputs the information regarding the node or edge indicating the target arrival location to the inspection
When the state transition code is acquired in step S101 of FIG. 3, in step S102 of FIG. 3, the inspection
実施の形態2.
本実施の形態について、図8から図11を用いて説明する。
本実施の形態では、検査条件31に複数の目標到達箇所とそれら複数の目標到達箇所の到達順序とが含まれる例を説明する。
本実施の形態では、主に実施の形態1との差異を説明する。
なお、以下で説明していない事項は、実施の形態1と同様である。
The present embodiment will be described with reference to FIGS. 8 to 11.
In the present embodiment, an example will be described in which the inspection condition 31 includes a plurality of target arrival points and the arrival order of the plurality of target arrival points.
In this embodiment, the difference from the first embodiment will be mainly described.
The matters not explained below are the same as those in the first embodiment.
***構成の説明***
本実施の形態に係る動作確認支援装置10のハードウェア構成は、図1に示した実施の形態1の構成と同一であるため、その説明を省略する。
本実施の形態に係る検査条件変換部17は、実施の形態1と同様に目標到達条件式32と検査用コードとを生成した後、検査用コードと検査条件31とを基に、条件付き検査用コードを生成する。
そして、検査条件変換部17は、条件付き検査用コードを解析部18のSATソルバが解析可能な論理式に変換して条件付き検査用コードの論理式を生成する。
したがって、検査条件変換部17の出力は、目標到達条件式32と条件付き検査用コードの論理式となる。*** Explanation of configuration ***
Since the hardware configuration of the operation
The inspection
Then, the inspection
Therefore, the output of the inspection
***動作の説明***
まず、図8のフローチャートを参照して、本実施の形態に係る動作確認支援装置10の処理動作の例を説明する。なお、実施の形態1と同一の動作には同一番号を付してその説明を省略する。
ステップS101が完了した後、ステップS202において、検査条件取得部16は、検査条件31として、動作コード30の目標到達箇所情報を、入出力装置14を介して外部装置から取得する。そして、処理はステップS203へ進む。
検査条件取得部16が取得した検査条件31には、複数の目標到達箇所とそれら複数の目標到達箇所の到達順序(以下、目標到達順序という)とが含まれる。*** Explanation of operation ***
First, an example of the processing operation of the operation
After the completion of step S101, in step S202, the inspection
The inspection condition 31 acquired by the inspection
次に、ステップS203において、検査条件変換部17は、ステップS202の処理において検査条件取得部16が取得した検査条件31を基に、検査条件31に含まれる複数の目標到達箇所と同数の複数の目標到達箇所変数を定義する。そして、処理はステップS204へ進む。
Next, in step S203, the inspection
次に、ステップS204において、検査条件変換部17は、ステップS202の処理において検査条件取得部16が取得した検査条件31を基に、複数の目標到達箇所変数を用いた到達判定に用いるコードを動作コード30に追加した検査用コードを生成する。そして、処理はステップS205へ進む。
動作コード30には、複数の目標到達箇所の各々の行へ到達時に必ず実行される行に、複数の目標到達箇所変数を用いた到達判定に用いるコードが追加される。つまり、検査用コードは、動作コード30に、複数の目標到達箇所の各々の行の前後の行のうちどちらか一方に、各々の目標到達箇所変数の演算式で示される到達判定に用いるコードを挿入したものとなる。Next, in step S204, the inspection
In the operation code 30, a code used for arrival determination using a plurality of target arrival point variables is added to a line that is always executed when each line of a plurality of target arrival points is reached. That is, the inspection code includes the code used for the arrival determination indicated by the calculation formula of each target arrival point variable in one of the lines before and after each line of the plurality of target arrival points in the operation code 30. It will be the one that was inserted.
次に、ステップS205において、検査条件変換部17は、ステップS202の処理において検査条件取得部16が取得した検査条件31を基に、ステップS203の処理において定義した複数の目標到達箇所変数を用いて目標到達順序条件式を生成する。そして、処理はステップS206へ進む。
目標到達順序条件式は、目標到達順序の通りに複数の目標到達箇所の各々へ到達して、到達判定に用いるコードが実行された場合の目標到達箇所変数が満たす条件を、目標到達箇所変数又は目標到達箇所変数の否定を用いた論理積で記述した式である。なお、目標到達順序条件式の数は、複数の目標到達箇所の数と同数である。Next, in step S205, the inspection
The target arrival order conditional expression is a target arrival point variable or a condition that the target arrival point variable satisfies when the code used for the arrival determination is executed by reaching each of a plurality of target arrival points according to the target arrival order. It is an expression described by logical product using the denial of the target arrival point variable. The number of target arrival order conditional expressions is the same as the number of a plurality of target arrival points.
次に、ステップS206において、検査条件変換部17は、検査用コードに目標到達順序条件式を追加した条件付き検査用コードを生成する。そして、検査条件変換部17は、条件付き検査用コードを解析部18のSATソルバが解析可能な論理式に変換して条件付き検査用コードの論理式を生成する。そして、処理はステップS207へ進む。
検査条件変換部17が生成する条件付き検査用コードは、検査用コードの中の目標到達箇所変数の演算式で示される到達判定に用いるコードを挿入した各々行の後の行に、各々の目標到達順序条件式を挿入したものとなる。Next, in step S206, the inspection
The conditional inspection code generated by the inspection
次に、ステップS207において、検査条件変換部17は、ステップS205の処理において生成した目標到達順序条件式を用いて目標到達条件式32を生成する。そして、処理はステップS208へ進む。
検査条件変換部17が生成する目標到達条件式32は、条件付き検査用コードにおける目標到達箇所を目標到達順序の通りに到達し、全ての目標到達順序条件式が真となることを検査するための条件式である。そのため、目標到達条件式32は、目標到達順序条件式の論理積により構成される。
なお、ステップS207の処理とステップS206の処理とは依存関係がないため、被確認ソフトウェアは実行順序を入れ替えて実行したり並行して実行したりしてもよい。Next, in step S207, the inspection
The target achievement condition expression 32 generated by the inspection
Since there is no dependency between the process of step S207 and the process of step S206, the software to be confirmed may be executed by changing the execution order or in parallel.
次に、ステップS208において、解析部18は、SATソルバを用いて条件付き検査用コードの論理式と目標到達条件式32との論理積を解くことで、目標到達箇所へ到達させる入力値を探索する。
論理積の解である入力値が存在する場合、解析部18は、目標到達箇所へ到達させる入力値として生成値34を生成する。そして、処理はステップS107へ進む。
一方、論理積の解である入力値が存在しない場合、解析部18は、生成値34を生成せず、生成値34を生成できなかったことを入力値出力部19に通知する。そして、処理はステップS108へ進む。
ステップS107及びステップS108は、上述の通りであるため、説明を省略する。Next, in step S208, the
When there is an input value that is a solution of the logical product, the
On the other hand, when the input value which is the solution of the logical product does not exist, the
Since steps S107 and S108 are as described above, description thereof will be omitted.
図9に示す動作コード30の具体例を用いて、本実施の形態における動作確認支援装置10のより詳細な動作例を説明する。
具体的には、以下の例では、担当者が「STARTモードから開始して、RUNモード、STOPモード、SLEEPモード、ReSTARTモード、ENDモードの順序で動作モードが遷移する」という動作確認を行う。
この動作確認のため、担当者が動作コード30に5つの目標到達箇所と目標到達順序とを検査条件31として指定して入力することによって、動作確認支援装置10が5つの目標到達箇所へ目標到達順序の通りに到達させる生成値34を生成する例を説明する。
図9の左端の円は目標到達箇所を示す。また、図9の左端の円内に記述された1から5までの数字は目標到達順序を示す。
つまり、図9の例では、動作コード30に5つの目標到達箇所が指定されていることを示す。また、目標到達順序は、目標到達箇所1(10行目)、目標到達箇所2(21行目)、目標到達箇所3(33行目)、目標到達箇所4(56行目)、目標到達箇所5(79行目)の順であることを示す。A more detailed operation example of the operation
Specifically, in the following example, the person in charge confirms the operation that "starting from the START mode, the operation mode changes in the order of the RUN mode, the STOP mode, the SLEEP mode, the ReSTART mode, and the END mode".
In order to confirm this operation, the person in charge specifies and inputs five target arrival points and the target arrival order in the operation code 30 as inspection conditions 31, so that the operation
The leftmost circle in FIG. 9 indicates the target arrival point. The
That is, in the example of FIG. 9, it is shown that five target arrival points are designated in the operation code 30. The target arrival order is as follows: target arrival point 1 (10th line), target arrival point 2 (21st line), target arrival point 3 (33rd line), target arrival point 4 (56th line), target arrival point. It shows that the order is 5 (79th line).
図8のステップS101において、プログラム情報取得部15は、図9に示す動作コード30を取得する。そして、処理はステップS202へ進む。
なお、本例では動作コード30は1つの関数mainを記述した1ファイルだけだが、これに限らず、複数の関数又は複数のファイルの集合であってもよい。In step S101 of FIG. 8, the program
In this example, the operation code 30 is only one file in which one function main is described, but the operation code 30 is not limited to this, and may be a plurality of functions or a set of a plurality of files.
図8のステップS202において、検査条件取得部16は、動作コード30における目標到達箇所情報を検査条件31として取得する。そして、処理はステップS203へ進む。
検査条件取得部16が取得した検査条件31には、複数の目標到達箇所と複数の目標到達箇所の到達順序である目標到達順序とが含まれる。
本例の動作確認の目標は、以下の(1)から(6)で示される。
(1)被確認ソフトウェアの内部状態である動作モードがRUNモードに遷移する。
(2)動作モードがSTOPモードに遷移する。
(3)動作モードがSLEEPモードに遷移する。
(4)動作モードがReSTARTモードに遷移する。
(5)動作モードがENDモードに遷移する。
(6)動作モードが、STARTモードから開始して、RUNモード、STOPモード、SLEEPモード、ReSTARTモード、ENDモードの順序で遷移する。
そのため、検査条件31となる複数の目標到達箇所は、(1)から(5)の各々の被確認ソフトウェアの内部状態の遷移に相当する、動作コード30の10行目、21行目、33行目、56行目、79行目となる。
また、検査条件31となる目標到達順序は、(6)の被確認ソフトウェアの内部状態の遷移順序に相当する、動作コード30の10行目から順に、21行目、33行目、56行目、79行目となる。
したがって、本例では、担当者は、入出力装置14を介して検査条件取得部16に直接、「動作コード30の10行目、21行目、33行目、56行目、79行目」という複数の目標到達箇所を示す情報を、目標到達箇所情報として入力する。また、担当者は、「最初に10行目、続いて21行目、33行目、56行目、79行目の順」という目標到達順序を示す情報を、目標到達箇所情報として入力する。
ただし、目標到達箇所情報の入力方法はこれに限らず、図9で示すように、入出力装置14を介してディスプレイに表示された動作コード30に直接、複数の目標到達箇所と目標到達順序とを視覚的にマーキングする等、動作コード30の中の特定箇所と順序とを指定して入力する方法であればよい。In step S202 of FIG. 8, the inspection
The inspection condition 31 acquired by the inspection
The goals of the operation check of this example are shown in (1) to (6) below.
(1) The operation mode, which is the internal state of the software to be confirmed, shifts to the RUN mode.
(2) The operation mode shifts to the STOP mode.
(3) The operation mode shifts to the SLEEP mode.
(4) The operation mode shifts to the Reset mode.
(5) The operation mode shifts to the END mode.
(6) The operation mode starts from the START mode and transitions in the order of the RUN mode, the STOP mode, the SLEEP mode, the ReSTART mode, and the END mode.
Therefore, the plurality of target arrival points that satisfy the inspection condition 31 correspond to the transition of the internal state of the confirmed software in each of (1) to (5), that is, the 10th line, the 21st line, and the 33rd line of the operation code 30. The eyes, the 56th line, and the 79th line.
The target arrival order, which is the inspection condition 31, is the 21st line, the 33rd line, and the 56th line in order from the 10th line of the operation code 30, which corresponds to the transition order of the internal state of the confirmed software in (6). , 79th line.
Therefore, in this example, the person in charge directly informs the inspection
However, the method of inputting the target arrival point information is not limited to this, and as shown in FIG. 9, a plurality of target arrival points and the target arrival order are directly displayed on the operation code 30 displayed on the display via the input /
図8のステップS203において、検査条件変換部17は、「動作コード30の10行目、21行目、33行目、56行目、79行目」という検査条件31を基に、これら5つの目標到達箇所に対応する5つの目標到達箇所変数を定義する。具体的には、検査条件変換部17は、目標到達箇所変数としてreach1、reach2、reach3、reach4、reach5を定義する。そして、処理はステップS204へ進む。
In step S203 of FIG. 8, the inspection
図8のステップS204において、検査条件変換部17は、目標到達箇所が「動作コード30の10行目、21行目、33行目、56行目、79行目」という検査条件31を基に、各々の目標到達箇所変数の演算式で示される到達判定に用いるコードを動作コード30に挿入することで検査用コードを生成する。
具体的には、検査条件変換部17は、11行目に「reach1++;」、22行目に「reach2++;」、34行目に「reach3++;」、57行目に「reach4++;」、80行目に「reach5++;」を動作コード30挿入して検査用コードを生成する。そして、処理はステップS205へ進む。In step S204 of FIG. 8, the inspection
Specifically, the inspection
図8のステップS205において、検査条件変換部17は、検査条件31として取得した目標到達順序に基づき、図10で示すような5つの目標到達順序条件式を定義する。具体的には、検査条件変換部17は、目標到達順序条件式として、condition1、condition2、condition3、condition4、condition5を定義する。そして、処理はステップS206へ進む。
本例の目標到達順序条件式は、動作コード30の5つの目標到達箇所を目標到達順序の通りに到達して、到達判定に用いるコードが実行された場合の5つの目標到達箇所変数が満たす条件を記述した式である。また、目標到達順序条件式は、目標到達箇所変数又は目標到達箇所変数の否定を用いた論理積で記述した式である。In step S205 of FIG. 8, the inspection
The target arrival order conditional expression of this example is a condition satisfied by the five target arrival point variables when the five target arrival points of the operation code 30 are reached according to the target arrival order and the code used for the arrival determination is executed. Is an expression that describes. Further, the target arrival order conditional expression is an expression described by a logical product using the target arrival point variable or the negation of the target arrival point variable.
図8のステップS206において、検査条件変換部17は、図11に示すように、検査用コードに目標到達順序条件式を追加した条件付き検査用コードを生成する。
具体的には、検査条件変換部17は、12行目にcondition1、25行目にcondition2、39行目にcondition3、64行目にcondition4、89行目にcondition5を挿入し、条件付き検査用コードを生成する。さらに、検査条件変換部17は、条件付き検査用コードを解析部18のSATソルバが解析可能な論理式に変換して条件付き検査用コードの論理式を生成する。そして、処理はステップS207へ進む。In step S206 of FIG. 8, as shown in FIG. 11, the inspection
Specifically, the inspection
図8のステップS207において、検査条件変換部17は、目標到達順序条件式を用いて条件付き検査用コードにおける5つの目標到達箇所へ目標到達順序の通りに到達したときに満たされる条件を示す、目標到達条件式32を生成する。そして、処理はステップS208へ進む。
図10で示すように、本例の目標到達条件式32は、condition1 && condition2 && condtion3 && condtion4 && condtion5である。In step S207 of FIG. 8, the inspection
As shown in FIG. 10, the target achievement condition expression 32 of this example is condition1 && condition2 && condition3 && condition4 && condition5.
図8のステップS208において、解析部18は、SATソルバを用いて条件付き検査用コードの論理式と目標到達条件式32との論理積を解くことで、目標到達順序通りに5つの目標到達箇所へ到達させる入力値を探索する。そして、解析部18は、目標到達順序通りに5つの目標到達箇所へ到達させる入力値として、生成値34を生成する。
なお、本実施の形態では、生成される生成値34は、1周期分のみとは限らず、複数周期分の入力値列として生成されてもよい。
本例では、条件付き検査用コードの論理式と目標到達条件式32との論理積を真にする解である目標到達順序通りに5つの目標到達箇所へ到達させる入力値が存在する。したがって、目標到達順序通りに5つの目標到達箇所へ到達させる入力値として生成値34が生成される。そして、処理はステップS107へ進む。In step S208 of FIG. 8, the
In the present embodiment, the generated value 34 to be generated is not limited to one cycle, and may be generated as an input value string for a plurality of cycles.
In this example, there are input values for reaching five target arrival points in the target arrival order, which is a solution that makes the logical product of the logical expression of the conditional inspection code and the target arrival condition expression 32 true. Therefore, the generated value 34 is generated as an input value for reaching the five target arrival points in the target arrival order. Then, the process proceeds to step S107.
図8のステップS107において、入力値出力部19は、ステップS208の処理で生成された生成値34を出力する。
In step S107 of FIG. 8, the input
以上のように生成された生成値34を各々の周期で被確認ソフトウェアへ入力して実行することで、被確認ソフトウェアの実行処理が目標到達箇所へ目標到達順序の通りに到達させることができる。具体的には、被確認ソフトウェアの実行処理は、「動作コード30の10行目、21行目、33行目、56行目、79行目」へ、最初に10行目、続いて21行目、33行目、56行目、79行目の順の通りに到達することができる。
その結果、「STARTモードから開始して、RUNモード、STOPモード、SLEEPモード、ReSTARTモード、ENDモードの順序で動作モードが遷移する」という動作確認が可能となる。By inputting the generated value 34 generated as described above into the confirmed software at each cycle and executing the execution, the execution process of the confirmed software can reach the target arrival point in the target arrival order. Specifically, the execution process of the confirmed software goes to "10th line, 21st line, 33rd line, 56th line, 79th line of the operation code 30", first the 10th line, and then 21 lines. The eyes, the 33rd line, the 56th line, and the 79th line can be reached in this order.
As a result, it is possible to confirm the operation that "starting from the START mode, the operation mode changes in the order of the RUN mode, the STOP mode, the SLEEP mode, the Rest ART mode, and the END mode".
***実施の形態の効果の説明***
以上のように、本実施の形態では、担当者が被確認ソフトウェアの内部状態に関する仕様情報を参照せずに、動作コード30の中の複数の目標到達箇所と、それら複数の目標到達箇所の目標到達順序とを指定して入力する。そして、担当者がこのように指定するだけで、動作確認の目標となる複数の内部状態とそれらの遷移順序を検査条件31として入力することができる。そして、動作確認支援装置10は、この検査条件31を用いて、取得された遷移順序の通りに複数の内部状態を遷移させる入力値として生成値34を生成することができる。
よって、上記例では、内部状態を複数の状態(10行目、21行目、33行目、56行目、79行目)へ特定の順序(最初に10行目、続いて21行目、33行目、56行目、79行目の順)で遷移させる動作確認において、内部状態値を決定する作業が不要となる。したがって、動作確認に要する工数を削減することができる。*** Explanation of the effect of the embodiment ***
As described above, in the present embodiment, the person in charge does not refer to the specification information regarding the internal state of the software to be confirmed, the plurality of target arrival points in the operation code 30, and the targets of the plurality of target arrival points. Enter by specifying the arrival order. Then, only by the person in charge specifying in this way, it is possible to input a plurality of internal states that are targets for operation confirmation and their transition order as the inspection condition 31. Then, the operation
Therefore, in the above example, the internal states are changed to a plurality of states (10th line, 21st line, 33rd line, 56th line, 79th line) in a specific order (first 10th line, then 21st line, and so on. In the operation check of transitioning in the order of the 33rd line, the 56th line, and the 79th line), the work of determining the internal state value becomes unnecessary. Therefore, the man-hours required for operation check can be reduced.
また、検査条件変換部17が、検査条件31を基に目標到達条件式32を生成する。
よって、解析部18の用いるSATソルバが解析可能な論理式を担当者が人手で作成する必要が無くなる。したがって、動作確認に要する工数の削減に加えて、数学的知識を持っていなくても担当者が動作確認することも可能となる。Further, the inspection
Therefore, it is not necessary for the person in charge to manually create a logical expression that can be analyzed by the SAT solver used by the
***他の構成***
<変形例1>
実施の形態2では、プログラム情報取得部15は、動作コード30を取得する例を説明した。しかし、プログラム情報取得部15は、動作プログラムとしてノード又はブランチを含むASTで作成されたASTプログラムを取得し、ASTプログラムのソースコードであるASTコードへと変換し、動作コード30としてASTコードを取得してもよい。
変形例1では、担当者は、入出力装置14を介して検査条件取得部16に直接、複数の目標到達箇所を示す、ノード、ブランチ、又はノードとブランチとの組み合わせに関する情報を、目標到達箇所情報として入力する。また、担当者は、入出力装置14を介して検査条件取得部16に直接、ノード又はブランチで示される複数の目標到達箇所の目標到達順序を、目標到達箇所情報として入力する。
なお、目標到達箇所情報の入力方法は、これに限らず、入出力装置14を介してディスプレイに表示されたASTに含まれるノード又はブランチを視覚的に指定して入力する方法であってもよい。また、目標到達箇所情報の入力方法は、入出力装置14により表示されたASTに含まれるノード又はブランチを順に指定して目標到達順序を入力する方法であってもよい。
図8のステップS101においてASTコードが取得された場合、図8のステップS202において、検査条件取得部16は、目標到達箇所を示す、ノード、ブランチ、又はノードとブランチとの組み合わせに関する情報を検査条件31として、入出力装置14を介して外部装置から取得してもよい。そして、図8のステップS204において、検査条件変換部17は、検査条件31に基づき動作コード30の中から目標到達箇所を示すノード又はブランチに対応するコードの行番号を抽出し、検査用コードを生成してもよい。そして、図8のステップS205において、検査条件変換部17は、検査条件31に基づき複数の目標到達箇所を示すノード又はブランチに対応する各々のコードの行番号へ到達する目標到達順序を抽出し、目標到達順序条件式を生成してもよい。そして、図8のステップS207において、動作コード30の中の複数の目標到達箇所を示すノード又はブランチに対応するコードの行番号へ、目標到達順序の通りに到達したときに満たされる目標到達条件式32を生成してもよい。*** Other configurations ***
<Modification example 1>
In the second embodiment, the program
In the first modification, the person in charge directly informs the inspection
The method of inputting the target arrival location information is not limited to this, and a method of visually designating and inputting the node or branch included in the AST displayed on the display via the input /
When the AST code is acquired in step S101 of FIG. 8, in step S202 of FIG. 8, the inspection
<変形例2>
変形例2として、プログラム情報取得部15は、動作プログラムとしてノード又はエッジを含む状態遷移図で作成された状態遷移プログラムを取得し、状態遷移プログラムのソースコードである状態遷移コードへと変換し、動作コード30として状態遷移コードを取得してもよい。
変形例2では、担当者は、入出力装置14を介して検査条件取得部16に直接、複数の目標到達箇所を示す、ノード、エッジ、又はノードとエッジとの組み合わせに関する情報を、目標到達箇所情報として入力する。また、担当者は、入出力装置14を介して検査条件取得部16に直接、ノード又はエッジで示される複数の目標到達箇所の目標到達順序を、目標到達箇所情報として入力する。
なお、目標到達箇所情報の入力方法は、これに限らず、入出力装置14を介してディスプレイに表示された状態遷移図に含まれるノード又はエッジを視覚的に指定して入力する方法であってもよい。また、目標到達箇所情報の入力方法は、入出力装置14により表示された状態遷移図に含まれるノード又はエッジを順に指定して目標到達順序を入力する方法であってもよい。
図8のステップS101において状態遷移コードが取得された場合、図8のステップS202において、検査条件取得部16は、目標到達箇所を示す、ノード、エッジ、又はノードとエッジとの組み合わせに関する情報を検査条件31として、入出力装置14を介して外部装置から取得してもよい。そして、図8のステップS204において、検査条件変換部17は、検査条件31に基づき動作コード30の中から目標到達箇所を示すノード又はエッジに対応するコードの行番号を抽出し、検査用コードを生成してもよい。そして、図8のステップS205において、検査条件変換部17は、検査条件31に基づき複数の目標到達箇所を示すノード又はエッジに対応する各々のコードの行番号へ到達する目標到達順序を抽出し、目標到達順序条件式を生成してもよい。そして、図8のステップS207において、動作コード30の中の複数の目標到達箇所を示すノード又はエッジに対応するコードの行番号へ、目標到達順序の通りに到達したときに満たされる目標到達条件式32を生成してもよい。<
As a
In the second modification, the person in charge directly informs the inspection
The method of inputting the target arrival location information is not limited to this, and is a method of visually designating and inputting the node or edge included in the state transition diagram displayed on the display via the input /
When the state transition code is acquired in step S101 of FIG. 8, in step S202 of FIG. 8, the inspection
実施の形態3.
本実施の形態について、図12から図14を用いて説明する。
本実施の形態では、被確認ソフトウェアの実行処理が目標到達箇所へ到達し、かつ、被確認ソフトウェアから出力される出力値が特定の値となるような入力値である生成値34を、動作確認支援装置10が生成する例を説明する。
本実施の形態では、主に実施の形態1との差異を説明する。
なお、以下で説明していない事項は、実施の形態1と同様である。
The present embodiment will be described with reference to FIGS. 12 to 14.
In the present embodiment, the operation of the generated value 34, which is an input value such that the execution process of the confirmed software reaches the target arrival point and the output value output from the confirmed software becomes a specific value, is confirmed. An example generated by the
In this embodiment, the difference from the first embodiment will be mainly described.
The matters not explained below are the same as those in the first embodiment.
***構成の説明***
図12を参照して、本実施の形態に係る動作確認支援装置10の機能構成を説明する。なお、図2に示した実施の形態1と同一構成部分には同一番号を付してその説明を省略する。
本実施の形態では、動作確認支援装置10は、新たに入出力条件取得部20を備える。
入出力条件取得部20は、入出力条件35として、プログラム情報取得部15が取得した動作コード30に含まれる入力変数で示される入力値及び出力変数で示される出力値の少なくともいずれか一方に関する条件を、入出力装置14を介して外部装置から取得する。
入出力条件35は、被確認ソフトウェアの入出力値の条件を定めた条件であり、具体的には値域又は特定の値である。
なお、動作確認支援装置10の動作を実現するプログラムは、実施の形態1の動作確認支援装置10の動作を実現するプログラムに、入出力条件取得部20の機能を実現する入出力変数条件入力手順を追加したものである。*** Explanation of configuration ***
The functional configuration of the operation
In the present embodiment, the operation
The input / output
The input / output condition 35 is a condition that defines the input / output value condition of the software to be confirmed, and is specifically a range or a specific value.
The program that realizes the operation of the operation
***動作の説明***
図13から図15を参照して、本実施の形態に係る動作確認支援装置10の動作例を説明する。*** Explanation of operation ***
An operation example of the operation
まず、図13のフローチャートを参照して、本実施の形態に係る動作確認支援装置10の処理動作の例を示す。
なお、実施の形態1と同一の動作には同一番号を付してその説明を省略する。First, with reference to the flowchart of FIG. 13, an example of the processing operation of the operation
The same operations as those in the first embodiment are designated by the same numbers, and the description thereof will be omitted.
ステップS301において、プログラム情報取得部15は、動作コード30を取得する。また、プログラム情報取得部15が動作コード30を取得すると、プログラム情報取得部15が動作コード30を解析し、被確認ソフトウェアへ入力される入力値又は被確認ソフトウェアから出力される出力値である入出力値が代入される入出力変数を抽出する。そして、処理はステップS102へ進む。
In step S301, the program
ステップS102は実施の形態1で説明したものと同じであるため、説明を省略する。 Since step S102 is the same as that described in the first embodiment, the description thereof will be omitted.
ステップS102の処理が完了後、ステップS302において、入出力条件取得部20は、被確認ソフトウェアの入出力値の条件を定めた入出力条件35を取得する。
この入出力条件35は、値域又は値であり、ステップS301の処理で抽出した入出力変数が満たすべき条件を示す。そして、処理はステップS303へ進む。After the processing of step S102 is completed, in step S302, the input / output
The input / output condition 35 is a range or a value, and indicates a condition to be satisfied by the input / output variable extracted in the process of step S301. Then, the process proceeds to step S303.
ステップS303において、検査条件変換部17は、ステップS302の処理で取得された入出力条件35を基に、入出力変数の値を検査する式として、入力変数検査式及び出力変数検査式の少なくともいずれか一方を生成する。そして、検査条件変換部17は、入出力変数の値を検査する式を動作コード30に挿入して追加する。そして、処理はステップS103へ進む。
動作コード30に入出力変数の値を検査する式が挿入されたコードは、ステップS103以降の処理で動作コード30として用いられる。
ステップS103以降は、上述の通りであるため、説明を省略する。In step S303, the inspection
The code in which the expression for checking the value of the input / output variable is inserted in the operation code 30 is used as the operation code 30 in the processes after step S103.
Since steps S103 and subsequent steps are as described above, the description thereof will be omitted.
このように、本実施の形態では、被確認ソフトウェアの入出力値に関する条件を、担当者が使用環境を想定して入力することで、想定した使用環境における被確認ソフトウェアの動作確認をすることができる。 As described above, in the present embodiment, the person in charge inputs the conditions related to the input / output values of the confirmed software assuming the usage environment, so that the operation of the confirmed software can be confirmed in the assumed usage environment. it can.
図14に示す動作コード30の具体例を用いて、本実施の形態における動作確認支援装置10のより詳細な動作例を説明する。
具体的には、以下の例では、図14に示す動作コード30で生成される被確認ソフトウェアの、RUNモードにおける動作確認のために、以下の(1)及び(2)の条件を満たす生成値34を生成する動作を説明する。
(1)被確認ソフトウェアの内部状態がRUNモードへ遷移する。
(2)被確認ソフトウェアの出力値を代入する出力変数Demo_Oの値が300となる。
本例の動作コード30は、被確認ソフトウェアの内部状態である動作モードを表すモード変数modeと、入力値を代入する2つの入力変数Demo_I_x及びDemo_I_yと、出力値を代入する出力変数Demo_Oとを有する。A more detailed operation example of the operation
Specifically, in the following example, in order to confirm the operation of the confirmed software generated by the operation code 30 shown in FIG. 14 in the RUN mode, the generated values satisfying the following conditions (1) and (2). The operation of generating 34 will be described.
(1) The internal state of the confirmed software transitions to the RUN mode.
(2) The value of the output variable Demo_O to which the output value of the confirmed software is substituted is 300.
The operation code 30 of this example has a mode variable mode representing the operation mode which is the internal state of the software to be confirmed, two input variables Demo_I_x and Demo_I_y for substituting the input value, and an output variable Demo_O for substituting the output value. ..
図13のステップS301において、プログラム情報取得部15は、図14に示す動作コード30を取得する。その後、プログラム情報取得部15は、取得した動作コード30を解析し、入出力変数を抽出する。そして、処理はステップS102へ進む。
本例では、入力変数Demo_I_x及びDemo_I_yと、出力変数Demo_Oとがプログラム情報取得部15により抽出される。In step S301 of FIG. 13, the program
In this example, the input variables Demo_I_x and Demo_I_y and the output variable Demo_O are extracted by the program
図13のステップS102において、検査条件取得部16は、検査条件31として、動作コード30における目標到達箇所情報を取得する。そして、ステップS302へ進む。
本例において、動作コード30における目標到達箇所は、「動作モードがRUNモードに遷移した被確認ソフトウェアの内部状態」に相当する図14に示す動作コード30の19行目である。In step S102 of FIG. 13, the inspection
In this example, the target arrival point in the operation code 30 is the 19th line of the operation code 30 shown in FIG. 14, which corresponds to the “internal state of the confirmed software whose operation mode has changed to the RUN mode”.
図13のステップS302において、入出力条件取得部20は、被確認ソフトウェアの入出力値の条件を定めた入出力条件35を取得する。そして、処理はステップS303へ進む。
本例における動作確認では、「出力変数の値が300となる」という条件を満たすため、この入出力条件35は「Demo_O=300」という出力変数の条件となる。In step S302 of FIG. 13, the input / output
In the operation check in this example, since the condition that "the value of the output variable is 300" is satisfied, this input / output condition 35 is the condition of the output variable "Demo_O = 300".
図13のステップS303において、検査条件変換部17は、動作コード30に、S302の処理で取得した入出力条件35を基に、出力変数の値を検査する式として、出力変数検査式を生成する。そして、検査条件変換部17は、生成した出力変数検査式を動作コード30に挿入する。具体例としては、出力変数検査式をassert文として挿入する。そして、処理はステップS103へ進む。
In step S303 of FIG. 13, the inspection
図13のステップS103において、検査条件変換部17は、「動作コード30の19行目」という1つの検査条件31を基に、1つの目標到達箇所変数reachを定義する。そして、処理はステップS104へ進む。
In step S103 of FIG. 13, the inspection
図13のステップS104において、検査条件変換部17は、「動作コード30の19行目」という検査条件31を基に、20行目に目標到達箇所変数の演算式(reach++;)のコードを挿入して追加した、検査用コードを生成する。
さらに、検査条件変換部17は、検査用コードをSATソルバが解析可能な論理式に変換して、検査用コードの論理式33を生成する。そして、処理はステップS105へ進む。In step S104 of FIG. 13, the inspection
Further, the inspection
図13のステップS105において、検査条件変換部17は、検査条件31を基に定義した目標到達箇所変数reachを基に、目標到達箇所へ到達したときに満たされる目標到達条件式32(reach>0)を生成する。そして、処理はステップS106へ進む。
In step S105 of FIG. 13, the inspection
図13のステップS106において、解析部18は、SATソルバを用いて検査用コードの論理式33と目標到達条件式32との論理積を解くことで入出力条件35を満たし、かつ、目標到達箇所へ到達させる入力値を探索する。そして、解析部18は、入出力条件35を満たし、かつ、目標到達箇所へ到達させる入力値として生成値34を生成する。具体的には、解析部18は、目標到達箇所である動作コード30の19行目に到達し、かつ、出力変数Demo_Oの値が300となる、入力変数Demo_I_x及びDemo_I_yへ代入される入力値を探索する。そして、解析部18は、入出力条件35を満たし、かつ、目標到達箇所へ到達させる入力値として生成値34を生成する。
本例では、reach++;が挿入された検査用コードの20行目に到達し、目標到達条件式32である「reach>0」を真にする解である入力値が存在する。したがって、「Demo_O=300」という入出力条件35を満たし、かつ、動作コード30の19行目へ到達させる入力値として生成値34が生成される。そのため、処理はステップS107へ進む。In step S106 of FIG. 13, the
In this example, there is an input value that reaches the 20th line of the inspection code in which reach ++; is inserted and is a solution that makes "reach>0", which is the target achievement conditional expression 32, true. Therefore, the generated value 34 is generated as an input value that satisfies the input / output condition 35 of "Demo_O = 300" and reaches the 19th line of the operation code 30. Therefore, the process proceeds to step S107.
図13のステップS107において、入力値出力部19は、ステップS106の処理で生成された生成値34を出力する。
図15では、本例で生成される生成値34及び目標到達箇所へ到達するまでの被確認ソフトウェアの実行順序を示す。In step S107 of FIG. 13, the input
FIG. 15 shows the generated value 34 generated in this example and the execution order of the confirmed software until the target arrival point is reached.
図15の右下の表は、被確認ソフトウェアへの入力として、3回の被確認ソフトウェアの実行周期の各々の周期に入力変数Demo_I_x及びDemo_I_yへ代入される入力値を示す。
具体的には、1周期目に入力変数Demo_I_x及びDemo_I_yへ代入される入力値は、10と3である。また、2周期目に入力変数Demo_I_x及びDemo_I_yへ代入される入力値も、10と3である。また、3周期目に入力変数Demo_I_x及びDemo_I_yへ代入される入力値も、10と3である。The lower right table of FIG. 15 shows the input values assigned to the input variables Demo_I_x and Demo_I_y in each of the three execution cycles of the confirmed software as inputs to the confirmed software.
Specifically, the input values assigned to the input variables Demo_I_x and Demo_I_y in the first cycle are 10 and 3. The input values assigned to the input variables Demo_I_x and Demo_I_y in the second cycle are also 10 and 3. The input values assigned to the input variables Demo_I_x and Demo_I_y in the third cycle are also 10 and 3.
図15の右上の表は、入力変数Demo_I_x及びDemo_I_yへの入力値の代入前後の出力変数Demo_Oの値及びモード変数modeの値を示す。
具体的には、1周期目の開始時、出力変数Demo_Oは値をもたず、モード変数modeはSTARTである。入力変数Demo_I_x及びDemo_I_yへ10と3が代入されると、動作コード30の8行目及び9行目の処理が実行され、出力変数Demo_Oに100が、モード変数modeにRUNが代入される。そして、1周期目の終了時には出力変数Demo_Oは100となり、モード変数modeはRUNとなる。
また、2周期目の開始時、出力変数Demo_Oは100、モード変数modeはRUNである。入力変数Demo_I_x及びDemo_I_yへ10と3が代入されると、動作コード30の18行目及び19行目の処理が実行され、出力変数Demo_OにDemo_O+100が、モード変数modeにRUNが代入される。そして、1周期目の終了時には出力変数Demo_Oは200となり、モード変数modeはRUNとなる。
また、3周期目の開始時、出力変数Demo_Oは200、モード変数modeはRUNである。入力変数Demo_I_x及びDemo_I_yへ10と3が代入されると、動作コード30の18行目及び19行目の処理が実行され、出力変数Demo_OにDemo_O+100が、モード変数modeにRUNが代入される。そして、1周期目の終了時には出力変数Demo_Oは300となり、モード変数modeはRUNとなる。
したがって、3周期目の終了時点で被確認ソフトウェアの実行処理は本例の目標到達箇所を示す動作コード30の19行目に到達し、かつ、入出力条件35である「Demo_O=300」が満たされる。The table on the upper right of FIG. 15 shows the values of the output variable Demo_O and the value of the mode variable mode before and after the assignment of the input values to the input variables Demo_I_x and Demo_I_y.
Specifically, at the start of the first cycle, the output variable Demo_O has no value, and the mode variable mode is START. When 10 and 3 are assigned to the input variables Demo_I_x and Demo_I_y, the processing of the 8th and 9th lines of the operation code 30 is executed, 100 is assigned to the output variable Demo_O, and RUN is assigned to the mode variable mode. Then, at the end of the first cycle, the output variable Demo_O becomes 100, and the mode variable mode becomes RUN.
At the start of the second cycle, the output variable Demo_O is 100 and the mode variable mode is RUN. When 10 and 3 are assigned to the input variables Demo_I_x and Demo_I_y, the processing of the 18th and 19th lines of the operation code 30 is executed, Demo_O + 100 is assigned to the output variable Demo_O, and RUN is assigned to the mode variable mode. Then, at the end of the first cycle, the output variable Demo_O becomes 200, and the mode variable mode becomes RUN.
At the start of the third cycle, the output variable Demo_O is 200 and the mode variable mode is RUN. When 10 and 3 are assigned to the input variables Demo_I_x and Demo_I_y, the processing of the 18th and 19th lines of the operation code 30 is executed, Demo_O + 100 is assigned to the output variable Demo_O, and RUN is assigned to the mode variable mode. Then, at the end of the first cycle, the output variable Demo_O becomes 300, and the mode variable mode becomes RUN.
Therefore, at the end of the third cycle, the execution process of the confirmed software reaches the 19th line of the operation code 30 indicating the target arrival location of this example, and the input / output condition 35 “Demo_O = 300” is satisfied. Is done.
本例では、図7の右下の表で示されるように、入力変数Demo_I_x及びDemo_I_yへの入力値が、1周期目では10と3、2周期目でも10と3、3周期目でも10と3、という3周期分の入力値として生成値34が出力される。
このように、本実施の形態では、生成値34は、1周期分のみとは限らず、複数周期分の入力値列として生成されてもよい。In this example, as shown in the lower right table of FIG. 7, the input values to the input variables Demo_I_x and Demo_I_y are 10 and 3 in the first cycle, 10 and 3 in the second cycle, and 10 in the third cycle. The generated value 34 is output as an input value for three cycles of 3.
As described above, in the present embodiment, the generated value 34 is not limited to one cycle, and may be generated as an input value string for a plurality of cycles.
以上のように生成された生成値34を各々の周期で被確認ソフトウェアへ入力して実行することで、3周期目において、実行処理を目標到達箇所である動作コード30の19行目に到達させ、かつ、出力変数Demo_Oの値を300とすることができる。 By inputting the generated value 34 generated as described above into the confirmed software in each cycle and executing the execution, the execution process is made to reach the 19th line of the operation code 30 which is the target arrival point in the third cycle. Moreover, the value of the output variable Demo_O can be set to 300.
本例では、入出力条件取得部20が、出力変数Demo_O=300という出力値に関する条件を入出力条件35として取得した場合を説明した。しかし、それに限らず、入出力条件取得部20が、特定の入力値を入出力条件35として取得してもよく、また入出力値の値域を入出力条件35として取得してもよい。
In this example, the case where the input / output
***実施の形態の効果の説明***
以上のように、担当者が被確認ソフトウェアの入出力値に関する入出力条件35を入力することで、被確認ソフトウェアの使用環境において取りえない入出力値を生じさせる生成値34の生成を除外することができる。
これにより、担当者は被確認ソフトウェアの使用環境において想定されない不要な処理動作の実行を除外し、動作確認を実行することが可能となる。しがたって、動作確認に要する工数を削減することができる。*** Explanation of the effect of the embodiment ***
As described above, when the person in charge inputs the input / output condition 35 regarding the input / output value of the confirmed software, the generation of the generated value 34 that causes the input / output value that cannot be taken in the usage environment of the confirmed software is excluded. be able to.
As a result, the person in charge can exclude the execution of unnecessary processing operations that are not expected in the environment in which the software to be confirmed is used, and execute the operation confirmation. Therefore, the man-hours required for operation check can be reduced.
<変形例1>
実施の形態3では、プログラム情報取得部15は、動作コード30を取得する例を説明した。しかし、プログラム情報取得部15は、動作プログラムとしてノード又はブランチを含むAST(Abstract Syntax Tree)で作成されたASTプログラムを取得し、ASTプログラムのソースコードであるASTコードへと変換し、動作コード30としてASTコードを取得してもよい。
変形例1では、担当者は、入出力装置14を介して検査条件取得部16に直接、目標到達箇所を示すノード又はブランチに関する情報を、目標到達箇所情報として入力する。また、目標到達箇所情報の入力方法は、これに限らず、入出力装置14を介してディスプレイに表示されたASTに含まれるノード又はブランチを視覚的に指定して入力する方法であってもよい。
図13のステップS301においてASTコードが取得された場合、図13のステップS102において、検査条件取得部16は、目標到達箇所を示すノード又はブランチに関する情報を検査条件31として、入出力装置14を介して外部装置から取得してもよい。そして、図13のステップS104において、検査条件変換部17は、検査条件31に基づき動作コード30の中から目標到達箇所を示すノード又はブランチに対応するコードの行番号を抽出し、検査用コードの論理式33を生成してもよい。そして、図13のステップS105において、動作コード30の中の目標到達箇所を示すノード又はブランチに対応するコードの行番号へ到達したときに満たされる目標到達条件式32を生成してもよい。<Modification example 1>
In the third embodiment, the program
In the first modification, the person in charge directly inputs the information regarding the node or branch indicating the target arrival location to the inspection
When the AST code is acquired in step S301 of FIG. 13, in step S102 of FIG. 13, the inspection
<変形例2>
変形例2として、プログラム情報取得部15は、動作プログラムとしてノード又はエッジを含む状態遷移図で作成された状態遷移プログラムを取得し、状態遷移プログラムのソースコードである状態遷移コードへと変換し、動作コード30として状態遷移コードを取得してもよい。
変形例2では、担当者は、入出力装置14を介して検査条件取得部16に直接、目標到達箇所を示すノード又はエッジに関する情報を、目標到達箇所情報として入力する。また、目標到達箇所情報の入力方法は、これに限らず、入出力装置14を介してディスプレイに表示された状態遷移図に含まれるノード又はエッジを視覚的に指定して入力する方法であってもよい。
図13のステップS301において状態遷移コードが取得された場合、図13のステップS102において、検査条件取得部16は、目標到達箇所を示すノード又はエッジに関する情報を検査条件31として、入出力装置14を介して外部装置から取得してもよい。
そして、図13のステップS104において、検査条件変換部17は、検査条件31に基づき動作コード30の中から目標到達箇所を示すノード又はエッジに対応するコードの行番号を抽出し、検査用コードの論理式33を生成してもよい。そして、図13のステップS105において、動作コード30の中の目標到達箇所を示すノード又はエッジに対応するコードの行番号へ到達したときに満たされる目標到達条件式32を生成してもよい。<
As a
In the second modification, the person in charge directly inputs the information regarding the node or edge indicating the target arrival location to the inspection
When the state transition code is acquired in step S301 of FIG. 13, in step S102 of FIG. 13, the inspection
Then, in step S104 of FIG. 13, the inspection
10 動作確認支援装置、11 プロセッサ、12 メモリ、13 通信装置、14 入出力装置、15 プログラム情報取得部、16 検査条件取得部、17 検査条件変換部、18 解析部、19 入力値出力部、20 入出力条件取得部、30 動作コード、31 検査条件、32 目標到達条件式、33 検査用コードの論理式、34 生成値、35 入出力条件。 10 Operation check support device, 11 processor, 12 memory, 13 communication device, 14 input / output device, 15 program information acquisition unit, 16 inspection condition acquisition unit, 17 inspection condition conversion unit, 18 analysis unit, 19 input value output unit, 20 Input / output condition acquisition unit, 30 operation code, 31 inspection condition, 32 target achievement condition expression, 33 inspection code logical expression, 34 generated value, 35 input / output condition.
Claims (10)
前記動作コードの目標到達箇所を含む目標到達箇所に関する情報を検査条件として取得する検査条件取得部と、
前記検査条件取得部が取得した前記検査条件に含まれる目標到達箇所へ到達したことを判定する判定式を生成する検査条件変換部と、
前記検査条件変換部が生成した前記判定式を用いて前記目標到達箇所へ到達させる前記入力値として生成値を生成する解析部とを備え、
前記検査条件変換部は、
前記判定式として前記目標到達箇所への到達判定に用いる論理式を生成し、前記目標到達箇所への到達判定に用いるコードを前記動作コードの前記目標到達箇所に追加した検査用コードを作成し、前記検査用コードを論理式へ変換して前記検査用コードの論理式を生成し、
前記解析部は、
前記判定式と前記検査用コードの論理式との論理積を充足する前記入力値を探索して、前記目標到達箇所へ到達させる前記入力値として生成値を生成する動作確認支援装置。 A program information acquisition unit that acquires the operation code, which is the source code of the operation program that operates by reading the input value,
An inspection condition acquisition unit that acquires information about a target arrival point including the target arrival point of the operation code as an inspection condition, and an inspection condition acquisition unit.
An inspection condition conversion unit that generates a determination formula for determining that the target reached point included in the inspection condition acquired by the inspection condition acquisition unit has been reached.
It is provided with an analysis unit that generates a generated value as an input value for reaching the target arrival point using the determination formula generated by the inspection condition conversion unit .
The inspection condition conversion unit
As the determination formula, a logical formula used for determining the arrival at the target arrival point is generated, and an inspection code is created by adding the code used for the arrival determination at the target arrival point to the target arrival point of the operation code. The inspection code is converted into a logical expression to generate the logical expression of the inspection code.
The analysis unit
An operation confirmation support device that searches for the input value that satisfies the logical product of the determination formula and the logical formula of the inspection code, and generates a generated value as the input value to reach the target arrival point.
前記検査条件取得部が取得した検査条件を基に、前記目標到達箇所へ到達したことを判定する到達判定に用いられる目標到達箇所変数を定義し、 Based on the inspection conditions acquired by the inspection condition acquisition unit, the target arrival point variable used for the arrival determination for determining that the target arrival point has been reached is defined.
前記動作コードの実行時に前記目標到達箇所の行へ到達時に必ず実行される、目標到達箇所の行の前後の行のうちどちらか一方に、前記目標到達箇所変数の演算式で示されるコードを挿入したものを前記検査用コードとして作成する請求項1に記載の動作確認支援装置。 Insert the code indicated by the calculation formula of the target arrival point variable into one of the lines before and after the target arrival point line, which is always executed when the target arrival point line is reached when the operation code is executed. The operation confirmation support device according to claim 1, wherein the code is created as the inspection code.
前記目標到達箇所を示す前記動作コードの行番号を前記検査条件として取得し、
前記検査条件変換部は、
前記判定式として、前記目標到達箇所を示す前記動作コードの行番号へ到達したときに満たされる目標到達条件式を生成する請求項1又は請求項2に記載の動作確認支援装置。 The inspection condition acquisition unit
The line number of the operation code indicating the target arrival point is acquired as the inspection condition, and the line number is acquired.
The inspection condition conversion unit
The operation confirmation support device according to claim 1 or 2, wherein as the determination expression, a target arrival condition expression that is satisfied when the line number of the operation code indicating the target arrival location is reached is generated.
複数の目標到達箇所を示す前記動作コードの行番号と、前記複数の目標到達箇所の到達順序である目標到達順序とを前記検査条件として取得し、
前記検査条件変換部は、
前記判定式として、前記目標到達順序の通りに前記複数の目標到達箇所を示す前記動作コードの行番号へ到達したときに満たされる目標到達条件式を生成する請求項1から請求項3のいずれか1項に記載の動作確認支援装置。 The inspection condition acquisition unit
The line numbers of the operation code indicating the plurality of target arrival points and the target arrival order, which is the arrival order of the plurality of target arrival points, are acquired as the inspection conditions.
The inspection condition conversion unit
As the determination formula, any one of claims 1 to 3 that generates a target arrival condition expression that is satisfied when the line numbers of the operation codes indicating the plurality of target arrival locations are reached in the target arrival order. The operation confirmation support device according to item 1.
前記入力値及び前記動作プログラムが出力する出力値の少なくともいずれか一方の値域又は値である入出力条件を取得する入出力条件取得部を備え、
前記解析部は、
前記検査条件変換部が生成した前記判定式を用いて、前記入出力条件を満たし、かつ、前記目標到達箇所へ到達させる前記入力値として生成値を生成する請求項1から請求項4のいずれか1項に記載の動作確認支援装置。 The operation check support device is further equipped.
It is provided with an input / output condition acquisition unit that acquires an input / output condition that is a range or value of at least one of the input value and the output value output by the operation program.
The analysis unit
Any one of claims 1 to 4, which uses the determination formula generated by the inspection condition conversion unit to generate a generated value as the input value that satisfies the input / output conditions and reaches the target arrival point. The operation confirmation support device according to item 1.
前記目標到達箇所へ到達させる前記入力値を生成できなかった場合に、生成できなかったことを通知する請求項1から請求項5のいずれか1項に記載の動作確認支援装置。 The analysis unit
The operation confirmation support device according to any one of claims 1 to 5, which notifies that the input value for reaching the target arrival point could not be generated.
前記動作プログラムとしてノード又はブランチを含むAST(Abstract Syntax Tree)で作成されたASTプログラムを取得し、前記ASTプログラムを前記ASTプログラムのソースコードであるASTコードへと変換し、前記ASTコードを前記動作コードとして取得し、
前記検査条件取得部は、
前記目標到達箇所を示す前記ノード又はブランチを前記検査条件として取得し、
前記検査条件変換部は、
前記検査条件の前記ノード又はブランチに対応する前記動作コードの行番号を抽出し、
前記判定式として、前記動作コードの行番号へ到達したときに満たされる目標到達条件式を生成する請求項1から請求項6のいずれか1項に記載の動作確認支援装置。 The program information acquisition unit
An AST program created by an AST (Abstract Syntax Tree) including a node or a branch as the operation program is acquired, the AST program is converted into an AST code which is a source code of the AST program, and the AST code is converted into the operation. Get as code,
The inspection condition acquisition unit
The node or branch indicating the target arrival point is acquired as the inspection condition, and the inspection condition is acquired.
The inspection condition conversion unit
The line number of the operation code corresponding to the node or branch of the inspection condition is extracted.
The operation confirmation support device according to any one of claims 1 to 6, which generates a target achievement condition expression that is satisfied when the line number of the operation code is reached as the determination expression.
前記動作プログラムとしてノード又はエッジを含む状態遷移図で作成された状態遷移プログラムを取得し、前記状態遷移プログラムを前記状態遷移プログラムのソースコードである状態遷移コードへと変換し、前記状態遷移コードを前記動作コードとして取得し、
前記検査条件取得部は、
前記目標到達箇所を示す前記ノード又はエッジを前記検査条件として取得し、
検査条件変換部は、
前記検査条件の前記ノード又はエッジに対応する前記動作コードの行番号を抽出し、
前記判定式として、前記動作コードの行番号へ到達したときに満たされる目標到達条件式を生成する請求項1から請求項6のいずれか1項に記載の動作確認支援装置。 The program information acquisition unit
The state transition program created in the state transition diagram including the node or edge is acquired as the operation program, the state transition program is converted into the state transition code which is the source code of the state transition program, and the state transition code is converted into the state transition code. Obtained as the above operation code
The inspection condition acquisition unit
The node or edge indicating the target arrival point is acquired as the inspection condition, and the inspection condition is acquired.
The inspection condition conversion unit
The line number of the operation code corresponding to the node or edge of the inspection condition is extracted, and the line number is extracted.
The operation confirmation support device according to any one of claims 1 to 6, which generates a target achievement condition expression that is satisfied when the line number of the operation code is reached as the determination expression.
入力値を読み込んで動作する動作プログラムのソースコードである動作コードを取得し、
前記動作コードの目標到達箇所を含む目標到達箇所に関する情報を検査条件として取得し、
前記検査条件に含まれる目標到達箇所へ到達したことを判定する判定式を生成し、
前記判定式を用いて前記目標到達箇所へ到達させる前記入力値として生成値を生成する動作確認支援方法であって、
前記判定式として前記目標到達箇所への到達判定に用いる論理式を生成し、前記目標到達箇所への到達判定に用いるコードを前記動作コードの前記目標到達箇所に追加した検査用コードを作成し、前記検査用コードを論理式へ変換して前記検査用コードの論理式を生成し、
前記判定式と前記検査用コードの論理式との論理積を充足する前記入力値を探索して、前記目標到達箇所へ到達させる前記入力値として前記生成値を生成する動作確認支援方法。 The computer
Get the operation code which is the source code of the operation program that operates by reading the input value.
Obtain information about the target arrival point including the target arrival point of the operation code as an inspection condition, and obtain the information.
A determination formula for determining that the target reached point included in the inspection conditions has been reached is generated.
It is an operation confirmation support method that generates a generated value as the input value for reaching the target reaching point by using the determination formula .
As the determination formula, a logical formula used for determining the arrival at the target arrival point is generated, and an inspection code is created by adding the code used for the arrival determination at the target arrival point to the target arrival point of the operation code. The inspection code is converted into a logical expression to generate the logical expression of the inspection code.
An operation confirmation support method for searching for an input value that satisfies the logical product of the determination formula and the logical formula of the inspection code, and generating the generated value as the input value for reaching the target arrival point .
前記動作コードの目標到達箇所を含む目標到達箇所に関する情報を検査条件として取得する検査条件取得処理と、
前記検査条件取得処理により取得した前記検査条件に含まれる目標到達箇所へ到達したことを判定する判定式を生成する検査条件変換処理と、
前記検査条件変換処理により生成した前記判定式を用いて前記目標到達箇所へ到達させる前記入力値として生成値を生成する解析処理とをコンピュータに実行させる動作確認支援プログラムであって、
前記検査条件変換処理は、
前記判定式として前記目標到達箇所への到達判定に用いる論理式を生成し、前記目標到達箇所への到達判定に用いるコードを前記動作コードの前記目標到達箇所に追加した検査用コードを作成し、前記検査用コードを論理式へ変換して前記検査用コードの論理式を生成し、
前記解析処理は、
前記判定式と前記検査用コードの論理式との論理積を充足する前記入力値を探索して、前記目標到達箇所へ到達させる前記入力値として生成値を生成する動作確認支援プログラム。 Program information acquisition process to acquire the operation code which is the source code of the operation program that reads the input value and operates,
The inspection condition acquisition process for acquiring information about the target arrival point including the target arrival point of the operation code as an inspection condition, and
An inspection condition conversion process for generating a determination formula for determining that a target reached point included in the inspection condition acquired by the inspection condition acquisition process has been reached, and an inspection condition conversion process.
An operation confirmation support program for causing a computer to execute an analysis process of generating a generated value as an input value for reaching the target arrival point using the determination formula generated by the inspection condition conversion process .
The inspection condition conversion process is
As the determination formula, a logical formula used for determining the arrival at the target arrival point is generated, and an inspection code is created by adding the code used for the arrival determination at the target arrival point to the target arrival point of the operation code. The inspection code is converted into a logical expression to generate the logical expression of the inspection code.
The analysis process is
An operation confirmation support program that searches for the input value that satisfies the logical product of the determination formula and the logical formula of the inspection code, and generates a generated value as the input value to reach the target arrival point .
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/JP2020/017102 WO2021214843A1 (en) | 2020-04-20 | 2020-04-20 | Operation check assistance device, operation check assistance method, and operation check assistance program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP6854994B1 true JP6854994B1 (en) | 2021-04-07 |
JPWO2021214843A1 JPWO2021214843A1 (en) | 2021-10-28 |
Family
ID=75267904
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020570075A Active JP6854994B1 (en) | 2020-04-20 | 2020-04-20 | Operation check support device, operation check support method and operation check support program |
Country Status (2)
Country | Link |
---|---|
JP (1) | JP6854994B1 (en) |
WO (1) | WO2021214843A1 (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001306648A (en) * | 2000-03-20 | 2001-11-02 | Nec Corp | Test bench generating device, automatic test bench generating method, verifying method, and evaluating method |
JP2010140407A (en) * | 2008-12-15 | 2010-06-24 | Nomura Research Institute Ltd | Source code inspection device |
JP2011159115A (en) * | 2010-02-01 | 2011-08-18 | Fuji Electric Co Ltd | Automatic programming device, automatic programming method, and program for monitoring sequence |
JP2014063415A (en) * | 2012-09-24 | 2014-04-10 | Mitsubishi Electric Corp | Test case automatic generation device and test case automatic generation program |
JP2015197868A (en) * | 2014-04-02 | 2015-11-09 | トヨタ自動車株式会社 | Computer program checking apparatus |
JP2016031622A (en) * | 2014-07-29 | 2016-03-07 | 日立オートモティブシステムズ株式会社 | Software verification system and control device |
-
2020
- 2020-04-20 JP JP2020570075A patent/JP6854994B1/en active Active
- 2020-04-20 WO PCT/JP2020/017102 patent/WO2021214843A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001306648A (en) * | 2000-03-20 | 2001-11-02 | Nec Corp | Test bench generating device, automatic test bench generating method, verifying method, and evaluating method |
JP2010140407A (en) * | 2008-12-15 | 2010-06-24 | Nomura Research Institute Ltd | Source code inspection device |
JP2011159115A (en) * | 2010-02-01 | 2011-08-18 | Fuji Electric Co Ltd | Automatic programming device, automatic programming method, and program for monitoring sequence |
JP2014063415A (en) * | 2012-09-24 | 2014-04-10 | Mitsubishi Electric Corp | Test case automatic generation device and test case automatic generation program |
JP2015197868A (en) * | 2014-04-02 | 2015-11-09 | トヨタ自動車株式会社 | Computer program checking apparatus |
JP2016031622A (en) * | 2014-07-29 | 2016-03-07 | 日立オートモティブシステムズ株式会社 | Software verification system and control device |
Non-Patent Citations (1)
Title |
---|
橋本 祐介: "ソフトウェアモデル検査とテストケース生成の統合ツールチェイン", 情報処理学会 シンポジウム ソフトウェアエンジニアリングシンポジウム 2011, JPN7020002126, JP, ISSN: 0004446098 * |
Also Published As
Publication number | Publication date |
---|---|
WO2021214843A1 (en) | 2021-10-28 |
JPWO2021214843A1 (en) | 2021-10-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8181134B2 (en) | Techniques for performing conditional sequential equivalence checking of an integrated circuit logic design | |
US8996339B2 (en) | Incremental formal verification | |
US20150094997A1 (en) | Explaining partially illegal combinations in combinatorial models | |
US9002694B2 (en) | Verification of design derived from power intent | |
US8909579B2 (en) | Identifying invariant candidates based on proofs | |
US9218273B2 (en) | Automatic generation of a resource reconfiguring test | |
US8484591B2 (en) | Enhancing redundancy removal with early merging | |
US20130275939A1 (en) | Efficient file system object-based deduplication | |
US9378000B1 (en) | Determination of unreachable elements in a design | |
JP6854994B1 (en) | Operation check support device, operation check support method and operation check support program | |
US10747920B2 (en) | Semiconductor LSI design device and design method | |
US8949766B2 (en) | Detecting corresponding paths in combinationally equivalent circuit designs | |
JP2009230677A (en) | Property generation system and property verification system | |
US10666255B1 (en) | System and method for compacting X-pessimism fixes for gate-level logic simulation | |
US11461079B2 (en) | Non-transitory computer-readable medium | |
JP2013003999A (en) | Verification device, verification method, and verification program | |
Khomenko et al. | Detecting state coding conflicts in stgs using integer programming | |
US8397189B2 (en) | Model checking in state transition machine verification | |
JP6318976B2 (en) | DEBUG CIRCUIT, DEBUGGER DEVICE, SEMICONDUCTOR DEVICE, AND DEBUG METHOD | |
JP6818568B2 (en) | Communication device, communication specification difference extraction method and communication specification difference extraction program | |
US10635845B2 (en) | Method and apparatus for improving Boolean satisfiability solver generated based on input design with data qualifier signals | |
US8996435B2 (en) | Determining invariants in a model | |
Jayasena et al. | HIVE: Scalable Hardware-Firmware Co-Verification using Scenario-based Decomposition and Automated Hint Extraction | |
US10303832B2 (en) | Architecture generating device | |
US8584063B1 (en) | Assertion-based design partitioning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201215 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20201215 |
|
A871 | Explanation of circumstances concerning accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A871 Effective date: 20201215 |
|
A975 | Report on accelerated examination |
Free format text: JAPANESE INTERMEDIATE CODE: A971005 Effective date: 20210105 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210216 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210316 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 6854994 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |