JP2004362343A - Source code conversion apparatus, source code conversion method, and program - Google Patents

Source code conversion apparatus, source code conversion method, and program Download PDF

Info

Publication number
JP2004362343A
JP2004362343A JP2003161029A JP2003161029A JP2004362343A JP 2004362343 A JP2004362343 A JP 2004362343A JP 2003161029 A JP2003161029 A JP 2003161029A JP 2003161029 A JP2003161029 A JP 2003161029A JP 2004362343 A JP2004362343 A JP 2004362343A
Authority
JP
Japan
Prior art keywords
conversion
source code
arrangement
rule
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2003161029A
Other languages
Japanese (ja)
Other versions
JP4686117B2 (en
Inventor
Masaki Yonetani
雅樹 米谷
Seiji Hamada
濱田 誠司
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.)
International Business Machines Corp
Original Assignee
International Business Machines Corp
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 International Business Machines Corp filed Critical International Business Machines Corp
Priority to JP2003161029A priority Critical patent/JP4686117B2/en
Publication of JP2004362343A publication Critical patent/JP2004362343A/en
Application granted granted Critical
Publication of JP4686117B2 publication Critical patent/JP4686117B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)
  • Stored Programmes (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To convert the source code of an existing application so that it can operate in a target environment without reducing an advantage to use a standardized framework in the target environment. <P>SOLUTION: A source code conversion apparatus is provided with: a picture analysis processing part 11 to analyze a source code stored in an existing application source code storing part 10; a picture analysis information storing part 12 to store picture analysis information which is the above analysis result; an element conversion processing part 13 to convert the picture analysis information according to a predetermined conversion rule; a new application source template storing part 14 to store a new application source template which is the above conversion result; an element arrangement processing part 15 to arrange the new application source template into a target environment based on a predetermined arrangement rule; and a new application template storing part 16 to store a new application template which is the above arrangement result. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

【0001】
【発明の属する技術分野】
本発明は、過去に開発されたアプリケーションプログラム(以下、単に「アプリケーション」という)のソースコードを、移行したい環境(以下、「ターゲット環境」という)で動作するように変換する技術に関し、特に、ターゲット環境における標準化されたフレームワークに適合するようにソースコードの変換を行うソースコード変換装置等に関する。
【0002】
【従来の技術】
今日、WebSphere Application ServerをはじめとするJ2EE(Java 2 Enterprise Edition)環境の普及により、過去に開発された既存アプリケーションをJ2EE環境に移行させ稼動させたいという要求が増えてきている(WebSphereは、IBM Corporationの米国およびその他の国における商標。)。しかし、そのような既存アプリケーションは、J2EE環境で動作するアプリケーションの開発言語であるJAVAとは異なる言語、例えば、Visual Basic等で開発されている場合が多い(JAVAおよびすべてのJAVA関連の商標およびロゴは、Sun Microsystems, Inc.の米国およびその他の国における商標または登録商標。Visual Basicは、米国およびその他の国における米国Microsoft Corp.の登録商標。)。また、クラスライブラリ(例えば、DBアクセス)、フレームワークのみならず、アプリケーションの稼動形態においてもJ2EE環境とは異なる場合が多い。例えば、既存アプリケーションの環境が、アプリケーションのロジックが配置されるクライアントと、アプリケーションが使用するデータが配置されるサーバという2階層の構造をしているのに対し、J2EE環境が、画面表示を主に行うクライアントと、アプリケーションのロジックが配置されるアプリケーションサーバと、アプリケーションが使用するデータが配置されるデータベースサーバという3階層の構造をしている等の違いである。従って、既存アプリケーションをJ2EE環境に移行するのは容易ではなく、その作業には多大な工数が必要となる。
【0003】
そこで、過去に開発されたアプリケーションの新しい環境への移行を支援するため、従来は、既存システムを解析し、新システム構築の際に必要となる画面情報を出力したり(例えば、特許文献1参照。)、既存システムを解析し、新システムのインターフェース情報(画面定義情報・画面動作情報・画面遷移情報)を再生成したりしていた(例えば、特許文献2参照。)。
【0004】
【特許文献1】
特開2001−027946号公報(第3−5頁、図2)
【特許文献2】
特開2001−134423号公報(第2−4頁、図2)
【0005】
【発明が解決しようとする課題】
ところで、近年、アプリケーション移行時における、品質、生産性、保守性向上の観点から、フレームワークを採用するケースが増えている。フレームワークとは、Webアプリケーションを開発するための枠組みであり、規定されていない細部を規定することによって1つの完成したWebアプリケーションを効率的に開発できるようにするためのものである。フレームワークには、例えば、アパッチ・ソフトウェア・ファウンデーションの「Jakartaプロジェクト」が開発する「Struts」のように急速に人気を集め、標準的に用いられているものも存在する。
【0006】
しかしながら、特許文献1、2には、既存システムにおけるインターフェース情報を表示することで新システムにおけるインターフェース情報の構築作業を軽減することしか述べられておらず、新システムで採用するWebアプリケーションフレームワークに適合するようにインターフェース情報を変換することは行っていなかった。即ち、ターゲット環境における標準化されたフレームワークを利用することによる利点を減ずることなく既存アプリケーションのソースコードをターゲット環境で動作するように変換することはできないという問題点があった。
【0007】
本発明は、以上のような技術的課題を解決するためになされたものであって、その目的は、既存アプリケーションのソースコードを、ターゲット環境における標準化されたフレームワークを利用することによる利点を減ずることなく、ターゲット環境で動作するように変換することにある。
また他の目的は、既存アプリケーションのソースコードをターゲット環境における標準化されたフレームワークに適合させるための変換を柔軟に行えるようにすることにある。
更に他の目的は、既存アプリケーションのソースコードを複数のフレームワークのうちの所望のものに適合するよう変換できるようにすることにある。
【0008】
【課題を解決するための手段】
かかる目的のもと、本発明は、既存アプリケーションのソースコードを、ターゲット環境におけるアプリケーションリソーステンプレートに変換している。即ち、本発明のソースコード変換装置は、アプリケーションプログラムのソースコードを解析して解析情報(図1の画面解析情報に対応)を生成する解析手段(図1の画面解析処理部11に対応)と、この解析手段により生成された解析情報を予め定められた変換規則(変換ルール)に従って変換することで、所定のターゲット環境におけるアプリケーションリソーステンプレートを生成する変換手段(図1の要素変換処理部13に対応)とを備えている。
【0009】
また、本発明において、既存アプリケーションのソースコードを解析して得られる画面解析情報は、ソースコードから抽出した各要素を細分化し、分離して保持するようにしている。即ち、本発明のソースコード変換装置において、解析手段は、ソースコードから複数の要素を抽出し、各要素を分離して解析情報に含めることを特徴とする。尚、この場合、変換規則が、解析情報に含まれる変換前の要素または要素集合と、アプリケーションリソーステンプレートに含まれる変換後の要素との対応を規定し、変換手段が、変換規則を参照し、変換前の要素または要素集合を、対応する変換後の要素に変換するようにすることができる。また、変換規則が、複数のターゲット環境の各々に対応して設けられ、変換手段が、解析情報を、要求されたターゲット環境に対応する変換規則に従って変換するようにすることもできる。
【0010】
一方、本発明のソースコード変換装置は、アプリケーションリソーステンプレートを予め定められた配置規則(配置ルール)に従ってターゲット環境に配置することで、アプリケーションテンプレートを生成する配置手段(図1の要素配置処理部15に対応)を更に備える。
【0011】
また、配置規則が、アプリケーションリソーステンプレートと、アプリケーションリソーステンプレートをターゲット環境に配置するための配置処理情報との対応を規定し、配置手段が、配置規則を参照し、アプリケーションリソーステンプレートを配置処理情報に基づいてターゲット環境に配置するようにすることができる。更に、配置手段は、配置処理情報がターゲット環境におけるアプリケーションリソーステンプレートの配置位置をユーザが指定可能なことを示す場合に、配置位置をユーザに指定させることもできる。更にまた、配置規則が、複数のターゲット環境の各々に対応して設けられ、配置手段が、アプリケーションリソーステンプレートを、要求されたターゲット環境に対応する配置規則に従って配置するようにすることもできる。
【0012】
他の観点から捉えると、本発明のソースコード変換方法は、アプリケーションプログラムのソースコードを解析して解析情報を生成するステップ(図4のステップ101に対応)と、生成された解析情報(図4の画面解析情報に対応)を予め記憶装置に記憶された変換規則(変換ルール)に従って変換することで、所定のターゲット環境におけるアプリケーションリソーステンプレートを生成するステップ(図4のステップ104〜106に対応)と、生成されたアプリケーションリソーステンプレートを予め記憶装置に記憶された配置規則(配置ルール)に従ってターゲット環境に配置することで、アプリケーションテンプレートを生成するステップ(図4のステップ107、108に対応)とを含んでいる。
【0013】
また、解析情報を生成するステップでは、ソースコードから複数の要素を抽出し、各要素を分離して木構造で表現した中間ソースコードを、解析情報として記憶することを特徴とする。尚、この場合、アプリケーションリソーステンプレートを生成するステップでは、記憶装置から、変換前の要素または要素集合と変換後の要素とを対応付けた変換規則を読み出し、その変換規則において変換前の要素または要素集合として規定される解析情報内の要素を、対応する変換後の要素に変換することで、解析情報を変換するようにすることができる。また、アプリケーションリソーステンプレートを生成するステップでは、記憶装置に記憶された複数の変換規則のうち、要求されたターゲット環境に対応する変換規則を読み出し、解析情報をその変換規則に従って変換するようにすることもできる。
【0014】
更に、アプリケーションテンプレートを生成するステップでは、記憶装置から、各アプリケーションリソーステンプレートと各アプリケーションリソーステンプレートをターゲット環境に配置するための配置処理情報とを対応付けた配置規則を読み出し、アプリケーションリソーステンプレートを対応する配置処理情報に基づいてターゲット環境に配置するようにすることができる。更にまた、アプリケーションテンプレートを生成するステップでは、記憶装置に記憶された複数の配置規則のうち、要求されたターゲット環境に対応する配置規則を読み出し、アプリケーションリソーステンプレートをその配置規則に従って配置するようにすることもできる。
【0015】
ここで、本発明は、コンピュータに所定の機能を実現させるプログラムとして把握することができる。即ち、本発明のプログラムは、コンピュータに、アプリケーションプログラムのソースコードを解析して解析情報(図1の画面解析情報に対応)を生成する機能(図1の画面解析処理部11に対応)と、生成された解析情報を予め記憶装置に記憶された変換規則(変換ルール)に従って変換することで、所定のターゲット環境におけるアプリケーションリソーステンプレートを生成する機能(図1の要素変換処理部13に対応)と、生成されたアプリケーションリソーステンプレートを予め記憶装置に記憶された配置規則(配置ルール)に従ってターゲット環境に配置することで、アプリケーションテンプレートを生成する機能(図1の要素配置処理部15に対応)とを実現させる。
【0016】
また、解析情報を生成する機能では、ソースコードから複数の要素を抽出し、各要素を分離して木構造で表現した中間ソースコードを、解析情報として記憶する機能を更に実現させることを特徴とする。尚、この場合、アプリケーションリソーステンプレートを生成する機能では、記憶装置に記憶された複数の変換規則のうち、要求されたターゲット環境に対応する変換規則を読み出し、解析情報をその変換規則に従って変換する機能を更に実現させることができる。また、アプリケーションテンプレートを生成する機能では、記憶装置に記憶された複数の配置規則のうち、要求されたターゲット環境に対応する配置規則を読み出し、アプリケーションリソーステンプレートをその配置規則に従って配置する機能を更に実現させることもできる。
【0017】
【発明の実施の形態】
以下、添付図面に示す実施の形態に基づいて本発明を詳細に説明する。
図1は、本実施の形態の全体構成を示すブロック図である。図1に示すように、本実施の形態は、既存アプリケーションソースコード記憶部10と、画面解析処理部11と、画面解析情報記憶部12と、要素変換処理部13と、新規アプリケーションリソーステンプレート記憶部14と、要素配置処理部15と、新規アプリケーションテンプレート記憶部16とを含む。
【0018】
既存アプリケーションソースコード記憶部10は、過去に開発された既存アプリケーションのソースコードを記憶する部分である。アプリケーションは、通常、画面定義部、操作仕様実装部、業務仕様実装部から構成されるが、本実施の形態では、画面解析処理部11がこれらのうち画面定義部と操作仕様実装部のみを解析するので、この2つの部分を四角囲みで示している。
【0019】
画面解析処理部11は、既存アプリケーションソースコード記憶部10に記憶された既存アプリケーションソースコードの画面定義部と操作仕様実装部とから、画面定義、画面遷移定義、イベント定義のみを抽出し、画面解析情報を生成して画面解析情報記憶部12に記憶する部分である。
【0020】
画面解析情報記憶部12は、画面解析処理部11により抽出された画面解析情報を記憶する部分である。画面解析情報内の要素としては、画面定義、画面遷移定義、イベント定義がある。また、画面定義内の要素としては、画面要素定義、各画面要素属性があり、画面遷移定義内の要素としては、遷移元画面、遷移先画面・状態、遷移条件、遷移起動イベントがあり、イベント定義内の要素としては、イベントソース、イベント種別がある。尚、画面解析情報は、再利用可能な中間形式のフォーマットで保持される。例えば、各要素をXML形式等の木構造で記述したソースコード(以下、「中間ソースコード」という)として保持される。この中間ソースコードにおいて、要素間の関係は、親子関係または接続要素で保持され、要素集合変換時に必要とする要素を収集し易くしている。
【0021】
要素変換処理部13は、画面解析情報記憶部12から画面解析情報を入力し、要求されたターゲット環境の種別に応じた変換ルールに従い各要素を変換して新規アプリケーションリソーステンプレートを生成し、新規アプリケーションリソーステンプレート記憶部14に出力する部分である。例えば、要求され得るターゲット環境として、StrutsとXFormsとがあれば、Struts用変換ルールとXForms用変換ルールとが用意され、要求されたターゲット環境に応じてこのいずれかが選択され用いられる。
【0022】
新規アプリケーションリソーステンプレート記憶部14は、要素変換処理部13により生成された新規アプリケーションリソーステンプレートを記憶する部分である。ここで、「アプリケーションリソーステンプレート」とは、フレームワークにおいて必要となるファイルのことで、以下、単に「リソース」ともいう。これには、例えば、画面リソース、構成ファイル、ソースコード等がある。
【0023】
要素配置処理部15は、新規アプリケーションリソーステンプレート記憶部14に記憶されたアプリケーションリソーステンプレートを要求されたターゲット環境の種別に応じた配置ルールに従い配置して新規アプリケーションテンプレートを生成し、新規アプリケーションテンプレート記憶部16に出力する部分である。例えば、要求され得るターゲット環境として、StrutsとXFormsとがあれば、Struts用配置ルールとXForms用配置ルールとが用意され、要求されたターゲット環境に応じてこのいずれかが選択され用いられる。尚、これらの配置ルールに定義される配置情報については、対象Webアプリケーションフレームワークに応じてそのデフォルト値が与えられている。また、対象Webアプリケーションフレームワークにおける配置情報をユーザが必要に応じて入力し画面解析情報に付加することもできるようになっている。
【0024】
新規アプリケーションテンプレート記憶部16は、要素配置処理部15により生成された新規アプリケーションテンプレートを記憶する部分である。ここで、「アプリケーションテンプレート」とは、フレームワークにリソースが配置されたものである。例えば、要求され得るターゲット環境として、StrutsとXFormsとがあれば、Struts用新規アプリケーションテンプレートと、XForms用新規アプリケーションテンプレートとが生成可能である。
【0025】
尚、本実施の形態は、コンピュータシステムにより実現される。本実施の形態を実現するコンピュータシステムのハードウェア構成は、中央処理装置(CPU)、主記憶装置、ハードディスク装置等の補助記憶装置、入力装置、出力装置を備えた一般的なものでよい。
補助記憶装置には、画面解析処理部11、要素変換処理部13、要素配置処理部15を実現するためのプログラムが記憶され、CPUがこのプログラムを主記憶装置に読み込んで実行することにより、画面解析処理部11、要素変換処理部13、要素配置処理部15が実現される。また、補助記憶装置は、既存アプリケーションソースコード記憶部10、新規アプリケーションリソーステンプレート記憶部14、新規アプリケーションテンプレート記憶部16としても機能する。更に、要素変換処理部13で用いられる変換ルール、要素配置処理部15で用いられる配置ルールを補助記憶装置に記憶するようにしてもよい。
【0026】
次に、画面解析処理部11および要素変換処理部13における処理を、概念図を参照しながら説明する。ここでは、既存アプリケーションの開発言語としてよく用いられるVisual Basicで開発されたアプリケーションを、J2EE環境でよく用いられるStrutsフレームワークのリソースへ変換する場合を例にとって説明する。但し、既存アプリケーションの開発言語はVisual Basicに限られるものではなく、ターゲット環境における開発言語と異なるものであれば、如何なる言語であってもよい。また、ターゲット環境もStrutsフレームワークに限らず、XForms等、他の環境であってよい。
【0027】
まず、画面解析処理部11がVisual Basicで記述されたアプリケーションの各要素を画面解析情報の各要素に変換する時の処理について説明する。
Visual Basicで記述されたアプリケーションは、イベントドリブンであるので、画面要素とイベントハンドラ、イベントハンドラ内の各要素が密に結合している。従って、そのまま、アプリケーション構造を変換することは容易でない。そこで、本実施の形態では、Visual Basicの各要素を細分化し、それら要素間の結合を緩めて保持するようにしている。これにより、Webアプリケーションフレームワークへの柔軟な変換機構を実現している。
【0028】
図2に、具体的な変換の様子を示す。図2では、左側に、Visual Basicで記述されたアプリケーションにおける各要素が示され、右側に、画面解析情報における各要素が示される。この変換処理において、Visual Basicにおける画面定義は、画面解析情報における画面定義(画面要素定義、各画面要素属性)に変換され、Visual Basicにおけるイベントハンドラは、画面解析情報における画面遷移定義(遷移元画面、遷移先画面・状態、遷移起動イベント)に変換され、Visual Basicにおける起動イベントは、画面解析情報におけるイベント定義(イベントソース、イベント種別)に変換されている。
【0029】
次に、要素変換処理部13が画面解析情報の各要素をWebアプリケーションフレームワークのリソースに変換する時の処理について説明する。
図3に、具体的な変換の様子を示す。図3では、左側に、画面解析情報における各要素が示され、右側に、Strutsフレームワークにおけるリソースが示される。この変換処理において、画面解析情報における画面定義は、StrutsフレームワークにおけるJSPに変換され、画面解析情報における画面遷移定義は、StrutsフレームワークにおけるAction Classに変換され、画面解析情報におけるイベント定義および遷移先画面は、Strutsフレームワークにおけるstruts−config.xmlに変換されている。
【0030】
次に、本実施の形態の動作について具体的に説明する。
図4は、本実施の形態の動作を示すフローチャートである。
【0031】
まず、画面解析処理部11は、画面解析情報記憶部12に記憶される画面解析情報の木構造を生成する(ステップ101)。
ここで、このステップにおける処理について、図5〜7を参照しながら具体例に説明する。例えば、ユーザより、図5の右側に示されたソースコード(図6、7の右側に示されたソースコードも同じ)が入力されたとする。
画面解析処理部11は、ソースコード内の画面定義部、操作仕様実装部を解析することで、画面定義、画面遷移定義、イベント定義を出力する。
【0032】
まず、画面解析処理部11は、図5に(1)として示すように、Visual Basicソースコードのフォーム、コントロールの定義部分から画面定義を抽出する。具体的には、中間ソースコードに、”frmRingi”を定義する<page>要素と、”frmLogin”を定義する<page>要素とを生成し、”frmLogin”を定義する<page>要素内に更に”cmdOK”を定義する<part>要素を生成する。
【0033】
次に、画面解析処理部11は、図5に(2)として示すように、Visual Basicソースコードからイベントハンドラを抽出する。具体的には、中間ソースコードに、”frmLogin.cmdOK_Click”を定義する<action>要素を生成する。
【0034】
また、画面解析処理部11は、図5に(3)として示すように、イベントソースとイベントハンドラとの接続を行う。具体的には、”frmLogin”を定義する<page>要素内に”toFrmLogin_cmdOK_Click”を<exit−port>要素として設ける共に、”frmLogin.cmdOK_Click”を定義する<action>要素内に”default”を<entry−port>要素として設け、これらの<exit−port>要素と<entry−port>要素とを<connection>要素にて接続する(右側の矢印)。また、”frmLogin”を定義する<page>要素内に<exit−port>要素として設けられた”toFrmLogin_cmdOK_Click”を、”cmdOK”を定義する<part>要素内にも<exit−port>要素として設ける(左側の矢印)。
【0035】
更に、画面解析処理部11は、図6に(4)として示すように、画面遷移定義の抽出を行う。具体的には、”frmRingi”を定義する<page>要素内に”fromFrmLogin”を<entry−port>要素として設けると共に、”frmLogin.cmdOK_Click”を定義する<action>要素内に”toFrmRingi”を<exit−port>要素として設け、これらの<entry−port>要素と<exit−port>要素とを<connection>要素にて接続する(矢印)。また、”frmLogin”を定義する<page>要素内に”default”を<entry−port>要素として設けると共に、”frmLogin.cmdOK_Click”を定義する<action>要素内に”toDefault”を<exit−port>要素として設け、これらの<entry−port>要素と<exit−port>要素とを<connection>要素にて接続する。
【0036】
また、画面解析処理部11は、図7に(5)として示すように、条件分岐と画面遷移の抽出を行う。具体的には、Visual Basicソースコードから抽出した条件分岐を、”frmLogin.cmdOK_Click”を定義する<action>要素内に<logic>要素として展開し、<action>要素内に<exit−port>要素として設けられた”toFrmRingi”および”toDefault”を<logic>要素内に<exit−port>要素として設ける(矢印)。
【0037】
図5〜7の右側に示されたソースコードは、以上のような処理により、中間ソースコードに変換される。
【0038】
再び図4に戻り、説明を続ける。
要素変換処理部13は、画面解析情報記憶部12に記憶された画面解析情報、即ち、木構造の中間ソースコードの中から次の要素を選択する(ステップ102)。選択すべき要素(選択要素)が存在しない場合(ステップ103でNO)、処理は終了するが、選択要素が存在する場合(ステップ103でYES)、選択要素に対する変換ルールが存在するかどうか判定する(ステップ104)。ここで変換ルールが存在すると判定された場合、要素変換処理部13は、変換ルールに規定された関連要素を収集し(ステップ105)、選択要素および関連要素を含む要素集合に対して変換ルールを適用し、新規アプリケーションリソーステンプレートとして出力する(ステップ106)。
【0039】
次に、要素配置処理部15が、選択要素に対する配置ルールが存在するかどうか判定する(ステップ107)。そして、配置ルールが存在すると判定された場合、選択要素に対して配置ルールを適用し、選択要素の配置位置を決定する(ステップ108)。尚、配置ルールは、1つのアプリケーションリソーステンプレートにつき1つの選択要素に対して定義されており、選択要素に対する配置ルールの決定は、即ち、アプリケーションリソーステンプレートのフレームワークにおける配置位置の決定を意味する。従って、ステップ106で出力された新規アプリケーションリソーステンプレートのフレームワークにおける配置位置がステップ108で決定され、結果として、新規アプリケーションリソーステンプレートがフレームワークに配置された新規プリケーションテンプレートが生成されることになる。
【0040】
ここで、ステップ103〜108における処理について、図8〜12を参照しながら具体例に説明する。
まず、要素変換処理部13で用いられる変換ルールおよび要素配置処理部15で用いられる配置ルールについて説明する。
図8は、変換・配置ルールの例である。変換ルールおよび配置ルールは、対象フレームワーク種別、各フレームワーク内でのリソース種別毎に定義される。図8は、Strutsフレームワークについての例である。従って、XFormsについては、その特性に応じた別の変換・配置ルールが存在する。また、Strutsフレームワークのリソース種別としては、JSP、CSS、Action Class、ActionForm Class、struts−config.xmlがあるが、ここでは、JSP、Action Class、struts−config.xmlについての変換・配置ルールのみを示している。
尚、図8では、変換ルールと配置ルールとを同じテーブルで管理しているが、別々のテーブルで管理するようにしてもよい。その場合、配置ルールについては、変換要素ごとではなく、リソースごとに定義してもよい。そして、ステップ104〜106を選択要素ごとの処理とし、ステップ107、108はリソースごとの処理としてもよい。
【0041】
次に、図8に示された変換・配置ルールのうち、変換ルールを用いて具体的な中間ソースコードを変換する処理について説明する。尚、図4のフローチャートでは、全ての変換ルールを同時に適用することを前提としていたが、以下では、説明を分かり易くするため、リソースごとに変換ルールを適用することとする。
また、入力としては、図9の左側に示す中間ソースコード(図10、11の左側に示された中間ソースコードも同じ)が与えられるとする。尚、この中間ソースコードは、図5〜7の処理により生成された中間ソースコードである。図5〜7では、中間ソースコードを定義抽出のフェーズに分けて記述したが、抽出された各定義を統合すると図9〜11に示すような中間ソースコードとなる。中間ソースコードは、大きく分けて、<page>で始まり</page>で終わる<page>要素と、<action>で始まり</action>で終わる<action>要素とから構成される。図3の概念図で言えば、<page>要素は、画面定義に相当する部分であり、<action>要素は、画面遷移定義に相当する部分である。また、図3の概念図におけるイベント定義は、図9〜11の中間ソースコードでは、<page>要素と<action>要素とを接続する部分(<connection>要素)に相当する。
【0042】
まず、図9を参照して、中間ソースコードをJSPに変換する場合について説明する。
図8のJSP変換・配置ルールに<page>要素が変換要素として定義されているので、要素変換処理部13は、中間ソースコードの”frmRingi”を定義する<page>要素に着目する。また、図8のJSP変換・配置ルールに<page>要素に対する関連要素として<property>子要素、<entry−port>子要素、<exit−port>子要素、接続されている<action>要素が定義されているので、要素変換処理部13は、中間ソースコードからこれらに対応する要素を収集する。この場合、<entry−port>子要素、<property>子要素が収集される。そして、図8のJSP変換・配置ルールに変換後の要素として<html:form/>が定義されているので、要素変換処理部13は、”frmRingi”を定義する<page>要素、収集された<entry−port>子要素、<property>子要素を、<html:form/>要素に変換する。尚、図8においては、<entry−port>子要素、<property>子要素の変換結果の記述については省略してある。
【0043】
また、要素変換処理部13は、同様にして、中間ソースコードの”frmLogin”を定義する<page>要素に着目し、その関連要素として、<entry−port>子要素、<exit−port>子要素、<action>要素を収集する。そして、要素変換処理部13は、”frmLogin”を定義する<page>要素、収集された<entry−port>子要素、<exit−port>子要素、<action>要素を、<html:form/>要素に変換する。尚、図8においては、<entry−port>子要素、<exit−port>子要素の変換結果の記述については省略してある。
【0044】
更に、図8のJSP変換・配置ルールにclass属性がbuttonの<part>要素が変換要素として定義されているので、要素変換処理部13は、中間ソースコードの”cmdOK”を定義する<part>要素に着目する。また、図8のJSP変換・配置ルールにclass属性がbuttonの<part>要素に対する関連要素として<property>子要素、<exit−port>子要素が定義されているので、要素変換処理部13は、中間ソースコードからこれらに対応する要素を収集する。この場合、<exit−port>子要素が収集される。そして、図8のJSP変換・配置ルールに変換後の要素として<html:submit/>が定義されているので、要素変換処理部13は、”cmdOK”を定義する<part>要素、収集された<exit−port>子要素を、<html:submit/>要素に変換する。尚、図8においては、<exit−port>子要素の変換結果の記述については省略してある。
【0045】
次に、図10を参照して、中間ソースコードをAction Classに変換する場合について説明する。
図8のAction Class変換・配置ルールに<action>要素が変換要素として定義されているので、要素変換処理部13は、中間ソースコードの”frmLogin.cmdOK_Click”を定義する<action>要素に着目する。そして、図8のAction Class変換・配置ルールに<action>要素に対する関連要素が定義されておらず、変換後の要素としてJAVAクラスが定義されているので、要素変換処理部13は、”frmLogin.cmdOK_Click”を定義する<action>要素をJAVAクラスの記述に変換する。
【0046】
また、図8のAction Class変換・配置ルールに<choice>要素が変換要素として定義されているので、要素変換処理部13は、<choice>要素に着目する。また、図8のAction Class変換・配置ルールに<choice>要素に対する関連要素として<when−if>要素、<when−else>要素が定義されているので、要素変換処理部13は、中間ソースコードから<when−if>要素、<when−else>要素を収集する。そして、図8のAction Class変換・配置ルールに変換後の要素としてIfステートメントが定義されているので、要素変換処理部13は、<choice>要素をIfステートメントに変換する。
【0047】
更に、図8のAction Class変換・配置ルールに<exit−port>要素が変換要素として定義されているので、要素変換処理部13は、中間ソースコードの<exit−port>要素に着目する。そして、図8のAction Class変換・配置ルールに<exit−port>要素に対する関連要素が定義されておらず、変換後の要素として画面遷移先を決定するステートメントが定義されているので、要素変換処理部13は、<exit−port>要素を画面遷移先を決定するステートメントに変換する。
【0048】
続いて、図11を参照して、中間ソースコードをstruts−config.xmlに変換する場合について説明する。
まず、図8のstruts−config.xml変換・配置ルールにrootが変換要素として定義されており、それに対する変換後の要素として<struts−config/>が定義されているので、struts−config.xmlに<struts−config/>要素が記述される。
【0049】
次に、図8のstruts−config.xml変換・配置ルールに<page>要素が変換要素として定義されているので、要素変換処理部13は、中間ソースコードの”frmRingi”を定義する<page>要素に着目する。そして、図8のstruts−config.xml変換・配置ルールに<page>要素に対する関連要素が定義されておらず、変換後の要素として<form−bean/>が定義されているので、要素変換処理部13は、”frmRingi”を定義する<page>要素を<form−bean/>要素に変換する。
【0050】
また、要素変換処理部13は、同様にして、中間ソースコードの”frmLogin”を定義する<page>要素に着目し、この要素を<form−bean/>要素に変換する。
【0051】
更に、図8のstruts−config.xml変換・配置ルールに<action>要素が変換要素として定義されているので、要素変換処理部13は、”frmLogin.cmdOK_Click”を定義する<action>要素に着目する。また、図8のstruts−config.xml変換・配置ルールに、<action>要素に対する関連要素として、接続されている<page>要素が定義されているので、要素変換処理部13は、”frmLogin.cmdOK_Click”を定義する<action>要素に接続される<page>要素を収集する。この場合、”frmRingi”を定義する<page>要素、”frmLogin”を定義する<page>要素が収集される。そして、図8のstruts−config.xml変換・配置ルールに変換後の要素として<action/>が定義されているので、要素変換処理部13は、”frmLogin.cmdOK_Click”を定義する<action>要素、収集された”frmRingi”を定義する<page>要素、”frmLogin”を定義する<page>要素を、<action/>要素に変換する。
【0052】
また、図8のstruts−config.xml変換・配置ルールに<action>要素内の<exit−port>要素が変換要素として定義されているので、要素変換処理部13は、”frmLogin.cmdOK_Click”を定義する<action>要素内の”toFrmRingi”を定義する<exit−port>要素に着目する。そして、図8のstruts−config.xml変換・配置ルールに<action>要素内の<exit−port>要素に対する関連要素は定義されておらず、変換後の要素として<forward/>が定義されているので、要素変換処理部13は、”toFrmRingi”を定義する<exit−port>要素を<forward/>に変換する。
【0053】
更にまた、要素変換処理部13は、同様にして、”frmLogin.cmdOK_Click”を定義する<action>要素内の”toDefault”を定義する<exit−port>要素に着目し、この要素を<forward/>に変換する。
図9〜11の左側に示された中間ソースコードは、以上のような処理により、3つのリソース(JSP、Action Class、struts−config.xml)に変換される。
【0054】
次に、図8に示された変換・配置ルールのうち、配置ルールを用いてこれらの3つのリソースを配置する処理について説明する。尚、ここでは、便宜上、図8の要素ごとに定義された配置ルールを参照するが、実際の処理としては、リソースごとに定義された配置ルールを参照しても同様である。
【0055】
まず、Strutsフレームワークにおいて、JSPを配置する処理を説明する。
図8のJSP変換・配置ルールでは、配置ルールとして、location属性の位置という指定がなされている。従って、要素配置処理部15は、図12の中間ソースコードに示す”location”の指定に応じて配置位置を決定し、JSPをその決定された位置に配置する。尚、中間ソースコードにおける”location”の指定は、ユーザが付加することもできるが、ユーザから情報入力がない場合は、システムが保持するデフォルト値が設定される。
【0056】
次に、Strutsフレームワークにおいて、Action Classを配置する処理を説明する。
図8のAction Class変換・配置ルールでは、配置ルールとして、location属性の位置という指定がなされている。従って、要素配置処理部15は、JSPの場合と同様、中間ソースコードに示す”location”の指定に応じて配置位置を決定し、Action Classをその決定された位置に配置する。尚、中間ソースコードにおける”location”の指定は、ユーザが付加することもできるが、ユーザから情報入力がない場合は、システムが保持するデフォルト値が設定される。
【0057】
最後に、Strutsフレームワークにおいて、struts−config.xmlを配置する処理を説明する。
図8のstruts−config.xml変換・配置ルールでは、配置ルールとして、固定位置という指定がなされている。従って、要素配置処理部15は、struts−config.xmlを固定の位置に配置することを決定し、struts−config.xmlをその決定された位置に配置する。
【0058】
このように、本実施の形態では、既存アプリケーションのソースコードを、例えば、Strutsフレームワークにおける各リソースに変換している。仮に、既存アプリケーションのソースコードを独自のアプリケーション構造に変換することでターゲット環境での動作を保証したとすると、開発者はその独自のアプリケーション構造を習得する必要があり、開発者のスキルが追いつかなくなる事態が考えられる。これに対し、本実施の形態では、標準化されたフレームワークの利用を前提とした変換を行うため、開発者に新たなスキルの習得を要求しない。即ち、既存アプリケーションのソースコードを、フレームワークを利用することによる利点を減ずることなく、ターゲット環境で動作するように変換することを可能にしている。
また、既存アプリケーションのソースコードを解析して得られる画面解析情報は、ソースコードから抽出した各要素を細分化し、分離して保持するようにしている。これにより、既存アプリケーションのソースコードをターゲット環境における標準化されたフレームワークに適合させるための変換が柔軟に行えるようになる。
更に、変換・配置ルールは、複数のフレームワークに対して設け、その中から移行したいターゲット環境を選択できるようにしている。これにより、既存アプリケーションのソースコードを複数のフレームワークのうちの所望のものに適合するよう変換することを可能としている。
【0059】
【発明の効果】
このように、本発明によれば、既存アプリケーションのソースコードを、ターゲット環境における標準化されたフレームワークを利用することによる利点を減ずることなく、ターゲット環境で動作するように変換することが可能となる。
【図面の簡単な説明】
【図1】本実施の形態の全体構成を示す図である。
【図2】本実施の形態の画面解析処理部による処理内容を概念的に示す図である。
【図3】本実施の形態の要素変換処理部による処理内容を概念的に示す図である。
【図4】本実施の形態の処理動作を示すフローチャートである。
【図5】本実施の形態によるVisual Basicソースコードから中間ソースコードへの変換についての説明をするための図である。
【図6】本実施の形態によるVisual Basicソースコードから中間ソースコードへの変換についての説明をするための図である。
【図7】本実施の形態によるVisual Basicソースコードから中間ソースコードへの変換についての説明をするための図である。
【図8】本実施の形態で用いる変換・配置ルールの一例を示す図である。
【図9】本実施の形態による中間ソースコードからStrutsフレームワークのリソースへの変換を説明するための図である。
【図10】本実施の形態による中間ソースコードからStrutsフレームワークのリソースへの変換を説明するための図である。
【図11】本実施の形態による中間ソースコードからStrutsフレームワークのリソースへの変換を説明するための図である。
【図12】本実施の形態でリソースの配置位置を指定するlocation属性を説明するための図である。
【符号の説明】
10…既存アプリケーションソースコード記憶部、11…画面解析処理部、12…画面解析情報記憶部、13…要素変換処理部、14…新規アプリケーションリソーステンプレート記憶部、15…要素配置処理部、16…新規アプリケーションテンプレート記憶部
[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a technology for converting source code of an application program (hereinafter, simply referred to as “application”) developed in the past to operate in an environment to be migrated (hereinafter, referred to as “target environment”). The present invention relates to a source code conversion device for converting source code so as to conform to a standardized framework in an environment.
[0002]
[Prior art]
Today, with the spread of the Web2 Application Server and other J2EE (Java 2 Enterprise Edition) environments, there is an increasing demand to migrate existing applications developed in the past to the J2EE environment and to operate them (WebSphere is an IBM Corporation). Trademark in the United States and other countries.). However, such an existing application is often developed in a language different from JAVA, which is a development language of an application operating in the J2EE environment, for example, Visual Basic or the like (JAVA and all JAVA-related trademarks and logos). Is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries. Visual Basic is a registered trademark of United States Microsoft Corp. in the United States and other countries.) Further, in many cases, not only the class library (for example, DB access) and the framework, but also the operation mode of the application is different from the J2EE environment. For example, while the environment of an existing application has a two-layer structure of a client on which application logic is arranged and a server on which data used by the application is arranged, the J2EE environment mainly uses screen display. The difference is that the client has a three-layer structure, such as a client to perform, an application server in which application logic is arranged, and a database server in which data used by the application is arranged. Therefore, it is not easy to migrate an existing application to the J2EE environment, and the work requires a large number of steps.
[0003]
Therefore, in order to support migration of an application developed in the past to a new environment, conventionally, an existing system is analyzed and screen information necessary for constructing a new system is output (for example, see Patent Document 1). ), Analyzing an existing system, and regenerating interface information (screen definition information, screen operation information, screen transition information) of a new system (for example, see Patent Document 2).
[0004]
[Patent Document 1]
JP 2001-027946 A (page 3-5, FIG. 2)
[Patent Document 2]
JP 2001-134423 A (pages 2-4, FIG. 2)
[0005]
[Problems to be solved by the invention]
By the way, in recent years, a framework has been increasingly adopted from the viewpoint of improving quality, productivity, and maintainability at the time of application migration. The framework is a framework for developing a Web application, and is intended to efficiently develop one completed Web application by defining unspecified details. Some frameworks are rapidly gaining popularity and are being used as standard, such as "Struts" developed by the Apache Software Foundation's "Jakarta Project".
[0006]
However, Patent Documents 1 and 2 only describe that the interface information in the existing system is displayed to reduce the work of constructing the interface information in the new system, which is compatible with the Web application framework adopted in the new system. The conversion of the interface information has not been performed. That is, there is a problem that the source code of the existing application cannot be converted to operate in the target environment without reducing the advantage of using the standardized framework in the target environment.
[0007]
SUMMARY OF THE INVENTION The present invention has been made to solve the above technical problem, and its purpose is to reduce the advantage of using source code of an existing application by using a standardized framework in a target environment. Without converting to work in the target environment.
Another object is to flexibly convert the source code of an existing application to conform to a standardized framework in a target environment.
Yet another object is to enable the source code of an existing application to be converted to fit a desired one of a plurality of frameworks.
[0008]
[Means for Solving the Problems]
For this purpose, the present invention converts the source code of an existing application into an application resource template in a target environment. That is, the source code conversion device of the present invention analyzes the source code of the application program and generates analysis information (corresponding to the screen analysis information in FIG. 1) with analysis means (corresponding to the screen analysis processing unit 11 in FIG. 1). A conversion unit (in the element conversion processing unit 13 in FIG. 1) that generates an application resource template in a predetermined target environment by converting the analysis information generated by the analysis unit in accordance with a predetermined conversion rule (conversion rule). Correspondence).
[0009]
Further, in the present invention, the screen analysis information obtained by analyzing the source code of the existing application is obtained by subdividing each element extracted from the source code, separating the elements and separating the elements. That is, in the source code conversion device of the present invention, the analysis means is characterized in that a plurality of elements are extracted from the source code, and each element is separated and included in the analysis information. In this case, the conversion rule defines the correspondence between the element or element set before conversion included in the analysis information and the element after conversion included in the application resource template, and the conversion unit refers to the conversion rule, An element or element set before conversion can be converted to a corresponding element after conversion. Further, a conversion rule may be provided corresponding to each of the plurality of target environments, and the conversion means may convert the analysis information according to a conversion rule corresponding to the requested target environment.
[0010]
On the other hand, the source code conversion device of the present invention arranges the application resource template in the target environment according to a predetermined arrangement rule (arrangement rule), thereby generating an application template (the element arrangement processing unit 15 in FIG. 1). ).
[0011]
Further, the arrangement rule defines the correspondence between the application resource template and the arrangement processing information for arranging the application resource template in the target environment, and the arrangement means refers to the arrangement rule and converts the application resource template into the arrangement processing information. Based on the target environment. Further, the arrangement means can cause the user to designate the arrangement position when the arrangement processing information indicates that the user can designate the arrangement position of the application resource template in the target environment. Still further, an arrangement rule may be provided for each of the plurality of target environments, and the arrangement means may arrange the application resource template according to an arrangement rule corresponding to the requested target environment.
[0012]
From another viewpoint, the source code conversion method of the present invention analyzes the source code of the application program to generate analysis information (corresponding to step 101 in FIG. 4) and the generated analysis information (FIG. 4). (Corresponding to steps 104 to 106 in FIG. 4) by converting the application analysis template according to the conversion rule (conversion rule) stored in advance in the storage device. And a step (corresponding to steps 107 and 108 in FIG. 4) of arranging the generated application resource template in the target environment in accordance with an arrangement rule (arrangement rule) stored in the storage device in advance. Contains.
[0013]
In the step of generating analysis information, a plurality of elements are extracted from the source code, and an intermediate source code in which each element is separated and expressed in a tree structure is stored as analysis information. In this case, in the step of generating the application resource template, a conversion rule in which the element or element set before conversion is associated with the element after conversion is read from the storage device, and the element or element before conversion is included in the conversion rule. The analysis information can be converted by converting the elements in the analysis information defined as a set into the corresponding converted elements. In the step of generating the application resource template, a conversion rule corresponding to the requested target environment is read out of the plurality of conversion rules stored in the storage device, and the analysis information is converted according to the conversion rule. You can also.
[0014]
Further, in the step of generating an application template, an arrangement rule that associates each application resource template with arrangement processing information for arranging each application resource template in the target environment is read from the storage device, and the application resource template is associated with the application rule. It can be arranged in the target environment based on the arrangement processing information. Still further, in the step of generating the application template, among the plurality of arrangement rules stored in the storage device, an arrangement rule corresponding to the requested target environment is read, and the application resource template is arranged according to the arrangement rule. You can also.
[0015]
Here, the present invention can be understood as a program that causes a computer to realize a predetermined function. That is, the program of the present invention provides a computer with a function of analyzing the source code of an application program and generating analysis information (corresponding to the screen analysis information of FIG. 1) (corresponding to the screen analysis processing unit 11 of FIG. 1), A function (corresponding to the element conversion processing unit 13 in FIG. 1) of generating an application resource template in a predetermined target environment by converting the generated analysis information according to a conversion rule (conversion rule) stored in a storage device in advance; A function of generating an application template (corresponding to the element allocation processing unit 15 in FIG. 1) by arranging the generated application resource template in the target environment according to an allocation rule (arrangement rule) stored in the storage device in advance. make it happen.
[0016]
In the function of generating analysis information, a function of extracting a plurality of elements from a source code, separating each element and expressing an intermediate source code represented by a tree structure as analysis information is further realized. I do. In this case, the function of generating the application resource template reads out the conversion rule corresponding to the requested target environment from among the plurality of conversion rules stored in the storage device, and converts the analysis information according to the conversion rule. Can be further realized. The function of generating an application template further realizes a function of reading an arrangement rule corresponding to a requested target environment from among a plurality of arrangement rules stored in the storage device, and arranging an application resource template according to the arrangement rule. It can also be done.
[0017]
BEST MODE FOR CARRYING OUT THE INVENTION
Hereinafter, the present invention will be described in detail based on embodiments shown in the accompanying drawings.
FIG. 1 is a block diagram showing the overall configuration of the present embodiment. As shown in FIG. 1, in the present embodiment, an existing application source code storage unit 10, a screen analysis processing unit 11, a screen analysis information storage unit 12, an element conversion processing unit 13, a new application resource template storage unit 14, an element arrangement processing unit 15, and a new application template storage unit 16.
[0018]
The existing application source code storage unit 10 is a part that stores source codes of existing applications developed in the past. An application is usually composed of a screen definition section, an operation specification implementation section, and a business specification implementation section. In the present embodiment, the screen analysis processing section 11 analyzes only the screen definition section and the operation specification implementation section. Therefore, these two parts are shown in a square box.
[0019]
The screen analysis processing unit 11 extracts only the screen definition, the screen transition definition, and the event definition from the screen definition unit and the operation specification implementation unit of the existing application source code stored in the existing application source code storage unit 10, and performs the screen analysis. This is a part for generating information and storing it in the screen analysis information storage unit 12.
[0020]
The screen analysis information storage unit 12 is a part that stores the screen analysis information extracted by the screen analysis processing unit 11. Elements in the screen analysis information include a screen definition, a screen transition definition, and an event definition. Elements in the screen definition include a screen element definition and each screen element attribute. Elements in the screen transition definition include a transition source screen, a transition destination screen / state, a transition condition, and a transition start event. Elements in the definition include an event source and an event type. Note that the screen analysis information is held in a reusable intermediate format. For example, each element is held as a source code in which each element is described in a tree structure such as an XML format (hereinafter, referred to as “intermediate source code”). In this intermediate source code, the relationship between the elements is held as a parent-child relationship or a connection element, and it is easy to collect the elements required at the time of element set conversion.
[0021]
The element conversion processing unit 13 receives screen analysis information from the screen analysis information storage unit 12, converts each element according to a conversion rule according to the type of the requested target environment, generates a new application resource template, and generates a new application resource template. This part is output to the resource template storage unit 14. For example, if there are Struts and XForms as target environments that can be requested, a conversion rule for Struts and a conversion rule for XForms are prepared, and one of them is selected and used according to the requested target environment.
[0022]
The new application resource template storage unit 14 is a unit that stores the new application resource template generated by the element conversion processing unit 13. Here, the “application resource template” refers to a file required in the framework, and is also simply referred to as a “resource” below. This includes, for example, screen resources, configuration files, source code, and the like.
[0023]
The element allocation processing unit 15 generates a new application template by arranging the application resource template stored in the new application resource template storage unit 14 according to an allocation rule according to the type of the requested target environment, and generates a new application template storage unit. 16 is a part to be output. For example, if there are Struts and XForms as target environments that can be requested, an arrangement rule for Struts and an arrangement rule for XForms are prepared, and one of them is selected and used according to the requested target environment. Note that default values are given to the placement information defined in these placement rules according to the target Web application framework. In addition, the user can input the arrangement information in the target Web application framework as needed and add it to the screen analysis information.
[0024]
The new application template storage unit 16 is a unit that stores the new application template generated by the element arrangement processing unit 15. Here, the “application template” is one in which resources are arranged in the framework. For example, if there are Struts and XForms as target environments that can be requested, a new application template for Struts and a new application template for XForms can be generated.
[0025]
This embodiment is realized by a computer system. The hardware configuration of a computer system that implements the present embodiment may be a general one including a central processing unit (CPU), a main storage device, an auxiliary storage device such as a hard disk device, an input device, and an output device.
A program for realizing the screen analysis processing unit 11, the element conversion processing unit 13, and the element arrangement processing unit 15 is stored in the auxiliary storage device, and the CPU reads the program into the main storage device and executes the program. An analysis processing unit 11, an element conversion processing unit 13, and an element arrangement processing unit 15 are realized. The auxiliary storage device also functions as an existing application source code storage unit 10, a new application resource template storage unit 14, and a new application template storage unit 16. Furthermore, the conversion rule used by the element conversion processing unit 13 and the arrangement rule used by the element arrangement processing unit 15 may be stored in the auxiliary storage device.
[0026]
Next, processing in the screen analysis processing unit 11 and the element conversion processing unit 13 will be described with reference to a conceptual diagram. Here, an example will be described in which an application developed in Visual Basic, which is often used as a development language of an existing application, is converted into a Struts framework resource often used in a J2EE environment. However, the development language of the existing application is not limited to Visual Basic, and may be any language as long as it is different from the development language in the target environment. Also, the target environment is not limited to the Struts framework, but may be another environment such as XForms.
[0027]
First, a process when the screen analysis processing unit 11 converts each element of the application described in Visual Basic into each element of the screen analysis information will be described.
Since the application described in Visual Basic is event-driven, the screen element, the event handler, and each element in the event handler are tightly coupled. Therefore, it is not easy to convert the application structure as it is. Therefore, in the present embodiment, each element of the Visual Basic is subdivided, and the connection between those elements is loosened and held. This realizes a flexible conversion mechanism to a Web application framework.
[0028]
FIG. 2 shows a specific conversion state. In FIG. 2, each element in the application described in Visual Basic is shown on the left side, and each element in the screen analysis information is shown on the right side. In this conversion process, the screen definition in the Visual Basic is converted into the screen definition (screen element definition, each screen element attribute) in the screen analysis information, and the event handler in the Visual Basic converts the screen transition definition (the transition source screen) in the screen analysis information. , Transition destination screen / state, transition start event), and the start event in Visual Basic is converted into an event definition (event source, event type) in the screen analysis information.
[0029]
Next, a process when the element conversion processing unit 13 converts each element of the screen analysis information into a resource of the Web application framework will be described.
FIG. 3 shows a specific conversion state. In FIG. 3, each element in the screen analysis information is shown on the left, and resources in the Struts framework are shown on the right. In this conversion processing, the screen definition in the screen analysis information is converted into JSP in the Struts framework, the screen transition definition in the screen analysis information is converted into an Action Class in the Struts framework, and the event definition and the transition destination in the screen analysis information are converted. The screen is displayed in the struts-config. xml.
[0030]
Next, the operation of the present embodiment will be specifically described.
FIG. 4 is a flowchart showing the operation of the present embodiment.
[0031]
First, the screen analysis processing unit 11 generates a tree structure of the screen analysis information stored in the screen analysis information storage unit 12 (Step 101).
Here, the processing in this step will be described in a specific example with reference to FIGS. For example, it is assumed that the user has input the source code shown on the right side of FIG. 5 (the same applies to the source code shown on the right side of FIGS. 6 and 7).
The screen analysis processing unit 11 outputs a screen definition, a screen transition definition, and an event definition by analyzing the screen definition unit and the operation specification implementation unit in the source code.
[0032]
First, as shown as (1) in FIG. 5, the screen analysis processing unit 11 extracts the screen definition from the definition part of the form and control of the Visual Basic source code. Specifically, in the intermediate source code, a <page> element defining “frmRingi” and a <page> element defining “frMLogin” are generated, and the <page> element defining “frMLogin” is further included in the <page> element. Generate a <part> element that defines “cmdOK”.
[0033]
Next, the screen analysis processing unit 11 extracts an event handler from the Visual Basic source code as shown as (2) in FIG. Specifically, an <action> element that defines “frMlogin.cmdOK_Click” is generated in the intermediate source code.
[0034]
In addition, the screen analysis processing unit 11 connects the event source and the event handler as shown as (3) in FIG. Specifically, “toFrmLogin_cmdOK_Click” is provided as an <exit-port> element in a <page> element that defines “frMlogin”, and “default” is defined in an <action> element that defines “frMlogin.cmdOK_Click”. An <entry-port> element is provided, and these <exit-port> elements and <entry-port> elements are connected by a <connection> element (arrow on the right). Also, “toFrmLogin_cmdOK_Click” provided as an <exit-port> element in a <page> element defining “frMlogin” is provided as an <exit-port> element in a <part> element defining “cmdOK”. (Left arrow).
[0035]
Further, the screen analysis processing unit 11 extracts a screen transition definition as shown as (4) in FIG. Specifically, “fromFrmLogin” is provided as an <entry-port> element in a <page> element that defines “frmRingi”, and “toFrmRingi” is included in an <action> element that defines “frmLogin.cmdOK_Click”. An <exit-port> element is provided, and the <entry-port> element and the <exit-port> element are connected by a <connection> element (arrow). Also, “default” is provided as an <entry-port> element in a <page> element that defines “frMlogin”, and “toDefault” is included in an <action> element that defines “frmLogin.cmdOK_Click” in the <exit-port> element. Element, and these <entry-port> elements and <exit-port> elements are connected by a <connection> element.
[0036]
In addition, the screen analysis processing unit 11 extracts a conditional branch and a screen transition as indicated by (5) in FIG. Specifically, the conditional branch extracted from the Visual Basic source code is expanded as an <logic> element in an <action> element that defines “frMlogin.cmdOK_Click”, and an <exit-port> element is included in the <action> element. "ToFrmRingi" and "toDefault" provided as <exit-port> elements within the <logic> element (arrows).
[0037]
The source code shown on the right side of FIGS. 5 to 7 is converted into an intermediate source code by the above processing.
[0038]
Returning to FIG. 4 again, the description will be continued.
The element conversion processing unit 13 selects the next element from the screen analysis information stored in the screen analysis information storage unit 12, that is, the tree-structured intermediate source code (step 102). If there is no element to be selected (selected element) (NO in step 103), the process ends, but if there is a selected element (YES in step 103), it is determined whether a conversion rule for the selected element exists. (Step 104). Here, when it is determined that the conversion rule exists, the element conversion processing unit 13 collects the related elements specified in the conversion rule (Step 105), and applies the conversion rule to the element set including the selected element and the related element. Apply and output as a new application resource template (step 106).
[0039]
Next, the element arrangement processing unit 15 determines whether there is an arrangement rule for the selected element (Step 107). When it is determined that the arrangement rule exists, the arrangement rule is applied to the selected element, and the arrangement position of the selected element is determined (step 108). Note that the arrangement rule is defined for one selected element for one application resource template, and the determination of the arrangement rule for the selected element, that is, the determination of the arrangement position of the application resource template in the framework. Therefore, the arrangement position in the framework of the new application resource template output in step 106 is determined in step 108, and as a result, a new application template in which the new application resource template is arranged in the framework is generated. .
[0040]
Here, the processing in steps 103 to 108 will be described in a specific example with reference to FIGS.
First, the conversion rule used by the element conversion processing unit 13 and the arrangement rule used by the element arrangement processing unit 15 will be described.
FIG. 8 is an example of a conversion / placement rule. The conversion rule and the placement rule are defined for each target framework type and each resource type within each framework. FIG. 8 is an example of the Struts framework. Therefore, there is another conversion / placement rule for XForms according to its characteristics. Also, as the resource types of the Struts framework, JSP, CSS, Action Class, ActionForm Class, and structs-config. xml, here, JSP, Action Class, struts-config. Only the conversion and arrangement rules for xml are shown.
In FIG. 8, the conversion rule and the placement rule are managed in the same table, but may be managed in separate tables. In this case, the arrangement rule may be defined for each resource, not for each conversion element. Steps 104 to 106 may be performed for each selected element, and steps 107 and 108 may be performed for each resource.
[0041]
Next, a description will be given of a process of converting a specific intermediate source code using the conversion rules among the conversion / placement rules shown in FIG. In the flowchart of FIG. 4, it is assumed that all the conversion rules are applied at the same time. However, in the following, the conversion rules are applied to each resource for easy understanding.
It is also assumed that the intermediate source code shown on the left side of FIG. 9 (the same applies to the intermediate source code shown on the left side of FIGS. 10 and 11) is given as an input. Note that this intermediate source code is an intermediate source code generated by the processing of FIGS. In FIGS. 5 to 7, the intermediate source code is described in terms of the definition extraction phase, but when the extracted definitions are integrated, the intermediate source code becomes as shown in FIGS. The intermediate source code is roughly divided into a <page> element that starts with <page> and ends with </ page>, and an <action> element that starts with <action> and ends with </ action>. In the conceptual diagram of FIG. 3, the <page> element is a part corresponding to a screen definition, and the <action> element is a part corresponding to a screen transition definition. The event definition in the conceptual diagram of FIG. 3 corresponds to a part (<connection> element) connecting the <page> element and the <action> element in the intermediate source code of FIGS.
[0042]
First, a case where the intermediate source code is converted to JSP will be described with reference to FIG.
Since the <page> element is defined as a conversion element in the JSP conversion / arrangement rule of FIG. 8, the element conversion processing unit 13 focuses on the <page> element that defines “frmRingi” of the intermediate source code. In the JSP conversion / arrangement rule of FIG. 8, <property> child element, <entry-port> child element, <exit-port> child element, and connected <action> element are related elements to the <page> element. Since they are defined, the element conversion processing unit 13 collects elements corresponding to these from the intermediate source code. In this case, <entry-port> child elements and <property> child elements are collected. Since <html: form /> is defined as the element after conversion in the JSP conversion / placement rule of FIG. 8, the element conversion processing unit 13 collects the <page> element that defines “frmRingi”. The <entry-port> child element and the <property> child element are converted into an <html: form /> element. In FIG. 8, the description of the conversion result of the <entry-port> child element and the <property> child element is omitted.
[0043]
Similarly, the element conversion processing unit 13 focuses on the <page> element that defines “frmLogin” of the intermediate source code, and as its related elements, <entry-port> child element and <exit-port> child element. Collect element, <action> element. Then, the element conversion processing unit 13 converts the <page> element that defines “frMlogin”, the collected <entry-port> child element, the <exit-port> child element, and the <action> element into <html: form / > Convert to element. In FIG. 8, the description of the conversion result of the <entry-port> child element and the <exit-port> child element is omitted.
[0044]
Further, since the <part> element whose class attribute is “button” is defined as a conversion element in the JSP conversion / placement rule of FIG. 8, the element conversion processing unit 13 defines “cmdOK” of the intermediate source code <part> Focus on the elements. Since the <property> child element and the <exit-port> child element are defined as related elements to the <part> element whose class attribute is “button” in the JSP conversion / placement rule of FIG. 8, the element conversion processing unit 13 , Collect corresponding elements from intermediate source code. In this case, <exit-port> child elements are collected. Since <html: submit /> is defined as the element after conversion in the JSP conversion / placement rule of FIG. 8, the element conversion processing unit 13 collects the <part> element that defines “cmdOK”. The <exit-port> child element is converted to an <html: submit /> element. In FIG. 8, the description of the conversion result of the <exit-port> child element is omitted.
[0045]
Next, a case where the intermediate source code is converted into an Action Class will be described with reference to FIG.
Since the <action> element is defined as a conversion element in the Action Class conversion / placement rule in FIG. 8, the element conversion processing unit 13 focuses on the <action> element that defines “frmLogin.cmdOK_Click” of the intermediate source code. . Since the Action Class conversion / placement rule in FIG. 8 does not define a related element for the <action> element, and defines a JAVA class as the element after conversion, the element conversion processing unit 13 outputs “frLogin. <action> element that defines “cmdOK_Click” is converted into a description of a JAVA class.
[0046]
Since the <choice> element is defined as a conversion element in the Action Class conversion / placement rule of FIG. 8, the element conversion processing unit 13 focuses on the <choice> element. In addition, since the <Wen-if> element and the <when-else> element are defined as related elements to the <choice> element in the Action Class conversion / placement rule of FIG. 8, the element conversion processing unit 13 uses the intermediate source code. From the <when-if> element and the <when-else> element. Since the If statement is defined as a converted element in the Action Class conversion / placement rule of FIG. 8, the element conversion processing unit 13 converts the <choice> element into an If statement.
[0047]
Further, since the <exit-port> element is defined as a conversion element in the Action Class conversion / placement rule of FIG. 8, the element conversion processing unit 13 focuses on the <exit-port> element of the intermediate source code. Since no related element to the <exit-port> element is defined in the Action Class conversion / placement rule of FIG. 8 and a statement for determining the screen transition destination is defined as the element after conversion, the element conversion processing is performed. The unit 13 converts the <exit-port> element into a statement that determines a screen transition destination.
[0048]
Subsequently, with reference to FIG. 11, the intermediate source code is provided by structs-config. xml will be described.
First, the structs-config. Since “root” is defined as a conversion element in the xml conversion / placement rule, and <struts-config /> is defined as an element after the conversion, “struts-config. The <struts-config /> element is described in xml.
[0049]
Next, the structs-config. Since the <page> element is defined as a conversion element in the xml conversion / placement rule, the element conversion processing unit 13 focuses on the <page> element that defines "frmRingi" of the intermediate source code. Then, the structs-config. Since the element related to the <page> element is not defined in the xml conversion / placement rule and <form-bean /> is defined as the element after the conversion, the element conversion processing unit 13 defines “frmRingi”. The <page> element is converted to a <form-bean /> element.
[0050]
Similarly, the element conversion processing unit 13 focuses on a <page> element that defines “frmLogin” of the intermediate source code, and converts this element into a <form-bean /> element.
[0051]
Further, the structs-config. Since the <action> element is defined as a conversion element in the xml conversion / placement rule, the element conversion processing unit 13 focuses on the <action> element that defines “frMlogin.cmdOK_Click”. In addition, the structs-config. Since the connected <page> element is defined as a related element to the <action> element in the xml conversion / placement rule, the element conversion processing unit 13 defines the <action> element that defines “frMlogin.cmdOK_Click”. Collect the <page> element connected to. In this case, a <page> element that defines “frmRingi” and a <page> element that defines “frmLogin” are collected. Then, the "struts-config." Since <action /> is defined as an element after conversion in the xml conversion / placement rule, the element conversion processing unit 13 defines the <action> element that defines “frMlogin.cmdOK_Click” and the collected “frmRingi” The <page> element that defines “frmLogin” is converted to an <action /> element.
[0052]
In addition, the structs-config. Since the <exit-port> element in the <action> element is defined as a conversion element in the xml conversion / placement rule, the element conversion processing unit 13 defines “frmLogin.cmdOK_Click” in “<action> element”. Attention is paid to the <exit-port> element that defines “toFrmRingi”. Then, the structs-config. Since the xml conversion / placement rule does not define a related element for the <exit-port> element in the <action> element, and defines <forward /> as a converted element, the element conversion processing unit 13 , <Exit-port> element defining “toFrmRingi” is converted into <forward>.
[0053]
Furthermore, the element conversion processing unit 13 similarly focuses on the <exit-port> element that defines “toDefault” in the <action> element that defines “frMlogin.cmdOK_Click”, and assigns this element to <forward / port>. >.
The intermediate source code shown on the left side of FIGS. 9 to 11 is converted into three resources (JSP, Action Class, and structs-config.xml) by the above processing.
[0054]
Next, processing for arranging these three resources using the arrangement rule among the conversion / arrangement rules shown in FIG. 8 will be described. Here, for convenience, the arrangement rules defined for each element in FIG. 8 are referred to, but the same applies to the actual processing, with reference to the arrangement rules defined for each resource.
[0055]
First, processing for arranging JSPs in the Struts framework will be described.
In the JSP conversion / placement rule of FIG. 8, the position of the location attribute is specified as the placement rule. Therefore, the element arrangement processing unit 15 determines the arrangement position according to the designation of “location” shown in the intermediate source code of FIG. 12, and arranges the JSP at the determined position. The designation of “location” in the intermediate source code can be added by the user, but when there is no information input from the user, a default value held by the system is set.
[0056]
Next, a process for arranging an Action Class in the Struts framework will be described.
In the Action Class conversion / placement rule in FIG. 8, the location rule is specified as the location rule as the placement rule. Therefore, as in the case of the JSP, the element arrangement processing unit 15 determines the arrangement position according to the designation of “location” shown in the intermediate source code, and arranges the Action Class at the determined position. The designation of “location” in the intermediate source code can be added by the user, but when there is no information input from the user, a default value held by the system is set.
[0057]
Finally, in the Struts framework, the struts-config. The processing for allocating the xml will be described.
The struts-config. In the xml conversion / placement rule, a fixed position is specified as the placement rule. Therefore, the element arrangement processing unit 15 determines whether the structs-config. xml is located in a fixed location and the structs-config. xml at the determined location.
[0058]
As described above, in the present embodiment, the source code of the existing application is converted into each resource in the Struts framework, for example. If the source code of an existing application is guaranteed to work in the target environment by converting it to a unique application structure, the developer will need to learn the unique application structure, and the developer's skills will not be able to keep up Things are possible. On the other hand, in the present embodiment, conversion is performed on the assumption that a standardized framework is used, so that the developer does not need to acquire new skills. That is, it is possible to convert the source code of the existing application so as to operate in the target environment without reducing the advantage of using the framework.
Also, the screen analysis information obtained by analyzing the source code of the existing application is such that each element extracted from the source code is subdivided and separated and stored. This allows for flexible conversion of existing application source code to conform to a standardized framework in the target environment.
Further, conversion / placement rules are provided for a plurality of frameworks so that a target environment to be migrated can be selected from the frameworks. As a result, it is possible to convert the source code of the existing application so as to conform to a desired one of the plurality of frameworks.
[0059]
【The invention's effect】
Thus, according to the present invention, it is possible to convert the source code of an existing application to operate in the target environment without reducing the advantage of using the standardized framework in the target environment. .
[Brief description of the drawings]
FIG. 1 is a diagram showing an overall configuration of the present embodiment.
FIG. 2 is a diagram conceptually showing processing contents by a screen analysis processing unit of the present embodiment.
FIG. 3 is a diagram conceptually showing processing contents by an element conversion processing unit of the present embodiment.
FIG. 4 is a flowchart showing a processing operation of the present embodiment.
FIG. 5 is a diagram for describing conversion from a Visual Basic source code to an intermediate source code according to the present embodiment;
FIG. 6 is a diagram for explaining conversion from a Visual Basic source code to an intermediate source code according to the present embodiment;
FIG. 7 is a diagram for explaining conversion from a Visual Basic source code to an intermediate source code according to the present embodiment;
FIG. 8 is a diagram showing an example of a conversion / placement rule used in the present embodiment.
FIG. 9 is a diagram for explaining conversion from intermediate source code to resources of the Struts framework according to the present embodiment.
FIG. 10 is a diagram for explaining conversion from intermediate source code to resources of the Struts framework according to the present embodiment.
FIG. 11 is a diagram for explaining conversion from intermediate source code to resources of the Struts framework according to the present embodiment.
FIG. 12 is a diagram for describing a location attribute that specifies a resource arrangement position in the present embodiment.
[Explanation of symbols]
10: Existing application source code storage unit, 11: Screen analysis processing unit, 12: Screen analysis information storage unit, 13: Element conversion processing unit, 14: New application resource template storage unit, 15: Element arrangement processing unit, 16: New Application template storage

Claims (18)

アプリケーションプログラムのソースコードを解析して解析情報を生成する解析手段と、
前記解析手段により生成された前記解析情報を予め定められた変換規則に従って変換することで、所定のターゲット環境におけるアプリケーションリソーステンプレートを生成する変換手段と
を備えたことを特徴とするソースコード変換装置。
Analysis means for analyzing the source code of the application program to generate analysis information;
A conversion unit configured to convert the analysis information generated by the analysis unit in accordance with a predetermined conversion rule to generate an application resource template in a predetermined target environment.
前記解析手段は、前記ソースコードから複数の要素を抽出し、各要素を分離して前記解析情報に含めることを特徴とする請求項1記載のソースコード変換装置。2. The source code conversion device according to claim 1, wherein the analysis unit extracts a plurality of elements from the source code, separates each of the elements and includes the elements in the analysis information. 前記変換規則は、前記解析情報に含まれる変換前の要素または要素集合と、前記アプリケーションリソーステンプレートに含まれる変換後の要素との対応を規定し、
前記変換手段は、前記変換規則を参照し、前記変換前の要素または要素集合を、対応する前記変換後の要素に変換することを特徴とする請求項2記載のソースコード変換装置。
The conversion rule defines the correspondence between the element or element set before conversion included in the analysis information and the element after conversion included in the application resource template,
3. The source code conversion device according to claim 2, wherein the conversion unit refers to the conversion rule and converts the element or the element set before the conversion into a corresponding element after the conversion.
前記変換規則は、複数のターゲット環境の各々に対応して設けられ、
前記変換手段は、前記解析情報を、要求されたターゲット環境に対応する前記変換規則に従って変換することを特徴とする請求項1記載のソースコード変換装置。
The conversion rule is provided corresponding to each of a plurality of target environments,
The source code conversion device according to claim 1, wherein the conversion unit converts the analysis information according to the conversion rule corresponding to a requested target environment.
前記アプリケーションリソーステンプレートを予め定められた配置規則に従って前記ターゲット環境に配置することで、アプリケーションテンプレートを生成する配置手段を更に備えたことを特徴とする請求項1記載のソースコード変換装置。2. The source code conversion device according to claim 1, further comprising an arrangement unit configured to arrange the application resource template in the target environment according to a predetermined arrangement rule to generate an application template. 前記配置規則は、前記アプリケーションリソーステンプレートと、前記アプリケーションリソーステンプレートを前記ターゲット環境に配置するための配置処理情報との対応を規定し、
前記配置手段は、前記配置規則を参照し、前記アプリケーションリソーステンプレートを前記配置処理情報に基づいて前記ターゲット環境に配置することを特徴とする請求項5記載のソースコード変換装置。
The arrangement rule defines a correspondence between the application resource template and arrangement processing information for arranging the application resource template in the target environment,
The source code conversion device according to claim 5, wherein the arrangement unit refers to the arrangement rule and arranges the application resource template in the target environment based on the arrangement processing information.
前記配置手段は、前記配置処理情報が前記ターゲット環境における前記アプリケーションリソーステンプレートの配置位置をユーザが指定可能なことを示す場合に、前記配置位置をユーザに指定させることを特徴とする請求項6記載のソースコード変換装置。7. The arrangement unit according to claim 6, wherein the arrangement unit allows the user to specify the arrangement position when the arrangement processing information indicates that the user can designate the arrangement position of the application resource template in the target environment. Source code conversion device. 前記配置規則は、複数のターゲット環境の各々に対応して設けられ、
前記配置手段は、前記アプリケーションリソーステンプレートを、要求されたターゲット環境に対応する前記配置規則に従って配置することを特徴とする請求項5記載のソースコード変換装置。
The arrangement rule is provided corresponding to each of a plurality of target environments,
The source code conversion device according to claim 5, wherein the arrangement unit arranges the application resource template according to the arrangement rule corresponding to a requested target environment.
アプリケーションプログラムのソースコードを解析して解析情報を生成するステップと、
生成された前記解析情報を予め記憶装置に記憶された変換規則に従って変換することで、所定のターゲット環境におけるアプリケーションリソーステンプレートを生成するステップと、
生成された前記アプリケーションリソーステンプレートを予め記憶装置に記憶された配置規則に従って前記ターゲット環境に配置することで、アプリケーションテンプレートを生成するステップと
を含むことを特徴とするソースコード変換方法。
Analyzing the source code of the application program to generate analysis information;
Generating an application resource template in a predetermined target environment by converting the generated analysis information according to a conversion rule stored in a storage device in advance;
Generating an application template by arranging the generated application resource template in the target environment in accordance with an arrangement rule stored in a storage device in advance.
前記解析情報を生成するステップでは、前記ソースコードから複数の要素を抽出し、各要素を分離して木構造で表現した中間ソースコードを、前記解析情報として記憶することを特徴とする請求項9記載のソースコード変換方法。10. The method according to claim 9, wherein in the step of generating the analysis information, a plurality of elements are extracted from the source code, and an intermediate source code in which each element is separated and expressed in a tree structure is stored as the analysis information. Source code conversion method described. 前記アプリケーションリソーステンプレートを生成するステップでは、前記記憶装置から、変換前の要素または要素集合と変換後の要素とを対応付けた前記変換規則を読み出し、当該変換規則において変換前の要素または要素集合として規定される前記解析情報内の要素を、対応する前記変換後の要素に変換することで、前記解析情報を変換することを特徴とする請求項10記載のソースコード変換方法。In the step of generating the application resource template, from the storage device, reads the conversion rule in which the element or element set before conversion is associated with the element after conversion, and as the element or element set before conversion in the conversion rule, 11. The source code conversion method according to claim 10, wherein the analysis information is converted by converting an element in the specified analysis information into a corresponding converted element. 前記アプリケーションリソーステンプレートを生成するステップでは、前記記憶装置に記憶された複数の変換規則のうち、要求されたターゲット環境に対応する変換規則を読み出し、前記解析情報を当該変換規則に従って変換することを特徴とする請求項9記載のソースコード変換方法。In the step of generating the application resource template, among the plurality of conversion rules stored in the storage device, a conversion rule corresponding to a requested target environment is read, and the analysis information is converted according to the conversion rule. The source code conversion method according to claim 9, wherein 前記アプリケーションテンプレートを生成するステップでは、前記記憶装置から、各アプリケーションリソーステンプレートと各アプリケーションリソーステンプレートを前記ターゲット環境に配置するための配置処理情報とを対応付けた前記配置規則を読み出し、前記アプリケーションリソーステンプレートを対応する前記配置処理情報に基づいて前記ターゲット環境に配置することを特徴とする請求項9記載のソースコード変換方法。In the step of generating the application template, the application resource template is read from the storage device to read out the arrangement rule in which each application resource template is associated with arrangement processing information for arranging each application resource template in the target environment. 10. The source code conversion method according to claim 9, wherein the source code is arranged in the target environment based on the corresponding arrangement processing information. 前記アプリケーションテンプレートを生成するステップでは、前記記憶装置に記憶された複数の配置規則のうち、要求されたターゲット環境に対応する配置規則を読み出し、前記アプリケーションリソーステンプレートを当該配置規則に従って配置することを特徴とする請求項9記載のソースコード変換方法。In the step of generating the application template, among the plurality of arrangement rules stored in the storage device, an arrangement rule corresponding to a requested target environment is read, and the application resource template is arranged according to the arrangement rule. The source code conversion method according to claim 9, wherein コンピュータに、
アプリケーションプログラムのソースコードを解析して解析情報を生成する機能と、
生成された前記解析情報を予め記憶装置に記憶された変換規則に従って変換することで、所定のターゲット環境におけるアプリケーションリソーステンプレートを生成する機能と、
生成された前記アプリケーションリソーステンプレートを予め記憶装置に記憶された配置規則に従って前記ターゲット環境に配置することで、アプリケーションテンプレートを生成する機能と
を実現させるためのプログラム。
On the computer,
A function to analyze the source code of the application program and generate analysis information;
A function of generating an application resource template in a predetermined target environment by converting the generated analysis information according to a conversion rule stored in a storage device in advance;
A program for realizing a function of generating an application template by arranging the generated application resource template in the target environment according to an arrangement rule stored in a storage device in advance.
前記解析情報を生成する機能では、前記ソースコードから複数の要素を抽出し、各要素を分離して木構造で表現した中間ソースコードを、前記解析情報として記憶する機能を更に実現させることを特徴とする請求項15記載のプログラム。In the function of generating the analysis information, a function of extracting a plurality of elements from the source code, separating each element and expressing an intermediate source code represented by a tree structure as the analysis information is further realized. The program according to claim 15, wherein 前記アプリケーションリソーステンプレートを生成する機能では、前記記憶装置に記憶された複数の変換規則のうち、要求されたターゲット環境に対応する変換規則を読み出し、前記解析情報を当該変換規則に従って変換する機能を更に実現させることを特徴とする請求項15記載のプログラム。The function of generating the application resource template further includes a function of reading a conversion rule corresponding to a requested target environment among a plurality of conversion rules stored in the storage device, and converting the analysis information according to the conversion rule. The program according to claim 15, wherein the program is realized. 前記アプリケーションテンプレートを生成する機能では、前記記憶装置に記憶された複数の配置規則のうち、要求されたターゲット環境に対応する配置規則を読み出し、前記アプリケーションリソーステンプレートを当該配置規則に従って配置する機能を更に実現させることを特徴とする請求項15記載のプログラム。The function of generating the application template further includes a function of reading an arrangement rule corresponding to the requested target environment from among the plurality of arrangement rules stored in the storage device, and arranging the application resource template according to the arrangement rule. The program according to claim 15, wherein the program is realized.
JP2003161029A 2003-06-05 2003-06-05 Source code conversion apparatus, source code conversion method, and program Expired - Fee Related JP4686117B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003161029A JP4686117B2 (en) 2003-06-05 2003-06-05 Source code conversion apparatus, source code conversion method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003161029A JP4686117B2 (en) 2003-06-05 2003-06-05 Source code conversion apparatus, source code conversion method, and program

Publications (2)

Publication Number Publication Date
JP2004362343A true JP2004362343A (en) 2004-12-24
JP4686117B2 JP4686117B2 (en) 2011-05-18

Family

ID=34053632

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003161029A Expired - Fee Related JP4686117B2 (en) 2003-06-05 2003-06-05 Source code conversion apparatus, source code conversion method, and program

Country Status (1)

Country Link
JP (1) JP4686117B2 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338190A (en) 2005-05-31 2006-12-14 Nec Corp Mounting code developing system, and mounting code developing program
JP2007087127A (en) * 2005-09-22 2007-04-05 Open Stream Inc Data generation program, storage medium for storing the program, open source software developmental environment integration program, and storage medium for storing the program
JP2012048353A (en) * 2010-08-25 2012-03-08 Ricoh Co Ltd Business management system, business management server and business management program
JP5405684B1 (en) * 2013-03-28 2014-02-05 株式会社バリュー Source program programming language converter
JP2014164309A (en) * 2013-02-21 2014-09-08 Nec Corp Screen program generation device, screen program generation method therefor, information processing device, and computer program
JP2015005031A (en) * 2013-06-19 2015-01-08 株式会社エヌ・ティ・ティ・データ Source code analyzing device, source code analyzing method, and program
JP2020135159A (en) * 2019-02-15 2020-08-31 株式会社富士通アドバンストエンジニアリング Source file generation program, source file generation method, and information processing device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134853A (en) * 1991-11-12 1993-06-01 Shikoku Nippon Denki Software Kk Program source language translating device
JP2002150377A (en) * 2000-11-10 2002-05-24 Japan Tobacco Inc Vending machine
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
JP2002366352A (en) * 2001-06-11 2002-12-20 It Forest Corp Apparatus for supporting web application development
JP2003076543A (en) * 2001-08-31 2003-03-14 Cats Kk Device, method for generating program and program for making computer execute the same program
JP2003150377A (en) * 2001-11-16 2003-05-23 Nec Corp System, method for developing picture output module, program, and recording medium
JP2004038297A (en) * 2002-06-28 2004-02-05 Jcreation Co Ltd Program format conversion apparatus and conversion program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05134853A (en) * 1991-11-12 1993-06-01 Shikoku Nippon Denki Software Kk Program source language translating device
JP2002150377A (en) * 2000-11-10 2002-05-24 Japan Tobacco Inc Vending machine
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
JP2002366352A (en) * 2001-06-11 2002-12-20 It Forest Corp Apparatus for supporting web application development
JP2003076543A (en) * 2001-08-31 2003-03-14 Cats Kk Device, method for generating program and program for making computer execute the same program
JP2003150377A (en) * 2001-11-16 2003-05-23 Nec Corp System, method for developing picture output module, program, and recording medium
JP2004038297A (en) * 2002-06-28 2004-02-05 Jcreation Co Ltd Program format conversion apparatus and conversion program

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006338190A (en) 2005-05-31 2006-12-14 Nec Corp Mounting code developing system, and mounting code developing program
JP2007087127A (en) * 2005-09-22 2007-04-05 Open Stream Inc Data generation program, storage medium for storing the program, open source software developmental environment integration program, and storage medium for storing the program
JP2012048353A (en) * 2010-08-25 2012-03-08 Ricoh Co Ltd Business management system, business management server and business management program
JP2014164309A (en) * 2013-02-21 2014-09-08 Nec Corp Screen program generation device, screen program generation method therefor, information processing device, and computer program
JP5405684B1 (en) * 2013-03-28 2014-02-05 株式会社バリュー Source program programming language converter
JP2014191738A (en) * 2013-03-28 2014-10-06 Value:Kk Programming language conversion device for source program
JP2015005031A (en) * 2013-06-19 2015-01-08 株式会社エヌ・ティ・ティ・データ Source code analyzing device, source code analyzing method, and program
JP2020135159A (en) * 2019-02-15 2020-08-31 株式会社富士通アドバンストエンジニアリング Source file generation program, source file generation method, and information processing device
JP7148804B2 (en) 2019-02-15 2022-10-06 富士通株式会社 SOURCE FILE GENERATION PROGRAM, SOURCE FILE GENERATION METHOD, AND INFORMATION PROCESSING DEVICE

Also Published As

Publication number Publication date
JP4686117B2 (en) 2011-05-18

Similar Documents

Publication Publication Date Title
CN108984172B (en) Interface file generation method and device
US8086618B2 (en) Configuration rule translation mapper
JP2001344105A (en) Web application developing method, development support system, and memory medium storing program related to this method
JPWO2017033441A1 (en) System construction support system, method, and storage medium
JP2013518321A (en) Pattern-based user interface
US20100169333A1 (en) Document processor
KR101552914B1 (en) Web server application framework web application processing method using the framework and computer readable medium processing the method
JP2015197826A (en) Information processor, information processing method, and program
JP4686117B2 (en) Source code conversion apparatus, source code conversion method, and program
US20070282857A1 (en) Web service execution method, processing method and apparatus
JP5867540B2 (en) PROGRAM GENERATION DEVICE, PROGRAM GENERATION DEVICE CONTROL METHOD, AND PROGRAM
US20180181550A1 (en) Screen information generation device and screen information generation method
CN111126008A (en) XSD-based code generation method and device, computer equipment and storage medium
CN116028062A (en) Target code generation method, NPU instruction display method and device
JP2004326626A (en) Structured document file management system and structured document file management method
JP2004046895A (en) Work flow conversion method
US20070124686A1 (en) Locating graphical elements for an object
Rak et al. Development and analysis of NLP pipelines in argo
JP2006236375A (en) Web application development method, development support system, and program about development method
JP2001273125A (en) Method and system for automatically generating source program, and program recording medium therefor
CN111367515B (en) Page card development method, device, computing equipment and storage medium
JP4590907B2 (en) Software development support device and software development support program
JP2007094453A (en) Program development support system, program development support method and program
JP2010157165A (en) Information processor, information processing method, and program
JP5438621B2 (en) Folder execution control method with processing, folder execution control apparatus with processing, and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20060517

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20090721

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20090924

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100727

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20101020

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: 20110208

RD14 Notification of resignation of power of sub attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7434

Effective date: 20110208

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: 20110214

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

Free format text: PAYMENT UNTIL: 20140218

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees