WO2021024472A1 - 機能推定装置、機能推定方法及びコンピュータ可読媒体 - Google Patents

機能推定装置、機能推定方法及びコンピュータ可読媒体 Download PDF

Info

Publication number
WO2021024472A1
WO2021024472A1 PCT/JP2019/031447 JP2019031447W WO2021024472A1 WO 2021024472 A1 WO2021024472 A1 WO 2021024472A1 JP 2019031447 W JP2019031447 W JP 2019031447W WO 2021024472 A1 WO2021024472 A1 WO 2021024472A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
command
code
parser
software
Prior art date
Application number
PCT/JP2019/031447
Other languages
English (en)
French (fr)
Inventor
有佑 嶋田
貴之 佐々木
Original Assignee
日本電気株式会社
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 日本電気株式会社 filed Critical 日本電気株式会社
Priority to PCT/JP2019/031447 priority Critical patent/WO2021024472A1/ja
Priority to JP2021537532A priority patent/JP7298692B2/ja
Priority to US17/631,044 priority patent/US11868744B2/en
Publication of WO2021024472A1 publication Critical patent/WO2021024472A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/37Compiler construction; Parser generation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/205Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • G06F8/427Parsing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/75Structural analysis for program understanding

Definitions

  • the present invention relates to a software function estimation device, a function estimation method, and a computer-readable medium.
  • Patent Document 1 discloses a technique of weighting words in a class or method and clustering software components based on the weighting result.
  • An object of the present disclosure is to provide a function estimation device that solves any of the above-mentioned problems in view of the above-mentioned problems.
  • the function estimation device is included in software, and is a parser specifying means for parsing user input and specifying a parser for executing a corresponding command, and a command from a character string in the parser.
  • a parser specifying means for parsing user input and specifying a parser for executing a corresponding command, and a command from a character string in the parser.
  • the function estimation method includes a step of parsing user input to identify a parser for executing a corresponding command, and extracting a command from a character string in the parser. Then, by clustering the control flow that connects the extracted commands to the starting point, the step of separating the code of the software for each function and the function of each of the separated codes based on the characteristic part of each separated code are performed. It comprises a step of estimating.
  • the non-temporary computer-readable medium includes a step of syntactically analyzing user input to identify a parser for executing a corresponding command, and a character string in the parser.
  • each function included in the software can be estimated from the code so that the software code can be inspected accurately and easily for each function.
  • FIG. It is a block diagram which shows the structure of the function estimation apparatus which concerns on Embodiment 1.
  • FIG. It is a block diagram which shows the structure of the function estimation apparatus which concerns on Embodiment 2.
  • FIG. It is a flowchart explaining the flow of the process of estimating the function of each isolation code in the function estimation apparatus which concerns on Embodiment 2. It is a figure explaining the process of extracting a command from a character string in a parser in step S102 of FIG. It is a figure explaining the process of separating the software code for each function by clustering the control flow which connects the extracted command to the starting point in step S103 of FIG. It is a figure explaining the process in step S104 and step S105 of FIG.
  • FIG. 1 is a block diagram showing a configuration of a function estimation device 10 according to the first embodiment.
  • the function estimating device 10 includes a parser specifying means 11, a separating means 12, and a function estimating means 13.
  • the parser specifying means 11 identifies the parser included in the software.
  • the parser is for parsing the user input and executing the corresponding command.
  • the isolation means 12 extracts a command from a character string in the parser, and clusters a control flow connected to the extracted command as a starting point to isolate software code for each function.
  • the function estimating means 13 estimates the function of each of the separated codes based on the characteristic portion of each of the separated codes.
  • Each function included in the software can be estimated from the code so that the software code can be analyzed accurately and easily for each function.
  • FIG. 2 is a block diagram showing a configuration of the function estimation device 110 according to the second embodiment.
  • the function estimating device 110 includes a parser specifying means 111, a separating means 112, a function estimating means 113, and a function labeling means 114.
  • the parser specifying means 111 is included in the software and parses the user input to specify the parser for executing the corresponding command.
  • a method of specifying the parser in the software code an existing method such as searching for a characteristic function used in the parser can be used.
  • the separating means 112 extracts a command from a character string in the parser, and clusters the control flow connected to the extracted command as a starting point to separate the software code for each function.
  • the function estimating means 113 estimates the function of each of the separated codes based on the characteristic portion of each of the separated codes.
  • the function labeling means 114 labels the function estimated by the function estimating means 113 for each isolation code.
  • control flow is clustered starting from the extracted command, but the control flow enabled by the setting may be clustered starting from the software setting item instead of the command.
  • the parser is for parsing the setting information and controlling the validity / invalidity of the control flow according to the setting.
  • FIG. 2 will also be referred to as appropriate.
  • FIG. 3 is a flowchart illustrating the flow of processing for estimating the function of each isolation code in the function estimation device 110.
  • the parser specifying means 111 identifies the parser included in the software (step S101).
  • the isolation means 112 extracts a command from the character string in the parser (step S102).
  • the isolation means 112 isolates the software code for each function by clustering the control flow that connects the extracted commands as the starting point (step S103).
  • the function estimating means 113 estimates the function of each of the separated codes based on the characteristic portion of each of the separated codes (step S104).
  • the function labeling means 114 labels the function estimated by the function estimation means 113 for each isolation code (step S105).
  • FIG. 4 is a diagram illustrating a process of extracting a command from a character string in the parser in step S102 of FIG.
  • the character string of the upper command exists in the reference destination such as the instruction for performing the character string comparison.
  • the code related to the parser contains all the strings of the higher-level commands executed directly by the parser.
  • the character strings of the commands are extracted from the code related to the parser, the character strings of the upper command 1, the upper command 2, ..., And the upper command n are "cmd1", “cmd2”, ..., ", respectively. It can be seen that it is "cmdn”.
  • FIG. 5 is a diagram for explaining the process of separating the software code for each function by clustering the control flow connected to the extracted command as the starting point in step S103 of FIG.
  • FIG. 5 shows an example of a control flow graph of the software to be analyzed.
  • the control flow graph is a graph showing all the routes that may be taken when the software is executed.
  • control flow from the parser extends to the upper command (parent command). Then, the control flow is extended from each upper command to the first layer subcommand (child command), and further, the control flow is extended from the first layer subcommand to the second layer subcommand (grandchild command). Except in special cases, in general software, it can be assumed that the control flow extending from the parser is connected to the subcommand on the downstream side via the upper command as described above.
  • the function isolation code corresponding to the first command which is any one of the higher-level commands, includes the code of all subcommands via the control flow that can be traced downstream from the first command. Is done.
  • the code of the first command and the code of the subcommand via which the control flow clustered as a cluster of the first command passes are used as the separation code of one function included in the software.
  • the isolation code of the function k corresponding to the upper command Ck includes the first layer subcommand SCfk1a, the first layer subcommand SCfk1b, the second layer subcommand SCfk2a, and the second layer subcommand SCfk2b. Code is included.
  • the code of the upper command Ck and the code of the subcommand via the control flow clustered as a cluster of the upper command Ck are used as the separation code of one function included in the software.
  • the number of the first layer subcommands in which the control flow from the upper command is extended is set to two, and the control flow from the first layer subcommands is extended in the second layer subcommands. The number has been reduced to two, but these numbers are not limited to two.
  • the number of subclaim layers is set to 2 for convenience of explanation, but the number of subclaim layers is not limited to 2.
  • FIG. 6 is a diagram illustrating the processing in steps S104 and S105 of FIG.
  • the isolation code of each function includes a command name, a function name corresponding to the command, a user-defined function called inside the function, a library function, an API, and the like.
  • the feature part is included. However, if the inspection target is a stripped binary, the function name cannot be used.
  • the information regarding the API called when the isolation code is executed may be considered. Further, in the estimation of the software function in step S104 of FIG. 3, the information regarding the file access status when the isolation code is executed may be taken into consideration. By doing so, the accuracy of function estimation can be further improved.
  • the code is divided based on the upper command whose control flow is directly connected to the parser, so that the accuracy of function separation is good.
  • good separation accuracy means that all the codes related to the function are included and the code not related to the function is not included.
  • the function estimator 110 the accuracy of separating the functions is good, so that each function included in the software can be checked from the code so that the software code can be inspected accurately and easily for each function. Can be estimated.
  • the present invention has been described as a hardware configuration, but the present invention is not limited thereto.
  • the present invention can also be realized by causing a CPU (Central Processing Unit) to execute a program for each process.
  • a CPU Central Processing Unit
  • Non-transitory computer-readable media include various types of tangible storage media (tangible storage media).
  • non-temporary computer-readable media examples include magnetic recording media (eg, flexible disks, magnetic tapes, hard disk drives), opto-magnetic recording media (eg, opto-magnetic disks), CD-ROMs (Read Only Memory), CD-Rs, CD-R / W, semiconductor memory (for example, mask ROM, PROM (Programmable ROM), EPROM (Erasable PROM), flash ROM, RAM (Random Access Memory).
  • the program includes various types of temporary ones. It may be supplied to the computer by a computer readable medium (transition computer readable medium). Examples of temporary computer readable media include electrical signals, optical signals, and electromagnetic waves.
  • Temporary computer readable media include wires and light. The program can be supplied to the computer via a wired communication path such as a fiber or a wireless communication path.
  • the software to be analyzed in the above embodiment may be execution code or source code. Further, the software to be analyzed may be a single code or a code including a library read from the outside.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Stored Programmes (AREA)

Abstract

機能推定装置(10)は、ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するパーサ特定手段(11)と、パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、ソフトウェアのコードを機能ごとに切り分けする切り分け手段(12)と、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて前記切り分けコードごとの機能を推定する機能推定手段(13)と、を備える。

Description

機能推定装置、機能推定方法及びコンピュータ可読媒体
 本発明は、ソフトウェアの機能推定装置、機能推定方法及びコンピュータ可読媒体に関する。
 ソフトウェアの分析を行う技術が知られている。特許文献1には、クラスやメソッド内の単語に重み付けを行い、重み付けの結果によりソフトウェアの構成要素のクラスタリングを行う技術が開示されている。
特開2017-156896号公報
 近年、インフラや企業システムが複雑化している。このため、これらのインフラや企業システムは、様々な企業のデバイスを組み合わせて構築されることが一般的になっている。こういったことから、インフラや企業システムの構築の取り纏めを行うメーカーは、外部のメーカーから調達したソフトウェアの検査を行う必要がある。ソフトウェアの検査では、外部から調達したソフトウェアの実行コード(バイナリコード)あるいはソースコードが提供されるが、検査対象のソフトウェアの中に実際にどのような機能が実装されているのかを精度良く簡便に、かつ自動的に把握することが困難であるという問題があった。
 本開示の目的は、上述した課題を鑑み、上述した課題のいずれかを解決する機能推定装置を提供することを目的とする。
 本発明の第1の態様に係る機能推定装置は、ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するパーサ特定手段と、前記パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、前記ソフトウェアのコードを機能ごとに切り分けする切り分け手段と、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて、切り分けコードごとの機能を推定する、機能推定手段と、を備える。
 本発明の第2の態様に係る機能推定方法は、ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するステップと、前記パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、前記ソフトウェアのコードを機能ごとに切り分けするステップと、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて前記切り分けコードごとの機能を推定するステップと、を備える。
 本発明の第3の態様に係る非一時的なコンピュータ可読媒体は、ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するステップと、前記パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、前記ソフトウェアのコードを機能ごとに切り分けするステップと、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて前記切り分けコードごとの機能を推定するステップと、をコンピュータに実行させるプログラムが格納されている。
 本発明によれば、機能ごとにソフトウェアのコードの検査を精度良く簡便に行うことが可能になるように、ソフトウェアに含まれている各機能をコードから推定することができる。
実施の形態1に係る機能推定装置の構成を示すブロック図である。 実施の形態2に係る機能推定装置の構成を示すブロック図である。 実施の形態2に係る機能推定装置において、切り分けコードごとの機能を推定する処理の流れについて説明するフローチャートである。 図3のステップS102における、パーサにおける文字列からコマンドを抽出する処理について説明する図である。 図3のステップS103における、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、ソフトウェアのコードを機能ごとに切り分けする処理について説明する図である。 図3のステップS104及びステップS105における処理について説明する図である。
 以下、図面を参照して本発明の実施の形態について説明する。説明の明確化のため、以下の記載及び図面は、適宜、省略、及び簡略化がなされている。各図面において、同一の要素には同一の符号が付されており、必要に応じて重複説明は省略されている。
[実施の形態1]
 以下、実施の形態1について説明する。
 図1は、実施の形態1に係る機能推定装置10の構成を示すブロック図である。図1に示すように、機能推定装置10は、パーサ特定手段11と、切り分け手段12と、機能推定手段13と、を備えている。
 パーサ特定手段11は、ソフトウェアに含まれているパーサを特定する。ここで、パーサは、ユーザー入力を構文解析して該当するコマンドを実行するためのものである。切り分け手段12は、パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、ソフトウェアのコードを機能ごとに切り分けする。機能推定手段13は、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて切り分けコードごとの機能を推定する。
 機能ごとにソフトウェアのコードの解析を精度良く簡便に行うことが可能になるように、ソフトウェアに含まれている各機能をコードから推定することができる。
[実施の形態2]
 以下、実施の形態2について説明する。
 まず、実施の形態2に係る機能推定装置の構成例について説明する。図2は、実施の形態2に係る機能推定装置110の構成を示すブロック図である。図2に示すように、機能推定装置110は、パーサ特定手段111と、切り分け手段112と、機能推定手段113と、機能ラベリング手段114を備えている。
 パーサ特定手段111は、ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定する。なお、ソフトウェアのコード中におけるパーサを特定する方法は、パーサにおいて使用されている特徴的な関数を探すなどといった、既存の方法を用いることができる。切り分け手段112は、パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、ソフトウェアのコードを機能ごとに切り分けする。機能推定手段113は、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて切り分けコードごとの機能を推定する。機能ラベリング手段114は、各切り分けコードに対し、機能推定手段113によって推定された機能をラベリングする。
 上記では、抽出したコマンドを起点として、コントロールフローをクラスタリングしたが、コマンドではなく、ソフトウェアの設定項目を起点として、設定によって有効化されるコントロールフローをクラスタリングしてもよい。この場合、パーサは設定情報を構文解析し、設定に応じてコントロールフローの有効・無効を制御するためのものである。
 次に、機能推定装置110において、切り分けコードごとの機能を推定する処理の流れについて説明する。なお、以下の説明では図2についても適宜参照する。
 図3は、機能推定装置110において、切り分けコードごとの機能を推定する処理の流れについて説明するフローチャートである。図3に示すように、まず、パーサ特定手段111が、ソフトウェアに含まれるパーサを特定する(ステップS101)。続いて、切り分け手段112が、パーサにおける文字列からコマンドを抽出する(ステップS102)。続いて、切り分け手段112が、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、ソフトウェアのコードを機能ごとに切り分けする(ステップS103)。続いて、機能推定手段113が、切り分けられたそれぞれの切り分けコードの特徴部分に基づいて切り分けコードごとの機能を推定する(ステップS104)。続いて、機能ラベリング手段114が、各切り分けコードに対し、機能推定手段113によって推定された機能をラベリングする(ステップS105)。
 図4は、図3のステップS102における、パーサにおける文字列からコマンドを抽出する処理について説明する図である。図4に示すように、検査対象がソースコードであれば、パーサに関するコードには、ユーザーより入力された上位コマンド(上位コマンドk;k=1~n)を実行するための条件文(例えば、if文やswitch-case文)が含まれている。また、バイナリであれば、文字列比較を行う命令などの参照先に上位コマンドの文字列が存在する。つまり、パーサに関するコードには、パーサにより直接実行される上位コマンドの文字列が全て含まれている。よって、パーサに関するコードからコマンドの文字列を抽出すれば、上位コマンド1、上位コマンド2、・・・、上位コマンドnの文字列が、それぞれ、“cmd1”、“cmd2”、・・・、“cmdn”であることが分かる。
 図5は、図3のステップS103における、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、ソフトウェアのコードを機能ごとに切り分けする処理について説明する図である。図5には、解析対象のソフトウェアのコントロールフローグラフの例が示されている。ここで、コントロールフローグラフは、ソフトウェアを実行したときに通る可能性のある全経路をグラフで表したものである。
 図5に示す例では、パーサからのコントロールフローCfk(k=1~n)は上位コマンドCk(k=1~n)に延びている。上位コマンドCkからのコントロールフローCfk1a(k=1~n)は第1層サブコマンドSCfk1a(k=1~n)に延び、上位コマンドCkからのコントロールフローCfk1b(k=1~n)は第1層サブコマンドSCfk1b(k=1~n)に延びている。さらに、第1層サブコマンドSCfk1aからのコントロールフローCfk2aは第2層サブコマンドSCfk2a(k=1~n)に延び、第1層サブコマンドSCfk1bからのコントロールフローCfk2bは第2層サブコマンドSCfk2b(k=1~n)に延びている。
 つまり、パーサからのコントロールフローは上位コマンド(親コマンド)に延びている。そして、各上位コマンドから第1層サブコマンド(子コマンド)にコントロールフローが延び、さらに、第1層サブコマンドから第2層サブコマンド(孫コマンド)にコントロールフローが延びている。特殊なケースを除いて、一般的なソフトウェアでは、上述のように、パーサから延びるコントロールフローが上位コマンドを経て下流側のサブコマンドにつながっていると仮定することができる。
 ある上位コマンドからたどることのできるコントロールフローを、当該上位コマンドのクラスタとしてクラスタリングする。図5に示す例では、コントロールフローCfk1a、コントロールフローCfk1b、コントロールフローCfk2a、コントロールフローCfk2bは、機能k(k=1~n)にクラスタリングされる。
 上位コマンドのうちの任意の1つである第1コマンドに対応する機能の切り分けコードには、第1コマンドを起点として下流側へたどることのできるコントロールフローが経由する全てのサブコマンドのコードが含まれる。第1コマンドのコードと、第1コマンドのクラスタとしてクラスタリングされたコントロールフローが経由するサブコマンドのコードをソフトウェアに含まれる1つの機能の切り分けコードとする。
 すなわち、図5に示す例では、上位コマンドCkに対応する機能kの切り分けコードには、第1層サブコマンドSCfk1a、第1層サブコマンドSCfk1b、第2層サブコマンドSCfk2a、第2層サブコマンドSCfk2bのコードが含まれる。上位コマンドCkのコードと、上位コマンドCkのクラスタとしてクラスタリングされたコントロールフローが経由するサブコマンドのコードをソフトウェアに含まれる1つの機能の切り分けコードとする。
 このように、上位コマンドを起点に繋がるコントロールフローをクラスタリングすることによりソフトウェアに含まれる各機能(図5に示す例では、機能k;k=1~n)の範囲を特定することができる。なお、図5に示す例では、説明の便宜上、上位コマンドからのコントロールフローが延びる第1層サブコマンドの数を2つにし、第1層サブコマンドからのコントロールフローが延びる第2層サブコマンドの数を2つにしたが、これらの数は2つに限られない。また、図5に示す例では、説明の便宜上、サブクレームの層の数を2にしたが、サブクレームの層の数は2に限られない。
 図6は、図3のステップS104及びステップS105における処理について説明する図である。図6に示すように、各機能の切り分けコードには、コマンド名と、そのコマンドに該当する関数名と、その関数の内部で呼ばれているユーザー定義の関数と、ライブラリ関数と、APIなどの特徴部分が含まれている。ただし検査対象がストリップされたバイナリの場合は、関数名を利用することはできない。ソフトウェアに含まれる機能は、当該機能の切り分けコードに含まれる、コマンド名と、そのコマンドに該当する関数名と、その関数の内部で呼ばれているユーザー定義の関数と、ライブラリ関数と、APIと、システムコールと、命令と、の少なくとも1つに基づいて推定することができる。そして、推定された機能をラベリングする。図6に示す例では、機能k(k=1~n)の機能としてlabel_k(k=1~n)がラベリングされている。
 図3のステップS104における、ソフトウェアの機能の推定において、切り分けコードを実行した際に呼び出しされるAPIに関する情報を考慮しても良い。また、図3のステップS104における、ソフトウェアの機能の推定において、切り分けコードを実行した際のファイルアクセスの状況に関する情報を考慮してもよい。このようにすることで、機能の推定の精度をより向上させることができる。
 以上より、機能推定装置110では、コントロールフローがパーサに直接繋がっている上位コマンドをベースにコードを区切るので、機能の切り分けの精度が良い。ここで、切り分け精度が良いとは、機能に関係するコードが全て含まれ、かつ、機能に関係ないコードが含まれないことをいう。機能推定装置110によれば、機能の切り分けの精度が良いので、機能ごとにソフトウェアのコードの検査を精度良く簡便に行うことが可能になるように、ソフトウェアに含まれている各機能をコードから推定することができる。
 上述の実施の形態では、本発明をハードウェアの構成として説明したが、本発明は、これに限定されるものではない。本発明は、各処理を、CPU(Central Processing Unit)にプログラムを実行させることにより実現することも可能である。
 上述の、切り分けコードごとの機能を推定する処理を実現するためのプログラムは、様々なタイプの非一時的なコンピュータ可読媒体(non-transitory computer readable medium)を用いて格納され、コンピュータに供給することができる。非一時的なコンピュータ可読媒体は、様々なタイプの実体のある記録媒体(tangible storage medium)を含む。非一時的なコンピュータ可読媒体の例は、磁気記録媒体(例えばフレキシブルディスク、磁気テープ、ハードディスクドライブ)、光磁気記録媒体(例えば光磁気ディスク)、CD-ROM(Read Only Memory)、CD-R、CD-R/W、半導体メモリ(例えば、マスクROM、PROM(Programmable ROM)、EPROM(Erasable PROM)、フラッシュROM、RAM(Random Access Memory)を含む。また、プログラムは、様々なタイプの一時的なコンピュータ可読媒体(transitory computer readable medium)によってコンピュータに供給されてもよい。一時的なコンピュータ可読媒体の例は、電気信号、光信号、及び電磁波を含む。一時的なコンピュータ可読媒体は、電線及び光ファイバ等の有線通信路、又は無線通信路を介して、プログラムをコンピュータに供給できる。
 以上、実施の形態を参照して本願発明を説明したが、本願発明は上記によって限定されるものではない。本願発明の構成や詳細には、発明のスコープ内で当業者が理解し得る様々な変更をすることができる。上記実施の形態における、解析対象のソフトウェアは、実行コードでもよいし、ソースコードでもよい。また、解析対象のソフトウェアは、単一のコードでもよいし、外部から読み込まれるライブラリを含むコードであってもよい。
10、110 機能推定装置
11、111 パーサ特定手段
12、112 切り分け手段
13、113 機能推定手段
114 機能ラベリング手段

Claims (7)

  1.  ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するパーサ特定手段と、
     前記パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、前記ソフトウェアのコードを機能ごとに切り分けする切り分け手段と、
     切り分けられたそれぞれの切り分けコードの特徴部分に基づいて前記切り分けコードごとの機能を推定する機能推定手段と、を備える機能推定装置。
  2.  前記コマンドのうちの1つである第1コマンドに対応する機能の前記切り分けコードには、前記第1コマンドを起点として下流側へたどることのできるコントロールフローが経由する全てのサブコマンドのコードが含まれる、請求項1に記載の機能推定装置。
  3.  前記特徴部分は、前記切り分けコードに含まれる、コマンド名と、当該コマンドに対応する関数名と、当該関数の内部で呼ばれているユーザー定義の関数と、ライブラリ関数と、APIと、システムコールと、命令と、の少なくとも1つを含む、請求項1または2に記載の機能推定装置。
  4.  前記機能推定手段における、前記ソフトウェアの機能の推定において、前記切り分けコードを実行した際に呼び出しされるAPIに関する情報を考慮する、請求項1から3のいずれか一項に記載の機能推定装置。
  5.  前記機能推定手段における、前記ソフトウェアの機能の推定において、前記切り分けコードを実行した際のファイルアクセスの状況に関する情報を考慮する、請求項1から4のいずれか一項に記載の機能推定装置。
  6.  ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するステップと、
     前記パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、前記ソフトウェアのコードを機能ごとに切り分けするステップと、
     切り分けられたそれぞれの切り分けコードの特徴部分に基づいて前記切り分けコードごとの機能を推定するステップと、を備える機能推定方法。
  7.  ソフトウェアに含まれ、ユーザー入力を構文解析して該当するコマンドを実行するためのパーサを特定するステップと、
     前記パーサにおける文字列からコマンドを抽出し、抽出したコマンドを起点に繋がるコントロールフローをクラスタリングすることにより、前記ソフトウェアのコードを機能ごとに切り分けするステップと、
     切り分けられたそれぞれの切り分けコードの特徴部分に基づいて前記切り分けコードごとの機能を推定するステップと、をコンピュータに実行させるプログラムが格納された非一時的なコンピュータ可読媒体。
PCT/JP2019/031447 2019-08-08 2019-08-08 機能推定装置、機能推定方法及びコンピュータ可読媒体 WO2021024472A1 (ja)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2019/031447 WO2021024472A1 (ja) 2019-08-08 2019-08-08 機能推定装置、機能推定方法及びコンピュータ可読媒体
JP2021537532A JP7298692B2 (ja) 2019-08-08 2019-08-08 機能推定装置、機能推定方法及びプログラム
US17/631,044 US11868744B2 (en) 2019-08-08 2019-08-08 Estimation of features corresponding to extracted commands used to divide code of software

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2019/031447 WO2021024472A1 (ja) 2019-08-08 2019-08-08 機能推定装置、機能推定方法及びコンピュータ可読媒体

Publications (1)

Publication Number Publication Date
WO2021024472A1 true WO2021024472A1 (ja) 2021-02-11

Family

ID=74502633

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2019/031447 WO2021024472A1 (ja) 2019-08-08 2019-08-08 機能推定装置、機能推定方法及びコンピュータ可読媒体

Country Status (3)

Country Link
US (1) US11868744B2 (ja)
JP (1) JP7298692B2 (ja)
WO (1) WO2021024472A1 (ja)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112565842A (zh) * 2020-12-04 2021-03-26 广州视源电子科技股份有限公司 信息处理方法、装置及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61204737A (ja) * 1985-03-06 1986-09-10 Toppan Printing Co Ltd デ−タ処理装置
JP2005174045A (ja) * 2003-12-12 2005-06-30 Sharp Corp ソースプログラム変換装置、ソースプログラム変換方法、ソースプログラム変換プログラム、および、プログラム記録媒体
JP2016081132A (ja) * 2014-10-10 2016-05-16 富士通株式会社 分析プログラム、分析方法及び分析装置
JP2019106128A (ja) * 2017-12-14 2019-06-27 富士通株式会社 分析方法、分析装置および分析プログラム

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5903756A (en) * 1996-10-11 1999-05-11 Sun Microsystems, Incorporated Variable lookahead parser generator
WO2003065252A1 (en) * 2002-02-01 2003-08-07 John Fairweather System and method for managing memory
US7539976B1 (en) * 2003-03-25 2009-05-26 Electric Cloud, Inc. System and method for intelligently distributing source files within a distributed program build architecture
US7676788B1 (en) * 2003-03-25 2010-03-09 Electric Cloud, Inc. Architecture and method for executing program builds
US20100042585A1 (en) * 2008-08-14 2010-02-18 Dustin Kurt Adler Command Interpretation
US8707252B1 (en) * 2008-09-03 2014-04-22 Emc Corporation Techniques for automatic generation of parsing code
US9928379B1 (en) * 2008-09-08 2018-03-27 Steven Miles Hoffer Methods using mediation software for rapid health care support over a secured wireless network; methods of composition; and computer program products therefor
JP5536518B2 (ja) * 2009-04-23 2014-07-02 インターナショナル・ビジネス・マシーンズ・コーポレーション システムの自然言語仕様から当該システム用のシステム・モデル化メタモデル言語モデルを自動的に抽出するための方法、装置及びコンピュータ・
US10957310B1 (en) * 2012-07-23 2021-03-23 Soundhound, Inc. Integrated programming framework for speech and text understanding with meaning parsing
US8788263B1 (en) * 2013-03-15 2014-07-22 Steven E. Richfield Natural language processing for analyzing internet content and finding solutions to needs expressed in text
US10191973B1 (en) * 2013-09-30 2019-01-29 EMC IP Holding Company LLC Patent analytics using mapreduce clustering
JP6658098B2 (ja) 2016-02-29 2020-03-04 富士通株式会社 分析支援方法、分析支援装置、および分析支援プログラム
US10469275B1 (en) * 2016-06-28 2019-11-05 Amazon Technologies, Inc. Clustering of discussion group participants
EP3973427A4 (en) * 2019-05-20 2023-06-21 Sentinel Labs Israel Ltd. SYSTEMS AND METHODS FOR EXECUTABLE CODE DETECTION, AUTOMATIC FEATURE EXTRACTION, AND POSITION-INDEPENDENT CODE DETECTION

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61204737A (ja) * 1985-03-06 1986-09-10 Toppan Printing Co Ltd デ−タ処理装置
JP2005174045A (ja) * 2003-12-12 2005-06-30 Sharp Corp ソースプログラム変換装置、ソースプログラム変換方法、ソースプログラム変換プログラム、および、プログラム記録媒体
JP2016081132A (ja) * 2014-10-10 2016-05-16 富士通株式会社 分析プログラム、分析方法及び分析装置
JP2019106128A (ja) * 2017-12-14 2019-06-27 富士通株式会社 分析方法、分析装置および分析プログラム

Also Published As

Publication number Publication date
JPWO2021024472A1 (ja) 2021-02-11
US20220269490A1 (en) 2022-08-25
US11868744B2 (en) 2024-01-09
JP7298692B2 (ja) 2023-06-27

Similar Documents

Publication Publication Date Title
US11481200B1 (en) Checking source code validity at time of code update
CN108984160B (zh) 基于组件化的信息化快速开发框架系统
JP6780020B2 (ja) データコンパイル方法、装置、電子端末及びコンピュータ読み取り可能な記憶媒体
JP2003514276A (ja) エラーメッセージから故障を分離する方法
CN111984779A (zh) 一种对话文本分析方法、装置、设备和可读介质
CN111669281B (zh) 告警分析方法、装置、设备及存储介质
US9117020B2 (en) Determining control flow divergence due to variable value difference
WO2021024472A1 (ja) 機能推定装置、機能推定方法及びコンピュータ可読媒体
CN111324619B (zh) 微服务系统中的对象更新方法、装置、设备和存储介质
CN110457065A (zh) 用于获得可兼容多版本系统的应用的方法及装置
US20190361684A1 (en) Systems and methods for providing an application transformation tool
JP7243834B2 (ja) ソフトウェア解析装置、ソフトウェア解析方法及びプログラム
CN112269566B (zh) 脚本生成处理方法、装置、设备及系统
CN115113972A (zh) 应用改造方法、系统、集群、介质及程序产品
US10409573B1 (en) Batch script decomposer
US11947966B2 (en) Identifying computer instructions enclosed by macros and conflicting macros at build time
WO2015141723A1 (ja) ソースコード生成および提供装置、並びにソースコード生成および提供方法
CN115756395A (zh) 一种基于注解配置的多维对象数据统计方法
CN115951916A (zh) 一种组件的处理方法、装置、电子设备及存储介质
CN110737438A (zh) 一种数据处理方法和装置
JP6263487B2 (ja) プロセス抽出装置、プロセス抽出方法、及びプログラム
US10853559B2 (en) Symmetric text replacement
JP6404751B2 (ja) 制御プログラム分割装置、制御プログラム分割方法及びコンピュータプログラム
CN113934748A (zh) 混合型sql脚本文件生成方法、执行方法及装置
US8843896B2 (en) Metamodeling contextual navigation of computer software applications

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19940327

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021537532

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19940327

Country of ref document: EP

Kind code of ref document: A1