JP2012059026A - Source code conversion method and source code conversion program - Google Patents
Source code conversion method and source code conversion program Download PDFInfo
- Publication number
- JP2012059026A JP2012059026A JP2010201797A JP2010201797A JP2012059026A JP 2012059026 A JP2012059026 A JP 2012059026A JP 2010201797 A JP2010201797 A JP 2010201797A JP 2010201797 A JP2010201797 A JP 2010201797A JP 2012059026 A JP2012059026 A JP 2012059026A
- Authority
- JP
- Japan
- Prior art keywords
- conversion
- source code
- model
- conversion rule
- inspection
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/362—Software debugging
- G06F11/3624—Software debugging by performing operations on the source code, e.g. via a compiler
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/36—Preventing errors by testing or debugging software
- G06F11/3604—Software analysis for verifying properties of programs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/51—Source to source
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/75—Structural analysis for program understanding
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Computer Hardware Design (AREA)
- Quality & Reliability (AREA)
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
- Debugging And Monitoring (AREA)
Abstract
Description
本発明は、ソースコード変換方法およびソースコード変換プログラムに係り、特に、ソフトウェアのモデル検査において、モデルチェッカの入力言語で検査コードを記述するコストを低減させるために、計算機を活用してソフトウェアのソースコードを検査コードに変換する手法に関する。 The present invention relates to a source code conversion method and a source code conversion program, and in particular, in a software model check, in order to reduce the cost of writing a check code in an input language of a model checker, a software source is utilized by utilizing a computer. The present invention relates to a method for converting a code into an inspection code.
近年、ソフトウェアシステムが一般社会に浸透し、ソフトウェアに求められる信頼性が非常に高くなってきている一方で、ソフトウェアは複雑化および大規模化の一途をたどっており、手作業でのレビューや、テストによる品質確保が非常に困難になってきている。 In recent years, software systems have spread to the general public and the reliability required for software has become very high, while software has become increasingly complex and large-scale, and manual reviews, Quality assurance through testing has become very difficult.
モデル検査技術は、たとえば非特許文献1に開示される方法であって、ソフトウェアの振舞いを、特定モデルチェッカの入力言語で記述し、特定モデルチェッカを実行することで、前記ソフトウェアが持つべき性質を満たしているかどうかを、前記ソフトウェアの取り得る状態を網羅的に検査する技術である。非特許文献1に開示される方法によると、ソフトウェアの振る舞いを、Promelaと呼ばれる入力言語で記述し、SPINと呼ばれるモデルチェッカに入力することで、検査を実施する。
The model checking technique is, for example, a method disclosed in Non-Patent
モデル検査技術は複雑化及び大規模化の一途をたどるソフトウェアの品質確保に有望な技術であるが、ソフトウェアの取り得る状態を網羅的に検査するため、規模の大きなソフトウェアでは、検査すべき状態数が膨大な分量となる状態爆発と呼ばれる現象が起き、処理に必要な時間計算量が現実的に許容不可能な大きさとなる現象と、もしくは、処理に必要な空間計算量が処理に用いる計算機に搭載された記憶領域を超える現象の、両方もしくは一方が起き、検査を完了することができないことがあり得る。 Model checking technology is a promising technology for ensuring the quality of software that is becoming increasingly complex and large-scale. However, in order to comprehensively check the possible states of software, the number of states to be inspected for large-scale software A phenomenon called state explosion occurs, and the amount of time calculation required for processing becomes a practically unacceptable size, or the amount of space required for processing increases in the computer used for processing. It is possible that both or one of the phenomena exceeding the installed storage area occurs and the inspection cannot be completed.
状態爆発に対応するために、抽象化と呼ばれる処理を、ソースコードもしくは検査コードに対して行い、状態数を検査可能な範囲まで削減することがある。抽象化は、例えば、選択的実行文の分岐条件の簡略化がある。抽象化によって、本来存在しない実行パスが生じる、もしくは、存在する実行パスが消滅することがあり得るため、検査コードに対する検査結果が示すソフトウェアの性質と、本来のソフトウェアの性質に差異が生まれることがあり得る。そのため、ソフトウェアに対して検査すべき性質に鑑み、抽象化の水準を検討した上で、抽象化を適用することが望ましい。 In order to deal with a state explosion, a process called abstraction may be performed on the source code or the inspection code to reduce the number of states to a range that can be inspected. Abstraction includes, for example, simplification of branch conditions for selective execution statements. An abstraction may cause a non-existent execution path, or an existing execution path may disappear, resulting in a difference between the nature of the software indicated by the inspection results for the inspection code and the nature of the original software. possible. Therefore, it is desirable to apply abstraction after considering the level of abstraction in view of the property to be inspected for software.
さらに、モデル検査技術は、検査対象のソフトウェアを、特定モデルチェッカの入力言語で記述する労力が大きいことが実用上の問題となることがあり得る。図11に、特許文献1に開示されたソースコード変換装置の一例を示す。特許文献1に開示される方法によると、ソースコードは、特定モデルチェッカの入力言語で書かれた検査コードへ、翻訳マップを用いて変換される(ステップ910〜940)。特許文献1に開示される方法によると、検査コードを、前記変換とは別に利用者により定義された環境モデルを用いて、前記特定モデルチェッカにより検査する(ステップ975、ステップ950〜970)。
Further, in the model checking technique, it may be a practical problem that the labor for describing the software to be checked in the input language of the specific model checker is large. FIG. 11 shows an example of a source code conversion apparatus disclosed in
また、ソフトウェアの開発技術のひとつとして、モデル駆動型開発がある。モデル駆動型開発は、ソフトウェアの設計情報をモデルとして記述し、そのモデルを変換操作により詳細化することで、ソフトウェア開発を進める技術である。例えば、モデル駆動型開発において、モデルのフォーマットや意味は非特許文献2に開示される方法であるMOFにより記述されたメタモデルにより規定され、非特許文献3に開示される方法であるQVTによりモデルを詳細化する変換ルールが記述され、非特許文献4に開示される方法であるOCLによりモデルの整合性や健全性に関する制約の記述および検証が行われ、非特許文献5に開示される方法であるMOFM2Tによりモデルからソースコードが生成される。 One of the software development technologies is model-driven development. Model-driven development is a technology for advancing software development by describing software design information as a model and refining the model by a conversion operation. For example, in model-driven development, the format and meaning of the model is defined by a meta model described by MOF, which is a method disclosed in Non-Patent Document 2, and modeled by QVT, a method disclosed in Non-Patent Document 3. The conversion rules that describe the details are described, and OCL, which is the method disclosed in Non-Patent Document 4, describes the constraints and consistency of the model, and the method disclosed in Non-Patent Document 5 Source code is generated from the model by a certain MOFM2T.
なお、モデル検査技術における「モデル」と、モデル駆動型開発における「モデル」は、互いに独立した概念であり、一般にデータ構造や意味などに関する共通性はない。 Note that the “model” in model checking technology and the “model” in model-driven development are concepts that are independent of each other, and generally have no commonality in terms of data structure or meaning.
モデル検査によるソフトウェアの信頼性確保を有効に実施するためには、ソースコードからモデルチェッカの入力言語で記述された検査用コードを自動生成するなどの方法により、検査用コードを得るための労力を低減させること、および、ソフトウェアの仕様および設計を、モデルチェッカによる網羅的検査が現実的な時間計算量および空間計算量で終了するように抽象化することが必要となる。 In order to effectively ensure the reliability of the software by model checking, the effort to obtain the checking code by automatically generating the checking code described in the input language of the model checker from the source code, etc. It is necessary to reduce and abstract the software specification and design so that exhaustive inspection by the model checker ends with realistic time and space complexity.
しかし、特許文献1に開示される方法によると、(1)抽象化の水準の変更が困難である、(2)ソフトウェア設計変更への追従コストが高い、(3)異なるモデルチェッカにて検査する際のコストが高い、という課題が存在する。
However, according to the method disclosed in
上記(1)の課題に関して、特許文献1に開示される方法によると、翻訳マップの変更は、ソースプログラムの改訂など、新しいタイプの命令がソースコード内に導入された場合のみに限定される。そのため、利用者が抽象化の水準を変更する方法は、変換前の検査対象のソースコードに修正を加える方法と、変換後の特定モデルチェッカの入力言語で書かれた検査コードに修正を加える方法と、環境モデルに修正を加える方法とに限定され、いずれの方法においても、利用者が大きな手間を費やすことになる。
Regarding the above problem (1), according to the method disclosed in
上記(2)の課題に関して、特許文献1に開示される方法によると、使用するライブラリの変更などの変更が生じた際には、翻訳マップの修正と、環境モデルの修正とを行う必要がある。しかし、翻訳マップは、前記ソースコードから、前記検査コードへと直接変換するマップ要素で構成されていることと、環境モデルが特定モデルチェッカの入力言語で書かれていることとに起因して、設計変更に追従するように整合性を保ちながら修正することは困難である。
Regarding the problem (2), according to the method disclosed in
上記(3)の課題に関して、特許文献1に開示される方法によると、異なるモデルチェッカにて検査するためには、翻訳マップの修正と、環境モデルの修正とを行う必要がある。しかし、翻訳マップは、前記ソースコードから前記検査コードへと直接変換するマップ要素で構成されていることや、環境モデルが特定モデルチェッカの入力言語で書かれていることとに起因して、翻訳マップと環境モデルのすべてを修正する必要があり、大きなコストを要する。
Regarding the above problem (3), according to the method disclosed in
また、検査水準と状態数のトレードオフを、利用者側で管理したいというニーズがある。すなわち、複雑なシステムの検査では、状態爆発が容易に発生し、検査を完了することができない。このようなとき、何も検査できないよりも、水準を若干落としてでも、検査を完了できることが望ましい場合がある。例えば、繰り返し実行時のみに発生する特定の不具合がある場合、その繰返しを除去することで、特定の不具合の検出はできなくなるものの、大幅に状態数を削減できる、という場合もある。 There is also a need to manage the trade-off between inspection level and number of states on the user side. That is, in the inspection of a complicated system, a state explosion easily occurs and the inspection cannot be completed. In such a case, it may be desirable that the inspection can be completed even if the level is slightly lowered, rather than nothing can be inspected. For example, if there is a specific defect that occurs only during repeated execution, it may not be possible to detect the specific defect by removing the repetition, but the number of states may be greatly reduced.
本発明は、従来の技術の課題を踏まえ、抽象化の水準等に柔軟に対応できる、ソースコード変換方法およびソースコード変換プログラムを提供することを目的とする。 An object of the present invention is to provide a source code conversion method and a source code conversion program that can flexibly cope with the level of abstraction and the like based on the problems of the prior art.
本発明の代表的なものを示せば、次の通りである。ソースコード変換装置によるソースコード変換方法は、ソフトウェアのソースコードを入力するステップと、異なる複数の変換ルールを入力するステップと、前記ソースコードを、前記異なる複数の変換ルールにより、検証ツールの入力言語で記述された検査コードに変換するステップとを有することを特徴とする。 A representative example of the present invention is as follows. A source code conversion method by a source code conversion apparatus includes a step of inputting a source code of software, a step of inputting a plurality of different conversion rules, and an input language of a verification tool according to the plurality of different conversion rules. And a step of converting into an inspection code described in 1.
本発明によれば、細粒度に分割された複数の変換ルールを入力するインタフェースを所有する。そのため、利用者による抽象化の水準の変更は、検査対象のソースコードに対応した、異なる複数の変換ルールを選択して入力する操作により、容易に実現される。 According to the present invention, it owns an interface for inputting a plurality of conversion rules divided into fine granularities. Therefore, the change of the level of abstraction by the user can be easily realized by selecting and inputting a plurality of different conversion rules corresponding to the source code to be inspected.
本発明では、異なる複数の変換ルールを用いて検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへと変換する。前記異なる複数の変換ルールは、検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへと変換し、抽象化する一連の処理を細粒度に分割したものであり、複数の変換ルールを組み合わせて用いることにより、前記ソースコードから前記検査コードへの変換が実現される。 In the present invention, the source code to be inspected is converted into the inspection code described in the input language of the model checker using a plurality of different conversion rules. The plurality of different conversion rules are obtained by converting a source code to be inspected into an inspection code described in an input language of a model checker and dividing a series of abstraction processes into fine granularities. By using these in combination, conversion from the source code to the inspection code is realized.
本発明において、検査対象のソースコードを検査コードへと変換する一連の処理を、抽象化の処理も含めて、細粒度に分割し、分割されたそれぞれを、「変換ルール」と呼ぶ。本発明により実現されるソースコード変換装置は、ソースコードを検査コードへ変換する時、異なる複数の変換ルールが、利用者によって、選択され、入力されるためのインタフェースを所有する。前記変換ルールは、事前にソースコード変換装置内部に蓄積された複数の変換ルールの中からの選択と、利用者の記述と、のいずれかの手段により入力される。 In the present invention, a series of processes for converting a source code to be inspected into an inspection code is divided into fine granularities including abstraction processes, and each of the divided processes is called a “conversion rule”. The source code conversion apparatus realized by the present invention has an interface for selecting and inputting a plurality of different conversion rules by the user when converting the source code into the inspection code. The conversion rule is input by one of a selection from a plurality of conversion rules stored in advance in the source code conversion apparatus and a user description.
また、本発明において、変換ルールは、ソースコードを、前記ソースコードの記述言語に依存しない、汎化されたプログラム情報をもつ形式(汎化モデル)へと変換する実装−汎化変換ルールと、汎化モデルを抽象化する抽象化変換ルールと、汎化モデルをモデルチェッカの記述言語へと変換する汎化−検査変換ルールに分類される。換言すると、異なる複数の変換ルールは、ソースコードを特定のプログラミング言語に依存しない形式である中間形式へと変換する第1変換ルールと、前記中間形式に対して抽象化処理を行う第2変換ルールと、前記中間形式から前記検査コードに変換する第3変換ルールとに分類される。ソースコードから検査コードへの変換は、ソースコードを、実装−汎化変換ルールにより、汎化モデルへと変換するステップと、前記汎化モデルを、抽象化変換ルールにより抽象化するステップと、前記汎化モデルを、汎化−検査変換ルールにより、検査コードへと変換するステップと、の3つのステップを続けて行うことで実現される。換言すると、ソースコードから検査コードへの変換は、前記第1、第2、第3の変換ルールを各々1つ以上入力するステップと、前記第1変換ルールを用いて、ソフトウェアのソースコードを、前記中間形式へと変換するステップと、前記第2変換ルールを用いて、前記中間形式で表現されたソフトウェアを抽象化するステップと、前記第3変換ルールを用いて、前記中間形式を検証ツールの入力言語で記述された検証用コードに変換するステップの3つのステップを続けて行うことで実現される。 In the present invention, the conversion rule includes an implementation-generalization conversion rule for converting a source code into a format (generalized model) having generalized program information that does not depend on a description language of the source code, They are classified into an abstraction conversion rule that abstracts the generalization model and a generalization-check conversion rule that converts the generalization model into a model checker description language. In other words, a plurality of different conversion rules include a first conversion rule that converts source code into an intermediate format that is independent of a specific programming language, and a second conversion rule that performs an abstraction process on the intermediate format. And a third conversion rule for converting the intermediate format into the inspection code. The conversion from the source code to the inspection code includes the steps of converting the source code into a generalized model by an implementation-generalization conversion rule, abstracting the generalization model by an abstraction conversion rule, This is realized by continuously performing the three steps of converting the generalization model into an inspection code according to the generalization-inspection conversion rule. In other words, for the conversion from the source code to the inspection code, the step of inputting one or more of each of the first, second, and third conversion rules, and the software source code using the first conversion rule, Converting the intermediate format to the intermediate format; using the second conversion rule to abstract the software expressed in the intermediate format; and using the third conversion rule to convert the intermediate format into a verification tool This is realized by continuously performing the three steps of converting into the verification code described in the input language.
また、本発明において、検査対象のソースコードを、検査コードへと変換する一連の処理にて、内部的に保持される情報(モデル)は、その形式をメタモデルにより定義される。前記モデルは、検査対象のソースコードに対応する情報をもつ実装モデルと、前述の汎化モデルと、モデルチェッカの記述言語に対応する情報をもつ検査モデルと、に分類される。実装モデルは、そのメタモデルであるメタ・実装モデルにより定義され、汎化モデルは、そのメタモデルであるメタ・汎化モデルにより定義され、検査モデルは、そのメタモデルであるメタ・検査モデルにより定義される。前述のそれぞれのメタモデルは、データ構造の定義と、データに含まれる要素間の制約に関する情報とを保有する。 In the present invention, the information (model) held internally in a series of processes for converting the source code to be inspected into the inspection code is defined by the meta model. The model is classified into an implementation model having information corresponding to the source code to be inspected, the generalization model described above, and an inspection model having information corresponding to the description language of the model checker. The implementation model is defined by the meta / implementation model that is the metamodel, the generalization model is defined by the meta / generalization model that is the metamodel, and the inspection model is defined by the meta / inspection model that is the metamodel. Defined. Each of the above-described metamodels has a definition of a data structure and information on constraints between elements included in the data.
以下、図面を参照して本発明の実施形態について詳しく説明する。
まず、図1、図2を参照しながら本発明の基本概念を説明する。本発明では、図1に示したように、ソースコードを、複数の変換ルールの組み合わせた変換処理を行うことにより、既存モデル検査装置に適合した検査コードへ変換する。すなわち、(a)“変換”を細粒度に分割し、複数の「変換ルール」の組み合わせとしてパッケージ化することで、柔軟な変換を実現する。(b)利用者(検査者)は、検査対象のソースコードを入力し、対象のソースコードと検査水準に応じた「変換ルール」を選択して、所望の検査コードを得る。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, the basic concept of the present invention will be described with reference to FIGS. In the present invention, as shown in FIG. 1, the source code is converted into an inspection code suitable for the existing model inspection apparatus by performing a conversion process in which a plurality of conversion rules are combined. That is, (a) “conversion” is divided into fine granularities and packaged as a combination of a plurality of “conversion rules”, thereby realizing flexible conversion. (B) A user (inspector) inputs a source code to be inspected, selects a “conversion rule” according to the target source code and the inspection level, and obtains a desired inspection code.
本発明における、「変換ルール」の例を挙げると次の通りである。
(a)単純な構文変換
「C言語の条件分岐 (If文・Switch文)」を、「検査コードの条件分岐(If 文)」に変換
「C言語の繰り返し文(for文・while文・…)」を、「検査コードの繰り返し(Do文)」に変換
(b)外部環境のモデル化
「データ読込み」を、「ランダム入力」へ置き換え
(c)抽象化
「繰り返しの除去」
「条件の簡略化」
図2により、本発明のソースコード変換処理における変換ルールの入力インタフェースについて、説明する。
Examples of the “conversion rule” in the present invention are as follows.
(A) Convert simple syntax conversion "C language conditional branch (If statement / Switch statement)" into "check code conditional branch (If statement)""C language repetition statement (for statement, while statement, ... ) ”Is converted to“ Repeated inspection code (Do statement) ”(b) Modeling of external environment“ Read data ”is replaced with“ Random input ”(c) Abstraction“ Repeat removal ”
"Simplification of conditions"
The conversion rule input interface in the source code conversion processing of the present invention will be described with reference to FIG.
本発明によれば、細粒度に分割された複数の変換ルールを入力するインタフェースを所有することによって、利用者による抽象化の水準の変更は、複数の異なる変換ルールを選択・入力する操作により容易に実現される。すなわち、利用者による抽象化の水準の変更は、ドメイン情報や、検査したい性質、検査水準の情報(抽象化による性質への影響)に応じて、利用者が複数の異なる変換ルールを選択して呼び出し、ソースコード変換処理装置へ入力する操作により容易に実現される。これにより、抽象化の水準の変更が困難である課題が解決される。 According to the present invention, by possessing an interface for inputting a plurality of conversion rules divided into fine granularities, a user can easily change the level of abstraction by selecting and inputting a plurality of different conversion rules. To be realized. In other words, the user can change the level of abstraction by the user selecting multiple different conversion rules according to the domain information, the property to be inspected, and the information of the inspection level (influence on the property due to abstraction). It is easily realized by calling and inputting to the source code conversion processing device. This solves the problem that it is difficult to change the level of abstraction.
本発明によれば、異なる複数の変換ルールを用いて検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへと変換する手順を含んでいる。前記異なる複数の変換ルールは、実装−汎化変換ルールと、抽象化変換ルールと、汎化−検査変換ルールとに分類され、変換が段階的に行われる手順とを含んでいる。検査対象のソースコードの設計変更に追従する際には、変更に関連する変換ルールのみを変更すればよく、変更が最小限にとどめられる。加えて、実装モデルと、汎化モデルと、検査モデルとをそれぞれメタモデルで定義し、制約を加えることにより、変換ルールによる変換結果が不正でないことを検証可能となる。これにより、検査対象のソースコードを検査コードへと抽象化しながら変換する一連の処理を、細粒度の変換ルールを組み合わせることで実現することによって生じる、変換ルールの検証コストの増大を防ぐことが出来る。 According to the present invention, a procedure for converting a source code to be inspected into an inspection code described in an input language of a model checker using a plurality of different conversion rules is included. The plurality of different conversion rules include a procedure in which conversion is performed in stages, classified into an implementation-generalization conversion rule, an abstraction conversion rule, and a generalization-inspection conversion rule. When following the design change of the source code to be inspected, only the conversion rule related to the change needs to be changed, and the change is minimized. In addition, the implementation model, the generalization model, and the inspection model are each defined in the meta model, and by adding constraints, it is possible to verify that the conversion result by the conversion rule is not illegal. As a result, it is possible to prevent an increase in the verification cost of the conversion rule, which is caused by realizing a series of processes for converting the source code to be inspected while abstracting it into the inspection code by combining the fine-grained conversion rules. .
また、異なる検査ツールにて検査するために、前記検査ツールの形式で出力する際には、メタ・検査モデルと、汎化−検査変換ルールのみを作成すればよく、作成部分が最小限にとどめられる。これにより、異なるモデルチェッカにて検査する際のコストが高いという課題が解決される。 In addition, in order to inspect with a different inspection tool, when outputting in the format of the inspection tool, only the meta / inspection model and the generalization-inspection conversion rule need be created, and the creation part is minimized. It is done. This solves the problem of high cost when inspecting with different model checkers.
次に、本発明の第一の実施例になるソースコード変換装置および変換処理方法を、図3Aないし図8を参照しながら説明する。 Next, a source code conversion apparatus and a conversion processing method according to the first embodiment of the present invention will be described with reference to FIGS. 3A to 8.
図3Aは、第一の実施例になるソースコード変換装置を含むソースコード変換システムの構成例を示す図である。本発明の実施形態に適用されるソースコード変換装置1000は、検査対象のソースコードを検査コードに変換する装置であり、入力部1100と、変換処理部1200と、出力部1300と、記憶部1400と、制御部1500とを有する。2000はモデル検査ツール、3000は検査結果を示す。図3Bに、ソースコード変換装置の構成例を示す。入力部1100は、ソースコード入力部1101と、変換ルール入力部1102とを有する。変換処理部1200は、モデル構築部1201、実装−汎化モデル変換部1202、抽象化モデル変換部1203、及び、汎化−検査モデル変換部1204を備えている。出力部1300は、検査コード書出し部1301を有する。記憶部1400は、変換ルールデータベース1401、メタモデルデータベース1402、およひ、書出しルールデータベース1403を有する。
FIG. 3A is a diagram illustrating a configuration example of a source code conversion system including a source code conversion apparatus according to the first embodiment. A source
ソースコード変換装置1000は、例えば、1台のコンピュータ、あるいはネットワークを介して接続された複数のコンピュータ上で動作するプログラムとして実施される。ソースコード0001と変換ルール集合0002とは、例えば、コンピュータ上の記憶装置から読込む方法と、コンピュータに接続された入力デバイスにより直接入力される方法等の方法により入力される。また、検査コード0005は、例えば、コンピュータ上の記憶装置に書出す方法と、コンピュータのディスプレイ装置に表示する方法により出力される。
The source
入力部1100は、ユーザによって入力されるデータを受付け、入力されたデータを変換処理部1200へと供給する処理を行う。入力部1100は、ソースコード0001に関する情報と、細粒度に分割された複数の変換ルール、すなわち「変換ルール集合」0002に関する情報とを受付け、変換処理部1200へ供給する。ある実施形態においては、入力部1100は、ユーザによる、変換処理部の駆動や制御、出力部の駆動や制御、に関する指示を受け付けてもよい。
The
変換処理部1200は、入力部より、ソースコード0001の情報と、ソースコード0001に適用すべき変換ルール集合0002の情報とを供給され、ソースコード0001を、変換ルール集合0002により変換する処理を行い、変換結果の情報を、出力部1300に供給する。ある実施形態においては、入力部より供給される変換ルール集合0002に関する情報は、記憶部に格納された変換ルールを指し示す識別情報のみが含まれていて、変換ルール集合0002の実体を、前記識別情報を用いて記憶部1400より取り出し、変換に用いてもよい。
The
変換処理部1200は、モデル構築部1201と、実装−汎化モデル変換部1202と、抽象化モデル変換部1203と、汎化−検査モデル変換部1204とを有する。本実施形態において、変換処理部1200は、メタモデルと、変換ルールを用いたモデル変換により、ソースコード情報1001を、検査モデル1008へと変換する。メタ・実装モデル1002と、メタ・汎化モデル1003と、メタ・検査モデル1004と、は、例えば、非特許文献2に記載のMOFにて記述する。また、例えば、非特許文献3に記載されているQVTにて、実装−汎化変換ルール1005と、抽象化変換ルール1006と、汎化−検査変換ルール1007とを記述し、モデルの変換を行う。前記変換は、既に例示した方法の他のモデル変換方法でも良く、また、複数の方法を混在させてもよい。
The
また、ある実施例においては、実装−汎化モデル変換部1202と、抽象化モデル変換部1203と、汎化−検査モデル変換部1204とをそれぞれ独立させず、同一の部位により行われても良く、さらに、実装モデル1205と、汎化モデル1206と、検査モデル1008と、のそれぞれのメタモデルとして、メタ・実装モデル1002と、メタ・汎化モデル1003と、メタ・検査モデル1004とを個別に用意せず、単一のメタモデルにより、実装モデル1205と、汎化モデル1206と、検査モデル1008とを定義してもよい。また、ある実施例においては、メタ・実装モデル1002と、メタ・汎化モデル1003と、メタ・検査モデル1004と、は、複数の方式により、それぞれ実装モデル1205、汎化モデル1206、検査モデル1008、の形式や制約を定義してもよい。例えば、それぞれのメタモデルは、前記MOFによる定義のほかに、非特許文献4に記載されているOCLにて記載された制約条件を含み、モデルの変換を行った際に、制約条件を満たしているかどうかの検証を行う方法があり得る。
In some embodiments, the implementation-generalization
モデル構築部1201は、ソースコード入力部1101からソースコード情報1001を受け取り、実装モデル1205へと変換する。実装モデル1205の形式は、そのメタモデルであるメタ・実装モデル1002により、定義される。実装モデル1205は、本発明の効果を最大限に得るためには、ソースコード情報1001と相互に変換するのに必要十分な情報を持つことが望ましいが、ある実施形態によっては、検査コードを出力するという目的を逸しない程度にて、情報の省略や、追加があってもかまわない。
The
ある実施形態においては、モデル構築部1201は、ソースコード入力部1101と不可分な様態で実装され、ソースコード情報1001が生じない形態で処理が進んでもよい。
In an embodiment, the
実装−汎化モデル変換部1202は、実装−汎化変換ルール1005と、メタ・実装モデル1002と、メタ・汎化モデル1003とを用いて、実装モデル1205を、汎化モデル1206へと、変換する。汎化モデルは、複数のプログラミング言語における構造や処理を表現可能なデータ構造をもつ。例えば、汎化モデル中では、ソースコード0001におけるIf文とSwitch文とを区別せず、選択的実行文として表現する。ある実施形態においては、実装モデル1205を、汎化モデル1206へと変換する際、実装−汎化変換ルール1005のみを用いることもあり得る。また、ある実施形態において、実装−汎化変換ルール1005が、複数の変換ルールを含む場合には、複数の変換ルールを統合して1つの変換ルールとし、実装モデル1205から汎化モデル1206への変換に利用する方法があり得る。また、ある実施形態において、実装−汎化変換ルール1005が、複数の変換ルールを含む場合には、変換処理を複数回繰り返すことで、実装モデル1205から汎化モデル1206への変換を行う手順があり得る。
The mounting-generalization
抽象化モデル変換部1203は、抽象化変換ルール1006と、メタ・汎化モデル1003とを用いて、汎化モデル1206の抽象化を行う。抽象化の例としては、選択文における条件式を、恒真、もしくは恒偽、もしくは非決定的な選択で置き換える方法があり得る。ある実施形態においては、汎化モデル1206を抽象化する際、抽象化変換ルール1006のみを用いることもあり得る。また、ある実施形態において、抽象化変換ルール1006が、複数の変換ルールを含む場合には、複数の変換ルールを統合して1つの変換ルールとし、汎化モデル1206の抽象化に用いる方法があり得る。また、ある実施形態において、抽象化変換ルール1006が、複数の変換ルールを含む場合には、変換処理を複数回繰り返すことで、汎化モデル1206の変換を行う手順があり得る。
The abstraction
汎化−検査モデル変換部1204は、汎化−検査変換ルール1007と、メタ・汎化モデル1003と、メタ・検査モデル1004とを用いて、汎化モデル1206を、検査モデル1008へと、変換する。例えば、検査コード0005がPromela形式である場合、汎化モデルにおいて選択的実行文として表現された要素は、検査モデルにおいてはIf文として表現される。ある実施形態においては、汎化モデル1206を、検査モデル1008へと変換する際、汎化−検査変換ルール1007のみを用いることもあり得る。また、ある実施形態において、汎化−検査変換ルール1007が、複数の変換ルールを含む場合には、複数の変換ルールを統合して1つの変換ルールとし、汎化モデル1206から検査モデル1008への変換に利用する方法があり得る。また、ある実施形態において、汎化−検査変換ルール1007が、複数の変換ルールを含む場合には、変換処理を複数回繰り返すことで、汎化モデル1206から検査モデル1008への変換を行う手順があり得る。
The generalization-inspection
出力部1300は、変換処理部1200より供給された、変換結果の情報を用いて、検査コード0005を出力する。ある実施形態においては、検査コード0005の出力に際して、例えばモデルチェッカの記述言語の文法情報などの情報を記憶部から供給されてもよい。
The
検査コード書出し部1301は、メタ・検査モデル1004と、記憶部1400の書出しルールデータベース1403から取得した検査コード書出しルール1009とを用いて、検査モデル1008を検査コード0005へと変換する。たとえば、非特許文献5に記載される方法にて、検査コード書出しルール1009を記述し、検査モデル1008から、検査コード0005への変換を行う。ある実施例においては、これに限らず、検査モデル1008を、検査に利用するモデルチェッカの記述形式へと変換する任意の方法でもよい。検査コード0005は、例えば、モデルチェッカとしてSPINを用いる場合には、SPINの入力言語である、Promelaにより記述される。
The inspection
記憶部1400において、変換ルールデータベース1401と、メタモデルデータベース1402と、書出しルールデータベース1403のそれぞれは、例えば、関係データベース、もしくは、階層型データベースなどの、コンピュータ上にて実現される任意のデータ格納方式で実現される。変換ルールデータベース1401と、メタモデルデータベース1402と、書出しルールデータベース1403と、は互いに同一の方式で実現されている必要性は無く、互いに異なる方式で実現されていてもよい。また、検査ルールデータベース1401と、メタモデルデータベース1402と、書出しルールデータベース1403と、のそれぞれは、単一の方式で実現されている必要性は無く、例えば、保有すべき情報の一部を関係データベースに格納し、保有すべき情報の一部を、発明を実現するコンピュータプログラム中に組込むなど、それぞれ異なる方式の組み合わせで実現されていてもよい。
In the
記憶部1400は、入力部1100と、変換処理部1200と、出力部1300とが、それぞれの処理を行うのに必要な情報を供給する。例えば、記憶部1400は、変換ルールに関する情報と、メタモデルに関する情報と、モデルチェッカの記述言語の文法に関する情報とを格納する。
The
変換ルールデータベース1401は、既に述べたとおり、変換ルールを、メタデータとともに保有する。前記メタデータは、変換ルールを選択するためのものであり、実装−汎化変換ルール1005と、抽象化変換ルール1006と、汎化−検査変換ルール1007の、それぞれ異なる情報を持つ方法があり得る。実装−汎化変換ルール1005のメタデータは、例えば、変換元ソースコードの記述言語の種類があり得る。抽象化変換ルール1006のメタデータは、例えば、抽象化を分かりやすく端的に表現した名前、簡単な説明、「データの抽象化」、「処理の抽象化」などの抽象化の種別、自然語もしくはアルファベットや数値で表現された抽象化による状態数削減効果、自然語もしくはアルファベットや数値で表現された抽象化による性質への影響、抽象化の適用できるソフトウェアのドメイン、があり得る。汎化−検査変換ルール1007のメタデータは、例えば、検査に使用するモデルチェッカを指し示す名前があり得る。
As described above, the
以降、図4ないし図6を参照しながら入力部1100と、変換処理部1200と、出力部1300と、記憶部1400と、制御部1500の詳細に関し、説明する。
Hereinafter, the details of the
まず、本実施例におけるソースコード変換手順の一例を、図4を参照しながら説明する。本実施例におけるソースコード変換手順は、ソースコード入力ステップS101と、変換ルール入力ステップS102と、変換ルール適用ステップS103と、検査コード出力ステップS104とからなる。 First, an example of the source code conversion procedure in the present embodiment will be described with reference to FIG. The source code conversion procedure in this embodiment includes a source code input step S101, a conversion rule input step S102, a conversion rule application step S103, and an inspection code output step S104.
まず、ソースコード入力ステップS101において、ソースコード入力部1101により、ソースコード0001がソースコード変換装置1000に読み込まれ、ソースコード情報1001へと変換される。
First, in the source code input step S101, the
ソースコード入力部1101は、利用者から入力された検査対象のソースコード0001を受付け、ソースコード情報1001へと変換する。ソースコード0001は、例えば、JIS X3010-1993に公開されるプログラミング言語Cにより記述される。ソースコード情報1001は、具体的には、例えば抽象構文木の形式で保持される。ソースコード情報1001の形式は、抽象構文木に限らず、構造や論理などソースコード0001の検査に要する情報を保持する、任意の形式でもよい。
The source
ソースコード入力ステップS101に続き、変換ルール入力ステップS102において、変換ルール入力部1102により、細粒度に分割された複数の変換ルールである変換ルール集合0002がソースコード変換装置1000に読み込まれる。この変換ルール入力ステップS102では、変換前のモデルの要素と、変換後のモデル要素との対応関係と、変換によって変換前のモデルの要素に加えられる操作との一方もしくは両方が定義される。変換ルール集合0002をソースコード変換装置1000に読み込む処理は、利用者による一度の操作で行われる必要性は無く、繰り返し操作により行われてもよい。また、ソースコード入力ステップS101と、変換ルール入力ステップS102は、必ずしもこの順番で完了する必要性は無く、ソースコード入力部1101によりソースコード情報1001が生成される前にソースコード0001が入力され、かつ、変換ルール入力部1102が変換ルール入力処理のためにソースコード情報1001を要求するまえにソースコード0001が入力されていれば良く、したがって、ソースコード入力ステップS101の処理と、変換ルール入力ステップS102の処理とが混在する順番で処理がすすんでもよい。例えば、ソースコード入力部1102がソースコード0001を受付け、続いて、変換ルール入力部が、変換ルール集合0002を受付け、続いて、ソースコード入力部1102が、ソースコード0001をソースコード情報1001へ変換する、手順があり得る。
Subsequent to the source code input step S101, in the conversion rule input step S102, the conversion
変換ルール入力部1102は、利用者から入力された変換ルール集合0002を受け付ける。利用者から変換ルール集合0002を受け付ける方法は、例えば、次に示す方法があり得る。
The conversion
1つめの変換ルール入力方法の例として、変換ルール入力部1102は、変換ルール集合0002の一部として、利用者が手作業で直接入力した変換ルールを受け取る。
As an example of the first conversion rule input method, the conversion
2つめの変換ルール入力方法の例として、図5Aに示したように、変換ルール集合0002の少なくとも一部は、利用者が記述した変換ルール(記述)0010により入力しても良い。あるいはまた、入力部1100が、記憶部1400から変換ルールの一覧0015を取得し、それを利用者に一覧などの形式で提示し、前記一覧から利用者が選択すること、変換ルール集合0002の入力を受け付けてもよい。すなわち、利用者が、変換ルールの入力に前置して、変換ルールの検索条件0011を入力部1100の変換ルール入力部1102に入力(記述)し、続いて、変換ルール入力部1102が、前記検索条件に合致する変換ルールを、記憶部1400が有する変換ルールデータベース1401から取得し変換ルール一覧0015として前記利用者に提示する。続いて、前記利用者が、提示された前記変換ルール一覧に含まれる1つ以上の変換ルールを選択する。この利用者によって選択された1つ以上の変換ルールを、変換ルール入力部1102が、変換ルール集合0002の一部として受け付ける。
As an example of the second conversion rule input method, as shown in FIG. 5A, at least a part of the
3つめの変換ルール入力方法の例として、まず、利用者が、変換ルールの入力に前置して、変換ルールの検索条件0011を変換ルール入力部1102に入力し、続いて、変換ルール入力部1102が、前記検索条件に合致する変換ルールを、変換ルールデータベース1401から取得して、変換ルール集合0002の一部として受け付けても良い。
As an example of the third conversion rule input method, first, the user inputs the conversion
4つめの変換ルール入力方法の例として、図5Bに示したように、入力されたソースコード0001から、変換ルール入力部1102が、変換ルールの検索条件0012を抽出、生成し、さらに、前記検索条件に合致する変換ルールを、変換ルールデータベース1401から取得し、変換ルール集合0002の一部として受け付ける。
As an example of the fourth conversion rule input method, as shown in FIG. 5B, the conversion
2つめの変換ルール入力方法の例と、3つめの変換ルール入力方法の例と、4つめの変換ルール入力方法の例における、変換ルール検索条件の因子としては、例えば、後述する、変換ルールデータベース1401において、変換ルールのメタデータとして格納される情報があり得る。 The conversion rule search condition factor in the second conversion rule input method example, the third conversion rule input method example, and the fourth conversion rule input method example is, for example, a conversion rule database described later. At 1401, there may be information stored as metadata for the conversion rule.
また、5つめの変換ルール入力方法の例として、変換ルール入力部1102は、何からの方法で入力された変換ルールを加工することにより、変換ルールを受け付ける。前記加工方法の例としては、変換ルールデータベース1401には、ソースコード0001中の変数名などをパラメタ化した状態で変換ルールを保持しておき、例えば利用者の明示的な入力による方法などにより、ソースコード0001の情報にてパラメタを埋めたものを、変換ルール集合0002に含める方法があり得る。5つ目の変換ルール入力方法の例において、加工元の変換ルールの入力方法としては、既に述べた1つめの変換ルール入力方法の例など、入力された変換ルールを加工せずに用いる場合と同様の方法があり得る。
As an example of the fifth conversion rule input method, the conversion
変換ルール入力部1102が、変換ルール集合0002を受け付ける方法は、これらの変換ルール入力方法に限らず、変換処理部1200で用いる変換ルールの集合を受け付ける任意の方法でよく、また、これらの変換ルール入力方法の1つ以上の組合せにより変換ルール集合0002を受け付けてもよい。
The method by which the conversion
変換ルール入力ステップS102に続き、変換ルール適用ステップS103において、モデル構築部1201がソースコード情報1001を実装モデル1205へと変換し、続いて、実装−汎化モデル変換部1202が実装モデル1205を汎化モデル1206へと変換し(S1031)、続いて、抽象化モデル変換部1203が汎化モデル1206を抽象化し(S1032)、続いて、汎化−検査モデル変換部1204が汎化モデル1206を検査モデル1008へと変換する(S1033)。変換ルール入力ステップS102と、変換ルール適用ステップS103とは、必ずしもこの順番で処理が完了する必要性は無く、実装−汎化モデル変換部1202の処理までに実装−汎化変換ルール1005が入力され、かつ、抽象化モデル変換部1203の処理までに抽象化変換ルール1006が入力され、かつ、汎化−検査モデル変換部の処理までに汎化−検査変換ルール1007が入力されていればよい。
Following the conversion rule input step S102, in the conversion rule application step S103, the
変換ルール適用ステップS103に続き、検査コード出力ステップS104において、検査コード書出し部1301により、検査モデル1008が、検査コード0005として書き出される。検査コード0005の書出し先の指定は、必ずしも変換ルール適用ステップS103の後である必要性は無く、検査コード0005の書出しよりも先であればよい。例えば検査コード0005の書出し先の指定がソースコード入力ステップS101と平行して行われる手順があり得る。
Subsequent to the conversion rule applying step S103, in the inspection code output step S104, the inspection
次に、図7、図8A、図8Bを用いて、変換の手順をより詳細に説明する。図7に示したように、本発明では、モデル変換技術を利用し、段階的に変換するために、次のような処理を行う。 Next, the conversion procedure will be described in more detail with reference to FIGS. 7, 8A, and 8B. As shown in FIG. 7, in the present invention, the following processing is performed in order to perform stepwise conversion using a model conversion technique.
(1)ソースコード0001をこれと(ほぼ)等価な「実装モデル」1205へと変換
(2)「実装モデル」を特定のプログラミング言語に依存しない形式にて構造や論理などのプログラム情報を表現する「汎化モデル」へと変換
すなわち、異なる複数の第1変換ルール1005−1〜1005−nの少なくとも1つを用いて、「実装モデル」1205を特定のプログラミング言語に依存しない形式である中間形式の「汎化モデル」1206へと変換する。図7の例では、第1変換ルールとして、「“if文”→条件分岐」、「“switch文”→条件分岐」、「“while文”→“繰り返し”」、「“for文”→“繰り返し”」の少なくとも4つの異なる変換ルールが選択されている。
(1)
(3)汎化モデル1206に対して、抽象化のための変換を実施
すなわち、異なる複数の第2変換ルール1006−1〜1006−nの少なくとも1つを用いて、前記中間形式の汎化モデルに対して抽象化処理を行う。図7の例では、第2変換ルールとして、「データ読み込み→ランダム入力」、「データの抽象化」の少なくとも2つの異なる変換ルールが選択されている。
(3) Conversion for abstraction is performed on the
(4)汎化モデルを、「検査モデル」に変換し、コード生成(出力)
すなわち、異なる複数の第3変換ルール1007−1〜1007−nの少なくとも1つを用いて、前記中間形式の汎化モデル1206から検査コードの生成に要する情報を有する検査モデル1008に変換する。図7の例では、第3変換ルールとして、第1変換ルールに対応した「“条件分岐”→“if”文」、「“繰り返し”→“do”文」の少なくとも2つの異なる変換ルールが選択されている。
(4) Convert generalization model to “inspection model” and generate code (output)
That is, by using at least one of a plurality of different third conversion rules 1007-1 to 1007-n, the
また、実装モデル、汎化モデル、検査モデルは、それぞれ構文を定義する「メタモデル」によりデータ構造と意味論が定義される。 The implementation model, generalization model, and inspection model each define the data structure and semantics by a “meta model” that defines the syntax.
このように、実装モデルから汎化モデルへの変換に際しては、例えば、変換対象ソースコードの記述言語の文法が、繰り返し処理の記法として“for文”や“while文”を含むとき、使用者が“for文”を「繰り返し」へ変換するルールと、“While文”を「繰り返し」へ変換するルールとを、既に述べた変換ルール入力方法を用いて、第1変換ルールとして選択する。汎化モデルの抽象化の変換に際しては、使用者が検査水準(抽象化の度合い)を決定し、決定した検査水準を達成する変換ルールとして、例えば、外部データ読込みに関する命令および一連の処理をランダムな入力へと変換するルールと、特定のデータ型をより抽象度の高い型へと変換するルールとを、既に述べた変換ルール入力方法を用いて、第2変換ルールとして選択する。さらに、汎化モデルから検査モデルへの変換に当たっては、例えば、モデルチェッカの入力言語の文法が、繰り返し処理の記法として“do文”をもつとき、使用者が「繰り返し」を“do文”へ変換するルールを、既に述べた変換ルール入力方法を用いて、第3変換ルールとして選択する。変換ルールは、複数のソフトウェアにまたがって適用可能な汎用的なルールなど、繰り返し利用可能なものがデータベース化される。データベースに格納された変換ルールは、使用者による検索やルール選択の判断材料として用いられるメタ情報として、ドメイン情報や検査水準(抽象化による検査への影響)の情報を有する。 In this way, when converting from an implementation model to a generalized model, for example, when the grammar of the description language of the source code to be converted includes “for sentence” or “while sentence” as the notation of the iterative process, the user A rule for converting “for sentence” to “repetition” and a rule for converting “while sentence” to “repetition” are selected as the first conversion rule using the conversion rule input method described above. When converting the abstraction of the generalization model, the user determines the inspection level (degree of abstraction), and as a conversion rule that achieves the determined inspection level, for example, instructions and a series of processes related to external data reading are randomly selected. A rule for converting to a simple input and a rule for converting a specific data type to a type with a higher abstraction level are selected as the second conversion rule by using the conversion rule input method already described. Furthermore, when converting from the generalized model to the inspection model, for example, when the grammar of the input language of the model checker has “do sentence” as the notation of the iterative process, the user changes “repetition” to “do sentence”. The rule to be converted is selected as the third conversion rule using the conversion rule input method described above. As the conversion rules, those that can be used repeatedly, such as general-purpose rules that can be applied across a plurality of software, are stored in a database. The conversion rules stored in the database have domain information and information on the inspection level (influence on inspection by abstraction) as meta information used as a judgment material for search and rule selection by the user.
また、変換ルールの選択方法としては、次のようなものがある。
(1)汎用的なルール: 常に選択
(2)特定のライブラリに依存したルール: 使用ライブラリや、検査対象のドメイン(カテゴリ)を入力することで、まとめて選択
(3)抽象化に対応したルール:(検査したい性質・検査水準を入力して得た)変換ルール一覧から、利用者が選択、もしくは利用者自身が記述して入力、もしくは検査したい性質などから、自動生成。
The conversion rule selection method includes the following.
(1) General-purpose rules: Always selected (2) Rules that depend on a specific library: Selection by entering the library to be used and the domain (category) to be inspected (3) Rules that support abstraction : Automatically generated from the list of conversion rules (obtained by inputting the property / inspection level to be inspected) selected by the user, entered by the user himself / herself, or the property to be inspected.
図8A、図8Bに夫々、モデルの抽象化の一例を示す。モデルの抽象化により、状態数を削減することができる。しかし、抽象化によりモデルの性質に影響を与えることがある。たとえば、検出された欠陥(反例)が、もとのシステムに存在しない、もとのシステムに存在する欠陥を発見できない、等である。一方で、性質に影響を与えない健全な抽象化は、状態数削減効果が小さい傾向がある。 8A and 8B show examples of model abstraction, respectively. The model abstraction can reduce the number of states. However, abstraction can affect the properties of the model. For example, the detected defect (counterexample) does not exist in the original system, or a defect that exists in the original system cannot be found. On the other hand, a sound abstraction that does not affect properties tends to have a small effect on the number of states.
本実施例によれば、細粒度に分割された複数の変換ルールを入力するインタフェースを所有することによって、利用者による抽象化の水準の変更は、変換ルールを入力する操作により容易に実現される。すなわち、複数の細粒度の変換ルールを利用者が入力インタフェースにより選択できるため、図8A、図8Bに示したような抽象化の水準を、状況に応じて利用者が容易に選定、変更することが可能となる。 According to this embodiment, by possessing an interface for inputting a plurality of conversion rules divided into fine granularities, a change in the level of abstraction by a user can be easily realized by an operation for inputting the conversion rules. . That is, since the user can select a plurality of fine-grained conversion rules through the input interface, the user can easily select and change the level of abstraction as shown in FIGS. 8A and 8B according to the situation. Is possible.
ソースコード変換法は、複数の変換ルールを用いて検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへと変換する手順を有し、前記変換ルールは、実装−汎化変換ルールと、抽象化変換ルールと、汎化−検査変換ルールと、に分類され、変換が段階的に行われる。これにより、検査対象のソースコードの設計変更に追従する際には、複数の変換ルールの中の変更に関連する変換ルールのみを変更すればよく、変更が最小限にとどめられる。加えて、実装モデルと、汎化モデルと、検査モデルとをそれぞれメタモデルで定義し、制約を加えることにより、変換ルールによる変換結果が不正でないことを検証可能となる。これにより、検査対象のソースコードを検査コードへと抽象化しながら変換する一連の処理を、細粒度の変換ルールを組み合わせることで実現することによって生じる、変換ルールの検証コストの増大を防ぐことが出来る。 The source code conversion method includes a procedure for converting a source code to be inspected into an inspection code described in an input language of a model checker using a plurality of conversion rules, and the conversion rule is an implementation-generalization conversion rule. And an abstraction conversion rule and a generalization-inspection conversion rule, and conversion is performed in stages. Accordingly, when following the design change of the source code to be inspected, only the conversion rule related to the change among the plurality of conversion rules may be changed, and the change can be minimized. In addition, the implementation model, the generalization model, and the inspection model are each defined in the meta model, and by adding constraints, it is possible to verify that the conversion result by the conversion rule is not illegal. As a result, it is possible to prevent an increase in the verification cost of the conversion rule, which is caused by realizing a series of processes for converting the source code to be inspected while abstracting it into the inspection code by combining the fine-grained conversion rules. .
また、細粒度に分割された複数の変換ルールを入力するインタフェースを所有することによって、利用者による抽象化の水準の変更は、検査したい性質、検査水準に応じて、利用者が変換ルールを選択・入力する操作で容易に実現される。これにより、抽象化の水準の変更が困難であるという課題が解決される。例えば、繰り返し実行時のみに発生する特定の不具合がある場合、その繰返しを除去することで、特定の不具合の検出はできなくなるものの、その繰返しを発生原因に含まない不具合の検出は可能であるままに、大幅に状態数を削減できる。 In addition, by possessing an interface for inputting multiple conversion rules divided into fine granularities, users can select the conversion rule according to the property to be inspected and the inspection level when changing the level of abstraction.・ Easily realized by input operation. This solves the problem that it is difficult to change the level of abstraction. For example, if there is a specific defect that occurs only during repeated execution, it is not possible to detect the specific defect by removing the repetition, but it is still possible to detect a defect that does not include the cause of the repetition. In addition, the number of states can be greatly reduced.
さらに、モデルの変換ルールをデータベースに蓄積・再利用することで、検査対象ソースコードの設計変更や、別ソフトウェアへの応用に、低コストで対応可能になる。 Furthermore, by accumulating and reusing model conversion rules in the database, it is possible to respond to design changes of the inspection target source code and application to other software at a low cost.
なお、異なる検査ツールにて検査するために、検査ツールの形式で出力する際には、メタ・検査モデルと、汎化−検査変換ルールのみを作成すればよく、作成部分が最小限にとどめられる。これにより、異なるモデルチェッカにて検査する際のコストが高いという課題が解決される。 In order to inspect with different inspection tools, when outputting in the inspection tool format, only the meta / inspection model and generalization-inspection conversion rules need to be created, and the creation part can be minimized. . This solves the problem of high cost when inspecting with different model checkers.
図9により、本発明の第二の実施例になるソースコード変換装置および変換処理方法を説明する。この実施例においては、図9に示すように、検査コード出力ステップS104に続き、変換ルール入力ステップS102へと進むことで、既に入力されたソースコード0001を、繰り返し、異なる変換ルール集合0002を用いて、変換する手順をとってもよい。また、ある実施例においては、検査コード出力ステップS104に続き、変換ルール入力ステップS102へと進み、既に入力された変換ルール集合0002の全てまたは一部と、新たに変換ルール入力ステップS102で入力された変換ルール集合0002をあわせて、変換ルール集合0002として用いてもよい。
The source code conversion apparatus and conversion processing method according to the second embodiment of the present invention will be described with reference to FIG. In this embodiment, as shown in FIG. 9, by continuing to the inspection code output step S104 and proceeding to the conversion rule input step S102, the
本実施例によれば、細粒度に分割された複数の変換ルールを入力するインタフェースを所有し、入力されたソースコードと、変換に用いた変換ルール集合を保存し、前記ソースコードを前記変換ルール集合の一部を入れ替えて変換できることにより、異なる抽象度の複数の検査コードを生成する場合などの、同一のソースコードに対して繰り返し変換をおこなう手間を削減することができる。 According to this embodiment, the interface for inputting a plurality of conversion rules divided into fine granularities is owned, the input source code and the conversion rule set used for conversion are stored, and the source code is converted into the conversion rule. Since conversion is possible by exchanging a part of the set, it is possible to reduce the trouble of repeatedly performing conversion on the same source code, such as when generating a plurality of inspection codes having different abstraction degrees.
図10により、本発明の第三の実施例になるソースコード変換装置および変換処理方法を説明する。本実施例では、ソースコードから検査コードを得る過程において生成される実装モデルと、汎化モデルと、検査モデルとを制約条件により検証するステップを有する。 The source code conversion apparatus and conversion processing method according to the third embodiment of the present invention will be described with reference to FIG. In the present embodiment, there is a step of verifying the mounting model generated in the process of obtaining the inspection code from the source code, the generalization model, and the inspection model according to the constraint condition.
図10を用いて、変換の妥当性の検証手順を詳細に説明する。 The procedure for verifying the validity of conversion will be described in detail with reference to FIG.
特定の変換ルールが、その変換に際して対象モデルについての前提条件をもつ場合、変換対象のモデルにおいて、前記特定の変換ルールの前提条件が、他の変換ルールの適用によって満たされなくなることがあり得る。このように前提条件が満たされないときに前記特定の変換ルールによってモデル変換を実施すると、変換結果のモデルが不正な状態になり得る。また、単に変換ルールに誤りが含まれるときも、変換結果のモデルが不正な状態になり得る。 When a specific conversion rule has a precondition for the target model at the time of conversion, the precondition of the specific conversion rule may not be satisfied by the application of another conversion rule in the model to be converted. As described above, if model conversion is performed according to the specific conversion rule when the precondition is not satisfied, the model of the conversion result may be in an invalid state. In addition, even when an error is included in the conversion rule, the conversion result model may be in an invalid state.
本実施例では、ソフトウェアのソースコード0001を入力するステップと、ソースコードの情報をもつ実装モデル1205を特定のプログラミング言語に依存しない形式である中間形式(汎化モデル1206)へと変換する第1変換ルールを入力するステップと、中間形式に対して抽象化処理を行う第2変換ルールを入力するステップと、中間形式から検査コードの情報をもつ検査モデル1008に変換する第3変換ルールを入力するステップと、ソフトウェアのソースコード0001を解析して実装モデル1205へと変換するステップと、前記第1変換ルールを用いてソフトウェアのソースコード0001を前記中間形式の汎化モデル1206へと変換するステップと、第2変換ルールを用いて、前記中間形式で表現されたソフトウェアを抽象化するステップと、第3変換ルールを用いて、前記中間形式を検査モデル1008に変換するステップと、検査モデル1008を用いて検証ツールの入力言語で記述された検査コードを生成するステップと、前記各段階のモデルを各々第1の制約条件0030、第2の制約条件0031、第3の制約条件00302で検証するステップとを有する。
In this embodiment, the step of inputting the
前記各段階のモデルの、各々第1の制約条件0030、第2の制約条件0031、第3の制約条件0032による検証は、例えば、非特許文献2に開示されるMOFでメタモデルを記述することによって、もしくは、非特許文献4に開示されるOCLによりメタモデルにより定義されるモデルに対する制約条件を記述することによって、実現される。
For the verification of the model at each stage according to the
本実施例によれば、メタモデルおよび制約条件を用いることで、変換ルール同士の衝突や変換ルールの不具合による変換の妥当性を保証できる。このモデル変換では、メタモデルによって定義された形式のモデルが生成される。また、制約条件を追加し、生成されたモデルの妥当性を制約条件0030〜0032で検証することができる。
According to the present embodiment, by using the meta model and the constraint condition, it is possible to guarantee the validity of the conversion due to the collision between the conversion rules or the failure of the conversion rule. In this model conversion, a model in a format defined by the meta model is generated. Further, a constraint condition can be added, and the validity of the generated model can be verified with the
0001 ソースコード
0002 変換ルール集合
0003 メタモデル
0004 書出しルール
0005 検査コード
1000 ソースコード検査装置
1100 入力部
1200 変換処理部
1300 出力部
1400 記憶部
1001 ソースコード情報
1002 メタ・実装モデル
1003 メタ・汎化モデル
1004 メタ・検査モデル
1005 実装−汎化変換ルール
1006 抽象化変換ルール
1007 汎化−検査変換ルール
1008 検査モデル
1009 検査コード書出ルール
1101 ソースコード入力部
1102 変換ルール入力部
1201 モデル構築部
1202 実装−汎化モデル変換部
1203 抽象化モデル変換部
1204 汎化−検査モデル変換部
1205 実装モデル
1206 汎化モデル
1301 検査コード書出し部
1401 変換ルールデータベース
1402 メタモデルデータベース
1403 書出しルールデータベース
1500 制御部
S101 ソースコード入力 ステップ
S102 変換ルール入力 ステップ
S103 変換ルール適用 ステップ
S104 検査コード出力 ステップ。
0001
Claims (18)
ソフトウェアのソースコードを入力するステップと、
異なる複数の変換ルールを入力するステップと、
前記ソースコードを、前記異なる複数の変換ルールにより、検証ツールの入力言語で記述された検査コードに変換するステップとを有する
ことを特徴とするソースコード変換方法。 A source code conversion method by a source code conversion device,
Entering the software source code;
Entering different transformation rules,
Converting the source code into an inspection code described in an input language of a verification tool according to the plurality of different conversion rules.
前記異なる複数の変換ルールは、検査対象の前記ソースコードを前記検査コードへと変換し抽象化する一連の処理を、細粒度に分割したものである
ことを特徴とするソースコード変換方法。 In claim 1,
The plurality of different conversion rules are obtained by dividing a series of processes for converting and abstracting the source code to be inspected into the inspection code, and dividing the finely divided source code.
前記変換ルールは、
ソースコードを特定のプログラミング言語に依存しない形式である中間形式へと変換する第1変換ルールと、
前記中間形式に対して抽象化処理を行う第2変換ルールと、
前記中間形式から前記検査コードに変換する第3変換ルールとを含み、
ソフトウェアのソースコードを入力するステップと、
少なくとも1つの前記第1変換ルールを入力するステップと、
少なくとも1つの前記第2変換ルールを入力するステップと、
少なくとも1つの前記第3変換ルールを入力するステップと、
前記第1変換ルールを用いて、前記ソフトウェアのソースコードを、前記中間形式へと変換するステップと、
前記第2変換ルールを用いて、前記中間形式で表現された前記ソフトウェアを抽象化するステップと、
前記第3変換ルールを用いて、前記中間形式を検証ツールの入力言語で記述された検証用コードに変換するステップを有する
ことを特徴とする、ソースコード変換方法。 In claim 1,
The conversion rule is:
A first conversion rule for converting source code to an intermediate format that is independent of a specific programming language;
A second conversion rule for performing an abstraction process on the intermediate format;
A third conversion rule for converting from the intermediate format to the inspection code,
Entering the software source code;
Inputting at least one first conversion rule;
Inputting at least one second conversion rule;
Inputting at least one third transformation rule;
Converting the source code of the software into the intermediate format using the first conversion rule;
Abstracting the software expressed in the intermediate format using the second conversion rule;
A source code conversion method comprising: converting the intermediate format into a verification code described in an input language of a verification tool using the third conversion rule.
前記中間形式を制約条件により検証するステップを有する
ことを特徴とする、ソースコード変換方法。 In claim 3,
A source code conversion method comprising the step of verifying the intermediate format according to a constraint condition.
前記変換ルールは、C言語の条件分岐を前記検査コードの条件分岐に変換する構文変換を含む
ことを特徴とする、ソースコード変換方法。 In claim 1,
The source code conversion method, wherein the conversion rule includes a syntax conversion for converting a conditional branch in C language into a conditional branch in the inspection code.
前記変換ルールは、C言語の繰り返し文を、前記検査コードの繰り返しに変換する構文変換を含む
ことを特徴とする、ソースコード変換方法。 In claim 1,
The source code conversion method according to claim 1, wherein the conversion rule includes a syntax conversion for converting a repetitive sentence in C language into a repetition of the inspection code.
前記異なる複数の変換ルールの少なくとも一部は、前記ソースコード変換装置の内部に蓄積された複数の変換ルールの中から選択して入力される
ことを特徴とするソースコード変換方法。 In claim 1,
At least a part of the plurality of different conversion rules is selected and input from among a plurality of conversion rules stored in the source code conversion apparatus.
前記異なる複数の変換ルールの少なくとも一部は、利用者の記述により入力される
ことを特徴とするソースコード変換方法。 In claim 1,
At least a part of the plurality of different conversion rules is input according to a description of a user.
ソフトウェアのソースコードを入力するステップと、
異なる複数の変換ルールを入力するステップと、
前記ソースコードを、前記異なる複数の変換ルールにより、検証ツールの入力言語で記述された検査コードに変換するステップとを含み、
前記複数の変換ルールの少なくとも一部は、前記ソースコード変換装置の内部に蓄積された複数の変換ルールの中から選択して入力される
ことを特徴とするソースコード変換方法。 A source code conversion method by a source code conversion device,
Entering the software source code;
Entering different transformation rules,
Converting the source code into an inspection code described in an input language of a verification tool according to the plurality of different conversion rules,
At least a part of the plurality of conversion rules is selected and input from among a plurality of conversion rules stored in the source code conversion apparatus.
前記異なる複数の変換ルールは、前記ソースコードを、該ソースコードの記述言語に依存しない汎化されたプログラム情報をもつ汎化モデルへ変換する実装−汎化変換ルールと、前記汎化モデルを抽象化する抽象化変換ルールと、前記汎化モデルを前記検証ツールの記述言語へと変換する汎化−検査変換ルールとを含む
ことを特徴とするソースコード変換方法。 In claim 9,
The plurality of different conversion rules include an implementation-generalization conversion rule for converting the source code into a generalization model having generalized program information that does not depend on a description language of the source code, and abstracting the generalization model A source code conversion method comprising: an abstraction conversion rule to be converted; and a generalization-inspection conversion rule to convert the generalization model into a description language of the verification tool.
前記検査対象のソースコードを前記検査コードへと変換する一連の処理において、内部的に保持される情報であるモデルがその形式をメタモデルにより定義され、
前記モデルは、検査対象のソースコードに対応する情報をもつ実装モデルと、前記汎化モデルと、前記検証ツールの記述言語に対応する情報をもつ検査モデルとを含み、
前記実装モデルは、そのメタモデルであるメタ・実装モデルにより定義され、
前記汎化モデルは、そのメタモデルであるメタ・汎化モデルにより定義され、
前記検査モデルは、そのメタモデルであるメタ・検査モデルにより定義され、
前記各メタモデルは、データ構造の定義と、データに含まれる要素間の制約に関する情報とを保有する
ことを特徴とするソースコード変換方法。 In claim 10,
In a series of processes for converting the source code to be inspected into the inspection code, a model that is information held internally is defined by a meta model,
The model includes an implementation model having information corresponding to a source code to be inspected, the generalization model, and an inspection model having information corresponding to a description language of the verification tool,
The implementation model is defined by a meta / implementation model that is a meta model,
The generalization model is defined by a meta-generalization model that is a metamodel thereof,
The inspection model is defined by a meta-inspection model that is a meta model thereof,
Each of the metamodels has a data structure definition and information on constraints between elements included in the data.
前記変換ルールに関する情報は、ソースコード変換装置の記憶部に格納された変換ルールを指し示す識別情報のみが含まれており、
前記変換ルールの実体を、前記識別情報を用いて前記記憶部取り出し、変換に用いる
ことを特徴とするソースコード変換方法。 In claim 10,
The information about the conversion rule includes only identification information indicating the conversion rule stored in the storage unit of the source code conversion device,
A source code conversion method, wherein the conversion rule entity is extracted from the storage unit using the identification information and used for conversion.
前記入力されたソースコードから、前記変換ルールの検索条件を抽出、生成し、
前記検索条件に合致する変換ルールを、ソースコード変換装置の記憶部から取得し、前記変換ルールとして受け付ける
ことを特徴とするソースコード変換方法。 In claim 10,
Extracting and generating search conditions for the conversion rule from the input source code,
A source code conversion method characterized in that a conversion rule that matches the search condition is acquired from a storage unit of a source code conversion device and accepted as the conversion rule.
前記実装モデル、前記抽象プログラムモデル、及び前記検査モデルの各中間のモデルは、それぞれ構文を定義するメタモデルによりデータ構造と意味論が定義される
ことを特徴とするソースコード変換方法。 In claim 10,
A source code conversion method characterized in that a data structure and semantics of each intermediate model of the implementation model, the abstract program model, and the inspection model are defined by a meta model that defines a syntax.
前記コンピュータを、
ソフトウェアのソースコードを入力する手段、
異なる複数の変換ルールを入力する手段、及び
前記ソースコードを、前記異なる複数の変換ルールにより、検証ツールの入力言語で記述された検査コードに変換する手段
として機能させるためのソースコード変換プログラム。 A program that operates on at least one computer and constitutes a source code conversion device,
The computer,
Means to input the source code of the software,
Means for inputting a plurality of different conversion rules; and a source code conversion program for causing the source code to function as means for converting the source code into an inspection code described in an input language of a verification tool by the plurality of different conversion rules.
前記変換ルールは、
ソースコードを特定のプログラミング言語に依存しない形式である中間形式へと変換する第1変換ルールと、
前記中間形式に対して抽象化処理を行う第2変換ルールと、
前記中間形式から前記検査コードに変換する第3変換ルールとを含み、
前記コンピュータを、
前記ソースコードを入力する手段と、
少なくとも1つの前記第1変換ルールを入力する手段、
少なくとも1つの前記第2変換ルールを入力する手段、
少なくとも1つの前記第3変換ルールを入力する手段、
前記第1変換ルールを用いて、ソフトウェアのソースコードを、前記中間形式へと変換する手段、
前記第2変換ルールを用いて、前記中間形式で表現された前記ソフトウェアを抽象化する手段、及び
前記第3変換ルールを用いて、前記中間形式を前記検証ツールの入力言語で記述された検証用コードに変換する手段
として機能させるためのソースコード変換プログラム。 In claim 15,
The conversion rule is:
A first conversion rule for converting source code to an intermediate format that is independent of a specific programming language;
A second conversion rule for performing an abstraction process on the intermediate format;
A third conversion rule for converting from the intermediate format to the inspection code,
The computer,
Means for inputting the source code;
Means for inputting at least one first conversion rule;
Means for inputting at least one second conversion rule;
Means for inputting at least one third conversion rule;
Means for converting software source code into the intermediate format using the first conversion rule;
Means for abstracting the software expressed in the intermediate format using the second conversion rule; and for verification described in the input language of the verification tool using the third conversion rule A source code conversion program for functioning as a means for converting code.
前記コンピュータを、
前記中間形式を制約条件により検証する手段
として機能させるためのソースコード変換プログラム。 In claim 16,
The computer,
A source code conversion program for causing the intermediate format to function as a means for verifying with a constraint condition.
前記コンピュータを、
前記複数の変換ルールの少なくとも一部は、前記ソースコード変換装置の内部に蓄積された複数の変換ルールの中から選択して入力する手段
として機能させるためのソースコード変換プログラム。 In claim 15,
The computer,
A source code conversion program for causing at least a part of the plurality of conversion rules to function as means for selecting and inputting from among a plurality of conversion rules stored in the source code conversion apparatus.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010201797A JP2012059026A (en) | 2010-09-09 | 2010-09-09 | Source code conversion method and source code conversion program |
PCT/JP2011/068089 WO2012032890A1 (en) | 2010-09-09 | 2011-08-08 | Source code conversion method and source code conversion program |
CN2011800387841A CN103052943A (en) | 2010-09-09 | 2011-08-08 | Source code conversion method and source code conversion program |
US13/814,744 US20130239098A1 (en) | 2010-09-09 | 2011-08-08 | Source code conversion method and source code conversion program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010201797A JP2012059026A (en) | 2010-09-09 | 2010-09-09 | Source code conversion method and source code conversion program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2012059026A true JP2012059026A (en) | 2012-03-22 |
Family
ID=45810493
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010201797A Pending JP2012059026A (en) | 2010-09-09 | 2010-09-09 | Source code conversion method and source code conversion program |
Country Status (4)
Country | Link |
---|---|
US (1) | US20130239098A1 (en) |
JP (1) | JP2012059026A (en) |
CN (1) | CN103052943A (en) |
WO (1) | WO2012032890A1 (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013161057A1 (en) * | 2012-04-27 | 2013-10-31 | 株式会社日立製作所 | Source code inspection method and device |
JP2014052757A (en) * | 2012-09-06 | 2014-03-20 | Mitsubishi Electric Corp | Software design support device and software design support method |
JP2021121882A (en) * | 2020-01-31 | 2021-08-26 | 富士通株式会社 | Display method, display program, and information processing device |
Families Citing this family (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5659238B2 (en) * | 2010-10-27 | 2015-01-28 | 株式会社日立製作所 | Source code conversion method and source code conversion program |
US8904372B2 (en) * | 2011-10-28 | 2014-12-02 | Ca, Inc. | Dialog to service conversion method and system |
IN2014MU00041A (en) * | 2014-01-06 | 2015-08-21 | Tata Consultancy Services Ltd | |
CN104657190B (en) * | 2015-02-14 | 2018-05-11 | 南威软件股份有限公司 | A kind of method of the enhancing switch statement function based on C language family |
CN106293677B (en) * | 2015-06-08 | 2019-09-27 | 阿里巴巴集团控股有限公司 | A kind of code conversion method and device |
US9971581B1 (en) | 2015-12-28 | 2018-05-15 | Wells Fargo Bank, N.A. | Programming language conversion |
US11593342B2 (en) | 2016-02-01 | 2023-02-28 | Smartshift Technologies, Inc. | Systems and methods for database orientation transformation |
JP6653205B2 (en) * | 2016-03-30 | 2020-02-26 | 株式会社日立社会情報サービス | Program source conversion method, program source conversion device, information processing device, information processing method, and program |
US10585655B2 (en) * | 2016-05-25 | 2020-03-10 | Smartshift Technologies, Inc. | Systems and methods for automated retrofitting of customized code objects |
US10089103B2 (en) | 2016-08-03 | 2018-10-02 | Smartshift Technologies, Inc. | Systems and methods for transformation of reporting schema |
CN106598921A (en) * | 2016-12-12 | 2017-04-26 | 清华大学 | Method and device for converting to ancient poem from modern article based on long short term memory (LSTM) model |
CN107180193B (en) * | 2017-06-22 | 2020-03-27 | 南京大学 | Method and device for converting program code into data constraint |
US10528343B2 (en) | 2018-02-06 | 2020-01-07 | Smartshift Technologies, Inc. | Systems and methods for code analysis heat map interfaces |
US10698674B2 (en) | 2018-02-06 | 2020-06-30 | Smartshift Technologies, Inc. | Systems and methods for entry point-based code analysis and transformation |
US10740075B2 (en) * | 2018-02-06 | 2020-08-11 | Smartshift Technologies, Inc. | Systems and methods for code clustering analysis and transformation |
CN110968498B (en) * | 2018-09-30 | 2023-04-07 | 北京国双科技有限公司 | Code checking method and device |
WO2020090454A1 (en) * | 2018-11-01 | 2020-05-07 | 日立オートモティブシステムズ株式会社 | Software management device |
AU2020273724A1 (en) * | 2019-05-10 | 2021-12-16 | Ai Games Llc | System and method of computer-assisted computer programming |
US11163592B2 (en) | 2020-01-10 | 2021-11-02 | International Business Machines Corporation | Generation of benchmarks of applications based on performance traces |
US11138094B2 (en) | 2020-01-10 | 2021-10-05 | International Business Machines Corporation | Creation of minimal working examples and environments for troubleshooting code issues |
CN112202591A (en) * | 2020-08-28 | 2021-01-08 | 网宿科技股份有限公司 | Configuration management system, method and storage medium |
CN112346737B (en) * | 2021-01-08 | 2021-04-13 | 深圳壹账通智能科技有限公司 | Method, device and equipment for training programming language translation model and storage medium |
CN113282513B (en) * | 2021-06-28 | 2022-11-29 | 平安消费金融有限公司 | Interface test case generation method and device, computer equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000181750A (en) * | 1998-12-15 | 2000-06-30 | Lucent Technol Inc | Software testing method |
WO2006038394A1 (en) * | 2004-10-04 | 2006-04-13 | Matsushita Electric Industrial Co., Ltd. | Source code inspection device, method, program, and recording medium |
JP2010140408A (en) * | 2008-12-15 | 2010-06-24 | Nomura Research Institute Ltd | Source code converting device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6343376B1 (en) * | 1998-10-22 | 2002-01-29 | Computer Computer Corporation | System and method for program verification and optimization |
US20030110474A1 (en) * | 2001-12-06 | 2003-06-12 | International Business Machines Corporation | System for coverability analysis |
US7779382B2 (en) * | 2004-12-10 | 2010-08-17 | Microsoft Corporation | Model checking with bounded context switches |
KR20090071596A (en) * | 2006-09-20 | 2009-07-01 | 내셔널 아이씨티 오스트레일리아 리미티드 | Generating a transition system for use with model checking |
US8495580B2 (en) * | 2010-04-07 | 2013-07-23 | International Business Machines Corporation | Facilitating use of model transformations |
CN101866315B (en) * | 2010-06-11 | 2013-01-02 | 中国科学院计算技术研究所 | Test method and system of software development tool |
-
2010
- 2010-09-09 JP JP2010201797A patent/JP2012059026A/en active Pending
-
2011
- 2011-08-08 CN CN2011800387841A patent/CN103052943A/en active Pending
- 2011-08-08 US US13/814,744 patent/US20130239098A1/en not_active Abandoned
- 2011-08-08 WO PCT/JP2011/068089 patent/WO2012032890A1/en active Application Filing
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2000181750A (en) * | 1998-12-15 | 2000-06-30 | Lucent Technol Inc | Software testing method |
WO2006038394A1 (en) * | 2004-10-04 | 2006-04-13 | Matsushita Electric Industrial Co., Ltd. | Source code inspection device, method, program, and recording medium |
JP2010140408A (en) * | 2008-12-15 | 2010-06-24 | Nomura Research Institute Ltd | Source code converting device |
Non-Patent Citations (4)
Title |
---|
CSNJ200510024079; 大矢野 潤: '効率のよいコース探査のための抽象化' FIT2004 第3回情報科学技術フォーラム 一般講演論文集 第1分冊 , 20040820, pp.181-182, 社団法人電子情報通信学会 * |
JPN6011054224; 大矢野 潤: '効率のよいコース探査のための抽象化' FIT2004 第3回情報科学技術フォーラム 一般講演論文集 第1分冊 , 20040820, pp.181-182, 社団法人電子情報通信学会 * |
JPN6011054225; The Object Management Group: Object Constraing Language Version 2.2, 20100201 * |
JPN6011054226; The Object Management Group: Meta Object Facility (MOF) Core Specification Version 2.0, 20060101 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2013161057A1 (en) * | 2012-04-27 | 2013-10-31 | 株式会社日立製作所 | Source code inspection method and device |
JP2014052757A (en) * | 2012-09-06 | 2014-03-20 | Mitsubishi Electric Corp | Software design support device and software design support method |
JP2021121882A (en) * | 2020-01-31 | 2021-08-26 | 富士通株式会社 | Display method, display program, and information processing device |
JP7417068B2 (en) | 2020-01-31 | 2024-01-18 | 富士通株式会社 | Display method, display program, and information processing device |
Also Published As
Publication number | Publication date |
---|---|
US20130239098A1 (en) | 2013-09-12 |
CN103052943A (en) | 2013-04-17 |
WO2012032890A1 (en) | 2012-03-15 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2012032890A1 (en) | Source code conversion method and source code conversion program | |
JP5659238B2 (en) | Source code conversion method and source code conversion program | |
US8583414B1 (en) | Mapping between code coverage and model coverage for a design | |
US9952837B1 (en) | Reusable component in a modeling environment | |
EP1672547A1 (en) | Event-driven model generated from an ordered natural language interface | |
US20140208431A1 (en) | Automated tools for building secure software programs | |
JP2007012003A (en) | System for providing development environment of feature-oriented software product line | |
CN104965956B (en) | A kind of requirements verification method based on RUCM | |
US20070061641A1 (en) | Apparatus and method for generating test driver | |
US8839187B1 (en) | Automatic generation of hardware simulation interface code using pre-processor macros | |
CN106294148A (en) | C programmer software verification method based on escape character transition system and device | |
Teixeira et al. | EasyTest: An approach for automatic test cases generation from UML Activity Diagrams | |
JP2008305079A (en) | Requirement specification automatic verification method | |
WO2013161057A1 (en) | Source code inspection method and device | |
Lai et al. | Defining and verifying behaviour of domain specific language with fUML | |
JP5736588B2 (en) | Source code conversion method and source code conversion program | |
Tatale et al. | A Survey on Test Case Generation using UML Diagrams and Feasibility Study to Generate Combinatorial Logic Oriented Test Cases. | |
JP2011154568A (en) | Information processing apparatus, program verification method and program | |
Khor et al. | Requirements analysis of variability constraints in a configurable flight software system | |
JP5643971B2 (en) | Source code conversion method and source code conversion program | |
CN114647568A (en) | Automatic testing method and device, electronic equipment and readable storage medium | |
WO2009101934A1 (en) | System for verifying lsi design, method for verifying lsi design, and program therefor | |
JP2014115960A (en) | Verification device, verification method, and verification program | |
WO2022249256A1 (en) | Api detection device, api detection method, and program | |
Pradhan | User interface test automation and its challenges in an industrial scenario |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130218 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20131224 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20140422 |