JP2022156575A - Analysis program, analysis method, and information processing apparatus - Google Patents

Analysis program, analysis method, and information processing apparatus Download PDF

Info

Publication number
JP2022156575A
JP2022156575A JP2021060343A JP2021060343A JP2022156575A JP 2022156575 A JP2022156575 A JP 2022156575A JP 2021060343 A JP2021060343 A JP 2021060343A JP 2021060343 A JP2021060343 A JP 2021060343A JP 2022156575 A JP2022156575 A JP 2022156575A
Authority
JP
Japan
Prior art keywords
information
source file
specification information
code
specifications
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2021060343A
Other languages
Japanese (ja)
Inventor
駿 工藤
Shun Kudo
貴正 浦本
Takamasa Uramoto
貴史 大畑
Takashi Ohata
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujitsu Ltd
Original Assignee
Fujitsu Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP2021060343A priority Critical patent/JP2022156575A/en
Publication of JP2022156575A publication Critical patent/JP2022156575A/en
Pending legal-status Critical Current

Links

Images

Abstract

To facilitate recognition of operation specifications at the time of executing a program.SOLUTION: An information processing apparatus 10 stores therein a source file 1a and specification definition information defining operation specifications of a programming language used for description of an analysis object program in the source file 1a. The information processing apparatus 10 decodes operation specifications of code in each of lines described in the source file 1a on the basis of the specification definition information. Then, the information processing apparatus 10 generates specification information in which comment statements representing operation specifications of code described in each of a plurality of lines are described in association with each of the plurality of lines in the source file 1a.SELECTED DRAWING: Figure 1

Description

本発明は、解析プログラム、解析方法、および情報処理装置に関する。 The present invention relates to an analysis program, an analysis method, and an information processing apparatus.

アプリケーションソフトウェア(以下アプリケーションと呼ぶ)などのソフトウェアは、そのソフトウェアを実行するプラットフォームの移行または処理系の変更により、実行環境が変更されることがある。例えば以下のようなプラットフォームの移行または処理系の変更があり得る。
・ホストからいわゆるオープン系OS(Operating System)への移行
・オープン系OSの中での別OSへの移行
・同一OSでの32-bit版から64-bit版への移行
・同一OSでのバージョンアップ
・高級言語で作成されたソフトウェアの処理系の変更(例えばコンパイラを提供するベンダの変更)
ソフトウェアの実行環境が変更される場合、その変更に伴うソフトウェアの動作の変化が問題となることが多い。例えば、メモリ領域へのポインタを扱うプログラムの場合、32-bitから64-bitへの移行ではポインタのサイズが異なる。このため、ポインタを利用した処理でポインタサイズが32bitであることを利用した処理を含むソフトウェアを64-bit版のOSへ移行させた場合、ソースファイルなどの資産に一切変更が無くとも、動作が変更される。これらのプラットフォーム移行に伴う仕様差は、移行するソフトウェアのソースファイルなどの資産文面には直接現れない情報である。
The execution environment of software such as application software (hereinafter referred to as application) may be changed due to the migration of the platform for executing the software or the change of the processing system. For example, the following platform migrations or processing system changes are possible.
・Migration from a host to a so-called open OS (Operating System) ・Migration to another OS within an open OS ・Migration from a 32-bit version to a 64-bit version in the same OS ・Version in the same OS Changes in the processing system of software created in up/high-level languages (for example, changes in the vendor that provides the compiler)
When the execution environment of software is changed, the change in behavior of the software due to the change often poses a problem. For example, in the case of a program that handles pointers to memory areas, the size of the pointers differs when moving from 32-bit to 64-bit. For this reason, when software that includes processing that uses the pointer size of 32 bits is migrated to a 64-bit version OS, the operation will continue even if there is no change in resources such as source files. Be changed. These platform migration-related specification differences are information that does not directly appear in asset documents such as the source files of the software to be migrated.

プラットフォームの移行の際には、プラットフォーム移行の実現性の事前確認作業が行われる。例えばソフトウェア資産に対して実行するプラットフォーム間の非互換の部分を人手によりしらみつぶし的に洗い出すアセスメントが実施される。 Prior confirmation of the feasibility of platform migration is carried out at the time of platform migration. For example, an assessment is performed manually to exhaustively identify incompatibilities between platforms that execute software assets.

プログラムの内容の把握を支援する技術としては、例えば入力されるプログラムに基づいて柔軟な仕様書を生成できる仕様書生成装置が提案されている。 As a technique for assisting in grasping the contents of a program, for example, a specification generation device capable of generating flexible specifications based on an input program has been proposed.

特開2010-176553号公報JP 2010-176553 A

プログラム実行時の動作仕様がソースファイルなどの資産文面に現れない部分があるため、ソースファイルだけではコンパイル後のプログラムの動作仕様を正確に把握することが困難である。そのため例えば、ソフトウェアの実行環境が変更される場合にアセスメントを実施しても、実行環境の変更に応じて変更される動作の抽出漏れが発生しやすく、正確性に欠けてしまう。またソフトウェアのソースファイルの変更により動作が変更される場合においても、動作の変更箇所を正確に把握することが困難となっている。 Since there are parts where the operation specifications at the time of program execution do not appear in the asset statements such as the source files, it is difficult to accurately grasp the operation specifications of the program after compilation only from the source files. Therefore, for example, even if the assessment is performed when the execution environment of the software is changed, it is easy to fail to extract actions that are changed according to the change of the execution environment, resulting in a lack of accuracy. Moreover, even when the operation is changed by changing the source file of the software, it is difficult to accurately grasp the changed part of the operation.

1つの側面では、本件は、プログラム実行時の動作仕様の把握を容易にすることを目的とする。 In one aspect, the present invention aims at facilitating understanding of operation specifications during program execution.

1つの案では、以下の処理をコンピュータに実行させる解析プログラムが提供される。
コンピュータは、ソースファイルにおける解析対象プログラムの記述に使用されたプログラミング言語の動作仕様が定義された仕様定義情報に基づいて、ソースファイルに記述された行ごとのコードの動作仕様を解読する。そしてコンピュータは、ソースファイル内の複数の行それぞれに対応付けて、複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された仕様情報を生成する。
In one proposal, an analysis program is provided that causes a computer to perform the following processes.
The computer decodes the operation specifications of the code written in the source file for each line based on the specification definition information that defines the operation specifications of the programming language used to describe the program to be analyzed in the source file. Then, the computer generates specification information in which comment statements indicating operation specifications of the code described in each of the plurality of lines are described in association with each of the plurality of lines in the source file.

1態様によれば、プログラム実行時の動作仕様の把握が容易となる。 According to the first aspect, it becomes easy to grasp the operation specifications during program execution.

第1の実施の形態に係る解析方法の一例を示す図である。It is a figure which shows an example of the analysis method which concerns on 1st Embodiment. 移行前後のシステムを含む全体のシステム構成の一例を示す図である。It is a figure which shows an example of the whole system configuration|structure including the system before and after migration. 管理端末のハードウェアの一例を示す図である。FIG. 3 is a diagram illustrating an example of hardware of a management terminal; FIG. アプリケーションの自動アセスメントのための管理端末の機能を示すブロック図である。FIG. 4 is a block diagram showing functions of a management terminal for automatic assessment of applications; プラットフォーム移行に伴うアプリケーションのアセスメント処理の一例を示す図である。FIG. 10 is a diagram illustrating an example of an application assessment process associated with platform migration; 仕様情報の第1の生成例を示す図である。FIG. 10 is a diagram illustrating a first generation example of specification information; 仕様情報の第2の生成例を示す図である。FIG. 10 is a diagram illustrating a second generation example of specification information; 仕様情報の第3の生成例を示す図である。FIG. 12 is a diagram illustrating a third generation example of specification information; 仕様情報の第4の生成例を示す図である。FIG. 13 is a diagram showing a fourth generation example of specification information; 仕様情報の第5の生成例を示す図である。FIG. 12 is a diagram showing a fifth generation example of specification information; コンパイラを変更する場合のアセスメントの一例を示す図である。It is a figure which shows an example of an assessment in the case of changing a compiler. 制御構造の部分の仕様の出力例を示す図である。FIG. 10 is a diagram showing an output example of specifications of a portion of a control structure; サブルーチンの呼び出し先の仕様差抽出の一例を示す図である。It is a figure which shows an example of the specification difference extraction of the callee of a subroutine. エラー伝搬を抑止した仕様差抽出の一例を示す図である。It is a figure which shows an example of specification difference extraction which suppressed error propagation. 運用時パラメータを参照することによる仕様差抽出の一例を示す図である。FIG. 10 is a diagram showing an example of specification difference extraction by referring to operating parameters; システムごとに異なる動作設定ファイルが存在する場合の仕様差抽出の一例を示す図である。FIG. 10 is a diagram showing an example of specification difference extraction when different operation setting files exist for each system; 仕様情報生成処理の手順の一例を示すフローチャートである。8 is a flowchart illustrating an example of a procedure of specification information generation processing; 外付け情報解析処理の手順の一例を示すフローチャートである。9 is a flowchart showing an example of the procedure of external information analysis processing; システム利用環境変数一覧テーブルの一例を示す図である。FIG. 10 is a diagram showing an example of a system usage environment variable list table; FIG. 環境変数一覧テーブルの一例を示す図である。It is a figure which shows an example of an environment variable list table. 実行時オプションテーブルの一例を示す図である。It is a figure which shows an example of a runtime option table. 動作設定テーブルの一例を示す図である。FIG. 11 is a diagram showing an example of an operation setting table; FIG. 環境変数一覧から環境変数一覧テーブルへのデータ登録処理の一例を示す図である。FIG. 10 is a diagram illustrating an example of data registration processing from an environment variable list to an environment variable list table; 動作設定ファイルから動作設定テーブルへのデータ登録処理の一例を示す図である。FIG. 10 illustrates an example of data registration processing from an operation setting file to an operation setting table; ソースファイル解析処理の手順の一例を示すフローチャートである。9 is a flowchart showing an example of the procedure of source file analysis processing; 変数一覧テーブルの一例を示す図である。It is a figure which shows an example of a variable list table. 差分レポートの出力例を示す図である。FIG. 11 is a diagram showing an output example of a difference report;

以下、本実施の形態について図面を参照して説明する。なお各実施の形態は、矛盾のない範囲で複数の実施の形態を組み合わせて実施することができる。
〔第1の実施の形態〕
まず第1の実施の形態について説明する。
Hereinafter, this embodiment will be described with reference to the drawings. It should be noted that each embodiment can be implemented by combining a plurality of embodiments within a consistent range.
[First embodiment]
First, the first embodiment will be explained.

図1は、第1の実施の形態に係る解析方法の一例を示す図である。図1には、解析方法を実現するための情報処理装置10が示されている。情報処理装置10は、例えば所定の解析プログラムを実行することにより、第1の実施の形態にかかる解析方法を実施することができる。 FIG. 1 is a diagram showing an example of an analysis method according to the first embodiment. FIG. 1 shows an information processing device 10 for realizing the analysis method. The information processing apparatus 10 can implement the analysis method according to the first embodiment by executing a predetermined analysis program, for example.

情報処理装置10は、例えば記憶部11と処理部12とを有するコンピュータである。記憶部11は、例えば情報処理装置10が有するメモリまたはストレージ装置である。処理部12は、例えば情報処理装置10が有するプロセッサまたは演算回路である。 The information processing device 10 is a computer having a storage unit 11 and a processing unit 12, for example. The storage unit 11 is, for example, a memory or a storage device that the information processing device 10 has. The processing unit 12 is, for example, a processor or an arithmetic circuit included in the information processing device 10 .

記憶部11は、ソフトウェア資産1、第1仕様定義情報2、および第2仕様定義情報3を記憶する。ソフトウェア資産1には、ソフトウェアのソースファイル1aと、ソースファイル1aに記述された解析対象プログラムの実行時に参照する情報が示された外付け情報1bが含まれる。第1仕様定義情報2は、解析対象プログラムを第1システムで実行した場合における解析対象プログラムを記述したプログラミング言語の動作仕様が定義された情報である。第2仕様定義情報3は、解析対象プログラムを第2システムで実行した場合における解析対象プログラムを記述したプログラミング言語の動作仕様が定義された情報である。第1システムと第2システムとは、例えばOSなどのプラットフォームが異なるシステムである。 The storage unit 11 stores software assets 1 , first specification definition information 2 , and second specification definition information 3 . The software asset 1 includes a software source file 1a and external information 1b indicating information to be referred to when executing the analysis target program described in the source file 1a. The first specification definition information 2 is information defining operation specifications of a programming language describing the analysis target program when the analysis target program is executed by the first system. The second specification definition information 3 is information defining operation specifications of a programming language describing the analysis target program when the analysis target program is executed by the second system. The first system and the second system are systems having different platforms such as OSs.

処理部12は、第1仕様定義情報2または第2仕様定義情報3に基づいて、ソースファイル1aに記述された行ごとのコードの動作仕様を解読する。そして処理部12は、ソースファイル1a内の複数の行それぞれに対応付けて、複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された仕様情報を生成する。例えば処理部12は、第1仕様定義情報2に基づいて、ソースファイル1aに記述された行ごとのコードの動作仕様を解読し、第1仕様定義情報2に基づく動作仕様を示すコメント文が記述された第1仕様情報4を生成する。また処理部12は、第2仕様定義情報3に基づいて、ソースファイル1aに記述された行ごとのコードの動作仕様を解読し、第2仕様定義情報3に基づく動作仕様を示すコメント文が記述された第2仕様情報5を生成する。 Based on the first specification definition information 2 or the second specification definition information 3, the processing unit 12 decodes the operation specifications of the code for each line described in the source file 1a. Then, the processing unit 12 generates specification information in which comment statements indicating operation specifications of the code described in each of the plurality of lines are described in association with each of the plurality of lines in the source file 1a. For example, the processing unit 12 decodes the operation specifications of the code for each line described in the source file 1a based on the first specification definition information 2, and writes a comment statement indicating the operation specifications based on the first specification definition information 2. The first specification information 4 is generated. Based on the second specification definition information 3, the processing unit 12 decodes the operation specifications of the code for each line described in the source file 1a, and writes comment statements indicating the operation specifications based on the second specification definition information 3. second specification information 5 is generated.

第1仕様情報4には第1仕様定義情報2に基づく動作仕様を示すコメント文が記述されているため、第1仕様情報4を参照すれば、解析対象プログラムを第1システムで実行した場合の動作仕様を容易に把握可能である。また第2仕様情報5には第2仕様定義情報3に基づく動作仕様を示すコメント文が記述されているため、第2仕様情報5を参照すれば、解析対象プログラムを第2システムで実行した場合の動作仕様を容易に把握可能である。 Since the first specification information 4 describes the comment text indicating the operation specification based on the first specification definition information 2, referring to the first specification information 4, it is possible to understand the behavior of the program to be analyzed when it is executed by the first system. Operation specifications can be easily grasped. In addition, since the second specification information 5 contains a comment that indicates the operation specification based on the second specification definition information 3, if the second specification information 5 is referred to, the analysis target program will be executed by the second system. operation specifications can be easily grasped.

例えば第1システムで実行されている解析対象プログラムを第2プログラムに移行する場合、第1仕様情報4と第2仕様情報5とを比較することで、実行するシステムの移行に伴う動作仕様の変更箇所を容易に検出できる。その場合、処理部12は、第1仕様情報4と第2仕様情報5との差分を抽出し、抽出した差分を示す仕様差分情報6を生成してもよい。仕様差分情報6には、解析対象プログラムを実行するシステムの移行に伴う動作仕様の変更箇所が漏れなく記載される。これにより、動作仕様の変更箇所の抽出漏れが抑止される。 For example, when a program to be analyzed that is being executed in the first system is transferred to the second program, by comparing the first specification information 4 and the second specification information 5, it is possible to change the operation specifications accompanying the migration of the system to be executed. The point can be easily detected. In that case, the processing unit 12 may extract the difference between the first specification information 4 and the second specification information 5 and generate the specification difference information 6 indicating the extracted difference. The specification difference information 6 describes without omission the changes in the operation specification accompanying the migration of the system that executes the program to be analyzed. As a result, omission of extracting changed portions of operation specifications is suppressed.

なお処理部12は、仕様差分情報6に基づいて差分レポート7を出力してもよい。差分レポート7には、動作仕様の変更箇所がユーザに分かりやすく可視化される。これにより、ユーザによる動作仕様の変更箇所の把握が容易となる。 Note that the processing unit 12 may output the difference report 7 based on the specification difference information 6 . The difference report 7 visualizes the changes in the operation specifications in an easy-to-understand manner for the user. This makes it easier for the user to grasp the changed parts of the operation specifications.

なお処理部12は、コードの仕様の解読の際に、解析対象プログラムの実行時に参照する情報が示された外付け情報1bに基づいて、外付け情報1bに応じた動作を記述した外部情報参照コードを実行した場合の動作を解読することもできる。その場合、処理部12は、外部情報参照コードが記述された行に対応付けて、外部情報参照コードに基づく外付け情報1bに応じた動作を示すコメント文を第1仕様情報4または第2仕様情報5に記載する。 When decoding the code specifications, the processing unit 12 refers to the external information 1b describing the operation according to the external information 1b, which indicates the information to be referred to when executing the program to be analyzed. You can also decipher what happens when you run your code. In this case, the processing unit 12 inserts a comment text indicating an operation corresponding to the external information 1b based on the external information reference code into the first specification information 4 or the second specification in association with the line in which the external information reference code is described. Described in Information 5.

外付け情報1bに応じた動作仕様を示すコメント文が第1仕様情報4または第2仕様情報5に記載されることで、ソースファイル1aには文面上現れない動作仕様が第1仕様情報4または第2仕様情報5に示される。そのため、第1仕様情報4または第2仕様情報5に基づいて、解析対象プログラムの実行時の動作を正確に把握することが可能となる。 A comment text indicating the operation specification corresponding to the external information 1b is written in the first specification information 4 or the second specification information 5, so that the operation specification that does not appear in the text of the source file 1a is written in the first specification information 4 or the second specification information 5. It is shown in the second specification information 5 . Therefore, based on the first specification information 4 or the second specification information 5, it is possible to accurately grasp the behavior of the program to be analyzed during execution.

さらに処理部12は、第1仕様情報4と第2仕様情報5との差分に基づいて、第1システムで実行されていた解析対象プログラムを第2システムに移行させるための修正案を出力してもよい。例えば処理部12には、コード仕様の解読によって判明する動作時のエラーの種別に対応付けて、そのエラーを解消するための修正案を保持する。そして処理部12は、第2仕様情報5において動作エラーとなることが示されている場合、エラーの種別に応じ、エラーが出ないようにするソースファイル1aの修正案を出力する。これにより、解析対象プログラムを実行させるシステムの移行に合わせたソースファイル1aの修正が容易となる。 Further, the processing unit 12 outputs a correction proposal for migrating the analysis target program executed in the first system to the second system based on the difference between the first specification information 4 and the second specification information 5. good too. For example, the processing unit 12 holds correction proposals for eliminating the errors in association with the types of errors during operation that are found by decoding the code specifications. Then, if the second specification information 5 indicates that an operation error will occur, the processing unit 12 outputs a correction proposal for the source file 1a to prevent the error according to the type of the error. This makes it easy to modify the source file 1a in accordance with the migration of the system that executes the program to be analyzed.

また処理部12は、第1仕様定義情報2または第2仕様定義情報3に基づいて、ソースファイル1aに変更を加えた変更後ソースファイルに記述された行ごとのコードの動作仕様を解読することもできる。その場合、処理部12は、変更後ソースファイル内の複数の行それぞれに対応付けて、複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された変更後仕様情報を生成する。そして処理部12は、仕様情報と変更後仕様情報との差分を抽出する。これにより、ソースファイル1aの変更による解析対象プログラムの実行時の動作仕様の変更内容を正確に把握することができる。 Further, the processing unit 12 decodes the operation specifications of the code for each line described in the post-change source file in which the source file 1a is changed, based on the first specification definition information 2 or the second specification definition information 3. can also In this case, the processing unit 12 generates post-change specification information in which comment statements indicating operation specifications of the code described in each of the plurality of lines are described in association with each of the plurality of lines in the post-change source file. . Then, the processing unit 12 extracts the difference between the specification information and the post-change specification information. As a result, it is possible to accurately grasp the change in the operation specification during the execution of the analysis target program due to the change in the source file 1a.

〔第2の実施の形態〕
次に第2の実施の形態について説明する。
図2は、移行前後のシステムを含む全体のシステム構成の一例を示す図である。図2の例では、ネットワーク20を介して、複数のシステム200,300と管理端末100とが接続されている。システム200,300は、アプリケーションを実行するコンピュータである。システム200とシステム300とでは、異なるプラットフォームが構築されているものとする。例えばシステム200とは異なるOSでシステム300は動作している。管理端末100は、システム200,300の運用管理に用いるコンピュータである。
[Second embodiment]
Next, a second embodiment will be described.
FIG. 2 is a diagram showing an example of an overall system configuration including systems before and after migration. In the example of FIG. 2 , a plurality of systems 200 and 300 and a management terminal 100 are connected via a network 20 . Systems 200 and 300 are computers that run applications. It is assumed that the system 200 and the system 300 are built on different platforms. For example, the system 300 operates with an OS different from that of the system 200 . The management terminal 100 is a computer used for operation management of the systems 200 and 300 .

図3は、管理端末のハードウェアの一例を示す図である。管理端末100は、プロセッサ101によって装置全体が制御されている。プロセッサ101には、バス109を介してメモリ102と複数の周辺機器が接続されている。プロセッサ101は、マルチプロセッサであってもよい。プロセッサ101は、例えばCPU(Central Processing Unit)、MPU(Micro Processing Unit)、またはDSP(Digital Signal Processor)である。プロセッサ101がプログラムを実行することで実現する機能の少なくとも一部を、ASIC(Application Specific Integrated Circuit)、PLD(Programmable Logic Device)などの電子回路で実現してもよい。 FIG. 3 is a diagram illustrating an example of hardware of a management terminal; The management terminal 100 is entirely controlled by a processor 101 . A memory 102 and a plurality of peripheral devices are connected to the processor 101 via a bus 109 . Processor 101 may be a multiprocessor. The processor 101 is, for example, a CPU (Central Processing Unit), MPU (Micro Processing Unit), or DSP (Digital Signal Processor). At least part of the functions realized by the processor 101 executing the program may be realized by an electronic circuit such as an ASIC (Application Specific Integrated Circuit) or a PLD (Programmable Logic Device).

メモリ102は、管理端末100の主記憶装置として使用される。メモリ102には、プロセッサ101に実行させるOSのプログラムやアプリケーションプログラムの少なくとも一部が一時的に格納される。また、メモリ102には、プロセッサ101による処理に利用する各種データが格納される。メモリ102としては、例えばRAM(Random Access Memory)などの揮発性の半導体記憶装置が使用される。 A memory 102 is used as a main storage device of the management terminal 100 . The memory 102 temporarily stores at least part of an OS program and application programs to be executed by the processor 101 . In addition, the memory 102 stores various data used for processing by the processor 101 . As the memory 102, for example, a volatile semiconductor memory device such as a RAM (Random Access Memory) is used.

バス109に接続されている周辺機器としては、ストレージ装置103、GPU(Graphics Processing Unit)104、入力インタフェース105、光学ドライブ装置106、機器接続インタフェース107およびネットワークインタフェース108がある。 Peripheral devices connected to the bus 109 include a storage device 103 , a GPU (Graphics Processing Unit) 104 , an input interface 105 , an optical drive device 106 , a device connection interface 107 and a network interface 108 .

ストレージ装置103は、内蔵した記録媒体に対して、電気的または磁気的にデータの書き込みおよび読み出しを行う。ストレージ装置103は、コンピュータの補助記憶装置として使用される。ストレージ装置103には、OSのプログラム、アプリケーションプログラム、および各種データが格納される。なお、ストレージ装置103としては、例えばHDD(Hard Disk Drive)やSSD(Solid State Drive)を使用することができる。 The storage device 103 electrically or magnetically writes data to and reads data from a built-in recording medium. The storage device 103 is used as an auxiliary storage device for the computer. The storage device 103 stores an OS program, application programs, and various data. As the storage device 103, for example, an HDD (Hard Disk Drive) or an SSD (Solid State Drive) can be used.

GPU104は画像処理を行う演算装置であり、グラフィックコントローラとも呼ばれる。GPU104には、モニタ21が接続されている。GPU104は、プロセッサ101からの命令に従って、画像をモニタ21の画面に表示させる。モニタ21としては、有機EL(Electro Luminescence)を用いた表示装置や液晶表示装置などがある。 The GPU 104 is an arithmetic unit that performs image processing, and is also called a graphic controller. A monitor 21 is connected to the GPU 104 . The GPU 104 displays an image on the screen of the monitor 21 according to instructions from the processor 101 . Examples of the monitor 21 include a display device using an organic EL (Electro Luminescence), a liquid crystal display device, and the like.

入力インタフェース105には、キーボード22とマウス23とが接続されている。入力インタフェース105は、キーボード22やマウス23から送られてくる信号をプロセッサ101に送信する。なお、マウス23は、ポインティングデバイスの一例であり、他のポインティングデバイスを使用することもできる。他のポインティングデバイスとしては、タッチパネル、タブレット、タッチパッド、トラックボールなどがある。 A keyboard 22 and a mouse 23 are connected to the input interface 105 . The input interface 105 transmits signals sent from the keyboard 22 and mouse 23 to the processor 101 . Note that the mouse 23 is an example of a pointing device, and other pointing devices can also be used. Other pointing devices include touch panels, tablets, touchpads, trackballs, and the like.

光学ドライブ装置106は、レーザ光などを利用して、光ディスク24に記録されたデータの読み取り、または光ディスク24へのデータの書き込みを行う。光ディスク24は、光の反射によって読み取り可能なようにデータが記録された可搬型の記録媒体である。光ディスク24には、DVD(Digital Versatile Disc)、DVD-RAM、CD-ROM(Compact Disc Read Only Memory)、CD-R(Recordable)/RW(ReWritable)などがある。 The optical drive device 106 reads data recorded on the optical disc 24 or writes data on the optical disc 24 using laser light or the like. The optical disc 24 is a portable recording medium on which data is recorded so as to be readable by light reflection. The optical disc 24 includes DVD (Digital Versatile Disc), DVD-RAM, CD-ROM (Compact Disc Read Only Memory), CD-R (Recordable)/RW (ReWritable), and the like.

機器接続インタフェース107は、管理端末100に周辺機器を接続するための通信インタフェースである。例えば機器接続インタフェース107には、メモリ装置25やメモリリーダライタ26を接続することができる。メモリ装置25は、機器接続インタフェース107との通信機能を搭載した記録媒体である。メモリリーダライタ26は、メモリカード27へのデータの書き込み、またはメモリカード27からのデータの読み出しを行う装置である。メモリカード27は、カード型の記録媒体である。 The device connection interface 107 is a communication interface for connecting peripheral devices to the management terminal 100 . For example, the device connection interface 107 can be connected to the memory device 25 and the memory reader/writer 26 . The memory device 25 is a recording medium equipped with a communication function with the device connection interface 107 . The memory reader/writer 26 is a device that writes data to the memory card 27 or reads data from the memory card 27 . The memory card 27 is a card-type recording medium.

ネットワークインタフェース108は、ネットワーク20に接続されている。ネットワークインタフェース108は、ネットワーク20を介して、他のコンピュータまたは通信機器との間でデータの送受信を行う。ネットワークインタフェース108は、例えばスイッチやルータなどの有線通信装置にケーブルで接続される有線通信インタフェースである。またネットワークインタフェース108は、基地局やアクセスポイントなどの無線通信装置に電波によって通信接続される無線通信インタフェースであってもよい。 Network interface 108 is connected to network 20 . Network interface 108 transmits and receives data to and from other computers or communication devices via network 20 . The network interface 108 is a wired communication interface that is connected by a cable to a wired communication device such as a switch or router. Also, the network interface 108 may be a wireless communication interface that communicates with a wireless communication device such as a base station or an access point via radio waves.

管理端末100は、以上のようなハードウェアによって、第2の実施の形態の処理機能を実現することができる。システム200,300も、管理端末100と同様のハードウェアにより実現することができる。また、第1の実施の形態に示した情報処理装置10も、管理端末100と同様のハードウェアにより実現することができる。 The management terminal 100 can implement the processing functions of the second embodiment with the above hardware. Systems 200 and 300 can also be realized by hardware similar to management terminal 100 . Also, the information processing apparatus 10 shown in the first embodiment can be realized by hardware similar to that of the management terminal 100 .

管理端末100は、例えばコンピュータ読み取り可能な記録媒体に記録されたプログラムを実行することにより、第2の実施の形態の処理機能を実現する。管理端末100に実行させる処理内容を記述したプログラムは、様々な記録媒体に記録しておくことができる。例えば、管理端末100に実行させるプログラムをストレージ装置103に格納しておくことができる。プロセッサ101は、ストレージ装置103内のプログラムの少なくとも一部をメモリ102にロードし、プログラムを実行する。また管理端末100に実行させるプログラムを、光ディスク24、メモリ装置25、メモリカード27などの可搬型記録媒体に記録しておくこともできる。可搬型記録媒体に格納されたプログラムは、例えばプロセッサ101からの制御により、ストレージ装置103にインストールされた後、実行可能となる。またプロセッサ101が、可搬型記録媒体から直接プログラムを読み出して実行することもできる。 The management terminal 100 implements the processing functions of the second embodiment by executing a program recorded in a computer-readable recording medium, for example. A program describing the processing content to be executed by the management terminal 100 can be recorded in various recording media. For example, a program to be executed by the management terminal 100 can be stored in the storage device 103 . The processor 101 loads at least part of the program in the storage device 103 into the memory 102 and executes the program. The program to be executed by the management terminal 100 can also be recorded in a portable recording medium such as the optical disk 24, memory device 25, memory card 27, or the like. A program stored in a portable recording medium can be executed after being installed in the storage device 103 under the control of the processor 101, for example. Alternatively, the processor 101 can read and execute the program directly from the portable recording medium.

以上のようなシステムにおいて、システム200,300の一方で実行されているアプリケーションを他方のシステムに移行させる場合がある。この場合、システムの管理者は、管理端末100を用いてアプリケーションの実行環境の移行に伴って動作が変更される部分の洗い出し(アセスメント)を行う。管理端末100は、アプリケーションのアセスメントを自動で行い、実行環境の違いに応じた動作の差分を出力することができる。 In the system as described above, there is a case where an application running on one of the systems 200 and 300 is migrated to the other system. In this case, the system administrator uses the management terminal 100 to identify (assess) portions whose operations are changed due to the migration of the execution environment of the application. The management terminal 100 can automatically assess applications and output differences in operations according to differences in execution environments.

ここで、アプリケーションのプラットフォーム移行時のアセスメントの困難性について説明する。
アセスメントの1つの手段としては、コンパイラを用いて移行対象資産の構文解析を行い、移行後システム基準の構文エラーを抽出することが考えられる。しかし、コンパイラは仕様差の抽出のために設計されているわけではないため、コンパイラを用いて移行対象資産の構文解析を行ってもすべての仕様差を抽出できる保証がない(課題1)。
Here, the difficulty of assessment during platform migration of applications will be explained.
As one means of assessment, it is conceivable to use a compiler to analyze the syntax of assets to be migrated, and to extract system-based syntax errors after migration. However, since compilers are not designed to extract specification differences, there is no guarantee that all specification differences can be extracted by using a compiler to parse the assets to be migrated (problem 1).

仕様差が抽出できない場合として、ある箇所のエラーにより、その後続のコードの判定がうまくいかない場合がある(課題2)。例えば、データ定義エラーにより、そのデータを使う文全体の構文チェックがエラーとなる。その場合、文自体の仕様差がチェックできないことがある。 As a case where the specification difference cannot be extracted, there is a case where an error at a certain location causes failure in judgment of subsequent code (Problem 2). For example, a data definition error will result in an error in syntax checking for the entire statement that uses that data. In that case, it may not be possible to check the specification difference of the sentence itself.

またコンパイラを用いた場合、コンパイル時にわかる仕様しかチェックできない(課題3)。例えば、運用時のパラメータ指定により動作を変えているケースでは、移行前後での動作の違いを正しく判定できない。 Also, if a compiler is used, only specifications that are known at the time of compilation can be checked (problem 3). For example, in a case where operation is changed by specifying parameters during operation, it is not possible to correctly determine the difference in operation before and after migration.

アセスメントの別の手段としては、移行前システムと移行後システムの仕様差を事前に洗い出し、顧客資産に該当する仕様差を抽出するツールを作成することが考えられる。この場合、移行前のシステムと移行後のシステムの組み合わせごとに仕様差を洗い出すこととなり、対象システム数が増えると組み合わせ数が膨大になる(課題4)。 As another means of assessment, it is conceivable to identify in advance the specification differences between the pre-migration system and the post-migration system, and create a tool for extracting the specification differences that correspond to customer assets. In this case, differences in specifications are identified for each combination of systems before migration and systems after migration, and the number of combinations becomes enormous as the number of target systems increases (Problem 4).

そこで第2の実施の形態に係る管理端末100では、既存のチェックツールのように非互換があるプログラム要素に対して警告を表示するのではなく、ソースファイル中のすべてのプログラム要素に対して、その詳細な仕様をコメント文で出力する。すなわち管理端末100は、エラーとなることを示すコメント文を出力するものの、エラー処理による後続の処理のスキップは発生させない。管理端末100が出力する仕様には、ソースファイルの表記からは見て取れない仕様(実行プラットフォーム依存、処理系依存、翻訳パラメータ依存、実行環境情報依存な仕様)も含まれる。 Therefore, in the management terminal 100 according to the second embodiment, instead of displaying a warning for incompatible program elements like the existing check tools, for all program elements in the source file, The detailed specifications are output as comments. That is, the management terminal 100 outputs a comment text indicating that an error will occur, but does not skip subsequent processing due to error handling. The specifications output by the management terminal 100 include specifications that cannot be seen from the notation of the source file (execution platform dependent, processing system dependent, translation parameter dependent, and execution environment information dependent specifications).

このように管理端末100は、「プラットフォームAからプラットフォームBへの移行における仕様定義上での非互換」を検出するのではなく、プログラム実行時の「プラットフォームA上での動作仕様」と「プラットフォームB上での動作仕様」を出力する。プログラム実行時の動作仕様には、ソースファイルに現れない仕様が含まれる。そして管理端末100は、異なるプラットフォームに応じた動作仕様を比較する。これにより、個々のアプリケーションについての多岐にわたる移行パターンを、移行元と移行先の各プラットフォームに対する仕様情報出力を実装するだけでサポートすることができる。すなわち以下の通り、上記の各課題を解決することができる。 In this way, the management terminal 100 does not detect "incompatibility in the specification definition in migration from platform A to platform B", but rather "operation specifications on platform A" and "platform B Operation specification on the above" is output. Operational specifications during program execution include specifications that do not appear in source files. The management terminal 100 then compares operation specifications according to different platforms. As a result, a wide variety of migration patterns for individual applications can be supported simply by implementing specification information output for each platform of the migration source and migration destination. That is, as follows, each of the above problems can be solved.

課題1(仕様差抽出の完全性)については、移行前後のソースコードに関係する動作仕様を機械的に書き出すことで、仕様差の検出漏れが防止される。課題2(エラー伝搬の防止)については、仕様コメントを複数行とすることで、エラー伝搬による情報の損失が防止される。課題3(運用時パラメータの反映)については、資産解析のインプットとして運用環境設定用ファイルを利用することで、運用時のパラメータが比較対象に反映可能となる。課題4(組み合わせパターン増大防止)については、組み合わせごとの仕様差を考慮せず、システムの仕様にのみ着目するため、解析のパターンが削減される。すなわち、プラットフォームの組み合わせごとに解析を行う場合、nシステム(nは2以上の整数)の比較を行うには全部でn2通りの比較が必要となるが、ソフトウェアを実行するシステムごとの動作仕様のコメント文の出力であればn通りだけ考えればよい。 As for problem 1 (completeness of specification difference extraction), omission of specification difference detection is prevented by mechanically writing operation specifications related to source code before and after migration. As for problem 2 (prevention of error propagation), the loss of information due to error propagation can be prevented by using multiple lines for specification comments. As for problem 3 (reflection of parameters during operation), by using the operation environment setting file as an input for asset analysis, the parameters during operation can be reflected in the comparison target. As for problem 4 (prevention of increase in combination patterns), analysis patterns are reduced because the specification difference for each combination is not taken into consideration and only the system specifications are focused. In other words, when analyzing each combination of platforms, a total of n C 2 comparisons are required to compare n systems (n is an integer of 2 or more), but the operation of each system executing software is If it is the output of the comment text of the specification, only n ways should be considered.

図4は、アプリケーションの自動アセスメントのための管理端末の機能を示すブロック図である。管理端末100は、記憶部110、仕様情報出力部120、差分抽出部130、差分レポート出力部140、および修正方法提案部150を有する。 FIG. 4 is a block diagram showing the functions of the management terminal for automatic assessment of applications. The management terminal 100 has a storage unit 110 , a specification information output unit 120 , a difference extraction unit 130 , a difference report output unit 140 and a correction method proposal unit 150 .

記憶部110は、移行対象資産31,32,・・・、仕様定義情報41,42,・・・、および修正ルール51,52,・・・を記憶する。移行対象資産31,32,・・・は、システム200で実行させているアプリケーションのソフトウェア資産である。例えば1つの移行対象資産31は、ソースファイル31aと外付け情報31bとを含む。ソースファイル31aは、高級言語でのプログラム(解析対象プログラム)のソースコードが記述されたファイルである。外付け情報31bは、ソースファイル31aをコンパイルして生成された実行ファイルの実行時に参照される情報である。 The storage unit 110 stores migration target assets 31, 32, . . . , specification definition information 41, 42, . Migration target assets 31 , 32 , . . . are software assets of applications executed by the system 200 . For example, one migration target asset 31 includes a source file 31a and external information 31b. The source file 31a is a file in which the source code of the program (analysis target program) in a high-level language is described. The external information 31b is information that is referenced when an executable file generated by compiling the source file 31a is executed.

仕様定義情報41,42,・・・は、移行対象資産31,32,・・・内のソースファイルにおけるプログラムの記述に使用されたプログラミング言語の仕様が定義された情報である。仕様定義情報41,42,・・・は、コンパイル後のアプリケーションを実行するプラットフォームごとに設けられている。 The specification definition information 41, 42, . The specification definition information 41, 42, . . . are provided for each platform on which the compiled application is executed.

修正ルール51,52,・・・は、移行前と移行後とのアプリケーションの動作の差分を修正するためのルールを示す情報である。
仕様情報出力部120は、移行対象資産31,32,・・・それぞれについて、ソースコードの行ごとの詳細な仕様を示す仕様情報を生成する。例えば仕様情報出力部120は、ソースファイル内に行ごとのコンパイル後の動作の仕様を追記した仕様情報を生成する。
The correction rules 51, 52, .
The specification information output unit 120 generates specification information indicating detailed specifications for each line of the source code for each of the migration target assets 31, 32, . For example, the specification information output unit 120 generates specification information in which the specification of operation after compilation is written for each line in the source file.

差分抽出部130は、2つの仕様情報の差分を抽出する。例えば差分抽出部130は、移行前のシステム200に対応する仕様定義情報41を用いて生成された、移行対象資産の仕様情報と、移行後のシステム300に対応する仕様定義情報42を用いて生成された、同じ移行対象資産の仕様情報との差分を抽出する。 The difference extraction unit 130 extracts the difference between two pieces of specification information. For example, the difference extraction unit 130 uses the specification information of the migration target asset generated using the specification definition information 41 corresponding to the system 200 before migration and the specification definition information 42 corresponding to the system 300 after migration. Extract the difference from the specification information of the same migration target asset.

差分レポート出力部140は、2つの仕様情報間の差分を示す差分レポートを生成し、ファイルまたはモニタ21に出力する。
修正方法提案部150は、修正ルール51,52,・・・に従って、差分の修正方法を提案する提案メッセージを出力する。
The difference report output unit 140 generates a difference report indicating the difference between the two pieces of specification information and outputs it to the file or monitor 21 .
The correction method proposing unit 150 outputs a proposal message proposing a difference correction method according to the correction rules 51, 52, .

以上のような機能により、管理端末100は、アプリケーションを実行するプラットフォーム移行の際のアセスメントを自動で実行することができる。なお図4に示した各要素の機能は、例えば、その要素に対応するプログラムモジュールをコンピュータに実行させることで実現することができる。 With the functions described above, the management terminal 100 can automatically perform an assessment when migrating a platform for executing an application. Note that the function of each element shown in FIG. 4 can be realized, for example, by causing a computer to execute a program module corresponding to the element.

なお仕様情報出力部120による仕様情報の出力機能の一部は、ソースファイルをコンパイルするためのコンパイラの機能を流用することができる。例えばコンパイラは、ソースファイル31aの字句解釈、構文解釈、意味解釈を行い、これらの解釈結果に応じて適切な機械語のコードを生成する。仕様情報出力部120は、コンパイラと同様にソースファイル31aの字句解釈、構文解釈、意味解釈を行う。ただし、仕様情報出力部120は、コンパイラとは異なり機械語のコードは生成せずに、行ごとの解釈結果を示すコメント文を生成する。 Note that part of the specification information output function of the specification information output unit 120 can be diverted from the function of a compiler for compiling source files. For example, the compiler performs lexical interpretation, syntactic interpretation, and semantic interpretation of the source file 31a, and generates appropriate machine language code according to these interpretation results. The specification information output unit 120 performs lexical interpretation, syntactic interpretation, and semantic interpretation of the source file 31a like a compiler. However, unlike a compiler, the specification information output unit 120 does not generate a machine language code, but generates comment statements indicating interpretation results for each line.

仕様定義情報41,42,・・・には、コンパイラにおける字句解釈、構文解釈、意味解釈の仕様が定義されていると共に、解釈した内容を表す内部コードに代えてコメント文が定義される。仕様情報出力部120は、仕様定義情報41,42,・・・に基づいてソースファイル31aの動作仕様を解析し、その解析内容を表すコメント文を仕様定義情報41,42,・・・から取得する。そして仕様情報出力部120は、ソースファイル31aのコピーを生成し、そのコピーにプログラムの行ごとに動作仕様を示すコメント文を追加することで、仕様情報を生成する。 In the specification definition information 41, 42, . . . , specifications of lexical interpretation, syntactic interpretation, and semantic interpretation in the compiler are defined, and comment sentences are defined instead of internal codes representing interpreted contents. The specification information output unit 120 analyzes the operation specification of the source file 31a based on the specification definition information 41, 42, . do. Then, the specification information output unit 120 creates a copy of the source file 31a and adds a comment statement indicating the operation specification for each line of the program to the copy to create specification information.

通常のコンパイラは内部で仕様情報を保持し、それをもとにコード生成を行い、仕様情報を外部に公開しない。コンパイラにとって、仕様情報はオブジェクトコードを出力するためのものであり、それ自身を出力する必要性・意義がない。また、同じ理由で、実行時まで確定しない実行時環境変数などの各種情報は気にかけない。 A normal compiler holds specification information internally, generates code based on it, and does not disclose specification information to the outside. For the compiler, the specification information is for outputting object code, and there is no need or significance to output it itself. Also, for the same reason, we don't care about various information such as runtime environment variables that aren't finalized until runtime.

それに対して、仕様情報出力部120は、仕様情報を形式化して出力するものであり、そのためにコンパイラの仕組みを一部に流用して、文ごとの動作仕様の可視化を行う。これにより、例えばシステム移行に伴う移行前後での非互換性の有無の調査を、精密に、かつ漏れなく行うことができる。すなわち仕様情報出力部120は、コンパイラでは意識されていなかった、実行時の動作をコメント文によって明示する。しかも仕様情報出力部120は、コンパイラでは入力として扱っていなかった、動作設定ファイルなどの外付け情報に依存した実行時動作仕様も出力することができる。 On the other hand, the specification information output unit 120 formalizes specification information and outputs it, and for this purpose, the mechanism of the compiler is partly diverted to visualize the operation specification for each statement. As a result, for example, it is possible to precisely and thoroughly investigate whether or not there is incompatibility before and after system migration. In other words, the specification information output unit 120 uses comment statements to clarify the operation during execution, which the compiler has not been aware of. Moreover, the specification information output unit 120 can also output run-time operation specifications dependent on external information such as operation setting files, which are not handled as inputs by the compiler.

プラットフォーム移行時に自動アセスメントを管理端末100に自動実行させるための入力は、例えば、ソースファイル、実行プラットフォームの種類、処理系の種類(どのベンダが用意した処理系か)、翻訳パラメータ、アプリケーションの実行環境情報である。自動アセスメントの実行結果として得られる出力は、例えばソースファイル内に記述された各プログラム要素(各行のコード)それぞれに対してその詳細仕様を定められた形式で記述した情報である。 Inputs for causing the management terminal 100 to automatically execute automatic assessment at the time of platform migration include, for example, a source file, execution platform type, processing system type (which vendor prepared the processing system), translation parameters, and application execution environment. Information. The output obtained as a result of executing the automatic assessment is, for example, information describing detailed specifications for each program element (each line of code) described in the source file in a predetermined format.

図5は、プラットフォーム移行に伴うアプリケーションのアセスメント処理の一例を示す図である。例えば移行対象資産31に対応するアプリケーションを、システム200からシステム300に移行させるものとする。システム200のプラットフォームに対応する仕様は、仕様定義情報41に示されている。システム300のプラットフォームに対応する仕様は、仕様定義情報42に示されている。 FIG. 5 is a diagram illustrating an example of application assessment processing associated with platform migration. For example, assume that an application corresponding to the migration target assets 31 is migrated from the system 200 to the system 300 . Specifications corresponding to the platform of system 200 are shown in specification definition information 41 . Specifications corresponding to the platform of system 300 are shown in specification definition information 42 .

仕様情報出力部120は、移行対象資産31のソースファイル31aと外付け情報31bと仕様定義情報41とに基づいて、移行対象資産31の仕様情報61を生成する。また仕様情報出力部120は、移行対象資産31のソースファイル31aと外付け情報31bと仕様定義情報42とに基づいて、移行対象資産31の仕様情報62を生成する。仕様情報出力部120は、生成した2つの仕様情報61,62を差分抽出部130に送信する。 The specification information output unit 120 generates the specification information 61 of the migration target asset 31 based on the source file 31 a , the external information 31 b and the specification definition information 41 of the migration target asset 31 . The specification information output unit 120 also generates the specification information 62 of the migration target asset 31 based on the source file 31 a , the external information 31 b and the specification definition information 42 of the migration target asset 31 . The specification information output unit 120 transmits the generated two pieces of specification information 61 and 62 to the difference extraction unit 130 .

差分抽出部130は、diffコマンドなどを用いて、2つの仕様情報61,62間の差分を抽出する。差分抽出部130は、抽出した差分を示す仕様差分情報63を、差分レポート出力部140と修正方法提案部150とに送信する。 The difference extraction unit 130 extracts the difference between the two pieces of specification information 61 and 62 using a diff command or the like. Difference extraction section 130 transmits specification difference information 63 indicating the extracted difference to difference report output section 140 and correction method proposal section 150 .

差分レポート出力部140は、仕様差分情報63に示される差分の内容を説明する差分レポート64を生成し、出力する。また修正方法提案部150は、修正ルール51,52,・・・のいずれかに合致する差分がある場合、該当する修正ルールを用いた差分の修正提案を示す修正方法指示書65を生成する。修正方法提案部150は、生成した修正方法指示書65をファイルまたはモニタ21に出力する。 The difference report output unit 140 generates and outputs a difference report 64 describing the content of the difference indicated by the specification difference information 63 . Further, when there is a difference that matches any one of the correction rules 51, 52, . The correction method proposal unit 150 outputs the generated correction method instruction sheet 65 to the file or the monitor 21 .

以下、図6~図10を参照して、仕様情報出力部120による仕様情報の出力例について説明する。
図6は、仕様情報の第1の生成例を示す図である。図6の例では、ソースファイル中に仕様情報がYAML記法で埋め込まれている。なお仕様情報の記法は、YAMLには限定されない。
An example of specification information output by the specification information output unit 120 will be described below with reference to FIGS. 6 to 10. FIG.
FIG. 6 is a diagram showing a first generation example of specification information. In the example of FIG. 6, the specification information is embedded in the source file in YAML notation. Note that the notation of the specification information is not limited to YAML.

例えば仕様情報出力部120は、ソースファイル31a内の「01 WK PIC S9(4)」(COBOLのデータ定義)の行に対し、図6に示すような記述を追加した仕様情報61を出力する。仕様情報61の「*>」から始まる行は、仕様を示すコメント文である。 For example, the specification information output unit 120 outputs specification information 61 in which a description as shown in FIG. 6 is added to the line "01 WK PIC S9(4)" (COBOL data definition) in the source file 31a. A line beginning with "*>" in the specification information 61 is a comment text indicating the specification.

例えば「type:”record”」は、言語要素の種類がレコードであることを示している。「level:1」は、レベル番号が「1」であることを示している。「name:”WK”」は、名前が「WK」であることを示している。「name-case-sensitivity:”capitalize”」は、名前の大文字小文字の区別に関して、大文字化して比較することが示されている。この名前の大文字小文字の区別に関する仕様は、処理系(コンパイラの種類)に依存し、かつ翻訳パラメータにも依存する情報である。「usage:”display”」は、用途:が「DISPLAY」であることを示している。「format:」、「type:”zoned-decimal”」、「sub-format:”f-tsu”」の3行は、データの形式がゾーン十進(F通社形式)であることを示している。この形式に関する仕様は、処理系依存の情報である。「width:4」は、桁が4桁であることを示している。「unit-length:1」は、桁の幅が1byteであることを示している。この桁の幅は処理系(コンパイラの種類)に依存し、かつ翻訳パラメータにも依存する情報である。「signed:true」は、符号があることを示している。「child-items:null」は、子項目がないことを示している。 For example, "type:"record"" indicates that the type of language element is record. "level: 1" indicates that the level number is "1". “name:“WK”” indicates that the name is “WK”. 'name-case-sensitivity: 'capitalize'' indicates that the name is capitalized and compared with respect to the case sensitivity of the name. The case-sensitivity specification of this name is information that depends on the processing system (type of compiler) and on the translation parameters. "usage:"display"" indicates that the usage: is "DISPLAY". The three lines of "format:", "type: "zoned-decimal"", and "sub-format: "f-tsu"" indicate that the data format is zoned decimal (F-tsusha format). there is Specifications for this format are implementation-dependent information. "width: 4" indicates that there are 4 digits. "unit-length: 1" indicates that the width of the digit is 1 byte. The width of this digit is information that depends on the processing system (type of compiler) and on the translation parameters. "signed: true" indicates that there is a sign. "child-items: null" indicates that there are no child items.

実行プラットフォーム依存、処理系依存、翻訳パラメータ依存、実行環境情報依存の仕様を正確に出力するため、仕様情報出力部120には、これらの情報も、アセスメント処理開始時に入力される。 In order to accurately output execution platform dependent, processing system dependent, translation parameter dependent, and execution environment information dependent specifications, these information are also input to the specification information output unit 120 at the start of assessment processing.

仕様情報出力部120は、ソースファイル中のすべてのプログラム要素に対して仕様情報を出力している。そのため差分抽出部130により複数のプラットフォームに対する仕様情報の比較、修正方法提案部150により内容差分に対する対応案の提示などが可能となる。 The specification information output unit 120 outputs specification information for all program elements in the source file. Therefore, the difference extracting unit 130 can compare specification information for a plurality of platforms, and the correction method proposing unit 150 can present countermeasures against content differences.

図6の例では、ソースファイル31a内の1行についての仕様を示しているが、仕様情報出力部120は、ソースファイル31a内のすべての行について、同様に仕様の記述を出力する。これにより、ソースファイル31a内のすべてのコードについて、漏れなく仕様が書き出される。 Although the example of FIG. 6 shows the specification for one line in the source file 31a, the specification information output unit 120 similarly outputs the specification description for all lines in the source file 31a. As a result, specifications are written without omission for all codes in the source file 31a.

なお、ソースファイル31aが修正された場合、出力される仕様情報にも修正内容が反映される。
図7は、仕様情報の第2の生成例を示す図である。図7には、ソースファイル31a内の「01 WK PIC S9(4)」の行が「01 WK PIC 9(8)」に変更された場合の仕様の例が示されている。この場合、変更後のソースファイル31cに対する仕様情報61aでは、「width:4」が「width:8」に変わっている。また変更後のソースファイル31cに対する仕様情報61aでは、「signed:true」が「signed:false」に変わっている。このように、ソースファイル31a内のコードが書き換えられれば、仕様情報に示される動作仕様も変化する。なお仕様情報61aは、第1の実施の形態に示す変更後仕様情報の一例である。
It should be noted that when the source file 31a is corrected, the content of the correction is also reflected in the output specification information.
FIG. 7 is a diagram showing a second generation example of specification information. FIG. 7 shows an example of specifications when the line "01 WK PIC S9(4)" in the source file 31a is changed to "01 WK PIC 9(8)". In this case, "width: 4" is changed to "width: 8" in the specification information 61a for the changed source file 31c. Also, in the specification information 61a for the changed source file 31c, "signed: true" is changed to "signed: false". Thus, if the code in the source file 31a is rewritten, the operation specifications indicated in the specification information also change. Note that the specification information 61a is an example of post-change specification information shown in the first embodiment.

また、ソースファイル31aが同一であっても、異なる翻訳オプションを適用した場合には、異なる仕様情報が生成される。
図8は、仕様情報の第3の生成例を示す図である。図8には、翻訳オプションとして、「NOALPHAL」を指定していない場合と指定した場合とにおける、ソースファイル31a内の「01 WK PIC S9(4)」の行の仕様の例が示されている。「NOALPHAL」の指定は、ソースファイル31a中の英子文字を大文字化しないことを示している。
Also, even if the source file 31a is the same, different specification information is generated when different translation options are applied.
FIG. 8 is a diagram showing a third generation example of specification information. FIG. 8 shows an example of the specification of the line "01 WK PIC S9(4)" in the source file 31a when "NOALPHAL" is not specified and when "NOALPHAL" is specified as a translation option. . The specification of "NOALPHAL" indicates that alphabetic characters in the source file 31a are not capitalized.

「NOALPHAL」を指定していない場合の仕様情報61には、コメント文「name-case-sensitivity:”capitalize”」が示される。それに対して「NOALPHAL」を指定している場合の仕様情報61bの対応するコメント文は「name-case-sensitivity:”sensitive”」である。 The specification information 61 when "NOALPHAL" is not specified indicates a comment text "name-case-sensitivity:"capitalize"". On the other hand, when "NOALPHAL" is specified, the corresponding comment text of the specification information 61b is "name-case-sensitivity:"sensitive".

このようにソースファイル31a中のコードが同じであっても、指定される翻訳オプションの違いが仕様情報61,61bに動作仕様の違いとしてコメント文で表される。
ソースファイル31aが同一であっても、異なるコンパイラそれぞれに対応する仕様定義情報を適用した場合には、異なる仕様情報が生成される。
In this way, even if the code in the source file 31a is the same, the difference in the specified translation option is expressed in the comment text as the difference in operation specification in the specification information 61 and 61b.
Even if the source file 31a is the same, different specification information is generated when the specification definition information corresponding to each different compiler is applied.

図9は、仕様情報の第4の生成例を示す図である。図9には、異なるコンパイラに対応する仕様定義情報を適用して生成された、ソースファイル31a内の「01 WK PIC S9(4)」の仕様の例を示している。例えば仕様情報61は、F通社のコンパイラに対応する仕様定義情報を適用して生成されている。また仕様情報62は、M社のコンパイラに対応する仕様定義情報を適用して生成されている。 FIG. 9 is a diagram showing a fourth generation example of specification information. FIG. 9 shows an example of the specification of "01 WK PIC S9(4)" in the source file 31a generated by applying specification definition information corresponding to different compilers. For example, the specification information 61 is generated by applying specification definition information corresponding to a compiler manufactured by Ftsu. The specification information 62 is generated by applying the specification definition information corresponding to the M company's compiler.

F通社のコンパイラに対応する仕様定義情報を適用した場合の仕様情報61では、コメント文「sub-format:”f-tsu”」が示されている。それに対してM社のコンパイラに対応する仕様定義情報を適用した場合の仕様情報62における対応するコメント文は「sub-format:”m-focus”」である。 In the specification information 61 when the specification definition information corresponding to the F-Tsu compiler is applied, the comment text "sub-format:"f-tsu"" is shown. On the other hand, the corresponding comment text in the specification information 62 when the specification definition information corresponding to the M company's compiler is applied is "sub-format:"m-focus"".

ソースファイル31aが同一であっても、異なる実行環境設定を適用した場合には、異なる仕様情報が生成される。実行環境設定は、外付け情報31bに含まれる。
図10は、仕様情報の第5の生成例を示す図である。図10には、実行環境の追加設定がない場合と、メッセージ出力先を変更する実行環境設定が指定された場合とにおける、ソースファイル31a内の「DISPLAY “TEXT” UPON SYSERR.」の行の仕様の例が示されている。
Even if the source file 31a is the same, different specification information is generated when different execution environment settings are applied. Execution environment settings are included in the external information 31b.
FIG. 10 is a diagram showing a fifth generation example of specification information. FIG. 10 shows specifications of the line "DISPLAY “TEXT" UPON SYSERR." An example is shown.

実行環境の追加設定がない場合の仕様情報61では、「target-device:」の下に「type:”stdio”」と「kind:”stderr”」と記述されている。他方、メッセージ出力先を変更する実行環境設定31dが指定された場合の仕様情報61cでは、「target-device:」の下に、実行環境設定31dに示されたメッセージ出力先が記述されている。図10の例では、実行環境設定31dにはメッセージ出力先が「type:”file”」、「path:”c:¥punch.txt”」であることが示されている。 In the specification information 61 when there is no additional setting of the execution environment, 'type: 'stdio'' and 'kind: 'stderr'' are described under 'target-device:'. On the other hand, in the specification information 61c when the execution environment setting 31d for changing the message output destination is specified, the message output destination indicated in the execution environment setting 31d is described under "target-device:". In the example of FIG. 10, in the execution environment setting 31d, the message output destination is "type:"file"" and "path:"c:\punch. txt"".

実行環境設定はソースファイル31aには現れず、アプリケーションの実行時に適用される情報である。実行環境の追加設定がない場合の仕様情報61と実行環境設定31dが指定された場合の仕様情報61cとでは、メッセージ出力先の実行時仕様が異なっている。すなわち実行環境設定31dを指定した場合の仕様情報61cを生成することにより、実行環境を想定したアプリケーションの仕様が認識できる。 The execution environment setting does not appear in the source file 31a, but is information that is applied when the application is executed. The runtime specification of the message output destination differs between the specification information 61 when there is no additional setting of the runtime environment and the specification information 61c when the runtime environment setting 31d is specified. That is, by generating the specification information 61c when the execution environment setting 31d is specified, the specification of the application assuming the execution environment can be recognized.

以上のように、アプリケーションを実行するプラットフォームに応じた仕様情報を生成することで、プラットフォーム移行時のアセスメントが容易となる。例えばあるベンダが提供するコンパイラでコンパイルして実行されていた移行対象資産を、別のベンダが提供するコンパイラでコンパイルして実行する場合において、移行前後での動作の違いを容易に比較できる。 As described above, by generating the specification information according to the platform on which the application is executed, the assessment at the time of platform migration becomes easy. For example, when an asset to be migrated that was compiled and executed with a compiler provided by one vendor is compiled and executed with a compiler provided by another vendor, the difference in behavior before and after migration can be easily compared.

図11は、コンパイラを変更する場合のアセスメントの一例を示す図である。移行前のシステム200ではM社から提供されたコンパイラを用いてソースファイル31aをコンパイルしたアプリケーションを実行しているものとする。移行後のシステム300ではF通社から提供されたコンパイラを用いてソースファイル31aをコンパイルしたアプリケーションを実行することを予定しているものとする。この場合、ソースファイル31aについて、M社のコンパイラに対応する仕様定義情報を適用して、仕様情報61dが生成される。またソースファイル31aについて、F通社のコンパイラに対応する仕様定義情報を適用して、仕様情報62aが生成される。図11の例では、ソースファイル31a中の「MOVE WK-X TO WK-N.」に対する仕様についての仕様情報61d,62a間での違いが示されている。 FIG. 11 is a diagram showing an example of assessment when changing the compiler. Assume that the pre-migration system 200 is executing an application in which a compiler provided by M company is used to compile the source file 31a. Assume that the post-migration system 300 is scheduled to execute an application obtained by compiling the source file 31a using a compiler provided by F-Tsu Corporation. In this case, the specification information 61d is generated by applying the specification definition information corresponding to the compiler of M company to the source file 31a. For the source file 31a, the specification information 62a is generated by applying the specification definition information corresponding to the F-Tsu compiler. The example of FIG. 11 shows the difference between the specification information 61d and 62a regarding the specification for "MOVE WK-X TO WK-N." in the source file 31a.

M社のコンパイラでは、英数字項目からNATIONAL項目(各国語文字列型の項目)へ直接転記することができる。そのため仕様情報61dでは「MOVE WK-X TO WK-N.」の仕様として転記処理の内容が記述されている。 Company M's compiler allows direct transfer from an alphanumeric item to a NATIONAL item (a national language string type item). Therefore, in the specification information 61d, the content of the transcription process is described as the specification of "MOVE WK-X TO WK-N."

他方F通社のコンパイラでは、英数字項目からNATIONAL項目へ直接転記することができない。そのため仕様情報62aでは「MOVE WK-X TO WK-N.」の仕様として翻訳エラーになることが記載されている。 On the other hand, Ftsu's compiler does not allow a direct transfer from an alphanumeric item to a NATIONAL item. Therefore, the specification information 62a describes that a translation error occurs as the specification of "MOVE WK-X TO WK-N."

仕様情報61dと仕様情報62aとの違いは、差分抽出部130で抽出される。例えば移行元のプラットフォームに関する仕様情報61dの転記処理内容の記述が、移行先のプラットフォームに関する仕様情報62aで「error-id:”JMN3023I-S”」の翻訳エラーになった場合の修正ルールを予め用意しておくことができる。修正ルールには、例えば解決策「案1.転記元をFUNCTION NATIONAL(WK-X)に書き換える」が設定される。修正方法提案部150は、差分抽出部130が生成した仕様差分情報63と修正ルールとに基づいて、「案1.転記元をFUNCTION NATIONAL(WK-X)に書き換える」との提案メッセージを含む修正方法指示書65を生成する。このようにしてプラットフォームの移行の際に実施するべき修正内容が自動で生成される。 Differences between the specification information 61d and the specification information 62a are extracted by the difference extraction unit 130. FIG. For example, a correction rule is prepared in advance for the case where the description of the transcription processing contents of the specification information 61d regarding the platform of the migration source becomes a translation error of "error-id: 'JMN3023I-S'" in the specification information 62a regarding the platform of the migration destination. can be kept. For the correction rule, for example, a solution "Proposal 1. Rewrite the transcription source to FUNCTION NATIONAL (WK-X)" is set. Based on the specification difference information 63 generated by the difference extracting unit 130 and the correction rule, the correction method proposing unit 150 makes a correction including a proposal message "Proposal 1. Rewrite the transcription source to FUNCTION NATIONAL (WK-X)." Generate method instructions 65 . In this way, the correction contents to be implemented at the time of platform migration are automatically generated.

なおソースファイル31aに記載されたプログラムには、IF文などによる制御構造が含まれる。仕様情報出力部120は、ソースファイル31a内の制御構造についても、1行ずつ仕様を解析して、その仕様をコメントとして仕様情報61に記載する。 The program written in the source file 31a includes a control structure such as an IF statement. The specification information output unit 120 also analyzes the specification of the control structure in the source file 31a line by line, and writes the specification in the specification information 61 as a comment.

図12は、制御構造の部分の仕様の出力例を示す図である。図12に示すようにIF文のような条件分岐があっても、すべての分岐先について1行ずつ仕様が解析され、仕様の記述が仕様情報61に出力される。なお、図12に示す主要な項目の意味は次の通りである。「type」は文・節のタイプを示す。「spec」は仕様の分類を示す。「condition」は詳細を示す。「operands」は式の要素を示す。「name」は名前を示す。「class」はデータ型を示す。「width」はデータ長を示す。「format」はデータ形式を示す。「value」はデータの値を示す。「target」は動作の対象を示す。 FIG. 12 is a diagram showing an output example of the specification of the part of the control structure. As shown in FIG. 12, even if there is a conditional branch such as an IF statement, the specifications for all branch destinations are analyzed line by line, and the specification description is output to the specification information 61 . The meanings of the main items shown in FIG. 12 are as follows. "type" indicates the type of sentence/clause. "spec" indicates the classification of specifications. "condition" indicates details. "operands" indicate elements of an expression. "name" indicates a name. "class" indicates a data type. "width" indicates the data length. "format" indicates the data format. "value" indicates the value of data. "target" indicates the target of the operation.

図12に示した例では、ソースファイル31a内にサブルーチンの呼び出し命令「CALL ”CBLABN” USING ABN-CODE」が含まれている。このようなサブルーチンを呼び出すプログラムでは、呼び出し先のサブルーチンをユーザが作成する場合と、製品で提供されている場合がある。移行前のプラットフォームでは製品で提供されていたサブルーチンを使用している顧客資産について、移行後のプラットフォームでは、該当サブルーチンをユーザが作成する場合がある。 In the example shown in FIG. 12, the source file 31a includes a subroutine call instruction "CALL "CBLABN" USING ABN-CODE". In programs that call such subroutines, the subroutine to be called may be created by the user or may be provided by the product. For customer assets that use subroutines that were provided in products on the pre-migration platform, users may create such subroutines on the post-migration platform.

このような場合において、コンパイラを用いて顧客資産の構文解析を行っても、コンパイラは「このサブルーチンはユーザが定義している」と判定するのみであり、非互換の箇所の存在を検出できない。また移行前システムと移行後システムの仕様差を事前に洗い出す方法では、移行前後のサブルーチンサポート状況の比較を行うこととなり、システム組み合わせが増加すると組み合わせの管理が困難となる。 In such a case, even if the compiler is used to parse the client assets, the compiler only determines that "this subroutine is defined by the user" and cannot detect the existence of incompatible parts. In addition, the method of identifying differences in specifications between the pre-migration system and the post-migration system in advance involves comparing the subroutine support status before and after the migration, making it difficult to manage combinations as the number of system combinations increases.

それに対して、仕様情報出力部120は、行ごとの構文解析で把握できる仕様をコメント文として漏れなく追加する。これにより、サブルーチンの呼び出し先の仕様の違いも抽出可能である。 On the other hand, the specification information output unit 120 adds all specifications that can be grasped by syntactic analysis for each line as comment sentences. This makes it possible to extract differences in the specifications of subroutine call destinations.

図13は、サブルーチンの呼び出し先の仕様差抽出の一例を示す図である。なお、図13では、仕様情報出力部120が追加するコメント文のうち着目対象の行のみを示し、その他のコメント文を省略している。 FIG. 13 is a diagram showing an example of extraction of specification differences between subroutine call destinations. Note that FIG. 13 shows only the line of interest among the comment texts added by the specification information output unit 120, and omits other comment texts.

移行前のプラットフォームに応じた仕様情報61では「kind:“service-routine“」と記載されていたコメントが、移行後のプラットフォームに応じた仕様情報62では「kind:“user-routine“」との記載に変化している。仕様情報61と仕様情報62との差分を抽出すれば、サブルーチンの呼び出し先の仕様差の抽出が可能となる。 The comment described as "kind: 'service-routine'" in the specification information 61 according to the platform before migration is changed to "kind: 'user-routine'" in the specification information 62 according to the platform after migration. description has changed. By extracting the difference between the specification information 61 and the specification information 62, it becomes possible to extract the specification difference of the call destination of the subroutine.

また仕様情報出力部120は、仕様定義情報に基づく仕様の抽出を1行ごとに行う場合、コンパイルであればエラーとなるような箇所があっても、それ以降の行についても仕様の抽出を続行する。これにより、エラー伝搬による動作変更箇所の抽出漏れが抑止される。 Further, when the specifications are extracted line by line based on the specification definition information, the specification information output unit 120 continues extracting the specifications for the subsequent lines even if there is an error in the compilation. do. As a result, it is possible to prevent an operation change portion from being omitted from being extracted due to error propagation.

図14は、エラー伝搬を抑止した仕様差抽出の一例を示す図である。図14の例では、ソースファイル31a内のCALL文に未定義の定数が含まれている。コンパイラによる構文解析を行うと、未定義定数があることによりCALL文全体の評価が中断される可能性がある。それに対して、仕様情報出力部120は、未定義の定数があってもそれ以降の仕様の抽出を停止しない。そのためCALL文に未定義の定数が含まれていても、仕様情報61,62にはサブルーチンの呼び出し先の仕様差が正しく表される。また仕様情報61,62には、未定義の定数であることを示すコメントが記述される。 FIG. 14 is a diagram illustrating an example of specification difference extraction in which error propagation is suppressed. In the example of FIG. 14, the CALL statement in the source file 31a contains an undefined constant. When parsed by the compiler, evaluation of the entire CALL statement may be interrupted by an undefined constant. On the other hand, the specification information output unit 120 does not stop extraction of subsequent specifications even if there is an undefined constant. Therefore, even if an undefined constant is included in the CALL statement, the specification information 61 and 62 correctly represents the specification difference between the subroutine call destinations. The specification information 61 and 62 also include a comment indicating an undefined constant.

また仕様情報出力部120は、外付け情報31bを参照して仕様情報を生成するため、コンパイル時には分からず、運用時に判明する仕様差について抽出することが可能である。例えば仕様情報出力部120は、運用時のパラメータ設定に応じて動作が変わる場合において、外付け情報31bに含まれる動作設定ファイルを参照して仕様差を正しく抽出する。 Further, since the specification information output unit 120 generates specification information by referring to the external information 31b, it is possible to extract specification differences that are not known at the time of compiling but are found at the time of operation. For example, the specification information output unit 120 refers to the operation setting file included in the external information 31b and correctly extracts the specification difference when the operation changes according to the parameter settings during operation.

図15は、運用時パラメータを参照することによる仕様差抽出の一例を示す図である。図15の例では、ソースファイル31a内に「DISPLAY “TEXT” UPON SYSPUNCH」という行が含まれている。「DISPLAY SYSPUNCH」は、初期設定では標準出力(stdout)に文字を出力する命令である。 FIG. 15 is a diagram illustrating an example of specification difference extraction by referring to operating parameters. In the example of FIG. 15, the line "DISPLAY "TEXT" UPON SYSPUNCH" is included in the source file 31a. "DISPLAY SYSPUNCH" is an instruction to output characters to the standard output (stdout) in the initial setting.

移行元のシステムでは、外付け情報31bにA社仕様の動作設定ファイル31eが含まれていたものとする。動作設定ファイル31eには、特定のA社仕様として出力先を指定する情報「CBL_SYSPUNCH=stderr」が含まれている。この場合、移行元のシステムに応じた仕様情報61eでは、出力先が「stderr」であることを示すコメント文が含まれる。 It is assumed that in the migration source system, the external information 31b includes an operation setting file 31e of Company A's specifications. The operation setting file 31e includes information "CBL_SYSPUNCH=stderr" specifying an output destination as a specific specification of A company. In this case, the specification information 61e corresponding to the source system includes a comment indicating that the output destination is "stderr".

それに対して、移行先のシステムでは、動作設定ファイルによる出力先の指定がされていない。その場合、移行先のシステムに応じた仕様情報62では、出力先が初期設定のままの「stdout」であることを示すコメント文が含まれる。 On the other hand, in the migration destination system, the output destination is not specified by the operation setting file. In this case, the specification information 62 corresponding to the migration destination system includes a comment text indicating that the output destination is the default "stdout".

このように仕様情報出力部120は、仕様の出力結果に外付け情報の設定を反映させ、システム独自仕様を取り込んだ仕様コメントを出力することができる。これにより、コンパイラでは検出できない仕様差を検出可能となる。 In this manner, the specification information output unit 120 can reflect the setting of the external information in the output result of the specification, and can output the specification comment incorporating the unique system specification. This makes it possible to detect specification differences that cannot be detected by the compiler.

なお外付け情報には、システムを運用する会社ごとに異なる情報が設定される。移行前後のシステムの仕様を比較する場合、移行可能なシステムのすべての組み合わせについて比較することとなり、処理量が膨大となる。それに対して、移行されるソフトウェアに着目して、そのソフトウェアに適用する外付け情報を参照して使用情報を生成することで、処理量が少なくて済む。 Different information is set in the external information for each company that operates the system. When comparing system specifications before and after migration, all combinations of systems that can be migrated must be compared, resulting in a huge amount of processing. On the other hand, by focusing on the software to be migrated and referring to the external information applied to the software to generate usage information, the amount of processing can be reduced.

図16は、システムごとに異なる動作設定ファイルが存在する場合の仕様差抽出の一例を示す図である。例えばA社のシステム用には動作設定ファイル31eがあり、B社のシステム用には動作設定ファイル31fがあるものとする。ここでソースファイル31aに基づくアプリケーションを、A社のシステムとB社のシステムとのそれぞれから、動作設定ファイルを用いないシステムに移行させるものとする。この場合、動作設定ファイル31eを適用した仕様情報61e、動作設定ファイル31fを適用した仕様情報61f、および初期設定値を適用した仕様情報62が生成される。 FIG. 16 is a diagram showing an example of specification difference extraction when different operation setting files exist for each system. For example, it is assumed that there is an operation setting file 31e for A company's system and an operation setting file 31f for B company's system. Assume that an application based on the source file 31a is transferred from the system of Company A and the system of Company B to a system that does not use an operation setting file. In this case, specification information 61e to which the operation setting file 31e is applied, specification information 61f to which the operation setting file 31f is applied, and specification information 62 to which the initial setting values are applied are generated.

ソースファイル31aに基づくアプリケーションのシステム移行の際には、移行前の仕様情報61e,61fそれぞれと移行後の仕様情報62とのコメント文を比較するだけで差分抽出が可能となる。なお移行前システムと移行後システムの仕様差を事前に洗い出すツールを作成しようとすると、n個のシステムに対応する場合、全部でn2通りのツールを作成することとなる。それに対して、ソースファイル31aに対してシステムごとの仕様情報を作成するのであれば、n個の仕様情報を作成するだけで済む。 At the time of system migration of an application based on the source file 31a, it is possible to extract a difference simply by comparing the comment texts of the specification information 61e and 61f before migration and the specification information 62 after migration. If you try to create a tool for identifying differences in specifications between the pre-migration system and the post-migration system in advance, you will have to create a total of n C 2 tools for n systems. On the other hand, if specification information for each system is to be created for the source file 31a, only n pieces of specification information need to be created.

次に、アプリケーションのプラットフォーム移行時の仕様情報生成処理について詳細に説明する。
図17は、仕様情報生成処理の手順の一例を示すフローチャートである。以下、図17に示す処理をステップ番号に沿って説明する。
Next, the specification information generation processing at the time of platform migration of the application will be described in detail.
FIG. 17 is a flowchart illustrating an example of the procedure of specification information generation processing. The processing shown in FIG. 17 will be described below along with the step numbers.

[ステップS101]仕様情報出力部120は、移行対象資産一覧を取得する。例えば仕様情報出力部120は、ユーザから、移行元のシステムに実装されているソフトウェア資産のうちの、移行先のシステムに移行させるソフトウェア資産を示す移行対象資産一覧の入力を受け付ける。 [Step S101] The specification information output unit 120 acquires a list of migration target assets. For example, the specification information output unit 120 receives an input from the user of a list of assets to be migrated indicating software assets to be migrated to the destination system among the software assets installed in the migration source system.

[ステップS102]仕様情報出力部120は、稼働システムを示す稼働システム情報を取得する。例えば仕様情報出力部120は、稼働システム情報として、ユーザから、移行前のシステムの識別情報と移行後のシステムの識別情報との組の入力を受け付ける。 [Step S102] The specification information output unit 120 acquires operating system information indicating an operating system. For example, the specification information output unit 120 receives, from the user, a set of identification information of the pre-migration system and identification information of the post-migration system as operating system information.

[ステップS103]仕様情報出力部120は、稼働システム情報に示されるシステムに応じた仕様定義を記憶部110から読み込む。
[ステップS104]仕様情報出力部120は、取得した移行対象資産一覧に示される移行対象資産に含まれるすべての外付け情報資産についてステップS105の処理が完了するまで、ステップS105の処理をループする。
[Step S103] The specification information output unit 120 reads from the storage unit 110 the specification definition corresponding to the system indicated in the operating system information.
[Step S104] The specification information output unit 120 loops the processing of step S105 until the processing of step S105 is completed for all the external information assets included in the migration target assets shown in the acquired migration target asset list.

[ステップS105]仕様情報出力部120は、外付け情報の解析処理を行う。この処理の詳細は後述する(図18参照)。
[ステップS106]仕様情報出力部120は、すべての外付け情報資産についてステップS105の処理が完了したら、処理をステップS107に進める。
[Step S105] The specification information output unit 120 analyzes the external information. The details of this process will be described later (see FIG. 18).
[Step S106] When the process of step S105 is completed for all external information assets, the specification information output unit 120 advances the process to step S107.

[ステップS107]仕様情報出力部120は、取得した移行対象資産一覧に示される移行対象資産に含まれるすべてのソースファイルについてステップS108の処理が完了するまで、ステップS108の処理をループする。 [Step S107] The specification information output unit 120 loops the process of step S108 until the process of step S108 is completed for all the source files included in the migration target assets shown in the acquired migration target asset list.

[ステップS108]仕様情報出力部120は、ソースファイル解析処理を行う。この処理の詳細は後述する(図25参照)。
[ステップS109]仕様情報出力部120は、すべてのソースファイルについてステップS108の処理が完了したら仕様情報生成処理を終了する。
[Step S108] The specification information output unit 120 performs source file analysis processing. The details of this process will be described later (see FIG. 25).
[Step S109] The specification information output unit 120 ends the specification information generation process when the process of step S108 is completed for all source files.

図18は、外付け情報解析処理の手順の一例を示すフローチャートである。以下、図18に示す処理をステップ番号に沿って説明する。
[ステップS121]仕様情報出力部120は、外付け情報の種別を分析する。仕様情報出力部120は、外付け情報が環境変数一覧であれば処理をステップS122に進める。また仕様情報出力部120は、外付け情報が実行時オプションファイルであれば処理をステップS126に進める。さらに仕様情報出力部120は、外付け情報が動作設定ファイルであれば処理をステップS129に進める。
FIG. 18 is a flowchart showing an example of the procedure of external information analysis processing. The processing shown in FIG. 18 will be described below along with the step numbers.
[Step S121] The specification information output unit 120 analyzes the type of external information. If the external information is the environment variable list, specification information output unit 120 advances the process to step S122. If the external information is a runtime option file, specification information output unit 120 advances the process to step S126. Further, if the external information is an operation setting file, specification information output unit 120 advances the process to step S129.

[ステップS122]仕様情報出力部120は、環境変数一覧に示されるすべての変数定義についてステップS123~S124の処理が完了するまで、ステップS123~S124の処理をループする。 [Step S122] The specification information output unit 120 loops the processing of steps S123 to S124 until the processing of steps S123 to S124 is completed for all variable definitions shown in the environment variable list.

[ステップS123]仕様情報出力部120は、システムごとの仕様定義情報に示されるシステム利用環境変数一覧テーブル内に、環境変数一覧に含まれる変数定義の変数名があるか否かを調査する。システム利用環境変数一覧テーブルは、アプリケーションを実行するシステムで提供される変数の一覧である。 [Step S123] The specification information output unit 120 checks whether or not there is a variable name of a variable definition included in the environment variable list in the system usage environment variable list table indicated in the specification definition information for each system. The system usage environment variable list table is a list of variables provided by the system that executes the application.

図19は、システム利用環境変数一覧テーブルの一例を示す図である。システム利用環境変数一覧テーブル71には、例えばシステム利用環境変数を示す項目名「Key」に対応付けて、システム利用環境変数の変数名が設定されている。 FIG. 19 is a diagram showing an example of a system usage environment variable list table. In the system use environment variable list table 71, for example, the variable name of the system use environment variable is set in association with the item name "Key" indicating the system use environment variable.

以下、図18の説明に戻る。
[ステップS124]仕様情報出力部120は、環境変数一覧に含まれる各変数の変数名に対応するレコードを環境変数一覧テーブルに格納する。環境変数一覧テーブルには、システム利用環境変数一覧テーブルに含まれる変数か否かの調査結果が含まれる。
Hereinafter, the explanation will be returned to FIG. 18 .
[Step S124] The specification information output unit 120 stores a record corresponding to the variable name of each variable included in the environment variable list in the environment variable list table. The environment variable list table contains the result of investigation as to whether or not the variable is included in the system use environment variable list table.

図20は、環境変数一覧テーブルの一例を示す図である。環境変数一覧テーブル72には、「Key」、「Value」、「システムフラグ」の欄が設けられている。「Key」の欄には、変数名が設定される。「Value」の欄には、変数の値が設定される。「システムフラグ」の欄には、システム利用環境変数一覧テーブルに含まれる変数か否かを示すシステムフラグが設定される。例えばシステム利用環境変数一覧テーブルに含まれる変数であればシステムフラグ「1」が設定され、システム利用環境変数一覧テーブルに含まれない変数であればシステムフラグ「0」が設定される。 FIG. 20 is a diagram showing an example of an environment variable list table. The environment variable list table 72 has columns of "Key", "Value", and "System Flag". A variable name is set in the “Key” column. The value of the variable is set in the "Value" column. A system flag indicating whether or not the variable is included in the system use environment variable list table is set in the "system flag" column. For example, if the variable is included in the system use environment variable list table, the system flag is set to "1", and if the variable is not included in the system use environment variable list table, the system flag is set to "0".

以下、図18の説明に戻る。
[ステップS125]仕様情報出力部120は、すべての変数定義について処理が完了したら外付け情報解析処理を終了する。
Hereinafter, the explanation will be returned to FIG. 18 .
[Step S125] The specification information output unit 120 ends the external information analysis process when the process for all variable definitions is completed.

[ステップS126]仕様情報出力部120は、実行時オプションファイルに示されるすべての実行時オプションについてステップS127の処理が完了するまでステップS127の処理をループする。 [Step S126] The specification information output unit 120 loops the processing of step S127 until the processing of step S127 is completed for all runtime options indicated in the runtime option file.

[ステップS127]仕様情報出力部120は、実行時オプションテーブルに、実行時オプションに対応するデータを格納する。
図21は、実行時オプションテーブルの一例を示す図である。実行時オプションテーブル73には、「Key」と「Value」の欄が設けられている。「Key」の欄には、実行時オプションとして使用される実行環境変数の変数名が設定される。「Value」の欄には、実行環境変数が設定されたファイルの識別情報(ファイルの場所、ファイル名など)が設定される。
[Step S127] The specification information output unit 120 stores data corresponding to the runtime option in the runtime option table.
FIG. 21 is a diagram showing an example of the runtime option table. The runtime option table 73 has columns of "Key" and "Value". In the "Key" column, variable names of execution environment variables used as runtime options are set. In the "Value" column, identification information (file location, file name, etc.) of the file in which the execution environment variable is set is set.

以下、図18の説明に戻る。
[ステップS128]仕様情報出力部120は、すべての実行時オプションについて処理が完了したら外付け情報解析処理を終了する。
Hereinafter, the explanation will be returned to FIG. 18 .
[Step S128] The specification information output unit 120 terminates the external information analysis processing when the processing for all runtime options is completed.

[ステップS129]仕様情報出力部120は、動作設定ファイルに示されるすべての動作設定についてステップS130の処理が完了するまで、ステップS130の処理をループする。 [Step S129] The specification information output unit 120 loops the processing of step S130 until the processing of step S130 is completed for all the operation settings indicated in the operation setting file.

[ステップS130]仕様情報出力部120は、機能ごとの動作設定テーブルにデータを格納する。
図22は、動作設定テーブルの一例を示す図である。動作設定テーブル74には、「Key」と「Value」との欄が設けられている。「Key」の欄には、機能の名称が設定される。「Value」の欄には、機能を指定する値が設定される。
[Step S130] The specification information output unit 120 stores data in the operation setting table for each function.
FIG. 22 is a diagram showing an example of an operation setting table. The operation setting table 74 has columns of "Key" and "Value". The name of the function is set in the "Key" column. A value specifying a function is set in the "Value" column.

以下、図18の説明に戻る。
[ステップS131]仕様情報出力部120は、すべての動作設定について処理が完了したら外付け情報解析処理を終了する。
Hereinafter, the explanation will be returned to FIG. 18 .
[Step S131] The specification information output unit 120 ends the external information analysis process when the process for all operation settings is completed.

このようにして外付け情報が解析される。外付け情報解析処理は、ユーザが任意に設定した外付け情報に限らず、システム固有の外付け情報についても実施される。
図23は、環境変数一覧から環境変数一覧テーブルへのデータ登録処理の一例を示す図である。仕様情報出力部120は、実行時の環境変数を、システムの環境変数・ユーザ環境変数のほか、実行環境変数を定義した実行環境変数定義ファイル81から読み込む。実行環境変数定義ファイル81には環境変数一覧が含まれる。環境変数一覧には、「key=value」の形式で環境変数が定義されている。仕様情報出力部120は、実行環境変数定義ファイル81内の環境変数の定義式それぞれに対応するレコードを環境変数一覧テーブル72に追加する。仕様情報出力部120は、環境変数の定義式の左辺の値を、追加したレコードの「Key」の欄に設定する。さらに仕様情報出力部120は、環境変数の定義式の右辺の値を、追加したレコードの「Value」の欄に設定する。実行環境変数定義ファイル81に定義された環境変数はシステム利用環境変数ではないため、該当レコードのシステムフラグの欄には「0」が設定される。
External information is analyzed in this manner. The external information analysis process is performed not only for the external information arbitrarily set by the user, but also for system-specific external information.
FIG. 23 is a diagram showing an example of data registration processing from the environment variable list to the environment variable list table. The specification information output unit 120 reads the runtime environment variables from the execution environment variable definition file 81 that defines the execution environment variables in addition to the system environment variables and user environment variables. The execution environment variable definition file 81 contains a list of environment variables. Environment variables are defined in the environment variable list in the form of "key=value". The specification information output unit 120 adds to the environment variable list table 72 a record corresponding to each environment variable definition expression in the execution environment variable definition file 81 . The specification information output unit 120 sets the value of the left side of the definitional expression of the environment variable in the "Key" column of the added record. Further, the specification information output unit 120 sets the value of the right side of the definitional expression of the environment variable in the "Value" column of the added record. Since the environment variables defined in the execution environment variable definition file 81 are not system use environment variables, "0" is set in the system flag column of the corresponding record.

図24は、動作設定ファイルから動作設定テーブルへのデータ登録処理の一例を示す図である。移行対象資産全体の動作を環境変数で指定するケースのほかに、特定の機能の動作を設定する外付け情報を利用することがある。その場合、外付け情報として例えば動作設定ファイル82が用いられる。 FIG. 24 is a diagram showing an example of data registration processing from the operation setting file to the operation setting table. In addition to specifying the operation of the entire migration target asset using environment variables, external information that sets the operation of a specific function may be used. In that case, for example, the operation setting file 82 is used as the external information.

図24に示す動作設定ファイル82は、GUI(Graphical User Interface)画面を作成する機能において、画面表示の動作設定を行うファイルである。動作設定ファイル82には「key value」の形式で、画面表示の動作設定が定義されている。なお、”*”から始まる文字列はコメント文である。動作設定ファイル82に示されている動作設定より、GUIウィンドウのタイトル、使用するフォント名、使用するフォントのサイズ、GUIウィンドウの表示位置などが定義されている。 The operation setting file 82 shown in FIG. 24 is a file for setting screen display operations in the function of creating a GUI (Graphical User Interface) screen. In the operation setting file 82, screen display operation settings are defined in the form of "key value". A character string beginning with "*" is a comment text. The operation settings shown in the operation setting file 82 define the title of the GUI window, the name of the font to be used, the size of the font to be used, the display position of the GUI window, and the like.

仕様情報出力部120は、動作設定ファイル82内の動作設定それぞれに対応するレコードを動作設定テーブル74に追加する。仕様情報出力部120は、動作設定の左側の値を追加したレコードの「Key」の欄に設定する。さらに仕様情報出力部120は、動作設定の右側の値を追加したレコードの「Value」の欄に設定する。 The specification information output unit 120 adds records corresponding to each operation setting in the operation setting file 82 to the operation setting table 74 . The specification information output unit 120 sets the value on the left side of the operation setting in the "Key" column of the added record. Further, the specification information output unit 120 sets the value on the right side of the operation setting in the "Value" column of the added record.

外付け情報解析によって環境変数一覧テーブル72、実行時オプションテーブル73、および動作設定テーブル74を参照して、ソースファイルの解析を行うことで、アプリケーションの実行時の状況に応じた動作仕様を抽出することができる。 By analyzing the external information, referring to the environment variable list table 72, the runtime option table 73, and the operation setting table 74, the source file is analyzed to extract operation specifications according to the application execution status. be able to.

次にソースファイル解析処理について詳細に説明する。
図25は、ソースファイル解析処理の手順の一例を示すフローチャートである。以下、図25に示す処理をステップ番号に沿って説明する。
Next, the source file analysis processing will be explained in detail.
FIG. 25 is a flowchart illustrating an example of the procedure of source file analysis processing. The processing shown in FIG. 25 will be described below along with the step numbers.

[ステップS141]仕様情報出力部120は、以降の解析に用いる外付け情報をコメント文として仕様情報に出力する。
[ステップS142]仕様情報出力部120は、ソースファイル内のすべての行および字句についてステップS143~S151の処理が完了するまで、ステップS143~S151の処理をループする。
[Step S141] The specification information output unit 120 outputs the external information used in the subsequent analysis as a comment text to the specification information.
[Step S142] The specification information output unit 120 loops the processing of steps S143 to S151 until the processing of steps S143 to S151 is completed for all lines and tokens in the source file.

[ステップS143]仕様情報出力部120は、処理対象の行または字句の種別を分析する。仕様情報出力部120は、行または字句が変数定義であれば処理をステップS144に進める。また仕様情報出力部120は、行または字句が処理命令であれば処理をステップS147に進める。さらに仕様情報出力部120は、行または字句が命令引数であれば処理をステップS149に進める。 [Step S143] The specification information output unit 120 analyzes the type of line or token to be processed. Specification information output unit 120 advances the process to step S144 if the line or token is a variable definition. If the line or token is a processing instruction, specification information output unit 120 advances the process to step S147. Furthermore, specification information output unit 120 advances the process to step S149 if the line or token is an instruction argument.

[ステップS144]仕様情報出力部120は、外付け情報解析の結果を参照し、移行元または移行先のシステムに対応する変数定義情報に基づいて変数定義情報を解析する。
[ステップS145]仕様情報出力部120は、変数一覧テーブルに解析結果を格納する。
[Step S144] The specification information output unit 120 refers to the result of the external information analysis, and analyzes the variable definition information based on the variable definition information corresponding to the migration source or migration destination system.
[Step S145] The specification information output unit 120 stores the analysis result in the variable list table.

図26は、変数一覧テーブルの一例を示す図である。変数一覧テーブル75には、「Name」、「Class」、「width」、「format」の欄が設けられている。「Name」の欄には、変数名が設定される。「Class」の欄には、変数の型(文字列型:string、数値型:numericなど)が設定される。「width」の欄には、変数のデータ長が設定される。「format」の欄には、データ形式(日本語:Jpn、パック10進数:packed-decimalなど)が設定される。 FIG. 26 is a diagram showing an example of a variable list table. The variable list table 75 has columns of "Name", "Class", "width", and "format". A variable name is set in the “Name” column. The “Class” column contains variable types (character string type: string, numerical value type: numeric, etc.). The data length of the variable is set in the "width" column. A data format (Japanese: Jpn, packed decimal: packed-decimal, etc.) is set in the “format” column.

以下、図25の説明に戻る。
[ステップS146]仕様情報出力部120は、変数仕様をコメント文として仕様情報に出力する。その後、仕様情報出力部120は処理をステップS152に進める。
Hereinafter, the explanation will be returned to FIG.
[Step S146] The specification information output unit 120 outputs the variable specification as a comment text to the specification information. Thereafter, specification information output unit 120 advances the process to step S152.

[ステップS147]仕様情報出力部120は、外付け情報解析の結果を参照し、移行元または移行先のシステムに対応する変数定義情報に基づいて命令種別を解析する。
[ステップS148]仕様情報出力部120は、命令種別ごとおよびシステムごとの命令仕様をコメント文として仕様情報に出力する。その後、仕様情報出力部120は処理をステップS152に進める。
[Step S147] The specification information output unit 120 refers to the result of the external information analysis, and analyzes the instruction type based on the variable definition information corresponding to the migration source or migration destination system.
[Step S148] The specification information output unit 120 outputs the instruction specification for each instruction type and for each system as a comment to the specification information. Thereafter, specification information output unit 120 advances the process to step S152.

[ステップS149]仕様情報出力部120は、外付け情報解析の結果を参照し、移行元または移行先のシステムに対応する変数定義情報に基づいて引数種別を解析する。
[ステップS150]仕様情報出力部120は、変数一覧テーブル75を参照し、引数情報を取得する。
[Step S149] The specification information output unit 120 refers to the result of the external information analysis, and analyzes the argument type based on the variable definition information corresponding to the migration source or migration destination system.
[Step S150] The specification information output unit 120 refers to the variable list table 75 and acquires argument information.

[ステップS151]仕様情報出力部120は、引数仕様をコメント文として仕様情報に出力する。
[ステップS152]仕様情報出力部120は、すべての行および字句についてステップS143~S151の処理が完了したらソースファイル解析処理を終了する。
[Step S151] The specification information output unit 120 outputs the argument specification as a comment text to the specification information.
[Step S152] When the processing of steps S143 to S151 is completed for all lines and tokens, the specification information output unit 120 ends the source file analysis processing.

仕様情報出力部120により移行前と移行後とのそれぞれの仕様情報が生成される。それらの仕様情報を差分抽出部130が比較することで、仕様差が明確となる。仕様差は、例えば差分レポート出力部140によって、ユーザが理解しやすい形式の差分レポートとして出力される。 The specification information output unit 120 generates specification information before migration and after migration. The difference in specification is clarified by comparing the specification information by the difference extraction unit 130 . The specification difference is output as a difference report in a format that is easy for the user to understand, for example, by the difference report output unit 140 .

図27は、差分レポートの出力例を示す図である。ソースファイル31aに基づいて生成された移行前後の仕様情報61,62の差分を抽出した仕様差分情報63に基づいて、差分レポート64が生成される。差分レポート64には、移行前システムと移行後システムの情報(OSの種別、処理系の種別など)が記載されている。また差分レポート64には、移行対象資産の資産名に対応付けて、動作に差分が生じた行の行番号、指摘番号、指摘内容などが記載されている。指摘番号は、生じた差分の種別を示す番号である。 FIG. 27 is a diagram illustrating an output example of a difference report. A difference report 64 is generated based on the specification difference information 63 obtained by extracting the difference between the specification information 61 and 62 before and after migration generated based on the source file 31a. The difference report 64 includes information on the pre-migration system and the post-migration system (type of OS, type of processing system, etc.). In addition, the difference report 64 describes the line number of the line in which the operation has a difference, the indication number, the content of the indication, etc., in association with the asset name of the migration target asset. The indication number is a number indicating the type of difference that has occurred.

差分レポート出力部140は、例えば差分レポート64をモニタ21に表示させる。これによりユーザは、移行対象資産を実行させるプラットフォームを移行させる場合に生じる動作の変更内容を正確に把握することができる。 The difference report output unit 140 displays the difference report 64 on the monitor 21, for example. As a result, the user can accurately grasp the change in operation that occurs when the platform on which the asset to be migrated is executed is migrated.

〔その他の実施の形態〕
第2の実施の形態ではCOBOLで記述されたソフトウェア資産を移行させる場合の例を用いているが、第2の実施の形態に示したアセスメント処理は、COBOLに限らず、他の言語で記述されたソフトウェア資産の移行にも同様に適用できる。
[Other embodiments]
In the second embodiment, an example of migrating software assets written in COBOL is used. It can be similarly applied to migration of software assets.

以上、実施の形態を例示したが、実施の形態で示した各部の構成は同様の機能を有する他のものに置換することができる。また、他の任意の構成物や工程が付加されてもよい。さらに、前述した実施の形態のうちの任意の2以上の構成(特徴)を組み合わせたものであってもよい。 Although the embodiment has been exemplified above, the configuration of each part shown in the embodiment can be replaced with another one having the same function. Also, any other components or steps may be added. Furthermore, any two or more configurations (features) of the above-described embodiments may be combined.

1 ソフトウェア資産
1a ソースファイル
1b 外付け情報
2 第1仕様定義情報
3 第2仕様定義情報
4 第1仕様情報
5 第2仕様情報
6 仕様差分情報
7 差分レポート
10 情報処理装置
11 記憶部
12 処理部
1 Software Asset 1a Source File 1b External Information 2 First Specification Definition Information 3 Second Specification Definition Information 4 First Specification Information 5 Second Specification Information 6 Specification Difference Information 7 Difference Report 10 Information Processing Device 11 Storage Unit 12 Processing Unit

Claims (7)

コンピュータに、
ソースファイルにおける解析対象プログラムの記述に使用されたプログラミング言語の動作仕様が定義された仕様定義情報に基づいて、前記ソースファイルに記述された行ごとのコードの動作仕様を解読し、
前記ソースファイル内の複数の行それぞれに対応付けて、前記複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された仕様情報を生成する、
処理を実行させる解析プログラム。
to the computer,
deciphering the operation specifications of the code for each line described in the source file based on the specification definition information defining the operation specifications of the programming language used to describe the analysis target program in the source file;
generating specification information in which a comment statement indicating operation specifications of the code described in each of the plurality of lines is associated with each of the plurality of lines in the source file;
An analysis program that causes processing to be performed.
コードの仕様の解読では、前記解析対象プログラムの実行時に参照する情報が示された外付け情報に基づいて、前記外付け情報に応じた動作を記述した外部情報参照コードを実行した場合の動作を解読し、
前記仕様情報の生成では、前記外部情報参照コードが記述された行に対応付けて、前記外部情報参照コードに基づく前記外付け情報に応じた動作を示すコメント文を前記仕様情報に記載する、
請求項1記載の解析プログラム。
In decoding the code specification, based on the external information indicating the information to be referred to when executing the analysis target program, the operation when the external information reference code describing the operation according to the external information is executed. decipher,
In the generation of the specification information, a comment text indicating an operation corresponding to the external information based on the external information reference code is described in the specification information in association with the line in which the external information reference code is described.
The analysis program according to claim 1.
前記コンピュータに、さらに、
前記仕様定義情報に基づいて、前記ソースファイルに変更を加えた変更後ソースファイルに記述された行ごとのコードの動作仕様を解読し、
前記変更後ソースファイル内の複数の行それぞれに対応付けて、前記複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された変更後仕様情報を生成し、
前記仕様情報と前記変更後仕様情報との差分を抽出する、
処理を実行させる請求項1または2に記載の解析プログラム。
to the computer, further comprising:
Based on the specification definition information, decipher the operation specifications of the code for each line described in the post-change source file after the change is made to the source file;
generating post-change specification information in which a comment statement indicating operation specifications of the code written in each of the plurality of lines is associated with each of the plurality of lines in the post-change source file;
extracting a difference between the specification information and the post-change specification information;
3. The analysis program according to claim 1, which causes a process to be executed.
コードの仕様の解読では、前記解析対象プログラムを第1システムで実行した場合における前記解析対象プログラムを記述したプログラミング言語の動作仕様が定義された第1仕様定義情報に基づいて、前記ソースファイルに記述された行ごとのコードの動作仕様を解読すると共に、前記解析対象プログラムを第2システムで実行した場合における前記解析対象プログラムを記述したプログラミング言語の動作仕様が定義された第2仕様定義情報に基づいて、前記ソースファイルに記述された行ごとのコードの動作仕様を解読し、
前記仕様情報の生成では、前記ソースファイル内の複数の行それぞれに対応付けて、前記複数の行それぞれに記述されたコードの前記第1仕様定義情報に基づく動作仕様を示すコメント文が記述された第1仕様情報を生成すると共に、前記ソースファイル内の前記複数の行それぞれに対応付けて、前記複数の行それぞれに記述されたコードの前記第2仕様定義情報に基づく動作仕様を示すコメント文が記述された第2仕様情報を生成し、
前記第1仕様情報と前記第2仕様情報との差分を抽出する、
請求項1または2に記載の解析プログラム。
Decoding the specification of the code is described in the source file based on the first specification definition information defining the operation specification of the programming language in which the program to be analyzed is described when the program to be analyzed is executed on the first system. based on the second specification definition information defining the operation specifications of the programming language in which the analysis target program is described when the analysis target program is executed on the second system; to decipher the operation specifications of the code for each line described in the source file,
In the generation of the specification information, a comment statement indicating the operation specification based on the first specification definition information of the code written in each of the plurality of lines is described in association with each of the plurality of lines in the source file. The first specification information is generated, and a comment statement is associated with each of the plurality of lines in the source file and indicates the operation specification of the code written in each of the plurality of lines based on the second specification definition information. generating the described second specification information;
extracting a difference between the first specification information and the second specification information;
The analysis program according to claim 1 or 2.
前記コンピュータに、さらに、
前記第1仕様情報と前記第2仕様情報との差分に基づいて、前記第1システムで実行されていた前記解析対象プログラムを前記第2システムに移行させるための修正案を出力する、
処理を実行させる請求項4記載の解析プログラム。
to the computer, further comprising:
Based on the difference between the first specification information and the second specification information, outputting a correction proposal for migrating the analysis target program executed in the first system to the second system;
5. The analysis program according to claim 4, causing the processing to be executed.
コンピュータが、
ソースファイルにおける解析対象プログラムの記述に使用されたプログラミング言語の動作仕様が定義された仕様定義情報に基づいて、前記ソースファイルに記述された行ごとのコードの動作仕様を解読し、
前記ソースファイル内の複数の行それぞれに対応付けて、前記複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された仕様情報を生成する、
処理を実行させる解析方法。
the computer
deciphering the operation specifications of the code for each line described in the source file based on the specification definition information defining the operation specifications of the programming language used to describe the analysis target program in the source file;
generating specification information in which a comment statement indicating operation specifications of the code described in each of the plurality of lines is associated with each of the plurality of lines in the source file;
The parsing method that causes the processing to take place.
ソースファイルと、前記ソースファイルにおける解析対象プログラムの記述に使用されたプログラミング言語の動作仕様が定義された仕様定義情報とを記憶する記憶部と、
前記仕様定義情報に基づいて、前記ソースファイルに記述された行ごとのコードの動作仕様を解読し、前記ソースファイル内の複数の行それぞれに対応付けて、前記複数の行それぞれに記述されたコードの動作仕様を示すコメント文が記述された仕様情報を生成する処理部と、
を有する情報処理装置。
a storage unit that stores a source file and specification definition information that defines an operation specification of a programming language used to describe a program to be analyzed in the source file;
deciphering the operation specifications of the code for each line described in the source file based on the specification definition information; a processing unit that generates specification information in which comment statements indicating operation specifications of are described;
Information processing device having
JP2021060343A 2021-03-31 2021-03-31 Analysis program, analysis method, and information processing apparatus Pending JP2022156575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2021060343A JP2022156575A (en) 2021-03-31 2021-03-31 Analysis program, analysis method, and information processing apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2021060343A JP2022156575A (en) 2021-03-31 2021-03-31 Analysis program, analysis method, and information processing apparatus

Publications (1)

Publication Number Publication Date
JP2022156575A true JP2022156575A (en) 2022-10-14

Family

ID=83559116

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2021060343A Pending JP2022156575A (en) 2021-03-31 2021-03-31 Analysis program, analysis method, and information processing apparatus

Country Status (1)

Country Link
JP (1) JP2022156575A (en)

Similar Documents

Publication Publication Date Title
Thummalapenta et al. Automating test automation
Cunningham et al. Developing Language Processing Components with GATE Version 5:(a User Guide)
US8850581B2 (en) Identification of malware detection signature candidate code
Lämmel et al. Semi‐automatic grammar recovery
EP3161627A1 (en) Incremental compilation of whole program code
JP2007323573A (en) Functional test script generator
KR20020035562A (en) Introspective editor system, program, and method for software translation
US9311077B2 (en) Identification of code changes using language syntax and changeset data
US10521203B2 (en) Apparatus and method to facilitate extraction of unused symbols in a program source code
WO2023167724A1 (en) Source code merge conflict resolution
US10839124B1 (en) Interactive compilation of software to a hardware language to satisfy formal verification constraints
WO2023059390A1 (en) Copy-paste-update edit automation
JP2022156575A (en) Analysis program, analysis method, and information processing apparatus
US11714613B2 (en) Surfacing underutilized tool features
Selfridge GRIFT: A richly-typed, deeply-embedded RISC-V semantics written in Haskell
US11461079B2 (en) Non-transitory computer-readable medium
Magalhães Optimisation of generic programs through inlining
Rehman et al. The Linux development platform: configuring, using, and maintaining a complete programming environment
JP7348492B2 (en) Information processing system, information processing device, information processing program, and information processing method
CN114116471A (en) Automatic code scanning method, system, electronic equipment and storage medium
JPH10293683A (en) Device for comparatively analyzing program, method therefor and mechanically readable recording medium recording comparative analytic program for program
US20140372982A1 (en) Standardization of variable names in an integrated development environment
JP4983027B2 (en) Check program and check method
Bockenek et al. Formal verification of memory preservation of x86-64 binaries
JP2023057721A (en) Verification program, verification method, and information processing device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20231207