JP2006024006A - Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base - Google Patents

Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base Download PDF

Info

Publication number
JP2006024006A
JP2006024006A JP2004201861A JP2004201861A JP2006024006A JP 2006024006 A JP2006024006 A JP 2006024006A JP 2004201861 A JP2004201861 A JP 2004201861A JP 2004201861 A JP2004201861 A JP 2004201861A JP 2006024006 A JP2006024006 A JP 2006024006A
Authority
JP
Japan
Prior art keywords
model
source code
test case
program
information
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
JP2004201861A
Other languages
Japanese (ja)
Inventor
Hiroyuki Ihara
博之 井原
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.)
Denso Corp
Original Assignee
Denso 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 Denso Corp filed Critical Denso Corp
Priority to JP2004201861A priority Critical patent/JP2006024006A/en
Priority to US11/156,734 priority patent/US20060010429A1/en
Priority to DE102005031913A priority patent/DE102005031913A1/en
Publication of JP2006024006A publication Critical patent/JP2006024006A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

<P>PROBLEM TO BE SOLVED: To more reflect model developer's intention to a test case for a source code generated on the basis of a model. <P>SOLUTION: A personal computer 1 reads out the source code generated based on the model (step 405), reads out the allowable upper limit value, allowable lower limit value and accuracy information of input data to the model, which are included in the model (step 420), reads out a simulation state analysis result of the model (step 430), and generates a test case of the source code on the basis of the processing contents of the read source code, the information of the input data and the simulation state analysis result (step 440). <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、モデルに基づいて生成されたソースコードの処理内容に基づいて、そのソースコードのテストケースを生成するテストケース生成装置およびプログラム、モデルからソースコードの生成が妥当性を診断するソースコード生成妥当性診断装置およびプログラム、ならびにモデルベース開発プログラムに関する。   The present invention relates to a test case generation apparatus and program for generating a test case of a source code based on the processing content of the source code generated based on the model, and source code for diagnosing the validity of the source code generation from the model. The present invention relates to a generation validity diagnosis apparatus and program, and a model-based development program.

現在、例えば車両のエンジンECUの作動等、信号入出力制御のためのプログラムにおいては、開発者が直接そのプログラムのソースコードを記述せず、目的とするプログラムの機能を、より作成が簡易で視認性の良い「モデル」という形態で記述する場合がある(例えば特許文献1参照)。   Currently, in the program for signal input / output control such as the operation of the engine ECU of the vehicle, the developer does not write the source code of the program directly, and the function of the target program can be created more easily and visually. In some cases, it is described in the form of a good “model” (for example, see Patent Document 1).

開発者は、このモデルに対応したプログラム開発環境がインストールされたワークステーション、パーソナルコンピュータ等を用い、このモデルによって定義されたデータの入出力のシミュレーションを行い、また、モデルから自動的にソースコードを生成する。   The developer uses a workstation, personal computer, etc., with a program development environment that supports this model, and simulates the input / output of the data defined by this model. Generate.

モデルからソースコードを生成するようなプログラム開発は、モデルベース開発と呼ばれる。このモデルベース開発においてソースコードを生成するためのコード生成ツール、シミュレーションのためのシミュレーションツール等のプログラムは、統合環境としてのモデルベース開発プログラムの一部として提供されることが多い。   Program development that generates source code from a model is called model-based development. In this model-based development, programs such as a code generation tool for generating source code and a simulation tool for simulation are often provided as part of a model-based development program as an integrated environment.

モデルベース開発に対応したプログラム開発環境としては、例えば、Mathworks(登録商標)社のMatlab(登録商標)がある。Matlab(登録商標)においては、開発者はMatlab(登録商標)に対する付加機能を提供するソフトウェアであるSimulink(登録商標)を用いて、目的とするデータ入出力を表現するモデルを記述する。   As a program development environment corresponding to model-based development, there is Matlab (registered trademark) of Mathworks (registered trademark), for example. In Matlab (registered trademark), a developer describes a model that expresses target data input / output using Simulink (registered trademark), which is software that provides an additional function to Matlab (registered trademark).

モデルは、データ演算、データ入力およびデータ出力のうち少なくともいずれか1つの機能を実現する機能単位としてのブロック、およびブロック間の入出力関係を示す結線の組み合わせとして記述される。すなわち、複数のブロックが結線によって繋ぎ合わされることにより、車両制御等のデータ入出力を表現する集合体がモデルである。   The model is described as a combination of a block as a functional unit that realizes at least one of data calculation, data input, and data output, and a connection indicating an input / output relationship between the blocks. In other words, an aggregate that represents data input / output such as vehicle control by connecting a plurality of blocks by connection is a model.

このようなモデルベース開発環境においては、モデルやソースコードの品質評価を行うことが多い。品質評価とは、当該モデル、ソースコードが、プログラムの製品としてどのような品質を有しているかを、種々の基準から評価することをいう。品質評価の基準としては、例えばモデル中に実行されない分岐先があるか否か(すなわちカバレッジ)等がある。   In such a model-based development environment, quality evaluation of models and source code is often performed. Quality evaluation means evaluating the quality of the model and source code as a program product based on various criteria. The quality evaluation criteria include, for example, whether or not there is a branch destination that is not executed in the model (that is, coverage).

これらの品質評価には、モデルからソースコードへの変換が意図した通り適正に行われているか、すなわち、モデルによって記述された入出力の機能がソースコードに正しく反映されているか、を判断するという目的もある。   In these quality assessments, it is judged whether the conversion from the model to the source code is performed properly as intended, that is, whether the input / output functions described by the model are correctly reflected in the source code. There is also a purpose.

ソースコードの品質評価を行うためのツールとしては、ATG(Automatic Test case Generation)と呼ばれるものがある。ATGは、ソースコードの内容(例えば命令分岐の条件等)を解析し、できるだけ多くの命令分岐先の処理が実行されるようなテスト用入力データ(以降テストケースと記す)を生成する機能を有する。
特開平2000−20291号公報
As a tool for evaluating the quality of source code, there is a tool called ATG (Automatic Test Case Generation). The ATG has a function of analyzing the contents of the source code (for example, instruction branch conditions) and generating test input data (hereinafter referred to as test cases) in which as many instruction branch destination processes as possible are executed. .
Japanese Patent Laid-Open No. 2000-20291

しかし、このようなソースコードの内容のみに基づいて生成されるテストケースは、そのソースコードの元となったモデルの作成時に開発者が想定した入力データの性質(例えば範囲、精度)を反映しているとは言えない。したがって、ソースコードの内容のみに基づいて生成されるテストケースが、ソースコードの実行テストのためには不足がある場合、またはソースコードの実行のためには不必要なものを有している場合等が発生する可能性がある。   However, test cases generated based only on the contents of such source code reflect the nature (eg, range and accuracy) of the input data assumed by the developer when creating the model from which the source code was based. I can't say that. Therefore, when the test cases generated based only on the contents of the source code are insufficient for the execution test of the source code, or there are things that are unnecessary for the execution of the source code Etc. may occur.

本発明は上記点に鑑み、モデルに基づいて生成されたソースコードのためのテストケースを、よりモデル開発者の意図を反映したものにすることを第1の目的とする。   In view of the above points, the first object of the present invention is to make the test case for the source code generated based on the model more reflective of the intention of the model developer.

また、ATGによって生成されたテストケースは、ソースコードの内容に基づいたテストケースであることを踏まえ、このテストケースを入力として、そのソースコードの元となるモデルのシミュレーションを行うことで、モデルに基づくソースコードの生成の妥当性の診断を行うことを第2の目的とする。   In addition, based on the fact that the test case generated by ATG is a test case based on the contents of the source code, this test case is used as an input, and the model that is the source code is simulated, The second object is to diagnose the validity of the generation of the source code based on it.

上記第1の目的を達成するための本発明の特徴は、テストケース生成装置が、モデルに基づいて生成されたソースコードを読み出し、また、そのモデル内の情報を読み出し、読み出したソースコードの処理内容および読み出したモデル内の情報に基づいて、そのソースコードのテストケースを生成するようになっていることである。   A feature of the present invention for achieving the first object is that the test case generation device reads source code generated based on a model, reads information in the model, and processes the read source code The test case of the source code is generated based on the contents and the information in the read model.

このようになっていることで、テストケースは、ソースコードの内容に加え、そのモデル内の情報に基づいて生成されるので、よりモデル開発者の意図を反映したものとなっている。   In this way, since the test case is generated based on the information in the model in addition to the contents of the source code, it more reflects the intention of the model developer.

また、読み出す対象となるモデル内の情報は、具体的には、当該モデルへの入力データの許容上限値および許容下限値のうち少なくとも1つであるようになっていてもよい。このようになっていることで、生成されるテストケースは、許容上限値および許容下限値のいずれか1つが勘案されたものとなる。   In addition, the information in the model to be read may be specifically at least one of an allowable upper limit value and an allowable lower limit value of input data to the model. As a result, the generated test case takes into account one of the allowable upper limit value and the allowable lower limit value.

また、読み出す対象となるモデル内の情報は、具体的には、当該モデルへの入力データの精度情報であるようになっていてもよい。このようになっていることで、生成されるテストケースは、この精度情報が勘案されたものとなる。   In addition, the information in the model to be read may be specifically accuracy information of input data to the model. As a result, the generated test case takes into account this accuracy information.

また、このような第1の特徴を有するテストケース生成装置として実現された発明は、そのテストケース生成装置の機能を演算装置に実現させるためのプログラムとしても実現可能である。   The invention realized as a test case generation device having such a first feature can also be realized as a program for causing an arithmetic unit to realize the function of the test case generation device.

そして、そのようなプログラムは、制御の処理動作を記述するモデルに基づいてソースコードを生成する機能を演算装置に実現させるモデルベース開発プログラムの構成要素となり得る。   Such a program can be a component of a model-based development program that causes an arithmetic unit to realize a function of generating a source code based on a model describing a control processing operation.

また、上記第1の目的を達成するための本発明の第2の特徴は、テストケース生成装置が、モデルに基づいて生成されたソースコードを読み出し、また、モデルのシミュレーション状況解析結果を読み出し、読み出したソースコードの処理内容および読み出した解析結果の情報に基づいて、そのソースコードのテストケースを生成するようになっていることである。   The second feature of the present invention for achieving the first object described above is that the test case generation device reads the source code generated based on the model, and reads the simulation state analysis result of the model. The test case of the source code is generated based on the processing content of the read source code and the information of the read analysis result.

このようになっていることで、テストケースは、ソースコードの内容に加え、そのソースコードの元となったモデルのシミュレーション状況解析結果に基づいて生成されるので、よりモデル開発者の意図を反映したものとなっている。   In this way, the test case is generated based on the simulation status analysis result of the model that the source code is based on in addition to the contents of the source code, so it more reflects the intention of the model developer. It has become.

具体的には、対象となるモデルが、前段にあるモデルの処理結果の出力を入力として受けるようになっている場合は、シミュレーション状況解析結果として、その前段のモデルの当該出力データの情報を読み出し、その出力データの情報に基づいて、ソースコードのテストケースを生成するようになっていてもよい。このようになっていることで、生成されるテストケースは、そのテストケースの対象となるソースコードの元のモデルへの入力データの情報が勘案されたものとなる。   Specifically, when the target model receives the output of the processing result of the previous model as an input, the information of the output data of the previous model is read as the simulation status analysis result. The test case of the source code may be generated based on the information of the output data. In this way, the generated test case takes into account the information of the input data to the original model of the source code that is the target of the test case.

また、読み出す対象となる解析結果は、具体的には、当該入力データの上限値および下限値のうち少なくとも1つであるようになっていてもよい。このようになっていることで、生成されるテストケースは、当該モデルが入力を受けるデータの上限値および下限値のいずれか1つが勘案されたものとなる。   The analysis result to be read may be specifically at least one of an upper limit value and a lower limit value of the input data. In this way, the generated test case takes into account any one of the upper limit value and the lower limit value of data that the model receives input.

また、このような第2の特徴を有するテストケース生成装置として実現された発明は、そのテストケース生成装置の機能を演算装置に実現させるためのプログラムとしても実現可能である。   The invention realized as a test case generation device having the second feature as described above can also be realized as a program for causing an arithmetic unit to realize the function of the test case generation device.

そして、そのようなプログラムは、制御の処理動作を記述するモデルに基づいてソースコードを生成する機能を演算装置に実現させるモデルベース開発プログラムの構成要素となり得る。   Such a program can be a component of a model-based development program that causes an arithmetic unit to realize a function of generating a source code based on a model describing a control processing operation.

また、上記第2の目的を達成する本発明の第3の特徴は、ソースコード生成妥当性診断装置が、モデルから生成されたソースコードの内容に基づいて生成されたテストケースが前記モデルへ入力されることで行われた前記モデルのシミュレーションの結果に基ついて、そのソースコード生成の妥当性についての表示用の情報を記憶媒体に記憶させるようになっていることである。   The third feature of the present invention that achieves the second object described above is that the source code generation validity diagnosis device inputs a test case generated based on the contents of the source code generated from the model to the model. Based on the result of the simulation of the model performed as described above, the display information about the validity of the source code generation is stored in the storage medium.

このようにすることで、モデルに基づくソースコードの生成の妥当性の表示が行われる。   By doing so, the validity of the source code generation based on the model is displayed.

具体的には、ソースコード生成妥当性診断装置は、上記のテストケースがモデルへ入力されることで行われたモデルのシミュレーションの結果として、そのシミュレーションによって実行されなかったモデルの部分の情報を読み出し、この実行されなかったモデルの部分の情報に基づいて、前記ソースコード生成の妥当性についての表示用の情報を記憶媒体に記憶させるようになっていてもよい。   Specifically, the source code generation validity diagnostic device reads out information on the part of the model that was not executed by the simulation as a result of the simulation of the model performed by inputting the above test case into the model. The display information about the validity of the source code generation may be stored in a storage medium based on the information of the model portion that has not been executed.

また、このような第3の特徴を有するソースコード生成不適正部分表示装置として実現された発明は、そのソースコード生成不適正部分表示装置の機能を演算装置に実現させるためのプログラムとしても実現可能である。   Further, the invention realized as the source code generation inappropriate partial display device having the third feature as described above can also be realized as a program for causing the arithmetic unit to realize the function of the source code generation inappropriate partial display device. It is.

そして、そのようなプログラムは、制御の処理動作を記述するモデルに基づいてソースコードを生成する機能を演算装置に実現させるモデルベース開発プログラムの構成要素となり得る。   Such a program can be a component of a model-based development program that causes an arithmetic unit to realize a function of generating a source code based on a model describing a control processing operation.

また、本発明は、制御の処理動作を記述するモデルに基づいてソースコードを生成する手順と、生成されたソースコードを読み出す手順と、当該モデル内の情報を読み出す手順と、読み出されたソースコードの処理内容および読み出されたモデル内の情報に基づいて、当該ソースコードのテストケースを生成する手順と、生成されたテストケースを入力として、当該モデルのシミュレーションを行う手順と、を備えたモデルベース開発方法としても把握することができる。   In addition, the present invention provides a procedure for generating source code based on a model that describes a processing operation of control, a procedure for reading the generated source code, a procedure for reading information in the model, and a read source Based on the processing contents of the code and the information in the read model, a procedure for generating a test case of the source code and a procedure for simulating the model with the generated test case as an input are provided. It can also be understood as a model-based development method.

また、本発明は、制御の処理動作を記述するモデルに基づいてソースコードを生成する手順と、当該モデルのシミュレーションを行う手順と、当該モデルのシミュレーション状況の解析を行う手順と、生成されたソースコードを読み出す手順と、当該モデルのシミュレーション状況解析結果を読み出す手順と、読み出されたソースコードの処理内容および読み出された解析結果に基づいて、ソースコードのテストケースを生成する手順と、を備えたモデルベース開発方法としても把握することができる。   In addition, the present invention provides a procedure for generating source code based on a model describing a processing operation of control, a procedure for performing simulation of the model, a procedure for analyzing simulation status of the model, and a generated source A procedure for reading the code, a procedure for reading the simulation status analysis result of the model, and a procedure for generating a test case of the source code based on the processing content of the read source code and the read analysis result. It can also be understood as a model-based development method provided.

以下、本発明の一実施形態について説明する。図1に、本実施形態に係るモデル自動結合装置としてのパーソナルコンピュータ1の構成を示す。このパーソナルコンピュータ1は、ディスプレイ11、入力装置12、RAM13、ROM14、HDD(ハードディスクドライブ)15、CPU(演算装置に相当する)16等から構成される。   Hereinafter, an embodiment of the present invention will be described. FIG. 1 shows a configuration of a personal computer 1 as an automatic model combining apparatus according to this embodiment. The personal computer 1 includes a display 11, an input device 12, a RAM 13, a ROM 14, an HDD (hard disk drive) 15, a CPU (corresponding to a computing device) 16, and the like.

ディスプレイ11は、CPU16から受けた映像信号を、ユーザ(開発者)に対して映像として表示する。   The display 11 displays the video signal received from the CPU 16 as a video for the user (developer).

入力装置12は、キーボード、マウス等から構成され、ユーザが操作することにより、その操作に応じた信号をCPU16に出力する。   The input device 12 includes a keyboard, a mouse, and the like, and outputs a signal corresponding to the operation to the CPU 16 when operated by the user.

RAM13は読み出し、書き込み可能な揮発性メモリであり、ROM14は読み出し専用の不揮発性メモリであり、HDD15は読み出し、書き込み可能な不揮発性メモリである。ROM14、HDD15には、CPU16が読み出して実行するプログラム等があらかじめ記憶されている。またHDD15には、後述するモデルが記憶されている。  The RAM 13 is a readable / writable volatile memory, the ROM 14 is a read-only nonvolatile memory, and the HDD 15 is a readable / writable nonvolatile memory. In the ROM 14 and the HDD 15, programs that are read and executed by the CPU 16 are stored in advance. The HDD 15 stores a model to be described later.

RAM13は、CPU16がROM14、HDD15に記憶されたプログラムを実行する際に、そのプログラムを一時的に保存するための記憶領域、および作業用のデータを一時的に保存するための記憶領域として用いられる。   The RAM 13 is used as a storage area for temporarily storing the program when the CPU 16 executes the program stored in the ROM 14 and the HDD 15 and a storage area for temporarily storing work data. .

CPU16は、パーソナルコンピュータ1に電源が投入されることによって起動すると、ROM14から所定のブートプログラムを読み出して実行し、このブートプログラムに規定されるオペレーティングシステム(以下OSと記す)その他のプログラムをHDD15から読み出して実行することにより、起動処理を行う。起動処理以後、電源が遮断されるまで、CPU16は、入力装置12からの信号、OSによって予め定められたスケジュール等に基づいて、HDD15に記録されている各種プログラムを当該OS上のプロセスとして実行する。また、上記の起動処理およびプロセスにおいて、CPU16は必要に応じて入力装置12から信号の入力を受け付け、またディスプレイ11に映像信号を出力し、またRAM13、HDD15に対してデータの読み出し/書き込みの制御を行う。   When the personal computer 1 is activated when the personal computer 1 is turned on, the CPU 16 reads and executes a predetermined boot program from the ROM 14, and loads an operating system (hereinafter referred to as OS) and other programs defined in the boot program from the HDD 15. The activation process is performed by reading and executing. After the startup process, until the power is turned off, the CPU 16 executes various programs recorded in the HDD 15 as processes on the OS based on a signal from the input device 12, a schedule predetermined by the OS, and the like. . In the startup process and process, the CPU 16 receives a signal input from the input device 12 as necessary, outputs a video signal to the display 11, and controls data read / write to the RAM 13 and the HDD 15. I do.

本実施形態のCPU16は、車両制御のためのECUにおいて実行させるCソースコードをモデルから生成するための統合開発環境として、後述するプログラム群を実行するようになっている。   The CPU 16 of the present embodiment is configured to execute a group of programs to be described later as an integrated development environment for generating C source code to be executed by the ECU for vehicle control from the model.

以下、CPU16がプログラムを実行することによって行う処理を、そのプログラム自体が行う処理であるとして説明を行う。   Hereinafter, the processing performed by the CPU 16 executing the program will be described as processing performed by the program itself.

図2に、この統合開発環境としてのモデルベース開発プログラム100の構成を示す。モデルベース開発プログラム100は、自動コード生成プログラム110、モデル情報抽出プログラム120、自動テストケース生成プログラム130、Cソースコード実行プログラム140、モデルシミュレーションプログラム150、モデルシミュレーション状況解析プログラム160、実行結果比較プログラム170、および結果表示プログラム180のプログラム群から構成される。これらプログラム群は、それぞれユーザの入力装置12を用いた実行開始の操作に基づいて、その実行が開始される。   FIG. 2 shows the configuration of the model-based development program 100 as the integrated development environment. The model base development program 100 includes an automatic code generation program 110, a model information extraction program 120, an automatic test case generation program 130, a C source code execution program 140, a model simulation program 150, a model simulation situation analysis program 160, and an execution result comparison program 170. And a group of programs of the result display program 180. The execution of these program groups is started based on an operation of starting execution using the input device 12 of the user.

自動コード生成プログラム110は、ユーザによってよって作成され、HDD15に記憶されているモデル210を読み出し、この読み出したモデル210の示すデータ入出力処理を実現するための処理が記述されたCソースコードを生成する。自動コード生成プログラムの例としては、Mathworks(登録商標)社のReal Time Workshop(登録商標)がある。なお、モデルは、モデルエディタ等のモデル作成用プログラムをCPU16が実行し、その実行時にユーザがモデル作成のための作業を入力装置12を用いて行うことで、作成されるようなっていてもよい。このようなモデルエディタもモデルベース開発プログラム100に含まれていてもよい。   The automatic code generation program 110 reads a model 210 created by a user and stored in the HDD 15, and generates C source code in which processing for realizing data input / output processing indicated by the read model 210 is described. To do. An example of an automatic code generation program is Real Time Workshop (registered trademark) of Mathworks (registered trademark). The model may be created when the CPU 16 executes a model creation program such as a model editor and the user performs a model creation work using the input device 12 at the time of execution. . Such a model editor may also be included in the model base development program 100.

ここで、モデルについて説明する。モデルは、時系列の中でのデータ演算、データ入力およびデータ出力のうち少なくともいずれか1つの機能を表すブロック、およびブロック間の入出力関係を示す結線の組み合わせとして記述される。モデルの例としては、Mathworks(登録商標)社のSimulink(登録商標)モデルがある。   Here, the model will be described. The model is described as a combination of blocks representing at least one of the functions of data calculation, data input and data output in time series, and a connection indicating an input / output relationship between the blocks. An example of the model is the Simulink (registered trademark) model of Mathworks (registered trademark).

図3に、モデルの一例を図示する。図2中の図形31〜42がブロックを表し、これらブロック間を繋ぐ矢印線が結線を表す。   FIG. 3 illustrates an example of the model. The figures 31 to 42 in FIG. 2 represent blocks, and the arrow lines connecting these blocks represent the connections.

入力ブロック31、32は、外部からのデータの入力を受け、その受けたデータを結線の後段(矢印側)に出力する機能を表す。定数ブロック33〜36は、時間的に変化しない定数を結線の後段に出力する機能を表す。定数の具体的な値は、定数ブロック毎に開発者が設定することができる。2項加算ブロック37は、2つの結線を介して受けたデータを加算して結線の後段に出力する機能を表す。遅延ブロック38は、結線を介して受けたデータを所定時間分遅延させて結線の後段に出力する機能を表す。   The input blocks 31 and 32 represent a function of receiving external data input and outputting the received data to the subsequent stage of connection (arrow side). The constant blocks 33 to 36 represent functions for outputting constants that do not change with time to the subsequent stage of the connection. The specific value of the constant can be set by the developer for each constant block. The binary addition block 37 represents a function of adding data received via two connections and outputting the result to the subsequent stage of the connection. The delay block 38 represents a function of delaying the data received through the connection by a predetermined time and outputting it to the subsequent stage of the connection.

スイッチブロック39、40は、結線を介して受けた条件入力のデータの値が1であるかそれ以外であるかに応じて、他の2つの結線を介して受けた2つの選択入力データのうちいずれかを結線の後段に出力する機能を表す。図3中においては、スイッチブロック39、40への入力の結線のうち、中段の結線が条件入力を示し、上段および下段の結線が選択入力を示している。   The switch blocks 39 and 40, depending on whether the value of the condition input data received through the connection is 1 or other than that, of the two selection input data received through the other two connections This represents the function to output either of them after the connection. In FIG. 3, among the input connections to the switch blocks 39 and 40, the middle connection indicates the condition input, and the upper and lower connections indicate the selection input.

比較ブロック41は、結線を介して受けた2つの入力データを比較し、第1の入力データが第2のデータよりも大きければ値が1のデータを、そうでなければ値がゼロのデータを、結線の後段に出力する機能を表す。   The comparison block 41 compares the two input data received through the connection, and if the first input data is larger than the second data, the value 1 is indicated, otherwise the value 0 is indicated. , Represents the function to output to the subsequent stage of the connection.

出力ブロック42は、結線を介して受けたデータを外部に出力する機能を有する。   The output block 42 has a function of outputting data received via the connection to the outside.

このようなブロック31〜42および結線の組み合わせから成る図3のモデルにおいては、入力ブロック31へ外部から入力されたデータの値が1以外であり続ける限り、スイッチブロック39からは、遅延ブロック38による遅延時間毎に1だけ増える値が出力され、その出力が1000未満ならば、定数ブロック350の出力である760の値が外部に出力され、1000以上ならば、入力ブロック32へ外部から入力された値が外部に出力される。また、入力ブロック31へ外部から入力されたデータの値が1の場合、スイッチブロック39の出力はゼロにリセットされる。   In the model of FIG. 3 composed of such a combination of blocks 31 to 42 and connection, as long as the value of data input from the outside to the input block 31 remains other than 1, the switch block 39 causes the delay block 38 to A value that increases by 1 is output for each delay time. If the output is less than 1000, the value of 760, which is the output of the constant block 350, is output to the outside. If the output is 1000 or more, the value is input to the input block 32 from the outside. The value is output externally. When the value of data input from the outside to the input block 31 is 1, the output of the switch block 39 is reset to zero.

このように、モデルは、複数のブロックが結線によって繋ぎ合わされることで構成され、その繋ぎ合わせの構造によって、外部とのデータ入出力を表現するようになっている。   In this manner, the model is configured by connecting a plurality of blocks by connection, and expresses data input / output with the outside by the connection structure.

なお、本実施形態においては、モデルは、各ブロックへの入力データの許容最大値、許容最小値、および精度の情報を所定の形式で埋め込むことができるようになっている。例えば、上記のモデルエディタによって、入力装置12を用いて各ブロックの付加情報を入力することができるようになっていてもよい。この場合、所定の形式とは、付加情報中の所定の項目として記憶されることをいう。なお、この情報は、自動コード生成プログラム110によって生成されるCソースコードの表す処理内容には反映されない。   In the present embodiment, the model can embed information on the maximum allowable value, minimum allowable value, and accuracy of input data to each block in a predetermined format. For example, the additional information of each block may be input using the input device 12 by the model editor. In this case, the predetermined format means that it is stored as a predetermined item in the additional information. This information is not reflected in the processing content represented by the C source code generated by the automatic code generation program 110.

図4に、自動コード生成プログラム110が図3に示したモデルに基づいて生成したCソースコードを示す。このCソースコードにおいては、入力ブロック31、32がそれぞれ変数In1、In2として表現され、出力ブロック42が変数Outとして表現され、スイッチブロック39の機能がifブロック45によって表現され、スイッチブロック40、比較ブロック41、出力ブロック42の機能がifブロック46によって表現されている。   FIG. 4 shows C source code generated by the automatic code generation program 110 based on the model shown in FIG. In this C source code, the input blocks 31 and 32 are represented as variables In1 and In2, respectively, the output block 42 is represented as a variable Out, the function of the switch block 39 is represented by an if block 45, the switch block 40 and the comparison The functions of the block 41 and the output block 42 are expressed by an if block 46.

モデル情報抽出プログラム120は、自動コード生成プログラム110によって生成されたCソースコードの元となるモデル210をHDD15から読み出し、その読み出したモデルの各ブロックに埋め込まれた入力データの許容最大値、許容最小値、および精度の情報を読み出し、その読み出したデータを自動テストケース生成プログラム130に渡す。   The model information extraction program 120 reads from the HDD 15 the model 210 that is the source of the C source code generated by the automatic code generation program 110, and the allowable maximum value and the allowable minimum of the input data embedded in each block of the read model. The value and accuracy information are read, and the read data is passed to the automatic test case generation program 130.

なお、本実施形態において、あるプログラムが他のプログラムにデータを渡すとは、渡し元のプログラムがHDD15またはRAM13中に、渡し先のプログラムが読み出すことになっている所定の形式(格納領域、ファイル名)で、当該データを記憶させることをいう。   In the present embodiment, when a program transfers data to another program, the transfer source program reads the predetermined program (storage area, file, etc.) that the transfer destination program reads into the HDD 15 or RAM 13. Name) means to store the data.

自動テストケース生成プログラム130は、モデルシミュレーション状況解析プログラム160およびモデル情報抽出プログラム120から渡されたデータ、および自動コード生成プログラム110によって生成されたCソースコードに基づいて、テストケース230を生成し、HDD15に記憶させる。テストケースとは、モデル、および自動コード生成プログラム110によって当該モデルから生成されたCソースコードの品質を検査するための処理(例えばカバレッジテスト)の実行において、その品質検査が十分となるよう、当該モデルやソースコードに入力するテスト用データである。品質検査が十分となるようなテストケースとは、例えば、できる限りそのモデルの全てのブロックまたはCソースコードの全ての命令文が実行されるようなバラエティを持った入力データである。なお、品質検査は、生成されたCソースコード全体について行う場合と、そのCソースコードに含まれる関数等の所定の実行単位部分毎に独立に行われる場合がある。ここでいう入力データとは、品質検査が行われる対象の部分に入力されるデータをいう。この自動テストケース生成プログラム130の処理の詳細については後述する。なお、モデルの一部も、ブロックと結線の組み合わせとなっているので、モデルであるということができる
Cソースコード実行プログラム140は、自動コード生成プログラム110によって生成されたCソースコードの実行単位に記載された処理内容を実行する。この実行の目的の1つは、上記の品質検査である。そして、その実行の際、入力データは自動テストケース生成プログラム130によって生成されたテストケース230を用いる。そしてCソースコード実行プログラム140は、実行したCソースコードの実行単位による出力データ、および実行した命令文の時系列的なリストを、実行結果データ240として、HDD15に記憶させる。
The automatic test case generation program 130 generates a test case 230 based on the data passed from the model simulation situation analysis program 160 and the model information extraction program 120 and the C source code generated by the automatic code generation program 110. It is stored in the HDD 15. A test case refers to a model and a process for inspecting the quality of C source code generated from the model by the automatic code generation program 110 (for example, coverage test) so that the quality inspection is sufficient. Test data to be input to the model and source code. The test case where the quality inspection is sufficient is, for example, input data having a variety such that all the blocks of the model or all the statements of the C source code are executed as much as possible. The quality inspection may be performed on the entire generated C source code or may be performed independently for each predetermined execution unit portion such as a function included in the C source code. The input data here refers to data that is input to a portion to be subjected to quality inspection. Details of the processing of the automatic test case generation program 130 will be described later. Since part of the model is also a combination of blocks and connections, the C source code execution program 140, which can be called a model, is used as an execution unit of the C source code generated by the automatic code generation program 110. The described processing content is executed. One purpose of this execution is the quality inspection described above. During the execution, the test data 230 generated by the automatic test case generation program 130 is used as input data. The C source code execution program 140 causes the HDD 15 to store the output data of the executed C source code in the execution unit and the time-series list of executed statements as the execution result data 240.

モデルシミュレーションプログラム150は、自動コード生成プログラム110によって生成されたCソースコードの元となるモデル210をHDD15から読み出し、そのモデルのシミュレーションを実行する。シミュレーションとは、そのモデルの表現するデータの入出力の時間変化をパーソナルコンピュータ1上で再現する処理をいう。なお、モデルのシミュレーションにおいても、モデル全体ではなく、その実行単位毎にシミュレーションを行ってもよい。   The model simulation program 150 reads the model 210 that is the source of the C source code generated by the automatic code generation program 110 from the HDD 15 and executes simulation of the model. The simulation refers to a process of reproducing on the personal computer 1 a time change of input / output of data represented by the model. In the simulation of the model, the simulation may be performed for each execution unit instead of the entire model.

なお、Cソースコード実行プログラム140で実行するソースコードの実行単位は、モデルシミュレーションプログラム150で実行するモデルの実行単位部分から生成されるソースコードである。すなわち、Cソースコード実行プログラム140で実行されるCソースコードの実行単位と、モデルシミュレーションプログラム150で実行されるモデルの実行単位とは対応している。   The source code execution unit executed by the C source code execution program 140 is a source code generated from the execution unit portion of the model executed by the model simulation program 150. That is, the execution unit of the C source code executed by the C source code execution program 140 corresponds to the execution unit of the model executed by the model simulation program 150.

このシミュレーションにおいて、外部からのデータの入力としては、自動テストケース生成プログラム130によって生成されたテストケース230用いる。そしてモデルシミュレーションプログラム150は、そのモデルのシミュレーションによる外部への出力データ、ならびに各ブロック毎の実行時間および入出力データを、実行結果データ240として、HDD15に記憶させ、さらにモデルシミュレーション状況解析プログラム160に渡す。なお、スイッチブロック等については、選択入力のうちどちらを出力したかの情報も実行結果データ240に含める。   In this simulation, the test case 230 generated by the automatic test case generation program 130 is used as external data input. Then, the model simulation program 150 stores the output data to the outside by the simulation of the model, the execution time and input / output data for each block in the HDD 15 as the execution result data 240, and further stores it in the model simulation situation analysis program 160. hand over. For the switch block and the like, information indicating which of the selection inputs is output is included in the execution result data 240.

モデルシミュレーション状況解析プログラム160は、モデルシミュレーションプログラム150から渡された実行結果データを解析し、自動コード生成プログラム110によって生成されたCソースコードの妥当性、すなわちモデルベース開発プログラム100の処理の妥当性を判断し、さらに、テストケース生成用データを生成し、それを自動テストケース生成プログラム130に渡す。このモデルシミュレーション状況解析プログラム160の処理の詳細については後述する。   The model simulation situation analysis program 160 analyzes the execution result data passed from the model simulation program 150, and the validity of the C source code generated by the automatic code generation program 110, that is, the validity of the processing of the model base development program 100. Furthermore, the test case generation data is generated and passed to the automatic test case generation program 130. Details of the processing of the model simulation situation analysis program 160 will be described later.

実行結果比較プログラム170は、Cソースコード実行プログラム140およびモデルシミュレーションプログラム150によってHDD15に記憶された実行結果データ240を読み出し、その実行結果を比較し、その比較結果を結果表示プログラム180に渡す。なお、比較とは、モデルシミュレーションプログラム150がシミュレーションを行ったモデルと、自動コード生成プログラム110がそのモデルに基づいて生成したCソースコードの、それぞれの実行結果のデータの比較をいう。比較項目としては、同じ入力データに対してそれぞれのモデル、Cソースコードが出力したデータがある。そして実行結果比較プログラム170は、比較の結果、それぞれが合致しているか否かの合否判定を行い、その合否判定の情報も結果表示プログラム180に渡す。   The execution result comparison program 170 reads the execution result data 240 stored in the HDD 15 by the C source code execution program 140 and the model simulation program 150, compares the execution results, and passes the comparison results to the result display program 180. Note that the comparison refers to a comparison of execution result data of the model simulated by the model simulation program 150 and the C source code generated by the automatic code generation program 110 based on the model. As a comparison item, there is data output by each model and C source code for the same input data. Then, the execution result comparison program 170 makes a pass / fail judgment as to whether or not the results match, and passes the pass / fail judgment information to the result display program 180.

結果表示プログラム180は、実行結果比較プログラム170およびモデルシミュレーション状況解析プログラム160から渡されたデータをディスプレイ11に出力する。   The result display program 180 outputs the data passed from the execution result comparison program 170 and the model simulation situation analysis program 160 to the display 11.

次に、上述のモデルシミュレーション状況解析プログラム160の具体的な処理について説明する。図5に、このモデルシミュレーション状況解析プログラム160のフローチャートを示す。モデルシミュレーション状況解析プログラム160は、まずステップ605で、モデルシミュレーションプログラム150によって渡された実行結果データを読み出す。   Next, specific processing of the above-described model simulation situation analysis program 160 will be described. FIG. 5 shows a flowchart of the model simulation situation analysis program 160. The model simulation situation analysis program 160 first reads out the execution result data passed by the model simulation program 150 in step 605.

続いてステップ610で、この実行結果のデータに基づいて、当該モデルのうち、実行されなかった部分を抽出する。実行されなかった部分とは、実行時間がゼロのブロック、および、スイッチブロックにおいて全く出力されなかった選択入力の部分をいう。   Subsequently, in step 610, a portion of the model that has not been executed is extracted based on the data of the execution result. The part that has not been executed means a block whose execution time is zero and a part of a selection input that has not been output at all in the switch block.

続いてステップ620で、ステップ610で抽出した、スイッチブロックにおいて全く出力されなかった選択入力の部分のうち、その部分を有するスイッチブロックの条件入力データが定数となっているものを、抽出した部分のグループから除外する。なお、当該部分を有するスイッチブロックの条件入力に結線を介して出力しているものが定数ブロックの場合にのみ、当該部分を除外するようになっていてもよい。   Subsequently, in step 620, among the selected input parts extracted in step 610 and not output at all in the switch block, the condition input data of the switch block having the part is a constant, Exclude from group. It should be noted that the portion may be excluded only when the condition block that outputs the conditional input of the switch block having the portion is a constant block.

このように、実行されなかった部分を抽出し、さらにそのうち、条件入力データが定数となっているスイッチブロックに含まれる部分を除外することで、結果として、ソースコードの生成が妥当でないと推定される部分が抽出される。   In this way, the part that was not executed is extracted, and the part included in the switch block whose condition input data is a constant is excluded. As a result, it is estimated that the source code generation is not valid. Are extracted.

これは、自動テストケース生成プログラム130によって生成されたテストケースは、当該Cソースコードの全ての分岐をできる限り実行するようなバリエーションを有しているはずであり、そのようなテストケースをモデルに入力したにもかかわらず、実行されなかった部分があるということは、自動コード生成プログラム110の当該モデル部分の処理に妥当でない部分があった可能性が高いという推定に基づくものである。なお、条件入力データが定数となっている部分について除外するのは、元々モデル中のスイッチブロックへの条件入力データが定数ならば、自動コード生成プログラム110の処理が妥当であっても、入力するテストケースの値に関わらずそのスイッチブロックの一方の選択入力は出力されないからである。   This is because the test case generated by the automatic test case generation program 130 should have a variation that executes all the branches of the C source code as much as possible. The fact that there is a part that has not been executed despite the input is based on the assumption that there is a high possibility that there is a part that is not appropriate for the processing of the model part of the automatic code generation program 110. If the condition input data to the switch block in the model is a constant, the part where the condition input data is a constant is excluded even if the processing of the automatic code generation program 110 is valid. This is because one selection input of the switch block is not output regardless of the value of the test case.

続いてステップ630で、ステップ610、620の処理により抽出された、Cソースコードの生成が妥当でないと推定される部分が1つでもあるか否かを判定し、あれば、Cソースコードの生成が妥当でない旨の表示用のデータを結果表示プログラム180に渡す。   Subsequently, in step 630, it is determined whether or not there is at least one portion extracted by the processing of steps 610 and 620, and it is estimated that the generation of the C source code is not valid. If there is, the generation of the C source code is performed. The display data indicating that is not valid is passed to the result display program 180.

続いてステップ640で、ステップ605で読み出した実行結果データのうち、各ブロックの入出力データの情報を、シミュレーション状況解析結果として、自動テストケース生成プログラム130に渡す。   Subsequently, in step 640, the input / output data information of each block in the execution result data read in step 605 is passed to the automatic test case generation program 130 as a simulation state analysis result.

ステップ640の後、モデルシミュレーション状況解析プログラム160の処理は終了する。   After step 640, the process of the model simulation situation analysis program 160 ends.

続いて、自動テストケース生成プログラム130の処理の詳細について説明する。自動テストケース生成プログラム130は、まずステップ405で、今回テストケースを生成する対象となる実行単位部分のCソースコード220をHDD15から読み出す。   Next, details of the process of the automatic test case generation program 130 will be described. First, in step 405, the automatic test case generation program 130 reads from the HDD 15 the C source code 220 of the execution unit part that is the target of generating the test case this time.

続いてステップ410で、読み出したCソースコードの解析を行う。具体的には、Cソースコードに外部から(関数の引数等によって)入力することができる入力データの数、型等を特定し、また、Cソースコード中、どのような変数の条件でif文等の分岐が行われ、その条件の変数は、入力データによってどのように変化するか等の特定を行う。   In step 410, the read C source code is analyzed. Specifically, the number, type, etc. of input data that can be input to the C source code from the outside (by function arguments, etc.) are specified, and under what variable conditions in the C source code, Etc., and how the variable of the condition changes depending on the input data is specified.

続いてステップ420では、モデル情報抽出プログラム120によって渡されたモデル情報、すなわち、当該Cソースコードに相当するモデル実行単位への入力データの許容最大値、許容最小値、および精度の情報を読み出す。   Subsequently, in step 420, the model information passed by the model information extraction program 120, that is, the allowable maximum value, allowable minimum value, and accuracy information of the input data to the model execution unit corresponding to the C source code is read.

続いてステップ430では、モデル実行状況解析結果を取得する。具体的には、モデルシミュレーション状況解析プログラム160のステップ640によって渡された各ブロックの入出力データの情報を読み出す。   In step 430, the model execution situation analysis result is acquired. Specifically, the input / output data information of each block passed in step 640 of the model simulation situation analysis program 160 is read.

続いてステップ440では、ステップ410の解析結果に加え、これらモデル情報およびモデル実行状況解析結果に基づいて、テストケースを生成する。具体的には、まず、ステップ410の解析結果のみに基づいて、Cソースコード中の条件分岐先ができるだけ多く実行されるような入力データの値の群を特定する。   Subsequently, in step 440, a test case is generated based on the model information and the model execution situation analysis result in addition to the analysis result in step 410. Specifically, first, based on only the analysis result of step 410, a group of input data values that can execute as many conditional branch destinations in the C source code as possible is specified.

そして、次に、ステップ420で取得したモデル情報に基づいて、上記特定した入力データの値の群が、当該入力データについてのモデル情報中の許容最大値より大きいものを有している場合、その許容最大値より大きい値を、許容最大値より小さい値に変更する。また、上記特定した入力データ群の値が、当該入力データについてのモデル情報中の許容最小値より小さいものを有している場合、その許容最小値より小さい値を、許容最小値より大きい値に変更する。ただし、上記の変更を行う際には、この変更によって実行されなくなる条件分岐先が最も少なくなるように変更する。   Then, based on the model information acquired in step 420, if the group of values of the identified input data has a value larger than the allowable maximum value in the model information for the input data, Change the value greater than the maximum allowable value to a value smaller than the maximum allowable value. Further, when the value of the specified input data group has a value smaller than the allowable minimum value in the model information for the input data, a value smaller than the allowable minimum value is set to a value larger than the allowable minimum value. change. However, when the above change is made, the change is made so that the number of conditional branch destinations that are not executed by this change is minimized.

また、ある入力について、分岐先が切り替わる境目となる値が判っている場合、その境界値から、モデル情報中の精度と同じ値だけ上下に変化させた値を入力データに加える。例えば、ある入力データの値が0.5を超えると、Cソースコード中のある条件分岐において一方の分岐先が実行され、その値が0.5以下だと、他方の分岐先が実行されるような場合において、その入力データについての精度情報が0.1の値を有していれば、その入力データのテストケースとして、0.49および0.51を含めるようにする。   In addition, when a value that becomes a boundary at which a branch destination is switched is known for a certain input, a value obtained by changing the boundary value up and down by the same value as the accuracy in the model information is added to the input data. For example, if the value of some input data exceeds 0.5, one branch destination is executed in a certain conditional branch in the C source code, and if the value is 0.5 or less, the other branch destination is executed. In such a case, if the accuracy information about the input data has a value of 0.1, 0.49 and 0.51 are included as test cases for the input data.

また更に、モデル情報中に許容最大値または許容最小値の情報が含まれていない入力データについては、モデル実行状況解析結果を用いて、入力データの値の変更を行う。具体的には、ステップ430で取得した、各ブロックへの入力データのうち、当該Cソースコードに相当するモデル実行単位への入力データを特定し、その入力データの上限値および下限値を特定する。なお、モデル実行状況解析結果をテストケース生成に用いるか否かは、ユーザによる設定またはCPU16で実行される他のプログラムの設定によって、切り替え可能となっている。   Furthermore, for input data that does not include information on the allowable maximum value or the allowable minimum value in the model information, the value of the input data is changed using the model execution situation analysis result. Specifically, among the input data to each block acquired in step 430, the input data to the model execution unit corresponding to the C source code is specified, and the upper limit value and the lower limit value of the input data are specified. . It should be noted that whether or not the model execution situation analysis result is used for test case generation can be switched by setting by a user or setting of another program executed by the CPU 16.

そして、Cソースコードの解析結果に基づいて特定した入力データの値の群が、この特定した最大値より大きいものを有している場合、その最大値より大きい値を、その最大値より小さい値に変更する。また、Cソースコードの解析結果に基づいて特定した入力データ群の値が、この特定した最小値より小さいものを有している場合、その最小値より小さい値を、その最小値より大きい値に変更する。ただし、この変更を行う際には、この変更によって実行されなくなる条件分岐先が最も少なくなるように変更する。   When the group of input data values specified based on the analysis result of the C source code has a value larger than the specified maximum value, a value greater than the maximum value is set to a value smaller than the maximum value. Change to Further, when the value of the input data group specified based on the analysis result of the C source code has a value smaller than the specified minimum value, a value smaller than the minimum value is set to a value larger than the minimum value. change. However, when this change is made, the change is made so that the number of conditional branch destinations that are not executed by this change is minimized.

続いてステップ450では、この生成したテストケース230をHDD15に記憶させる。ステップ450の後、自動テストケース生成プログラム130の処理は終了する。   In step 450, the generated test case 230 is stored in the HDD 15. After step 450, the process of the automatic test case generation program 130 ends.

次に、図7に、結果表示プログラム180がディスプレイ11に行わせる結果表示の一例を示す。   Next, FIG. 7 shows an example of result display that the result display program 180 causes the display 11 to perform.

この表示は、比較結果表示部51および妥当性診断部52から成る。比較結果表示部51は、実行結果比較プログラム170から渡された表示用のデータを表形式で表したものである。各行は、モデルおよびCソースコードへの入力値(In1,In2)、モデルの出力値、Cソースコードの出力値、これら2つの出力値の差、およびそれぞれが合致しているか否かの合否判定の項目を、この順に含んでいる。   This display includes a comparison result display unit 51 and a validity diagnosis unit 52. The comparison result display unit 51 represents the display data passed from the execution result comparison program 170 in a table format. Each line includes an input value (In1, In2) to the model and the C source code, an output value of the model, an output value of the C source code, a difference between these two output values, and a pass / fail judgment whether or not they match. Are included in this order.

妥当性診断部52は、モデルシミュレーション状況解析プログラム160から渡された表示用のデータを表したものであり、それがCソースコードの生成処理が妥当である旨のデータであれば、図7のように“OK”の表示が為され、Cソースコードの生成処理が非妥当である旨のデータであれば、“NG”の表示が為される。   The validity diagnosis unit 52 represents the display data passed from the model simulation situation analysis program 160. If the data indicates that the C source code generation process is valid, the validity diagnosis unit 52 of FIG. Thus, “OK” is displayed, and “NG” is displayed if the data indicates that the C source code generation processing is invalid.

以上のようなモデルベース開発プログラム100のプログラム群の使用手順は以下説明する。なお、以下の手順によるプログラム群の実行は、ユーザが入力装置12を用いて手動で行ってもよいし、その手順によるプログラム群の実行を実現するようあらかじめHDD15に記憶されたプログラムをCPU16が実行するようになっていてもよい。使用手順は、以下の手順(1)〜手順(12)の通りである。
手順(1):自動コード生成プログラム110に、モデル210からCソースコード220を生成させる。
手順(2):モデル情報抽出プログラム120に、そのモデル210のモデル情報を抽出させる。
手順(3):自動テストケース生成プログラム130に、Cソースコード220およびモデル情報抽出プログラム120の出力に基づき、Cソースコード220全体に対するテストケース230を生成させる。このとき、モデルシミュレーション状況解析プログラム160の結果は用いないように設定する。
手順(4):モデルシミュレーションプログラム150に、このモデル210全体のシミュレーションを行わせる。
手順(5):モデルシミュレーション状況解析プログラム160に、モデル210のシミュレーション結果を対象とするシミュレーション状況解析(ステップ605〜640に相当する)を行わせ、モデル210の各ブロックにおける入出力データ情報をHDD15に記憶させる。
手順(6):自動テストケース生成プログラム130に、Cソースコード220、モデル情報抽出プログラム120の出力、モデルシミュレーション状況解析プログラム160の出力に基づいて、Cソースコード220中の一実行単位(例えば1つの関数)に対するテストケース230’を生成させる。
手順(7):Cソースコード実行プログラム140に、直前の手順(6)によって生成されたテストケース230’を入力として、上記のCソースコード220の一実行単位を実行させる。
手順(8):モデルシミュレーションプログラム150に、この一実行単位に対応するモデル210中の一実行単位のシミュレーションを行わせる。
手順(9):モデルシミュレーション状況解析プログラム160に、モデル210の上記一実行単位のシミュレーション結果を対象とするシミュレーション状況解析を行わせ、モデル210の上記一実行単位中の各ブロックにおける入出力データ情報をHDD15に記憶させる。
手順(10):モデルシミュレーション状況解析プログラム160に、モデル210の上記一実行単位のシミュレーション結果を対象とするシミュレーション状況解析を行わせ、モデル210の上記一実行単位各ブロックにおける入出力データ情報をHDD15に記憶させる。
手順(11):実行結果比較プログラム170に、直前のCソースコード実行プログラム140とモデルシミュレーションプログラム150についての実行結果データ240の比較を行わせる。
手順(12):結果表示プログラム180に、直前のモデルシミュレーション状況解析プログラム160および実行結果比較プログラム170の実行によって渡されたデータの表示を行わせる。
The procedure for using the program group of the model base development program 100 as described above will be described below. The execution of the program group according to the following procedure may be performed manually by the user using the input device 12, or the CPU 16 executes a program stored in the HDD 15 in advance so as to realize the execution of the program group according to the procedure. You may come to do. The usage procedure is as described in the following procedure (1) to procedure (12).
Procedure (1): The automatic code generation program 110 generates the C source code 220 from the model 210.
Procedure (2): The model information extraction program 120 is made to extract the model information of the model 210.
Procedure (3): The automatic test case generation program 130 is caused to generate a test case 230 for the entire C source code 220 based on the output of the C source code 220 and the model information extraction program 120. At this time, the result of the model simulation situation analysis program 160 is set not to be used.
Step (4): The model simulation program 150 is caused to perform simulation of the entire model 210.
Step (5): The model simulation situation analysis program 160 performs a simulation situation analysis (corresponding to steps 605 to 640) for the simulation result of the model 210, and the input / output data information in each block of the model 210 is stored in the HDD 15 Remember me.
Step (6): Based on the C source code 220, the output of the model information extraction program 120, and the output of the model simulation situation analysis program 160 in the automatic test case generation program 130, one execution unit (for example, 1) Test case 230 ′ for two functions).
Procedure (7): The C source code execution program 140 is caused to execute one execution unit of the C source code 220 with the test case 230 ′ generated by the immediately preceding procedure (6) as an input.
Step (8): The model simulation program 150 is caused to perform simulation of one execution unit in the model 210 corresponding to this one execution unit.
Step (9): The model simulation situation analysis program 160 performs simulation situation analysis on the simulation result of the one execution unit of the model 210, and input / output data information in each block in the one execution unit of the model 210 Is stored in the HDD 15.
Step (10): The model simulation situation analysis program 160 performs simulation situation analysis on the simulation result of the one execution unit of the model 210, and the input / output data information in each block of the one execution unit of the model 210 is stored in the HDD 15 Remember me.
Procedure (11): The execution result comparison program 170 is made to compare the execution result data 240 for the immediately preceding C source code execution program 140 and the model simulation program 150.
Procedure (12): The result display program 180 displays the data passed by the execution of the immediately preceding model simulation situation analysis program 160 and the execution result comparison program 170.

なお、上記の手順(6)〜手順(9)は、必要に応じて複数回繰り返してもよい。複数回としては、例えば予め決められた定数(例えば5)に基づく値であってもよいし、直前の繰り返しと今回の繰り返しで生成されたテストケースを比較し、その違いが所定の基準以下となったときの階数であってもよい。   In addition, you may repeat said procedure (6)-procedure (9) in multiple times as needed. The number of times may be, for example, a value based on a predetermined constant (for example, 5), or the test cases generated in the previous iteration and the current iteration are compared, and the difference is less than a predetermined reference. It may be the number of stories at the time.

以上のように、モデルベース開発プログラム100のプログラム群をCPU16が実行することで、パーソナルコンピュータ1は、モデルに基づいて生成されたソースコードを読み出し(図6のステップ405参照)、また、そのモデルに含まれるそのモデルへの入力データの許容上限値、許容下限値、および精度の情報を読み出し(ステップ420参照)、また、モデルのシミュレーション状況解析結果を読み出し(ステップ430参照)、読み出したソースコードの処理内容、入力データの情報、およびシミュレーション状況解析結果に基づいて、そのソースコードのテストケースを生成する(ステップ440参照)。   As described above, the CPU 16 executes the program group of the model-based development program 100, so that the personal computer 1 reads the source code generated based on the model (see step 405 in FIG. 6), and the model. The upper limit value, the allowable lower limit value, and the accuracy information of the input data to the model included in the model are read (see step 420), the simulation status analysis result of the model is read (see step 430), and the read source code The test case of the source code is generated on the basis of the processing contents of (1), the information of the input data, and the simulation state analysis result (see step 440).

このようになっていることで、テストケースは、ソースコードの内容に加え、そのソースコードの元となったモデル中に含まれる、そのモデルへの入力データの情報、および、そのソースコードの元となったモデルのシミュレーション状況解析結果に基づいて生成されるので、よりモデル開発者の意図を反映したものとなっている。   In this way, in addition to the contents of the source code, the test case includes the information of the input data to the model included in the model that is the source code source, and the source code source. Since it is generated based on the simulation result analysis result of the model that has become, it more reflects the intention of the model developer.

なお、上記実施形態では、ソースコードの内容に加え、モデルへの入力データの情報に基づきテストケースを生成しているが、入力データの情報に限るものでなく、図3の各ブロックに含まれる情報や、ブロック同士を繋ぐ結線の情報等に基づきテストケースを生成することも考えられる。   In the above embodiment, the test case is generated based on the input data information to the model in addition to the contents of the source code. However, the test case is not limited to the input data information and is included in each block of FIG. It is also conceivable to generate a test case based on information, information on connections connecting blocks, and the like.

また、対象となるモデルが、前段にあるモデルの処理結果の出力を入力として受けるようになっている場合は、シミュレーション状況解析結果として、その前段のモデルの当該出力データの情報を読み出し、その出力データの情報に基づいて、ソースコードのテストケースを生成するようになっている。   In addition, when the target model receives the output of the processing result of the model in the previous stage as an input, the information of the output data of the previous model is read as the simulation status analysis result, and the output Based on the data information, a source code test case is generated.

また、パーソナルコンピュータ1は、自動テストケース生成プログラム130によって生成されたテストケースをモデルへの入力として行われたシミュレーションの結果を読み出し(図5のステップ605参照)、その読み出した結果に基づいて、そのソースコード生成の妥当、非妥当の表示用の情報を記憶媒体に記憶させることで、結果表示プログラム180に渡すようになっている。   Further, the personal computer 1 reads the result of the simulation performed using the test case generated by the automatic test case generation program 130 as an input to the model (see step 605 in FIG. 5), and based on the read result, The display information that is appropriate and invalid for generating the source code is stored in a storage medium, and is passed to the result display program 180.

なお、上記の実施形態においては、モデルシミュレーション状況解析プログラム160は、妥当、非妥当の情報を結果表示プログラム180に出力するようになっているが、必ずしもこのようになっていなくともよい。例えば、モデルシミュレーション状況解析プログラム160をCPU16が実行することで、パーソナルコンピュータ1は、読み出されたモデルのシミュレーションの結果に基づいて、そのモデル中の、自動コード生成プログラム110の処理が妥当でないと推定される部分を抽出し、その抽出した部分の表示用の情報を記憶媒体に記憶させるようになっていてもよい。これは、例えばステップ630で、ステップ610およびステップ620で抽出された部分を表す表示用のデータを結果表示プログラム180に渡すようになっていれば実現される。   In the above-described embodiment, the model simulation situation analysis program 160 outputs valid / invalid information to the result display program 180. However, this need not be the case. For example, when the CPU 16 executes the model simulation situation analysis program 160, the personal computer 1 determines that the processing of the automatic code generation program 110 in the model is not valid based on the read simulation result of the model. The estimated part may be extracted, and display information for the extracted part may be stored in a storage medium. This can be realized if, for example, in step 630, display data representing the portion extracted in steps 610 and 620 is passed to the result display program 180.

なお、上記の実施形態において、パーソナルコンピュータ1が、テストケース生成装置、コード生成妥当性診断装置に相当する。   In the above embodiment, the personal computer 1 corresponds to a test case generation device and a code generation validity diagnosis device.

また、自動テストケース生成プログラム130が、テストケース生成プログラムに相当する。   The automatic test case generation program 130 corresponds to a test case generation program.

また、モデルシミュレーション状況解析プログラム160が、コード生成妥当性診断プログラムに相当する。   The model simulation situation analysis program 160 corresponds to a code generation validity diagnosis program.

また、CPU16が、自動テストケース生成プログラム130のステップ405を実行することで、ソースコード読出手段として機能する。   The CPU 16 functions as a source code reading unit by executing step 405 of the automatic test case generation program 130.

また、CPU16が、自動テストケース生成プログラム130のステップ420を実行することで、モデル情報読出手段として機能する。   The CPU 16 functions as a model information reading unit by executing step 420 of the automatic test case generation program 130.

また、CPU16が、自動テストケース生成プログラム130のステップ430を実行することで、シミュレーション情報読出手段として機能する。   Further, the CPU 16 functions as simulation information reading means by executing step 430 of the automatic test case generation program 130.

また、CPU16が、自動テストケース生成プログラム130のステップ410および440を実行することで、生成手段として機能する。   Further, the CPU 16 functions as a generation unit by executing steps 410 and 440 of the automatic test case generation program 130.

また、CPU16が、モデルシミュレーション状況解析プログラム160のステップ605を実行することで、モデルシミュレーション結果読出手段として機能する。   Further, the CPU 16 functions as a model simulation result reading unit by executing step 605 of the model simulation situation analysis program 160.

また、CPU16が、モデルシミュレーション状況解析プログラム160のステップ610、620、および630を実行することで、記憶制御手段として機能する。   The CPU 16 functions as a storage control unit by executing steps 610, 620, and 630 of the model simulation situation analysis program 160.

本発明の実施形態に係るパーソナルコンピュータ1のハードウェア構成を示す図である。It is a figure which shows the hardware constitutions of the personal computer 1 which concerns on embodiment of this invention. パーソナルコンピュータ1のCPU16が実行するモデルベース開発プログラム100の構成を示す図である。It is a figure which shows the structure of the model base development program 100 which CPU16 of the personal computer 1 runs. モデルの一例を示す図である。It is a figure which shows an example of a model. 図3に示したモデルから自動コード生成プログラム110によって生成されるCソースコードのリストを示す図である。FIG. 4 is a diagram showing a list of C source code generated by an automatic code generation program 110 from the model shown in FIG. 3. モデルシミュレーション状況解析プログラム160の処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of a process of the model simulation condition analysis program 160. 自動テストケース生成プログラム130の処理の詳細を示すフローチャートである。5 is a flowchart showing details of processing of an automatic test case generation program 130. 結果表示プログラム180の処理によるディスプレイ11の表示内容を示す図である。It is a figure which shows the display content of the display 11 by the process of the result display program 180. FIG.

符号の説明Explanation of symbols

1…パーソナルコンピュータ、11…ディスプレイ、12…入力装置、13…RAM、
14…ROM、15…HDD、16…CPU、31、32…入力ブロック、
33〜36…定数ブロック、37…2項加算ブロック、38…遅延ブロック、
39、40…スイッチブロック、41…比較ブロック、42…出力ブロック、
45、46…ifブロック、51…比較結果表示部、52…妥当性診断部、
100…モデルベース開発プログラム、110…自動コード生成プログラム、
120…モデル情報抽出プログラム、130…自動テストケース生成プログラム、
140…Cソースコード実行プログラム、
150…モデルシミュレーションプログラム、
160…モデルシミュレーション状況解析プログラム、
170…実行結果比較プログラム、180…結果表示プログラム、
210…モデル、220…Cソースコード、230…テストケース、
240…実行結果データ。

DESCRIPTION OF SYMBOLS 1 ... Personal computer, 11 ... Display, 12 ... Input device, 13 ... RAM,
14 ... ROM, 15 ... HDD, 16 ... CPU, 31, 32 ... input block,
33 to 36 ... constant block, 37 ... binary add block, 38 ... delay block,
39, 40 ... switch block, 41 ... comparison block, 42 ... output block,
45, 46 ... if block, 51 ... comparison result display part, 52 ... validity diagnosis part,
100: Model-based development program, 110: Automatic code generation program,
120 ... Model information extraction program, 130 ... Automatic test case generation program,
140 ... C source code execution program,
150 ... Model simulation program,
160 ... Model simulation situation analysis program,
170 ... execution result comparison program, 180 ... result display program,
210 ... Model, 220 ... C source code, 230 ... Test case,
240: Execution result data.

Claims (16)

制御の処理動作を記述するモデルに基づいて生成されたソースコードを読み出すソースコード読出手段と、
前記モデル内の情報を読み出すモデル情報読出手段と、
読み出された前記ソースコードの処理内容および読み出された前記モデル内の情報に基づいて、前記ソースコードのテストケースを生成する生成手段と、を備えたテストケース生成装置。
Source code reading means for reading a source code generated based on a model describing a processing operation of control;
Model information reading means for reading information in the model;
A test case generation device comprising: generation means for generating a test case of the source code based on the processing content of the read source code and the read information in the model.
前記モデル情報読出手段は、前記モデルへの入力データの許容上限値および許容下限値のうち少なくとも1つを読み出し、
前記生成手段は、読み出された前記許容上限値および前記許容下限値のうち少なくとも1つに基づいて、前記ソースコードのテストケースを生成することを特徴とする請求項1に記載のテストケース生成装置。
The model information reading means reads at least one of an allowable upper limit value and an allowable lower limit value of input data to the model,
2. The test case generation according to claim 1, wherein the generation unit generates a test case of the source code based on at least one of the read allowable upper limit value and the allowable lower limit value. apparatus.
前記モデル情報読出手段は、前記モデルに含まれる、前記モデルへの入力データの精度情報を読み出し、
前記生成手段は、読み出された前記精度情報に基づいて、前記ソースコードのテストケースを生成することを特徴とする請求項1または2に記載のテストケース生成装置。
The model information reading means reads accuracy information of input data to the model included in the model,
The test case generation apparatus according to claim 1, wherein the generation unit generates a test case of the source code based on the read accuracy information.
入力を受けたデータに対する処理を記述するモデルに基づいて生成されたソースコードを読み出すソースコード読出手段、
前記モデル内の情報を読み出すモデル情報読出手段、および
読み出された前記ソースコードの処理内容および読み出された前記モデル内の情報に基づいて、前記ソースコードのテストケースを生成する生成手段として、演算装置を機能させるテストケース生成プログラム。
A source code reading means for reading a source code generated based on a model describing a process for input data;
Model information reading means for reading information in the model, and generating means for generating a test case of the source code based on the processing content of the read source code and the read information in the model, A test case generation program that makes an arithmetic device function.
制御の処理動作を記述するモデルに基づいてソースコードを生成する機能を演算装置に実現させるモデルベース開発プログラムであって、
生成された前記ソースコードを読み出すソースコード読出手段、
前記モデル内の情報を読み出すモデル情報読出手段、および
読み出された前記ソースコードの処理内容および読み出された前記モデル内の情報に基づいて、前記ソースコードのテストケースを生成する生成手段として、演算装置を機能させるモデルベース開発プログラム。
A model-based development program for causing an arithmetic unit to realize a function of generating a source code based on a model describing a processing operation of control,
Source code reading means for reading the generated source code;
Model information reading means for reading information in the model, and generating means for generating a test case of the source code based on the processing content of the read source code and the read information in the model, A model-based development program that makes computing devices function.
制御の処理動作を記述するモデルに基づいて生成されたソースコードを読み出すソースコード読出手段と、
前記モデルのシミュレーション状況解析結果を読み出すシミュレーション情報読出手段と、
読み出された前記ソースコードの処理内容および読み出された前記解析結果に基づいて、前記ソースコードのテストケースを生成する生成手段と、を備えたテストケース生成装置。
Source code reading means for reading a source code generated based on a model describing a processing operation of control;
Simulation information reading means for reading the simulation status analysis result of the model;
A test case generation apparatus comprising: generation means for generating a test case of the source code based on the processing content of the read source code and the read analysis result.
前記モデルは、前段にあるモデルの処理結果の出力データを入力データとして受け、
前記シミュレーション情報読出手段は、前記シミュレーション状況解析結果として、前記前段にあるモデルの前記出力データの情報を読み出し、
前記生成手段は、読み出された前記出力データの情報に基づいて、前記ソースコードのテストケースを生成することを特徴とする請求項6に記載のテストケース生成装置。
The model receives the output data of the processing result of the model in the previous stage as input data,
The simulation information reading means reads information on the output data of the model in the preceding stage as the simulation situation analysis result,
The test case generation apparatus according to claim 6, wherein the generation unit generates a test case of the source code based on the read information of the output data.
前記シミュレーション情報読出手段は、前記前段にあるモデルの出力データの、上限値および下限値のうち少なくとも1つを読み出し、
前記生成手段は、読み出された前記上限値および前記下限値のうち少なくとも1つに基づいて、前記ソースコードのテストケースを生成することを特徴とする請求項7に記載のテストケース生成装置。
The simulation information reading means reads at least one of an upper limit value and a lower limit value of the output data of the model in the preceding stage,
The test case generation device according to claim 7, wherein the generation unit generates a test case of the source code based on at least one of the read upper limit value and lower limit value.
制御の処理動作を記述するモデルに基づいて生成されたソースコードを読み出すソースコード読出手段、
前記モデルのシミュレーション状況解析結果を読み出すシミュレーション情報読出手段、および
読み出された前記ソースコードの処理内容および読み出された前記解析結果に基づいて、前記ソースコードのテストケースを生成する生成手段として、演算装置を機能させるテストケース生成プログラム。
Source code reading means for reading a source code generated based on a model describing a processing operation of control;
Simulation information reading means for reading the simulation status analysis result of the model, and generating means for generating a test case of the source code based on the processing content of the read source code and the read analysis result, A test case generation program that makes an arithmetic device function.
制御の処理動作を記述するモデルに基づいてソースコードを生成する機能を演算装置に実現させるモデルベース開発プログラムであって、
前記モデルに基づいて生成されたソースコードを読み出すソースコード読出手段、
前記モデルのシミュレーション状況解析結果を読み出すシミュレーション情報読出手段、および
読み出された前記ソースコードの処理内容および読み出された前記解析結果に基づいて、前記ソースコードのテストケースを生成する生成手段として、演算装置を機能させるモデルベース開発プログラム。
A model-based development program for causing an arithmetic unit to realize a function of generating a source code based on a model describing a control processing operation,
Source code reading means for reading source code generated based on the model;
Simulation information reading means for reading the simulation status analysis result of the model, and generating means for generating a test case of the source code based on the processing content of the read source code and the read analysis result, A model-based development program that makes computing devices function.
制御の処理動作を記述するモデルから生成されたソースコードの内容に基づいて生成されたテストケースが前記モデルへ入力されることで行われた前記モデルのシミュレーションの結果を読み出すモデルシミュレーション結果読出手段と、
読み出された前記シミュレーションの結果に基ついて、前記ソースコード生成の妥当性についての表示用の情報を記憶媒体に記憶させる記憶制御手段と、を備えたソースコード生成妥当性診断装置。
A model simulation result reading means for reading a simulation result of the model performed by inputting a test case generated based on the content of the source code generated from the model describing the processing operation of the control to the model; ,
A source code generation validity diagnosis apparatus comprising: storage control means for storing display information about the validity of the source code generation in a storage medium based on the read simulation result.
前記モデルシミュレーション結果読出手段は、前記テストケースが前記モデルへ入力されることで行われた前記モデルのシミュレーションの結果として、そのシミュレーションによって実行されなかったモデルの部分の情報を読み出し、
前記記憶制御手段は、この実行されなかったモデルの部分の情報に基づいて、前記ソースコード生成の妥当性についての表示用の情報を記憶媒体に記憶させることを特徴とする請求項11に記載のソースコード生成妥当性診断装置。
The model simulation result reading means reads information on a part of the model that was not executed by the simulation as a result of the simulation of the model performed by the test case being input to the model,
12. The storage control unit according to claim 11, wherein display information about the validity of the source code generation is stored in a storage medium based on information on the part of the model that has not been executed. Source code generation validity diagnosis device.
制御の処理動作を記述するモデルから生成されたソースコードの内容に基づいて生成されたテストケースが前記モデルへ入力されることで行われた前記モデルのシミュレーションの結果を読み出すモデルシミュレーション結果読出手段、および
読み出された前記シミュレーションの結果に基ついて、前記ソースコード生成の妥当性についての表示用の情報を記憶媒体に記憶させる記憶制御手段として演算装置を機能させるソースコード生成妥当性診断プログラム。
A model simulation result reading means for reading a simulation result of the model performed by inputting a test case generated based on the content of the source code generated from the model describing the processing operation of the control to the model; And a source code generation validity diagnostic program for causing an arithmetic unit to function as storage control means for storing display information about the validity of the source code generation in a storage medium based on the read result of the simulation.
制御の処理動作を記述するモデルに基づいてソースコードを生成する機能を演算装置に実現させるモデルベース開発プログラムであって、
制御の処理動作を記述するモデルから生成されたソースコードの内容に基づいて生成されたテストケースが前記モデルへ入力されることで行われた前記モデルのシミュレーションの結果を読み出すモデルシミュレーション結果読出手段、および
読み出された前記シミュレーションの結果に基ついて、前記ソースコード生成の妥当性についての表示用の情報を記憶媒体に記憶させる記憶制御手段として演算装置を機能させるモデルベース開発プログラム。
A model-based development program for causing an arithmetic unit to realize a function of generating a source code based on a model describing a control processing operation,
A model simulation result reading means for reading a simulation result of the model performed by inputting a test case generated based on the content of the source code generated from the model describing the processing operation of the control to the model; And a model-based development program for causing an arithmetic unit to function as storage control means for storing display information about the validity of the source code generation in a storage medium based on the read simulation result.
制御の処理動作を記述するモデルに基づいてソースコードを生成する手順と、
生成された前記ソースコードを読み出す手順と、
前記モデル内の情報を読み出す手順と、
読み出された前記ソースコードの処理内容および読み出された前記モデル内の情報に基づいて、前記ソースコードのテストケースを生成する手順と、
生成された前記テストケースを入力として、前記モデルのシミュレーションを行う手順と、を備えたモデルベース開発方法。
A procedure for generating source code based on a model that describes the processing operation of control,
A procedure for reading the generated source code;
A procedure for reading information in the model;
A procedure for generating a test case of the source code based on the processing content of the read source code and the information in the read model;
A model-based development method comprising: a procedure for simulating the model using the generated test case as an input.
制御の処理動作を記述するモデルに基づいてソースコードを生成する手順と、
前記モデルのシミュレーションを行う手順と、
前記モデルのシミュレーション状況の解析を行う手順と、
生成された前記ソースコードを読み出す手順と、
前記モデルのシミュレーション状況解析結果を読み出す手順と、
読み出された前記ソースコードの処理内容および読み出された前記解析結果に基づいて、前記ソースコードのテストケースを生成する手順と、を備えたモデルベース開発方法。

A procedure for generating source code based on a model that describes the processing operation of control,
A procedure for simulating the model;
A procedure for analyzing the simulation status of the model;
A procedure for reading the generated source code;
A procedure for reading the simulation status analysis result of the model,
A model-based development method comprising: a procedure for generating a test case of the source code based on the processing content of the read source code and the read analysis result.

JP2004201861A 2004-07-08 2004-07-08 Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base Pending JP2006024006A (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
JP2004201861A JP2006024006A (en) 2004-07-08 2004-07-08 Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base
US11/156,734 US20060010429A1 (en) 2004-07-08 2005-06-21 Method, system and program for model based software development with test case generation and evaluation
DE102005031913A DE102005031913A1 (en) 2004-07-08 2005-07-07 Method, system and program for model-based software development with test case generation and evaluation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004201861A JP2006024006A (en) 2004-07-08 2004-07-08 Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base

Publications (1)

Publication Number Publication Date
JP2006024006A true JP2006024006A (en) 2006-01-26

Family

ID=35542779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004201861A Pending JP2006024006A (en) 2004-07-08 2004-07-08 Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base

Country Status (3)

Country Link
US (1) US20060010429A1 (en)
JP (1) JP2006024006A (en)
DE (1) DE102005031913A1 (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008077415A (en) * 2006-09-21 2008-04-03 Toshiba Information Systems (Japan) Corp Model base development assisting block, simulation system and automatic code generation method
JP2008299502A (en) * 2007-05-30 2008-12-11 Denso Corp Test case validity automatic verification program and test case validity automatic verification result display method
JP2009282970A (en) * 2008-05-14 2009-12-03 Honeywell Internatl Inc Method, device and system for automatic inspection generation from state chart
JP2010511250A (en) * 2006-11-27 2010-04-08 ハネウェル・インターナショナル・インコーポレーテッド Request-based test generation
US8448146B2 (en) 2011-03-31 2013-05-21 Infosys Limited Generation of functional tests for re-hosted applications
JP2014038397A (en) * 2012-08-10 2014-02-27 Fuji Electric Co Ltd Diagram program test data generation device, method therefor, and program
JP2014059805A (en) * 2012-09-19 2014-04-03 Denso Corp Test case generation device and test case generation method for model-based control device
JP2021068285A (en) * 2019-10-25 2021-04-30 株式会社デンソー Automatic code generation method, coding program, electronic control device, automatic code generation program, and automatic code generation device
JP2021117666A (en) * 2020-01-24 2021-08-10 株式会社デンソー Code inspection tool and code inspection method

Families Citing this family (38)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7739256B2 (en) * 2006-12-07 2010-06-15 Norman Powell Method for selling custom business software and software exchange marketplace
JP2008171034A (en) * 2007-01-05 2008-07-24 Hitachi Ltd Program creation support device, program creation support program and program creation support method
WO2008113718A1 (en) * 2007-03-16 2008-09-25 International Business Machines Corporation Method, system and computer program for distributing customized software products
US7681180B2 (en) 2007-06-06 2010-03-16 Microsoft Corporation Parameterized test driven development
US8271934B2 (en) * 2007-06-14 2012-09-18 International Business Machines Corporation Developing software applications with increased modularity
US7873945B2 (en) * 2007-06-29 2011-01-18 Microsoft Corporation Automatically generating test cases for binary code
JP2009169828A (en) * 2008-01-18 2009-07-30 Denso Corp Test case creation device and creation program
US8522215B1 (en) 2008-07-14 2013-08-27 The Mathworks, Inc. Coverage analysis for variable size signals
US8463760B2 (en) * 2008-09-04 2013-06-11 At&T Intellectual Property I, L. P. Software development test case management
US8286140B2 (en) * 2008-10-10 2012-10-09 American Express Travel Related Services Company, Inc. System, computer program, and method for a static code coverage analyzer for computer programs
US20110083121A1 (en) * 2009-10-02 2011-04-07 Gm Global Technology Operations, Inc. Method and System for Automatic Test-Case Generation for Distributed Embedded Systems
US8826239B2 (en) * 2010-10-06 2014-09-02 International Business Machines Corporation Asynchronous code testing in integrated development environment (IDE)
CN102023922B (en) * 2010-12-28 2012-09-26 重庆恩菲斯软件有限公司 System and method for testing automotive electronic diagnostic software
US8984488B2 (en) 2011-01-14 2015-03-17 Honeywell International Inc. Type and range propagation through data-flow models
US9632754B2 (en) 2012-07-06 2017-04-25 International Business Machines Corporation Auto generation and linkage of source code to test cases
WO2014080354A2 (en) * 2012-11-21 2014-05-30 Varun Aggarwal Reporting scores on computer programming ability under a taxonomy of test cases
CN103838559A (en) * 2012-11-23 2014-06-04 富士通株式会社 Method and device for combining tools
US9513878B2 (en) * 2012-12-21 2016-12-06 Sap Se Component integration by distribution of schema definition on heterogenous platforms
CN104142914A (en) * 2013-05-10 2014-11-12 富士通株式会社 Device and method for function module combination with feedback control, data processing method and data processing equipment
CN104281519A (en) * 2013-07-08 2015-01-14 华为技术有限公司 Method and equipment for detecting errors of program
JP6316120B2 (en) * 2014-06-30 2018-04-25 日立オートモティブシステムズ株式会社 Test case generation system and recording medium recording test case
US9483384B2 (en) * 2014-11-20 2016-11-01 Fujitsu Limited Generation of software test code
US10108536B2 (en) * 2014-12-10 2018-10-23 General Electric Company Integrated automated test case generation for safety-critical software
WO2016137035A1 (en) * 2015-02-25 2016-09-01 슈어소프트테크주식회사 Test case generation device and method, and computer-readable recording medium for recording program for executing same
US9940222B2 (en) 2015-11-20 2018-04-10 General Electric Company System and method for safety-critical software automated requirements-based test case generation
US9792204B2 (en) 2016-02-02 2017-10-17 General Electric Company System and method for coverage-based automated test case augmentation for design models
US10025696B2 (en) 2016-02-09 2018-07-17 General Electric Company System and method for equivalence class analysis-based automated requirements-based test case generation
CN107608873B (en) * 2016-07-11 2021-05-25 珠海优特电力科技股份有限公司 Software testing method and system and testing platform
JP7225064B2 (en) * 2019-09-12 2023-02-20 株式会社日立ソリューションズ Simulation method and simulation program
EP3812885A1 (en) 2019-10-24 2021-04-28 dspace digital signal processing and control engineering GmbH Integrated simulation code and production code generation
CN110995547A (en) * 2019-12-24 2020-04-10 国汽(北京)智能网联汽车研究院有限公司 Vehicle-mounted high-speed network testing system and method
US11379349B2 (en) * 2020-01-03 2022-07-05 International Business Machines Corporation Verifiable testcase workflow
US11288153B2 (en) 2020-06-18 2022-03-29 Bank Of America Corporation Self-healing computing device
US11132273B1 (en) 2020-12-15 2021-09-28 International Business Machines Corporation System testing infrastructure with hidden variable, hidden attribute, and hidden value detection
US11113167B1 (en) 2020-12-15 2021-09-07 International Business Machines Corporation System testing infrastructure with hidden variable, hidden attribute, and hidden value detection
US11188453B1 (en) 2020-12-15 2021-11-30 International Business Machines Corporation Verification of software test quality using hidden variables
US11204848B1 (en) 2020-12-15 2021-12-21 International Business Machines Corporation System testing infrastructure with hidden variable, hidden attribute, and hidden value detection
US11379352B1 (en) 2020-12-15 2022-07-05 International Business Machines Corporation System testing infrastructure with hidden variable, hidden attribute, and hidden value detection

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2003054666A2 (en) * 2001-12-19 2003-07-03 Steven Sims System and method for automated test-case generation for software
JP2005078243A (en) * 2003-08-29 2005-03-24 Denso Corp Microcomputer resource consumption estimating program, microcomputer resource consumption estimating device, and program generating method

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008077415A (en) * 2006-09-21 2008-04-03 Toshiba Information Systems (Japan) Corp Model base development assisting block, simulation system and automatic code generation method
JP2010511250A (en) * 2006-11-27 2010-04-08 ハネウェル・インターナショナル・インコーポレーテッド Request-based test generation
JP2013033487A (en) * 2006-11-27 2013-02-14 Honeywell Internatl Inc Requirements-based test generation
JP2008299502A (en) * 2007-05-30 2008-12-11 Denso Corp Test case validity automatic verification program and test case validity automatic verification result display method
JP2009282970A (en) * 2008-05-14 2009-12-03 Honeywell Internatl Inc Method, device and system for automatic inspection generation from state chart
US8448146B2 (en) 2011-03-31 2013-05-21 Infosys Limited Generation of functional tests for re-hosted applications
JP2014038397A (en) * 2012-08-10 2014-02-27 Fuji Electric Co Ltd Diagram program test data generation device, method therefor, and program
JP2014059805A (en) * 2012-09-19 2014-04-03 Denso Corp Test case generation device and test case generation method for model-based control device
JP2021068285A (en) * 2019-10-25 2021-04-30 株式会社デンソー Automatic code generation method, coding program, electronic control device, automatic code generation program, and automatic code generation device
JP7318485B2 (en) 2019-10-25 2023-08-01 株式会社デンソー Automatic code generation method, code program, electronic controller, automatic code generation program, and automatic code generation device
JP2021117666A (en) * 2020-01-24 2021-08-10 株式会社デンソー Code inspection tool and code inspection method
JP7415593B2 (en) 2020-01-24 2024-01-17 株式会社デンソー Code inspection tools, code inspection methods

Also Published As

Publication number Publication date
DE102005031913A1 (en) 2006-02-16
US20060010429A1 (en) 2006-01-12

Similar Documents

Publication Publication Date Title
JP2006024006A (en) Test case generation device, test case generation program, model base development program, device and program for diagnosing validity of source code generation, and method for developing model base
US7895575B2 (en) Apparatus and method for generating test driver
JP2006244073A (en) Semiconductor design device
JP4427002B2 (en) Program debugging device for semiconductor testing
JP2009169828A (en) Test case creation device and creation program
JP2009294846A (en) Test case generator, and test case generation program and method
KR20070058954A (en) Apparatus and method for prototype development of embedded system
KR101110241B1 (en) Program test device and program
JP2005078243A (en) Microcomputer resource consumption estimating program, microcomputer resource consumption estimating device, and program generating method
CN108572892B (en) PowerPC multi-core processor-based offline test method and device
WO2020194455A1 (en) Test case generation device, test case generation method, and test case generation program
JP5811978B2 (en) Test case generation apparatus and test case generation method for model-based control apparatus
JP4702194B2 (en) Program development support apparatus, program development support method, and program development support program
JP2001060210A (en) Lsi verification method and device and recording medium
JP2005301568A (en) Display information storage controller, and program thereof
JP5755861B2 (en) Test case generation apparatus, test case generation method, and test case generation program
JP6723483B2 (en) Test case generation device, test case generation method, and test case generation program
JP2021117666A (en) Code inspection tool and code inspection method
JP2008299502A (en) Test case validity automatic verification program and test case validity automatic verification result display method
JP2020144509A (en) Automatic code generation method and automatic code generating program
US20180088914A1 (en) Method for supporting program creation and apparatus for supporting program creation
Zander-Nowicka et al. From Functional Requirements through Test Evaluation Design to Automatic Test Data Patterns Retrieval-a Concept for Testing of Software Dedicated for Hybrid Embedded Systems.
JP7059827B2 (en) Source code generator
JP2009181180A (en) Inspection program, inspection method, and inspection device of program creating tool
JP4149047B2 (en) Simulator

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060913

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081126

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090825

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20091222