JP2017142554A - Inspection device - Google Patents

Inspection device Download PDF

Info

Publication number
JP2017142554A
JP2017142554A JP2016021480A JP2016021480A JP2017142554A JP 2017142554 A JP2017142554 A JP 2017142554A JP 2016021480 A JP2016021480 A JP 2016021480A JP 2016021480 A JP2016021480 A JP 2016021480A JP 2017142554 A JP2017142554 A JP 2017142554A
Authority
JP
Japan
Prior art keywords
model
value
simulation
inspection apparatus
change
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2016021480A
Other languages
Japanese (ja)
Inventor
伸和 水野
Nobukazu Mizuno
伸和 水野
博基 藤井
Hiromoto Fujii
博基 藤井
周平 石川
Shuhei Ishikawa
周平 石川
裕規 中野
Hiroki Nakano
裕規 中野
正穂 石田
Masaho Ishida
正穂 石田
隆仁 吉浦
Takahito Yoshiura
隆仁 吉浦
忠芳 坂本
Tadayoshi Sakamoto
忠芳 坂本
尚幸 宮田
Naoyuki Miyata
尚幸 宮田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toyota Motor Corp
Original Assignee
Toyota Motor Corp
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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2016021480A priority Critical patent/JP2017142554A/en
Publication of JP2017142554A publication Critical patent/JP2017142554A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an inspection device that can efficiently inspect models in a model base development.SOLUTION: An inspection device inspecting a model ML in a model base development is configured to: perform a first simulation using a value indicated by a test pattern TP to be input; build a model for performing a second simulation using a result RES to be created when the first simulation is performed as a previous value VA; and change the previous value to be used in the second simulation, in which in the change, a value to be used in the change is calculated by analyzing a branch logic to be included in the model or the value to be used in the change is a value to be pre-set.SELECTED DRAWING: Figure 1

Description

本発明は、検査装置に関する。   The present invention relates to an inspection apparatus.

従来、大規模なソフトウェア部品をテストするのに、テストに必要なパラメータ値等を示すデータ等で構成されるテストパターンが用いられる。このテストパターンを生成するため、必要なテストパターンを絞り込む方法が、知られている。具体的には、まず、テスト情報管理サーバが、ソフトウェア部品を使用する使用環境において、設定する予定のそれぞれのパラメータ値をクライアントコンピュータから受け付ける。次に、テスト情報管理サーバは、受け付けたパラメータ値のうち、関連性のあるパラメータ値を組み合わせてテストパターンを生成する。そして、テスト情報管理サーバは、生成したテストパターンをクライアントコンピュータに送信する。このようにして、大規模なソフトウェア部品をテストするのに用いられるテストパターンをテスト情報管理サーバが生成する方法が知られている(例えば、特許文献1)。このような方法が用いられると、関連性のあるパラメータ値の組み合わせについてのみテストパターンが生成されるため、ソフトウェア部品のテストにおいて、テスト情報管理サーバは、必要なテストパターンを絞り込むことができる。そのため、効率の良いテストが実施できる。   Conventionally, in order to test a large-scale software component, a test pattern including data indicating parameter values necessary for the test is used. In order to generate this test pattern, a method for narrowing down a necessary test pattern is known. Specifically, first, the test information management server receives each parameter value to be set from the client computer in the usage environment in which the software component is used. Next, the test information management server generates a test pattern by combining relevant parameter values among the received parameter values. Then, the test information management server transmits the generated test pattern to the client computer. In this way, a method is known in which a test information management server generates a test pattern used to test a large-scale software component (for example, Patent Document 1). When such a method is used, a test pattern is generated only for a combination of related parameter values, so that the test information management server can narrow down a necessary test pattern in the software component test. Therefore, an efficient test can be performed.

特開2010−3224号公報JP 2010-3224 A

しかしながら、上述の従来の技術では、テストパターンを絞り込んでいるにすぎないため、テストパターンが減っても、ソフトウェア開発等の上流工程で、開発するソフトウェアのシミュレーションを行うことができるモデルを構築して、ソフトウェアの開発を行う手法(以下「モデルベース開発」という。)において、1つのテストパターンに基づいて、シミュレーションが行われる回数は、減らせない場合が多い。そのため、上述の従来の技術では、シミュレーションが行われる回数が多いため、シミュレーション時間が長かったり、シミュレーションのループ回数が多くなったりする。   However, the above-mentioned conventional technology only narrows down the test pattern, so even if the test pattern is reduced, a model that can simulate the software to be developed is constructed in the upstream process such as software development. In the method of developing software (hereinafter referred to as “model-based development”), the number of times simulation is performed based on one test pattern cannot often be reduced. For this reason, in the above-described conventional technique, since the number of simulations is large, the simulation time is long or the number of simulation loops is large.

また、シミュレーションが行われる回数が多いと、それぞれのシミュレーションを成立させるためのデータ(以下「時系列テストパターン」という。)も、シミュレーションが行われる回数に合わせて、多くなる。このように、時系列テストパターンが多くなると、コンピュータが時系列テストパターンを生成できる確率が低くなる。そして、コンピュータが生成できない時系列テストパターンは、手作業で生成される。そのため、時系列テストパターンを作成する等の手作業が多くなる場合が多い。ゆえに、上述の従来の技術では、モデルベース開発においてモデルをテストして検査する検査装置が、モデルを効率良く検査できない場合がある。   In addition, when the number of simulations is large, data for establishing each simulation (hereinafter referred to as “time-series test pattern”) also increases in accordance with the number of times the simulation is performed. Thus, as the time series test pattern increases, the probability that the computer can generate the time series test pattern decreases. A time-series test pattern that cannot be generated by the computer is generated manually. For this reason, there are many cases where manual work such as creating a time-series test pattern increases. Therefore, in the above-described conventional technology, an inspection apparatus that tests and inspects a model in model-based development may not be able to inspect the model efficiently.

そこで、上記課題に鑑み、モデルベース開発において、シミュレーションが行われる回数を減らしたり、手作業を少なくしたりして、効率良くモデルを検査できる検査装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide an inspection apparatus capable of efficiently inspecting a model by reducing the number of times simulation is performed or reducing manual work in model-based development.

上記目的を達成するため、一実施形態において、モデルベース開発におけるモデルを検査する検査装置は、
入力されるテストパターンが示す値を用いて第1シミュレーションを行い、かつ、前記第1シミュレーションが行われると生成される結果を前回値として用いる第2シミュレーションを行う前記モデルを構築するモデル構築部と、
前記第2シミュレーションで用いられる前記前回値を変更する変更部と
を含み、
前記変更部は、前記変更に用いる値を前記モデルに含まれる分岐ロジックを解析して算出する又は前記変更に用いる値をあらかじめ設定される値とする。
In order to achieve the above object, in one embodiment, an inspection apparatus for inspecting a model in model-based development includes:
A model building unit that builds the model that performs a first simulation using a value indicated by an input test pattern and performs a second simulation that uses a result generated when the first simulation is performed as a previous value; ,
A change unit for changing the previous value used in the second simulation,
The change unit calculates a value used for the change by analyzing a branch logic included in the model, or sets a value used for the change as a preset value.

本態様によれば、前記変更部によって、前記検査装置は、前記第1シミュレーションが行われると生成される結果を示す前記前回値を変更することができる。そのため、前記検査装置は、第1シミュレーションの結果、すなわち、前記前回値を用いる前記第2シミュレーションで用いられる値を任意の値にして、前記第2シミュレーションを行うことができる。   According to this aspect, the inspection unit can change the previous value indicating the result generated when the first simulation is performed by the changing unit. Therefore, the inspection apparatus can perform the second simulation by setting the result of the first simulation, that is, the value used in the second simulation using the previous value to an arbitrary value.

これまでは、検査において、シミュレーションを複数回行う場合には、それぞれのシミュレーションを成立させるため、時系列テストパターン等のデータを、それぞれ用意する必要がある。したがって、シミュレーションが行われる回数が多いと、時系列テストパターン等のデータが多く必要となる。そして、モデルベース開発では、ツール等の性質上、変更することが難しい値が、分岐条件における判断対象となる場合がある。このような値が検査に用いられると、値が所望の値となるまで、コンピュータは、シミュレーションを繰り返す必要がある。そのため、コンピュータがシミュレーションを繰り返すのに、更に時系列テストパターン等のデータをそれぞれ用意する必要があり、それぞれのデータを用意する作業等が増える。   Until now, in the case of performing a simulation a plurality of times in the inspection, it is necessary to prepare data such as a time series test pattern in order to establish each simulation. Therefore, when the number of simulations is large, a large amount of data such as time series test patterns is required. In model-based development, a value that is difficult to change due to the nature of a tool or the like may be a determination target in the branch condition. When such a value is used for inspection, the computer needs to repeat the simulation until the value becomes a desired value. Therefore, in order for the computer to repeat the simulation, it is necessary to prepare data such as time-series test patterns, and the work for preparing each data increases.

これに対して、本態様では、変更部によって、前回値を変更することができるため、検査装置は、前記前回値が所望の値となるまで繰り返し行われるシミュレーションを省略することができる。また、シミュレーションの回数が少なくなれば、シミュレーションの回数に応じて、必要となる時系列テストパターン等のデータは、少なくできる。   On the other hand, in this aspect, since the previous value can be changed by the changing unit, the inspection apparatus can omit the simulation that is repeatedly performed until the previous value becomes a desired value. Further, if the number of simulations is reduced, the required data such as time series test patterns can be reduced according to the number of simulations.

そして、モデルの検査では、分岐条件を満たす条件下である場合と、そうでない場合とで、モデルが、仕様通りに分岐条件に基づいて実行する処理を切り替えるか否か等をチェックする限界値分析等が行われる場合が多い。このような限界値分析等において、前記前回値が、前記第1シミュレーションが行われると生成される値から境界値等に変更されると、検査において必要性が少ないシミュレーションが省略できる。また、前記検査装置は、前記前回値を前記第1シミュレーションが行われると生成される値から境界値等にするための時系列テストパターンデータ等を生成する必要を少なくできる。そのため、ユーザによる手作業でテストパターン等を生成させる作業を少なくすることができる。したがって、検査装置は、モデルの検査において、シミュレーションが行われる回数を少なくしたり、ユーザによる手作業を少なくすることができるため、モデルベース開発において、効率良くモデルを検査することができる。   And in the model inspection, limit value analysis that checks whether the model switches processing to be executed based on the branch condition according to the specification, depending on whether the condition satisfies the branch condition or not Etc. are often performed. In such limit value analysis or the like, if the previous value is changed from a value generated when the first simulation is performed to a boundary value or the like, a simulation that is less necessary for inspection can be omitted. In addition, the inspection apparatus can reduce the need to generate time series test pattern data or the like for changing the previous value from a value generated when the first simulation is performed to a boundary value or the like. Therefore, it is possible to reduce the work of generating test patterns and the like manually by the user. Therefore, since the inspection apparatus can reduce the number of times simulation is performed in the model inspection or reduce manual work by the user, the model can be efficiently inspected in model-based development.

本実施の形態によれば、モデルベース開発において、効率良くモデルを検査できる検査装置を提供することができる。   According to the present embodiment, it is possible to provide an inspection apparatus capable of efficiently inspecting a model in model-based development.

本発明の一実施形態に係る検査装置によるモデルの検査例を示す全体図である。It is a general view which shows the example of a test | inspection of the model by the test | inspection apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る検査装置によって検査されるモデルの一例を示すブロック図である。It is a block diagram which shows an example of the model test | inspected by the test | inspection apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る検査装置によって検査されるモデルの別の一例を示すブロック図である。It is a block diagram which shows another example of the model test | inspected by the test | inspection apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る検査装置によるモデルの第2検査例を示す全体図である。It is a general view which shows the 2nd test example of the model by the test | inspection apparatus which concerns on one Embodiment of this invention. 本発明の一実施形態に係る検査装置によるモデルの第3検査例を示す全体図である。It is a general view which shows the 3rd test example of the model by the test | inspection apparatus which concerns on one Embodiment of this invention.

以下、図面を参照して発明を実施するための形態について説明する。   Hereinafter, embodiments for carrying out the invention will be described with reference to the drawings.

図1は、本発明の一実施形態に係る検査装置によるモデルの検査例を示す全体図である。図示する例は、検査装置がテストパターンTPに基づいてモデルMLを検査するための構成例を示す。具体的には、検査は、モデルをシミュレーションすることで実現される。すなわち、検査装置は、いわゆるモデルベース開発におけるモデルを検査対象とする。   FIG. 1 is an overall view showing an example of model inspection by an inspection apparatus according to an embodiment of the present invention. The illustrated example shows a configuration example for the inspection apparatus to inspect the model ML based on the test pattern TP. Specifically, the inspection is realized by simulating a model. That is, the inspection apparatus uses a model in so-called model-based development as an inspection target.

なお、モデルベース開発は、図示するように、開発するソフトウェアの仕様等を示すモデルMLが構築されると、検査装置は、モデルMLをシミュレーションすることができる。このように、シミュレーションが行われると、検査装置は、モデルMLが示す仕様等に基づいて開発されるソフトウェアが実行された場合と同じ程度の出力結果を出力することができる。なお、モデルベース開発は、例えば、MATLAB(登録商標)/Simulink(登録商標)等のツールを用いて実現される。以下、MATLAB(登録商標)/Simulink(登録商標)を用いて構築されるモデルを例にして説明する。この例では、モデルは、ソフトウェアにおいて行われる処理の種類等を示す複数のブロックをつないで構築される。   In the model-based development, as shown in the drawing, when a model ML indicating the specification of software to be developed is constructed, the inspection apparatus can simulate the model ML. As described above, when the simulation is performed, the inspection apparatus can output the same output result as when the software developed based on the specification indicated by the model ML is executed. Note that the model-based development is realized by using a tool such as MATLAB (registered trademark) / Simulink (registered trademark). Hereinafter, a model constructed by using MATLAB (registered trademark) / Simulink (registered trademark) will be described as an example. In this example, the model is constructed by connecting a plurality of blocks indicating types of processing performed in software.

検査では、まず、検査装置に、テストパターンTPのデータが入力される。このテストパターンTPは、モデルMLをシミュレーションするためのパラメータ等を示す。具体的には、テストパターンTPは、関数における引数又はグローバル変数に代入される値等である。   In the inspection, first, data of the test pattern TP is input to the inspection apparatus. The test pattern TP indicates parameters for simulating the model ML. Specifically, the test pattern TP is a value assigned to an argument in a function or a global variable.

また、検査対象となるモデルMLは、制御ロジックCTLを有する。なお、制御ロジックCTLが行う処理の種類等は、ユーザによって設定される。この制御ロジックCLは、入力されるテストパターンTP等によって設定される条件でシミュレーションが実行される。このように、シミュレーションが実行されると、検査装置は、出力結果RESを出力することができる。   The model ML to be inspected has a control logic CTL. Note that the type of processing performed by the control logic CTL is set by the user. The control logic CL is simulated under conditions set by the input test pattern TP and the like. In this way, when the simulation is executed, the inspection apparatus can output the output result RES.

なお、出力結果RESに基づいて、モデルMLにバグ等がなく、仕様を満たすようにモデルが構築されていると判断される場合には、検査装置は、モデルMLをコンパイルして、プログラムソースコード等を生成してもよい。例えば、生成されるプログラムソースコードは、C言語等の高水準言語等で記載されたソースコードである。   If it is determined that the model ML is free of bugs and the model is constructed so as to satisfy the specifications based on the output result RES, the inspection apparatus compiles the model ML and generates program source code. Etc. may be generated. For example, the generated program source code is a source code written in a high-level language such as C language.

また、モデルMLのシミュレーションが実行されると、シミュレーション結果に基づいて生成される状態変数等の値(以下「前回値VA」という。)があるとする。すなわち、前回値VAは、前回のシミュレーションによる演算結果等を示す値である。次に、モデルMLは、前回値VAに基づいて処理を行うとする。具体的には、モデルMLは、例えば、前回値VAの値をあらかじめ設定される閾値等と比較して、所定の条件を満たしているか否か判断する分岐処理を行う。つまり、前回値VAは、シミュレーションの結果によって変化し、モデルMLは、前回値VAの値によって実行する演算処理を切り替える。なお、前回値VAは、例えば、カウンタ値又はタイマ値等である。   Further, when the simulation of the model ML is executed, it is assumed that there are values of state variables and the like (hereinafter referred to as “previous value VA”) generated based on the simulation result. That is, the previous value VA is a value indicating a calculation result or the like by the previous simulation. Next, it is assumed that the model ML performs processing based on the previous value VA. Specifically, for example, the model ML performs a branching process that determines whether or not a predetermined condition is satisfied by comparing the previous value VA with a preset threshold value or the like. That is, the previous value VA changes depending on the result of the simulation, and the model ML switches the arithmetic processing to be executed according to the value of the previous value VA. The previous value VA is, for example, a counter value or a timer value.

以下、テストパターンが示す値を用いて検査装置によって行われるシミュレーションを「第1シミュレーション」という。一方で、前回値VAを用いて検査装置によって行われるシミュレーション、すなわち、第1シミュレーションが行われた後に行われるシミュレーションを「第2シミュレーション」という。   Hereinafter, the simulation performed by the inspection apparatus using the value indicated by the test pattern is referred to as “first simulation”. On the other hand, a simulation performed by the inspection apparatus using the previous value VA, that is, a simulation performed after the first simulation is performed is referred to as a “second simulation”.

このように、前回値VAの値によってモデルMLが行う処理が異なる場合には、検査では、前回値VAが変化した際に、処理が仕様通りに切り替わるか否かが検査される。すなわち、検査では、前回値VAに係るいわゆる境界値分析(「限界値分析」ともいう。)が行われる。したがって、検査では、境界値分析等を行うため、検査装置は、以下のようにして前回値VAを変更する。   In this way, when the processing performed by the model ML differs depending on the value of the previous value VA, the inspection checks whether or not the processing is switched according to the specification when the previous value VA changes. That is, in the inspection, so-called boundary value analysis (also referred to as “limit value analysis”) related to the previous value VA is performed. Therefore, in order to perform boundary value analysis and the like in the inspection, the inspection apparatus changes the previous value VA as follows.

検査装置は、変更部の例である変更ロジックCHLを有する。図示するように、変更ロジックCHLは、制御ロジックCTLが生成する前回値VAを所定の値になるように変更する。このように、変更ロジックCHLがあると、検査装置は、外部から入力される値、すなわち、任意の値に前回値VAを変更することができる。   The inspection apparatus includes a change logic CHL that is an example of a change unit. As shown in the figure, the change logic CHL changes the previous value VA generated by the control logic CTL to a predetermined value. Thus, when there is the change logic CHL, the inspection apparatus can change the previous value VA to an externally input value, that is, an arbitrary value.

また、検査装置は、PC(Personal Computer)等のコンピュータである。すなわち、検査装置は、例えば、以下のようなハードウェア構成である。具体的には、検査装置は、モデルML及びテストパターンTP等を入力するためのインタフェース又はキーボード等の入力装置を有する。また、検査装置は、モデルを検査する処理を実現するための演算及び制御を行う演算装置並びに制御装置であるCPU(Central Processing Unit)等を有する。さらに、検査装置は、ネットワークを介して、外部装置と接続するためのネットワークI/F(interface)等を有する。さらにまた、検査装置は、検査に用いられるデータ等を記憶する主記憶装置及び補助記憶装置等の記憶装置を有する。他にも、検査装置は、シミュレーション結果等を表示するディスプレイ等の出力装置を有する。   The inspection apparatus is a computer such as a PC (Personal Computer). In other words, the inspection device has, for example, the following hardware configuration. Specifically, the inspection apparatus has an input device such as an interface or a keyboard for inputting the model ML and the test pattern TP. In addition, the inspection apparatus includes an arithmetic apparatus that performs arithmetic and control for realizing a process of inspecting a model, a CPU (Central Processing Unit) that is a control apparatus, and the like. Further, the inspection apparatus includes a network I / F (interface) for connecting to an external apparatus via a network. Furthermore, the inspection device has storage devices such as a main storage device and an auxiliary storage device that store data used for the inspection. In addition, the inspection apparatus has an output device such as a display for displaying a simulation result or the like.

例えば、検査装置が、以下のようなモデルMLを検査する例で説明する。   For example, an example in which the inspection apparatus inspects the model ML as described below will be described.

図2は、本発明の一実施形態に係る検査装置によって検査されるモデルの一例を示すブロック図である。図示する例では、モデルMLは、定数を加える「Add」及び出力を切り替える「Switch」等の処理を行う制御ロジックCTLを有するモデルである。検査装置には、モデルMLを構築するため、モデルMLにおいてどのような種類の処理が行われるか等を設定する操作がユーザによって入力される。   FIG. 2 is a block diagram illustrating an example of a model inspected by the inspection apparatus according to the embodiment of the present invention. In the illustrated example, the model ML is a model having a control logic CTL that performs processing such as “Add” for adding a constant and “Switch” for switching output. In order to construct the model ML, an operation for setting what kind of processing is performed in the model ML is input to the inspection apparatus by the user.

図示するように、まず、制御ロジックCTLによって、第1シミュレーションが実行されると、前回値VAが、生成される。この例では、前回値VAの値を「B」とする。例えば、図示するような加算変更ロジックCHL1をモデルMLが有すると、検査装置は、前回値VA、すなわち、「B」にあらかじめ設定される「OFFSET」を加算して前回値VAを「A」に変更することができる。   As shown in the drawing, first, when the first simulation is executed by the control logic CTL, the previous value VA is generated. In this example, the previous value VA is “B”. For example, when the model ML has the addition change logic CHL1 as shown in the figure, the inspection apparatus adds the previous value VA, that is, “OFFSET” set in advance to “B”, and sets the previous value VA to “A”. Can be changed.

このように、検査装置は、加算変更ロジックCHL1によって、第1シミュレーションの結果、生成される前回値VAの「B」を「A」に変更することができるため、検査装置は、第2シミュレーションを「A」の値で実行することができる。   Thus, since the inspection apparatus can change “B” of the previous value VA generated as a result of the first simulation by the addition change logic CHL1, the inspection apparatus performs the second simulation. It can be executed with a value of “A”.

また、図示するような構成では、「OFFSET」を「0」と設定すると、モデルMLは、「A=B+0」とする。したがって、このように設定すると、モデルMLにおいて、「OFFSET」を加算する構成である、「Add1」及び「Constant2」等は、意味をなさない構成であると判断されるようにできる。このようにすると、モデルMLに基づいて、プログラムソースコードを生成するコンパイルでは、コンパイラは、最適化機能によって、「OFFSET」を加算する構成等を削除する場合が多い。そのため、コンパイルされて生成されるプログラムソースコードによる処理では、前回値を変更する処理による処理負荷が小さい。このように、処理負荷の小さいプログラムソースコードを生成しやすい構成で、検査装置は、検査を行うことができる。   In the configuration as shown in the figure, when “OFFSET” is set to “0”, the model ML is set to “A = B + 0”. Therefore, with this setting, it is possible to determine that “Add1”, “Constant2”, and the like, which are the configurations of adding “OFFSET” in the model ML, have no meaning. In this way, in the compilation for generating the program source code based on the model ML, the compiler often deletes the configuration for adding “OFFSET” by the optimization function. Therefore, in the process using the program source code generated by compilation, the processing load due to the process of changing the previous value is small. As described above, the inspection apparatus can perform the inspection with a configuration that can easily generate the program source code with a small processing load.

なお、前回値VAは、加算以外の方法で変更されてもよい。例えば、前回値VAは、以下のようにして乗算で変更されてもよい。   The previous value VA may be changed by a method other than addition. For example, the previous value VA may be changed by multiplication as follows.

図3は、本発明の一実施形態に係る検査装置によって検査されるモデルの別の一例を示すブロック図である。図2と比較すると、図3は、加算変更ロジックCHL1が乗算変更ロジックCHL2となる点が異なる。すなわち、図2に示す例では、検査装置は、加算変更ロジックCHL1によって、前回値VAを「A=B+OFFSET」と加算して変更する。一方で、図3に示す例では、検査装置は、乗算変更ロジックCHL2によって乗算を行う。具体的には、検査装置は、乗算変更ロジックCHL2によって、前回値VAを「A=B×GAIN」と乗算して変更する。なお、図示するモデルでは、「Product」によって乗算が行われる。このように、検査装置は、乗算によって前回値VAを変更してもよい。   FIG. 3 is a block diagram illustrating another example of a model inspected by the inspection apparatus according to the embodiment of the present invention. Compared to FIG. 2, FIG. 3 differs in that the addition change logic CHL1 becomes the multiplication change logic CHL2. That is, in the example illustrated in FIG. 2, the inspection apparatus adds and changes the previous value VA to “A = B + OFFSET” by the addition change logic CHL1. On the other hand, in the example shown in FIG. 3, the inspection apparatus performs multiplication by the multiplication change logic CHL2. Specifically, the inspection apparatus multiplies the previous value VA by “A = B × GAIN” and changes it by the multiplication change logic CHL2. In the model shown in the figure, multiplication is performed by “Product”. In this way, the inspection apparatus may change the previous value VA by multiplication.

また、検査装置は、減算、除算、LUT(Look Up Table)等による置換又はこれらの組み合わせ等で、前回値VAを変更してもよい。   Further, the inspection apparatus may change the previous value VA by subtraction, division, replacement by LUT (Look Up Table), or a combination thereof.

なお、検査装置は、あらかじめ入力される定数、すなわち固定値を前回値VAに加算又は乗算等して前回値VAを変更するに限られない。例えば、検査装置は、前回値VAの影響を受ける分岐処理等を解析して以下のように変更に用いる値を決定してもよい。   Note that the inspection apparatus is not limited to changing the previous value VA by adding or multiplying a previously input constant, that is, a fixed value, to the previous value VA. For example, the inspection apparatus may determine a value to be used for the change as follows by analyzing a branch process or the like affected by the previous value VA.

図4は、本発明の一実施形態に係る検査装置によるモデルの第2検査例を示す全体図である。図示する全体図は、図1と比較すると、変更ロジックCHLが用いる値が、制御ロジックCTLが有する分岐ロジックBILを解析して決定される構成である点が異なる。なお、分岐ロジックBILは、図2及び図3に示す例では、「Relational Operator」等の関係演算子によって実現される処理である。すなわち、分岐ロジックBILは、閾値等と比較して、分岐ロジックBILに入力される値が、所定の値以上、所定の値以下、所定の値より大きい、所定の値より小さい又は所定の値と等しいか否かを判断する。   FIG. 4 is an overall view showing a second example of model inspection by the inspection apparatus according to the embodiment of the present invention. Compared to FIG. 1, the overall diagram shown is different in that the value used by the change logic CHL is determined by analyzing the branch logic BIL included in the control logic CTL. Note that the branch logic BIL is a process realized by a relational operator such as “Relational Operator” in the examples illustrated in FIGS. 2 and 3. That is, the branch logic BIL has a value input to the branch logic BIL that is greater than or equal to a predetermined value, less than or equal to a predetermined value, greater than a predetermined value, less than a predetermined value, Determine whether they are equal.

例えば、制御ロジックCTLが、PID制御等において、「I項(積分項)が1000である場合」には、所定の処理(以下「第1処理」という。)を行う仕様であるとする。一方で、それ以外、すなわち、「I項が1000以外の値である場合」には、制御ロジックCTLが、第1処理とは異なる処理(以下「第2処理」という。)を行う仕様であるとする。   For example, it is assumed that the control logic CTL has a specification for performing a predetermined process (hereinafter referred to as “first process”) when “I-term (integral term) is 1000” in PID control or the like. On the other hand, in other cases, that is, “when the I term is a value other than 1000”, the control logic CTL is a specification for performing processing different from the first processing (hereinafter referred to as “second processing”). And

このような仕様の場合には、検査では、前回値VAを例えば、「0」、「999」、「1000」及び「1001」と変化させる境界値分析が行われるのが望ましい。つまり、前回値VAが「0」、「999」及び「1001」であると、制御ロジックCTLが第2処理を行うか否かが、出力結果RES等に基づいて検査される。さらに、前回値VAが「1000」であると、制御ロジックCTLが第1処理を行うか否かが、出力結果RES等に基づいて検査される。この例における「1000」のように、分岐ロジックBILが行う処理を切り替える値が設定される場合がある。このような境界値分析等が行われる場合には、変更ロジックCHLは、前回値VAが「1000」又は「1000」の前後の値となるように変更する。   In the case of such a specification, it is desirable to perform a boundary value analysis in which the previous value VA is changed to, for example, “0”, “999”, “1000”, and “1001” in the inspection. That is, if the previous value VA is “0”, “999”, and “1001”, whether or not the control logic CTL performs the second process is checked based on the output result RES and the like. Further, if the previous value VA is “1000”, whether or not the control logic CTL performs the first process is checked based on the output result RES and the like. A value for switching processing performed by the branch logic BIL may be set like “1000” in this example. When such boundary value analysis or the like is performed, the change logic CHL changes the previous value VA to be “1000” or a value before and after “1000”.

このように、検査装置は、分岐ロジックBILを解析して、「1000」等のように境界値を抽出する。そして、検査装置は、境界値又は境界値の前後の値となるように、前回値VAを変更する。このようにすると、検査装置は、演算ロジックCAL及び分岐ロジックBILに係る境界値分析を行うことができる。   In this way, the inspection apparatus analyzes the branch logic BIL and extracts a boundary value such as “1000”. Then, the inspection apparatus changes the previous value VA so that the boundary value or values before and after the boundary value are obtained. If it does in this way, the inspection device can perform boundary value analysis concerning operation logic CAL and branch logic BIL.

モデルベース開発では、前回値等を利用してシミュレーションを行うモデルが構築される場合がある。しかし、モデルベース開発では、例えば、図2に示す「Unit Delay」のようにブロック化されていると、前回値を変えるのが難しい場合がある。このような場合には、例えば、「ある条件が100回続いた場合」等の分岐条件を含むモデルでは、境界値分析としては、初期値である「0」の前回値の次に、「100」及び「100」の前後の値として、「99」、「100」及び「101」等の前回値を用いて、検査装置は、検査を行う。そのため、「ある条件を100回」成立させるようなテストパターン、すなわち、時系列テストパターンデータを生成する必要等がある。このようにすると、限界値分析としては、「0」乃至「101」のテストのうち、「1」乃至「98」のテストは、無駄となる場合が多く、テストパターンを生成する処理及び検査における処理負荷が大きくなる場合がある。そこで、無駄が少ないテストパターンをユーザが手作業で作成する場合等がある。このように、テストパターンを作成する手作業の工程等があると、テストパターンを作成するのに時間がかかるため、モデルを検査する効率が悪化する場合がある。   In model-based development, a model that performs simulation using the previous value or the like may be constructed. However, in the model-based development, for example, if it is blocked like “Unit Delay” shown in FIG. 2, it may be difficult to change the previous value. In such a case, for example, in a model including a branching condition such as “when a certain condition continues 100 times”, the boundary value analysis is performed after the previous value of “0” that is the initial value, followed by “100”. The inspection apparatus performs an inspection using previous values such as “99”, “100”, and “101” as values before and after “100” and “100”. Therefore, it is necessary to generate a test pattern that satisfies “a certain condition 100 times”, that is, time-series test pattern data. In this way, as the limit value analysis, among the tests from “0” to “101”, the tests from “1” to “98” are often useless, and in the process and inspection for generating the test pattern. Processing load may increase. Therefore, there are cases where the user manually creates a test pattern with little waste. Thus, if there is a manual process for creating a test pattern, it takes time to create the test pattern, and the efficiency of inspecting the model may deteriorate.

一方で、本発明に係る実施形態のように、検査装置は、変更部の例である変更ロジック等によって、前回値を変更する。このようにすると、限界値分析において、無駄となる値を省略することができる。例えば、上記の例では、検査装置は、「0」が行われた次に、前回値を「99」とする変更を行うことができる。そのため、検査装置は、前回値として「1」乃至「98」を用いるシミュレーションを省略できるため、シミュレーションが行われる回数等が少なくできる。このようにして、検査装置は、モデルベース開発において、効率良くモデルを検査できる。   On the other hand, as in the embodiment according to the present invention, the inspection apparatus changes the previous value by a change logic or the like that is an example of a change unit. In this way, useless values can be omitted in the limit value analysis. For example, in the above example, after “0” is performed, the inspection apparatus can change the previous value to “99”. Therefore, since the inspection apparatus can omit the simulation using “1” to “98” as the previous value, the number of times the simulation is performed can be reduced. In this way, the inspection apparatus can efficiently inspect a model in model-based development.

他にも、比較例として、図2における「Unit Delay」ブロックの初期値等を変更する方法が考えられる。しかし、この方法は、検査対象を編集してしまうため、検査方法としては、望ましくない場合が多い。一方で、本発明に係る実施形態では、検査装置は、検査対象となるモデルを変えることなく検査することができる。   As another comparative example, a method of changing the initial value of the “Unit Delay” block in FIG. 2 is conceivable. However, since this method edits the inspection object, it is often not desirable as an inspection method. On the other hand, in the embodiment according to the present invention, the inspection apparatus can inspect without changing the model to be inspected.

また、以下のように、モデルが分岐処理を行わない場合がある。   In addition, the model may not perform branch processing as follows.

図5は、本発明の一実施形態に係る検査装置によるモデルの第3検査例を示す全体図である。図5は、図4と比較すると、分岐ロジックBILがない点が異なる。図示するような構成であっても、前回値VAがある特定の値であるという前提条件下で、演算ロジックCALが検査される場合がある。このような場合において、検査装置が前提条件となるような時系列テストパターンデータを生成するのが難しい場合がある。   FIG. 5 is an overall view showing a third example of model inspection by the inspection apparatus according to the embodiment of the present invention. FIG. 5 differs from FIG. 4 in that there is no branch logic BIL. Even in the configuration shown in the figure, the arithmetic logic CAL may be inspected under the precondition that the previous value VA is a specific value. In such a case, it may be difficult to generate time-series test pattern data that is a prerequisite for the inspection apparatus.

時系列テストパターンデータは、例えば、シミュレーションごとに用意される。つまり、1回のシミュレーションに、1つの時系列テストパターンデータが必要となる場合がある。   The time series test pattern data is prepared for each simulation, for example. That is, one time series test pattern data may be required for one simulation.

なお、時系列テストパターンデータは、シミュレーションを行うのに、必要な環境等を設定するデータ等である。そのため、シミュレーション回数、すなわち、ループ回数が多いと、時系列テストパターンデータが多く必要となる。検査装置等のコンピュータは、時系列テストパターンデータが多くなると、なかには、生成できない時系列テストパターンデータがある。又は、1つの時系列テストパターンデータが生成されるのに時間がかかる場合には、時系列テストパターンデータが多くなると、全体の処理時間が膨大となり、すべての時系列テストパターンデータをコンピュータに生成させるのが事実上、不可能になる場合もある。このように、シミュレーションを行うのに必要となるデータが多くなると、シミュレーションを行うためのデータをコンピュータに生成させるのが難しくなる場合が多い。そして、コンピュータが生成できないデータは、手作業によって生成されるため、シミュレーションが行われる回数が多いと、手作業が多くなり、検査の効率が悪くなる場合が多い。   Note that the time-series test pattern data is data or the like for setting the environment necessary for the simulation. Therefore, when the number of simulations, that is, the number of loops is large, a large amount of time-series test pattern data is required. Computers such as inspection devices include time-series test pattern data that cannot be generated when time-series test pattern data increases. Or, if it takes time to generate one time-series test pattern data, if the time-series test pattern data increases, the total processing time becomes enormous, and all the time-series test pattern data is generated in the computer. Sometimes it is virtually impossible to do so. As described above, when the amount of data necessary for the simulation increases, it is often difficult for the computer to generate data for the simulation. Since data that cannot be generated by the computer is generated manually, if the number of simulations is large, the manual operation increases and the inspection efficiency often deteriorates.

一方で、本発明に係る実施形態のように、検査装置は、変更部の例である変更ロジック等によって、前回値を変更する。このようにすると、検査装置は、時系列テストパターンデータを生成しない又は少ない時系列テストパターンデータで、前提条件の環境を作ることができる。そのため、検査装置は、1周期分のテストパターンで、モデルを検査することができる。   On the other hand, as in the embodiment according to the present invention, the inspection apparatus changes the previous value by a change logic or the like that is an example of a change unit. In this way, the inspection apparatus can create a precondition environment with little or no time-series test pattern data. Therefore, the inspection apparatus can inspect the model with a test pattern for one cycle.

例えば、「I項が1000である」との前提条件下で検査が行われるとする。この例では、検査装置は、「前回値=前回値+1000」とすると、1周期で、前提条件を満たす環境を作ることができる。   For example, it is assumed that the inspection is performed under the precondition that “I term is 1000”. In this example, when “previous value = previous value + 1000” is set, the inspection apparatus can create an environment that satisfies the preconditions in one cycle.

なお、この「1000」の値、すなわち、変更部が変更に用いる値は、例えば、図4に示すように、モデルMLに分岐ロジックBILが含まれる場合には、分岐ロジックを検査装置が解析して算出される値である。また、変更部が変更に用いる値は、あらかじめ検査装置に設定される値等でもよい。   Note that the value “1000”, that is, the value used by the changing unit for the change is, for example, as shown in FIG. 4, when the model ML includes a branch logic BIL, the inspection device analyzes the branch logic. This is a calculated value. Further, the value used for the change by the changing unit may be a value set in the inspection apparatus in advance.

このようにして、検査装置は、モデルベース開発において、効率良くモデルを検査できる。   In this way, the inspection apparatus can efficiently inspect a model in model-based development.

以上、本発明を実施するための形態について詳述したが、本発明はかかる特定の実施形態に限定されるものではなく、特許請求の範囲に記載された本発明の要旨の範囲内において、種々の変形又は変更が可能である。   As mentioned above, although the form for implementing this invention was explained in full detail, this invention is not limited to this specific embodiment, In the range of the summary of this invention described in the claim, various It is possible to modify or change.

VA 前回値
ML モデル
TP テストパターン
RES 出力結果
CHL 変更ロジック(変更部の例)
CTL 制御ロジック(モデル構築部の例)
VA previous value ML model TP test pattern RES output result CHL change logic (example of change part)
CTL control logic (example of model building unit)

Claims (1)

モデルベース開発におけるモデルを検査する検査装置であって、
入力されるテストパターンが示す値を用いて第1シミュレーションを行い、かつ、前記第1シミュレーションが行われると生成される結果を前回値として用いる第2シミュレーションを行う前記モデルを構築するモデル構築部と、
前記第2シミュレーションで用いられる前記前回値を変更する変更部とを含み、
前記変更部は、前記変更に用いる値を前記モデルに含まれる分岐ロジックを解析して算出する又は前記変更に用いる値をあらかじめ設定される値とする検査装置。
An inspection device for inspecting a model in model-based development,
A model building unit that builds the model that performs a first simulation using a value indicated by an input test pattern and performs a second simulation that uses a result generated when the first simulation is performed as a previous value; ,
A change unit for changing the previous value used in the second simulation,
The change unit is an inspection apparatus that calculates a value used for the change by analyzing a branch logic included in the model or sets a value used for the change as a preset value.
JP2016021480A 2016-02-08 2016-02-08 Inspection device Pending JP2017142554A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016021480A JP2017142554A (en) 2016-02-08 2016-02-08 Inspection device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016021480A JP2017142554A (en) 2016-02-08 2016-02-08 Inspection device

Publications (1)

Publication Number Publication Date
JP2017142554A true JP2017142554A (en) 2017-08-17

Family

ID=59628529

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016021480A Pending JP2017142554A (en) 2016-02-08 2016-02-08 Inspection device

Country Status (1)

Country Link
JP (1) JP2017142554A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022502774A (en) * 2018-09-28 2022-01-11 ジーメンス インダストリー ソフトウェア エヌ・フェーSiemens Industry Software NV Methods and equipment for verifying software systems

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2022502774A (en) * 2018-09-28 2022-01-11 ジーメンス インダストリー ソフトウェア エヌ・フェーSiemens Industry Software NV Methods and equipment for verifying software systems
JP7230186B2 (en) 2018-09-28 2023-02-28 シーメンス インダストリー ソフトウェア インコーポレイテッド Method and apparatus for validating software systems

Similar Documents

Publication Publication Date Title
Green et al. SIMR: An R package for power analysis of generalized linear mixed models by simulation
JP2017138978A (en) System and method for coverage-based automated test case augmentation for design models
US10719645B1 (en) Model structure analysis with integration of transformed slice
US11314225B2 (en) Systems and methods for evaluating assessments
Kaur et al. Improving the quality of software by refactoring
Eslick et al. A framework for optimization and quantification of uncertainty and sensitivity for developing carbon capture systems
Horváth et al. BuTools 2: a Rich Toolbox for Markovian Performance Evaluation.
Binh Mutation operators for Simulink models
JP2005242569A (en) Data processor design method and apparatus, and program
JP2018041373A (en) Executable program creation device, executable program creation method, and executable program creation program
Li et al. The metric for automatic code generation
CN102520949B (en) Formalized computer interlocking realization method
Debbarma et al. Static and dynamic software metrics complexity analysis in regression testing
JP2017142554A (en) Inspection device
JP2013222327A (en) Software verification device and software verification program
US10579761B1 (en) Method and system for reconstructing a graph presentation of a previously executed verification test
JP4660381B2 (en) Computer system performance evaluation apparatus, performance evaluation method, and performance evaluation program
Donat et al. Common cause failures in discrete dynamic models: Theory and applications in the Figaro modelling language
EP4231154A1 (en) Method for providing a training dataset for training and/or testing a machine learning model, method for training a machine learning model, and method for predicting timing and/or resource requirements of an unknown application running on an electronic device
JP2016200872A (en) Control program creation device, control program debug method
Gustafsson System dynamics statistics (SDS): a statistical tool for stochastic system dynamics modeling and simulation
Himmelspach Toward a collection of principles, techniques, and elements of modeling and simulation software
Inihov et al. Physical modeling of hybrid systems with rand model designer
JPWO2019142266A1 (en) Test case generation device, test case generation method, and test case generation program
CN111709118B (en) Nuclear power simulation data cooperation method and device