JP4971095B2 - Coding support device - Google Patents

Coding support device Download PDF

Info

Publication number
JP4971095B2
JP4971095B2 JP2007267108A JP2007267108A JP4971095B2 JP 4971095 B2 JP4971095 B2 JP 4971095B2 JP 2007267108 A JP2007267108 A JP 2007267108A JP 2007267108 A JP2007267108 A JP 2007267108A JP 4971095 B2 JP4971095 B2 JP 4971095B2
Authority
JP
Japan
Prior art keywords
standard
source
model
intra
program
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.)
Active
Application number
JP2007267108A
Other languages
Japanese (ja)
Other versions
JP2009098750A (en
Inventor
勇 長谷川
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.)
Nomura Research Institute Ltd
Original Assignee
Nomura Research Institute 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 Nomura Research Institute Ltd filed Critical Nomura Research Institute Ltd
Priority to JP2007267108A priority Critical patent/JP4971095B2/en
Publication of JP2009098750A publication Critical patent/JP2009098750A/en
Application granted granted Critical
Publication of JP4971095B2 publication Critical patent/JP4971095B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、データ処理技術に関し、特に、ソースプログラムのデータを処理することで、ユーザのコーディング作業を支援する技術に関する。   The present invention relates to a data processing technique, and more particularly to a technique for supporting a user's coding work by processing data of a source program.

情報通信技術が発達した現在、社会のいたるところにコンピュータが導入され、コンピュータを制御するプログラムも大規模化・複雑化している。大規模化・複雑化したプログラムをコーディングするユーザの多くは、IDE(Integrated Development Environment:統合開発環境)を使用してコーディングすることで、その効率を高めている。
特開平09−022344号公報
With the development of information and communication technology, computers are being introduced throughout society, and programs for controlling computers are becoming larger and more complex. Many users who code large-scale and complicated programs increase the efficiency by coding using IDE (Integrated Development Environment).
JP 09-022344 A

多くのコーディング支援機能を備えるIDE(以下、「多機能IDE」と呼ぶ。)でコーディングが支援されるプログラミング言語(以下、「規格内プログラミング言語」と呼ぶ。)の典型として、JAVA(登録商標)がある。JAVA(登録商標)によるコーディングを支援するIDE(以下、「JAVA(登録商標)用IDE」と呼ぶ。)は、編集機能・検索機能・整形機能等多くのコーディング支援機能を備えている。JAVA(登録商標)用IDEを使用することで、ユーザのコーディング作業は大幅に効率化される。   JAVA (registered trademark) as a typical programming language (hereinafter, referred to as “in-standard programming language”) in which coding is supported by an IDE having many coding support functions (hereinafter referred to as “multifunctional IDE”). There is. IDE that supports coding by JAVA (hereinafter referred to as “IDE for JAVA (registered trademark)”) has many coding support functions such as an editing function, a search function, and a shaping function. By using the IDE for JAVA (registered trademark), the coding operation of the user is greatly improved.

一方で、エンタープライズシステムの構築においては、COBOL(COmmon Business Oriented Language)が広く採用されおり、今後もCOBOLでのコーディングは数多く行われる。しかし、JAVA(登録商標)用IDEのように多くのコーディング支援機能を備えるCOBOL用のIDEはなく、COBOLによるコーディング作業の効率化は困難な状況がある。多機能IDEでコーディングが支援されないCOBOL等のプログラミング言語を、以下、「規格外プログラミング言語」と呼ぶことにする。   On the other hand, in the construction of enterprise systems, COBOL (COmmon Business Oriented Language) has been widely adopted, and many COBOL codings will be performed in the future. However, there is no IDE for COBOL having many coding support functions like IDE for JAVA (registered trademark), and it is difficult to improve the efficiency of coding work by COBOL. A programming language such as COBOL that does not support coding in the multi-function IDE will be referred to as a “nonstandard programming language” hereinafter.

このような背景から、ユーザが、規格外プログラミング言語でコーディングする際に、多機能IDEが備えるコーディング支援機能を利用できれば、ユーザのコーディング作業を効率化できると本発明者は考えた。   From such a background, the present inventor considered that if the user can use the coding support function provided in the multi-function IDE when coding in a non-standard programming language, the user's coding work can be made efficient.

本発明は、本発明者による上記着目に基づいて完成された発明であり、その主たる目的は、規格外プログラミング言語によるコーディングの際にも、多機能IDEが備えるコーディング支援機能を利用するための技術を提供することである。   The present invention has been completed based on the above-mentioned attention by the present inventor, and its main object is to use a coding support function provided in the multi-function IDE even when coding in a nonstandard programming language. Is to provide.

上記課題を解決するために、本発明のある態様のコーディング支援装置は、所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得する規格内ソースプログラム取得部と、規格内プログラミング言語の文法規則にしたがって、規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出部と、規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の規格内ソースプログラムにおける関係を特定し、関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成部と、ユーザによりいずれかのモデル要素が編集対象として選択されたとき、そのモデル要素にアクセスするための所定のインタフェースを介して、モデル要素に対応づけられている規格内ソース要素を編集対象として特定する編集部と、所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得する規格外ソースプログラム取得部と、規格外プログラミング言語の文法規則にしたがって、規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出部と、各規格外ソース要素に相当する規格内ソース要素を特定し、規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、関係に基づいて、各規格外ソース要素および各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して規格外ソース要素にアクセスするための所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成部と、を備える。編集部は、規格外ソースプログラムに基づいて生成された擬装データモデルであっても、ユーザによりいずれかのモデル要素が編集対象として選択されたときには、そのモデル要素にアクセスするための所定のインタフェースを介して、モデル要素に対応づけられている規格外ソース要素を編集対象として特定することにより、規格内ソースプログラムに加えて、規格外ソースプログラムのコーディングもデータモデルを介して支援する。   In order to solve the above-described problem, a coding support apparatus according to an aspect of the present invention includes an intra-standard source program acquisition unit that acquires a source program described in a predetermined intra-standard programming language as an intra-standard source program, and intra-standard programming. In accordance with the grammar rules of the language, the standard code source element extraction unit that extracts the elements of the program code constituting the standard program as standard source elements, and the standards of each standard source element according to the grammar rules of the standard programming language Specified relationship for identifying the relationship in the internal source program, structuring the model element associated with each intra-standard source element based on the relationship according to a predetermined structuring rule, and accessing the intra-standard source element via the model element To generate a data model with the interface of When one of the model elements is selected for editing by the model generator and the user, the source element within the standard associated with the model element is edited through a predetermined interface for accessing the model element. An editing part to be identified as a target, a non-standard source program acquisition part for acquiring a source program described in a non-standard programming language different from a predetermined standard programming language, and a grammar rule of the non-standard programming language In accordance with the above, the non-standard source element extraction unit that extracts the elements of the program code constituting the non-standard source program as the non-standard source element, and the intra-standard source element corresponding to each non-standard source element are identified, According to the grammar rules Identify the relationship between them, and based on the relationship, each non-standard source element and the model element associated with each intra-standard source element are structured according to a predetermined structuring rule, and the non-standard source element is accessed via the model element. A disguise data model generation unit that generates a disguise data model having a predetermined interface for performing the operation. Even if the editing unit is a disguise data model generated based on a non-standard source program, when a model element is selected for editing by the user, a predetermined interface for accessing the model element is provided. Thus, by specifying the non-standard source element associated with the model element as an editing target, coding of the non-standard source program is supported through the data model in addition to the standard program.

なお、以上の構成要素の任意の組合せ、本発明の表現を装置、方法、システム、プログラム、プログラムを格納した記録媒体などの間で変換したものもまた、本発明の態様として有効である。   It should be noted that any combination of the above-described constituent elements and a representation of the present invention converted between an apparatus, a method, a system, a program, a recording medium storing the program, etc. are also effective as an aspect of the present invention.

本発明によれば、規格外プログラミング言語によるコーディングの際にも、多機能IDEが備えるコーディング支援機能を利用できる。   According to the present invention, the coding support function of the multi-function IDE can be used even when coding in a nonstandard programming language.

本発明の実施の形態について説明する前に、まず、実施の形態の概要について説明する。
現在のシステム開発におけるソースプログラムは大規模化・複雑化の一途をたどっている。ソースプログラムをコーディングするユーザは、コーディング作業を効率化させるため、IDEのコーディング支援機能を利用してコーディングを行うのが一般的である。代表的なIDEとして、「Eclipse(登録商標)」がある。Eclipse(登録商標)は、ソースプログラムが公開されたIDEであり、標準でJAVA(登録商標)のコーディングに対する多数の支援機能を備える多機能IDEである。
Before describing the embodiment of the present invention, an outline of the embodiment will be described first.
Source programs in current system development are becoming ever larger and more complex. In general, a user who codes a source program performs coding using an IDE coding support function in order to improve coding efficiency. As a typical IDE, there is “Eclipse (registered trademark)”. Eclipse (registered trademark) is an IDE whose source program is open to the public, and is a multi-function IDE having a number of support functions for JAVA (registered trademark) coding as a standard.

一方で、規格外プログラミング言語によるコーディング作業の効率化は困難な状況がある。この課題を解決するために、規格外プログラミング言語用の多機能IDEを開発することも考えられる。しかし、新規に多機能IDEを開発することは、多大な開発コストを要し現実的ではない。本発明者は、多機能IDEが備える既存のコーディング支援機能を規格外プログラミング言語のコーディングに利用することにより、少ない開発コストで、規格外プログラミング言語のコーディングを効率化できると考えた。以下の説明では、多機能IDEとしてJAVA(登録商標)用IDEを、規格外プログラミング言語としてCOBOLを具体的に示して説明する。次に、JAVA(登録商標)用IDEの機能構成を示しつつ、上述した本発明者の知見をさらに説明する。   On the other hand, there are situations where it is difficult to improve the efficiency of coding work using non-standard programming languages. In order to solve this problem, it is conceivable to develop a multifunction IDE for a nonstandard programming language. However, it is not practical to develop a new multi-function IDE because it requires a large development cost. The present inventor has considered that coding of a non-standard programming language can be made efficient at a low development cost by using an existing coding support function provided in the multi-function IDE for coding of a non-standard programming language. In the following description, JAVA (registered trademark) IDE will be specifically described as a multi-function IDE, and COBOL will be described as a nonstandard programming language. Next, the knowledge of the present inventor described above will be further described while showing the functional configuration of the IDE for JAVA (registered trademark).

図1(a)は、JAVA(登録商標)のコーディングを支援するIDE100の機能構成を模式的に示す。データモデル処理機能804は、JAVA(登録商標)ソースプログラム802を取得し、メモリ上にデータモデル806として展開する。データモデルは、JAVA(登録商標)ソースプログラム802の構造を示すJAVA(登録商標)オブジェクトである。編集機能808、検索機能810および整形機能812はそれぞれ、JAVA(登録商標)ソースプログラムを編集し、検索し、自動整形するための機能であり、データモデル806にアクセスすることでコーディング支援機能をユーザに提供する。   FIG. 1A schematically illustrates a functional configuration of the IDE 100 that supports coding of JAVA (registered trademark). The data model processing function 804 acquires a JAVA (registered trademark) source program 802 and develops it as a data model 806 on the memory. The data model is a JAVA (registered trademark) object indicating the structure of the JAVA (registered trademark) source program 802. An edit function 808, a search function 810, and a shaping function 812 are functions for editing, searching, and automatically shaping a JAVA (registered trademark) source program. Accessing the data model 806 allows a user to use a coding support function. To provide.

図1(b)は、COBOL用のコーディング支援機能を新規作成した場合のIDE100の機能構成を模式的に示す。新規データモデル処理機能824は、COBOLソースプログラム822を取得し、メモリ上に新規データモデル826として展開する。新規編集機能828、新規検索機能830および新規整形機能832はそれぞれ、新規データモデル826にアクセスすることでコーディング支援機能をユーザに提供する。   FIG. 1B schematically shows a functional configuration of the IDE 100 when a COBOL coding support function is newly created. The new data model processing function 824 acquires the COBOL source program 822 and develops it as a new data model 826 on the memory. The new editing function 828, the new search function 830, and the new shaping function 832 each provide a user with a coding support function by accessing the new data model 826.

図1(b)において斜線のパターンで示した機能は、IDE100上に新規作成する機能を示している。すなわち、新規データモデル処理機能824、新規編集機能828、新規検索機能830および新規整形機能832を新規作成する必要がある。同図では、コーディング支援機能として3機能を示しているが、実際には多数のコーディング支援機能が必要とされるため、膨大な数の機能を開発することとなる。   In FIG. 1B, the function indicated by the hatched pattern indicates a function newly created on the IDE 100. That is, it is necessary to newly create a new data model processing function 824, a new editing function 828, a new search function 830, and a new shaping function 832. In the figure, three functions are shown as coding support functions. However, since a large number of coding support functions are actually required, an enormous number of functions are developed.

図1(c)は、本実施の形態におけるIDE100の機能構成を模式的に示す。同図における新規作成機能は擬装データモデル処理機能844のみである。擬装データモデル処理機能844は、COBOLソースプログラム822を取得し、データモデル806と同じインタフェースを備える擬装データモデル846をメモリ上に展開する。既存の編集機能808、検索機能810および整形機能812は、データモデル806と擬装データモデル846との違いを意識することなく、擬装データモデル846にアクセスしてコーディング支援機能をユーザに提供する。これにより、少ない開発コストで、IDE100によるCOBOLのコーディング支援を実現する。以下、実施の形態を説明する。   FIG. 1C schematically shows a functional configuration of the IDE 100 in the present embodiment. The new creation function in the figure is only the disguise data model processing function 844. The disguise data model processing function 844 acquires the COBOL source program 822 and develops the disguise data model 846 having the same interface as the data model 806 on the memory. The existing editing function 808, search function 810, and shaping function 812 access the impersonation data model 846 and provide a coding support function to the user without being aware of the difference between the data model 806 and the impersonation data model 846. As a result, COBOL coding support by IDE100 is realized with a small development cost. Hereinafter, embodiments will be described.

図2は、本実施の形態のIDE100における基本的な機能構成を示すブロック図である。本明細書のブロック図において示される各ブロックは、ハードウェア的には、コンピュータのCPUをはじめとする素子や機械装置で実現でき、ソフトウェア的にはコンピュータプログラム等によって実現されるが、ここでは、それらの連携によって実現される機能ブロックを描いている。したがって、これらの機能ブロックはハードウェア、ソフトウェアの組合せによっていろいろなかたちで実現できることは、当業者には理解されるところである。   FIG. 2 is a block diagram illustrating a basic functional configuration of the IDE 100 according to the present embodiment. Each block shown in the block diagram of the present specification can be realized in terms of hardware by an element such as a CPU of a computer or a mechanical device, and in terms of software, it can be realized by a computer program or the like. The functional block realized by those cooperation is drawn. Therefore, those skilled in the art will understand that these functional blocks can be realized in various forms by a combination of hardware and software.

IDE100は、ソースプログラム200を取得して、ユーザ400によるコーディングを支援し、また、ソースプログラム200からオブジェクトプログラム300を生成する。ソースプログラム200は、JAVA(登録商標)言語もしくはCOBOL言語で記述され、オブジェクトプログラム300は、JAVA(登録商標)バイトコードである。IDE100は、典型的には、ユーザ400の端末にインストールされるソフトウェアであるが、当該端末とは別のコーディング支援サーバにインストールされてもよい。   The IDE 100 acquires the source program 200, supports coding by the user 400, and generates an object program 300 from the source program 200. The source program 200 is described in JAVA (registered trademark) language or COBOL language, and the object program 300 is JAVA (registered trademark) bytecode. The IDE 100 is typically software installed on the terminal of the user 400, but may be installed on a coding support server different from the terminal.

IDE100は、ユーザインタフェース処理部10と、データ記憶部20と、データ処理部30とを備える。各種のデータ処理を行うデータ処理部30は、JAVA(登録商標)処理部40と、COBOL処理部60とを有する。ユーザ400からのJAVA(登録商標)ソースプログラムの編集要求をユーザインタフェース処理部10が検出すると、JAVA(登録商標)処理部40は、JAVA(登録商標)ソースプログラムをもとにデータモデルを生成して、データ記憶部20に記録する。JAVA(登録商標)処理部40は、当該データモデルにアクセスすることでユーザ400に対しコーディング支援機能を提供する。また、ユーザ400からのコンパイル要求をユーザインタフェース処理部10が検出すると、JAVA(登録商標)処理部40は、データモデルからオブジェクトプログラム300を生成する。   The IDE 100 includes a user interface processing unit 10, a data storage unit 20, and a data processing unit 30. The data processing unit 30 that performs various data processing includes a JAVA (registered trademark) processing unit 40 and a COBOL processing unit 60. When the user interface processing unit 10 detects a JAVA (registered trademark) source program editing request from the user 400, the JAVA (registered trademark) processing unit 40 generates a data model based on the JAVA (registered trademark) source program. And recorded in the data storage unit 20. The JAVA (registered trademark) processing unit 40 provides a coding support function to the user 400 by accessing the data model. When the user interface processing unit 10 detects a compile request from the user 400, the JAVA (registered trademark) processing unit 40 generates an object program 300 from the data model.

ユーザ400からのCOBOLソースプログラムの編集要求をユーザインタフェース処理部10が検出すると、COBOL処理部60は、COBOLソースプログラムをもとに擬装データモデルを生成して、データ記憶部20に記録する。JAVA(登録商標)処理部40は、データモデルと同様のインタフェースを介して擬装データモデルにアクセスして、JAVA(登録商標)の場合と同様のコーディング支援機能をユーザ400に提供する。また、ユーザ400からのコンパイル要求をユーザインタフェース処理部10が検出すると、JAVA(登録商標)処理部は、擬装データモデルからオブジェクトプログラム300を生成する。   When the user interface processing unit 10 detects a request to edit the COBOL source program from the user 400, the COBOL processing unit 60 generates a disguise data model based on the COBOL source program and records it in the data storage unit 20. The JAVA (registered trademark) processing unit 40 accesses the disguise data model through the same interface as that of the data model, and provides the user 400 with a coding support function similar to the case of JAVA (registered trademark). When the user interface processing unit 10 detects a compile request from the user 400, the JAVA (registered trademark) processing unit generates an object program 300 from the disguise data model.

図3は、図2のIDE100の詳細な機能構成を示すブロック図である。
ユーザインタフェース処理部:
ユーザインタフェース処理部10は、要求受付部12と表示部14とを含む。要求受付部12は、ユーザ400からの各種要求、例えば、ソースプログラム200の読み込み要求、ソースプログラム200の変更要求、オブジェクトプログラム300の生成要求等を検出する。表示部14は、ユーザ400からの要求に基づく、データ処理部30による処理結果をユーザ400の端末画面に表示させる。
FIG. 3 is a block diagram showing a detailed functional configuration of the IDE 100 in FIG.
User interface processor:
The user interface processing unit 10 includes a request receiving unit 12 and a display unit 14. The request receiving unit 12 detects various requests from the user 400, for example, a read request for the source program 200, a change request for the source program 200, a generation request for the object program 300, and the like. The display unit 14 displays the processing result by the data processing unit 30 based on the request from the user 400 on the terminal screen of the user 400.

データ記憶部:
データ記憶部20は、各種データをメモリまたはその他の記録媒体に記憶させる。データ記憶部20は、データモデル保持部22と言語対応情報保持部24とを含む。データモデル保持部22は、データモデルおよび擬装データモデルを保持する。
Data storage unit:
The data storage unit 20 stores various data in a memory or other recording medium. The data storage unit 20 includes a data model holding unit 22 and a language correspondence information holding unit 24. The data model holding unit 22 holds a data model and a disguise data model.

図4は、データモデル保持部22が保持するデータモデルおよび擬装データモデルを模式的に示す。まずデータモデルについて説明する。データモデルは、複数のモデル要素をJAVA(登録商標)ソースプログラムの構造にしたがって木構造に構造化したものである。データモデルは、木構造を管理するJAVA(登録商標)オブジェクトであり、例えば、「java.util.TreeMap」のオブジェクトである。データモデルの各モデル要素は、JAVA(登録商標)ソースプログラムの個々の要素(以下、「JAVA(登録商標)ソース要素」と呼ぶ。)、例えばクラス宣言やメソッド宣言等に対応づけられたJAVA(登録商標)オブジェクトである。データモデルの具体的な生成方法については後述する。   FIG. 4 schematically shows a data model and a disguised data model held by the data model holding unit 22. First, the data model will be described. The data model is obtained by structuring a plurality of model elements into a tree structure according to the structure of a JAVA (registered trademark) source program. The data model is a JAVA (registered trademark) object that manages a tree structure, for example, an object of “java.util.TreeMap”. Each model element of the data model is an individual element of the JAVA (registered trademark) source program (hereinafter referred to as “JAVA (registered trademark) source element”), for example, JAVA ( Registered trademark) object. A specific method for generating the data model will be described later.

次に擬装データモデルについて説明する。擬装データモデルは、複数のモデル要素をCOBOLソースプログラムに対応するJAVA(登録商標)言語のプログラムコードの構造にしたがって木構造に構造化したものである。擬装データモデルも、木構造を管理するJAVA(登録商標)オブジェクトであり、例えば、「java.util.TreeMap」のオブジェクトである。擬装データモデルの各モデル要素は、COBOLソースプログラムの個々の要素(以下、「COBOLソース要素」と呼ぶ。)および各COBOLソース要素に相当するJAVA(登録商標)ソース要素に対応づけられたJAVA(登録商標)オブジェクトである。擬装データモデルの具体的な生成方法については後述する。   Next, the disguise data model will be described. The camouflaged data model is obtained by structuring a plurality of model elements into a tree structure according to the program code structure of JAVA (registered trademark) corresponding to the COBOL source program. The disguise data model is also a JAVA (registered trademark) object that manages a tree structure, for example, an object of “java.util.TreeMap”. Each model element of the disguise data model is an individual element of the COBOL source program (hereinafter referred to as a “COBOL source element”) and a JAVA (registered trademark) source element corresponding to each COBOL source element. Registered trademark) object. A specific method for generating the disguise data model will be described later.

図5は、データモデルの各モデル要素が保持する属性を示す。モデル要素欄602は、各モデル要素の識別情報を記録する。同図では、モデル要素の識別情報を図4の符号で示しているが、個々のモデル要素を特定できる情報であればよい。例えば、データモデルにおいて各モデル要素を特定するためのキー情報が記録されてもよく、モデル要素のオブジェクトリファレンスそのものが記録されてもよい。後述する親モデル要素欄604および依存元モデル要素欄608についても同様である。親モデル要素欄604は、各モデル要素に対する親モデル要素の識別情報を記録する。   FIG. 5 shows attributes held by each model element of the data model. The model element column 602 records identification information of each model element. In the figure, the identification information of the model elements is indicated by the reference numerals in FIG. 4, but any information that can identify individual model elements may be used. For example, key information for specifying each model element in the data model may be recorded, and the object reference itself of the model element may be recorded. The same applies to a parent model element column 604 and a dependency source model element column 608 described later. The parent model element column 604 records the identification information of the parent model element for each model element.

JAVA(登録商標)ソース要素欄606は、各モデル要素に対応するJAVA(登録商標)ソース要素を記録する。例えば、図4のモデル要素542はクラス宣言であるので、当該モデル要素に対応するJAVA(登録商標)ソース要素として、「public class JAVASAMPLE」が記録されている。ここで記録されるJAVA(登録商標)ソース要素は、そのJAVA(登録商標)ソース要素の文字列およびJAVA(登録商標)ソースプログラムにおける当該JAVA(登録商標)ソース要素の位置を示すファイルポインタまたはファイルオフセット情報である。   The JAVA (registered trademark) source element column 606 records a JAVA (registered trademark) source element corresponding to each model element. For example, since the model element 542 in FIG. 4 is a class declaration, “public class JAVASAMPLE” is recorded as a JAVA (registered trademark) source element corresponding to the model element. The JAVA (registered trademark) source element recorded here is a file pointer or file indicating the character string of the JAVA (registered trademark) source element and the position of the JAVA (registered trademark) source element in the JAVA (registered trademark) source program. Offset information.

依存元モデル要素欄608は、モデル要素間のデータ同期処理を実現するために、各モデル要素に依存する依存元モデル要素を記録する。データ同期処理とは、依存元モデル要素に依存先モデル要素の変更を反映する処理である。同図では、モデル要素554の依存元モデル要素欄608に、依存元モデル要素であるモデル要素556およびモデル要素558が記録されている。データ同期処理については後述する。   The dependence source model element column 608 records the dependence source model element depending on each model element in order to realize data synchronization processing between the model elements. The data synchronization process is a process of reflecting the change of the dependence destination model element on the dependence source model element. In the drawing, a model element 556 and a model element 558 that are the dependency source model elements are recorded in the dependency source model element column 608 of the model element 554. Data synchronization processing will be described later.

図6は、擬装データモデルの各モデル要素が保持する属性を示す。以下、上述した図5との差分を説明する。COBOLソース要素欄610は、各モデル要素に対応するCOBOLソース要素を記録する。ここで記録されるCOBOLソース要素は、そのCOBOLソース要素の文字列およびCOBOLソースプログラムにおける当該COBOLソース要素の位置を示すファイルポインタまたはファイルオフセット情報である。   FIG. 6 shows attributes held by each model element of the disguise data model. Hereinafter, differences from FIG. 5 described above will be described. The COBOL source element column 610 records a COBOL source element corresponding to each model element. The COBOL source element recorded here is a file pointer or file offset information indicating the character string of the COBOL source element and the position of the COBOL source element in the COBOL source program.

モデル生成用JAVA(登録商標)ソース要素欄612は、COBOLソース要素に対応するJAVA(登録商標)ソース要素であって、擬装データモデルを生成する際に使用されるモデル生成用JAVA(登録商標)ソース要素を記録する。コンパイル用JAVA(登録商標)ソース要素欄614は、COBOLソース要素に対応するJAVA(登録商標)ソース要素であって、オブジェクトプログラムを生成する際に使用されるコンパイル用JAVA(登録商標)ソース要素を記録する。   The JAVA (registered trademark) source element column 612 for model generation is a JAVA (registered trademark) source element corresponding to the COBOL source element, and is used when generating a disguise data model. Record the source element. The compiling JAVA (registered trademark) source element column 614 is a JAVA (registered trademark) source element corresponding to the COBOL source element, and the compiling JAVA (registered trademark) source element used when generating the object program is displayed. Record.

また、JAVA(登録商標)ソースプログラムから生成された「データモデル」と、COBOLソースプログラムから生成された「擬装データモデル」とは、同じ3つのインタフェースを備える。第1のインタフェースは、「参照用インタフェース」である。参照用インタフェースは、ソースプログラムを表示する際に使用される。第2のインタフェースは「更新用インタフェース」である。更新用インタフェースは、ソースプログラムを変更する際に使用される。第3のインタフェースは、「コンパイル用インタフェース」である。コンパイル用インタフェースは、オブジェクトプログラムを生成する際に使用される。いずれのインタフェースへのアクセスにおいても、1以上のモデル要素が指定される。   The “data model” generated from the JAVA (registered trademark) source program and the “impersonation data model” generated from the COBOL source program have the same three interfaces. The first interface is a “reference interface”. The reference interface is used when displaying the source program. The second interface is an “update interface”. The update interface is used when the source program is changed. The third interface is a “compile interface”. The compiling interface is used when generating an object program. In accessing any interface, one or more model elements are specified.

データモデルは、参照用インタフェースでアクセスされると、指定されたモデル要素に対応づけられたJAVA(登録商標)ソース要素を返す。また、更新用インタフェースでアクセスされると、指定されたモデル要素に対応づけられたJAVA(登録商標)ソース要素を変更する。また、コンパイル用インタフェースでアクセスされると、指定されたモデル要素に対応づけられたJAVA(登録商標)ソース要素を返す。   When accessed by the reference interface, the data model returns a JAVA (registered trademark) source element associated with the specified model element. Further, when accessed through the update interface, the JAVA (registered trademark) source element associated with the designated model element is changed. Further, when accessed through the compile interface, a JAVA (registered trademark) source element associated with the specified model element is returned.

一方で、擬装データモデルは、参照用インタフェースでアクセスされると、指定されたモデル要素に対応づけられたCOBOLソース要素を返す。また、更新用インタフェースでアクセスされると、指定されたモデル要素に対応づけられたCOBOLソース要素を変更する。また、コンパイル用インタフェースでアクセスされると、指定されたモデル要素に対応づけられたコンパイル用JAVA(登録商標)ソース要素を返す。図3に戻る。   On the other hand, when the disguise data model is accessed through the reference interface, it returns a COBOL source element associated with the designated model element. When accessed through the update interface, the COBOL source element associated with the specified model element is changed. When accessed through the compile interface, a compile JAVA (registered trademark) source element associated with the specified model element is returned. Returning to FIG.

言語対応情報保持部24は、COBOL言語とJAVA(登録商標)言語との対応関係を保持する。この対応関係には、ソースプログラムの構造レベルの対応関係から個々の命令語の対応関係まで広く含まれる。図7(a)は、COBOLソース要素と共通JAVA(登録商標)ソース要素との対応関係を示す。COBOLソース要素欄622は、COBOLソース要素を記録する。共通JAVA(登録商標)ソース要素欄624は、モデル生成用JAVA(登録商標)ソース要素およびコンパイル用JAVA(登録商標)ソース要素の両方に共通して適用されるJAVA(登録商標)ソース要素を記録する。例えば、COBOLソース要素の「PROGRAM-ID」は、JAVA(登録商標)ソース要素の「class」に対応することを示している。   The language correspondence information holding unit 24 holds a correspondence relationship between the COBOL language and the JAVA (registered trademark) language. This correspondence includes a wide range from the correspondence at the structure level of the source program to the correspondence between the individual instruction words. FIG. 7A shows a correspondence relationship between a COBOL source element and a common JAVA (registered trademark) source element. The COBOL source element column 622 records the COBOL source element. The common JAVA (registered trademark) source element column 624 records JAVA (registered trademark) source elements that are commonly applied to both the JAVA (registered trademark) source element for model generation and the JAVA (registered trademark) source element for compilation. To do. For example, “PROGRAM-ID” of the COBOL source element indicates that it corresponds to “class” of the JAVA (registered trademark) source element.

図7(b)は、COBOLソース要素と、モデル生成用JAVA(登録商標)ソース要素と、コンパイル用JAVA(登録商標)ソース要素との対応関係を示す。モデル生成用JAVA(登録商標)ソース要素欄626は、モデル生成用JAVA(登録商標)ソース要素を記録し、コンパイル用JAVA(登録商標)ソース要素欄628は、編集用JAVA(登録商標)ソース要素を記録する。例えば、COBOLソース要素の「PIC 9(length)」は、編集用JAVA(登録商標)ソース要素の「int」に対応し、また、コンパイル用JAVA(登録商標)ソース要素の「COBOLDecimal.getLiteral(length,0)」に対応することを示している。   FIG. 7B shows a correspondence relationship between a COBOL source element, a JAVA (registered trademark) source element for model generation, and a JAVA (registered trademark) source element for compilation. The JAVA (registered trademark) source element column 626 for model generation records the JAVA (registered trademark) source element for model generation, and the JAVA (registered trademark) source element column 628 for compilation includes the JAVA (registered trademark) source element for editing. Record. For example, “PIC 9 (length)” of the COBOL source element corresponds to “int” of the JAVA (registered trademark) source element for editing, and “COBOLDecimal.getLiteral (length) of the JAVA (registered trademark) source element for compilation. , 0) ".

図7(b)において示すように、言語対応情報保持部24は、各COBOLソース要素に対応するモデル生成用JAVA(登録商標)ソース要素とコンパイル用JAVA(登録商標)ソース要素とを区別して保持している。これは以下の理由による。すなわち、ユーザ400によるCOBOLソースプログラムの編集を実現するために生成されるデータモデルでは、その構造がCOBOLソースプログラムの構造に近いことが重要である。一方で、オブジェクトプログラムの生成においては、各COBOLソース要素と同等の動作を実現するJAVA(登録商標)ソース要素が対応づけられることが重要だからである。   As shown in FIG. 7B, the language correspondence information holding unit 24 distinguishes and holds a model generation JAVA (registered trademark) source element and a compilation JAVA (registered trademark) source element corresponding to each COBOL source element. is doing. This is due to the following reason. That is, in the data model generated in order to realize the editing of the COBOL source program by the user 400, it is important that the structure is close to the structure of the COBOL source program. On the other hand, in the generation of an object program, it is important that a JAVA (registered trademark) source element that realizes an operation equivalent to each COBOL source element is associated.

また、図7(b)のコンパイル用JAVA(登録商標)ソース要素に含まれる「CobolLang」「CobolDecimal」「CobolMethod」等のクラスおよびそれらのメソッドは、COBOL言語とJAVA(登録商標)言語との対応付けのために用意されたライブラリに含まれる。例えば、「CobolLang.getLiteral」メソッドは、文字数を指定して文字列を生成する関数である。また、「CobolDecimal.getLiteral」メソッドは、桁数を指定して数値を生成する関数である。これらは例えば、プリミティブ型「char」の配列等で実装されている。   In addition, classes such as “CobolLang”, “CobolDecimal”, and “CobolMethod” included in the JAVA (registered trademark) source element for compilation in FIG. 7B and their methods correspond to the COBOL language and the JAVA (registered trademark) language. Included in a library prepared for attachment. For example, the “CobolLang.getLiteral” method is a function that generates a character string by specifying the number of characters. The “CobolDecimal.getLiteral” method is a function that generates a numerical value by specifying the number of digits. These are implemented by, for example, an array of primitive type “char”.

COBOLは事務処理用に開発された経緯から事務処理用の関数が充実している。一方で、JAVA(登録商標)は多目的に使用できる汎用的なプログラミング言語として開発されたものであるため、両言語間において一対一で対応できない命令語もある。上述したライブラリはこの差異を埋めるためのものであり、COBOL言語特有の命令語の動作を実現するクラスおよびメソッドがあらかじめ実装され、データ記憶部20にライブラリとして記憶されている。後述する擬装データモデル生成部66は、このライブラリを参照して、コンパイル用JAVA(登録商標)ソース要素欄628に設定する。図3に戻る。   COBOL has a wide range of functions for paperwork because it was developed for paperwork. On the other hand, JAVA (registered trademark) was developed as a general-purpose programming language that can be used for various purposes, and there are some instruction words that cannot be handled in a one-to-one relationship between the two languages. The above-described library is for filling this difference, and classes and methods for realizing the operation of the instruction word unique to the COBOL language are mounted in advance and stored in the data storage unit 20 as a library. The disguise data model generation unit 66 to be described later refers to this library and sets it in the JAVA (registered trademark) source element column 628 for compilation. Returning to FIG.

JAVA(登録商標)処理部:
JAVA(登録商標)処理部40は、JAVA(登録商標)ソースプログラムからデータモデルを生成し、当該データモデルを介して、ユーザのコーディング作業を支援する。JAVA(登録商標)処理部40は、ソースプログラム取得部42と、ソース要素抽出部44と、データモデル生成部46と、編集部48と、ソースプログラム更新部50と、オブジェクトプログラム生成部52と、コンパイルエラー通知部54とを含む。ソースプログラム取得部42は、ユーザ400により指定されたJAVA(登録商標)ソースプログラムを取得する。
JAVA (registered trademark) processing unit:
The JAVA (registered trademark) processing unit 40 generates a data model from the JAVA (registered trademark) source program, and supports a user's coding work through the data model. The JAVA (registered trademark) processing unit 40 includes a source program acquisition unit 42, a source element extraction unit 44, a data model generation unit 46, an editing unit 48, a source program update unit 50, an object program generation unit 52, A compile error notification unit 54. The source program acquisition unit 42 acquires a JAVA (registered trademark) source program designated by the user 400.

ソース要素抽出部44は、JAVA(登録商標)言語の文法規則にしたがって、取得されたJAVA(登録商標)ソースプログラムを構成するプログラムコードの要素をJAVA(登録商標)ソース要素として抽出する。図8は、JAVA(登録商標)ソースプログラムを示す。ソース要素抽出部44は、例えば、図8で示すJAVA(登録商標)ソースプログラムから、キーワードマッチングや他の要素との位置関係に基づき、図5のJAVA(登録商標)ソース要素欄606で示すJAVA(登録商標)ソース要素を抽出する。図5のモデル要素欄602に設定されたモデル要素542から558は、図8のJAVA(登録商標)ソース要素502から518にそれぞれ対応づけられている。   The source element extraction unit 44 extracts program code elements constituting the acquired JAVA (registered trademark) source program as JAVA (registered trademark) source elements in accordance with the grammatical rules of the JAVA (registered trademark) language. FIG. 8 shows a JAVA (registered trademark) source program. The source element extraction unit 44, for example, from the JAVA (registered trademark) source program shown in FIG. 8 based on the keyword matching and the positional relationship with other elements, the JAVA (registered trademark) source element column 606 in FIG. (Registered trademark) Source element is extracted. The model elements 542 to 558 set in the model element column 602 in FIG. 5 are associated with JAVA (registered trademark) source elements 502 to 518 in FIG. 8, respectively.

データモデル生成部46は、JAVA(登録商標)言語の文法規則にしたがって、JAVA(登録商標)ソース要素それぞれのJAVA(登録商標)ソースプログラムにおける関係を特定する。データモデル生成部46は、この関係に基づいて、JAVA(登録商標)ソース要素に対応づけられるモデル要素を所定の構造化規則に基づいて構造化してデータモデルを生成し、データモデル保持部22に記録する。   The data model generation unit 46 specifies the relationship in the JAVA (registered trademark) source program of each JAVA (registered trademark) source element in accordance with the grammatical rules of the JAVA (registered trademark) language. Based on this relationship, the data model generation unit 46 generates a data model by structuring a model element associated with a JAVA (registered trademark) source element based on a predetermined structuring rule, and stores the data model in the data model holding unit 22. Record.

データモデルの生成における所定の構造化規則とはIDE100において決められている構造化規則であり、Eclipseにおける「Java Model」生成規則であってもよい。この規則は、例えば、クラスに対応するモデル要素を頂点とする木構造であること。メソッドはメソッド宣言が親モデル要素となり、メソッド情報とメソッド本体が子モデル要素となること。メソッド内部のデータ要素を示すモデル要素は、メソッド本体を示すモデル要素の子要素となること等、データモデルの構造を決定する規則である。この構造化規則にしたがって、データモデル生成部46は、例えば、図8のJAVA(登録商標)ソース要素502から518のそれぞれを図4のモデル要素542から558に対応づけてデータモデルを生成する。   The predetermined structuring rule in generating the data model is a structuring rule determined in the IDE 100, and may be a “Java Model” generating rule in Eclipse. This rule is, for example, a tree structure with a model element corresponding to a class as a vertex. For a method, the method declaration is the parent model element, and the method information and the method body are the child model elements. The model element indicating the data element inside the method is a rule that determines the structure of the data model, such as being a child element of the model element indicating the method body. In accordance with this structuring rule, for example, the data model generation unit 46 generates a data model by associating each of the JAVA (registered trademark) source elements 502 to 518 in FIG. 8 with the model elements 542 to 558 in FIG.

また、データモデル生成部46は、データモデルの各モデル要素に、図5で示した各種属性を設定する。なお、依存元モデル要素の設定の際には、データモデル生成部46は、JAVA(登録商標)ソースプログラムの構造にしたがって、モデル要素に対応づけられたJAVA(登録商標)ソース要素の文字列比較をして、モデル要素間の依存関係を判定する。例えば、あるメソッドの中で宣言された変数があり、同一のメソッドの中でその変数と同一の文字列を使った変数の代入処理がある場合、後者の変数文字列は前者の変数文字列に依存していると判定し、前者の依存元モデル要素欄608に後者を設定する。さらに、データモデル生成部46は、各モデル要素にアクセスさせるための参照用インタフェース、更新用インタフェースおよびコンパイル用インタフェースをデータモデルに設定する。   In addition, the data model generation unit 46 sets various attributes shown in FIG. 5 for each model element of the data model. When setting the dependence source model element, the data model generation unit 46 compares the character string of the JAVA (registered trademark) source element associated with the model element in accordance with the structure of the JAVA (registered trademark) source program. To determine the dependency between model elements. For example, if there is a variable declared in a method, and there is a variable assignment process using the same character string as that variable in the same method, the latter variable character string is changed to the former variable character string. It is determined that it depends, and the latter is set in the former dependency source model element column 608. Further, the data model generation unit 46 sets a reference interface, an update interface, and a compile interface for accessing each model element in the data model.

編集部48は、データモデルにアクセスすることにより、コーディング支援機能をユーザ400に提供する。例えば、JAVA(登録商標)ソースプログラムを表示させる際には、データモデルの参照用インタフェースにアクセスして、各モデル要素に対応づけられたJAVA(登録商標)ソース要素の文字列を取得し、表示部14を介して、ユーザ400の端末に画面表示させる。また、ユーザ400により、あるモデル要素が編集対象として指定されたとき、編集部48は、参照用インタフェースを介して、指定されたモデル要素に対応づけられているJAVA(登録商標)ソース要素の文字列を取得する。編集部48は、取得したJAVA(登録商標)ソース要素の文字列をユーザ400の端末に画面表示させる。   The editing unit 48 provides a coding support function to the user 400 by accessing the data model. For example, when displaying a JAVA (registered trademark) source program, a character model reference string of the JAVA (registered trademark) source corresponding to each model element is acquired and displayed. The screen is displayed on the terminal of the user 400 via the unit 14. In addition, when a certain model element is designated as an editing target by the user 400, the editing unit 48 uses the reference interface to specify the character of the JAVA (registered trademark) source element that is associated with the designated model element. Get the column. The editing unit 48 causes the character string of the acquired JAVA (registered trademark) source element to be displayed on the screen of the user 400.

また、モデル要素がJAVA(登録商標)のキーワード、例えば「class」や「int」等を示すモデル要素であるとき、編集部48は、取得したJAVA(登録商標)ソース要素を色づけする等して表示態様を変更する。また、あるモデル要素が、JAVA(登録商標)文法規則における特定の位置に存在する場合、例えば「for」キーワードを示すモデル要素の後ろに存在するときには、当該JAVA(登録商標)ソース要素をインデントさせる等して表示態様を変更する。   When the model element is a JAVA (registered trademark) keyword, for example, a model element indicating “class” or “int”, the editing unit 48 colors the acquired JAVA (registered trademark) source element, for example. Change the display mode. Further, when a certain model element exists at a specific position in the JAVA (registered trademark) grammar rule, for example, when it exists after the model element indicating the “for” keyword, the JAVA (registered trademark) source element is indented. Equally, the display mode is changed.

また、ユーザ400が画面表示されたJAVA(登録商標)ソースプログラムを変更したとき、編集部48は、変更にかかるモデル要素を特定し、変更用インタフェースを介して当該モデル要素にアクセスして、その変更をJAVA(登録商標)ソース要素に反映させる。   When the user 400 changes the JAVA (registered trademark) source program displayed on the screen, the editing unit 48 specifies the model element to be changed, accesses the model element via the change interface, and The change is reflected in the JAVA® source element.

また、データモデルのモデル要素間に既述した依存関係があるとき、編集部48は、依存先のモデル要素に対応づけられたJAVA(登録商標)ソース要素の変更に併せて、依存元のモデル要素に対応づけられたJAVA(登録商標)ソース要素を変更する。例えば、図5のモデル要素544のJAVA(登録商標)ソース要素が、「TOTAL」から「RESULT」に変更されたとする。このとき、編集部48は、モデル要素556およびモデル要素558のJAVA(登録商標)ソース要素の「TOTAL」も「RESULT」に変更する。   Also, when there is the dependency described above between the model elements of the data model, the editing unit 48 changes the model of the dependency source in accordance with the change of the JAVA (registered trademark) source element associated with the model element of the dependency destination. The JAVA (registered trademark) source element associated with the element is changed. For example, the JAVA (registered trademark) source element of the model element 544 in FIG. 5 is changed from “TOTAL” to “RESULT”. At this time, the editing unit 48 changes “TOTAL” of the JAVA (registered trademark) source element of the model element 556 and the model element 558 to “RESULT”.

ソースプログラム更新部50は、編集部48によるJAVA(登録商標)ソース要素の変更を検出して、当該変更をJAVA(登録商標)ソースプログラムに反映する。ソースプログラム更新部50は、データモデルの各モデル要素にリスナを登録しておくことで、各モデル要素に対応づけられたJAVA(登録商標)ソース要素の変更を検出する。ソースプログラム更新部50は、モデル要素に対応づけられたJAVA(登録商標)ソースプログラムの位置を示すファイルポインタを介してJAVA(登録商標)ソースプログラムにアクセスし、当該ファイルポインタが示す位置のプログラムコードを変更する。   The source program update unit 50 detects a change in the JAVA (registered trademark) source element by the editing unit 48 and reflects the change in the JAVA (registered trademark) source program. The source program update unit 50 detects a change in a JAVA (registered trademark) source element associated with each model element by registering a listener in each model element of the data model. The source program update unit 50 accesses the JAVA (registered trademark) source program via the file pointer indicating the position of the JAVA (registered trademark) source program associated with the model element, and the program code at the position indicated by the file pointer To change.

オブジェクトプログラム生成部52は、データモデルのコンパイル用インタフェースにアクセスして、各モデル要素に対応づけられたJAVA(登録商標)ソース要素を取得する。続いて、このJAVA(登録商標)ソース要素をコンパイルして、オブジェクトプログラム300を生成する。オブジェクトプログラム生成部52は、取得したJAVA(登録商標)ソース要素をデータモデルの構造にしたがって組みあわせることで、JAVA(登録商標)ソースプログラムを一旦生成し、当該JAVA(登録商標)ソースプログラムをコンパイルしてもよい。   The object program generation unit 52 accesses the interface for compiling the data model, and acquires JAVA (registered trademark) source elements associated with each model element. Subsequently, the JAVA (registered trademark) source element is compiled to generate an object program 300. The object program generation unit 52 generates a JAVA (registered trademark) source program by combining the acquired JAVA (registered trademark) source elements according to the structure of the data model, and compiles the JAVA (registered trademark) source program. May be.

コンパイルエラー通知部54は、オブジェクトプログラム生成部52のコンパイル処理においてエラーが発生したとき、当該エラーを検出する。続いて、エラーを発生させたJAVA(登録商標)ソース要素に対応づけられているモデル要素を特定して、ユーザ400にJAVA(登録商標)ソースプログラム上での位置を通知する。   The compile error notification unit 54 detects an error when an error occurs in the compile processing of the object program generation unit 52. Subsequently, the model element associated with the JAVA (registered trademark) source element that caused the error is specified, and the user 400 is notified of the position on the JAVA (registered trademark) source program.

COBOL処理部:
COBOL処理部60は、COBOLソースプログラムから擬装データモデルを生成し、当該擬装データモデルを介して、JAVA(登録商標)処理部40にユーザのコーディング作業を支援させる。COBOL処理部60は、COBOLソースプログラム取得部62と、COBOLソース要素抽出部64と、擬装データモデル生成部66と、COBOLソースプログラム更新部68と、ソースプログラム生成部70とを含む。COBOLソースプログラム取得部62は、ユーザにより指定されたCOBOLソースプログラムを取得する。
COBOL processing section:
The COBOL processing unit 60 generates a camouflaged data model from the COBOL source program, and causes the JAVA (registered trademark) processing unit 40 to support the user's coding work through the camouflaged data model. The COBOL processing unit 60 includes a COBOL source program acquisition unit 62, a COBOL source element extraction unit 64, a disguise data model generation unit 66, a COBOL source program update unit 68, and a source program generation unit 70. The COBOL source program acquisition unit 62 acquires a COBOL source program specified by the user.

COBOLソース要素抽出部64は、COBOL言語の文法規則にしたがって、取得されたCOBOLソースプログラムを構成するプログラムコードの要素をCOBOLソース要素として抽出する。図9は、COBOLソースプログラムを示す。ソース要素抽出部44は、例えば、図9で示すCOBOLソースプログラムから、キーワードマッチングや他の要素との位置関係に基づき、図6のCOBOLソース要素欄610で示すCOBOLソース要素を抽出する。図6のモデル要素欄602に設定されたモデル要素542から558は、図9のCOBOLソース要素522から538にそれぞれ対応づけられている。   The COBOL source element extraction unit 64 extracts the elements of the program code constituting the acquired COBOL source program as a COBOL source element in accordance with the grammar rules of the COBOL language. FIG. 9 shows a COBOL source program. The source element extraction unit 44 extracts, for example, the COBOL source element shown in the COBOL source element column 610 in FIG. 6 from the COBOL source program shown in FIG. 9 based on the keyword matching and the positional relationship with other elements. The model elements 542 to 558 set in the model element column 602 in FIG. 6 are respectively associated with the COBOL source elements 522 to 538 in FIG.

擬装データモデル生成部66は、言語対応情報保持部24に記録されたCOBOLソース要素とJAVA(登録商標)ソース要素との対応関係を参照し、COBOLソース要素に相当するモデル生成用JAVA(登録商標)ソース要素およびコンパイル用JAVA(登録商標)ソース要素を生成する。   The disguise data model generation unit 66 refers to the correspondence relationship between the COBOL source element and the JAVA (registered trademark) source element recorded in the language correspondence information holding unit 24, and generates a model generation JAVA (registered trademark) corresponding to the COBOL source element. ) Generate a source element and a compiling JAVA source element.

例えば、擬装データモデル生成部66は、図9のCOBOLソース要素522「PROGRAM-ID COBOLSAMPLE」に対し、図7(a)のレコード630を参照して、共通JAVA(登録商標)ソース要素「class COBOLSAMPLE」を生成する。別の例として、図9のCOBOLソース要素538「DISPLAY TOTAL」に対し、図7(b)のレコード632を参照して、モデル生成用JAVA(登録商標)ソース要素「System.out.println(TOTAL)」を生成する。また、コンパイル用JAVA(登録商標)ソース要素「COBOLMethod.display(TOTAL)」も併せて生成する。   For example, the disguise data model generation unit 66 refers to the record 630 in FIG. 7A with respect to the COBOL source element 522 “PROGRAM-ID COBOLSAMPLE” in FIG. 9 and refers to the common JAVA (registered trademark) source element “class COBOLSAMPLE”. Is generated. As another example, for the COBOL source element 538 “DISPLAY TOTAL” in FIG. 9, the JAVA (registered trademark) source element “System.out.println (TOTAL ) ". A compiling JAVA (registered trademark) source element “COBOLMethod.display (TOTAL)” is also generated.

擬装データモデル生成部66は、COBOLソース要素と、モデル生成用JAVA(登録商標)ソース要素と、コンパイル用JAVA(登録商標)ソース要素を対応づける。これにより、図9のCOBOLソースプログラムから図6のCOBOLソース要素欄610、モデル生成用JAVA(登録商標)ソース要素欄612およびコンパイル用JAVA(登録商標)ソース要素欄614で示す対応関係を生成する。   The disguise data model generation unit 66 associates a COBOL source element, a model generating JAVA (registered trademark) source element, and a compiling JAVA (registered trademark) source element. Thus, the correspondence shown in the COBOL source element column 610, the JAVA (registered trademark) source element column 612 in FIG. 6 and the JAVA (registered trademark) source element column 614 in FIG. 6 is generated from the COBOL source program in FIG. .

擬装データモデル生成部66は、JAVA(登録商標)言語の文法規則にしたがって、モデル生成用JAVA(登録商標)ソース要素間の関係を特定する。この関係に基づいて、COBOLソース要素、モデル生成用JAVA(登録商標)ソース要素およびコンパイル用JAVA(登録商標)ソース要素に対応づけられるモデル要素を所定の構造化規則に基づいて構造化してデータモデルを生成し、データモデル保持部22に記録する。擬装データモデルにおける所定の構造化規則は、データモデル生成部46で既述した規則に従う。   The disguise data model generation unit 66 specifies a relationship between JAVA (registered trademark) source elements for model generation in accordance with a grammar rule of JAVA (registered trademark) language. Based on this relationship, the COBOL source element, the model generating JAVA (registered trademark) source element, and the model element associated with the compiling JAVA (registered trademark) source element are structured based on a predetermined structuring rule to form a data model. Is recorded in the data model holding unit 22. The predetermined structuring rule in the disguise data model follows the rule already described in the data model generation unit 46.

また、擬装データモデル生成部66は、擬装データモデルの各モデル要素に、図6で示した各種属性を設定する。なお、依存元モデル要素の設定は、データモデル生成部46で説明した処理と同様である。さらに、擬装データモデル生成部66は、各モデル要素にアクセスさせるための参照用インタフェース、更新用インタフェースおよびコンパイル用インタフェースを擬装データモデルに設定する。このようにして、擬装データモデル生成部66は、例えば、図9のCOBOLソース要素522から538のそれぞれを図4のモデル要素542から558に対応づけて擬装データモデルを生成する。   Further, the disguise data model generation unit 66 sets various attributes shown in FIG. 6 for each model element of the disguise data model. The setting of the dependence source model element is the same as the processing described in the data model generation unit 46. Furthermore, the disguise data model generation unit 66 sets a reference interface, an update interface, and a compile interface for accessing each model element in the disguise data model. In this way, for example, the disguise data model generation unit 66 associates each of the COBOL source elements 522 to 538 in FIG. 9 with the model elements 542 to 558 in FIG. 4 to generate a disguise data model.

COBOLソースプログラム更新部68は、編集部48によるCOBOLソース要素の変更を検出して、当該変更をCOBOLソースプログラムに反映する。COBOLソースプログラム更新部68は、擬装データモデルの各モデル要素にリスナを登録しておくことで、各モデル要素に対応づけられたCOBOLソース要素の変更を検出する。COBOLソースプログラム更新部68は、モデル要素に対応づけられたCOBOLソースプログラムの位置を示すファイルポインタを介してCOBOLソースプログラムにアクセスし、当該ファイルポインタが示す位置のプログラムコードを変更する。   The COBOL source program update unit 68 detects a change in the COBOL source element by the editing unit 48 and reflects the change in the COBOL source program. The COBOL source program update unit 68 detects a change in the COBOL source element associated with each model element by registering a listener in each model element of the disguise data model. The COBOL source program update unit 68 accesses the COBOL source program via the file pointer indicating the position of the COBOL source program associated with the model element, and changes the program code at the position indicated by the file pointer.

ソースプログラム生成部70は、擬装データモデルにおける各モデル要素のコンパイル用インタフェースにアクセスして、モデル要素に対応づけられたコンパイル用JAVA(登録商標)ソース要素を取得する。ソースプログラム生成部70は、擬装データモデルの構造にしたがって、取得したコンパイル用JAVA(登録商標)ソース要素を組み合わせて、JAVA(登録商標)ソースプログラムを生成する。擬装データモデルは木構造であるため、ソースプログラム生成部70は、根から子へ左回りにモデル要素をたどって、各モデル要素に対応づけられたコンパイル用JAVA(登録商標)ソース要素を順次出力することにより、JAVA(登録商標)ソースプログラムを生成してもよい。なお、ここで生成されるJAVA(登録商標)ソースプログラムは、擬装データモデルのもととなったCOBOLソースプログラムと同様の動作をする。   The source program generation unit 70 accesses a compilation interface for each model element in the disguise data model, and obtains a compilation JAVA (registered trademark) source element associated with the model element. The source program generating unit 70 generates a JAVA (registered trademark) source program by combining the acquired JAVA (registered trademark) source elements for compilation according to the structure of the disguise data model. Since the disguise data model has a tree structure, the source program generation unit 70 traces the model elements counterclockwise from the root to the child, and sequentially outputs JAVA (registered trademark) source elements for compilation associated with the model elements. By doing so, a JAVA (registered trademark) source program may be generated. The JAVA (registered trademark) source program generated here operates in the same manner as the COBOL source program that is the basis of the disguise data model.

なお、擬装データモデル生成部66は、擬装データモデルの生成において、JAVA(登録商標)ソース要素に対応付けできないCOBOLソース要素を検出したときには、コンパイル用JAVA(登録商標)ソース要素として、所定の文字列を設定してもよい。この文字列は、ユーザにコーディングするよう注意喚起を促す文字列であればよく、COBOLソース要素そのものでもよい。コンパイル用JAVA(登録商標)ソース要素に当該文字列されているとき、ソースプログラム生成部70は、取得したコンパイル用JAVA(登録商標)ソース要素をそのままもしくはコメントアウトして出力してもよい。これにより、ユーザは出力されたJAVA(登録商標)ソースプログラムの中で、さらに実装すべき部分を認識できる。   When the impersonation data model generation unit 66 detects a COBOL source element that cannot be associated with a JAVA (registered trademark) source element in generating the impersonation data model, a predetermined character is used as a compiling JAVA (registered trademark) source element. A column may be set. This character string may be a character string that prompts a user to code and may be a COBOL source element itself. When the character string is included in the compiling JAVA (registered trademark) source element, the source program generation unit 70 may output the obtained compiling JAVA (registered trademark) source element as it is or commented out. As a result, the user can recognize a portion to be further mounted in the output JAVA (registered trademark) source program.

次に、擬装データモデルに対する編集部48、オブジェクトプログラム生成部52およびコンパイルエラー通知部54の動作を説明する。   Next, operations of the editing unit 48, the object program generation unit 52, and the compile error notification unit 54 for the disguise data model will be described.

編集部48は、擬装データモデルにアクセスすることにより、コーディング支援機能をユーザ400に提供する。例えば、COBOLソースプログラムを表示させる際には、擬装データモデルの参照用インタフェースにアクセスして、各モデル要素に対応づけられたCOBOLソース要素の文字列を取得し、表示部14を介して、ユーザ400の端末に画面表示させる。また、ユーザ400により、あるモデル要素が編集対象として指定されたとき、編集部48は、参照用インタフェースを介して、指定されたモデル要素に対応づけられているCOBOLソース要素の文字列を取得する。編集部48は、取得したCOBOLソース要素の文字列をユーザ400の端末に画面表示させる。   The editing unit 48 provides the coding support function to the user 400 by accessing the disguise data model. For example, when displaying the COBOL source program, the character interface of the COBOL source element associated with each model element is obtained by accessing the reference interface of the disguise data model, and the user is displayed via the display unit 14. The screen is displayed on 400 terminals. When a certain model element is designated as an editing target by the user 400, the editing unit 48 obtains a character string of a COBOL source element associated with the designated model element via the reference interface. . The editing unit 48 displays the acquired character string of the COBOL source element on the screen of the user 400.

また、モデル要素がJAVA(登録商標)のキーワード、例えば「class」や「int」等を示すモデル要素であるとき、編集部48は、当該モデル要素に対応づけられたCOBOLソース要素を色づけする等して表示態様を変更する。また、あるモデル要素が、JAVA(登録商標)文法規則における特定の位置に存在する場合、例えば「for」キーワードを示すモデル要素の後ろに存在するときには、当該モデル要素に対応づけられたCOBOLソース要素をインデントさせる等して表示態様を変更する。   When the model element is a JAVA (registered trademark) keyword, for example, a model element indicating “class”, “int” or the like, the editing unit 48 colors the COBOL source element associated with the model element. To change the display mode. In addition, when a certain model element exists at a specific position in the JAVA (registered trademark) grammar rule, for example, when it exists after the model element indicating the “for” keyword, the COBOL source element associated with the model element. The display mode is changed by indenting.

また、ユーザ400が画面表示されたCOBOLソースプログラムを変更したとき、編集部48は、変更にかかるモデル要素を特定し、変更用インタフェースを介して当該モデル要素にアクセスして、その変更をCOBOLソース要素に反映させる。   When the user 400 changes the COBOL source program displayed on the screen, the editing unit 48 identifies the model element related to the change, accesses the model element via the change interface, and changes the COBOL source program. Reflect in the element.

また、擬装データモデルのモデル要素間に既述した依存関係があるとき、編集部48は、依存先のモデル要素に対応づけられたCOBOLソース要素の変更に併せて、依存元のモデル要素に対応づけられたCOBOLソース要素を変更する。例えば、図6のモデル要素544のCOBOLソース要素が、「TOTAL」から「RESULT」に変更されたとする。このとき、編集部48は、モデル要素556およびモデル要素558のCOBOLソース要素の「TOTAL」も「RESULT」に変更する。   In addition, when there is the dependency described above between the model elements of the disguise data model, the editing unit 48 corresponds to the model element of the dependency source in accordance with the change of the COBOL source element associated with the model element of the dependency destination. Change the attached COBOL source element. For example, it is assumed that the COBOL source element of the model element 544 in FIG. 6 is changed from “TOTAL” to “RESULT”. At this time, the editing unit 48 also changes “TOTAL” of the COBOL source element of the model element 556 and the model element 558 to “RESULT”.

オブジェクトプログラム生成部52は、擬装データモデルのコンパイル用インタフェースにアクセスして、各モデル要素に対応づけられたコンパイル用JAVA(登録商標)ソース要素を取得する。続いて、このコンパイル用JAVA(登録商標)ソース要素をコンパイルして、オブジェクトプログラム300を生成する。オブジェクトプログラム生成部52は、取得したコンパイル用JAVA(登録商標)ソース要素をデータモデルの構造にしたがって組みあわせることで、JAVA(登録商標)ソースプログラムを一旦生成し、当該JAVA(登録商標)ソースプログラムをコンパイルしてもよい。   The object program generation unit 52 accesses the compiling interface of the disguise data model, and acquires a compiling JAVA (registered trademark) source element associated with each model element. Subsequently, the compiling JAVA (registered trademark) source element is compiled to generate the object program 300. The object program generation unit 52 temporarily generates a JAVA (registered trademark) source program by combining the acquired JAVA (registered trademark) source elements for compilation according to the structure of the data model, and the JAVA (registered trademark) source program May be compiled.

コンパイルエラー通知部54は、オブジェクトプログラム生成部52のコンパイル処理においてエラーが発生したとき、当該エラーを検出する。続いて、エラーを発生させたコンパイル用JAVA(登録商標)ソース要素に対応づけられているモデル要素を特定して、そのモデル要素からCOBOLソース要素を特定することにより、ユーザ400にCOBOLソースプログラム上での位置を通知する。例えば、当該COBOLソース要素を含むプログラムコードを画面表示させる。   The compile error notification unit 54 detects an error when an error occurs in the compile processing of the object program generation unit 52. Subsequently, by identifying a model element associated with the compiling JAVA (registered trademark) source element in which the error has occurred and identifying the COBOL source element from the model element, the user 400 is notified on the COBOL source program. Notify the location at. For example, the program code including the COBOL source element is displayed on the screen.

このように、編集部48、オブジェクトプログラム生成部52およびコンパイルエラー通知部54は、データモデルにアクセスする場合と同様のインタフェースで擬装データモデルにアクセスできる。その結果、JAVA(登録商標)ソースプログラムに対するコーディング支援機能をCOBOLソースプログラムに対しても提供できる。   As described above, the editing unit 48, the object program generation unit 52, and the compile error notification unit 54 can access the disguise data model with the same interface as that for accessing the data model. As a result, a coding support function for the JAVA (registered trademark) source program can be provided for the COBOL source program.

次に、COBOLソースプログラムに対してIDE100が実行するコーディング支援処理の流れを説明する。
図10(a)は、IDE100におけるコーディング支援処理の流れを示すフローチャートである。要求受付部12は、ユーザ400からのCOBOLソースプログラムの指定を検出する(S12)。COBOLソースプログラム取得部62は、COBOLソースプログラムを取得し(S14)、COBOLソース要素抽出部64は、COBOLソース要素を抽出する(S16)。擬装データモデル生成部66は、通常のデータモデルと同様のインタフェースを備える擬装データモデルを生成する(S18)。
Next, the flow of coding support processing executed by the IDE 100 for the COBOL source program will be described.
FIG. 10A is a flowchart showing the flow of coding support processing in the IDE 100. The request receiving unit 12 detects the designation of the COBOL source program from the user 400 (S12). The COBOL source program acquisition unit 62 acquires a COBOL source program (S14), and the COBOL source element extraction unit 64 extracts a COBOL source element (S16). The disguise data model generation unit 66 generates a disguise data model having an interface similar to that of a normal data model (S18).

図10(b)は、図10(a)の擬装データモデル生成処理の詳細を示すフローチャートである。擬装データモデル生成部66は、COBOLソース要素抽出部64により抽出されたCOBOLソース要素を取得する(S102)。擬装データモデル生成部66は、言語対応情報保持部24を参照して、COBOLソース要素に対応するモデル生成用JAVA(登録商標)ソース要素およびコンパイル用JAVA(登録商標)ソース要素を特定する(S104)。続いて、COBOLソース要素、モデル生成用JAVA(登録商標)ソース要素およびコンパイル用JAVA(登録商標)ソース要素を対応づけてモデル要素を生成する(S106)。擬装データモデル生成部66は、モデル要素を構造化して擬装データモデルを生成する(S108)。図10(a)に戻る。   FIG. 10B is a flowchart showing details of the disguise data model generation process of FIG. The disguise data model generation unit 66 acquires the COBOL source element extracted by the COBOL source element extraction unit 64 (S102). The disguise data model generation unit 66 refers to the language correspondence information holding unit 24 and specifies a JAVA (registered trademark) source element for model generation and a JAVA (registered trademark) source element for compilation corresponding to the COBOL source element (S104). ). Subsequently, the COBOL source element, the model generating JAVA (registered trademark) source element, and the compiling JAVA (registered trademark) source element are associated with each other to generate a model element (S106). The disguise data model generation unit 66 generates a disguise data model by structuring model elements (S108). Returning to FIG.

編集部48は、モデル要素の属性に基づき、編集用インタフェースを介して取得したCOBOLソース要素の表示態様を決定する(S20)。表示部14は、決定された表示態様にて、COBOLソースプログラムを画面表示させる(S22)。ユーザ400から編集対象の指定を要求受付部12が検出すると(S24のY)、編集部48は、編集対象として指定されたモデル要素に対応づけられたCOBOLソース要素を特定する(S26)。表示部14は、当該COBOLソース要素を含むプログラムコードを画面表示させる(S28)。ユーザから編集対象の指定がなければ(S24のN)、S26およびS28の処理はスキップされる。   The editing unit 48 determines the display mode of the COBOL source element acquired via the editing interface based on the attribute of the model element (S20). The display unit 14 displays the COBOL source program on the screen in the determined display mode (S22). When the request receiving unit 12 detects designation of the editing target from the user 400 (Y in S24), the editing unit 48 identifies the COBOL source element associated with the model element designated as the editing target (S26). The display unit 14 displays the program code including the COBOL source element on the screen (S28). If there is no edit target designation from the user (N in S24), the processes in S26 and S28 are skipped.

図10(c)は、図10(a)の続きを示すフローチャートである。ユーザ400からのCOBOLソース要素の変更要求を要求受付部12が検出すると(S30のY)、編集部48は、編集にかかるモデル要素を特定して、当該モデル要素に対応づけられたCOBOLソース要素を変更する(S32)。モデル要素間に依存関係が設定されているとき(S34のY)、編集部48は、COBOLソース要素の同期処理を行う(S36)。依存関係の設定がないとき(S34のN)、S36の処理はスキップされる。COBOLソースプログラム更新部68は、COBOLソース要素の変更を検出して、COBOLソースプログラムを変更する(S38)。ユーザからCOBOLソース要素の変更要求がないとき(S30のN)、S32からS38の処理はスキップされる。   FIG. 10C is a flowchart showing a continuation of FIG. When the request receiving unit 12 detects a request for changing the COBOL source element from the user 400 (Y in S30), the editing unit 48 specifies the model element to be edited and associates the COBOL source element with the model element. Is changed (S32). When the dependency relationship is set between the model elements (Y in S34), the editing unit 48 performs the synchronization process of the COBOL source element (S36). When there is no dependency relationship setting (N of S34), the process of S36 is skipped. The COBOL source program update unit 68 detects a change in the COBOL source element and changes the COBOL source program (S38). When there is no COBOL source element change request from the user (N in S30), the processing from S32 to S38 is skipped.

ユーザ400からJAVA(登録商標)ソースプログラムの生成指示があると(S40のY)、要求受付部12は当該生成指示を検出する。このとき、ソースプログラム生成部70は、擬装データモデルのコンパイル用インタフェースを介して、コンパイル用JAVA(登録商標)ソース要素を取得する。ソースプログラム生成部70は、取得したコンパイル用JAVA(登録商標)ソース要素を擬装データモデルの構造にしたがって組み合わせることでJAVA(登録商標)ソースプログラムを生成して出力する(S42)。ユーザからJAVA(登録商標)ソースプログラムの生成指示がないときには(S40のN)、S42の処理はスキップされる。   When a user 400 generates a JAVA (registered trademark) source program generation instruction (Y in S40), the request reception unit 12 detects the generation instruction. At this time, the source program generation unit 70 acquires a JAVA (registered trademark) source element for compilation via the interface for compiling the impersonation data model. The source program generation unit 70 generates and outputs a JAVA (registered trademark) source program by combining the acquired JAVA (registered trademark) source elements for compilation according to the structure of the disguise data model (S42). When there is no instruction to generate a JAVA (registered trademark) source program from the user (N in S40), the process of S42 is skipped.

図10(d)は、図10(c)の続きを示すフローチャートである。ユーザからコンパイル実行指示があると(S44のY)、要求受付部12は当該実行指示を検出する。このとき、オブジェクトプログラム生成部52は、擬装データモデルのコンパイル用インタフェースを介して取得したコンパイル用JAVA(登録商標)ソース要素をコンパイルする(S46)。コンパイルエラーが発生しなければ(S48のN)、オブジェクトプログラム生成部52は、オブジェクトプログラムを出力する(S50)。   FIG. 10D is a flowchart showing a continuation of FIG. When there is a compile execution instruction from the user (Y in S44), the request reception unit 12 detects the execution instruction. At this time, the object program generating unit 52 compiles the compiling JAVA (registered trademark) source element acquired through the compiling interface of the disguise data model (S46). If no compile error occurs (N in S48), the object program generating unit 52 outputs the object program (S50).

コンパイルエラーが発生したときには(S48のY)、コンパイルエラー通知部54は、当該エラーの原因箇所となったCOBOLソースプログラムの位置をユーザ400に通知する(S52)。ユーザからのコンパイル指示がないときには(S44のN)、S46からS50の処理はスキップされる。ユーザからの終了指示を要求受付部12が検出すると(S54のY)、IDE100は処理を終了する。当該終了指示がなければ(S54のN)、S20の処理に戻り、COBOLソース要素の表示態様が決定されて、COBOLソースプログラムのプログラムコードが画面表示される。   When a compile error has occurred (Y in S48), the compile error notification unit 54 notifies the user 400 of the position of the COBOL source program that has caused the error (S52). When there is no compile instruction from the user (N in S44), the processing from S46 to S50 is skipped. When the request receiving unit 12 detects an end instruction from the user (Y in S54), the IDE 100 ends the process. If there is no end instruction (N in S54), the process returns to S20, the display mode of the COBOL source element is determined, and the program code of the COBOL source program is displayed on the screen.

次に、本発明者による実験結果であって、本実施の形態のIDE100によりCOBOLソースプログラムに対応づけられる編集用JAVA(登録商標)ソースプログラムおよびコンパイル用JAVA(登録商標)ソースプログラムを示す。編集用JAVA(登録商標)ソースプログラムは、COBOLソース要素に対応づけられるモデル生成用JAVA(登録商標)ソース要素を組み合わせたJAVA(登録商標)ソースプログラムである。また、コンパイル用JAVA(登録商標)ソースプログラムは、COBOLソース要素に対応づけられるコンパイル用JAVA(登録商標)ソース要素を組み合わせたJAVA(登録商標)ソースプログラムである。なお、ソースプログラム生成部70により生成されるJAVA(登録商標)ソースプログラムは、ここで示すコンパイル用JAVA(登録商標)ソースプログラムである。なお、ここで示すソースプログラムは、図7(a)および図7(b)で示したソース要素間の対応関係をもとに対応付けされたものである。   Next, an experimental JAVA (registered trademark) source program and a compiled JAVA (registered trademark) source program, which are experimental results by the present inventor and are associated with the COBOL source program by the IDE 100 of the present embodiment, are shown. The editing JAVA (registered trademark) source program is a JAVA (registered trademark) source program in which model generating JAVA (registered trademark) source elements associated with COBOL source elements are combined. The compiling JAVA (registered trademark) source program is a JAVA (registered trademark) source program in which compiling JAVA (registered trademark) source elements associated with COBOL source elements are combined. Note that the JAVA (registered trademark) source program generated by the source program generating unit 70 is the compiling JAVA (registered trademark) source program shown here. The source programs shown here are associated with each other based on the correspondence between the source elements shown in FIGS. 7A and 7B.

第1の例として、COBOL言語の複雑な集団項目のマッピング例を示す。図11(a)は、集団項目を含むCOBOLソースプログラムを示す。COBOLソース要素700の「DEPARTMENT」は集団項目であり、内部に文字列「DEPARTMENT_NAME」とCOBOLソース要素702「STAFFS」を含む。この「STAFFS」も集団項目であり、その内部には文字列と数値を有する。また、「OCCURS」キーワードにより10回の繰り返しが指定されている。なお、COBOLソース要素704では、文字列が転記されている。   As a first example, a mapping example of complex group items in the COBOL language is shown. FIG. 11A shows a COBOL source program including group items. “DEPARTMENT” of the COBOL source element 700 is a group item, and includes a character string “DEPARTMENT_NAME” and a COBOL source element 702 “STAFFS” inside. This “STAFFS” is also a group item, and has a character string and a numerical value therein. In addition, 10 repetitions are designated by the “OCCURS” keyword. In the COBOL source element 704, a character string is transcribed.

図11(b)は、図11(a)に対応する編集用JAVA(登録商標)ソースプログラムを示す。同図のCOBOLソース要素700の集団項目は、インナークラスにマッピングされており、JAVA(登録商標)ソース要素710でクラスが定義され、JAVA(登録商標)ソース要素716でインスタンス化されている。COBOLソース要素702の集団項目も、インナークラスにマッピングされており、JAVA(登録商標)ソース要素712でクラスが定義されている。また「OCCURS」の繰り返し指定は、JAVA(登録商標)ソース要素714で示すように配列にマッピングされている。また、COBOLソース要素704の文字列の転記は、JAVA(登録商標)ソース要素718の代入文にマッピングされている。   FIG. 11B shows an editing JAVA (registered trademark) source program corresponding to FIG. The group item of the COBOL source element 700 in FIG. 5 is mapped to an inner class, the class is defined by the JAVA (registered trademark) source element 710, and instantiated by the JAVA (registered trademark) source element 716. The group item of the COBOL source element 702 is also mapped to the inner class, and the class is defined by the JAVA (registered trademark) source element 712. The repetition designation of “OCCURS” is mapped to an array as indicated by a JAVA (registered trademark) source element 714. Further, the transcription of the character string of the COBOL source element 704 is mapped to the assignment statement of the JAVA (registered trademark) source element 718.

第2の例として、COBOL言語の数値要素のマッピング例を示す。図12(a)は、数値を取り扱うCOBOLソースプログラムを示す。COBOLソース要素720で2桁の数値項目を宣言し、COBOLソース要素722で当該数値項目に10を加算し、COBOLソース要素724で当該数値項目を表示させている。   As a second example, a mapping example of numerical elements in the COBOL language is shown. FIG. 12A shows a COBOL source program that handles numerical values. The COBOL source element 720 declares a two-digit numeric item, the COBOL source element 722 adds 10 to the numeric item, and the COBOL source element 724 displays the numeric item.

図12(b)は、図12(a)に対応する編集用JAVA(登録商標)ソースプログラムを示す。COBOLソース要素720は、JAVA(登録商標)ソース要素730で「int」にマッピングされている。COBOLソース要素722は、JAVA(登録商標)ソース要素732で標準的な数値加算関数にマッピングされている。また、COBOLソース要素724は、JAVA(登録商標)ソース要素734で標準的な出力関数にマッピングされている。   FIG. 12B shows an editing JAVA (registered trademark) source program corresponding to FIG. The COBOL source element 720 is mapped to “int” in the JAVA source element 730. The COBOL source element 722 is mapped to a standard numeric addition function in the JAVA source element 732. The COBOL source element 724 is mapped to a standard output function in the JAVA (registered trademark) source element 734.

図12(c)は、図12(a)に対応するコンパイル用JAVA(登録商標)ソースプログラムを示す。COBOLソース要素720、722および724はいずれも、JAVA(登録商標)ソース要素740、742および744において、標準ではない外部ライブラリが備える関数の呼び出しにマッピングされている。これは、モデル生成用JAVA(登録商標)ソース要素にマッピングする際には、COBOLソースプログラムの構造を示す擬装データモデルが作成できればよいため、COBOLソース要素の構造を踏襲しつつ、簡易な関数へマッピングすればよい。これに対し、コンパイル用JAVA(登録商標)ソース要素にマッピングする際には、各COBOLソース要素と同様の動作を実現するJAVA(登録商標)ソース要素へマッピングされる必要があるからである。   FIG. 12C shows a compiling JAVA (registered trademark) source program corresponding to FIG. COBOL source elements 720, 722, and 724 are all mapped to function calls in non-standard external libraries in JAVA source elements 740, 742, and 744. This is because, when mapping to a JAVA (registered trademark) source element for model generation, it is only necessary to create a disguise data model indicating the structure of the COBOL source program, so that the function can be simplified while following the structure of the COBOL source element. Mapping should be done. On the other hand, when mapping to a JAVA (registered trademark) source element for compilation, it is necessary to map to a JAVA (registered trademark) source element that realizes the same operation as each COBOL source element.

例えば、COBOLソース要素720の「PIC 9(2)」は、2桁の数値項目を示すが、これに対応する標準的なJAVA(登録商標)ソース要素はない。図12(b)のJAVA(登録商標)ソース要素730で示すように、モデル生成用JAVA(登録商標)ソース要素としては、数値を示すプリミティブ型の「int」にマッピングされている。これに対し、図12(c)のJAVA(登録商標)ソース要素740で示すように、コンパイル用JAVA(登録商標)ソース要素としては、桁数を扱えるように新規で作成されたクラスの「CobolDecimal」にマッピングされている。   For example, “PIC 9 (2)” in the COBOL source element 720 indicates a two-digit numeric item, but there is no standard JAVA source element corresponding to this. As shown by the JAVA (registered trademark) source element 730 in FIG. 12B, the JAVA (registered trademark) source element for model generation is mapped to a primitive type “int” indicating a numerical value. On the other hand, as shown by the JAVA (registered trademark) source element 740 in FIG. 12C, as the JAVA (registered trademark) source element for compiling, the “CobolDecimal” of the class newly created so as to handle the number of digits can be used. Is mapped.

第3の例として、COBOL言語のSECTION呼び出しのマッピング例を示す。図13(a)は、SECTION呼び出しを含むCOBOLソースプログラムを示す。同図には、COBOLソース要素750で示す「HOGE SECTION」をはじめ、「FOO SECTION」、「BAR SECTION」、「BAZ SECTION」が含まれている。また、COBOLソース要素752で示すように、GOTO命令によるSECTION呼び出しが行われている。   As a third example, a mapping example of a COBOL language SECTION call is shown. FIG. 13A shows a COBOL source program including a SECTION call. The figure includes “HOGE SECTION” indicated by a COBOL source element 750, “FOO SECTION”, “BAR SECTION”, and “BAZ SECTION”. Further, as indicated by a COBOL source element 752, a SECTION call is performed by a GOTO instruction.

図13(b)は、図13(a)に対応する編集用JAVA(登録商標)ソースプログラムを示す。COBOLソースプログラムの各SECTIONはメソッドにマッピングされるため、COBOLソース要素750は、JAVA(登録商標)ソース要素760にマッピングされる。また、GOTO命令は、メソッド呼び出しにマッピングされるため、COBOLソース要素752は、JAVA(登録商標)ソース要素762にマッピングされる。   FIG. 13B shows an editing JAVA (registered trademark) source program corresponding to FIG. Since each SECTION of the COBOL source program is mapped to a method, the COBOL source element 750 is mapped to the JAVA source element 760. In addition, since the GOTO instruction is mapped to a method call, the COBOL source element 752 is mapped to the JAVA (registered trademark) source element 762.

なお、図13(b)の編集用JAVA(登録商標)ソースプログラムは、図13(a)COBOLソースプログラムと動作が異なる。すなわち、COBOLソースプログラムでは表示されない「This is NONDISPLAY.」がJAVA(登録商標)ソースプログラムでは表示されることになる。しかし、上述したように、モデルを生成する観点からは、よりCOBOLソースプログラムの構造と近い方が望ましいため、図13(b)のような編集用JAVA(登録商標)ソースプログラムとなる。   Note that the editing JAVA (registered trademark) source program in FIG. 13B is different from the operation in FIG. 13A in the COBOL source program. That is, “This is NONDISPLAY.” That is not displayed in the COBOL source program is displayed in the JAVA (registered trademark) source program. However, as described above, from the viewpoint of generating a model, it is desirable that the structure is closer to the structure of the COBOL source program. Therefore, the editing JAVA (registered trademark) source program as shown in FIG.

図13(c)は、図13(a)に対応するコンパイル用JAVA(登録商標)ソースプログラムを示す。COBOLソースプログラムの各SECTIONはメソッドにマッピングされるため、COBOLソース要素750は、JAVA(登録商標)ソース要素770にマッピングされる。ただし、COBOL言語の順次実行を実現するため、メソッドの最後に次メソッド、つまりソースプログラムにおける位置として次に記述されているメソッドの呼び出しが追加される。このため、図13(c)では、JAVA(登録商標)ソース要素772が追加されている。   FIG. 13C shows a compiling JAVA (registered trademark) source program corresponding to FIG. Since each SECTION of the COBOL source program is mapped to a method, the COBOL source element 750 is mapped to the JAVA source element 770. However, in order to realize the sequential execution of the COBOL language, the next method, that is, the method described next as the position in the source program is added at the end of the method. For this reason, a JAVA (registered trademark) source element 772 is added in FIG.

また図13(c)において、GOTO命令は、メソッド呼び出しに加え、「Return」キーワードが追加されている。GOTO命令を実行すると、呼び出し元に制御は戻らない。メソッド呼び出しに「Return」を加えることで、呼び出し先から制御が戻ったときにも、すぐに自身の呼び出し元に制御を返し、最終的にJAVA(登録商標)VMまで制御を返すことにより、GOTO命令と同様の動作を実現する。このため、図13(c)では、JAVA(登録商標)ソース要素774および776が追加されている。   In FIG. 13C, the GOTO instruction has a “Return” keyword added in addition to the method call. Executing the GOTO instruction does not return control to the caller. By adding “Return” to the method call, even when control returns from the call destination, control is immediately returned to its caller, and finally, control is returned to JAVA (registered trademark) VM. The same operation as the instruction is realized. For this reason, JAVA (registered trademark) source elements 774 and 776 are added in FIG.

多くのプログラミング言語において、プログラムは、順次実行、条件分岐、繰り返しの3要素を基本として構成されている。図7(a)、図7(b)および上記の実験結果で示したように、本実施の形態のIDE100では、COBOL言語とJAVA(登録商標)言語の間でいずれの3要素についてもマッピングができている。また、COBOL特有のSECTION構造やGOTO命令にも対応ができ、その他のCOBOL特有の関数についても、既述したように、外部ライブラリをあらかじめ準備することでマッピングを実現する。言い換えれば、IDE100は、いずれのCOBOLソースプログラムについても擬装データモデルを生成でき、コーディング支援を実現する。   In many programming languages, a program is structured on the basis of three elements of sequential execution, conditional branching, and repetition. As shown in FIGS. 7A and 7B and the above experimental results, the IDE 100 according to the present embodiment maps any three elements between the COBOL language and the JAVA (registered trademark) language. is made of. Further, it can cope with a COBOL-specific SECTION structure and a GOTO instruction, and for other COBOL-specific functions, as described above, mapping is realized by preparing an external library in advance. In other words, the IDE 100 can generate a disguise data model for any COBOL source program and realize coding support.

本実施の形態によれば、JAVA(登録商標)ソースプログラムに基づくデータモデルと同様のインタフェースを備える擬装データモデルをCOBOLソースプログラムから生成する。これにより、データモデルにアクセスしてコーディングを支援する編集機能等各種機能を新規開発、もしくは大幅に修正することなく、既存の編集機能等にデータモデルと擬装データモデルとを同様に取り扱わせることができる。すなわち、ユーザは、JAVA(登録商標)用IDEのコーディング支援機能をCOBOLソースプログラムのコーディングにおいても享受できる。   According to the present embodiment, a disguise data model having an interface similar to the data model based on the JAVA (registered trademark) source program is generated from the COBOL source program. This allows existing editing functions to handle data models and impersonation data models in the same way without newly developing or significantly modifying various functions such as editing functions that support coding by accessing the data model. it can. That is, the user can enjoy the coding support function of the IDE for JAVA (registered trademark) even in the coding of the COBOL source program.

COBOLソースプログラムのコーディングにおいてJAVA(登録商標)用IDEから享受できるコーディング支援機能の例を示す。例えば、ユーザによるCOBOLソース要素の指定に対応して、当該COBOLソース要素を含むプログラムコードの特定および表示ができる。また、JAVA(登録商標)言語のキーワードに対応するCOBOLソース要素に対する色づけやインデント等の表示態様の変更ができる。また、依存元のソース要素を依存先のソース要素の変更に同期させることができる。これらのコーディング支援機能を享受できることで、大規模化・複雑化したCOBOLソースプログラムのコーディングにおいて、その効率を高めるとともにコーディングミスを低減できる。   An example of a coding support function that can be enjoyed from an IDE for JAVA (registered trademark) in coding of a COBOL source program is shown. For example, in response to the specification of the COBOL source element by the user, the program code including the COBOL source element can be specified and displayed. Further, it is possible to change the display mode such as coloring and indentation for the COBOL source element corresponding to the keyword of JAVA (registered trademark) language. Further, the source element of the dependency source can be synchronized with the change of the source element of the dependency destination. By being able to enjoy these coding support functions, it is possible to increase the efficiency and reduce coding errors in the coding of a large-scale and complicated COBOL source program.

また、本実施の形態によれば、COBOLソースプログラムからJAVA(登録商標)ソースプログラムを生成できる。これにより、例えばメインフレームの更改にあたり、Windows(登録商標)やUNIX(登録商標)等、オープンシステムへのリホストも容易となる。さらに、JAVA(登録商標)言語は理解しているものの、COBOL言語は十分に理解していない開発者に対しても、JAVA(登録商標)ソースプログラムを提示できることで、COBOLソースプログラムの内容の理解を容易にする。   Further, according to the present embodiment, a JAVA (registered trademark) source program can be generated from a COBOL source program. Thereby, for example, when renewing the mainframe, rehosting to an open system such as Windows (registered trademark) or UNIX (registered trademark) is facilitated. Furthermore, it is possible to present a JAVA (registered trademark) source program to developers who understand the JAVA (registered trademark) language but do not fully understand the COBOL language, so that the contents of the COBOL source program can be understood. To make it easier.

さらに、本実施の形態によれば、COBOLソースプログラムに基づく擬装データモデルからコンパイル用JAVA(登録商標)ソース要素を取得しコンパイルして、JAVA(登録商標)バイトコードを生成できる。これにより、当該バイトコードをJAVA(登録商標)VM上で動作させることで、COBOL言語用の実行環境が無くても、COBOLソースプログラムの動作を確認できる。また、コンパイルエラーが発生した際には、エラーの原因となったモデル要素を介して、COBOLソースプログラムの問題位置をユーザに通知できる。つまり、疑似データモデルを生成することにより、オブジェクトプログラム生成におけるコーディング支援機能についても享受できる。   Furthermore, according to the present embodiment, a JAVA (registered trademark) source element for compilation can be acquired from a disguised data model based on a COBOL source program and compiled to generate JAVA (registered trademark) bytecode. As a result, by operating the bytecode on the JAVA (registered trademark) VM, the operation of the COBOL source program can be confirmed without an execution environment for the COBOL language. When a compile error occurs, the user can be notified of the problem location of the COBOL source program via the model element that caused the error. That is, by generating the pseudo data model, the coding support function in the object program generation can be enjoyed.

COBOLソースプログラムからJAVA(登録商標)バイトコードが生成されることで、例えば、メインフレームからオープンシステムへの移行を実施する開発者に求められるJAVA(登録商標)言語スキルが低減される。すなわち、JAVA(登録商標)を十分に理解できていない開発者であっても、JAVA(登録商標)ソースプログラムをコーディングすることなく、COBOLソースプログラムのJAVA(登録商標)VM上での動きを確認できる。   By generating JAVA (registered trademark) bytecode from the COBOL source program, for example, JAVA (registered trademark) language skills required for developers who migrate from a mainframe to an open system are reduced. That is, even if the developer does not fully understand JAVA (registered trademark), the movement of the COBOL source program on JAVA (registered trademark) VM can be confirmed without coding the JAVA (registered trademark) source program. it can.

なお、COBOLソース要素とJAVA(登録商標)ソース要素とを対応づけるライブラリを充実させることで、COBOLソースプログラムから疑似データモデルを介して生成されるJAVA(登録商標)ソースプログラムの精度が高めることができる。これは、JAVA(登録商標)バイトコードを生成する場合にも同様である。言い換えれば、アプリケーションがCOBOLで実装されたメインフレームから、アプリケーションがJAVA(登録商標)で実装されるオープンシステムへの移行を容易に実現できる。   In addition, by enhancing the library that associates the COBOL source element with the JAVA (registered trademark) source element, the accuracy of the JAVA (registered trademark) source program generated from the COBOL source program through the pseudo data model can be improved. it can. The same applies to the case where JAVA (registered trademark) bytecode is generated. In other words, it is possible to easily realize a transition from a mainframe in which an application is implemented in COBOL to an open system in which the application is implemented in JAVA (registered trademark).

以上、本発明を実施の形態をもとに説明した。この実施の形態は例示であり、それらの各構成要素や各処理プロセスの組合せにいろいろな変形例が可能なこと、またそうした変形例も本発明の範囲にあることは当業者に理解されるところである。   The present invention has been described based on the embodiments. This embodiment is an exemplification, and it will be understood by those skilled in the art that various modifications can be made to combinations of the respective constituent elements and processing processes, and such modifications are also within the scope of the present invention. is there.

上述した実施の形態では、擬装データモデルは、モデル作成用JAVA(登録商標)ソース要素をもとに生成されたが、コーディング支援用の擬装データモデルと、コンパイル用の擬装データモデルとが別に生成されてもよい。この場合、コンパイル用の擬装データモデルは、コンパイル用JAVA(登録商標)ソース要素をもとに生成され、コンパイル用インタフェースを備える。   In the embodiment described above, the impersonation data model is generated based on the JAVA (registered trademark) source element for model creation. However, the impersonation data model for coding support and the impersonation data model for compilation are generated separately. May be. In this case, the disguise data model for compiling is generated based on the compiling JAVA (registered trademark) source element and includes a compiling interface.

また、上述した実施の形態では、ソースプログラム生成部70は、コンパイル用JAVA(登録商標)ソース要素をもとに、JAVA(登録商標)ソースプログラムを生成した。変形例として、モデル生成用JAVA(登録商標)ソース要素をもとに、JAVA(登録商標)ソースプログラムを生成してもよい。COBOL特有の命令語に対応するためのライブラリがない場合にも、COBOLソースプログラムに対応するJAVA(登録商標)ソースプログラムをユーザに提供でき、ユーザのコーディング作業を支援できる。   In the above-described embodiment, the source program generation unit 70 generates a JAVA (registered trademark) source program based on the compiling JAVA (registered trademark) source element. As a modification, a JAVA (registered trademark) source program may be generated based on a JAVA (registered trademark) source element for model generation. Even when there is no library for supporting COBOL-specific instruction words, a JAVA (registered trademark) source program corresponding to the COBOL source program can be provided to the user, and the user's coding work can be supported.

さらにまた、JAVA(登録商標)処理部40は、図3に図示しないステップ実行部を含んでもよく、オブジェクトプログラム生成部52は、擬装モデルの各モデル要素にブレークポイントを対応づけた上でコンパイルし、オブジェクトプログラムを生成してもよい。ステップ実行部は、オブジェクトプログラムの実行において、各ブレークポイントまでステップ的に実行し、また、ブレークポイントごとにデバッグ情報を出力する。このとき、ステップ実行部は、モデル要素に対応づけられたCOBOLソース要素とともにデバッグ情報を出力することで、COBOLのコーディングを支援する。   Furthermore, the JAVA (registered trademark) processing unit 40 may include a step execution unit (not shown in FIG. 3), and the object program generation unit 52 compiles each model element of the disguise model after associating it with a breakpoint. An object program may be generated. In the execution of the object program, the step execution unit executes step by step up to each breakpoint, and outputs debug information for each breakpoint. At this time, the step execution unit supports COBOL coding by outputting debug information together with the COBOL source element associated with the model element.

さらにまた、上述した実施の形態では、JAVA(登録商標)用IDEのコーディング支援機能をCOBOLソースプログラムのコーディングに利用する技術を提案したが、本発明の技術思想はこれに限定されない。すなわち、本発明の技術思想は、IDEがコーディング支援できる領域を様々な規格外プログラミング言語に拡大する場合全般に適用できる。   Furthermore, in the above-described embodiment, a technique for using the coding support function of the IDE for JAVA (registered trademark) for coding the COBOL source program is proposed, but the technical idea of the present invention is not limited to this. That is, the technical idea of the present invention can be applied to all cases where the area where IDE can support coding is expanded to various nonstandard programming languages.

以上の実施の形態および変形例から把握される発明のいろいろな態様を既に特許請求の範囲に記載したものも含む形にて以下に例示する。   Various aspects of the invention ascertained from the above embodiments and modifications will be exemplified below in the form including those already described in the claims.

A1.所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得する規格内ソースプログラム取得部と、
前記規格内プログラミング言語の文法規則にしたがって、前記規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出部と、
前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の前記規格内ソースプログラムにおける関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成部と、
前記所定のインタフェースを介して、前記データモデルの各モデル要素に対応づけられている規格内ソース要素を取得し、それら規格内ソース要素をコンパイルすることで、前記規格内ソースプログラムに基づくオブジェクトプログラムを前記データモデルから生成するオブジェクトプログラム生成部と、
前記所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得する規格外ソースプログラム取得部と、
前記規格外プログラミング言語の文法規則にしたがって、前記規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出部と、
各規格外ソース要素に相当する規格内ソース要素を特定し、前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を前記所定の構造化規則により構造化し、モデル要素を介して前記規格外ソース要素にアクセスするための前記所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成部と、
を備え、
前記オブジェクトプログラム生成部は、前記擬装データモデルが有する前記所定のインタフェースを介して、各モデル要素に対応づけられている規格内ソース要素を取得し、それら規格内ソース要素をコンパイルすることで、前記規格外ソースプログラムに基づいて生成された擬装データモデルから前記規格内プログラミング言語のオブジェクトプログラムを生成することを特徴とするコーディング支援装置。
A1. An intra-standard source program acquisition unit that acquires a source program described in a predetermined intra-standard programming language as an intra-standard source program;
In accordance with the grammatical rules of the intra-standard programming language, an intra-standard source element extraction unit that extracts program code elements constituting the intra-standard source program as intra-standard source elements;
According to the grammatical rules of the intra-standard programming language, the relationship between the intra-standard source elements in the intra-standard source program is specified, and based on the relationship, model elements associated with the intra-standard source elements are defined as predetermined structuring rules. And a data model generation unit that generates a data model having a predetermined interface for accessing the source element within the standard via the model element, and
An object program based on the intra-standard source program is obtained by acquiring intra-standard source elements associated with each model element of the data model via the predetermined interface and compiling the intra-standard source elements. An object program generation unit that generates from the data model;
A non-standard source program acquisition unit that acquires a source program described in a non-standard programming language different from the predetermined standard programming language, as a non-standard source program;
In accordance with the grammatical rules of the non-standard programming language, a non-standard source element extraction unit that extracts an element of a program code constituting the non-standard source program as a non-standard source element;
Identify the intra-standard source element corresponding to each non-standard source element, identify the relationship between the intra-standard source elements according to the grammatical rules of the intra-standard programming language, and assign each intra-standard source element based on the relationship. A disguise data model generation unit configured to structure a model element to be associated with the predetermined structuring rule and generate a disguise data model having the predetermined interface for accessing the non-standard source element via the model element;
With
The object program generation unit acquires the intra-standard source elements associated with each model element via the predetermined interface included in the impersonation data model, and compiles the intra-standard source elements, thereby A coding support apparatus for generating an object program of the programming language within the standard from a disguise data model generated based on a non-standard source program.

A2.前記擬装データモデルから前記規格内プログラミング言語のオブジェクトプログラムを生成するための前記オブジェクトプログラム生成部によるコンパイル処理でエラーが発生したとき、前記コンパイル処理のエラーを検出してユーザに通知するコンパイルエラー通知部をさらに備え、
前記擬装データモデル生成部は、擬装データモデルの各モデル要素に前記規格外ソース要素をさらに対応づけて擬装データモデルを生成し、
前記コンパイルエラー通知部は、前記コンパイル処理のエラーを検出したとき、当該エラーを発生させた規格内ソース要素に対応づけられているモデル要素を特定し、そのモデル要素に対応づけられている規格外ソース要素を特定して、その規格外ソース要素をユーザに通知することを特徴とするA1に記載のコーディング支援装置。
A2. A compile error notification unit that detects an error in the compile process and notifies the user when an error occurs in the compile process by the object program generation unit for generating the object program of the programming language within the standard from the impersonation data model Further comprising
The impersonation data model generation unit generates an impersonation data model by further associating the non-standard source element with each model element of the impersonation data model,
When the compile error notifying unit detects an error in the compile process, the compile error notifying unit identifies a model element associated with the source element within the standard that caused the error, and the non-standard associated with the model element. The coding support apparatus according to A1, wherein a source element is specified and the user is notified of the non-standard source element.

A3.所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得する規格内ソースプログラム取得機能と、
前記規格内プログラミング言語の文法規則にしたがって、前記規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出機能と、
前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の前記規格内ソースプログラムにおける関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成機能と、
前記所定のインタフェースを介して、前記データモデルの各モデル要素に対応づけられている規格内ソース要素を取得し、それら規格内ソース要素をコンパイルすることで、前記規格内ソースプログラムに基づくオブジェクトプログラムを前記データモデルから生成するオブジェクトプログラム生成機能と、
前記所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得する規格外ソースプログラム取得機能と、
前記規格外プログラミング言語の文法規則にしたがって、前記規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出機能と、
各規格外ソース要素に相当する規格内ソース要素を特定し、前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を前記所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための前記所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成機能と、
をコンピュータに実現させ、
前記オブジェクトプログラム生成機能は、前記擬装データモデルが有する前記所定のインタフェースを介して、各モデル要素に対応づけられている規格内ソース要素を取得し、それら規格内ソース要素をコンパイルすることで、前記規格外ソースプログラムに基づいて生成された擬装データモデルから前記規格内プログラミング言語のオブジェクトプログラムを生成することを特徴とするコンピュータプログラム。
A3. An intra-standard source program acquisition function for acquiring a source program described in a predetermined intra-standard programming language as an intra-standard source program;
In accordance with the grammatical rules of the intra-standard programming language, the intra-standard source element extraction function that extracts the elements of the program code constituting the intra-standard source program as intra-standard source elements;
According to the grammatical rules of the intra-standard programming language, the relationship between the intra-standard source elements in the intra-standard source program is specified, and based on the relationship, model elements associated with the intra-standard source elements are defined as predetermined structuring rules. A data model generation function for generating a data model having a predetermined interface for accessing the source element in the standard via the model element,
An object program based on the intra-standard source program is obtained by acquiring intra-standard source elements associated with each model element of the data model via the predetermined interface and compiling the intra-standard source elements. An object program generation function generated from the data model;
A non-standard source program acquisition function for acquiring a source program described in a non-standard programming language different from the predetermined standard programming language, as a non-standard source program;
In accordance with the grammatical rules of the non-standard programming language, a non-standard source element extraction function that extracts the elements of the program code constituting the non-standard source program as non-standard source elements;
Identify the intra-standard source element corresponding to each non-standard source element, identify the relationship between the intra-standard source elements according to the grammatical rules of the intra-standard programming language, and assign each intra-standard source element based on the relationship. A disguise data model generation function for generating a disguise data model having the predetermined interface for structuring a model element to be associated with the predetermined structuring rule and accessing the intra-standard source element via the model element;
Is realized on a computer,
The object program generation function acquires the intra-standard source elements associated with each model element via the predetermined interface of the impersonation data model, and compiles the intra-standard source elements, thereby A computer program for generating an object program of the programming language within the standard from a disguise data model generated based on a non-standard source program.

A4.コーディング支援装置に追加導入されることにより前記コーディング支援装置に機能を追加するコンピュータプログラムであって、
前記コーディング支援装置は、
所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得するソースプログラム取得部と、
前記規格内プログラミング言語の文法規則にしたがって、前記規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出部と、
前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の前記規格内ソースプログラムにおける関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成部と、
前記所定のインタフェースを介して、前記データモデルの各モデル要素に対応づけられている規格内ソース要素を取得し、それら規格内ソース要素をコンパイルすることで、前記規格内ソースプログラムに基づくオブジェクトプログラムを前記データモデルから生成するオブジェクトプログラム生成部と、
を備え、
前記コンピュータプログラムは、
前記ソースプログラム取得部が、前記所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得したとき、
前記規格外プログラミング言語の文法規則にしたがって、前記規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出機能と、
各規格外ソース要素に相当する規格内ソース要素を特定し、前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を前記所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための前記所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成機能と、
を前記コーディング支援装置に実現させ、
前記オブジェクトプログラム生成部は、前記擬装データモデルが有する前記所定のインタフェースを介して、各モデル要素に対応づけられている規格内ソース要素を取得し、それら規格内ソース要素をコンパイルすることで、前記規格外ソースプログラムに基づいて生成された擬装データモデルから前記規格内プログラミング言語のオブジェクトプログラムを生成することを特徴とするコンピュータプログラム。
A4. A computer program for adding a function to the coding support apparatus by being additionally introduced into the coding support apparatus,
The coding support apparatus includes:
A source program acquisition unit for acquiring a source program described in a predetermined standard programming language as a standard program;
In accordance with the grammatical rules of the intra-standard programming language, an intra-standard source element extraction unit that extracts program code elements constituting the intra-standard source program as intra-standard source elements;
According to the grammatical rules of the intra-standard programming language, the relationship between the intra-standard source elements in the intra-standard source program is specified, and based on the relationship, model elements associated with the intra-standard source elements are defined as predetermined structuring rules. And a data model generation unit that generates a data model having a predetermined interface for accessing the source element within the standard via the model element, and
An object program based on the intra-standard source program is obtained by acquiring intra-standard source elements associated with each model element of the data model via the predetermined interface and compiling the intra-standard source elements. An object program generation unit that generates from the data model;
With
The computer program is
When the source program acquisition unit acquires a source program described in a nonstandard programming language different from the predetermined standard programming language as a nonstandard source program,
In accordance with the grammatical rules of the non-standard programming language, a non-standard source element extraction function that extracts the elements of the program code constituting the non-standard source program as non-standard source elements;
Identify the intra-standard source element corresponding to each non-standard source element, identify the relationship between the intra-standard source elements according to the grammatical rules of the intra-standard programming language, and assign each intra-standard source element based on the relationship. A disguise data model generation function for generating a disguise data model having the predetermined interface for structuring a model element to be associated with the predetermined structuring rule and accessing the intra-standard source element via the model element;
Is realized in the coding support device,
The object program generation unit acquires the intra-standard source elements associated with each model element via the predetermined interface included in the impersonation data model, and compiles the intra-standard source elements, thereby A computer program for generating an object program of the programming language within the standard from a disguise data model generated based on a non-standard source program.

JAVA(登録商標)のコーディングを支援するIDEの機能構成を模式的に示す図である。It is a figure which shows typically the function structure of IDE which supports the coding of JAVA (trademark). COBOL用のコーディング支援機能を新規作成した場合のIDE100の機能構成を模式的に示す図である。It is a figure which shows typically the function structure of IDE100 at the time of newly producing the coding assistance function for COBOL. 本実施の形態におけるIDE100の機能構成を模式的に示す図である。It is a figure which shows typically the function structure of IDE100 in this Embodiment. 本実施の形態のIDE100における基本的な機能構成を示すブロック図である。It is a block diagram which shows the basic functional structure in IDE100 of this Embodiment. 図2のIDE100の詳細な機能構成を示すブロック図である。It is a block diagram which shows the detailed function structure of IDE100 of FIG. データモデル保持部22が保持するデータモデルおよび擬装データモデルを模式的に示す図である。It is a figure which shows typically the data model and the disguise data model which the data model holding part 22 hold | maintains. データモデルの各モデル要素が保持する属性を示す図である。It is a figure which shows the attribute which each model element of a data model hold | maintains. 擬装データモデルの各モデル要素が保持する属性を示す図である。It is a figure which shows the attribute which each model element of a disguise data model hold | maintains. COBOLソース要素と共通JAVA(登録商標)ソース要素との対応関係を示す図である。It is a figure which shows the correspondence of a COBOL source element and a common JAVA (trademark) source element. COBOLソース要素と、モデル生成用JAVA(登録商標)ソース要素と、コンパイル用JAVA(登録商標)ソース要素との対応関係を示す図である。It is a figure which shows the correspondence of a COBOL source element, a JAVA (registered trademark) source element for model generation, and a JAVA (registered trademark) source element for compilation. JAVA(登録商標)ソースプログラムを示す図である。It is a figure which shows a JAVA (trademark) source program. COBOLソースプログラムを示す図である。It is a figure which shows a COBOL source program. IDE100におけるコーディング支援処理の流れを示すフローチャートである。It is a flowchart which shows the flow of the coding assistance process in IDE100. 図10(a)の擬装データモデル生成処理の詳細を示すフローチャートである。It is a flowchart which shows the detail of the disguise data model production | generation process of Fig.10 (a). 図10(a)の続きを示すフローチャートである。It is a flowchart which shows the continuation of Fig.10 (a). 図10(a)の続きを示すフローチャートである。It is a flowchart which shows the continuation of Fig.10 (a). 集団項目を含むCOBOLソースプログラムを示す図である。It is a figure which shows the COBOL source program containing a group item. 図11(a)に対応する編集用JAVA(登録商標)ソースプログラムを示す図である。It is a figure which shows the JAVA (trademark) source program for edit corresponding to Fig.11 (a). 数値を取り扱うCOBOLソースプログラムを示す図である。It is a figure which shows the COBOL source program which handles a numerical value. 図12(a)に対応する編集用JAVA(登録商標)ソースプログラムを示す図である。FIG. 13 is a diagram showing an editing JAVA (registered trademark) source program corresponding to FIG. 図12(a)に対応するコンパイル用JAVA(登録商標)ソースプログラムを示す図である。It is a figure which shows the JAVA (trademark) source program for a compilation corresponding to Fig.12 (a). SECTION呼び出しを含むCOBOLソースプログラムを示す図である。It is a figure which shows the COBOL source program containing a SECTION call. 図13(a)に対応する編集用JAVA(登録商標)ソースプログラムを示す図である。FIG. 14 is a diagram showing an editing JAVA (registered trademark) source program corresponding to FIG. 図13(a)に対応するコンパイル用JAVA(登録商標)ソースプログラムを示す図である。FIG. 14 is a diagram illustrating a compiling JAVA (registered trademark) source program corresponding to FIG.

符号の説明Explanation of symbols

10 ユーザインタフェース処理部、12 要求受付部、14 表示部、20 データ記憶部、22 データモデル保持部、24 言語対応情報保持部、30 データ処理部、40 JAVA(登録商標)処理部、42 ソースプログラム取得部、44 ソース要素抽出部、46 データモデル生成部、48 編集部、50 ソースプログラム更新部、52 オブジェクトプログラム生成部、54 コンパイルエラー通知部、60 COBOL処理部、62 COBOLソースプログラム取得部、64 COBOLソース要素抽出部、66 擬装データモデル生成部、68 COBOLソースプログラム更新部、70 ソースプログラム生成部、100 IDE、200 ソースプログラム、300 オブジェクトプログラム、400 ユーザ、602 モデル要素欄、604 親モデル要素欄、606 JAVA(登録商標)ソース要素欄、608 依存元モデル要素欄、610 COBOLソース要素欄、612 モデル生成用JAVA(登録商標)ソース要素欄、614 コンパイル用JAVA(登録商標)ソース要素欄、622 COBOLソース要素欄、624 共通JAVA(登録商標)ソース要素欄、626 モデル生成用JAVA(登録商標)ソース要素欄、628 コンパイル用JAVA(登録商標)ソース要素欄、802 JAVA(登録商標)ソースプログラム、804 データモデル処理機能、806 データモデル、808 編集機能、810 検索機能、812 整形機能、822 COBOLソースプログラム、824 新規データモデル処理機能、826 新規データモデル、828 新規編集機能、830 新規検索機能、832 新規整形機能、844 擬装データモデル処理機能、846 擬装データモデル。   10 user interface processing unit, 12 request receiving unit, 14 display unit, 20 data storage unit, 22 data model holding unit, 24 language correspondence information holding unit, 30 data processing unit, 40 JAVA (registered trademark) processing unit, 42 source program Acquisition unit, 44 Source element extraction unit, 46 Data model generation unit, 48 Editing unit, 50 Source program update unit, 52 Object program generation unit, 54 Compilation error notification unit, 60 COBOL processing unit, 62 COBOL source program acquisition unit, 64 COBOL source element extraction unit, 66 disguise data model generation unit, 68 COBOL source program update unit, 70 source program generation unit, 100 IDE, 200 source program, 300 object program, 400 user, 602 model Element column, 604 Parent model element column, 606 JAVA (registered trademark) source element column, 608 Dependent model element column, 610 COBOL source element column, 612 JAVA (registered trademark) source element column for model generation, 614 JAVA for compilation ( (Registered trademark) source element column, 622 COBOL source element column, 624 common JAVA (registered trademark) source element column, 626 JAVA (registered trademark) source element column for model generation, 628 JAVA (registered trademark) source element column for compilation, 802 JAVA (registered trademark) source program, 804 data model processing function, 806 data model, 808 editing function, 810 search function, 812 shaping function, 822 COBOL source program, 824 new data model processing function, 826 new data model, 8 8 new editing capabilities, 830 new search function, 832 new shaping function, 844 disguise data model processing function, 846 disguise data model.

Claims (7)

所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得する規格内ソースプログラム取得部と、
前記規格内プログラミング言語の文法規則にしたがって、前記規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出部と、
前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の前記規格内ソースプログラムにおける関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成部と、
ユーザによりいずれかのモデル要素が編集対象として選択されたとき、そのモデル要素にアクセスするための前記所定のインタフェースを介して、前記モデル要素に対応づけられている規格内ソース要素を編集対象として特定する編集部と、
前記所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得する規格外ソースプログラム取得部と、
前記規格外プログラミング言語の文法規則にしたがって、前記規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出部と、
各規格外ソース要素に相当する規格内ソース要素を特定し、前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、前記関係に基づいて、各規格外ソース要素および各規格内ソース要素に対応づけられるモデル要素を前記所定の構造化規則により構造化し、モデル要素を介して前記規格外ソース要素にアクセスするための前記所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成部と、
を備え、
前記編集部は、前記規格外ソースプログラムに基づいて生成された擬装データモデルであっても、ユーザによりいずれかのモデル要素が編集対象として選択されたときには、そのモデル要素にアクセスするための前記所定のインタフェースを介して、前記モデル要素に対応づけられている規格外ソース要素を編集対象として特定することにより、規格内ソースプログラムに加えて、規格外ソースプログラムのコーディングも前記データモデルを介して支援することを特徴とするコーディング支援装置。
An intra-standard source program acquisition unit that acquires a source program described in a predetermined intra-standard programming language as an intra-standard source program;
In accordance with the grammatical rules of the intra-standard programming language, an intra-standard source element extraction unit that extracts program code elements constituting the intra-standard source program as intra-standard source elements;
According to the grammatical rules of the intra-standard programming language, the relationship between the intra-standard source elements in the intra-standard source program is specified, and based on the relationship, model elements associated with the intra-standard source elements are defined as predetermined structuring rules. And a data model generation unit that generates a data model having a predetermined interface for accessing the source element within the standard via the model element, and
When any model element is selected for editing by the user, the standard source element associated with the model element is specified as the editing target via the predetermined interface for accessing the model element. Editing department to
A non-standard source program acquisition unit that acquires a source program described in a non-standard programming language different from the predetermined standard programming language, as a non-standard source program;
In accordance with the grammatical rules of the non-standard programming language, a non-standard source element extraction unit that extracts an element of a program code constituting the non-standard source program as a non-standard source element;
Identify a nonstandard source element corresponding to each nonstandard source element, identify a relationship between each standard source element according to the grammatical rules of the standard programming language, and based on the relationship, each nonstandard source element and Modeling associated with each intra-standard source element is structured by the predetermined structuring rules, and impersonation data model having the predetermined interface for accessing the non-standard source element via the model element is generated. A data model generator,
With
Even if the editing unit is a disguised data model generated based on the non-standard source program, when any model element is selected for editing by the user, the predetermined unit for accessing the model element is used. By specifying the non-standard source element associated with the model element as an object to be edited through the interface, it is possible to support coding of the non-standard source program via the data model in addition to the standard program. A coding support apparatus.
前記編集部は、前記規格内ソースプログラムの規格内ソース要素を表示させるときには、表示対象となるモデル要素に対応づけられた前記規格内ソース要素に応じて前記表示の態様を決定し、前記所定のインタフェースを介して取得した前記規格内ソース要素を前記決定した表示の態様にて表示させ、前記規格外ソースプログラムの規格外ソース要素を表示させるときには、表示対象となるモデル要素に対応づけられた前記規格内ソース要素に応じて前記表示の態様を決定し、前記所定のインタフェースを介して取得した前記規格外ソース要素を前記決定した表示の態様にて表示させることを特徴とする請求項1に記載のコーディング支援装置。   When displaying the intra-standard source element of the intra-standard source program, the editing unit determines the display mode according to the intra-standard source element associated with the model element to be displayed, and When the non-standard source element acquired through the interface is displayed in the determined display mode and the non-standard source element of the non-standard source program is displayed, the source element is associated with the model element to be displayed. 2. The display mode according to claim 1, wherein the display mode is determined according to an intra-standard source element, and the non-standard source element acquired via the predetermined interface is displayed in the determined display mode. Coding support device. 前記擬装データモデル生成部は、前記規格外ソース要素が規格外ソースプログラムにおける他の規格外ソース要素と文法上の依存関係を有しているときには、前記規格外ソース要素に対応づけられる前記モデル要素に前記依存関係を示す依存関係情報を対応づけ、
前記編集部は、前記規格外ソース要素が変更されたとき、当該規格外ソース要素に対応づけられたモデル要素の依存関係情報を参照し、前記変更された規格外ソース要素と依存関係を有する規格外ソース要素も併せて変更することを特徴とする請求項1または2に記載のコーディング支援装置。
When the non-standard source element has a grammatical dependency relationship with other non-standard source elements in the non-standard source program, the impersonation data model generation unit associates the model element with the non-standard source element Is associated with the dependency information indicating the dependency,
When the non-standard source element is changed, the editing unit refers to the dependency information of the model element associated with the non-standard source element, and has a dependency relationship with the changed non-standard source element. The coding support apparatus according to claim 1 or 2, wherein an outside source element is also changed.
前記規格外プログラミング言語特有の規格外ソース要素を所定の関数に対応づけるためのライブラリ情報を保持する言語対応情報保持部をさらに備え、
前記擬装データモデル生成部は、前記特有の規格外ソース要素に相当する規格内ソース要素を特定するとき、前記特有の規格外ソース要素に相当する所定の関数を前記ライブラリ情報から特定し、前記特定した関数を規格内ソース要素として前記モデル要素に対応づけることを特徴とする請求項1に記載のコーディング支援装置。
A language correspondence information holding unit for holding library information for associating a nonstandard source element specific to the nonstandard programming language with a predetermined function;
The impersonation data model generation unit specifies a predetermined function corresponding to the specific non-standard source element from the library information when specifying an intra-standard source element corresponding to the specific non-standard source element, and The coding support apparatus according to claim 1, wherein the function is associated with the model element as an intra-standard source element.
前記所定のインタフェースを介して、擬装データモデルのモデル要素に対応づけられた前記規格内ソース要素を取得し、前記擬装データモデルの構造にしたがって前記取得した規格内ソース要素を組み合わせることにより規格内ソースプログラムを生成するソースプログラム生成部をさらに備えることを特徴とする請求項1または4に記載のコーディング支援装置。   By obtaining the intra-standard source element associated with the model element of the impersonation data model via the predetermined interface, and combining the acquired intra-standard source element according to the structure of the impersonation data model, The coding support apparatus according to claim 1, further comprising a source program generation unit that generates a program. 所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得する規格内ソースプログラム取得機能と、
前記規格内プログラミング言語の文法規則にしたがって、前記規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出機能と、
前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の前記規格内ソースプログラムにおける関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成機能と、
ユーザによりいずれかのモデル要素が編集対象として選択されたとき、そのモデル要素にアクセスするための前記所定のインタフェースを介して、前記モデル要素に対応づけられている規格内ソース要素を編集対象として特定する編集機能と、
前記所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得する規格外ソースプログラム取得機能と、
前記規格外プログラミング言語の文法規則にしたがって、前記規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出機能と、
各規格外ソース要素に相当する規格内ソース要素を特定し、前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、前記関係に基づいて、各規格外ソース要素および各規格内ソース要素に対応づけられるモデル要素を前記所定の構造化規則により構造化し、モデル要素を介して前記規格外ソース要素にアクセスするための前記所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成機能と、
をコンピュータに実現させ、
前記編集機能は、前記規格外ソースプログラムに基づいて生成された擬装データモデルであっても、ユーザによりいずれかのモデル要素が編集対象として選択されたときには、そのモデル要素にアクセスするための前記所定のインタフェースを介して、前記モデル要素に対応づけられている規格外ソース要素を編集対象として特定することにより、規格内ソースプログラムに加えて、規格外ソースプログラムのコーディングも前記データモデルを介して支援することを特徴とするコンピュータプログラム。
An intra-standard source program acquisition function for acquiring a source program described in a predetermined intra-standard programming language as an intra-standard source program;
In accordance with the grammatical rules of the intra-standard programming language, the intra-standard source element extraction function that extracts the elements of the program code constituting the intra-standard source program as intra-standard source elements;
According to the grammatical rules of the intra-standard programming language, the relationship between the intra-standard source elements in the intra-standard source program is specified, and based on the relationship, model elements associated with the intra-standard source elements are defined as predetermined structuring rules. A data model generation function for generating a data model having a predetermined interface for accessing the source element in the standard via the model element,
When any model element is selected for editing by the user, the standard source element associated with the model element is specified as the editing target via the predetermined interface for accessing the model element. Editing function to
A non-standard source program acquisition function for acquiring a source program described in a non-standard programming language different from the predetermined standard programming language, as a non-standard source program;
In accordance with the grammatical rules of the non-standard programming language, a non-standard source element extraction function that extracts the elements of the program code constituting the non-standard source program as non-standard source elements;
Identify a nonstandard source element corresponding to each nonstandard source element, identify a relationship between each standard source element according to the grammatical rules of the standard programming language, and based on the relationship, each nonstandard source element and Modeling associated with each intra-standard source element is structured by the predetermined structuring rules, and impersonation data model having the predetermined interface for accessing the non-standard source element via the model element is generated. Data model generation function,
Is realized on a computer,
Even if the editing function is a disguise data model generated based on the non-standard source program, when any model element is selected for editing by the user, the predetermined function for accessing the model element is used. By specifying the non-standard source element associated with the model element as an object to be edited through the interface, it is possible to support coding of the non-standard source program via the data model in addition to the standard program. A computer program characterized by:
コーディング支援装置に追加導入されることにより前記コーディング支援装置に機能を追加するコンピュータプログラムであって、
前記コーディング支援装置は、
所定の規格内プログラミング言語で記述されたソースプログラムを規格内ソースプログラムとして取得するソースプログラム取得部と、
前記規格内プログラミング言語の文法規則にしたがって、前記規格内ソースプログラムを構成するプログラムコードの要素を規格内ソース要素として抽出する規格内ソース要素抽出部と、
前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素の前記規格内ソースプログラムにおける関係を特定し、前記関係に基づいて、各規格内ソース要素に対応づけられるモデル要素を所定の構造化規則により構造化し、モデル要素を介して前記規格内ソース要素にアクセスするための所定のインタフェースを有するデータモデルを生成するデータモデル生成部と、
ユーザによりいずれかのモデル要素が編集対象として選択されたとき、そのモデル要素にアクセスするための前記所定のインタフェースを介して、前記モデル要素に対応づけられている規格内ソース要素を編集対象として特定する編集部と、
を備え、
前記コンピュータプログラムは、
前記ソースプログラム取得部が、前記所定の規格内プログラミング言語とは異なる規格外プログラミング言語で記述されたソースプログラムを規格外ソースプログラムとして取得するとき、
前記規格外プログラミング言語の文法規則にしたがって、前記規格外ソースプログラムを構成するプログラムコードの要素を規格外ソース要素として抽出する規格外ソース要素抽出機能と、
各規格外ソース要素に相当する規格内ソース要素を特定し、前記規格内プログラミング言語の文法規則にしたがって各規格内ソース要素間の関係を特定し、前記関係に基づいて、各規格外ソース要素および各規格内ソース要素に対応づけられるモデル要素を前記所定の構造化規則により構造化し、モデル要素を介して前記規格外ソース要素にアクセスするための前記所定のインタフェースを有する擬装データモデルを生成する擬装データモデル生成機能と、
を前記コーディング支援装置に実現させ、
前記編集部は、前記規格外ソースプログラムに基づいて生成された擬装データモデルであっても、ユーザによりいずれかのモデル要素が編集対象として選択されたときには、そのモデル要素にアクセスするための前記所定のインタフェースを介して、前記モデル要素に対応づけられている規格外ソース要素を編集対象として特定することにより、規格内ソースプログラムに加えて、規格外ソースプログラムのコーディングも前記データモデルを
介して支援することを特徴とするコンピュータプログラム。
A computer program for adding a function to the coding support apparatus by being additionally introduced into the coding support apparatus,
The coding support apparatus includes:
A source program acquisition unit for acquiring a source program described in a predetermined standard programming language as a standard program;
In accordance with the grammatical rules of the intra-standard programming language, an intra-standard source element extraction unit that extracts program code elements constituting the intra-standard source program as intra-standard source elements;
According to the grammatical rules of the intra-standard programming language, the relationship between the intra-standard source elements in the intra-standard source program is specified, and based on the relationship, model elements associated with the intra-standard source elements are defined as predetermined structuring rules. And a data model generation unit that generates a data model having a predetermined interface for accessing the source element within the standard via the model element, and
When any model element is selected for editing by the user, the standard source element associated with the model element is specified as the editing target via the predetermined interface for accessing the model element. Editing department to
With
The computer program is
When the source program acquisition unit acquires a source program described in a non-standard programming language different from the predetermined standard programming language as a non-standard source program,
In accordance with the grammatical rules of the non-standard programming language, a non-standard source element extraction function that extracts the elements of the program code constituting the non-standard source program as non-standard source elements;
Identify a nonstandard source element corresponding to each nonstandard source element, identify a relationship between each standard source element according to the grammatical rules of the standard programming language, and based on the relationship, each nonstandard source element and Modeling associated with each intra-standard source element is structured by the predetermined structuring rules, and impersonation data model having the predetermined interface for accessing the non-standard source element via the model element is generated. Data model generation function,
Is realized in the coding support device,
Even if the editing unit is a disguised data model generated based on the non-standard source program, when any model element is selected for editing by the user, the predetermined unit for accessing the model element is used. By specifying the non-standard source element associated with the model element as an object to be edited through the interface, it is possible to support coding of the non-standard source program via the data model in addition to the standard program. A computer program characterized by:
JP2007267108A 2007-10-12 2007-10-12 Coding support device Active JP4971095B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007267108A JP4971095B2 (en) 2007-10-12 2007-10-12 Coding support device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007267108A JP4971095B2 (en) 2007-10-12 2007-10-12 Coding support device

Publications (2)

Publication Number Publication Date
JP2009098750A JP2009098750A (en) 2009-05-07
JP4971095B2 true JP4971095B2 (en) 2012-07-11

Family

ID=40701723

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007267108A Active JP4971095B2 (en) 2007-10-12 2007-10-12 Coding support device

Country Status (1)

Country Link
JP (1) JP4971095B2 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002182915A (en) * 2000-12-19 2002-06-28 Tokio Marine & Fire Insurance Co Ltd Source program storage method, its system, source program restoring method and system, and compiling method and device
JP2004038297A (en) * 2002-06-28 2004-02-05 Jcreation Co Ltd Program format conversion apparatus and conversion program
US7480897B2 (en) * 2005-03-10 2009-01-20 International Business Machines Corporation Method and system for managing development objects for computer program code
JP5399601B2 (en) * 2005-05-31 2014-01-29 日本電気株式会社 Implementation code development system and implementation code development program

Also Published As

Publication number Publication date
JP2009098750A (en) 2009-05-07

Similar Documents

Publication Publication Date Title
US7610545B2 (en) Annotations for tracking provenance
Nathan Windows presentation foundation unleashed
US9524279B2 (en) Help document animated visualization
US9471282B2 (en) System and method for using annotations to automatically generate a framework for a custom javaserver faces (JSF) component
US20050091037A1 (en) System and method for providing context to an input method
US20080127060A1 (en) Dynamic mating of a modified user interface with pre-modified user interface code library
KR20040097909A (en) Reflection-based processing of input parameters for commands
KR20140067018A (en) Describing native application programming interfaces of an operating system with metadata
JP2008262551A (en) Method and system for metamodeling using dynamic ontology object
CN113064593B (en) Method and device for dynamic mobile APP, computer equipment and storage medium
JP2012221380A (en) Automatic program generation device, method and computer program
KR20130017337A (en) Hybrid app development platform architecture and test method of the same, and computer-readable recording medium with program for the same
KR20080043345A (en) Declaratively defined control actions
CN112818176B (en) Data processing method, device, equipment and storage medium
CN113934429A (en) Design draft conversion method and device, computer equipment and storage medium
JP4971096B2 (en) Coding support device
US7657869B2 (en) Integration of external tools into an existing design environment
CN113138755A (en) JSON serialization and deserialization optimization method and system
EP1403764A1 (en) Method and computer system for dynamic data type enrichment
CN116028062A (en) Target code generation method, NPU instruction display method and device
JP4971095B2 (en) Coding support device
CN115390846A (en) Compiling construction method and device, electronic equipment and storage medium
CN111782196A (en) MVP architecture-based development method and device
KR100846203B1 (en) Method for generating mobile application and record media recorded program for realizing the same
CN112732254B (en) Webpage development method, webpage development device, computer equipment and storage medium

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100315

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120321

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20120403

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120405

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150413

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 4971095

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250