JP2016128941A - Output determination device, output determination method, output determination program, and static analysis device - Google Patents
Output determination device, output determination method, output determination program, and static analysis device Download PDFInfo
- Publication number
- JP2016128941A JP2016128941A JP2015002765A JP2015002765A JP2016128941A JP 2016128941 A JP2016128941 A JP 2016128941A JP 2015002765 A JP2015002765 A JP 2015002765A JP 2015002765 A JP2015002765 A JP 2015002765A JP 2016128941 A JP2016128941 A JP 2016128941A
- Authority
- JP
- Japan
- Prior art keywords
- function
- source program
- variable
- extracted
- output
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Debugging And Monitoring (AREA)
- Stored Programmes (AREA)
Abstract
Description
本発明は、たとえば、静的解析プログラムに従い出力される情報から適切な情報を選択する出力判定装置等に関する。 The present invention relates to an output determination device that selects appropriate information from information output according to a static analysis program, for example.
静的解析プログラムは、コンピュータソフトウェア(以降、「ソフトウェア」と表す)に関して、オブジェクトプログラムを実行することなく、ソースプログラムを解析することにより、該ソフトウェアに含まれる不具合等を解析する。静的解析プログラムは、ソースプログラムにおいて不具合と判定される箇所(フロー)を指摘することにより、ソフトウェアの開発を支援する情報を提供する。 The static analysis program analyzes a source program with respect to computer software (hereinafter referred to as “software”) without analyzing the object program, thereby analyzing a defect or the like included in the software. The static analysis program provides information for supporting software development by pointing out a part (flow) determined to be a defect in the source program.
しかし、静的解析プログラムは、ソースプログラムにおいて、実際には不具合ではないにもかかわらず、フローを不具合であると判定する場合もある。この場合に、開発者は、静的解析プログラムにより指摘されたフローが、実際に不具合であるのか否かを確認する必要がある。したがって、静的解析プログラムを用いてソフトウェアの開発を支援する場合には、指摘されたフローが、実際に実行される場合に不具合であるのか否かを確認するのに多くの時間を要するという問題がある。 However, the static analysis program may determine that the flow is defective even though it is not actually a defect in the source program. In this case, the developer needs to confirm whether or not the flow pointed out by the static analysis program is actually a malfunction. Therefore, when software development is supported using a static analysis program, it takes a lot of time to check whether the indicated flow is a problem when actually executed. There is.
この問題を解決する手法の一例として、あるソースプログラムに関して、静的解析プログラムが過去に不具合であると指摘されなかったフロー(「第1フロー」と表す)と、新たに不具合であると指摘されたフロー(「第2フロー」と表す)とが類似するか否かを判定する手法がある。該手法は、第1フローと、第2フローとが類似すると判定する場合に、第2フローが不具合でないと判定する。たとえば、特許文献1には、上述した時間を削減することが可能な解析装置が開示されている。
As an example of a method for solving this problem, regarding a certain source program, a flow in which a static analysis program has not been pointed out as a problem in the past (referred to as “first flow”) and a new problem have been pointed out. There is a method for determining whether or not the flow (represented as “second flow”) is similar. This method determines that the second flow is not defective when it is determined that the first flow and the second flow are similar. For example,
特許文献1は、静的解析プログラムを用いてソースプログラムを解析した結果に基づいて、警告文を出力する解析装置を開示する。該解析装置は、ソースプログラムを解析した結果を表すファイルを、複数バージョンに関してそれぞれ作成し、該ファイル間の差分を作成する。次に、該解析装置は、作成した差分に関連付けされた警告文を出力する。
しかし、上述したように、静的解析プログラムは、第1フローと第2フローとの類似性に基づき不具合を判定する場合に、判定を誤る可能性がある。たとえば、静的解析プログラムは、相互に類似する2つのソースコード(クローンコード)を検証する場合に、新たに指摘した第2フローが不具合でないと判定する可能性がある。これは、クローンコードが相互に類似するので、静的解析プログラムが、第1フローと第2フローとが類似すると判定するからである。この場合に、開発者は、第2フローが実際には不具合であっても、該不具合であることを見落としてしまう。 However, as described above, the static analysis program may make a determination error when determining a defect based on the similarity between the first flow and the second flow. For example, when verifying two source codes (clone code) similar to each other, the static analysis program may determine that the newly pointed second flow is not defective. This is because the clone code is similar to each other and the static analysis program determines that the first flow and the second flow are similar. In this case, even if the second flow is actually a failure, the developer overlooks that it is a failure.
一方、静的解析プログラムが、第1フローと第2フローとが類似しているか否かを、厳密に判定すれば、第2フローが不具合であることを見落としてしまう可能性を低減することができる。しかし、この場合に、静的解析プログラムは、より多くの不具合を出力する。この結果、静的解析プログラムを用いてソフトウェアの開発を支援する場合には、フローが実際に実行される場合に、不具合であるのか否かを確認するのに多くの時間を要するという問題がある。 On the other hand, if the static analysis program strictly determines whether or not the first flow and the second flow are similar, the possibility of overlooking that the second flow is defective can be reduced. it can. However, in this case, the static analysis program outputs more defects. As a result, when software development is supported using a static analysis program, there is a problem that it takes a lot of time to check whether or not there is a problem when the flow is actually executed. .
そこで、本発明の主たる目的は、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出する出力判定装置等を提供することである。 Therefore, a main object of the present invention is to provide an output determination device or the like that extracts information that is likely to be defective when the source program is executed from information that the static analysis program outputs regarding the source program. It is.
前述の目的を達成するために、本発明の一態様として、出力判定装置は
ソースプログラムを静的に解析する静的解析手段が、前記ソースプログラムから抽出したフローと、前記フローから抽出した命令文とに基づき、前記ソースプログラムにおいて前記命令文を含む第1関数を特定し、特定した前記第1関数に関して、関数を一意に識別可能な関数識別子を第1関数識別子として抽出する処理抽出手段と、
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出する関数抽出手段と、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が前記第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力決定手段
とを備える。
In order to achieve the above-described object, as one aspect of the present invention, the output determination device includes a flow extracted from the source program and a statement extracted from the flow by a static analysis unit that statically analyzes the source program. And a process extracting unit that identifies a first function including the statement in the source program, and extracts a function identifier that can uniquely identify the function as the first function identifier with respect to the identified first function;
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is A function extracting means for identifying a third function called by the function to be represented and extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function identifier extracted in the first source program And the second function identifier extracted in the second source program, the third function identifier extracted in the first source program, and the second source program extracted in the second source program Whether or not the third function identifier matches, and (a) does not output the second flow extracted by the static analysis means in the second source program when it is determined that both match. , (B) output determining means for determining that the second flow is to be output when it is determined that either does not match.
また、本発明の他の見地として、出力判定方法は、
情報処理装置が、
ソースプログラムを静的に解析する静的解析手段が、前記ソースプログラムから抽出したフローと、前記フローから抽出した命令文とに基づき、前記ソースプログラムにおいて前記命令文を含む第1関数を特定し、特定した前記第1関数に関して、関数を一意に識別可能な関数識別子を第1関数識別子として抽出し、
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出し、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が前記第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する。
As another aspect of the present invention, the output determination method is:
Information processing device
Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, With respect to the identified first function, a function identifier that can uniquely identify the function is extracted as a first function identifier,
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is Identifying a third function called by the function to be represented, extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function identifier extracted in the first source program And the second function identifier extracted in the second source program, the third function identifier extracted in the first source program, and the second source program extracted in the second source program Whether or not the third function identifier matches, and (a) does not output the second flow extracted by the static analysis means in the second source program when it is determined that both match. , (B) If it is determined that either does not match, it is determined to output the second flow.
さらに、同目的は、係る出力判定プログラム、及び、そのプログラムを記録するコンピュータ読み取り可能な記録媒体によっても実現される。 Further, the same object is realized by such an output determination program and a computer-readable recording medium for recording the program.
本発明に係る出力判定装置等によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。 According to the output determination apparatus and the like according to the present invention, information that is highly likely to be defective when the source program is executed can be extracted from information output by the static analysis program regarding the source program.
本発明の理解を容易にするために、以降の説明において用いる用語や前提等について説明する。 In order to facilitate understanding of the present invention, terms and assumptions used in the following description will be described.
静的解析プログラムに従い処理を実行する静的解析部は、たとえば、ソースプログラムを受信し、受信したソースプログラムに内在するバグ、または、セキュリティに関する脆弱性等に関連するフロー(ソースプログラムの一部)及び命令文を算出する。静的解析部が算出するフロー及び命令文は、複数であってもよい。 A static analysis unit that executes processing according to a static analysis program receives, for example, a source program, and a flow related to bugs inherent in the received source program or security vulnerabilities (part of the source program) And calculate a statement. There may be a plurality of flows and statements calculated by the static analysis unit.
フロー判定部は、改変される前のソースプログラムに関して静的解析プログラムが算出するフロー及び命令文と、改変された後のソースプログラムに関して該静的解析プログラムが算出するフロー及び命令文とを比較する。該フロー判定部は、たとえば、改変前後のフロー及び命令文が一致すると判定する場合に、該フローを出力しないことを決定する。一方、該フロー判定部は、たとえば、改変前後のフロー及び命令文が一致しないと判定する場合に、該フローを出力することを決定する。静的解析プログラムが算出するフロー及び命令文が複数である場合に、フロー判定部は、各フロー及び命令文に関して上述した処理を実行する。 The flow determination unit compares the flow and the instruction sentence calculated by the static analysis program with respect to the source program before the modification and the flow and the instruction sentence calculated by the static analysis program with respect to the source program after the modification. . The flow determination unit determines not to output the flow, for example, when it is determined that the flow before and after the modification and the statement match. On the other hand, the flow determination unit determines to output the flow, for example, when it is determined that the flow before and after the modification and the command statement do not match. When there are a plurality of flows and command statements calculated by the static analysis program, the flow determination unit executes the processing described above for each flow and command statement.
尚、ソースプログラムがバージョンを用いて管理されている場合に、改変される前のソースプログラムと、改変された後のソースプログラムとは、2つのバージョンを用いて特定されるソースプログラムであってもよい。また、静的解析プログラムが算出するフローは、たとえば、バグ等に関連すると推定された命令文から、算出した命令文に至る命令文列を表す。 When the source program is managed using versions, the source program before being modified and the source program after being modified are source programs specified using two versions. Good. Further, the flow calculated by the static analysis program represents, for example, an instruction sentence string from an instruction sentence estimated to be related to a bug or the like to the calculated instruction sentence.
以降の各実施形態に示す出力判定装置は、たとえば、上述したようなフロー判定部がフローを出力するか否かを判定するのを支援することができる。 The output determination apparatus shown in each of the following embodiments can assist, for example, in determining whether or not a flow determination unit as described above outputs a flow.
次に、本発明を実施する実施形態について図面を参照しながら詳細に説明する。 Next, embodiments for carrying out the present invention will be described in detail with reference to the drawings.
<第1の実施形態>
本発明の第1の実施形態に係る出力判定装置101が有する構成について、図1を参照しながら詳細に説明する。図1は、本発明の第1の実施形態に係る出力判定装置101が有する構成を示すブロック図である。
<First Embodiment>
The configuration of the
第1の実施形態に係る出力判定装置101は、処理抽出部102と、関数抽出部103と、出力決定部104とを有する。
The
出力判定装置101は、たとえば、第1ソースプログラム301と、静的解析プログラムに従い第1ソースプログラム301において抽出されたフロー303と、静的解析プログラムに従いフロー303において抽出された命令文305とを受信する。同様に、出力判定装置101は、たとえば、第2ソースプログラム302と、静的解析プログラムに従い第2ソースプログラム302において抽出されたフロー304と、静的解析プログラムに従いフロー304において抽出された命令文306とを受信する。
The
たとえば、第1ソースプログラム301は、図3A及び図3Bに例示するようなプログラミング言語に従い記述されたソースプログラムである。図3A及び図3Bは、C言語に従い記述された第1ソースプログラム301の一例を表す図である。たとえば、第2ソースプログラム302は、図4A及び図4Bに例示するようなプログラミング言語に従い記述されたソースプログラムである。図4A及び図4Bは、C言語に従い記述された第2ソースプログラム302の一例を表す図である。第1ソースプログラム301及び第2ソースプログラム302は、たとえば、上述したような改変前後のソースプログラムである。
For example, the
この場合に、たとえば、改変前のソースプログラム(すなわち、第1ソースプログラム301)に関して、静的解析プログラムは、フロー303及び命令文305を算出する。また、改変後のソースプログラム(すなわち、第2ソースプログラム302)に関して、静的解析プログラムは、フロー304及び命令文306を算出する。
In this case, for example, with respect to the source program before modification (that is, the first source program 301), the static analysis program calculates the
図3A、または、図4Aに例示するソースプログラムにおいて、命令文「#define ERROR 0」は、「ERROR」に0を設定する命令文を表す。また、「int_main()」のうち、「main()」は、main関数を表し、「int」は、該main関数の出力である戻り値が「int」型(たとえば、整数を表す型)であることを表す。「rv=funcB(X)」は、関数funcBを、入出力する変数を表す引数Xにて呼び出し、その後、関数funcBの戻り値を変数rvに設定する設定命令文を表す。この場合、funcBの呼び出し元関数は、「main」である。
In the source program illustrated in FIG. 3A or FIG. 4A, the statement “#define
また、図3A、または、図4Aに例示するソースプログラムにおいて、「command」は、処理を関数の外部に移さない命令文(または、命令文列)を表す。また、「return v」は、関数funcBの戻り値を設定するとともに、処理を終了する命令文を表す。 In the source program illustrated in FIG. 3A or FIG. 4A, “command” represents an instruction sentence (or instruction sentence string) that does not transfer processing to the outside of the function. Further, “return v” represents a command statement that sets the return value of the function funcB and ends the processing.
図3B、または、図4Bに例示するソースプログラムにおいて、「if (U==NULL)」は、制御命令文を表し、変数Uの値が空値(NULL)である場合に、直後の{}にて囲まれた命令文列を実行することを表す。また、該制御命令文は、変数Uの値が空値(NULL)でない場合に、「else」直後の{}にて囲まれた命令文列を実行することを表す。 In the source program illustrated in FIG. 3B or FIG. 4B, “if (U == NULL)” represents a control command statement, and when the value of the variable U is a null value (NULL), {} Indicates that the command statement sequence enclosed by is executed. The control command statement indicates that a command statement sequence enclosed in {} immediately after “else” is executed when the value of the variable U is not a null value (NULL).
たとえば、静的解析プログラムに従い、第1ソースプログラム301、または、第2ソースプログラム302において、図5に例示されるフロー(すなわち、フロー303、または、フロー304)が抽出されているとする。図5は、静的解析プログラムに従い抽出されたフローの一例を表す図である。また、静的解析プログラムに従い、該フローの内、「printf(“%s”,X)」が、命令文(すなわち、命令文305、または、命令文306)として抽出されているとする。すなわち、この例においては、静的解析プログラムに従い第1ソースプログラム301において抽出されたフロー303は、第2ソースプログラム302において抽出されたフロー304と同じであるとする。同様に、静的解析プログラムに従い第1ソースプログラム301において抽出された命令文305は、第2ソースプログラム302において抽出された命令文306と同じであるとする。
For example, it is assumed that the flow illustrated in FIG. 5 (that is, the
次に、第1の実施形態に係る出力判定装置101が行う処理について、図2を参照しながら詳細に説明する。図2は、第1の実施形態に係る出力判定装置101における処理の流れを示すフローチャートである。説明の便宜上、ソースプログラムは、C言語を用いて記述されているとするが、他のプログラミング言語を用いて記述されていてもよい。
Next, processing performed by the
まず、処理抽出部102は、第1ソースプログラム301において、命令文305を含む関数(説明の便宜上、「第1関数」と表す)を特定する(ステップS101)。同様に、処理抽出部102は、第2ソースプログラム302において、命令文306を含む関数を特定する(ステップS101)。
First, the
たとえば、図3Aに例示するソースプログラムの場合に、関数funcBが、命令文「printf(“%s”,X)」を含むので、処理抽出部102は、第1ソースプログラム301において、第1関数として、関数funcBを選ぶ。同様に、図4Aに例示するソースプログラムの場合、関数funcBは、命令文「printf(“%s”,X)」を含むので、処理抽出部102は、第2ソースプログラム302において、第1関数として、関数funcBを特定する。
For example, in the case of the source program illustrated in FIG. 3A, the function funcB includes the statement “printf (“% s ”, X)”, so that the
次に、関数抽出部103は、第1ソースプログラム301において、第1関数を呼び出す関数(説明の便宜上、「第2関数」と表す)を特定する(ステップS102)。同様に、関数抽出部103は、第2ソースプログラム302において、第1関数を呼び出す関数を特定する(ステップS102)。
Next, the
たとえば、図3Aに例示するソースプログラムの場合、関数mainが命令文「rv=funcB(X)」にて、関数funcBを呼び出すので、関数抽出部103は、第1ソースプログラム301において、第2関数として関数mainを特定する。同様に、図4Aに例示するソースプログラムの場合、関数mainが命令文「rv=funcB(X)」にて、関数funcBを呼び出すので、関数抽出部103は、第2ソースプログラム302において、第2関数として関数mainを特定する。
For example, in the case of the source program illustrated in FIG. 3A, the function main calls the function funcB with the statement “rv = funcB (X)”, so that the
次に、関数抽出部103は、第1ソースプログラム301において、第1関数が呼び出す関数(説明の便宜上、「第3関数」と表す)を特定する(ステップS103)。同様に、関数抽出部103は、第2ソースプログラム302において、第1関数が呼び出す関数を特定する(ステップS103)。
Next, the
たとえば、図3Aに例示するソースプログラムの場合、関数funcBが命令文「v=funcC(X)」にて、関数funcCを呼び出すので、関数抽出部103は、第1ソースプログラム301において、第3関数として関数funcCを特定する。同様に、図4Aに例示するソースプログラムの場合、関数mainが命令文「v=funcC(X)」にて、関数funcCを呼び出すので、関数抽出部103は、第2ソースプログラム302において、第3関数として関数funcCを特定する。
For example, in the case of the source program illustrated in FIG. 3A, the function funcB calls the function funcC with the statement “v = funcC (X)”, so that the
次に、出力決定部104は、第1ソースプログラム301において関数抽出部103が特定した関数と、第2ソースプログラム302において関数抽出部103が特定した関数とが一致するか否かを判定する(ステップS104)。出力決定部104は、たとえば、第1ソースプログラム301において特定された第1関数の名称(関数識別子)と、第2ソースプログラム302において特定された第1関数の名称(関数識別子)とが一致するか否かを判定する。尚、関数識別子は、関数を一意に識別可能な識別子を表すとする。さらに、出力決定部104は、第1ソースプログラム301において特定された第2関数の名称と、第2ソースプログラム302において特定された第2関数の名称とが一致するか否かを判定する。同様に、出力決定部104は、第1ソースプログラム301において特定された第3関数の名称と、第2ソースプログラム302において特定された第3関数の名称とが一致するか否かを判定する。
Next, the
次に、出力決定部104は、第1ソースプログラム301において特定された関数と、第2ソースプログラム302において特定された関数とが一致すると判定する場合に(ステップS104にてYES)、出力を表すフロー307として、フロー304を出力することを決定する(ステップS106)。尚、出力決定部104は、ステップS104にてYESである場合に、フロー303を、フロー307として出力することを決定してもよい。また、出力決定部104は、第1ソースプログラム301において特定された関数と、第2ソースプログラム302において特定された関数とが一致しないと判定する場合に(ステップS104にてNO)、フロー304を出力しないことを決定する(ステップS105)。尚、上述した処理において、特定された関数は、第1関数乃至第3関数を表す。
Next, when determining that the function specified in the
たとえば、図3A、図3B、図4A、及び、図4Bに示す例の場合に、出力決定部104は、第1ソースプログラム301において特定された第1関数funcBと、第2ソースプログラム302において特定された第1関数funcBとを比較する。この場合に、2つの該第1関数の名称は一致する。同様に、出力決定部104は、第1ソースプログラム301において特定された第2関数mainと、第2ソースプログラム302において特定された第2関数mainとを比較する。この場合に、2つの該第2関数の名称は一致する。さらに、出力決定部104は、第1ソースプログラム301において特定された第3関数funcCと、第2ソースプログラム302において特定された第3関数funcCとを比較する。この場合に、2つの該第2関数の名称は一致する。この場合に、いずれの関数も一致するので、出力決定部104は、第1ソースプログラム301において特定された関数と、第2ソースプログラム302において特定された関数とが一致すると判定する。
For example, in the example shown in FIGS. 3A, 3B, 4A, and 4B, the
以降、説明の便宜上、ステップS104にてYESと判定された場合に実行する処理を、「処理b」と表す。また、ステップS104にてNOと判定された場合に実行する処理を、「処理a」と表す。 Hereinafter, for convenience of explanation, the processing to be executed when YES is determined in step S104 is represented as “processing b”. In addition, the process that is executed when it is determined NO in step S104 is represented as “process a”.
たとえば、上述した例において、処理aは、フロー304を出力しないことを決定する処理を含む。また、処理bは、フロー304を出力することを決定する処理を含む。
For example, in the example described above, the process a includes a process of determining that the
次に、第1の実施形態に係る出力判定装置101に関する効果について説明する。
Next, effects related to the
出力判定装置101によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。
According to the
この理由は、本実施形態に係る出力判定装置101が、静的解析プログラムによって出力される複数のフロー(すなわち、フロー303、または、フロー304)に関して、関数呼び出しに関する処理を比較した結果に基づき、出力するか否かを判定するからである。この処理において、出力判定装置101は、命令文を含む第1関数の関数識別子と、該関数を呼び出す第2関数の関数識別子と、該関数が呼び出す第3関数の関数識別子とを、第1ソースプログラム301及び第2ソースプログラム302に関して比較する。この結果、出力判定装置101は、該関数呼び出しに関する処理を比較した結果に基づいて、フローを出力するか否かを判定する。
The reason for this is that the
一方、特許文献1に開示された解析装置は、単に、静的解析プログラムが出力する結果を表すファイルを比較し、比較した結果に応じて警告文を出力する。すなわち、該解析装置は、該ファイルのみに基づき警告文を出力する。この結果、該解析装置は、本実施形態に係る出力判定装置に比べ、関数呼び出しに関する処理を比較していないので、誤った警告文を出力する可能性が高い。
On the other hand, the analysis device disclosed in
したがって、本実施形態に係る出力判定装置101よれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。
Therefore, according to the
尚、上述した実施形態において、出力判定装置101は、ソースプロプログラムにおいて、第1関数乃至第3関数を抽出するとした。出力判定装置101は、たとえば、後述するようなコールグラフ情報(たとえば、図13、図14)に基づいて、第1関数乃至第3関数を抽出してもよいし、ソースプログラムを解析することにより、第1関数乃至第3関数を抽出してもよい。
In the above-described embodiment, the
また、出力判定装置101と、上述した静的解析プログラムに従い処理を実行する静的解析部とを有する静的解析装置を構成することができる。この場合に、静的解析装置は、2つソースプログラムに基づき、上述したような処理を実行することにより、フロー及び命令文を算出する。
In addition, a static analysis device having the
<第2の実施形態>
次に、上述した第1の実施形態を基本とする本発明の第2の実施形態について説明する。
<Second Embodiment>
Next, a second embodiment of the present invention based on the first embodiment described above will be described.
以降の説明においては、本実施形態に係る特徴的な部分を中心に説明すると共に、上述した第1の実施形態と同様な構成については、同一の参照番号を付すことにより、重複する説明を省略する。 In the following description, the characteristic parts according to the present embodiment will be mainly described, and the same components as those in the first embodiment described above will be denoted by the same reference numerals, and redundant description will be omitted. To do.
図6と図7とを参照しながら、第2の実施形態に係る出力判定装置201が有する構成と、出力判定装置201が行う処理とについて説明する。図6は、本発明の第2の実施形態に係る出力判定装置201が有する構成を示すブロック図である。図7は、第2の実施形態に係る出力判定装置201における処理の流れを示すフローチャートである。
The configuration of the
第2の実施形態に係る出力判定装置201は、処理抽出部102と、関数抽出部103と、型抽出部202と、出力決定部203とを有する。
The
出力決定部203は、第1の実施形態に係る出力決定部104が実行する処理と同様の処理を実行した後に、第1ソースプログラム301に関して特定された関数と、第2ソースプログラム302に関して特定された関数とが一致するか否かを判定する。型抽出部202は、出力決定部203が一致しないと判定した場合に(ステップS104にてNO、図2)、以降に示す処理を開始する。
The
型抽出部202は、第1ソースプログラム301にて特定された第3関数が出力する値の型を、第1ソースプログラム301において特定する(ステップS201)。すなわち、型抽出部202は、第1ソースプログラム301において、第3関数の戻り値の型を特定する。説明の便宜上、第3関数が出力する値の型を、「第3の型」と表す。同様に、型抽出部202は、第2ソースプログラム302にて特定された第3関数が出力する値の第3の型を、第2ソースプログラム302において特定する(ステップS202)。
The
たとえば、型抽出部202は、第3関数funcCの戻り値の型を特定する場合に、まず、第1ソースプログラム301において、「unsigned int funcC(char *U)」(図3B)を特定する。次に、型抽出部202は、該第3関数funcCが出力する値の第3の型が、第1ソースプログラム301において、「unsigned int」型であることを特定する。同様に、型抽出部202は、第3関数funcCの戻り値の型を特定する場合に、第2ソースプログラム302において、「int_funcC(char *U)」(図4B)を特定する。次に、型抽出部202は、該第3関数funcCが出力する値の第3の型が、第2ソースプログラム302において、「int」型であることを特定する。
For example, when specifying the return type of the third function funcC, the
次に、出力決定部203は、第1ソースプログラム301において特定された第3の型と、第2ソースプログラム302において特定された第3の型とが一致するか否かを判定する(ステップS203)。出力決定部203は、該2つの型が一致すると判定する場合に(ステップS203にてYES)、フロー304を出力しないことを決定する(ステップS204)。出力決定部203は、該2つの第3の型が一致しないと判定する場合に(ステップS203にてNO)、フロー304を出力することを決定する(ステップS205)。尚、出力決定部203は、ステップS205にてYESである場合に、フロー303を出力することを決定してもよい。
Next, the
上述した例において、第1ソースプログラム301において特定された第3関数funcCに関する第3の型は、「unsigned int」型である。また、第2ソースプログラム302において特定された第3関数funcCに関する第3の型は、「int」型である。したがって、該2つの第3の型が一致しないので、出力決定部203は、ステップS203にてNOと判定する。したがって、この場合に、出力決定部203は、フロー304を出力することを決定する。
In the example described above, the third type related to the third function funcC specified in the
以降、説明の便宜上、ステップS203にてYESと判定された場合に実行する処理を、「処理c」と表す。また、ステップS203にてNOと判定された場合に実行する処理を、「処理d」と表す。 Hereinafter, for convenience of explanation, the process to be executed when YES is determined in step S203 is represented as “process c”. In addition, the process executed when NO is determined in step S203 is represented as “process d”.
たとえば、上述した例において、処理cは、フロー304を出力しないことを決定する処理を含む。また、処理dは、フロー304を出力することを決定する処理を含む。
For example, in the above-described example, the process c includes a process for determining that the
次に、第2の実施形態に係る出力判定装置201に関する効果について説明する。
Next, effects related to the
第2の実施形態に係る出力判定装置201によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。
According to the
この理由は、本実施形態に係る出力判定装置201が、さらに、第3関数が出力する値の型に基づき、フロー304を出力するか否かを判定するからである。
This is because the
すなわち、本実施形態に係る出力判定装置201は、関数呼び出しに関する関数識別子に加え、さらに、第3関数が出力する値の型に基づいて、フロー304を出力するか否かを判定する。この結果、出力判定装置201が、第1の実施形態に係る出力判定装置101に比べ、さらに、関数を詳細に解析するので、より適切に情報を抽出することができる。
That is, the
<第3の実施形態>
次に、上述した第2の実施形態を基本とする本発明の第3の実施形態について説明する。
<Third Embodiment>
Next, a third embodiment of the present invention based on the above-described second embodiment will be described.
以降の説明においては、本実施形態に係る特徴的な部分を中心に説明すると共に、上述した第2の実施形態と同様な構成については、同一の参照番号を付すことにより、重複する説明を省略する。 In the following description, the description will focus on the characteristic parts according to the present embodiment, and the same components as those in the second embodiment described above will be denoted by the same reference numerals, and redundant description will be omitted. To do.
図8と図9とを参照しながら、第3の実施形態に係る出力判定装置211が有する構成と、出力判定装置211が行う処理とについて説明する。図8は、本発明の第3の実施形態に係る出力判定装置211が有する構成を示すブロック図である。図9は、第3の実施形態に係る出力判定装置211における処理の流れを示すフローチャートである。
The configuration of the
第3の実施形態に係る出力判定装置211は、処理抽出部102と、関数抽出部103と、型抽出部212と、出力決定部213とを有する。
The
型抽出部212は、出力決定部203が一致すると判定した場合に(ステップS203にてYES、図7)、以降に示す処理を開始する。
If it is determined that the
型抽出部212は、第1ソースプログラム301において特定された第1関数が出力する値の型、及び、第1ソースプログラム301において特定された第2関数が出力する値の型を特定する(ステップS211)。
The
説明の便宜上、第1関数が出力する値の型を、「第1の型」と表す。第2関数が出力する値の型を、「第2の型」と表す。すなわち、第1の型は、第1関数の戻り値に関する型を表す。第2の型は、第2関数の戻り値に関する型を表す。 For convenience of explanation, the type of the value output by the first function is represented as “first type”. The type of the value output by the second function is represented as “second type”. That is, the first type represents a type related to the return value of the first function. The second type represents a type related to the return value of the second function.
同様に、型抽出部212は、第2ソースプログラム302において特定された第1関数に関する第1の型、及び、第2ソースプログラム302において特定された第2関数に関する第2の型を特定する(ステップS212)。
Similarly, the
たとえば、型抽出部212は、第1ソースプログラム301において、第1関数funcBに関して、命令文「int funcB(char *X)」(図3A)を特定する。型抽出部212は、特定した命令文に基づき、第1関数funcBが出力する値の第1の型が、「int」型であることを特定する。同様に、型抽出部212は、第1ソースプログラム301において、第2関数mainに関して、命令文「int main()」(図3A)を特定する。次に、型抽出部212は、特定した命令文に基づき、該第2関数mainが出力する値の第2の型が、「int」型であることを特定する。
For example, in the
同様に、型抽出部212は、第2ソースプログラム302において、第1関数funcBに関して、命令文「int funcB(char *X)」(図4A)を特定する。型抽出部212は、特定した命令文に基づき、第1関数funcBが出力する値の第1の型が、「int」型であることを特定する。型抽出部212は、第2ソースプログラム302において、第2関数mainに関して、命令文「int main()」(図4A)を特定する。次に、型抽出部212は、特定した命令文に基づき、第2関数mainが出力する値の第2の型が、「int」型であることを特定する。
Similarly, the
次に、出力決定部213は、第1ソースプログラム301において特定された第1の型と、第2ソースプログラム302において特定された第1の型とが一致するか否かを判定する。また、出力決定部213は、第1ソースプログラム301において特定された第2の型と、第2ソースプログラム302において特定された第2の型とが一致するか否かを判定する(ステップS213)。出力決定部213は、いずれもが一致すると判定する場合に(ステップS213にてYES)、フロー304を出力しないことを決定する(ステップS214)。出力決定部213は、いずれかが一致しないと判定する場合に(ステップS213にてNO)、フロー304を出力することを決定する(ステップS215)。尚、出力決定部213は、ステップS213にてNOである場合に、フロー303を出力することを決定してもよい。
Next, the
上述した例において、第3の型は、一致していない。説明の便宜上、以降に示す実施形態において、第3の型は、一致しているとする。 In the example described above, the third type does not match. For convenience of explanation, it is assumed that the third type matches in the following embodiments.
第1ソースプログラム301において特定された第1関数funcBに関する第1の型は、「int」型である。また、第2ソースプログラム302において特定された第1関数funcBに関する第1の型は、「int」型である。したがって、該2つの第1の型は一致する。また、第1ソースプログラム301において特定された第2関数mainに関する第2の型は、「int」型である。また、第2ソースプログラム302において特定された第2関数mainに関する第2の型は、「int」型である。したがって、該2つの第2の型は一致する。したがって、第1関数及び第2関数に関して、型がいずれも一致するので、出力決定部213は、ステップS213にてYESと判定する。したがって、この場合に、出力決定部213は、フロー304を出力しないことを決定する。
The first type related to the first function funcB specified in the
以降、説明の便宜上、ステップS213にてYESと判定された場合に実行する処理を、「処理e」と表す。また、ステップS213にてNOと判定された場合に実行する処理を、「処理f」と表す。 Hereinafter, for convenience of explanation, the process to be executed when YES is determined in step S213 is referred to as “process e”. In addition, the process executed when NO is determined in step S213 is represented as “process f”.
たとえば、上述した例において、処理eは、フロー304を出力しないことを決定する処理を含む。また、処理fは、フロー304を出力することを決定する処理を含む。
For example, in the above-described example, the process e includes a process for determining that the
次に、第3の実施形態に係る出力判定装置211に関する効果について説明する。
Next, effects related to the
本実施形態に係る出力判定装置211によれば、静的解析プログラムによって出力される情報から適切な情報を選択することができる。さらに、本実施形態に係る出力判定装置211によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を、一層、適切に抽出することができる。
According to the
この理由は、理由1及び理由2である。すなわち、
(理由1)第3の実施形態に係る出力判定装置211が有する構成は、第2の実施形態に係る出力判定装置201が有する構成を含むからである、
(理由2)本実施形態に係る出力判定装置211が、さらに、関数に関する型に基づき、出力するか否かを判定するからである。
The reason is
(Reason 1) The configuration of the
(Reason 2) This is because the
すなわち、本実施形態に係る出力判定装置211は、第1の型乃至第3の型に基づいて、それぞれ、フロー304を出力するか否かを判定する。この結果、出力判定装置211が、第2の実施形態に係る出力判定装置201に比べ、さらに、関数を詳細に解析するので、より適切に情報を抽出することができる。
That is, the
<第4の実施形態>
次に、上述した第2の実施形態を基本とする本発明の第4の実施形態について説明する。
<Fourth Embodiment>
Next, a fourth embodiment of the present invention based on the second embodiment will be described.
以降の説明においては、本実施形態に係る特徴的な部分を中心に説明すると共に、上述した第2の実施形態と同様な構成については、同一の参照番号を付すことにより、重複する説明を省略する。 In the following description, the description will focus on the characteristic parts according to the present embodiment, and the same components as those in the second embodiment described above will be denoted by the same reference numerals, and redundant description will be omitted. To do.
図10と図11とを参照しながら、第4の実施形態に係る出力判定装置221が有する構成と、出力判定装置221が行う処理とについて説明する。図10は、本発明の第4の実施形態に係る出力判定装置221が有する構成を示すブロック図である。図11は、第4の実施形態に係る出力判定装置221における処理の流れを示すフローチャートである。
The configuration of the
第4の実施形態に係る出力判定装置221は、処理抽出部102と、関数抽出部103と、型抽出部202と、出力決定部222と、変数抽出部223とを有する。
The
変数抽出部223は、上述した処理c、または、処理eにおいて以降に示す処理を開始する。
The
変数抽出部223は、第1ソースプログラム301において特定された第1関数に関して、該第1関数に対する入出力を表す変数を特定する。すなわち、変数抽出部223は、第1関数の引数を表す変数を特定する。たとえば、変数抽出部223は、該入出力を表す変数を識別可能な変数識別子を特定する(ステップS221)。同様に、変数抽出部223は、第2ソースプログラム302において特定された第1関数に関して、該第1関数に対する入出力を表す変数の変数識別子を特定する(ステップS222)。
The
たとえば、図3Aに示す例において、変数抽出部223は、第1関数funcBに関して、第1ソースプログラム301のうち、命令文「int funcB(char *X)」を特定する。次に、変数抽出部223は、特定した命令文に基づき、第1関数funcBに対する入出力を表す変数が、変数識別子Xが表す変数であることを特定する。この場合に、変数抽出部223は、さらに、変数識別子Xを表す型が「char *」型であることを特定してもよい。
For example, in the example illustrated in FIG. 3A, the
同様に、図4Aに示す例において、変数抽出部223は、第1関数funcBに関して、第2ソースプログラム302のうち、命令文「int funcB(char *X)」を特定する。次に、変数抽出部223は、特定した命令文に基づき、第1関数funcBに対する入出力を表す変数が、変数識別子Xが表す変数であることを特定する。この場合に、変数抽出部223は、さらに、変数識別子Xを表す型が「char *」型であることを特定してもよい。
Similarly, in the example illustrated in FIG. 4A, the
尚、入出力する変数が複数ある場合に、変数抽出部223は、該変数の変数識別子をそれぞれ特定してもよい。
When there are a plurality of variables to be input / output, the
次に、出力決定部222は、第1ソースプログラム301において特定された変数識別子と、第2ソースプログラム302において特定された変数識別子とが一致するか否かを判定する(ステップS223)。出力決定部222は、変数識別子が一致すると判定する場合に(ステップS223にてYES)、フロー304を出力しないことを決定する(ステップS224)。出力決定部222は、変数識別子が一致しないと判定する場合に(ステップS223にてNO)、フロー304を出力することを決定する(ステップS225)。尚、出力決定部222は、ステップS225にてNOである場合に、フロー303を出力することを決定してもよい。
Next, the
上述した例において、第1ソースプログラム301において特定された変数識別子Xと、第2ソースプログラム302において特定された変数識別子Xとは一致する。この場合に、出力決定部222は、第1関数funcBに関する変数識別子が、第1ソースプログラム301と、第2ソースプログラム302とにおいて一致すると判定する。したがって、出力決定部222は、フロー304を出力しないことを決定する。
In the example described above, the variable identifier X specified in the
以降、説明の便宜上、ステップS223にてYESと判定された場合に実行する処理を、「処理g」と表す。また、ステップS223にてNOと判定された場合に実行する処理を、「処理h」と表す。 Hereinafter, for convenience of explanation, the process to be executed when YES is determined in step S223 is represented as “process g”. In addition, the process executed when NO is determined in step S223 is represented as “process h”.
たとえば、上述した例において、処理gは、フロー304を出力しないことを決定する処理を含む。また、処理hは、フロー304を出力することを決定する処理を含む。
For example, in the above-described example, the process g includes a process for determining that the
尚、出力決定部222は、変数識別子が一致するか否かを判定するだけでなく、さらに、該変数識別子の型が一致する否かを判定してもよい。この場合に、出力決定部222は、変数識別子、及び、該変数識別子の型がともに一致する場合に、フロー304を出力しないことを決定する。一方、出力決定部222は、変数識別子、及び、該変数識別子の型のうち、いずれかが一致しない場合に、フロー304を出力することを決定する。
The
または、出力決定部222は、図12に示すように、第1関数に対する入出力を表す変数の値を表す型、第2関数に対する入出力を表す変数の値を表す型、及び、第3関数に対する入出力を表す変数の値を表す型を参照することにより判定してもよい。図12は、出力決定部222が判定する場合に参照する基準の一例を概念的に表す図である。
Alternatively, as illustrated in FIG. 12, the
図12を参照すると、関数と、該関数の関数識別子と、該関数が出力する値の型と、該関数の引数である変数の型と、該変数の変数識別子とが関連付けされている。図12において、「参照する」は、出力決定部222が判定する基準として参照することを表す。「参照しない」は、出力決定部222が判定する基準として参照しないことを表す。
Referring to FIG. 12, a function, a function identifier of the function, a value type output by the function, a variable type that is an argument of the function, and a variable identifier of the variable are associated with each other. In FIG. 12, “refer” indicates that the
すなわち、図12に例示する基準において、出力決定部222は、判定する基準として項目1乃至項目8を参照する。すなわち、
(項目1)第2関数の関数識別子、
(項目2)第1関数の関数識別子、
(項目3)第3関数の関数識別子、
(項目4)第3関数が出力する値の型、
(項目5)第2関数の引数である変数の型、
(項目6)第1関数の引数である変数の型、
(項目7)第3関数の引数である変数の型、
(項目8)第1関数の引数である変数の変数識別子。
That is, in the criteria illustrated in FIG. 12, the
(Item 1) Function identifier of the second function,
(Item 2) Function identifier of the first function,
(Item 3) Function identifier of the third function,
(Item 4) Type of value output by the third function,
(Item 5) The type of the variable that is the argument of the second function,
(Item 6) The type of the variable that is the argument of the first function,
(Item 7) Type of variable that is an argument of the third function,
(Item 8) A variable identifier of a variable that is an argument of the first function.
すなわち、この場合に、出力決定部222は、第1ソースプログラム301と、第2ソースプログラム302とに関して、項目1乃至項目8の観点から比較し、いずれかの項目が一致しない場合に、フロー304を出力することを決定する。また、出力決定部222は、項目1乃至項目8がいずれも一致する場合に、フロー304を出力しないことを決定する。
That is, in this case, the
次に、第4の実施形態に係る出力判定装置221に関する効果について説明する。
Next, effects related to the
本実施形態に係る出力判定装置221によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。さらに、本実施形態に係る出力判定装置221によれば、より一層適切に、情報を抽出することができる。
According to the
この理由は、理由1及び理由2である。すなわち、
(理由1)第4の実施形態に係る出力判定装置221が有する構成は、第2の実施形態に係る出力判定装置201が有する構成を含むからである、
(理由2)本実施形態に係る出力判定装置221が、さらに、関数に対する入出力を表す変数の変数識別子に基づき、出力するか否かを判定するからである。
The reason is
(Reason 1) The configuration of the
(Reason 2) This is because the
すなわち、本実施形態に係る出力判定装置221は、関数呼び出しに関する関数識別子に加え、さらに、上述した情報に基づいて出力するか否かを判定する。この結果、出力判定装置221が、第2の実施形態に係る出力判定装置201に比べ、さらに、関数を詳細に解析するので、より適切に情報を抽出することができる。
That is, the
尚、上述した例においては、第1関数乃至第3関数の関数識別子、該第1関数乃至第3関数が出力する値の型、第1関数に対する入出力を表す変数の変数識別子、及び、該変数識別子の型等に基づき、フローを出力するか否かを判定した。たとえば、出力判定装置221は、上述したような情報を表すコールグラフ情報(図13、図14に例示)に基づいて、フローを出力するか否か判定してもよい。図13は、第1ソースプログラム301に基づくコールグラフ情報401の一例を概念的に表す図である。図14は、第2ソースプログラム302に基づくコールグラフ情報401の一例を概念的に表す図である。
In the above-described example, the function identifiers of the first function to the third function, the type of value output by the first function to the third function, the variable identifier of the variable representing the input / output to the first function, and the Whether or not to output the flow was determined based on the type of variable identifier. For example, the
コールグラフ情報401は、関数呼び出しに基づいて、ソースプログラムに記載された関数を表す関数呼び出し情報402と、該関数が出力する値の型、及び、該関数の引数を表す変数識別子を含む変数情報403とを含む。関数呼び出し情報402においては、たとえば、第1関数が第3関数を呼び出すという関数の間の関係が、第1関数及び第3関数を結ぶ矢印線として表される。また、変数情報403においては、関数と、該関数が出力する値の型と、該関数の引数を表す変数識別子と、該変数識別子の値の型とが関連付けされている。尚、関数の引数を表す変数識別子の個数は、複数であってもよい。
The
たとえば、図13に例示する関数呼び出し情報402を参照すると、「main→funcB→funcC」なる記載は、関数mainが関数funcBを呼び出し、関数funcBが関数funcCを呼び出すことを表す。図13に例示する変数情報403を参照すると、たとえば、「funcC」と、「unsigned int」と、「U」とが関連付けされている。これは、関数funcCが出力する変数の型が「unsigned int」型であり、関数funcCの引数を表す変数識別子がUであることを表す。
For example, referring to the
出力判定装置221は、たとえば、第1ソースプログラム301に含まれる関数と、第2ソースプログラム302に含まれる関数とを比較し、比較した結果を図15に例示するような差分情報として出力してもよい。図15は、差分情報の一例を概念的に表す図である。あるいは、図15に例示するような差分情報が算出されている場合に、出力判定装置221は、該差分情報に基づき、上述した処理を実行してもよい。
For example, the
図15に例示する差分情報においては、図13に例示する変数情報403に示す各項目と、図13及び図14に例示する変数情報403を比較した結果である差分とが関連付けされている。たとえば、図15の5行目において、「funcCの戻り値の型」は、「有」に関連付けされている。これは、「funcCの戻り値の型(int)」に関して、第1ソースプログラム301と、第2ソースプログラム302とに差分があることを表す。また、「funcCの変数識別子(U)」は、「無」に関連付けされている。これは、「funcCの変数識別子(U)」に関して、第1ソースプログラム301と、第2ソースプログラム302とに差分がないことを表す。
In the difference information illustrated in FIG. 15, each item illustrated in the
<第5の実施形態>
次に、上述した第4の実施形態を基本とする本発明の第5の実施形態について説明する。
<Fifth Embodiment>
Next, a fifth embodiment of the present invention based on the above-described fourth embodiment will be described.
以降の説明においては、本実施形態に係る特徴的な部分を中心に説明すると共に、上述した第4の実施形態と同様な構成については、同一の参照番号を付すことにより、重複する説明を省略する。 In the following description, the characteristic part according to the present embodiment will be mainly described, and the same configuration as that of the above-described fourth embodiment will be denoted by the same reference numeral, and redundant description will be omitted. To do.
図16と図17とを参照しながら、第5の実施形態に係る出力判定装置231が有する構成と、出力判定装置231が行う処理とについて説明する。図16は、本発明の第5の実施形態に係る出力判定装置231が有する構成を示すブロック図である。図17は、第5の実施形態に係る出力判定装置231における処理の流れを示すフローチャートである。
The configuration of the
第5の実施形態に係る出力判定装置231は、処理抽出部102と、関数抽出部103と、型抽出部202と、出力決定部233と、変数抽出部223と、第1変数部232とを有する。出力判定装置231は、さらに、変数情報部234を有してもよい。
The
第1変数部232は、上述した処理hにおいて以降に示す処理を開始する。すなわち、第1変数部232は、第1関数に関する引数を表す変数識別子、第1関数に関する引数の型、第2関数に関する引数の型、または、第3関数に関する引数の型のうち、少なくとも一つの項目に差分がある場合に、以降に示す処理を開始する。
The first
説明の便宜上、第1ソースプログラム301と、第2ソースプログラム302との間において、引数を表す変数識別子(または、引数の型)に差分を有する対象である変数を、「差分変数」と表す。
For convenience of explanation, a variable which is a target having a difference in a variable identifier (or argument type) representing an argument between the
第1変数部232は、第2ソースプログラム302において、命令文306から、差分変数を表す変数識別子が含まれる命令文に至る命令文列を逆順に追跡することにより、差分変数に値を最初に設定する設定命令文を特定する(ステップS231)。
In the
たとえば、設定命令文は、「=」の左側に変数識別子を含み、「=」の右側に変数識別子、数値、計算式、または、関数等を含む命令文である。 For example, the setting command statement is a command statement including a variable identifier on the left side of “=” and including a variable identifier, a numerical value, a calculation formula, a function, or the like on the right side of “=”.
たとえば、第2ソースプログラム302が図18に例示するようなソースプログラムであるとする。図18は、第2ソースプログラム302の一例を表す図である。また、命令文306は、「printf(“%d”,X)」であるとする。さらに、差分変数を表す変数識別子は、Xであるとする。
For example, assume that the
この場合に、第1変数部232は、まず、命令文「X=D+B」を読み取る。読み取った命令文が、Xに「D+B」の演算結果を設定する命令文であり、さらに、Xが差分変数であるので、第1変数部232は、該命令が、差分変数に最初に値を設定する命令文であると判定する。
In this case, the first
次に、第1変数部232は、特定した命令文において、差分変数に値を設定する基となる変数識別子を特定し、特定した変数識別子を変数情報部234に格納する(ステップS232)。
Next, the first
上述した例の場合に、第1変数部232は、特定した命令文の右側(すなわち、「D+B」)を読み取ることにより、変数識別子Dと、変数識別子Bとを特定し、変数識別子Dと、変数識別子Bと変数情報部234に格納する。
In the case of the above-described example, the first
次に、出力決定部233は、変数情報部234が記憶する変数識別子のうち、差分変数を表す変数識別子に一致する変数識別子があるか否かを判定する(ステップS233)。変数情報部234が、差分変数を含むと判定する場合に(ステップS233にてYES)、出力決定部233は、フロー304を出力することを決定する(ステップS234)。変数情報部234が、差分変数を含まないと判定する場合に(ステップS233にてNO)、出力決定部233は、フロー304を出力しないことを決定する(ステップS235)。
Next, the
次に、第5の実施形態に係る出力判定装置231に関する効果について説明する。
Next, effects related to the
本実施形態に係る出力判定装置231によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。さらに、本実施形態に係る出力判定装置231によれば、静的解析プログラムによって出力される情報から、さらに、適切に情報を抽出することができる。
According to the
この理由は、理由1及び理由2である。すなわち、
(理由1)第5の実施形態に係る出力判定装置231が有する構成は、第4の実施形態に係る出力判定装置221が有する構成を含むからである、
(理由2)静的解析プログラムに従い抽出された命令文306の実行に関して、差分変数が関係しているか否かを、出力決定部233が判定するからである。
The reason is
(Reason 1) The configuration of the
(Reason 2) This is because the
出力決定部233は、変数情報部234が差分変数を含むと判定する場合に、差分変数が命令文306の実行に関係すると判定する。この場合に、出力決定部233は、フロー304を出力することを決定する。また、出力決定部233は、変数情報部234が差分変数を含まないと判定する場合に、差分変数が命令文306の実行に関係しないと判定する。この場合に、出力決定部233は、フロー304を出力しないことを決定する。
When determining that the
したがって、出力判定装置231は、差分変数が命令文306の実行に影響を与えるか否かを判定するので、さらに適切に情報を抽出することができる。
Therefore, since the
<第6の実施形態>
次に、上述した第4の実施形態を基本とする本発明の第6の実施形態について説明する。
<Sixth Embodiment>
Next, a sixth embodiment of the present invention based on the above-described fourth embodiment will be described.
以降の説明においては、本実施形態に係る特徴的な部分を中心に説明すると共に、上述した第4の実施形態と同様な構成については、同一の参照番号を付すことにより、重複する説明を省略する。 In the following description, the characteristic part according to the present embodiment will be mainly described, and the same configuration as that of the above-described fourth embodiment will be denoted by the same reference numeral, and redundant description will be omitted. To do.
図19と図20とを参照しながら、第6の実施形態に係る出力判定装置241が有する構成と、出力判定装置241が行う処理とについて説明する。図19は、本発明の第6の実施形態に係る出力判定装置241が有する構成を示すブロック図である。図20は、第6の実施形態に係る出力判定装置241における処理の流れを示すフローチャートである。
The configuration of the
第6の実施形態に係る出力判定装置241は、処理抽出部102と、関数抽出部103と、型抽出部202と、出力決定部243と、変数抽出部223と、第2変数部242とを有する。出力判定装置241は、さらに、変数情報部234と、第1変数部232とを有してもよい。
The
第2変数部242は、上述した処理hにおいて以降に示す処理を開始する。すなわち、第2変数部242は、第1関数に関する引数を表す変数識別子、第1関数に関する引数の型、第2関数に関する引数の型、または、第3関数に関する引数の型のうち、少なくとも一つが差分を有する場合に、以降に示す処理を開始する。
The second
第2変数部242は、第2ソースプログラム302において、命令文306から、差分変数を表す変数識別子が含まれる命令に至る命令文列を逆順に追跡することにより、命令文306を実行するか否かを決める制御命令文を特定する(ステップS241)。
Whether or not the second
たとえば、第2ソースプログラム302が図21に例示するようなソースプログラムであるとする。図21は、第2ソースプログラム302の一例を表す図である。また、命令文306は、「X=W+1」であるとする。さらに、差分変数を表す変数識別子は、Xであるとする。
For example, it is assumed that the
この場合に、第2変数部242は、まず、命令文306から1つの命令文を逆順に追跡することにより、命令文「if (D!=1)」を読み取る。第2変数部242は、読み取った命令文が、条件分岐を表す「if」命令文であるので、命令文306を実行するか否かに関する制御命令文であると判定する。
In this case, the second
たとえば、制御命令文は、上述した「if」命令文、条件を満たすまでの間に処理を繰り返すことを表す「while」命令文、ある回数分、処理を繰り返す「for」命令文等である。 For example, the control command statement is the “if” command statement described above, a “while” command statement indicating that the processing is repeated until the condition is satisfied, a “for” command statement that repeats the processing a certain number of times, or the like.
次に、第2変数部242は、特定した制御命令文において、命令文306を実行するか否かに関する変数識別子と特定し、特定した変数識別子を変数情報部234に格納する(ステップS242)。すなわち、第2変数部242は、特定した制御命令文を構成する条件に含まれる変数識別子を特定する。
Next, the second
たとえば、上述した例において、第2変数部242は、命令文「if (D!=1)」における変数識別子Dが、命令文306を実行するか否かに関する変数識別子であることを特定し、特定した変数識別子Dを変数情報部234に格納する。
For example, in the example described above, the second
次に、出力判定装置241は、変数情報部234が記憶する変数識別子のうち、差分変数を表す変数識別子に一致する変数識別子があるか否かを判定する(ステップS243)。変数情報部234が、差分変数を含むと判定する場合に(ステップS243にてYES)、出力決定部243は、フロー304を出力することを決定する(ステップS244)。変数情報部234が、差分変数を含まないと判定する場合に(ステップS243にてNO)、出力決定部243は、フロー304を出力しないことを決定する(ステップS245)。
Next, the
次に、第6の実施形態に係る出力判定装置241に関する効果について説明する。
Next, effects related to the
本実施形態に係る出力判定装置241によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。さらに、本実施形態に係る出力判定装置241によれば、静的解析プログラムによって出力される情報から、さらに、適切に情報を抽出することができる。
According to the
この理由は、理由1及び理由2である。すなわち、
(理由1)第6の実施形態に係る出力判定装置241が有する構成は、第4の実施形態に係る出力判定装置221が有する構成を含むからである、
(理由2)静的解析プログラムに従い抽出された命令文306を実行するか否かを制御する制御命令文を構成する条件に、差分変数が関係するか否かを、出力決定部243が判定するからである。
The reason is
(Reason 1) The configuration of the
(Reason 2) The
出力決定部243は、変数情報部234が差分変数を含むと判定する場合に、差分変数が命令文306の実行に関係すると判定する。この場合に、出力決定部243は、フロー304を出力することを決定する。また、出力決定部243は、変数情報部234が差分変数を含まないと判定する場合に、差分変数が命令文306の実行に関係しないと判定する。この場合に、出力決定部233は、フロー304を出力しないことを決定する。
The
したがって、出力判定装置241は、差分変数が命令文306の実行に影響を与えるか否かを判定するので、さらに適切に情報を抽出することができる。
Therefore, since the
<第7の実施形態>
次に、上述した第6の実施形態を基本とする本発明の第7の実施形態について説明する。
<Seventh Embodiment>
Next, a seventh embodiment of the present invention based on the sixth embodiment described above will be described.
以降の説明においては、本実施形態に係る特徴的な部分を中心に説明すると共に、上述した第6の実施形態と同様な構成については、同一の参照番号を付すことにより、重複する説明を省略する。 In the following description, the characteristic parts according to the present embodiment will be mainly described, and the same components as those in the above-described sixth embodiment will be denoted by the same reference numerals, and redundant description will be omitted. To do.
図22と図23とを参照しながら、第7の実施形態に係る出力判定装置251が有する構成と、出力判定装置251が行う処理とについて説明する。図22は、本発明の第7の実施形態に係る出力判定装置251が有する構成を示すブロック図である。図23は、第7の実施形態に係る出力判定装置251における処理の流れを示すフローチャートである。
The configuration of the
第7の実施形態に係る出力判定装置251は、処理抽出部102と、関数抽出部103と、型抽出部202と、第2変数部242と、出力決定部253と、変数抽出部223と、第3変数部252とを有する。出力判定装置241は、さらに、変数情報部234と、第1変数部232とを有してもよい。
The
第2変数部242が、ステップS242に示す処理に従い、制御命令文に含まれる変数識別子を特定した後に、第3変数部252は、第2変数部242が特定した変数識別子に関連する処理を開始する。
After the second
第3変数部252は、第2ソースプログラム302において、第2変数部242が特定した制御命令文から、差分変数を表す変数識別子が含まれる命令文に至る命令文列を逆順に追跡する処理を開始する。この場合に、第3変数部252は、第2変数部242が特定した変数識別子が表す変数に値を最初に設定する設定命令文を特定する(ステップS253)。
In the
上述した例において、図21に例示するソースプログラムの場合に、第2変数部242は、変数識別子Dと、制御命令文「if (D!=1)」を特定する。第3変数部252は、制御命令文「if (D!=1)」の1つ前の命令文である「D=Y+B」を読み取る。読み取った命令文が変数識別子Dに値を設定する設定命令文であるので、第3変数部252は、読み取った命令文が変数識別子Dに値を設定する設定命令文であると特定する。
In the example described above, in the case of the source program illustrated in FIG. 21, the second
次に、第3変数部252は、特定した設定命令文において、第2変数部242が特定した変数識別子に値を設定する基となる変数識別子を特定し、特定した変数識別子を変数情報部234に格納する(ステップS254)。
Next, the third
上述した例の場合に、第3変数部252は、特定した命令文の右側(すなわち、「Y+B」)を読み取ることにより、変数識別子Yと、変数識別子Bとを特定し、変数識別子Yと、変数識別子Bと変数情報部234に格納する。
In the case of the example described above, the third
次に、出力決定部253は、変数情報部234が記憶する変数識別子のうち、差分変数を表す変数識別子に一致する変数識別子があるか否かを判定する(ステップS255)。変数情報部234が、差分変数を含むと判定する場合に(ステップS255にてYES)、出力決定部253は、フロー304を出力することを決定する(ステップS257)。変数情報部234が、差分変数を含まないと判定する場合に(ステップS255にてNO)、出力決定部253は、フロー304を出力しないことを決定する(ステップS256)。
Next, the
次に、第7の実施形態に係る出力判定装置251に関する効果について説明する。
Next, effects related to the
本実施形態に係る出力判定装置251によれば、ソースプログラムに関して静的解析プログラムが出力する情報から、該ソースプログラムが実行される場合に不具合である可能性の高い情報を抽出することができる。さらに、本実施形態に係る出力判定装置251によれば、静的解析プログラムによって出力される情報から、さらに、適切に情報を抽出することができる。
According to the
この理由は、理由1及び理由2である。すなわち、
(理由1)第7の実施形態に係る出力判定装置251が有する構成は、第6の実施形態に係る出力判定装置241が有する構成を含むからである、
(理由2)静的解析プログラムに従い抽出された命令文306を実行するか否かを制御する制御命令文を構成する条件に関して、該条件を満たすか否かを判定する基となる変数に、差分変数が関係するか否かを、出力決定部253が判定するからである。
The reason is
(Reason 1) The configuration of the
(Reason 2) Regarding a condition constituting a control command statement for controlling whether or not to execute the
出力決定部253は、変数情報部234が差分変数を含むと判定する場合に、差分変数が制御命令文の条件に関係すると判定する。この結果、出力決定部253は、差分変数が命令文306の実行に関係すると判定する。この場合に、出力決定部253は、フロー304を出力することを決定する。
When determining that the
また、出力決定部253は、変数情報部234が差分変数を含まないと判定する場合に、差分変数が制御命令文の条件に関係しないと判定する。この結果、出力決定部253は、差分変数が命令文306の実行に関係しないと判定する。この場合に、出力決定部233は、フロー304を出力しないことを決定する。
The
したがって、出力判定装置251は、差分変数が命令文306の実行に影響を与えるか否かを判定するので、さらに適切に情報を抽出することができる。
Therefore, the
(ハードウェア構成例)
上述した本発明の各実施形態における出力判定装置を、1つの計算処理装置(情報処理装置、コンピュータ)を用いて実現するハードウェア資源の構成例について説明する。但し、係る出力判定装置は、物理的または機能的に少なくとも2つの計算処理装置を用いて実現してもよい。また、係る出力判定装置は、専用の装置として実現してもよい。
(Hardware configuration example)
A configuration example of hardware resources for realizing the output determination device in each embodiment of the present invention described above using one calculation processing device (information processing device, computer) will be described. However, the output determination device may be realized using at least two calculation processing devices physically or functionally. The output determination device may be realized as a dedicated device.
図24は、第1の実施形態乃至第7の実施形態に係る出力判定装置を実現可能な計算処理装置のハードウェア構成例を概略的に示す図である。計算処理装置20は、中央処理演算装置(Central Processing Unit、以降「CPU」と表す)21、メモリ22、ディスク23、及び、不揮発性記録媒体24を有する。計算処理装置20は、さらに、入力装置25、出力装置26、通信インターフェース(以降、「通信IF」と表す。)27、及び、ディスプレー28を有する。計算処理装置20は、通信IF27を介して、他の計算処理装置、及び、通信装置と情報を送受信することができる。
FIG. 24 is a diagram schematically illustrating a hardware configuration example of a calculation processing apparatus capable of realizing the output determination apparatus according to the first to seventh embodiments. The
不揮発性記録媒体24は、コンピュータが読み取り可能な、たとえば、コンパクトディスク(Compact Disc)、デジタルバーサタイルディスク(Digital_Versatile_Disc)である。また、不揮発性記録媒体24は、ユニバーサルシリアルバスメモリ(USBメモリ)、ソリッドステートドライブ(Solid_State_Drive)等であってもよい。不揮発性記録媒体24は、電源を供給しなくても係るプログラムを保持し、持ち運びを可能にする。不揮発性記録媒体24は、上述した媒体に限定されない。また、不揮発性記録媒体24の代わりに、通信IF27を介して、通信ネットワークを介して係るプログラムを持ち運びしてもよい。
The
すなわち、CPU21は、ディスク23が記憶するソフトウェア・プログラム(コンピュータ・プログラム:以下、単に「プログラム」と称する)を、実行する際にメモリ22にコピーし、演算処理を実行する。CPU21は、プログラム実行に必要なデータをメモリ22から読み取る。表示が必要な場合には、CPU21は、ディスプレー28に出力結果を表示する。外部への出力が必要な場合には、CPU21は、出力装置26に出力結果を出力する。外部からプログラムを入力する場合、CPU21は、入力装置25からプログラムを読み取る。CPU21は、上述した図1、図6、図8、図10、図16、図19、または、図22に示す各部が表す機能(処理)に対応するところのメモリ22にある出力判定プログラム(図2、図7、図9、図11、図17、図20、または、図23)を解釈し実行する。CPU21は、上述した本発明の各実施形態において説明した処理を順次行う。
That is, the
すなわち、このような場合、本発明は、係る出力判定プログラムによっても成し得ると捉えることができる。更に、係る出力判定プログラムが記録されたコンピュータ読み取り可能な不揮発性の記録媒体によっても、本発明は成し得ると捉えることができる。 That is, in such a case, it can be understood that the present invention can also be achieved by such an output determination program. Furthermore, it can be understood that the present invention can also be realized by a computer-readable non-volatile recording medium in which the output determination program is recorded.
以上、上述した実施形態を模範的な例として本発明を説明した。しかし、本発明は、上述した実施形態には限定されない。すなわち、本発明は、本発明のスコープ内において、当業者が理解し得る様々な態様を適用することができる。 The present invention has been described above using the above-described embodiment as an exemplary example. However, the present invention is not limited to the above-described embodiment. That is, the present invention can apply various modes that can be understood by those skilled in the art within the scope of the present invention.
尚、上述した各実施形態の一部又は全部は、以下の付記のようにも記載されうる。しかし、上述した各実施形態により例示的に説明した本発明は、以下には限られない。すなわち、
(付記1)
ソースプログラムを静的に解析する静的解析手段が、前記ソースプログラムから抽出したフローと、前記フローから抽出した命令文とに基づき、前記ソースプログラムにおいて前記命令文を含む第1関数を特定し、特定した前記第1関数に関して、関数を一意に識別可能な関数識別子を第1関数識別子として抽出する処理抽出手段と、
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出する関数抽出手段と、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定する場合に、前記静的解析手段が前記第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力決定手段と
備える出力判定装置。
In addition, a part or all of each embodiment mentioned above can be described also as the following additional remarks. However, the present invention described by way of example with the above-described embodiments is not limited to the following. That is,
(Appendix 1)
Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, A process extracting means for extracting, as the first function identifier, a function identifier that can uniquely identify the function with respect to the identified first function;
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is A function extracting means for identifying a third function called by the function to be represented and extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function identifier extracted in the first source program And the second function identifier extracted in the second source program, the third function identifier extracted in the first source program, and the second source program extracted in the second source program Whether or not the third function identifier matches, and (a) does not output the second flow extracted by the static analysis means in the second source program when it is determined that both match. , (B) output determination means for determining to output the second flow when it is determined that either of them does not match. Fixed device.
(付記2)
前記ソースプログラムにおいて、前記第3関数が出力する値の型を抽出する型抽出手段
をさらに備え、
前記出力決定手段は、前記(a)である場合に、前記第3関数に関して、前記第1ソースプログラムにおいて抽出された前記型と、前記第2ソースプログラムにおいて抽出された前記型とが一致するか否かを判定し、(c)一致すると判定する場合に、前記第2フローを出力せず、(d)一致しないと判定する場合に、前記第2フローを出力する
付記1に記載の出力判定装置。
(Appendix 2)
The source program further comprises type extracting means for extracting the type of the value output by the third function,
In the case of (a), the output determining means, for the third function, does the type extracted in the first source program match the type extracted in the second source program? (C) If it is determined that they match, the second flow is not output, and (d) if it is determined that they do not match, the second flow is output. Output determination according to
(付記3)
前記型抽出手段は、前記(c)である場合に、さらに、前記ソースプログラムにおいて、前記第1関数が出力する値の型、及び、前記第2関数が出力する値の型を抽出し、
前記出力決定手段は、前記第1ソースプログラムにおいて特定された前記第1関数に関する前記型と、前記第2ソースプログラムにおいて特定された前記第1関数に関する前記型とが一致するか否か、及び、前記第1ソースプログラムにおいて特定された前記第2関数に関する前記型と、前記第2ソースプログラムにおいて特定された前記第2関数に関する前記型とが一致するか否かを判定し、(e)いずれもが一致すると判定する場合に、前記第2フローを出力せず、(f)いずれかが一致しないと判定する場合に前記第2フローを出力する
付記2に記載の出力判定装置。
(Appendix 3)
In the case of (c), the type extracting means further extracts a value type output from the first function and a value type output from the second function in the source program,
The output determining means determines whether the type related to the first function specified in the first source program matches the type related to the first function specified in the second source program; and It is determined whether or not the type related to the second function specified in the first source program matches the type related to the second function specified in the second source program. The output determination device according to
(付記4)
前記(c)または前記(e)である場合に、前記ソースプログラムにおいて、前記第1関数に対する入出力に関する変数を表す変数識別子を抽出する変数抽出手段
をさらに備え、
前記出力決定手段は、前記第1ソースプログラムにおいて抽出された前記変数識別子と、前記第2ソースプログラムにおいて抽出された前記変数識別子とが一致するか否かを判定し、(g)一致すると判定する場合に、前記第2フローを出力せず、(h)一致しないと判定する場合に前記第2フローを出力する
付記2または付記3に記載の出力判定装置。
(Appendix 4)
In the case of (c) or (e), the source program further comprises variable extraction means for extracting a variable identifier representing a variable related to input / output with respect to the first function,
The output determining means determines whether or not the variable identifier extracted in the first source program matches the variable identifier extracted in the second source program, and (g) determines that they match. In this case, the second flow is not output, and (h) the second flow is output when it is determined that they do not coincide with each other.
(付記5)
前記変数抽出手段は、さらに、前記ソースプログラムにおいて、前記第1関数乃至前記第3関数に関して、それぞれ、入出力に関する変数の型を抽出し、
前記出力決定手段は、
前記第1ソースプログラムにおいて抽出された前記第1関数に関する各変数の型と、前記第2ソースプログラムにおいて抽出された前記第1関数に関する各変数の型とが一致するか否か、
前記第1ソースプログラムにおいて抽出された前記第2関数に関する各変数の型と、前記第2ソースプログラムにおいて抽出された前記第2関数に関する各変数の型とが一致するか否か、
前記第1ソースプログラムにおいて抽出された前記第3関数に関する各変数の型と、前記第2ソースプログラムにおいて抽出された前記第3関数に関する各変数の型とが一致するか否か
を判定し、いずれも一致すると判定する場合に前記第2フローを出力せず、いずれかが一致しないと判定する場合に、前記第2フローを出力する
付記4に記載の出力判定装置。
(Appendix 5)
The variable extraction unit further extracts a variable type related to input / output with respect to the first function to the third function in the source program,
The output determining means includes
Whether the type of each variable related to the first function extracted in the first source program matches the type of each variable related to the first function extracted in the second source program;
Whether the type of each variable related to the second function extracted in the first source program matches the type of each variable related to the second function extracted in the second source program;
It is determined whether the type of each variable related to the third function extracted in the first source program matches the type of each variable related to the third function extracted in the second source program. The output determination device according to claim 4, wherein the second flow is not output when it is determined that they match, and the second flow is output when any of them does not match.
(付記6)
前記(h)である場合に、前記ソースプログラムを逆順に追跡することにより、前記フローから抽出された前記命令文から、前記(h)において一致しない前記変数を表す前記変数識別子が含まれる命令文のうち、最初に前記変数識別子を含む命令文に至る命令文列において、一致しない前記変数に値を設定する命令文を特定し、前記設定する命令文を構成する前記変数を特定し、特定した前記変数を表す前記変数識別子を変数情報手段に格納する第1変数手段
をさらに備え、
前記出力決定手段は、前記(h)において一致しない前記変数を表す前記変数識別子が、前記変数情報手段に含まれるか否かを判定し、含まれる場合に、前記第2フローを出力し、含まれない場合に、前記第2フローを出力しない
付記4または付記5に記載の出力判定装置。
(Appendix 6)
In the case of (h), by tracing the source program in reverse order, the statement including the variable identifier representing the variable that does not match in (h) is extracted from the statement extracted from the flow. In the command statement string that first reaches the command statement including the variable identifier, the command statement that sets a value to the variable that does not match is specified, and the variable that constitutes the command statement to be set is specified and specified. First variable means for storing the variable identifier representing the variable in variable information means;
The output determining means determines whether or not the variable identifier representing the variable that does not match in (h) is included in the variable information means, and if included, outputs the second flow and includes If not, the output determination device according to Supplementary Note 4 or Supplementary Note 5, wherein the second flow is not output.
(付記7)
前記(h)である場合に、前記ソースプログラムを逆順に追跡することにより、前記フローから抽出された命令文から、前記(h)において一致しない前記変数を表す前記変数識別子が含まれる命令文のうち、最初に前記変数識別子を含む命令文に至る命令文列において、前記命令文が実行されるか否かを制御する制御命令文を特定し、前記制御命令文に含まれる前記変数を表す前記変数識別子を抽出し、抽出した前記変数識別子を前記変数情報手段に格納する第2変数手段
をさらに備え
前記出力決定手段は、一致しない前記変数を表す前記変数識別子が、前記変数情報手段に含まれるか否かを判定する
付記6に記載の出力判定装置。
(Appendix 7)
In the case of (h), by tracing the source program in reverse order, the instruction sentence including the variable identifier representing the variable that does not match in (h) is extracted from the instruction sentence extracted from the flow. Among them, in a command statement string that first reaches a command statement including the variable identifier, a control command statement that controls whether or not the command statement is executed is specified, and the variable that is included in the control command statement is represented. The variable information means further includes second variable means for extracting the variable identifier and storing the extracted variable identifier in the variable information means. The output determining means includes the variable identifier representing the variable that does not match. The output determination apparatus according to appendix 6.
(付記8)
前記(h)である場合に、前記ソースプログラムを逆順に追跡することにより、前記第2変数手段が抽出した前記変数識別子に、値を設定する設定命令文を特定し、該特定した前記設定命令文にて前記値を算出する基となる前記変数識別子を特定し、特定した前記変数識別子を前記変数情報手段に格納する第3変数手段
をさらに備える
付記7に記載の出力判定装置。
(Appendix 8)
In the case of (h), by tracing the source program in reverse order, a setting command statement for setting a value is specified in the variable identifier extracted by the second variable means, and the specified setting command The output determination device according to claim 7, further comprising: third variable means for specifying the variable identifier that is a basis for calculating the value by a sentence and storing the specified variable identifier in the variable information means.
(付記9)
前記静的解析手段と、
付記1乃至付記8のいずれかに記載の出力判定装置と
を備える静的解析装置。
(Appendix 9)
The static analysis means;
A static analysis device comprising: the output determination device according to any one of
(付記10)
情報処理装置が、
ソースプログラムを静的に解析する静的解析手段が、前記ソースプログラムから抽出したフローと、前記フローから抽出した命令文とに基づき、前記ソースプログラムにおいて前記命令文を含む第1関数を特定し、特定した前記第1関数に関して、関数を一意に識別可能な関数識別子を第1関数識別子として抽出し、
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出し、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が前記第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力判定方法。
(Appendix 10)
Information processing device
Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, With respect to the identified first function, a function identifier that can uniquely identify the function is extracted as a first function identifier,
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is Identifying a third function called by the function to be represented, extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function identifier extracted in the first source program And the second function identifier extracted in the second source program, the third function identifier extracted in the first source program, and the second source program extracted in the second source program Whether or not the third function identifier matches, and (a) does not output the second flow extracted by the static analysis means in the second source program when it is determined that both match. , (B) An output determination method for determining to output the second flow when it is determined that any of them does not match.
(付記11)
ソースプログラムを静的に解析する静的解析手段が、前記ソースプログラムから抽出したフローと、前記フローから抽出した命令文とに基づき、前記ソースプログラムにおいて前記命令文を含む第1関数を特定し、特定した前記第1関数に関して、関数を一意に識別可能な関数識別子を第1関数識別子として抽出する処理抽出機能と、
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出する関数抽出機能と、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、前記第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力決定機能と
をコンピュータに実現させる出力判定プログラム。
(Appendix 11)
Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, A process extraction function for extracting, as the first function identifier, a function identifier that can uniquely identify the function with respect to the identified first function;
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is A function extraction function for identifying a third function called by the function to be represented and extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function extracted in the first source program Whether the identifier matches the second function identifier extracted in the second source program, and the third function identifier extracted in the first source program, and extracted in the second source program It is determined whether or not the third function identifier matches, and (a) when it is determined that both match, the second flow extracted by the static analysis means in the second source program is not output. , (B) an output determination function for determining that the second flow is output when it is determined that either of them does not match. Output judgment program to be realized
101 出力判定装置
102 処理抽出部
103 関数抽出部
104 出力決定部
301 第1ソースプログラム
302 第2ソースプログラム
303 フロー
304 フロー
305 命令文
306 命令文
307 フロー
201 出力判定装置
202 型抽出部
203 出力決定部
211 出力判定装置
212 型抽出部
213 出力決定部
221 出力判定装置
222 出力決定部
223 変数抽出部
231 出力判定装置
232 第1変数部
233 出力決定部
234 変数情報部
241 出力判定装置
242 第2変数部
243 出力決定部
251 出力判定装置
252 第3変数部
253 出力決定部
401 コールグラフ情報
402 関数呼び出し情報
403 変数情報
20 計算処理装置
21 CPU
22 メモリ
23 ディスク
24 不揮発性記録媒体
25 入力装置
26 出力装置
27 通信IF
28 ディスプレー
DESCRIPTION OF
22
28 Display
Claims (10)
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出する関数抽出手段と、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が前記第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力決定手段と
備える出力判定装置。 Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, A process extracting means for extracting, as the first function identifier, a function identifier that can uniquely identify the function with respect to the identified first function;
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is A function extracting means for identifying a third function called by the function to be represented and extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function identifier extracted in the first source program And the second function identifier extracted in the second source program, the third function identifier extracted in the first source program, and the second source program extracted in the second source program Whether or not the third function identifier matches, and (a) does not output the second flow extracted by the static analysis means in the second source program when it is determined that both match. , (B) output determination means for determining to output the second flow when it is determined that either of them does not match. Fixed device.
をさらに備え、
前記出力決定手段は、前記(a)である場合に、前記第3関数に関して、前記第1ソースプログラムにおいて抽出された前記型と、前記第2ソースプログラムにおいて抽出された前記型とが一致するか否かを判定し、(c)一致すると判定する場合に、前記第2フローを出力せず、(d)一致しないと判定する場合に、前記第2フローを出力する
請求項1に記載の出力判定装置。 The source program further comprises type extracting means for extracting the type of the value output by the third function,
In the case of (a), the output determining means, for the third function, does the type extracted in the first source program match the type extracted in the second source program? 2. The output according to claim 1, wherein (2) the second flow is output when (c) it is determined that they do not match, and (d) when it is determined that they do not match. Judgment device.
前記出力決定手段は、前記第1ソースプログラムにおいて特定された前記第1関数に関する前記型と、前記第2ソースプログラムにおいて特定された前記第1関数に関する前記型とが一致するか否か、及び、前記第1ソースプログラムにおいて特定された前記第2関数に関する前記型と、前記第2ソースプログラムにおいて特定された前記第2関数に関する前記型とが一致するか否かを判定し、(e)いずれもが一致すると判定する場合に、前記第2フローを出力せず、(f)いずれかが一致しないと判定する場合に前記第2フローを出力する
請求項2に記載の出力判定装置。 In the case of (c), the type extracting means further extracts a value type output from the first function and a value type output from the second function in the source program,
The output determining means determines whether the type related to the first function specified in the first source program matches the type related to the first function specified in the second source program; and It is determined whether or not the type related to the second function specified in the first source program matches the type related to the second function specified in the second source program. 3. The output determination device according to claim 2, wherein the second flow is not output when it is determined that the two match, and (f) the second flow is output when it is determined that either does not match.
をさらに備え、
前記出力決定手段は、前記第1ソースプログラムにおいて抽出された前記変数識別子と、前記第2ソースプログラムにおいて抽出された前記変数識別子とが一致するか否かを判定し、(g)一致すると判定する場合に、前記第2フローを出力せず、(h)一致しないと判定する場合に前記第2フローを出力する
請求項2または請求項3に記載の出力判定装置。 In the case of (c) or (e), the source program further comprises variable extraction means for extracting a variable identifier representing a variable related to input / output with respect to the first function,
The output determining means determines whether or not the variable identifier extracted in the first source program matches the variable identifier extracted in the second source program, and (g) determines that they match. The output determination apparatus according to claim 2 or 3, wherein the second flow is not output, and (h) the second flow is output when it is determined that they do not match.
前記出力決定手段は、
前記第1ソースプログラムにおいて抽出された前記第1関数に関する各変数の型と、前記第2ソースプログラムにおいて抽出された前記第1関数に関する各変数の型とが一致するか否か、
前記第1ソースプログラムにおいて抽出された前記第2関数に関する各変数の型と、前記第2ソースプログラムにおいて抽出された前記第2関数に関する各変数の型とが一致するか否か、
前記第1ソースプログラムにおいて抽出された前記第3関数に関する各変数の型と、前記第2ソースプログラムにおいて抽出された前記第3関数に関する各変数の型とが一致するか否か
を判定し、いずれも一致すると判定する場合に前記第2フローを出力せず、いずれかが一致しないと判定する場合に、前記第2フローを出力する
請求項4に記載の出力判定装置。 The variable extraction unit further extracts a variable type related to input / output with respect to the first function to the third function in the source program,
The output determining means includes
Whether the type of each variable related to the first function extracted in the first source program matches the type of each variable related to the first function extracted in the second source program;
Whether the type of each variable related to the second function extracted in the first source program matches the type of each variable related to the second function extracted in the second source program;
It is determined whether the type of each variable related to the third function extracted in the first source program matches the type of each variable related to the third function extracted in the second source program. 5. The output determination device according to claim 4, wherein the second flow is not output when it is determined that they match, and the second flow is output when any of them does not match.
をさらに備え、
前記出力決定手段は、前記(h)において一致しない前記変数を表す前記変数識別子が、前記変数情報手段に含まれるか否かを判定し、含まれる場合に、前記第2フローを出力し、含まれない場合に、前記第2フローを出力しない
請求項4または請求項5に記載の出力判定装置。 In the case of (h), by tracing the source program in reverse order, the statement including the variable identifier representing the variable that does not match in (h) is extracted from the statement extracted from the flow. In the command statement string that first reaches the command statement including the variable identifier, the command statement that sets a value to the variable that does not match is specified, and the variable that constitutes the command statement to be set is specified and specified. First variable means for storing the variable identifier representing the variable in variable information means;
The output determining means determines whether or not the variable identifier representing the variable that does not match in (h) is included in the variable information means, and if included, outputs the second flow and includes The output determination device according to claim 4 or 5, wherein the second flow is not output when the second flow is not detected.
をさらに備え
前記出力決定手段は、一致しない前記変数を表す前記変数識別子が、前記変数情報手段に含まれるか否かを判定する
請求項6に記載の出力判定装置。 In the case of (h), by tracing the source program in reverse order, the instruction sentence including the variable identifier representing the variable that does not match in (h) is extracted from the instruction sentence extracted from the flow. Among them, in a command statement string that first reaches a command statement including the variable identifier, a control command statement that controls whether or not the command statement is executed is specified, and the variable that is included in the control command statement is represented. The variable information means further includes second variable means for extracting the variable identifier and storing the extracted variable identifier in the variable information means. The output determining means includes the variable identifier representing the variable that does not match. The output determination apparatus according to claim 6.
をさらに備える
請求項7に記載の出力判定装置。 In the case of (h), by tracing the source program in reverse order, a setting command statement for setting a value is specified in the variable identifier extracted by the second variable means, and the specified setting command The output determination device according to claim 7, further comprising third variable means for specifying the variable identifier that is a basis for calculating the value in a sentence and storing the specified variable identifier in the variable information means.
ソースプログラムを静的に解析する静的解析手段が、前記ソースプログラムから抽出したフローと、前記フローから抽出した命令文とに基づき、前記ソースプログラムにおいて前記命令文を含む第1関数を特定し、特定した前記第1関数に関して、関数を一意に識別可能な関数識別子を第1関数識別子として抽出し、
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出し、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が前記第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力判定方法。 Information processing device
Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, With respect to the identified first function, a function identifier that can uniquely identify the function is extracted as a first function identifier,
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is Identifying a third function called by the function to be represented, extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function identifier extracted in the first source program And the second function identifier extracted in the second source program, the third function identifier extracted in the first source program, and the second source program extracted in the second source program Whether or not the third function identifier matches, and (a) does not output the second flow extracted by the static analysis means in the second source program when it is determined that both match. , (B) An output determination method for determining to output the second flow when it is determined that any of them does not match.
前記ソースプログラムにおいて、前記第1関数識別子が表す前記関数を呼び出す第2関数を特定し、特定した前記第2関数を表す第2関数識別子を抽出するとともに、前記ソースプログラムにおいて前記第1関数識別子が表す前記関数が呼び出す第3関数を特定し、特定した前記第3関数を表す第3関数識別子を抽出する関数抽出機能と、
第1ソースプログラムにおいて抽出された前記第1関数識別子と、前記第2ソースプログラムにおいて抽出された前記第1関数識別子とが一致するか否か、前記第1ソースプログラムにおいて抽出された前記第2関数識別子と、前記第2ソースプログラムにおいて抽出された前記第2関数識別子とが一致するか否か、及び、前記第1ソースプログラムにおいて抽出された前記第3関数識別子と、前記第2ソースプログラムにおいて抽出された前記第3関数識別子とが一致するか否かを判定し、(a)いずれも一致すると判定した場合に、前記静的解析手段が第2ソースプログラムにおいて抽出した第2フローを出力せず、(b)いずれかが一致しないと判定した場合に、前記第2フローを出力することを決定する出力決定機能と
をコンピュータに実現させる出力判定プログラム。 Static analysis means for statically analyzing a source program specifies a first function including the instruction sentence in the source program based on the flow extracted from the source program and the instruction sentence extracted from the flow, A process extraction function for extracting, as the first function identifier, a function identifier that can uniquely identify the function with respect to the identified first function;
In the source program, a second function that calls the function represented by the first function identifier is identified, a second function identifier representing the identified second function is extracted, and in the source program, the first function identifier is A function extraction function for identifying a third function called by the function to be represented and extracting a third function identifier representing the identified third function;
Whether the first function identifier extracted in the first source program matches the first function identifier extracted in the second source program, whether the second function extracted in the first source program Whether the identifier matches the second function identifier extracted in the second source program, and the third function identifier extracted in the first source program, and extracted in the second source program It is determined whether or not the third function identifier matches, and (a) when it is determined that both match, the second flow extracted by the static analysis means in the second source program is not output. , (B) an output determination function for determining that the second flow is output when it is determined that either of them does not match. Output judgment program to be realized
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015002765A JP2016128941A (en) | 2015-01-09 | 2015-01-09 | Output determination device, output determination method, output determination program, and static analysis device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2015002765A JP2016128941A (en) | 2015-01-09 | 2015-01-09 | Output determination device, output determination method, output determination program, and static analysis device |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2016128941A true JP2016128941A (en) | 2016-07-14 |
Family
ID=56384325
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2015002765A Pending JP2016128941A (en) | 2015-01-09 | 2015-01-09 | Output determination device, output determination method, output determination program, and static analysis device |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2016128941A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018003531A1 (en) | 2016-06-29 | 2018-01-04 | 三菱瓦斯化学株式会社 | Pyrroloquinone quinone monosodium, method for manufacturing same, and composition including same. |
US11281566B2 (en) | 2018-07-23 | 2022-03-22 | Mitsubishi Electric Corporation | Scoring device, computer readable medium, and scoring method |
JP7331679B2 (en) | 2018-12-21 | 2023-08-23 | 富士通株式会社 | Determining Information Leakage in Computer Readable Programs |
-
2015
- 2015-01-09 JP JP2015002765A patent/JP2016128941A/en active Pending
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2018003531A1 (en) | 2016-06-29 | 2018-01-04 | 三菱瓦斯化学株式会社 | Pyrroloquinone quinone monosodium, method for manufacturing same, and composition including same. |
US11281566B2 (en) | 2018-07-23 | 2022-03-22 | Mitsubishi Electric Corporation | Scoring device, computer readable medium, and scoring method |
JP7331679B2 (en) | 2018-12-21 | 2023-08-23 | 富士通株式会社 | Determining Information Leakage in Computer Readable Programs |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11579856B2 (en) | Multi-chip compatible compiling method and device | |
US20110126179A1 (en) | Method and System for Dynamic Patching Software Using Source Code | |
JP6268029B2 (en) | Test case generation apparatus and test case generation method | |
US20110145799A1 (en) | Path-sensitive dataflow analysis including path refinement | |
CN111090433A (en) | Data processing method, device and storage medium | |
JP5303795B2 (en) | Application analysis method, analysis system, and analysis program | |
US9396097B2 (en) | Methods, circuits, devices, systems and associated computer executable code for testing software code | |
JP2016128941A (en) | Output determination device, output determination method, output determination program, and static analysis device | |
JP6759851B2 (en) | Program generation program, program generation method, program generator and compilation program | |
US8839217B2 (en) | Efficiently solving the “use-def” problem involving label variables | |
JP6567212B2 (en) | Equivalence verification device and equivalence verification program | |
JP6945768B2 (en) | Detection device, detection method, and detection program | |
US9396239B2 (en) | Compiling method, storage medium and compiling apparatus | |
JP4888790B2 (en) | Contract definition function verification apparatus, method and program thereof | |
US20150082278A1 (en) | Clone detection method and clone function commonalizing method | |
JP5811859B2 (en) | Source code static analysis device, system, method, and program therefor | |
JP6665576B2 (en) | Support device, support method, and program | |
JP2014126900A (en) | Program analysis device, program analysis method, and program analysis program | |
JP2018124901A (en) | Program analyzing apparatus, program analyzing method, and program analyzing program | |
JP5595304B2 (en) | Program test apparatus, program test apparatus program test method, and program test program | |
JP5755861B2 (en) | Test case generation apparatus, test case generation method, and test case generation program | |
JP2009129133A (en) | Software partial test system, software partial test method, and program for software partial test | |
CN111143229A (en) | Software testing method and device, computer equipment and computer readable storage medium | |
JP2018147114A (en) | Test case generation method, computer, and program | |
CN116774988B (en) | Method and device for releasing frame package mode symbol dependence |