JP2013120491A - Source code conversion method and source code conversion program - Google Patents

Source code conversion method and source code conversion program Download PDF

Info

Publication number
JP2013120491A
JP2013120491A JP2011268222A JP2011268222A JP2013120491A JP 2013120491 A JP2013120491 A JP 2013120491A JP 2011268222 A JP2011268222 A JP 2011268222A JP 2011268222 A JP2011268222 A JP 2011268222A JP 2013120491 A JP2013120491 A JP 2013120491A
Authority
JP
Japan
Prior art keywords
conversion
source code
conversion rule
model
abstraction
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.)
Granted
Application number
JP2011268222A
Other languages
Japanese (ja)
Other versions
JP5736588B2 (en
Inventor
Tomoyuki Myojin
智之 明神
Makoto Ichii
誠 市井
Masaaki Chikahisa
真章 近久
Hideto Noguchi
秀人 野口
Takehiko Nagano
岳彦 長野
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2011268222A priority Critical patent/JP5736588B2/en
Publication of JP2013120491A publication Critical patent/JP2013120491A/en
Application granted granted Critical
Publication of JP5736588B2 publication Critical patent/JP5736588B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Debugging And Monitoring (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a source code conversion method and a source code conversion program capable of flexibly adapting to an abstraction level etc. and associating an error trace at a source code level according to the abstraction level with a source code before abstraction.SOLUTION: A source code conversion method achieved by a source code conversion device which converts a source code of software into an inspection code described in an input language of a verification tool according to a plurality of different conversion rules performs the steps of: converting an abstracted intermediate form into an intermediate form before abstraction using an inverse conversion rule stored in a step to abstract a converted intermediate form; and converting the intermediate form before abstraction into an abstracted source code which is a source code by using an inverse conversion rule stored in a step to convert the source code into the intermediate form.

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 and a program 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. On the other hand, software has become increasingly complex and large-scale, and software reviews are performed manually. In addition, it has become very difficult to ensure quality in manual testing of software.

モデル検査技術は、ソフトウェアの振舞いを、特定モデルチェッカの入力言語で記述し、特定モデルチェッカを実行することで、前記ソフトウェアの取り得る状態を網羅的に検査することによって前記ソフトウェアが持つべき性質を満たしているかどうかを判定する技術である(例えば非特許文献1参照)。非特許文献1に開示される方法によると、ソフトウェアの振る舞いを、Promelaと呼ばれる入力言語で記述し、SPINと呼ばれるモデルチェッカに入力することで、検査を実施する。検査の結果、検査対象のソフトウェアの状態のうち、当該ソフトウェアが持つべき性質を満たしていない状態がある場合、管理者が当該状態に至る状態の遷移をトレースして、ソフトウェアの不具合箇所が特定される。   Model checking technology describes the behavior of software in the input language of a specific model checker, and executes the specific model checker to comprehensively check the possible states of the software, thereby providing the properties that the software should have. This is a technique for determining whether or not the condition is satisfied (see, for example, Non-Patent Document 1). According to the method disclosed in Non-Patent Document 1, the behavior of software is described in an input language called Promela, and input to a model checker called SPIN, thereby performing inspection. As a result of the inspection, if there is a state that does not satisfy the properties of the software to be inspected, the administrator traces the transition of the state leading to the state and identifies the software defect location. The

モデル検査技術は複雑化及び大規模化の一途をたどるソフトウェアの品質確保に有望な技術であるが、ソフトウェアの取り得る状態を網羅的に検査するため、規模の大きなソフトウェアでは、検査すべき状態数が膨大な分量となる状態爆発と呼ばれる現象が起きる。この状態爆発によって、処理に必要な時間計算量が現実的に許容不可能な大きさとなる現象、及び、処理に必要な空間計算量が処理に用いる計算機に搭載された記憶領域を超える現象の、少なくとも一方が引き起こされ、上述した検査を完了できない場合があり得る。   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 There is a phenomenon called state explosion that becomes a huge amount. Due to this state explosion, the phenomenon that the time calculation amount necessary for processing becomes practically unacceptable, and the phenomenon that the space calculation amount necessary for processing exceeds the storage area installed in the computer used for processing, At least one of them may be caused and the above-described inspection may not be completed.

状態爆発に対応するために、抽象化と呼ばれる処理を、ソースコード又は検査コードに対して行い、状態数を検査可能な範囲まで削減することがある。検査対象のソースコードが検査コードに変換される場合に計算機の内部に保持される情報(モデル)の形式は、例えば、メタモデルによって定義される。メタモデルは、例えば、MOF(例えば、非特許文献2参照)、QVT(例えば、非特許文献3参照)、及びOCL(例えば、非特許文献4参照)を用いた記述によって定義されることが知られている。   In order to cope with the 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. The format of information (model) held inside the computer when the source code to be inspected is converted into the inspection code is defined by, for example, a meta model. It is known that the meta model is defined by a description using, for example, MOF (for example, see Non-Patent Document 2), QVT (for example, Non-Patent Document 3), and OCL (for example, Non-Patent Document 4). It has been.

抽象化は、例えば、選択的実行文の分岐条件の簡略化がある。抽象化によって、本来存在しない実行パスが生じる事態、又は存在する実行パスが消滅する事態が引き起こされる場合があるため、検査コードに対する検査結果によって示されるソフトウェアの性質と本来のソフトウェアの性質とに差異が生まれることがあり得る。そのため、ソフトウェアに対して検査すべき性質に鑑み、抽象化の水準を検討した上で、抽象化を適用することが望ましい。   Abstraction includes, for example, simplification of branch conditions for selective execution statements. Since the abstraction may cause a situation where an originally nonexistent execution path occurs or an existing execution path disappears, there is a difference between the nature of the software indicated by the inspection result for the inspection code and the nature of the original software. Can be born. Therefore, it is desirable to apply abstraction after considering the level of abstraction in view of the property to be inspected for software.

さらに、モデル検査技術は、検査対象のソフトウェアを、特定モデルチェッカの入力言語で記述する労力が大きいことが実用上の問題となることがあり得る。図16に、特許文献1に開示されたソースコード変換装置の一例を示す。特許文献1に開示される方法によると、ソースコードは、特定モデルチェッカの入力言語で書かれた検査コードへ、翻訳マップを用いて変換される(ステップ910〜940)。特許文献1に開示される方法によると、検査コードは、利用者によって定義された環境モデルを用いて、前記変換とは別に前記特定モデルチェッカによって検査される(ステップ975、ステップ950〜970)。また、特許文献1には、検査の結果、検査コードが検査性質を満たしていない場合、モデルレベルでエラートレースを出力するとともに、ソースコードレベルでエラートレースを出力する方法が開示される。   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. 16 shows an example of a source code conversion apparatus disclosed in Patent Document 1. According to the method disclosed in Patent Document 1, the source code is converted into the inspection code written in the input language of the specific model checker using the translation map (steps 910 to 940). According to the method disclosed in Patent Document 1, an inspection code is inspected by the specific model checker separately from the conversion using an environment model defined by a user (steps 975 and 950 to 970). Patent Document 1 discloses a method of outputting an error trace at the model level and outputting an error trace at the source code level when the inspection code does not satisfy the inspection property as a result of the inspection.

また、検査コード書出しルールを用いて、検査モデルが検査コードに変換される方法が知られている(非特許文献5参照)。   Also, a method is known in which an inspection model is converted into an inspection code using an inspection code writing rule (see Non-Patent Document 5).

特開2000−181750号公報JP 2000-181750 A

G. J. Holzmann, "The Model Checker Spin," IEEE Transactions on Software Engineering, vol. 23, no. 5, pp. 279--295, May 1997http://doi.ieeecomputersociety.org/10.1109/32.588521G. J. Holzmann, "The Model Checker Spin," IEEE Transactions on Software Engineering, vol. 23, no. 5, pp. 279--295, May 1997 http://doi.ieeecomputersociety.org/10.1109/32.588521 The Object Management Group, "Meta Object Facility (MOF) Core Specification", formal/06-01-01, January 2006, http://www.omg.org/spec/MOF/2.0/PDFThe Object Management Group, "Meta Object Facility (MOF) Core Specification", formal / 06-01-01, January 2006, http://www.omg.org/spec/MOF/2.0/PDF The Object Management Group , "Meta Object Facility (MOF) 2.0 Query/View/Transformation Specification", formal/2008-04-03, April 2008, http://www.omg.org/spec/QVT/1.0/PDFThe Object Management Group, "Meta Object Facility (MOF) 2.0 Query / View / Transformation Specification", formal / 2008-04-03, April 2008, http://www.omg.org/spec/QVT/1.0/PDF The Object Management Group、"Object Constraint Language", formal/2006-05-01, May 2006, http://www.omg.org/spec/OCL/2.0/PDFThe Object Management Group, "Object Constraint Language", formal / 2006-05-01, May 2006, http://www.omg.org/spec/OCL/2.0/PDF The Object Management Group, "MOF Model to Text Transformation Language, v1.0", formal/2008-01-16, January 2008, http://www.omg.org/spec/MOFM2T/1.0/PDFThe Object Management Group, "MOF Model to Text Transformation Language, v1.0", formal / 2008-01-16, January 2008, http://www.omg.org/spec/MOFM2T/1.0/PDF

ソフトウェアが果たす責任が重大化していることに伴って、ソフトウェアに高い信頼性が要求される。また、ソフトウェアの規模及び複雑さが増大していることに伴って、ソフトウェアを目視によるレビュー及びソフトウェアの手作業によるテストには限界がある。モデル検査技術による信頼性を確保するためには、ソフトウェアの仕様、設計、及び実装を適切に抽象化することによって、ソフトウェアが曖昧さなく解釈されるように形式的に記述できること、並びに、ソフトウェアが特定の性質を満たしているかどうかを、自動的及び網羅的に検査できることが必要である。また、検査結果が、抽象化前のソフトウェアの仕様、設計、及び実装のどの部分に関するものであるかを対応付けし、検査結果がソフトウェアに反映される必要がある。   As the responsibilities that software fulfills are increasing, software must be highly reliable. Also, with the increasing size and complexity of software, there is a limit to visual review of software and manual testing of software. In order to ensure reliability through model checking techniques, the software specification, design, and implementation can be appropriately abstracted so that the software can be formally described so that it can be interpreted unambiguously, and It is necessary to be able to automatically and comprehensively check whether a specific property is satisfied. Further, it is necessary to associate which part of the specification, design, and implementation of the pre-abstraction software is related to the inspection result, and to reflect the inspection result in the software.

しかし、特許文献1に開示される方法には、以下の(1)〜(4)の課題が存在する。(1)ソフトウェアの抽象化の水準の変更が困難であること(2)ソフトウェアの設計変更への追従コストが高いこと(3)異なるモデルチェッカを用いてソフトウェアを検査する場合のコストが高いこと(4)利用者によって選択された抽象化水準によるモデルの検査結果と抽象化前のソフトウェアと対応づける場合のコストが高いこと
上記(1)〜(4)の課題について詳細に説明する。
However, the method disclosed in Patent Document 1 has the following problems (1) to (4). (1) Difficult to change the level of software abstraction (2) High cost of following software design changes (3) High cost when software is inspected using different model checkers ( 4) The cost of associating the test result of the model based on the abstraction level selected by the user with the software before abstraction is high The problems (1) to (4) will be described in detail.

上記(1)の課題について説明する。特許文献1に開示される方法では、ソースプログラムの改訂等、新しいタイプの命令がソースコード内に導入された場合のみに翻訳マップが変更される。このため、利用者が抽象化の水準を変更する方法は、利用者が変換前の検査対象のソースコードに修正を加える方法と、変換後の特定モデルチェッカの入力言語で書かれた検査コードに修正を加える方法と、環境モデルに修正を加える方法とに限定される。いずれの方法においても、利用者が大きな手間を費やすことになる。   The problem (1) will be described. In the method disclosed in Patent Document 1, the translation map is changed only when a new type of instruction such as revision of the source program is introduced into the source code. For this reason, there are two ways for the user to change the level of abstraction: the user modifies the source code to be inspected before conversion, and the inspection code written in the input language of the specific model checker after conversion. The method is limited to the method of adding correction and the method of correcting the environmental model. In either method, the user spends a lot of time.

上記(2)の課題について説明する。特許文献1に開示される方法では、使用するライブラリの変更などの設計変更が生じた場合、翻訳マップ及び環境モデルを修正しなければならない。しかし、ソースコードと当該ソースコードの変換先である検査コードとを対応付けるマップ要素によって翻訳マップが構成されていること、及び環境モデルが特定モデルチェッカの入力言語で記述されていることに起因して、利用者が設計変更に追従するように整合性を保ちながら修正することは困難である。   The problem (2) will be described. In the method disclosed in Patent Document 1, when a design change such as a change in a library to be used occurs, the translation map and the environment model must be corrected. However, due to the fact that the translation map is composed of map elements that associate the source code with the inspection code that is the conversion destination of the source code, and that the environmental model is described in the input language of the specific model checker It is difficult for the user to make corrections while maintaining consistency so as to follow the design change.

上記(3)の課題について説明する。特許文献1に開示される方法では、異なるモデルチェッカを用いてソースコードを検査するためには、翻訳マップ及び環境モデルを修正しなければならない。しかし、ソースコードと当該ソースコードの変換先である前記検査コードとを対応付けるマップ要素によって翻訳マップが構成されていること、及び、環境モデルが特定モデルチェッカの入力言語で記述されていることに起因して、利用者は、翻訳マップ及び環境モデルのすべてを修正しなければならず、大きなコストを要する。   The problem (3) will be described. In the method disclosed in Patent Document 1, in order to inspect the source code using different model checkers, the translation map and the environment model must be corrected. However, this is because a translation map is configured by a map element that associates a source code with the inspection code that is a conversion destination of the source code, and that an environment model is described in an input language of a specific model checker. Thus, the user has to modify all of the translation map and the environment model, which is very expensive.

上記(4)課題について説明する。特許文献1に開示される方法では、利用者によって選択された水準でソースコードが抽象化されて、抽象化されたソースコードに対してモデル検査が実行される。このため、利用者によって選択された水準に従って抽象化されたソースコードレベルのエラートレースと、ソースコードとを対応付けなければならない。しかし、ソースコードが利用者によって選択された基準で抽象化されているため、エラートレースには存在するが、ソースコードには存在しない箇所、及び前記ソースコードには存在するが、前記エラートレースには存在しない箇所の少なくとも一方が存在することになり、利用者はエラートレースとソースコードとを対応付けなければならず、利用者が大きな手間を費やすことになる。   The above (4) problem will be described. In the method disclosed in Patent Document 1, the source code is abstracted at a level selected by the user, and model checking is performed on the abstracted source code. For this reason, the source code level error trace abstracted according to the level selected by the user must be associated with the source code. However, since the source code is abstracted according to the criteria selected by the user, it exists in the error trace, but does not exist in the source code, and exists in the source code, but it exists in the error trace. There will be at least one of the non-existing locations, and the user must associate the error trace with the source code, and the user will spend a great deal of time.

また、複雑なシステムの検査では、状態爆発が容易に発生し、検査を完了することができない場合がある。このような場合において、何も検査できない状態よりも、検査水準を若干落としてでも、検査できることを利用者が望む場合がある。また、繰り返し文の実行時のみに発生する特定の不具合がある場合、この繰り返し文を除去することによって、特定の不具合の検出はできなくなるものの、大幅に状態数を削減できる。これらが理由となって、検査水準と状態数とのトレードオフを、利用者側で管理したいというニーズがある。   In addition, in a complicated system inspection, a state explosion may easily occur and the inspection may not be completed. In such a case, the user may desire to be able to inspect even if the inspection level is slightly lower than the state in which nothing can be inspected. In addition, when there is a specific defect that occurs only during the execution of a repeated statement, the number of states can be greatly reduced by removing this repeated statement, although it becomes impossible to detect the specific defect. For these reasons, there is a need to manage the trade-off between the inspection level and the number of states on the user side.

本発明は、従来の技術の課題を踏まえ、抽象化の水準等に柔軟に対応でき、かつ、抽象化水準に従ったソースコードレベルでのエラートレースと抽象化前のソースコードとを対応付けることができるソースコード変換方法及びソースコード変換プログラムを提供することを目的とする。   The present invention can flexibly cope with the level of abstraction in light of the problems of the prior art, and can associate an error trace at the source code level according to the abstraction level with the source code before abstraction. An object of the present invention is to provide a source code conversion method and a source code conversion program.

本発明の代表的な一例を示せば、ソフトウェアのソースコードを、異なる複数の変換ルールを用いて、検証ツールの入力言語で記述された検査コードに変換するソースコード変換装置で実行されるソースコード変換方法であって、前記変換ルールは、前記ソースコードを特定のプログラミング言語に依存しない形式である中間形式へ変換する第1変換ルールと、前記変換された中間形式を抽象化する第2変換ルールと、前記抽象化された中間形式を前記検査コードに変換する第3変換ルールと、を含み、前記方法は、前記ソースコードを入力するステップと、少なくとも一つの前記第1変換ルールの入力を受け付けるステップと、少なくとも一つの前記第2変換ルールの入力を受け付けるステップと、少なくとも一つの前記第3変換ルールの入力を受け付けるステップと、前記入力された第1変換ルールを用いて、前記ソースコードを前記中間形式へ変換し、前記変換された箇所を逆変換ルールに記憶するステップと、前記入力された第2変換ルールを用いて、前記変換された中間形式を抽象化し、前記抽象化された箇所を前記逆変換ルールに記憶するステップと、前記入力された第3変換ルールを用いて、前記抽象化された中間形式を前記検査コードへ変換するステップと、前記変換された中間形式を抽象化するステップで記憶された前記逆変換ルールを用いて、前記抽象化された中間形式を前記抽象化される前の中間形式に変換するステップと、前記ソースコードを前記中間形式に変換するステップで記憶された前記逆変換ルールを用いて、前記抽象化される前の中間形式をソースコードである抽象化ソースコードに変換するステップと、を含むことを特徴とする。   To show a typical example of the present invention, a source code executed by a source code conversion device that converts a software source code into an inspection code described in an input language of a verification tool using a plurality of different conversion rules. A conversion method, wherein the conversion rule includes a first conversion rule that converts the source code into an intermediate format that does not depend on a specific programming language, and a second conversion rule that abstracts the converted intermediate format. And a third conversion rule for converting the abstracted intermediate form into the inspection code, wherein the method receives the source code and at least one first conversion rule input. Receiving an input of at least one second conversion rule; and at least one third conversion rule. Receiving the force, converting the source code into the intermediate format using the input first conversion rule, storing the converted portion in an inverse conversion rule, and the input second Abstracting the transformed intermediate form using a transformation rule, storing the abstracted location in the inverse transformation rule; and using the inputted third transformation rule Using the reverse conversion rules stored in the step of converting an intermediate format into the inspection code and in the step of abstracting the converted intermediate format, the abstracted intermediate format before the abstracted Using the inverse conversion rules stored in the step of converting to an intermediate format and the step of converting the source code to the intermediate format, the intermediate format before being abstracted is a source. Characterized in that it comprises a step of converting a is abstracted source code Sukodo, the.

本願において開示される発明のうち代表的なものによって得られる効果を簡潔に説明すれば、下記の通りである。すなわち、抽象化の水準等に柔軟に対応でき、かつ、抽象化水準に従ったソースコードレベルでのエラートレースと抽象化前のソースコードとを対応付けることができるソースコード変換方法及びソースコード変換プログラムを提供できる。   The effects obtained by the representative ones of the inventions disclosed in the present application will be briefly described as follows. That is, a source code conversion method and a source code conversion program that can flexibly correspond to an abstraction level and the like, and can associate an error trace at a source code level according to the abstraction level with a source code before abstraction Can provide.

本発明の基本概念を説明するための図である。It is a figure for demonstrating the basic concept of this invention. 本発明のソースコード変換処理における、変換ルールの入力インタフェースについて説明する図である。It is a figure explaining the input interface of the conversion rule in the source code conversion process of this invention. 本発明の第1の実施例のソースコード変換システムの構成例を示す図である。It is a figure which shows the structural example of the source code conversion system of 1st Example of this invention. 本発明の第1の実施例のソースコード変換システムにおけるソースコード変換装置の構成例を示す図である。It is a figure which shows the structural example of the source code conversion apparatus in the source code conversion system of 1st Example of this invention. 本発明の第1の実施例の処理フローの例を示す図である。It is a figure which shows the example of the processing flow of 1st Example of this invention. ソースコード変換装置に対する入力操作の一例を示す図である。It is a figure which shows an example of input operation with respect to a source code converter. ソースコード変換装置に対する入力操作の他の例を示す図である。It is a figure which shows the other example of input operation with respect to a source code converter. ソースコード変換装置の動作を説明する図である。It is a figure explaining operation | movement of a source code converter. ソースコード変換の手順をより詳細に説明する図である。It is a figure explaining the procedure of source code conversion in detail. モデルの抽象化の一例を示す図である。It is a figure which shows an example of the abstraction of a model. モデルの抽象化の一例を示す図である。It is a figure which shows an example of the abstraction of a model. 本発明の第2の実施例のソースコード変換システムの構成例を示す図である。It is a figure which shows the structural example of the source code conversion system of the 2nd Example of this invention. 本発明の第2の実施例のソースコード変換システムにおけるソースコード変換装置の構成例を示す図である。It is a figure which shows the structural example of the source code conversion apparatus in the source code conversion system of the 2nd Example of this invention. 本発明の第2の実施例の抽象化ソースコードが出力されるまでの具体例の説明図である。It is explanatory drawing of the specific example until the abstraction source code of 2nd Example of this invention is output. 本発明の第3の実施例のソースコード変換システムにおけるソースコード変換装置の構成例を示す図である。It is a figure which shows the structural example of the source code conversion apparatus in the source code conversion system of the 3rd Example of this invention. 本発明の第3の実施例の抽象化ソースコードが出力されるまでの具体例の説明図である。It is explanatory drawing of the specific example until the abstract source code of 3rd Example of this invention is output. 本発明の第4の実施例になるソースコード変換装置の処理フローの例を示す図である。It is a figure which shows the example of the processing flow of the source code converter which becomes the 4th Example of this invention. 本発明の第5の実施例における、変換の妥当性の検証の手順を詳細に説明する図である。It is a figure explaining in detail the procedure of verification of the validity of conversion in the 5th Example of this invention. 従来例のソースコード変換装置の一例を示す図である。It is a figure which shows an example of the source code conversion apparatus of a prior art example.

本発明では、異なる複数の変換ルールを用いて検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへ変換する。前記異なる複数の変換ルールは、検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへ変換し、抽象化する一連の処理を細粒度に分割したものであり、複数の変換ルールを組み合わせて用いることにより、前記ソースコードから前記検査コードへの変換が実現される。   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 in combination, conversion from the source code to the inspection code is realized.

本発明において、検査対象のソースコードを検査コードへ変換する一連の処理を、抽象化の処理も含めて、細粒度に分割し、分割されたそれぞれを、「変換ルール」と呼ぶ。本発明により実現されるソースコード変換装置は、ソースコードを検査コードへ変換する場合、異なる複数の変換ルールが、利用者によって、選択され、又は入力されるためのインタフェースを所有する。前記変換ルールは、事前にソースコード変換装置内部に蓄積された複数の変換ルールの中からの選択と、利用者の記述と、のいずれかの手段により入力される。   In the present invention, a series of processing for converting a source code to be inspected into an inspection code is divided into fine granularities including abstraction processing, and each divided is referred to as a “conversion rule”. The source code conversion apparatus realized by the present invention has an interface for selecting or inputting a plurality of different conversion rules by a user when converting a source code into an 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 source code into a format having generalized program information (generalization model) independent of the description language of the source code, The generalized model is classified into an abstraction conversion rule for abstracting a generalized model and a generalization-check conversion rule for converting a generalized model into a description language of a model checker. In other words, the plurality of different conversion rules include a first conversion rule for converting source code into an intermediate format that is a format independent of a specific programming language, and a second conversion rule for performing 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, and the generalization model. This is realized by successively performing the three steps of converting the generalized model into a test code according to the generalization-check 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 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 input the intermediate format to the verification tool This is realized by continuously performing the three steps of converting into the verification code described in the 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.

また、本発明は、ソースコードを中間形式へ変換するステップでは、変換した箇所を逆変換ルールに記憶し、中間形式を抽象化するステップでは、抽象化した箇所を逆変換ルールに記憶し、変換された中間形式を抽象化するステップで記憶された逆変換ルールを用いて、抽象化された中間形式を抽象化される前の中間形式に変換するステップと、ソースコードを中間形式に変換するステップで記憶された逆変換ルールを用いて、抽象化される前の中間形式をソースコードである抽象化ソースコードに変換するステップと、を含む。   In the step of converting the source code to the intermediate format, the converted part is stored in the reverse conversion rule. In the step of abstracting the intermediate form, the abstracted part is stored in the reverse conversion rule. A step of converting the abstracted intermediate format into the intermediate format before being abstracted, and a step of converting the source code into the intermediate format, using the reverse conversion rule stored in the step of abstracting the intermediate format And converting the intermediate format before being abstracted into an abstracted source code that is a source code using the inverse transformation rule stored in (1).

以下、図面を参照して本発明の実施形態について詳しく説明する。   Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.

まず、図1、図2を参照しながら本発明の基本概念を説明する。本発明では、図1に示すように、ソースコード0001に対して、ソースコード変換装置1000において、複数の変換ルール0002を組み合わせた変換処理を行うことにより、既存モデル検査装置に適合した検査コード0005へ変換する。すなわち、(a)“変換”を細粒度に分割し、複数の「変換ルール」0002の組み合わせとしてパッケージ化することで、柔軟な変換を実現する。(b)利用者(検査者)は、検査対象のソースコード0001を入力し、対象のソースコードと検査水準に応じた「変換ルール」0002を選択して、所望の検査コード0005を得る。   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 0001 is subjected to a conversion process in which a plurality of conversion rules 0002 are combined in the source code conversion apparatus 1000, so that the inspection code 0005 suitable for the existing model inspection apparatus is obtained. Convert to That is, (a) “conversion” is divided into fine granularities and packaged as a combination of a plurality of “conversion rules” 0002, thereby realizing flexible conversion. (B) The user (inspector) inputs the source code 0001 to be inspected, selects the “conversion rule” 0002 corresponding to the target source code and the inspection level, and obtains the desired inspection code 0005.

本発明における、「変換ルール」の例を挙げると次の通りである。
(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.

本発明によれば、細粒度に分割された複数の変換ルール0002を入力するインタフェースを所有するので、利用者による抽象化の変更は、複数の異なる変換ルール0002を選択・入力する操作によって容易に実現される。すなわち、利用者による抽象化の水準の変更は、ドメイン情報、検査したい性質、及び検査水準の情報(抽象化による性質への影響)に応じて、利用者が複数の異なる変換ルール0002を選択して呼び出し、ソースコード変換装置1000へ入力する操作によって容易に実現される。   According to the present invention, since an interface for inputting a plurality of conversion rules 0002 divided into fine granularities is possessed, the abstraction can be easily changed by the user by selecting and inputting a plurality of different conversion rules 0002. Realized. In other words, the user can change the abstraction level by selecting a plurality of different conversion rules 0002 according to the domain information, the property to be inspected, and the information on the inspection level (influence on the property due to abstraction). And is easily realized by an operation of inputting to the source code conversion apparatus 1000.

本発明によれば、異なる複数の変換ルール0002を用いて検査対象のソースコード0001をモデルチェッカの入力言語で記述された検査コード0005へ変換する手順を含んでいる。前記異なる複数の変換ルールは、実装−汎化変換ルールと、抽象化変換ルールと、汎化−検査変換ルールとに分類され、これらの変換ルールを用いた変換は段階的に実行される。検査対象のソースコードの設計変更に追従する際には、変更に関連する変換ルールのみを変更すればよく、変更が最小限にとどめられる。加えて、実装モデルと、汎化モデルと、検査モデルとをそれぞれメタモデルで定義し、制約を加えることにより、変換ルールによる変換結果が不正でないことを検証可能となる。これによって、本実施形態では、検査対象のソースコードを検査コードへ抽象化しながら変換する一連の処理は、細粒度の変換ルールを組み合わせることで実現されるが、このような一連の処理の実現方法によって生じる変換ルールの検証コストの増大を防ぐことができる。   The present invention includes a procedure for converting the source code 0001 to be inspected into the inspection code 0005 described in the input language of the model checker using a plurality of different conversion rules 0002. The plurality of different conversion rules are classified into an implementation-generalization conversion rule, an abstraction conversion rule, and a generalization-inspection conversion rule, and conversion using these conversion rules is executed in stages. 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. Thus, in this embodiment, a series of processes for converting the source code to be inspected while abstracting it into the inspection code is realized by combining fine-grained conversion rules. A method for realizing such a series of processes It is possible to prevent an increase in the verification cost of the conversion rule caused by.

また、異なる検査ツールにて検査するために、前記検査ツールの形式で出力する際には、メタ・検査モデルと、汎化−検査変換ルールのみを作成すればよく、作成部分が最小限にとどめられる。   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.

(第1の実施例)
次に、本発明の第1の実施例になるソースコード変換装置及び変換処理方法を、図3Aから図8Bを参照しながら説明する。
(First embodiment)
Next, a source code conversion apparatus and conversion processing method according to the first embodiment of the present invention will be described with reference to FIGS. 3A to 8B.

図3Aは、第一の実施例となるソースコード変換装置を含むソースコード変換システムの構成例を示す図である。本発明の実施形態に適用されるソースコード変換装置1000は、検査対象のソースコード0001を検査コード0005に変換する装置であり、入力部1100と、変換処理部1200と、出力部1300と、記憶部1400と、制御部1500とを備える。2000はモデル検査ツール、3000は検査結果を示す。   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 code conversion apparatus 1000 applied to an embodiment of the present invention is an apparatus that converts a source code 0001 to be inspected into an inspection code 0005, and includes an input unit 1100, a conversion processing unit 1200, an output unit 1300, and a storage. Unit 1400 and control unit 1500. Reference numeral 2000 denotes a model inspection tool, and reference numeral 3000 denotes an inspection result.

入力部1100は、ソースコード0001及び変換ルール0002の入力を受け付ける。記憶部1400には、変換ルール0002、メタモデル0003、及び書出しルール0004が格納される。メタモデル0003は、変換処理部1200によるソースコード001を検査コード0005へ変換する一連の処理で内部的に保持されるモデルの形式を定義するためのデータである。   The input unit 1100 receives input of the source code 0001 and the conversion rule 0002. The storage unit 1400 stores a conversion rule 0002, a meta model 0003, and a writing rule 0004. The meta model 0003 is data for defining a model format internally held in a series of processes for converting the source code 001 into the inspection code 0005 by the conversion processing unit 1200.

変換処理部1200は、検査対象のソースコード0001を変換ルール0002に基づいて検査コード0005に変換する。出力部1300は書出しルール0004に基づいて検査コード0005を出力する。制御部1500は、ソースコード変換装置1000の全体の処理を制御するための各種処理を実行するプロセッサである。なお、入力部1100、変換処理部1200、及び出力部1300は、記憶部1400に記憶される図示しない各部の各機能を実現するプログラムをプロセッサが実行することによって実現される。また、各機能を実現するプログラム、テーブル、ファイル等の情報は、不揮発性半導体メモリ、ハードディスクドライブ、SSD(Solid State Drive)等の記憶デバイス、または、ICカード、SDカード、DVD等の計算機読み取り可能な非一時的データ記憶媒体に格納することができる。   The conversion processing unit 1200 converts the source code 0001 to be inspected into the inspection code 0005 based on the conversion rule 0002. The output unit 1300 outputs the inspection code 0005 based on the writing rule 0004. The control unit 1500 is a processor that executes various processes for controlling the entire process of the source code conversion apparatus 1000. Note that the input unit 1100, the conversion processing unit 1200, and the output unit 1300 are realized by a processor executing a program that realizes each function of each unit (not shown) stored in the storage unit 1400. Information such as programs, tables, and files that realize each function can be read by non-volatile semiconductor memory, hard disk drives, storage devices such as SSD (Solid State Drive), or computers such as IC cards, SD cards, and DVDs. Can be stored on any non-transitory data storage medium.

図3Bに、ソースコード変換装置1000の構成例を示す。入力部1100は、ソースコード入力部1101、及び変換ルール入力部1102を有する。変換処理部1200は、モデル構築部1201、実装−汎化モデル変換部1202、抽象化モデル変換部1203、及び、汎化−検査モデル変換部1204を有する。出力部1300は、検査コード書出し部1301を有する。記憶部1400は、変換ルールデータベース1401、メタモデルデータベース1402、及び、書出しルールデータベース1403を有する。   FIG. 3B shows a configuration example of the source code conversion apparatus 1000. The input unit 1100 includes a source code input unit 1101 and a conversion rule input unit 1102. The conversion processing unit 1200 includes a model construction unit 1201, an implementation-generalized model conversion unit 1202, an abstract model conversion unit 1203, and a generalization-check model conversion unit 1204. The output unit 1300 includes an inspection code writing unit 1301. The storage unit 1400 includes a conversion rule database 1401, a metamodel database 1402, and a writing rule database 1403.

ソースコード変換装置1000は、例えば、1台のコンピュータ、又は、ネットワークを介して接続された複数のコンピュータ上で動作するプログラムとして実施される。ソースコード0001と変換ルール集合0002とは、例えば、コンピュータ上の記憶装置から読込む方法と、コンピュータに接続された入力デバイスにより直接入力される方法等の方法により入力される。また、検査コード0005は、例えば、コンピュータ上の記憶装置に書出す方法と、コンピュータのディスプレイ装置に表示する方法により出力される。   The source code conversion apparatus 1000 is implemented, for example, as a program that operates on a single computer or a plurality of computers connected via a network. The source code 0001 and the conversion rule set 0002 are input by a method such as a method of reading from a storage device on a computer and a method of directly inputting by an input device connected to the computer. The inspection code 0005 is output by, for example, a method of writing to a storage device on a computer and a method of displaying on a display device of a computer.

入力部1100は、ユーザによって入力されるデータを受付け、入力されたデータを変換処理部1200へ供給する処理を行う。入力部1100は、ソースコード0001に関する情報と、細粒度に分割された複数の変換ルール、すなわち「変換ルール集合」0002に関する情報とを受付け、変換処理部1200へ供給する。ある実施形態においては、入力部1100は、ユーザによる、変換処理部の駆動や制御、出力部の駆動や制御、に関する指示を受け付けてもよい。   The input unit 1100 receives data input by the user and performs a process of supplying the input data to the conversion processing unit 1200. The input unit 1100 receives information related to the source code 0001 and a plurality of conversion rules divided into fine granularities, that is, information related to the “conversion rule set” 0002, and supplies the information to the conversion processing unit 1200. In an embodiment, the input unit 1100 may receive an instruction from the user regarding driving and control of the conversion processing unit and driving and control of the output unit.

変換処理部1200には、入力部1100から、ソースコード0001の情報と、ソースコード0001に適用すべき変換ルール集合0002の情報とが供給される。また、変換処理部1200は、ソースコード0001を、変換ルール集合0002によって変換する処理を行い、変換結果の情報を、出力部1300に供給する。ある実施形態においては、入力部1100から供給される変換ルール集合0002に関する情報は、記憶部1400に格納された変換ルール0002を指し示す識別情報のみが含まれていて、変換ルール集合0002の実体を、前記識別情報を用いて記憶部1400から取り出し、変換に用いてもよい。   Information about the source code 0001 and information about the conversion rule set 0002 to be applied to the source code 0001 are supplied to the conversion processing unit 1200 from the input unit 1100. In addition, the conversion processing unit 1200 performs processing for converting the source code 0001 by the conversion rule set 0002, and supplies information of the conversion result to the output unit 1300. In an embodiment, the information related to the conversion rule set 0002 supplied from the input unit 1100 includes only identification information indicating the conversion rule 0002 stored in the storage unit 1400. The identification information may be taken out from the storage unit 1400 and used for conversion.

図6を用いて、変換処理部1200及び出力部1300の詳細ついて説明する。   Details of the conversion processing unit 1200 and the output unit 1300 will be described with reference to FIG.

変換処理部1200は、モデル構築部1201と、実装−汎化モデル変換部1202と、抽象化モデル変換部1203と、汎化−検査モデル変換部1204とを有する。   The conversion processing unit 1200 includes a model construction unit 1201, an implementation-generalized model conversion unit 1202, an abstract model conversion unit 1203, and a generalization-check model conversion unit 1204.

本実施例において、変換処理部1200は、メタモデル0003(図3A参照)と、変換ルール0002を用いたモデル変換により、ソースコード情報1001を、検査モデル1008へ変換する。メタ・実装モデル1002と、メタ・汎化モデル1003と、メタ・検査モデル1004とは、例えば、非特許文献2に記載のMOFにて記述される。また、例えば、非特許文献3に記載されているQVTにて、実装−汎化変換ルール1005と、抽象化変換ルール1006と、汎化−検査変換ルール1007とを記述し、モデルの変換を行う。前記変換は、既に例示した方法の他のモデル変換方法でもよく、また、複数の方法を混在させてもよい。   In the present embodiment, the conversion processing unit 1200 converts the source code information 1001 into an inspection model 1008 by model conversion using the meta model 0003 (see FIG. 3A) and the conversion rule 0002. The meta / implementation model 1002, the meta / generalization model 1003, and the meta / inspection model 1004 are described in, for example, the MOF described in Non-Patent Document 2. Also, for example, in the QVT described in Non-Patent Document 3, the implementation-generalization conversion rule 1005, the abstraction conversion rule 1006, and the generalization-inspection conversion rule 1007 are described, and the model is converted. . The conversion may be another model conversion method already exemplified, or a plurality of methods may be mixed.

また、ある実施例においては、実装−汎化モデル変換部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 model conversion unit 1202, the abstraction model conversion unit 1203, and the generalization-check model conversion unit 1204 may be performed by the same part without being independent of each other. . Further, a meta / implementation model 1002, a meta / generalization model 1003, and a meta / inspection model 1004 are separately prepared as metamodels of the implementation model 1205, the generalization model 1206, and the inspection model 1008, respectively. Instead, the mounting model 1205, the generalization model 1206, and the inspection model 1008 may be defined by a single meta model. In one embodiment, the meta / implementation model 1002, the meta / generalization model 1003, and the meta / inspection model 1004 are implemented by a plurality of methods, respectively, an implementation model 1205, a generalization model 1206, and an inspection model 1008. You may define the form and constraints. For example, each meta model includes the constraint conditions described in the OCL described in Non-Patent Document 4 in addition to the definition by the MOF, and satisfies the constraint conditions when the model is converted. There can be a method of verifying whether or not.

モデル構築部1201は、ソースコード入力部1101からソースコード情報1001を受け取り、実装モデル1205へ変換する。実装モデル1205の形式は、そのメタモデルであるメタ・実装モデル1002によって定義される。実装モデル1205は、本発明の効果を最大限に得るためには、ソースコード情報1001と相互に変換するのに必要十分な情報を持つことが望ましいが、ある実施例では、検査コードを出力するという目的を逸しない程度にて、情報の省略や、追加があってもかまわない。   The model construction unit 1201 receives the source code information 1001 from the source code input unit 1101 and converts it into the implementation model 1205. The format of the mounting model 1205 is defined by a meta / implementation model 1002 that is a meta model thereof. The implementation model 1205 desirably has sufficient information necessary for mutual conversion with the source code information 1001 in order to obtain the effect of the present invention to the maximum, but in one embodiment, an inspection code is output. However, information may be omitted or added as long as the purpose is not missed.

ある実施例においては、モデル構築部1201は、ソースコード入力部1101と不可分な様態で実装され、ソースコード情報1001が生じない形態で処理が進んでもよい。   In an embodiment, the model construction unit 1201 may be implemented in a manner inseparable from the source code input unit 1101 and the process may proceed in a form in which the source code information 1001 does not occur.

実装−汎化モデル変換部1202は、実装−汎化変換ルール1005と、メタ・実装モデル1002と、メタ・汎化モデル1003とを用いて、実装モデル1205を汎化モデル1206へ変換する。汎化モデル1206は、複数のプログラミング言語における構造及び処理を表現可能なデータ構造をもつ。例えば、汎化モデル1206中では、ソースコード0001におけるIf文とSwitch文とを区別せず、選択的実行文として表現する。ある実施形態においては、実装モデル1205を、汎化モデル1206へ変換する際、実装−汎化変換ルール1005のみを用いることもあり得る。また、ある実施形態において、実装−汎化変換ルール1005が、複数の変換ルールを含む場合には、複数の変換ルールを統合して一つの変換ルールとし、実装モデル1205から汎化モデル1206への変換に利用する方法があり得る。また、ある実施形態において、実装−汎化変換ルール1005が、複数の変換ルールを含む場合には、変換処理を複数回繰り返すことで、実装モデル1205から汎化モデル1206への変換を行う手順があり得る。   The mounting-generalization model conversion unit 1202 converts the mounting model 1205 into the generalization model 1206 using the mounting-generalization conversion rule 1005, the meta / mounting model 1002, and the meta / generalization model 1003. The generalization model 1206 has a data structure that can represent structures and processes in a plurality of programming languages. For example, in the generalization model 1206, the If statement and the Switch statement in the source code 0001 are not distinguished from each other and are expressed as selective execution statements. In an embodiment, when the mounting model 1205 is converted into the generalization model 1206, only the mounting-generalization conversion rule 1005 may be used. In some embodiments, when the implementation-generalization conversion rule 1005 includes a plurality of conversion rules, the plurality of conversion rules are integrated into one conversion rule, and the implementation model 1205 to the generalization model 1206 There can be a method used for conversion. In one embodiment, when the implementation-generalization conversion rule 1005 includes a plurality of conversion rules, a procedure for converting the implementation model 1205 to the generalization model 1206 by repeating the conversion process a plurality of times is provided. possible.

抽象化モデル変換部1203は、抽象化変換ルール1006と、メタ・汎化モデル1003とを用いて、汎化モデル1206を抽象化する。抽象化の例としては、選択文における条件式を、恒真、もしくは恒偽、又は非決定的な選択で置き換える方法があり得る。ある実施例においては、汎化モデル1206を抽象化する際、抽象化変換ルール1006のみを用いることもあり得る。また、ある実施例において、抽象化変換ルール1006が、複数の変換ルールを含む場合には、複数の変換ルールを統合して一つの変換ルールとし、汎化モデル1206の抽象化に用いる方法があり得る。また、ある実施例において、抽象化変換ルール1006が、複数の変換ルールを含む場合には、変換処理を複数回繰り返すことで、汎化モデル1206の変換を行う手順があり得る。   The abstraction model conversion unit 1203 abstracts the generalization model 1206 using the abstraction conversion rule 1006 and the meta / generalization model 1003. As an example of abstraction, there may be a method of replacing a conditional expression in a selection statement with a true, false, or non-deterministic selection. In an embodiment, when abstracting the generalization model 1206, only the abstract conversion rule 1006 may be used. Further, in an embodiment, when the abstraction conversion rule 1006 includes a plurality of conversion rules, there is a method of integrating a plurality of conversion rules into one conversion rule and using it for abstracting the generalization model 1206. obtain. In an embodiment, when the abstract conversion rule 1006 includes a plurality of conversion rules, there may be a procedure for converting the generalized model 1206 by repeating the conversion process a plurality of times.

汎化−検査モデル変換部1204は、汎化−検査変換ルール1007と、メタ・汎化モデル1003と、メタ・検査モデル1004とを用いて、汎化モデル1206を、検査モデル1008へ変換する。例えば、検査コード0005がPromela形式である場合、汎化モデルにおいて選択的実行文として表現された要素は、検査モデルにおいてはIf文として表現される。ある実施形態においては、汎化モデル1206を、検査モデル1008へ変換する際、汎化−検査変換ルール1007のみを用いることもあり得る。また、ある実施形態において、汎化−検査変換ルール1007が、複数の変換ルールを含む場合には、複数の変換ルールを統合して1つの変換ルールとし、汎化モデル1206から検査モデル1008への変換に利用する方法があり得る。また、ある実施形態において、汎化−検査変換ルール1007が、複数の変換ルールを含む場合には、変換処理を複数回繰り返すことで、汎化モデル1206から検査モデル1008への変換を行う手順があり得る。   The generalization-inspection model conversion unit 1204 converts the generalization model 1206 into an inspection model 1008 using the generalization-inspection conversion rule 1007, the meta / generalization model 1003, and the meta / inspection model 1004. For example, when the inspection code 0005 is in the Promela format, an element expressed as a selective executable statement in the generalization model is expressed as an If statement in the inspection model. In an embodiment, when the generalization model 1206 is converted into the inspection model 1008, only the generalization-inspection conversion rule 1007 may be used. Further, in a certain embodiment, when the generalization-inspection conversion rule 1007 includes a plurality of conversion rules, the plurality of conversion rules are integrated into one conversion rule, and the generalization model 1206 to the inspection model 1008 are integrated. There can be a method used for conversion. Further, in a certain embodiment, when the generalization-inspection conversion rule 1007 includes a plurality of conversion rules, a procedure for converting the generalization model 1206 to the inspection model 1008 by repeating the conversion processing a plurality of times is provided. possible.

出力部1300は、変換処理部1200より供給された、変換結果の情報を用いて、検査コード0005を出力する。ある実施例においては、検査コード0005の出力に際して、例えばモデルチェッカの記述言語の文法情報などの情報を記憶部1400から供給されてもよい。   The output unit 1300 outputs the inspection code 0005 using the conversion result information supplied from the conversion processing unit 1200. In an embodiment, when the inspection code 0005 is output, information such as grammar information of the description language of the model checker may be supplied from the storage unit 1400.

検査コード書出し部1301は、メタ・検査モデル1004と、記憶部1400の書出しルールデータベース1403から取得した検査コード書出しルール1009とを用いて、検査モデル1008を検査コード0005へ変換する。例えば、非特許文献5に記載される方法にて、検査コード書出しルール1009を記述し、検査モデル1008から、検査コード0005への変換を行う。ある実施例においては、これに限らず、検査モデル1008を、検査に利用するモデルチェッカの記述形式へ変換する任意の方法でもよい。検査コード0005は、例えば、モデルチェッカとしてSPINを用いる場合には、SPINの入力言語である、Promela言語によって記述される。   The inspection code writing unit 1301 converts the inspection model 1008 into the inspection code 0005 using the meta / inspection model 1004 and the inspection code writing rule 1009 acquired from the writing rule database 1403 of the storage unit 1400. For example, the inspection code writing rule 1009 is described by the method described in Non-Patent Document 5, and the inspection model 1008 is converted to the inspection code 0005. In an embodiment, the present invention is not limited to this, and any method for converting the inspection model 1008 into a description format of a model checker used for inspection may be used. For example, when SPIN is used as a model checker, the inspection code 0005 is described in the Promela language, which is the SPIN input language.

記憶部1400において、変換ルールデータベース1401、メタモデルデータベース1402、及び書出しルールデータベース1403のそれぞれは、例えば、関係データベース、又は、階層型データベースなどの、コンピュータ上にて実現される任意のデータ格納方式で実現される。変換ルールデータベース1401と、メタモデルデータベース1402と、書出しルールデータベース1403と、は互いに同一の方式で実現されている必要性は無く、互いに異なる方式で実現されていてもよい。また、変換ルールデータベース1401と、メタモデルデータベース1402と、書出しルールデータベース1403と、のそれぞれは、単一の方式で実現されている必要性は無く、例えば、保有すべき情報の一部を関係データベースに格納し、保有すべき情報の一部を、発明を実現するコンピュータプログラム中に組込むなど、それぞれ異なる方式の組合せで実現されていてもよい。   In the storage unit 1400, each of the conversion rule database 1401, the metamodel database 1402, and the writing rule database 1403 is an arbitrary data storage method realized on a computer, such as a relational database or a hierarchical database. Realized. The conversion rule database 1401, the metamodel database 1402, and the writing rule database 1403 do not have to be implemented by the same method, and may be implemented by different methods. In addition, each of the conversion rule database 1401, the metamodel database 1402, and the writing rule database 1403 does not have to be realized by a single method. For example, a part of information to be held is a relational database. A part of the information to be stored and held may be realized by a combination of different methods, for example, incorporated in a computer program for realizing the invention.

記憶部1400は、入力部1100と、変換処理部1200と、出力部1300とが、それぞれの処理を行うのに必要な情報を供給する。例えば、記憶部1400は、変換ルールに関する情報と、メタモデルに関する情報と、モデルチェッカの記述言語の文法に関する情報とを格納する。   The storage unit 1400 supplies information necessary for the input unit 1100, the conversion processing unit 1200, and the output unit 1300 to perform respective processes. For example, the storage unit 1400 stores information on conversion rules, information on metamodels, and information on grammar of a model checker description language.

変換ルールデータベース1401は、既に述べたとおり、変換ルールを、メタデータとともに保有する。前記メタデータは、変換ルールを選択するためのものであり、実装−汎化変換ルール1005と、抽象化変換ルール1006と、汎化−検査変換ルール1007の、それぞれ異なる情報を持つ方法があり得る。実装−汎化変換ルール1005のメタデータは、例えば、変換元ソースコードの記述言語の種類があり得る。抽象化変換ルール1006のメタデータは、例えば、抽象化を分かりやすく端的に表現した名前、簡単な説明、「データの抽象化」、「処理の抽象化」などの抽象化の種別、自然語(例えばアルファベット又は数値)で表現された抽象化による状態数削減効果、自然語((例えばアルファベット又は数値)で表現された抽象化による性質への影響、及び抽象化の適用できるソフトウェアのドメイン、があり得る。汎化−検査変換ルール1007のメタデータは、例えば、検査に使用するモデルチェッカを指し示す名前があり得る。   As described above, the conversion rule database 1401 holds conversion rules together with metadata. The metadata is for selecting a conversion rule, and there may be a method having different information of the implementation-generalization conversion rule 1005, the abstraction conversion rule 1006, and the generalization-inspection conversion rule 1007. . The metadata of the implementation-generalization conversion rule 1005 can be, for example, the type of description language of the conversion source code. The metadata of the abstraction conversion rule 1006 includes, for example, a name that simply represents the abstraction in a straightforward manner, a brief description, an abstraction type such as “data abstraction”, “processing abstraction”, and a natural language ( For example, there are state number reduction effect by abstraction expressed in alphabet or numerical value, influence on properties by abstraction expressed in natural language (for example, alphabet or numerical value), and software domain to which abstraction can be applied The metadata of the generalization-inspection conversion rule 1007 may have a name indicating a model checker used for inspection, for example.

以降、図4ないし図6を参照しながら入力部1100、変換処理部1200、出力部1300、記憶部1400、及び制御部1500の詳細を説明する。   Hereinafter, the details of the input unit 1100, the conversion processing unit 1200, the output unit 1300, the storage unit 1400, and the control unit 1500 will be described with reference to FIGS.

まず、本実施例におけるソースコード変換手順の一例を、図4及び図6を参照しながら説明する。本実施例におけるソースコード変換手順は、ソースコード入力ステップS101と、変換ルール入力ステップS102と、変換ルール適用ステップS103と、検査コード出力ステップS104と、を含む。このソースコード変換手順は、制御部1500が主体となって実行される。   First, an example of the source code conversion procedure in the present embodiment will be described with reference to FIGS. 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. This source code conversion procedure is executed mainly by the control unit 1500.

まず、ソースコード入力ステップS101において、ソースコード入力部1101によって、ソースコード0001がソースコード変換装置1000に読み込まれ、ソースコード情報1001へ変換される。   First, in the source code input step S101, the source code 0001 is read into the source code conversion apparatus 1000 by the source code input unit 1101 and converted into the source code information 1001.

ソースコード入力部1101は、利用者から入力された検査対象のソースコード0001を受け付け、ソースコード情報1001へ変換する。ソースコード0001は、例えば、JIS X3010-1993に公開されるプログラミング言語Cにより記述される。ソースコード情報1001は、具体的には、例えば抽象構文木の形式で保持される。ソースコード情報1001の形式は、抽象構文木に限らず、構造や論理などソースコード0001の検査に要する情報を保持する、任意の形式でもよい。   The source code input unit 1101 receives the source code 0001 to be inspected input from the user, and converts it into source code information 1001. The source code 0001 is described in, for example, a programming language C published in JIS X3010-1993. Specifically, the source code information 1001 is held, for example, in the form of an abstract syntax tree. The format of the source code information 1001 is not limited to an abstract syntax tree, and may be any format that holds information required for the inspection of the source code 0001 such as structure and logic.

ソースコード入力ステップS101に続き、変換ルール入力ステップS102において、変換ルール入力部1102によって、細粒度に分割された複数の変換ルールである変換ルール集合0002がソースコード変換装置1000に読み込まれる。この変換ルール入力ステップS102では、変換前のモデルの要素と変換後のモデル要素との対応関係、及び変換によって変換前のモデルの要素に加えられる操作の少なくとも一方が定義される。変換ルール集合0002をソースコード変換装置1000に読み込む処理は、利用者による一度の操作で行われる必要性は無く、繰り返し操作により行われてもよい。また、ソースコード入力ステップS101、及び変換ルール入力ステップS102は、必ずしもこの順番で完了する必要性は無く、ソースコード入力部1101によりソースコード情報1001が生成される前にソースコード0001が入力され、かつ、変換ルール入力部1102が変換ルール入力処理のためにソースコード情報1001を要求する前にソースコード0001が入力されていればよい。したがって、ソースコード入力ステップS101の処理と、変換ルール入力ステップS102の処理とが混在する順番で処理が進んでもよい。例えば、ソースコード入力部1101がソースコード0001を受け付け、続いて、変換ルール入力部1102が、変換ルール集合0002を受け付け、続いて、ソースコード入力部1101が、ソースコード0001をソースコード情報1001へ変換する、手順があり得る。   Subsequent to the source code input step S101, in the conversion rule input step S102, the conversion rule input unit 1102 reads the conversion rule set 0002, which is a plurality of conversion rules divided into fine granularities, into the source code conversion apparatus 1000. In this conversion rule input step S102, at least one of a correspondence relationship between the model element before conversion and the model element after conversion, and an operation applied to the element of the model before conversion by conversion is defined. The process of reading the conversion rule set 0002 into the source code conversion apparatus 1000 is not necessarily performed by a single operation by the user, and may be performed by a repetitive operation. Further, the source code input step S101 and the conversion rule input step S102 are not necessarily completed in this order, and the source code 0001 is input before the source code information 1001 is generated by the source code input unit 1101. In addition, the source code 0001 may be input before the conversion rule input unit 1102 requests the source code information 1001 for the conversion rule input process. Therefore, the process may proceed in the order in which the process of the source code input step S101 and the process of the conversion rule input step S102 are mixed. For example, the source code input unit 1101 receives the source code 0001, then the conversion rule input unit 1102 receives the conversion rule set 0002, and then the source code input unit 1101 transfers the source code 0001 to the source code information 1001. There can be a procedure to convert.

変換ルール入力部1102は、利用者から入力された変換ルール集合0002を受け付ける。利用者から変換ルール集合0002を受け付ける方法は、例えば、次に示す方法があり得る。   The conversion rule input unit 1102 accepts a conversion rule set 0002 input from a user. As a method for receiving the conversion rule set 0002 from the user, for example, there may be the following method.

一つめの変換ルール入力方法の例として、変換ルール入力部1102は、変換ルール集合0002の一部として、利用者が手作業で直接入力した変換ルールを受け取る。   As an example of the first conversion rule input method, the conversion rule input unit 1102 receives a conversion rule that is directly input by a user manually as part of the conversion rule set 0002.

二つめの変換ルール入力方法の例として、図5Aに示すように、変換ルール集合0002の少なくとも一部は、利用者が記述した変換ルール(記述)0010により入力してもよい。また、入力部1100が、記憶部1400から変換ルールの一覧0015を取得し、取得した変換ルールの一覧0015を利用者に一覧などの形式で提示し、前記提示された一覧から変換ルールを利用者が選択することによって、変換ルール集合0002の入力を受け付けてもよい。すなわち、利用者が、変換ルールの入力に前置して、変換ルールの検索条件0011を入力部1100の変換ルール入力部1102に入力(記述)し、続いて、変換ルール入力部1102が、前記検索条件に合致する変換ルールを、記憶部1400が有する変換ルールデータベース1401から取得し変換ルール一覧0015として前記利用者に提示する。続いて、前記利用者が、提示された前記変換ルール一覧0015に含まれる一つ以上の変換ルールを選択する。この利用者によって選択された一つ以上の変換ルールを、変換ルール入力部1102が、変換ルール集合0002の一部として受け付ける。   As an example of the second conversion rule input method, as shown in FIG. 5A, at least a part of the conversion rule set 0002 may be input by a conversion rule (description) 0010 described by the user. Also, the input unit 1100 acquires the conversion rule list 0015 from the storage unit 1400, presents the acquired conversion rule list 0015 to the user in the form of a list or the like, and the conversion rule is displayed from the presented list to the user. May select the conversion rule set 0002. That is, the user inputs (describes) the conversion rule search condition 0011 to the conversion rule input unit 1102 of the input unit 1100 before the input of the conversion rule, and then the conversion rule input unit 1102 Conversion rules that match the search conditions are acquired from the conversion rule database 1401 of the storage unit 1400 and presented to the user as a conversion rule list 0015. Subsequently, the user selects one or more conversion rules included in the presented conversion rule list 0015. The conversion rule input unit 1102 accepts one or more conversion rules selected by the user as a part of the conversion rule set 0002.

三つめの変換ルール入力方法の例として、まず、利用者が、変換ルールの入力に前置して、変換ルールの検索条件0011を変換ルール入力部1102に入力し、続いて、変換ルール入力部1102が、前記検索条件に合致する変換ルールを、変換ルールデータベース1401から取得して、変換ルール集合0002の一部として受け付けてもよい。   As an example of the third conversion rule input method, first, the user inputs the conversion rule search condition 0011 to the conversion rule input unit 1102 before the conversion rule input, and then the conversion rule input unit. 1102 may acquire a conversion rule that matches the search condition from the conversion rule database 1401 and accept it as a part of the conversion rule set 0002.

四つめの変換ルール入力方法の例として、図5Bに示すように、入力されたソースコード0001から、変換ルール入力部1102が、変換ルールの検索条件0012を抽出、生成し、さらに、前記検索条件に合致する変換ルールを、変換ルールデータベース1401から取得し、変換ルール集合0002の一部として受け付ける。   As an example of the fourth conversion rule input method, as shown in FIG. 5B, the conversion rule input unit 1102 extracts and generates the conversion rule search condition 0012 from the input source code 0001, and further, the search condition Is obtained from the conversion rule database 1401 and accepted as a part of the conversion rule set 0002.

二つめの変換ルール入力方法の例と、三つめの変換ルール入力方法の例と、四つめの変換ルール入力方法の例における、変換ルール検索条件の因子としては、例えば、後述する、変換ルールデータベース1401において、変換ルールのメタデータとして格納される情報があり得る。   Examples of 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 are the conversion rule database described later. At 1401, there may be information stored as metadata for the conversion rule.

また、五つめの変換ルール入力方法の例として、変換ルール入力部1102は、何らかの方法で入力された変換ルールを加工することにより、変換ルールを受け付ける。前記加工方法の例としては、変換ルールデータベース1401には、ソースコード0001中の変数名などをパラメタ化した状態で変換ルールを保持しておき、例えば利用者の明示的な入力による方法などにより、ソースコード0001の情報にてパラメタを埋めたものを、変換ルール集合0002に含める方法があり得る。五つめの変換ルール入力方法の例において、加工元の変換ルールの入力方法としては、既に述べた一つめの変換ルール入力方法の例など、入力された変換ルールを加工せずに用いる場合と同様の方法があり得る。   As an example of the fifth conversion rule input method, the conversion rule input unit 1102 accepts a conversion rule by processing the conversion rule input by some method. As an example of the processing method, the conversion rule database 1401 holds the conversion rule in a state in which the variable name or the like in the source code 0001 is parameterized, for example, by a method by explicit input of the user, There may be a method of including the parameter embedded with the information of the source code 0001 in the conversion rule set 0002. In the fifth conversion rule input method example, the conversion rule input method for the processing source is the same as the case of using the input conversion rule without processing, such as the first conversion rule input method described above. There can be a method.

変換ルール入力部1102が、変換ルール集合0002を受け付ける方法は、これらの変換ルール入力方法に限らず、変換処理部1200で用いる変換ルールの集合を受け付ける任意の方法でよく、また、これらの変換ルール入力方法の一つ以上の組合せにより変換ルール集合0002を受け付けてもよい。   The method by which the conversion rule input unit 1102 receives the conversion rule set 0002 is not limited to these conversion rule input methods, and any method that receives a set of conversion rules used by the conversion processing unit 1200 may be used. The conversion rule set 0002 may be received by one or more combinations of input methods.

変換ルール入力ステップ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 model construction unit 1201 converts the source code information 1001 into the mounting model 1205, and then the mounting-generalization model conversion unit 1202 generalizes the mounting model 1205. Next, the abstract model conversion unit 1203 abstracts the generalized model 1206 (S1032), and then the generalization-check model conversion unit 1204 converts the generalized model 1206 to the check model 1008. (S1033). The conversion rule input step S102 and the conversion rule application step S103 do not necessarily have to be completed in this order, and the implementation-generalization conversion rule 1005 is input before the processing of the implementation-generalization model conversion unit 1202. The abstraction conversion rule 1006 may be input before the process of the abstraction model conversion unit 1203, and the generalization-check conversion rule 1007 may be input before the process of the generalization-check model conversion unit.

変換ルール適用ステップ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 code writing unit 1301 writes the inspection model 1008 as the inspection code 0005. The designation of the writing destination of the inspection code 0005 does not necessarily have to be after the conversion rule applying step S103, and may be any earlier than the writing of the inspection code 0005. For example, there may be a procedure in which the designation of the writing destination of the inspection code 0005 is performed in parallel with the source code input step S101.

次に、図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 conversion step by step using a model conversion technique.

(1)ソースコード0001をこれと(ほぼ)等価な「実装モデル」1205へ変換
(2)「実装モデル」を特定のプログラミング言語に依存しない形式にて構造及び論理などのプログラム情報を表現する「汎化モデル」1206へ変換
すなわち、異なる複数の第1変換ルール1005−1〜1005−nの少なくとも一つを用いて、「実装モデル」1205を特定のプログラミング言語に依存しない形式である中間形式の「汎化モデル」1206へ変換する。図7の例では、第1変換ルールとして、「“if文”→条件分岐」、「“switch文”→条件分岐」、「“while文”→“繰り返し”」、及び「“for文”→“繰り返し”」の少なくとも四つの異なる変換ルールが選択されている。
(1) Source code 0001 is converted into (almost) equivalent “implementation model” 1205 (2) “implementation model” is expressed in program format such as structure and logic in a format independent of a specific programming language Conversion to “generalization model” 1206 In other words, using at least one of a plurality of different first conversion rules 1005-1 to 1005-n, the “implementation model” 1205 is an intermediate format that is a format independent of a specific programming language. Conversion into “generalization model” 1206. In the example of FIG. 7, as the first conversion rule, ““ if statement ”→ conditional branch”, ““ switch statement ”→ conditional branch”, ““ while statement ”→“ repeat ””, and ““ for statement ”→ At least four different conversion rules “Repeat” are selected.

(3)汎化モデル1206に対して、抽象化のための変換を実施
すなわち、異なる複数の第2変換ルール1006−1〜1006−nの少なくとも一つを用いて、前記中間形式の汎化モデル1206に対して抽象化処理を行う。図7の例では、第2変換ルールとして、「データ読み込み→ランダム入力」、及び「データの抽象化」の少なくとも二つの異なる変換ルールが選択されている。
(3) Conversion for abstraction is performed on the generalization model 1206. That is, using at least one of a plurality of different second conversion rules 1006-1 to 1006-n, the generalized model in the intermediate format Abstraction processing is performed on 1206. In the example of FIG. 7, at least two different conversion rules of “data reading → random input” and “data abstraction” are selected as the second conversion rule.

(4)汎化モデル1206を、「検査モデル」1008に変換し、コード生成(出力)
すなわち、異なる複数の第3変換ルール1007−1〜1007−nの少なくとも一つを用いて、前記中間形式の汎化モデル1206から検査コードの生成に要する情報を有する検査モデル1008に変換する。図7の例では、第3変換ルールとして、第1変換ルールに対応した「“条件分岐”→“if”文」、及び「“繰り返し”→“do”文」の少なくとも二つの異なる変換ルールが選択されている。
(4) The generalization model 1206 is converted into an “inspection model” 1008 to generate a code (output)
That is, by using at least one of a plurality of different third conversion rules 1007-1 to 1007-n, the generalized model 1206 in the intermediate format is converted into the inspection model 1008 having information necessary for generating the inspection code. In the example of FIG. 7, as the third conversion rule, there are at least two different conversion rules corresponding to the first conversion rule: ““ conditional branch ”→“ if ”sentence” and ““ repeat ”→“ do ”sentence”. Is selected.

また、実装モデル1205、汎化モデル1206、検査モデル1008は、それぞれ構文を定義する「メタモデル」によりデータ構造及び意味論が定義される。   The implementation model 1205, the generalization model 1206, and the inspection model 1008 each have a data structure and semantics defined by a “meta model” that defines the syntax.

このように、実装モデル1205から汎化モデル1206への変換に際しては、例えば、変換対象ソースコードの記述言語の文法が、繰り返し処理の記法として“for文” 及び“while文”を含む場合、使用者が“for文”を「繰り返し」へ変換するルールと、“While文”を「繰り返し」へ変換するルールとを、既に述べた変換ルール入力方法を用いて、第1変換ルールとして選択する。汎化モデル1206の抽象化の変換に際しては、使用者が検査水準(抽象化の度合い)を決定し、決定した検査水準を達成する変換ルールとして、例えば、外部データの読込みに関する命令及び一連の処理をランダムな入力へ変換するルールと、特定のデータ型をより抽象度の高い型へ変換するルールとを、既に述べた変換ルール入力方法を用いて、第2変換ルール1006として選択する。さらに、汎化モデル1206から検査モデル1008への変換に当たっては、例えば、モデルチェッカの入力言語の文法が、繰り返し処理の記法として“do文”をもつとき、使用者が「繰り返し」を“do文”へ変換するルールを、既に述べた変換ルール入力方法を用いて、第3変換ルール1007として選択する。変換ルールは、複数のソフトウェアにまたがって適用可能な汎用的なルールなど、繰り返し利用可能なものがデータベース化される。データベースに格納された変換ルールは、使用者による検索及びルール選択の判断材料として用いられるメタ情報として、ドメイン情報や検査水準(抽象化による検査への影響)の情報を有する。   As described above, when converting from the mounting model 1205 to the generalized model 1206, for example, when the grammar of the description language of the source code to be converted includes “for sentence” and “while sentence” as the notation of the iterative process, A person selects a rule for converting “for sentence” to “repetition” and a rule for converting “while sentence” to “repetition” as the first conversion rule using the conversion rule input method described above. When converting the abstraction of the generalization model 1206, the user determines the inspection level (degree of abstraction), and as a conversion rule for achieving the determined inspection level, for example, an instruction and a series of processing related to reading of external data Are selected as the second conversion rule 1006 by using the conversion rule input method described above, and the rule for converting a specific data type to a higher abstract type. Furthermore, when converting from the generalized model 1206 to the check model 1008, for example, when the grammar of the input language of the model checker has “do sentence” as a notation of repetition processing, the user sets “repetition” to “do sentence”. The rule to be converted to “” is selected as the third conversion rule 1007 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 inspection level (influence on inspection by abstraction) as meta information used as a judgment material for search and rule selection by the user.

また、変換ルールの選択方法としては、次のようなものがある。   The conversion rule selection method includes the following.

(1)汎用的なルール:常に選択
(2)特定のライブラリに依存したルール:使用ライブラリ、及び検査対象のドメイン(カテゴリ)を入力することで、まとめて選択
(3)抽象化に対応したルール:(検査したい性質・検査水準を入力して得た)変換ルール一覧から、利用者が選択して入力、利用者自身が記述して入力、又は検査したい性質などから、自動生成。
(1) General-purpose rules: always selected (2) Rules dependent on a specific library: Selection by entering the library used and the domain (category) to be inspected (3) Rules corresponding to abstraction : Automatically generated from the list of conversion rules (obtained by inputting the property / inspection level to be inspected) selected by the user, input by the user himself / herself, or the property to be inspected.

図8A、図8Bに、それぞれモデルの抽象化の一例を示す。モデルの抽象化により、状態数を削減することができる。しかし、抽象化によりモデルの性質に影響を与えることがある。例えば、検出された欠陥(反例)が、もとのシステムに存在しない、もとのシステムに存在する欠陥を発見できない、等である。一方で、性質に影響を与えない健全な抽象化は、状態数削減効果が小さい傾向がある。   8A and 8B show examples of model abstraction. 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 present 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 the present 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 level of abstraction shown in FIGS. 8A and 8B can be easily selected or changed by the user according to the situation. Become.

ソースコード変換法は、複数の変換ルールを用いて検査対象のソースコードをモデルチェッカの入力言語で記述された検査コードへ変換する手順を有し、前記変換ルールは、実装−汎化変換ルールと、抽象化変換ルールと、汎化−検査変換ルールと、に分類され、変換が段階的に行われる。これによって、検査対象のソースコードの設計変更に追従する際には、複数の変換ルールの中の変更に関連する変換ルールのみを変更すればよく、変更が最小限にとどめられる。加えて、実装モデルと、汎化モデルと、検査モデルとをそれぞれメタモデルで定義し、制約を加えることにより、変換ルールによる変換結果が不正でないことを検証可能となる。これによって、変換ルールの検証コストの増大を防ぐことが出来る。   The source code conversion method includes a procedure of 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 includes an implementation-generalization conversion rule and Are classified into abstract conversion rules and generalization-inspection conversion rules, and conversion is performed in stages. As a result, when following the design change of the source code to be inspected, only the conversion rule related to the change in the plurality of conversion rules 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. This prevents an increase in the conversion rule verification cost.

また、モデルの変換ルールをデータベースに蓄積し、蓄積した変換ルールを再利用することによって、検査対象ソースコードの設計変更や、別ソフトウェアへの応用に、低コストで対応可能になる。   In addition, by storing model conversion rules in a database and reusing the stored conversion rules, it is possible to cope with design changes of the inspection target source code and application to other software at a low cost.

(第2の実施例)
次に、第2の実施例になるソース変換装置及びソースコード変換方法について図9〜図11を用いて説明する。本実施例では、抽象化された汎化モデルをソースコードに逆変換することによって、検査対象のソースコードの抽象化された箇所を出力するステップを有する。
(Second embodiment)
Next, a source conversion apparatus and a source code conversion method according to the second embodiment will be described with reference to FIGS. In this embodiment, there is a step of outputting the abstracted portion of the source code to be inspected by inversely converting the abstracted generalized model into the source code.

図9は、第2の実施例になるソースコード変換装置を含むソースコード変換システムの構成例を示す図である。図9のうち、第1の実施例の図3Aに示すソースコード変換システムと同じ構成は同じ符号を付与し、説明を省略する。   FIG. 9 is a diagram illustrating a configuration example of a source code conversion system including a source code conversion apparatus according to the second embodiment. In FIG. 9, the same components as those of the source code conversion system shown in FIG. 3A of the first embodiment are denoted by the same reference numerals, and description thereof is omitted.

本実施例のソースコード変換装置1000は、入力部1100、制御部1500、出力部1300、記憶部1400、及び変換処理部4100を備える。変換処理部4100は、検査対象のソースコード0001を検査コード0005に変換する点では、第1の実施例の変換処理部1200と同じであるが、ソースコード0001を検査コード0005に変換する一連の処理で抽象化された汎化モデルをソースコードに逆変換したソースコードである抽象化ソースコード4101を出力する点で、第1の実施例の変換処理部1200と異なる。   A source code conversion apparatus 1000 according to the present exemplary embodiment includes an input unit 1100, a control unit 1500, an output unit 1300, a storage unit 1400, and a conversion processing unit 4100. The conversion processing unit 4100 is the same as the conversion processing unit 1200 in the first embodiment in that the source code 0001 to be inspected is converted into the inspection code 0005, but a series of steps for converting the source code 0001 into the inspection code 0005. This is different from the conversion processing unit 1200 of the first embodiment in that an abstracted source code 4101 that is a source code obtained by reversely converting a generalized model abstracted by processing into source code is output.

図10は、第2の実施例のソースコード変換装置の構成例を示す。図10のうち、第1の実施例の図3Bに示すソースコード変換装置と同じ構成は、同じ符号を付与し、説明を省略する。   FIG. 10 shows a configuration example of the source code conversion apparatus of the second embodiment. 10, the same components as those of the source code conversion apparatus shown in FIG. 3B of the first embodiment are denoted by the same reference numerals, and the description thereof is omitted.

入力部1100は、第1の実施例と同じく、ソースコード入力部1101及び変換ルール入力部1102を備える。変換処理部4100は、モデル構築部4201、実装−汎化モデル変換部4202、抽象化モデル変換部4203、汎化−検査モデル変換部4204、汎化−実装モデル変換部4205、及びコード生成部4206を備える。出力部1300は、検査コード書出し部1301、及び抽象化ソースコード出力部4220を備える。記憶部1400は、変換ルールデータベース1401、メタモデルデータベース1402、及び書出しルールデータベース1403の他に、逆変換ルールデータベース4210を備える。   The input unit 1100 includes a source code input unit 1101 and a conversion rule input unit 1102 as in the first embodiment. The conversion processing unit 4100 includes a model construction unit 4201, an implementation-generalized model conversion unit 4202, an abstract model conversion unit 4203, a generalization-inspection model conversion unit 4204, a generalization-implementation model conversion unit 4205, and a code generation unit 4206. Is provided. The output unit 1300 includes an inspection code writing unit 1301 and an abstract source code output unit 4220. The storage unit 1400 includes an inverse conversion rule database 4210 in addition to the conversion rule database 1401, the metamodel database 1402, and the writing rule database 1403.

以下、変換処理部4100について詳細に説明する。   Hereinafter, the conversion processing unit 4100 will be described in detail.

モデル構築部4201は、ソースコード入力部1101からソースコード0001を受け取り、受け取ったソースコード0001を実装モデルへ変換する。また、モデル構築部4201は、変換箇所をソースコード−実装モデル変換対応表として逆変換ルールデータベース4210に登録する。   The model construction unit 4201 receives the source code 0001 from the source code input unit 1101 and converts the received source code 0001 into an implementation model. Also, the model construction unit 4201 registers the conversion part in the reverse conversion rule database 4210 as a source code-implemented model conversion correspondence table.

実装−汎化モデル変換部4202は、変換ルールデータベース1401から実装−汎化変換ルールを取り出し、メタモデルデータベース4221からメタ・実装モデル及びメタ・汎化モデルを取り出す。そして、実装−汎化モデル変換部4202は、取り出された実装−汎化ルール、メタ・実装モデル、及びメタ・汎化モデルを用いて、実装モデルを汎化モデルへ変換する。また、実装−汎化モデル変換部4202は、変換箇所を実装−汎化モデル変換対応表として逆変換ルールデータベース4210に登録する。   The mounting-generalization model conversion unit 4202 extracts the mounting-generalization conversion rule from the conversion rule database 1401 and extracts the meta / implementation model and the meta / generalization model from the metamodel database 4221. Then, the mounting-generalization model conversion unit 4202 converts the mounting model into a generalization model using the extracted mounting-generalization rules, meta / mounting model, and meta / generalization model. Also, the implementation-generalization model conversion unit 4202 registers the conversion location in the inverse conversion rule database 4210 as an implementation-generalization model conversion correspondence table.

抽象化モデル変換部4203は、変換ルールデータベース1401から抽象化変換ルールを取り出し、メタモデルデータベース1402からメタ・汎化モデルを取り出す。そして、抽象化モデル変換部4203は、取り出された抽象化変換ルール及びメタ・汎化モデルを用いて、汎化モデルを抽象化する。また、抽象化モデル変換部4203は、抽象化された箇所を抽象化変換対応表として逆変換ルールデータベース4210に登録する。   The abstract model conversion unit 4203 extracts an abstract conversion rule from the conversion rule database 1401 and extracts a meta / generalized model from the meta model database 1402. Then, the abstraction model conversion unit 4203 abstracts the generalization model using the extracted abstraction conversion rule and the meta / generalization model. The abstract model conversion unit 4203 registers the abstracted portion in the reverse conversion rule database 4210 as an abstract conversion correspondence table.

汎化−検査モデル変換部4204は、変換ルールデータベース1401から汎化−検査変換ルールを取り出し、メタモデルデータベース1402からメタ・汎化モデル及びメタ・検査モデルを取り出す。そして、汎化−検査モデル変換部4204は、取り出された汎化−検査変換ルール、メタ・汎化モデル及びメタ・検査モデルを用いて、汎化モデルを検査モデルへ変換する。   The generalization-inspection model conversion unit 4204 extracts the generalization-inspection conversion rule from the conversion rule database 1401 and extracts the meta / generalization model and the meta / inspection model from the metamodel database 1402. The generalization-inspection model conversion unit 4204 then converts the generalization model into an inspection model using the extracted generalization-inspection conversion rule, meta / generalization model, and meta / inspection model.

汎化−実装モデル変換部4205は、抽象化モデル変換部4203が抽象化処理を終了すると、逆変換ルールデータベース4210から抽象化変換対応表を取り出す。そして、汎化−実装モデル変換部4205は、取り出された抽象化変換対応表を用いて、抽象化された汎化モデルを抽象化される前の汎化モデルに変換する。   The generalization / implementation model conversion unit 4205 extracts the abstraction conversion correspondence table from the inverse conversion rule database 4210 when the abstraction model conversion unit 4203 ends the abstraction process. Then, the generalization-implementation model conversion unit 4205 converts the abstracted generalization model into a generalization model before being abstracted, using the extracted abstraction conversion correspondence table.

次に、汎化−実装モデル変換部4205は、逆変換ルールデータベース4210から実装−汎化変換対応表を取り出す。そして、汎化−実装モデル変換部4205は、取り出された実装−汎化変換対応表示を用いて、抽象化される前の汎化モデルを実装モデルに変換する。   Next, the generalization-implementation model conversion unit 4205 extracts the implementation-generalization conversion correspondence table from the inverse conversion rule database 4210. Then, the generalization-mounting model conversion unit 4205 converts the generalized model before being abstracted into a mounting model using the extracted mounting-generalization conversion correspondence display.

コード生成部4208は、汎化−実装モデル変換部4205によって抽象化される前の汎化モデルが実装モデルに変換されると、逆変換ルールデータベース4210からソースコード−実装変換対応表を取り出す。そして、コード生成部4208は、取り出されたソースコード−実装変換対応表を用いて、実装モデルを抽象化ソースコード4101に変換し、抽象化ソースコード4101を抽象化ソースコード出力部4220に出力する。   When the generalization model before being abstracted by the generalization / implementation model conversion unit 4205 is converted into the implementation model, the code generation unit 4208 extracts a source code / implementation conversion correspondence table from the inverse conversion rule database 4210. Then, the code generation unit 4208 uses the extracted source code-mounting conversion correspondence table to convert the mounting model into the abstract source code 4101 and outputs the abstract source code 4101 to the abstract source code output unit 4220. .

抽象化ソースコード出力部4220は、コード生成部4206から入力された抽象化ソースコード4101をシステム外部に出力する。例えば、ソースコード出力部4210は、抽象化ソースコード4101を外部記憶媒体へ保存したり、抽象化ソースコード4101を表示装置であるディスプレイに表示したりする。   The abstract source code output unit 4220 outputs the abstract source code 4101 input from the code generation unit 4206 to the outside of the system. For example, the source code output unit 4210 stores the abstract source code 4101 in an external storage medium or displays the abstract source code 4101 on a display that is a display device.

これによって、利用者が、対象ソースコードと、検査水準(抽象化の度合い)に応じて、変換ルールを選択することで、検査可能な検査コードに変換し、前記検査コードと同じ抽象化の水準の抽象化ソースコードを出力することが可能となり、利用者によって選択された抽象化水準によるモデルの検査結果と抽象化前のソフトウェアとの対応付けの課題が解決される。   As a result, the user selects the conversion rule according to the target source code and the inspection level (abstraction level), thereby converting the inspection code into an inspectable inspection code, and the same level of abstraction as the inspection code. Abstraction source code can be output, and the problem of associating the test result of the model according to the abstraction level selected by the user with the software before abstraction is solved.

次に、本実施例の具体例について図11を用いて説明する。まず、本具体例で検査対象となるソースコード0001について説明する。検査対象となるソースコード0001では、a、b、及びcの値が定義される。具体的には、aには「0」が代入され、bには、iが5より大きい場合「0」が代入され、これ以外の場合「1」が代入され、cにはcの値をインクリメントした値が代入される。   Next, a specific example of this embodiment will be described with reference to FIG. First, the source code 0001 to be inspected in this specific example will be described. In the source code 0001 to be inspected, the values of a, b, and c are defined. Specifically, “0” is assigned to a, “0” is assigned to b if i is greater than 5, “1” is assigned to other cases, and the value of c is assigned to c. The incremented value is substituted.

このソースコード0001がモデル構築部4201によって図示しない実装モデルに変換され、この実装モデルが実装−汎化モデル変換部4202によって汎化モデルに変換される。実装−汎化モデル変換部4202は、実装モデルを汎化モデルに変換する場合にソースコード0001中のif文を条件分岐に変換する。   The source code 0001 is converted into a mounting model (not shown) by the model construction unit 4201, and the mounting model is converted into a generalized model by the mounting-generalized model conversion unit 4202. The implementation-generalization model conversion unit 4202 converts the “if” statement in the source code 0001 into a conditional branch when converting the implementation model into the generalization model.

そして、抽象化モデル変換部4203は、汎化モデルの条件分岐の分岐先を固定化することによって、汎化モデルを抽象化する。具体的には、bに代入される値が「0」に固定化されるため、図11に示すように、汎化モデルの2行目、4行目、及び5行目が削除される。   Then, the abstract model conversion unit 4203 abstracts the general model by fixing the branch destination of the conditional branch of the general model. Specifically, since the value assigned to b is fixed to “0”, the second, fourth, and fifth lines of the generalized model are deleted as shown in FIG.

次に、汎化−検査モデル変換部4204は、抽象化モデル変換部4203によって抽象化された汎化モデルを検査コード0005に変換する。なお、図11に示すように、検査コード0005では、抽象化によってbに代入される値は「0」で固定されている。   Next, the generalization-check model conversion unit 4204 converts the generalization model abstracted by the abstract model conversion unit 4203 into a check code 0005. As shown in FIG. 11, in the inspection code 0005, the value assigned to b by abstraction is fixed at “0”.

汎化−検査モデル変換部4204によって変換された検査コード0005がモデル検査ツール2000によって検査され、検査結果3000が生成される。   The inspection code 0005 converted by the generalization-inspection model conversion unit 4204 is inspected by the model inspection tool 2000, and an inspection result 3000 is generated.

また、抽象化モデル変換部4203が汎化モデルを抽象化すると、汎化−実装モデル変換部4205は、逆変換ルールデータベース4210を用いて、抽象化された汎化モデルを実装モデルに逆変換する。次に、コード生成部4206は、逆変換ルールデータベース4210を用いて、逆変換された実装モデルを抽象化ソースコード4101に変換する。   When the abstract model conversion unit 4203 abstracts the general model, the generalization-implementation model conversion unit 4205 uses the reverse conversion rule database 4210 to reverse-convert the abstract general model into the implementation model. . Next, the code generation unit 4206 uses the inverse conversion rule database 4210 to convert the inversely converted implementation model into the abstract source code 4101.

抽象化ソースコード4101は、抽象化モデル変換部4203によって抽象化された箇所が利用者に把握可能な形態で出力される。図11に示す抽象化ソースコード4101は、抽象化モデル変換部4203によって抽象化された箇所が点線で囲まれた形態で出力される。   The abstract source code 4101 is output in a form that allows the user to grasp the location abstracted by the abstract model conversion unit 4203. The abstracted source code 4101 shown in FIG. 11 is output in a form in which a portion abstracted by the abstract model conversion unit 4203 is surrounded by a dotted line.

なお、抽象化された箇所が利用者に把握可能な形態で出力されるためには、抽象化された汎化モデルを抽象化される前の汎化モデルに変換した箇所を汎化−実装モデル変換部4205がコード生成部4206に抽象化された箇所として通知し、コード生成部4206が当該箇所を抽象化ソースコード4101に変換する場合に、当該箇所を利用者に把握可能な形態で出力する必要がある。   In order for the abstracted part to be output in a form that can be grasped by the user, the generalized-implemented model is used as the part where the abstracted generalized model is converted to the generalized model before being abstracted. When the conversion unit 4205 notifies the code generation unit 4206 as an abstracted portion and the code generation unit 4206 converts the portion into the abstract source code 4101, the portion is output in a form that can be grasped by the user. There is a need.

以上によって、抽象化された汎化モデルが、抽象化された箇所を抽象化される前の状態に戻した抽象化ソースコード4101に変換されるため、利用者は、検査結果と抽象化ソースコード4101とを対応付けやすくなる。   As described above, since the abstracted generalized model is converted into the abstracted source code 4101 in which the abstracted part is returned to the state before being abstracted, the user can check the check result and the abstracted source code. 4101 can be easily associated.

さらに、抽象化された箇所を利用者に把握可能にして抽象化ソースコード4101が出力されることによって、抽象化された箇所は検査結果に対応しないので、利用者は、検査結果と抽象化ソースコード4101とをさらに対応付けやすくなる。   Furthermore, since the abstracted portion does not correspond to the inspection result by allowing the user to grasp the abstracted portion and outputting the abstract source code 4101, the user can check the inspection result and the abstract source. It becomes easier to associate the code 4101 with each other.

(第3の実施例)
次に、第3の実施例になるソース変換装置及びソースコード変換方法について図12及び図13を用いて説明する。本実施例では、検査対象のソースコードの抽象化された箇所と当該抽象化に用いた抽象化変換ルールとを出力するステップを有する。
(Third embodiment)
Next, a source conversion apparatus and a source code conversion method according to the third embodiment will be described with reference to FIGS. In this embodiment, there is a step of outputting the abstracted portion of the source code to be inspected and the abstraction conversion rule used for the abstraction.

図12は、第3の実施例のソースコード変換装置の構成例を示す。図12のうち、第2の実施例の図10に示すソースコード変換装置と同じ構成は、同じ符号を付与し、説明を省略する。   FIG. 12 shows a configuration example of the source code conversion apparatus of the third embodiment. In FIG. 12, the same components as those of the source code conversion apparatus shown in FIG. 10 of the second embodiment are denoted by the same reference numerals and description thereof is omitted.

第3の実施例のソースコード変換装置に備わる変換処理部4100は、ルール適用情報付加部4301を備える点で、第2の実施例のソースコード変換装置に備わる変換処理部4100と異なる。また、第3の実施例の抽象化モデル変換部4203は、汎化モデルを抽象化した場合に、抽象化した箇所と抽象化に用いた抽象化変換ルールを特定可能な識別子とを抽象化変換対応表として逆変換ルールデータベース4210に登録する。   The conversion processing unit 4100 provided in the source code conversion device of the third embodiment is different from the conversion processing unit 4100 provided in the source code conversion device of the second embodiment in that a rule application information adding unit 4301 is provided. Also, the abstract model conversion unit 4203 of the third embodiment performs abstract conversion between the abstracted part and the identifier that can specify the abstract conversion rule used for the abstraction when the generalized model is abstracted. It is registered in the reverse conversion rule database 4210 as a correspondence table.

ルール適用情報付加部4301は、抽象化モデル変換部4203によって汎化モデルが抽象化された場合、逆変換ルールデータベース4210から抽象化変換対応表を取り出す。そして、ルール適用情報付加部4301は、取り出された抽象化変換対応表に登録された抽象化に用いた抽象化変換ルールの識別子を、汎化モデルの抽象化された箇所に付加して、当該汎化モデルを汎化−実装モデル変換部4205に渡す。   When the generalized model is abstracted by the abstract model conversion unit 4203, the rule application information adding unit 4301 extracts the abstract conversion correspondence table from the reverse conversion rule database 4210. Then, the rule application information adding unit 4301 adds the identifier of the abstraction conversion rule used for abstraction registered in the extracted abstraction conversion correspondence table to the abstracted part of the generalization model, and The generalization model is passed to the generalization-implementation model conversion unit 4205.

汎化−実装モデル変換部4205は、抽象化された汎化モデルを実装モデルに変換する場合に、実装モデルのうち、抽象化された箇所に対応する箇所に抽象化に用いた抽象化変換ルールの識別子を付加する。   The generalization-implementation model conversion unit 4205, when converting an abstracted generalization model into an implementation model, uses an abstraction conversion rule used for abstraction at a location corresponding to the abstracted location in the implementation model. The identifier is added.

コード生成部4206は、実装モデルの抽象化変換ルールの識別子が付加された箇所を抽象化ソースコード4101に変換する場合、当該抽象化変換ルールの識別子を当該箇所のソースコードのコメントとして記述する。   When the code generation unit 4206 converts the part of the implementation model to which the abstract conversion rule identifier is added into the abstract source code 4101, the code generation unit 4206 describes the abstract conversion rule identifier as a comment of the source code of the part.

本実施例の具体例について図13を用いて説明する。   A specific example of this embodiment will be described with reference to FIG.

図13に示す具体例は、図11に示す第2の実施例の具体例と、抽象化ソースコード4101が異なる。   The specific example shown in FIG. 13 is different from the specific example of the second embodiment shown in FIG. 11 in the abstract source code 4101.

本実施例の抽象化ソースコード4101では、抽象化された箇所と同じ行に、コメントとして当該箇所の抽象化に用いた抽象化変換ルールが記述される。図13に示す抽象化ソースコード4101では、抽象化された箇所と当該箇所の抽象化に用いた抽象化変換ルールが記述された部分は点線によって囲まれ、どこが抽象化された箇所なのか利用者に把握可能にしている。すなわち、本実施例の抽象化ソースコード4101は、抽象化モデル変換部4203によって抽象化された箇所と当該箇所の抽象化に用いた抽象化変換ルールとの関係を利用者に把握可能な形態で出力される。   In the abstract source code 4101 of this embodiment, an abstract conversion rule used for abstracting the part is described as a comment on the same line as the abstracted part. In the abstract source code 4101 shown in FIG. 13, the abstracted part and the part in which the abstraction conversion rule used for abstracting the part is described are surrounded by dotted lines, and the user is the abstracted part. To be able to grasp. That is, the abstract source code 4101 of the present embodiment is in a form that allows the user to grasp the relationship between the location abstracted by the abstract model conversion unit 4203 and the abstract conversion rules used for abstracting the location. Is output.

なお、図13では、一つの抽象化変換ルールを用いてすべての箇所が抽象化されているが、抽象化された箇所が異なる抽象化変換ルールを用いて抽象化されていてもよいことは言うまでもない。   In FIG. 13, all parts are abstracted using one abstraction conversion rule, but it goes without saying that the abstracted parts may be abstracted using different abstraction conversion rules. Yes.

以上によって、抽象化ソースコード4101は、抽象化された箇所と当該箇所の抽象化に用いた抽象化変換ルールとの関係が利用者に把握可能な形態で出力される。このため、利用者が検査結果を検討した結果、抽象化変換ルールを変更する必要がある場合、どの抽象化変換ルールを変更すればよいかが把握しやすくなる。   As described above, the abstract source code 4101 is output in a form that allows the user to grasp the relationship between the abstracted part and the abstract conversion rule used for abstracting the part. For this reason, as a result of the examination of the inspection result by the user, when it is necessary to change the abstraction conversion rule, it is easy to grasp which abstraction conversion rule should be changed.

さらに、第3の実施例の抽象化ソースコード4101を含む表示画面において、コメントで記述された抽象化に用いた抽象化変換ルールを抽象化モデル変換部4203で適用するか否かの利用者からの選択操作を受け付け可能な領域を設けてもよい。   Further, on the display screen including the abstract source code 4101 of the third embodiment, from the user whether or not the abstract model conversion unit 4203 applies the abstract conversion rule used for the abstract described in the comment. An area where the selection operation can be accepted may be provided.

ソースコード変換装置1000は、抽象化ソースコード4101の表示画面を介して抽象化変換ルールを適用する旨の選択を受け付けた場合、選択を受け付けた抽象化変換ルールを抽象化モデル変換部4203で抽象化に用いるように設定する。一方、ソースコード変換装置1000は、抽象化ソースコード4101の表示画面を介して抽象化変換ルールを適用しない旨の選択を受け付けた場合、選択を受け付けた抽象化変換ルールを抽象化モデル変換部4203で抽象化に用いないように設定する。   When the source code conversion apparatus 1000 receives a selection to apply the abstract conversion rule via the display screen of the abstract source code 4101, the abstract model conversion unit 4203 abstracts the abstract conversion rule that has received the selection. Set to use for conversion. On the other hand, when the source code conversion apparatus 1000 receives a selection that the abstract conversion rule is not applied via the display screen of the abstract source code 4101, the source code conversion apparatus 1000 converts the abstract conversion rule that has received the selection into the abstract model conversion unit 4203. Set to not use for abstraction.

これによって、利用者は、抽象化された箇所と当該箇所の抽象化に用いられた抽象化変換ルールとの関係及び検査結果を把握しながら、抽象化変換ルールを抽象化に用いるか否かの決定を容易にすることができる。   As a result, the user can determine whether or not to use the abstract conversion rule for abstraction while grasping the relationship between the abstracted part and the abstract conversion rule used for abstracting the part and the inspection result. Decisions can be made easier.

(第4の実施例)
図14によって、本発明の第4の実施例のソースコード変換装置及び変換処理方法を説明する。この実施例においては、図33に示す検査コード出力ステップS104に続き、変換ルール入力ステップS102へ進むことで、既に入力されたソースコード0001を、繰り返し、異なる変換ルール集合0002を用いて、変換する手順をとってもよい。また、ある実施形態においては、検査コード出力ステップS104に続き、変換ルール入力ステップS102へ進み、既に入力された変換ルール集合0002の全てまたは一部と、新たに変換ルール入力ステップS102で入力された変換ルール集合0002をあわせて、変換ルール集合0002として用いてもよい。
(Fourth embodiment)
The source code conversion apparatus and conversion processing method according to the fourth embodiment of the present invention will be described with reference to FIG. In this embodiment, following the inspection code output step S104 shown in FIG. 33, the process proceeds to the conversion rule input step S102, whereby the input source code 0001 is repeatedly converted using a different conversion rule set 0002. Procedures may be taken. Further, in an embodiment, following the inspection code output step S104, the process proceeds to the conversion rule input step S102, and all or a part of the already input conversion rule set 0002 and newly input in the conversion rule input step S102. The conversion rule set 0002 may be combined and used as the conversion rule set 0002.

本実施例によれば、細粒度に分割された複数の変換ルールを入力するインタフェースを所有し、入力されたソースコードと、変換に用いた変換ルール集合を保存し、前記ソースコードを前記変換ルール集合の一部を入れ替えて変換できることによって、異なる抽象度の複数の検査コードを生成する場合などの、同一のソースコードを繰り返し変換する手間を削減できる。   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 can be performed by exchanging a part of the set, it is possible to reduce the trouble of repeatedly converting the same source code, such as when generating a plurality of inspection codes having different abstractions.

(第5の実施例)
図15によって、本発明の第5の実施例のソースコード変換装置及び変換処理方法を説明する。本実施例では、ソースコードから検査コードを得る過程において生成される実装モデルと、汎化モデルと、検査モデルとを制約条件に基づいて検証するステップを有する。
(Fifth embodiment)
The source code conversion apparatus and conversion processing method according to the fifth 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 based on the constraint condition.

図15を用いて、変換の妥当性の検証手順を詳細に説明する。   A 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を入力するステップと、ソースコード情報1001を有する実装モデル1205を特定のプログラミング言語に依存しない形式である中間形式(汎化モデル1206)へ変換する第1変換ルールを入力するステップと、中間形式に対して抽象化処理を行う第2変換ルールを入力するステップと、中間形式から検査コードの情報をもつ検査モデル1008に変換する第3変換ルールを入力するステップと、ソフトウェアのソースコード0001を解析して実装モデル1205へ変換するステップと、前記第1変換ルールを用いてソフトウェアのソースコード0001を前記中間形式の汎化モデル1206へ変換するステップと、第2変換ルールを用いて、前記中間形式で表現されたソフトウェアを抽象化するステップと、第3変換ルールを用いて、前記中間形式を検査モデル1008に変換するステップと、検査モデル1008を用いて検証ツールの入力言語で記述された検査コード0005を生成するステップと、前記各段階のモデルを各々第1の制約条件0300、第2の制約条件0301、及び第3の制約条件0302に基づいて検証する充足性検証ステップと、を有する。   In this embodiment, the step of inputting the source code 0001 of the software and the first conversion for converting the mounting model 1205 having the source code information 1001 into an intermediate format (generalization model 1206) that is a format independent of a specific programming language. A step of inputting a rule, a step of inputting a second conversion rule for performing an abstraction process on the intermediate format, and a step of inputting a third conversion rule for converting from the intermediate format to an inspection model 1008 having inspection code information Analyzing the software source code 0001 and converting it into an implementation model 1205; converting the software source code 0001 into the intermediate generalized model 1206 using the first conversion rule; Software expressed in the intermediate format using conversion rules (A) abstracting, using the third conversion rule, converting the intermediate format into the inspection model 1008, and using the inspection model 1008, generating the inspection code 0005 described in the input language of the verification tool And a sufficiency verification step of verifying the model at each stage based on the first constraint condition 0300, the second constraint condition 0301, and the third constraint condition 0302, respectively.

前記各段階のモデルの、各々第1の制約条件0300、第2の制約条件0301、及び第3の制約条件0302に基づく充足性検証は、例えば、非特許文献2に開示されるMOFでメタモデルを記述することによって、又は非特許文献4に開示されるOCLによりメタモデルにより定義されるモデルに対する制約条件を記述することによって、実現される。   The sufficiency verification based on the first constraint condition 0300, the second constraint condition 0301, and the third constraint condition 0302 of the model at each stage is performed by, for example, a meta model using MOF disclosed in Non-Patent Document 2. Or by describing constraints on the model defined by the meta model by OCL disclosed in Non-Patent Document 4.

本実施例によれば、メタモデル及び制約条件を用いることで、変換ルール同士の衝突や変換ルールの不具合による変換の妥当性を保証できる。このモデル変換では、メタモデルによって定義された形式のモデルが生成される。また、制約条件を追加し、生成されたモデルの妥当性を制約条件0300〜00302で充足性検証することができる。   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. In addition, a constraint condition can be added, and the validity of the generated model can be verified with the constraint conditions 0300-00302.

以上、本発明者によりなされた発明を実施形態に基づき具体的に説明したが、本発明は上述した実施形態に限定されるものではなく、その要旨を逸脱しない範囲で種々変更可能であることは言うまでもない。   Although the invention made by the present inventor has been specifically described based on the embodiments, the present invention is not limited to the above-described embodiments, and various modifications can be made without departing from the scope of the invention. Needless to say.

本願発明は、ソフトウェアのソースコードを検証ツールの入力言語で記述された検査コードに変換するソースコード変換方法に適用可能である。   The present invention can be applied to a source code conversion method for converting a software source code into an inspection code described in an input language of a verification tool.

1100 入力部
1101 ソースコード入力部
1102 変換ルール入力部
1300 出力部
1301 検査コード書出し部
1400 記憶部
1401 変換ルールデータベース
1402 メタモデルデータベース
1403 書出しルールデータベース
4100 変換処理部
4201 モデル構築部
4202 実装−汎化モデル変換部
4203 抽象化モデル変換部
4204 汎化−検査モデル変換部
4205 汎化−実装モデル変換部
4206 コード生成部
4210 逆変換ルールデータベース
4220 抽象化ソースコード出力部
DESCRIPTION OF SYMBOLS 1100 Input part 1101 Source code input part 1102 Conversion rule input part 1300 Output part 1301 Inspection code writing part 1400 Storage part 1401 Conversion rule database 1402 Metamodel database 1403 Writing rule database 4100 Conversion processing part 4201 Model construction part 4202 Implementation-generalization model Conversion unit 4203 Abstraction model conversion unit 4204 Generalization-check model conversion unit 4205 Generalization-implementation model conversion unit 4206 Code generation unit 4210 Inverse conversion rule database 4220 Abstraction source code output unit

Claims (6)

ソフトウェアのソースコードを、異なる複数の変換ルールを用いて、検証ツールの入力言語で記述された検査コードに変換するソースコード変換装置で実行されるソースコード変換方法であって、
前記変換ルールは、
前記ソースコードを特定のプログラミング言語に依存しない形式である中間形式で表現されたソフトウェアへ変換する第1変換ルールと、
前記変換された中間形式で表現されたソフトウェアを抽象化する第2変換ルールと、
前記抽象化された中間形式で表現されたソフトウェアを前記検査コードに変換する第3変換ルールと、を含み、
前記方法は、
前記ソースコードを入力するステップと、
少なくとも一つの前記第1変換ルールの入力を受け付けるステップと、
少なくとも一つの前記第2変換ルールの入力を受け付けるステップと、
少なくとも一つの前記第3変換ルールの入力を受け付けるステップと、
前記入力された第1変換ルールを用いて、前記ソースコードを前記中間形式で表現されたソフトウェアへ変換し、前記変換された箇所を第1逆変換ルールに記憶するステップと、
前記入力された第2変換ルールを用いて、前記変換された中間形式で表現されたソフトウェアを抽象化し、前記抽象化された箇所を第2逆変換ルールに記憶するステップと、
前記入力された第3変換ルールを用いて、前記抽象化された中間形式で表現されたソフトウェアを前記検査コードへ変換するステップと、
前記第2逆変換ルールを用いて、前記抽象化された中間形式で表現されたソフトウェアを前記抽象化される前の中間形式で表現されたソフトウェアに変換するステップと、
前記第1逆変換ルールを用いて、前記抽象化される前の中間形式で表現されたソフトウェアをソースコードである抽象化ソースコードに変換するステップと、を含むことを特徴とするソースコード変換方法。
A source code conversion method executed by a source code conversion apparatus that converts a software source code into an inspection code written in an input language of a verification tool using a plurality of different conversion rules,
The conversion rule is:
A first conversion rule for converting the source code into software expressed in an intermediate format which is a format independent of a specific programming language;
A second conversion rule that abstracts the software expressed in the converted intermediate format;
A third conversion rule for converting the software expressed in the abstracted intermediate format into the inspection code,
The method
Inputting the source code;
Receiving an input of at least one first conversion rule;
Receiving an input of at least one second conversion rule;
Receiving an input of at least one third conversion rule;
Converting the source code into software expressed in the intermediate format using the input first conversion rule, and storing the converted portion in a first inverse conversion rule;
Using the input second conversion rule to abstract the software expressed in the converted intermediate format, and storing the abstracted portion in a second inverse conversion rule;
Converting the software expressed in the abstract intermediate format into the inspection code using the input third conversion rule;
Converting the software expressed in the abstracted intermediate form into software expressed in the intermediate form before the abstraction using the second reverse conversion rule;
Converting the software expressed in the intermediate format before being abstracted into an abstracted source code which is a source code using the first inverse transformation rule. .
請求項1に記載のソースコード変換方法であって、
前記変換された中間形式で表現されたソフトウェアを抽象化した場合、前記抽象化された箇所と、当該抽象化に用いられた第2変換ルールと、を前記第2逆変換ルールに記憶し、
前記方法は、前記抽象化ソースコードを出力するステップを含み、
前記抽象化ソースコードを出力するステップでは、前記第2逆変換ルールを用いて、前記抽象化された箇所と当該箇所の抽象化に用いられた第2変換ルールとの関係を出力することを特徴とするソースコード変換方法。
The source code conversion method according to claim 1,
When the software expressed in the converted intermediate format is abstracted, the abstracted portion and the second conversion rule used for the abstraction are stored in the second reverse conversion rule,
The method includes outputting the abstract source code;
In the step of outputting the abstracted source code, the relationship between the abstracted part and the second conversion rule used for abstracting the part is output using the second reverse conversion rule. Source code conversion method.
請求項2に記載のソースコード変換方法であって、
前記抽象化ソースコードを出力するステップでは、前記抽象化ソースコードを含み、前記抽象化に用いられた第2変換ルールを適用するか否かの選択操作を受け付け可能な画面を出力し、
前記方法は、
前記抽象化に用いられた第2変換ルールを適用するか否かの選択を受け付けるステップと、
前記抽象化に用いられた第2変換ルールを適用する旨の選択を受け付けた場合、当該第2変換ルールを、前記中間形式で表現されたソフトウェアの抽象化に用いるように設定するステップと、
前記抽象化に用いられた第2変換ルールを適用しない旨の選択を受け付けた場合、当該第2変換ルールを、前記中間形式で表現されたソフトウェアの抽象化に用いないように設定するステップと、を含むことを特徴とするソースコード変換方法。
The source code conversion method according to claim 2,
In the step of outputting the abstraction source code, a screen that includes the abstraction source code and that can accept a selection operation as to whether to apply the second conversion rule used for the abstraction is output,
The method
Receiving a selection as to whether to apply the second conversion rule used in the abstraction;
When receiving a selection to apply the second conversion rule used for the abstraction, setting the second conversion rule to be used for abstraction of the software expressed in the intermediate format;
When receiving a selection not to apply the second conversion rule used for the abstraction, setting the second conversion rule not to be used for abstraction of the software expressed in the intermediate format; A source code conversion method comprising:
プロセッサ及び記憶領域を備えるソースコード変換装置に、ソフトウェアのソースコードを、前記異なる複数の変換ルールを用いて、検証ツールの入力言語で記述された検査コードに変換する処理を実行させるソースコード変換プログラムであって、
前記変換ルールは、
前記ソースコードを特定のプログラミング言語に依存しない形式である中間形式で表現されたソフトウェアへ変換する第1変換ルールと、
前記変換された中間形式で表現されたソフトウェアを抽象化する第2変換ルールと、
前記抽象化された中間形式で表現されたソフトウェアを前記検査コードに変換する第3変換ルールと、を含み、
前記処理は、
前記ソースコードを入力するステップと、
少なくとも一つの前記第1変換ルールの入力を受け付けるステップと、
少なくとも一つの前記第2変換ルールの入力を受け付けるステップと、
少なくとも一つの前記第3変換ルールの入力を受け付けるステップと、
前記入力された第1変換ルールを用いて、前記ソースコードを前記中間形式で表現されたソフトウェアへ変換し、前記変換された箇所を第1逆変換ルールに記憶するステップと、
前記入力された第2変換ルールを用いて、前記変換された中間形式で表現されたソフトウェアを抽象化し、前記抽象化された箇所を第2逆変換ルールに記憶するステップと、
前記入力された第3変換ルールを用いて、前記抽象化された中間形式で表現されたソフトウェアを前記検査コードへ変換するステップと、
前記第2逆変換ルールを用いて、前記抽象化された中間形式で表現されたソフトウェアを前記抽象化される前の中間形式で表現されたソフトウェアに変換するステップと、
前記第1逆変換ルールを用いて、前記抽象化される前の中間形式で表現されたソフトウェアをソースコードである抽象化ソースコードに変換するステップと、を含むことを特徴とするソースコード変換プログラム。
A source code conversion program for causing a source code conversion device including a processor and a storage area to execute processing for converting a software source code into an inspection code described in an input language of a verification tool using the plurality of different conversion rules Because
The conversion rule is:
A first conversion rule for converting the source code into software expressed in an intermediate format which is a format independent of a specific programming language;
A second conversion rule that abstracts the software expressed in the converted intermediate format;
A third conversion rule for converting the software expressed in the abstracted intermediate format into the inspection code,
The process is
Inputting the source code;
Receiving an input of at least one first conversion rule;
Receiving an input of at least one second conversion rule;
Receiving an input of at least one third conversion rule;
Converting the source code into software expressed in the intermediate format using the input first conversion rule, and storing the converted portion in a first inverse conversion rule;
Using the input second conversion rule to abstract the software expressed in the converted intermediate format, and storing the abstracted portion in a second inverse conversion rule;
Converting the software expressed in the abstract intermediate format into the inspection code using the input third conversion rule;
Converting the software expressed in the abstracted intermediate form into software expressed in the intermediate form before the abstraction using the second reverse conversion rule;
Converting the software expressed in the intermediate format before being abstracted into an abstracted source code which is a source code using the first inverse transformation rule. .
請求項4に記載のソースコード変換プログラムであって、
前記変換された中間形式で表現されたソフトウェアを抽象化した場合、前記抽象化された箇所と、当該抽象化に用いられた第2変換ルールと、を前記第2逆変換ルールに記憶し、
前記処理は、前記抽象化ソースコードを出力するステップを含み、
前記抽象化ソースコードを出力するステップでは、前記第2逆変換ルールを用いて、前記抽象化された箇所と当該箇所の抽象化に用いられた第2変換ルールとの関係を出力することを特徴とするソースコード変換プログラム。
A source code conversion program according to claim 4,
When the software expressed in the converted intermediate format is abstracted, the abstracted portion and the second conversion rule used for the abstraction are stored in the second reverse conversion rule,
The processing includes outputting the abstraction source code;
In the step of outputting the abstracted source code, the relationship between the abstracted part and the second conversion rule used for abstracting the part is output using the second reverse conversion rule. A source code conversion program.
請求項5に記載のソースコード変換プログラムであって、
前記抽象化ソースコードを出力するステップでは、前記抽象化ソースコードを含み、前記抽象化に用いられた第2変換ルールを適用するか否かの選択操作を受け付け可能な画面を出力し、
前記処理は、
前記抽象化に用いられた第2変換ルールを適用するか否かの選択を受け付けるステップと、
前記抽象化に用いられた第2変換ルールを適用する旨の選択を受け付けた場合、当該第2変換ルールを、前記中間形式で表現されたソフトウェアの抽象化に用いるように設定するステップと、
前記抽象化に用いられた第2変換ルールを適用しない旨の選択を受け付けた場合、当該第2変換ルールを、前記中間形式で表現されたソフトウェアの抽象化に用いないように設定するステップと、を含むことを特徴とするソースコード変換プログラム。
The source code conversion program according to claim 5,
In the step of outputting the abstraction source code, a screen that includes the abstraction source code and that can accept a selection operation as to whether to apply the second conversion rule used for the abstraction is output,
The process is
Receiving a selection as to whether to apply the second conversion rule used in the abstraction;
When receiving a selection to apply the second conversion rule used for the abstraction, setting the second conversion rule to be used for abstraction of the software expressed in the intermediate format;
When receiving a selection not to apply the second conversion rule used for the abstraction, setting the second conversion rule not to be used for abstraction of the software expressed in the intermediate format; A source code conversion program comprising:
JP2011268222A 2011-12-07 2011-12-07 Source code conversion method and source code conversion program Expired - Fee Related JP5736588B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011268222A JP5736588B2 (en) 2011-12-07 2011-12-07 Source code conversion method and source code conversion program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011268222A JP5736588B2 (en) 2011-12-07 2011-12-07 Source code conversion method and source code conversion program

Publications (2)

Publication Number Publication Date
JP2013120491A true JP2013120491A (en) 2013-06-17
JP5736588B2 JP5736588B2 (en) 2015-06-17

Family

ID=48773106

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011268222A Expired - Fee Related JP5736588B2 (en) 2011-12-07 2011-12-07 Source code conversion method and source code conversion program

Country Status (1)

Country Link
JP (1) JP5736588B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7417068B2 (en) 2020-01-31 2024-01-18 富士通株式会社 Display method, display program, and information processing device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037492A1 (en) * 2000-03-16 2001-11-01 Holzmann Gerard J. Method and apparatus for automatically extracting verification models
JP2006127496A (en) * 2004-10-01 2006-05-18 Matsushita Electric Ind Co Ltd Device and method for api specification verification, program for executing the same, and storage medium for storing the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010037492A1 (en) * 2000-03-16 2001-11-01 Holzmann Gerard J. Method and apparatus for automatically extracting verification models
JP2006127496A (en) * 2004-10-01 2006-05-18 Matsushita Electric Ind Co Ltd Device and method for api specification verification, program for executing the same, and storage medium for storing the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7417068B2 (en) 2020-01-31 2024-01-18 富士通株式会社 Display method, display program, and information processing device

Also Published As

Publication number Publication date
JP5736588B2 (en) 2015-06-17

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
JP6859449B2 (en) Methods and equipment for performing tests using test cases
Gosain et al. Static analysis: A survey of techniques and tools
US9092586B1 (en) Version management mechanism for fluid guard ring PCells
BR102016018127A2 (en) design method based on critical security software model
Lin et al. A testing framework for model transformations
US20140208431A1 (en) Automated tools for building secure software programs
US20160170714A1 (en) Method and system of software specification modeling
US20140214396A1 (en) Specification properties creation for a visual model of a system
JP5303795B2 (en) Application analysis method, analysis system, and analysis program
US9524366B1 (en) Annotations to identify objects in design generated by high level synthesis (HLS)
JP6486574B2 (en) Program code generating apparatus, program code generating method, and program code generating program
CN105653268A (en) Rule engine debugging method and rule engine debugging system
US8589734B2 (en) Verifying correctness of processor transactions
JP5736588B2 (en) Source code conversion method and source code conversion program
US20130111432A1 (en) Validation of a system model including an activity diagram
JP2009099111A (en) Rule inspection program, rule inspection method, and rule inspection device
JP2008305079A (en) Requirement specification automatic verification method
US9632912B1 (en) Method and system for debugging a program
WO2013161057A1 (en) Source code inspection method and device
KR101534493B1 (en) Source code security weakness detection apparatus and method based on structure conversion
CN114647568A (en) Automatic testing method and device, electronic equipment and readable storage medium
JP2011154568A (en) Information processing apparatus, program verification method and program
JP2011100420A (en) Test program creation device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140917

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140924

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141030

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20150324

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150326

R150 Certificate of patent or registration of utility model

Ref document number: 5736588

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees