JP6906155B2 - Automatic software generator capable of reverse engineering - Google Patents

Automatic software generator capable of reverse engineering Download PDF

Info

Publication number
JP6906155B2
JP6906155B2 JP2016053046A JP2016053046A JP6906155B2 JP 6906155 B2 JP6906155 B2 JP 6906155B2 JP 2016053046 A JP2016053046 A JP 2016053046A JP 2016053046 A JP2016053046 A JP 2016053046A JP 6906155 B2 JP6906155 B2 JP 6906155B2
Authority
JP
Japan
Prior art keywords
tree
environment
graph
file
structure data
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
JP2016053046A
Other languages
Japanese (ja)
Other versions
JP2017157180A (en
Inventor
直太 稲本
直太 稲本
Original Assignee
直太 稲本
直太 稲本
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 直太 稲本, 直太 稲本 filed Critical 直太 稲本
Priority to JP2016053046A priority Critical patent/JP6906155B2/en
Publication of JP2017157180A publication Critical patent/JP2017157180A/en
Application granted granted Critical
Publication of JP6906155B2 publication Critical patent/JP6906155B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、ソフトウェア工学のリバースエンジニアリングとソフトウェア自動生成に関し、特に、ソフトウェアの再利用化を図ったソフトウェア自動生成に関する。The present invention relates to reverse engineering of software engineering and automatic software generation, and more particularly to automatic software generation for reusing software.

従来は、リバースエンジニアリングは「ソフトウェア開発の下流工程のソースコードから上流工程の再利月可能なソースコードを抽出すること」、ソフトウェア自動生成は「ソフトウェア開発の上流工程の再利用可能な設計情報から下流工程のソースコードを自動的に生成すること」でまったく別のものであった。In the past, reverse engineering was "extracting the reusable source code of the upstream process from the source code of the downstream process of software development", and automatic software generation was "from the reusable design information of the upstream process of software development". It was completely different by "automatically generating the source code of the downstream process".

リバースエンジニアリングでは、下流工程のソースコードをパースツリー(構文木)にし、それを元に解析等をコンピュータに行なわせるが、このパースツリーを生成するパーサは、ソースコードの言語環境が変わる毎に、毎回その言語のパーサをある特定の言語環境のプログラムとしてハンドコーディングで作成していた。その為、複数の言語に対応しようとすると、パーサの開発コストが膨大になるという問題を抱えていた。In reverse engineering, the source code of the downstream process is made into a parse tree (syntax tree), and the computer is made to perform analysis based on it. The parser that generates this parse tree is used every time the language environment of the source code changes. Every time I hand-coded the parser for that language as a program for a particular language environment. Therefore, there is a problem that the development cost of the parser becomes enormous when trying to support multiple languages.

ソフトウェア自動生成では、上流工程の設計情報からターゲットの言語環境のソースコードを自動生成するが、これに使われるジェネレータを言語環境が異なる毎に、毎回その言語のジェネレータをある特定の言語環境のプログラムとしてハンドコーディングで作成していた。その為、複数の言語に対応しようとすると、ジェネレータの開発コストが膨大になるという問題を抱えていた。In software automatic generation, the source code of the target language environment is automatically generated from the design information of the upstream process, but every time the language environment is different, the generator of that language is used as the program of a specific language environment. It was created by hand coding as. Therefore, there is a problem that the development cost of the generator becomes enormous when trying to support multiple languages.

リバースエンジニアリングでは、再利用可能なソースコードを抽出して利用する方法は確立しておらず、支援ツールを使用して人が理解し、人手で再利用する程度だった。In reverse engineering, there is no established method for extracting and using reusable source code, and only humans can understand it using support tools and reuse it manually.

ソフトウェア自動生成では、スケルトンの生成等、半自動生成は可能であったが、完全自動生成しようとすると、上流工程の抽象的な設計情報のはずだったデータが特定のプログラム言語でのプログラムになってしまい、完全自動生成する意味がなくなってしまうという問題を抱えていた。With software automatic generation, semi-automatic generation such as skeleton generation was possible, but when trying to fully automatic generation, the data that was supposed to be abstract design information of the upstream process became a program in a specific programming language. Therefore, there was a problem that it was meaningless to generate it completely automatically.

特開2001−296996号公報Japanese Unexamined Patent Publication No. 2001-296996

特開2000−148501号公報Japanese Unexamined Patent Publication No. 2000-148501

本発明の目的は、再利用可能なソフトウェアの断片を蓄えるグラフデータベース(リレーショナルDBでもオブジェクト指向DBでもなくXML‐DBでもなく双方向グラフ構造データを基にしたデータベース)を実現し、従来別個だったリバースエンジニアリングとソフトウェア自動生成をこのグラフデータベースを介して次の3つの課題を通して繋げることである。An object of the present invention is to realize a graph database (a database based on bidirectional graph structure data, which is neither a relational DB nor an object-oriented DB nor an XML-DB) for storing reusable pieces of software, and has been separate in the past. Reverse engineering and automatic software generation are connected through this graph database through the following three tasks.

第1の課題は、従来言語毎にプログラムを作成していたリバースエンジニアリングのパーサとソフトウェア自動生成のジェネレータを、文法を記述した文法定義ファイルを与えただけでそのパーサ機能とジェネレータ機能を同時に実現してしまう装置の実現である。The first task is to realize the reverse engineering parser and software automatic generation generator, which used to create programs for each language, at the same time by simply giving a grammar definition file that describes the grammar. It is the realization of a device that can be used.

第2の課題は、パースツリーをグラフデータベースで扱えるように、パースツリーをグラフ構造データに変換することと、その逆変換を、同じ変換ルールを記述したツリーグラフ変換ルールファイルを与えただけで、同時に実現してしまう装置の実現である。The second task is to convert the perspective tree to graph structure data so that the perspective tree can be handled by the graph database, and to convert the reverse, just by giving a tree graph conversion rule file that describes the same conversion rule. It is the realization of a device that will be realized at the same time.

第3の課題は、双方向グラフ構造データに対して各種分析や各種加工を行う手段の提供である。The third problem is to provide means for performing various analyzes and various processes on the bidirectional graph structure data.

各種分析では例として将来的に、コールグラフを作成すること、フローチャートを作成すること、データフローグラフを作成すること、状態遷移図を作成すること、SQL文実行の事前の性能見積もりをすること等が出来る様にしておく事である。In various analyzes, for example, in the future, creating a call graph, creating a flowchart, creating a data flow graph, creating a state transition diagram, estimating the performance of SQL statement execution in advance, etc. It is to be able to do it.

各種加工では例として将来的に、
デバッグ用のログコードを自動的に入れたり削除したりすること、
プログラムの不使用部分を自動的に削除すること、
ライブラリの使い方を抽出したりする手段を提供すること
必要十分なテスト仕様を自動生成すること、
等が出来る様にしておく事である。
In the future as an example in various processing,
Automatically put or delete or to Rukoto the log code for debugging,
Automatically remove unused parts of the program,
To provide a means to extract how to use the library ,
Automatically generate necessary and sufficient test specifications,
Etc. should be possible.

本発明の特徴は、3つの主要な装置からなることである。A feature of the present invention is that it comprises three main devices.

第1の「汎用パーサ&汎用ジェネレータ」装置は、ある言語環境の文脈自由文法を記述した「文法定義ファイル」を与えただけで、その言語のソースコードをパースツリーにするパーサ機能と、その言語のパースツリーからソースコードを自動生成するジェネレータ機能を同時に実現する。The first "general-purpose parser & general-purpose generator" device has a parser function that turns the source code of a language into a parse tree and the language by simply giving a "grammar definition file" that describes the context-free grammar of a certain language environment. Simultaneously realizes a generator function that automatically generates source code from the perspective tree of.

第2の「ツリーグラフ変換用」拡張Prolog装置は、
単方向にしか辿れない「Lisp2進木パースツリー」
双方向に辿れる「環境依存モデル双方向グラフ構造データ」へと変換する機能と、
その逆の変換をする機能を、
同じ「ツリーグラフ変換ルールファイル」を用意しただけで同時に実現する。
The second "for tree graph conversion" extended Prolog device is
A function to convert "Lisp binary tree perspective tree" that can be traced only in one direction into "environment-dependent model bidirectional graph structure data" that can be traced in both directions,
The ability to do the opposite conversion,
Just prepare the same "tree graph conversion rule file" and it will be realized at the same time.

第3の「グラフデータ操作用」拡張Prolog装置は、プログラムを表す
「環境依存モデル双方向グラフ構造データ」及び
「環境非依存標準モデル双方向グラフ構造データ」に対し
再利用性のあるプログラムを用いて、各種分析や各種加工を行う。
The third "for graph data manipulation" extended Prolog device represents a program
"Environment-dependent model bidirectional graph structure data" and
Various analyzes and various processes are performed using a reusable program for "environment-independent standard model bidirectional graph structure data".

全体の流れとしては、「汎用パーサ&汎用ジェネレータ」装置は、
ある言語の「文法定義ファイル」とその言語のソースコードを与えると
「Lisp2進木パースツリー」を生成し、
「ツリーグラフ変換用」拡張Prolog装置は、
その言語環境の「ツリーグラフ変換ルールファイル」と
その「Lisp2進木パースツリー」を与えると、
単方向にしか辿れない「Lisp2進木パースツリー」
双方向に辿れる「環境依存モデル双方向グラフ構造データ」に変換する。
As for the overall flow, the "general-purpose parser & general-purpose generator" device is
Given a "grammar definition file" for a language and the source code for that language
Generate a "Lisp binary tree perspective tree" and
The "for tree graph conversion" extended Prolog device
With the "tree graph conversion rule file" of the language environment
Given that "Lisp binary tree perspective tree" ,
Converts a "Lisp binary tree perspective tree" that can be traced only in one direction into "environment-dependent model bidirectional graph structure data" that can be traced in both directions.

「ツリーグラフ変換用」拡張Prolog装置で変換した
「環境依存モデル双方向グラフ構造データ」は言語環境に依存するが、
「グラフデータ操作用」拡張Prolog装置に、
「標準モデル化プログラムファイル」と
この「環境依存モデル双方向グラフ構造データ」を与えると、
これを「環境非依存標準モデル双方向グラフ構造データ」に変換する。
"For tree graph conversion" Converted with the extended Prolog device
"Environment-dependent model bidirectional graph structure data" depends on the language environment,
For "graph data manipulation" extended Prolog device,
Given the "standard model program file" and this "environment-dependent model bidirectional graph structure data" ,
Convert this to "environment-independent standard model bidirectional graph structure data".

また「グラフデータ操作用」拡張Prolog装置は、
「環境非依存標準モデル双方向グラフ構造データ」に対して、
あらかじめ用意して置いた「各種分析プログラム」や「各種加工プログラム」を用いて、プログラムの分析や加工を行う。
In addition, the extended Prolog device for "graph data manipulation" is
For "environment-independent standard model bidirectional graph structure data"
Program analysis and processing are performed using "various analysis programs" and "various processing programs" prepared in advance.

「ツリーグラフ変換用」拡張Prolog装置は、
各種加工を行った後の「環境非依存標準モデル双方向グラフ構造データ」
任意の言語の「標準モデル用ツリーグラフ変換ルールファイル」を与えると、
その言語の「Lisp2進木パースツリー」を生成する。
The "for tree graph conversion" extended Prolog device
If you give "environment-independent standard model bidirectional graph structure data" after various processing and "tree graph conversion rule file for standard model" of any language,
Generate a "Lisp binary tree perspective tree" for that language.

「汎用パーサ&汎用ジェネレータ」装置は、その言語の「文法定義ファイル」と
「ツリーグラフ変換用」拡張Prolog装置が生成した
「Lisp2進木パースツリー」を与えると、
その言語のソースコードを自動生成する。
The "general purpose parser & general purpose generator" device was generated by the "grammar definition file" and "tree graph conversion" extended Prolog device for that language.
If you give "Lisp Binary Perth Tree",
Automatically generate source code for that language.

実施例1(既存システムの異なる言語環境への移行)Example 1 (Migration of an existing system to a different language environment)

一般的に、ある言語で書かれたコンピュータソフトウェアのソースコードを、異なる言語環境で動かすことは、移植作業に大変時間が掛かるものであった。In general, running computer software source code written in one language in a different language environment has been very time-consuming to port.

その原因は、人が手作業で作成したシステムの分析や修正を他の人が行う場合、まずシステムの仕様・実装・実際の動作状況を人手で理解してというフェーズで莫大なコストが掛かり、ソースコードを読んでそれを解読しなければならない場合はさらにコストが増大することにあった。The reason is that when another person analyzes or modifies a system created manually by a person, it costs a huge amount of money in the phase of first manually understanding the system specifications, implementation, and actual operating conditions. If you had to read the source code and decipher it, the cost would be even higher.

しかしながら、本発明の「リバースエンジニアリング可能なソフトウェア自動生成装置」が成熟し、発明の第1図に現れる各種ファイル群が充実すれば、異なる言語環境へのコンピュータソフトウェアのプログラムの移行を、人手やコストを掛けなくても、短期間で行う事が出来る様になる。However, if the "reverse engineerable software automatic generator" of the present invention matures and the various files shown in FIG. 1 of the invention are enriched, the transfer of computer software programs to different language environments can be done manually and at a high cost. You will be able to do it in a short period of time without multiplying.

実施例2(大規模システムの修正や拡張)Example 2 (Modification or expansion of a large-scale system)

一度作成されたソフトウェアを既存システム環境で大幅に修正することや大幅に拡張するということはよく発生する。It is common for software once created to be significantly modified or expanded in an existing system environment.

このときシステムの外部仕様は分かっているがプログラムを実装した人が残っていない場合、プログラムの修正や拡張する時、内部仕様を理解しソースコードを理解してからでないとプログラムの修正や拡張は難しい。この内部仕様/ソースコードの理解の所で非常に時間がかかるのが現状である。At this time, if the external specifications of the system are known but no one has implemented the program, when modifying or extending the program, it is necessary to understand the internal specifications and the source code before modifying or extending the program. difficult. At present, it takes a lot of time to understand this internal specification / source code.

「リバースエンジニアリング可能なソフトウェア自動生成装置」が成熟した場合
ソースコードは、「Lisp2進木のパースツリー」と
「環境依存グラフ構造データ」を経由するが、
最後に「環境非依存モデル双方向グラフ構造データ」にすることが出来れば、
人は内部仕様/ソースコードを読んで直接理解する必要がなくなる。
人の作業は、発明の図1に現れる各種ファイル群のメインテナンスと
「環境非依存標準モデル双方向グラフ構造データ」を分析/加工する
「各種分析プログラム」「各種加工プログラム」を追加も含めて充実させることとなる。
If the "reverse engineering software that can automatically generate device" is mature,
The source code goes through "Lisp binary tree perspective tree" and "environment-dependent graph structure data",
Finally, if it can be made into "environment-independent model bidirectional graph structure data",
People no longer have to read and understand the internal specifications / source code directly.
Human work is the maintenance of various files shown in FIG. 1 of the invention.
"Various analysis programs" and "various machining programs" for analyzing / processing "environment-independent standard model bidirectional graph structure data" will be enhanced including addition.

発明の図1の各種ファイル群、特に「各種分析プログラムファイル」群、及び「各種加工プログラムファイル」群が十分充実すれば、人の主なソフトウェア開発作業は「プログラムの理解とコーディング」から「グラフデータベース」との対話に作業内容が変わる。If the various file groups shown in FIG. 1 of the invention, especially the "various analysis program files" group and the "various processing program files" group, are sufficiently enriched, the main software development work of a person is from "program understanding and coding" to "graph". The work content changes to a dialogue with the "database".

本発明の「リバースエンジニアリング可能なソフトウェアの自動生成装置」の実施形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of the embodiment of the "automatic generator of software capable of reverse engineering" of this invention. 加減乗除と代入と制御文のある文法の「文法定義ファイル」の例である。This is an example of a "grammar definition file" for a grammar with addition, subtraction, multiplication, division, substitution, and control statements. 図2の「文法定義ファイル」で自動生成したファイルのソースコード例である。This is an example of the source code of the file automatically generated by the “grammar definition file” in FIG. XML簡易文法の「文法定義ファイル」の例である。This is an example of a "grammar definition file" of XML simple grammar. 図4の「文法定義ファイル」で自動生成したファイルのソースコード例の抜粋である。This is an excerpt of the source code example of the file automatically generated by the "grammar definition file" in FIG. 「ツリーグラフ変換ルールファイル」の例の抜粋である。This is an excerpt from the example of "Tree graph conversion rule file". 「オブジェクト指向プログラム」を「環境非依存標準モデル双方向グラフ構造データ」で表現した一例である。This is an example of expressing an "object-oriented program" with "environment-independent standard model bidirectional graph structure data". Altair言語の「標準モデル化プログラムファイル」のソースコード例の抜粋その1である。This is the first excerpt of the source code example of the "Standard Modeling Program File" in the Altair language. Altair言語の「標準モデル化プログラムファイル」のソースコード例の抜粋その2である。This is the second excerpt of the source code example of the "Standard Modeling Program File" in the Altair language.

実施例1(既存システムの異なる言語環境への移行)Example 1 (Migration of an existing system to a different language environment)

添付の図面を参照して本発明によるリバースエンジニアリング可能なソフトゥエア自動生成装置の第1の実施例の形態を詳細に説明する。図1から図9を参照すると、本発明の実施例が示されている。A first embodiment of the reverse engineerable soft air automatic generator according to the present invention will be described in detail with reference to the accompanying drawings. References to FIGS. 1 to 9 show embodiments of the present invention.

図1は、本実施形態のリバースエンジニアリング可能なソフトゥエア自動生成媒体の構成例を示すブロック図である。FIG. 1 is a block diagram showing a configuration example of a reverse engineerable soft air automatic generation medium of the present embodiment.

まず、図1で既存システム言語環境の「文法定義ファイル」群(5)と「ツリーグラフ変換ルール」群(6)と「標準モデル化プログラムファイル」群(7)と、移行先システム言語環境の「文法定義ファイル」群(5)と「標準モデル用ツリーグラフ変換ルールファイル」群(10)を、なければ作成する。各ファイル群の例は後で示す。First, in FIG. 1, the "grammar definition file" group (5), the "tree graph conversion rule" group (6), the "standard modeling program file" group (7) of the existing system language environment, and the migration destination system language environment If there is no "grammar definition file" group (5) and "standard model tree graph conversion rule file" group (10), create them. An example of each file group is shown later.

次に、既存システム言語環境の「既存システム言語環境のソースコードファイル」群(4)を既存システム言語環境の「文法定義ファイル」群(5)と「汎用パーサ&汎用ジェネレータ」装置(1)で「Lisp2進木のパースツリー」の内部データに変換する。図2と図4に「文法定義ファイル」の具体的な例を示す。Next, the "source code file of the existing system language environment" group (4) of the existing system language environment is used in the "grammar definition file" group (5) of the existing system language environment and the "general-purpose parser & general-purpose generator" device (1). Convert to the internal data of "Lisp binary tree perspective tree". 2 and 4 show specific examples of the “grammar definition file”.

文法定義ファイルは、ジェネレータとして使う場合のインデント/改行/スペーシングの記述をする部分と、文脈自由文法の構文定義の部分と、文脈自由文法の字句定義の部分の3つからなっている。The grammar definition file consists of three parts: an indent / line feed / spacing description part when used as a generator, a context-free grammar syntax definition part, and a context-free grammar lexical definition part.

文脈自由文法を記述する方法として使われることが多いのはBNFであるが、BNFは繰り返しを再帰で記述しなければならず、可読性が良くない。文法定義ファイルでは、0個以

Figure 0006906155
の基本として用いている。BNF is often used as a method of describing context-free grammars, but BNF has to describe repetitions recursively, which is not good for readability. In the grammar definition file, 0 or more
Figure 0006906155
It is used as the basis of.

次に、この単方向にしか辿れない「Lisp2進木のパースツリー」の内部データを既存システム環境の「ツリーグラフ変換ルールファイル」群(6)と「ツリーグラフ変換用」拡張Prolog装置(2)で双方向に辿れる「環境依存モデル双方向グラフ構造データ」の内部データに変換する。図6に「ツリーグラフ変換ルールファイル」の例の抜粋を示す。Next, the internal data of the "Lisp binary tree perspective tree" that can be traced only in one direction is used in the "tree graph conversion rule file" group (6) and the "tree graph conversion" extended prolog device (2) in the existing system environment. Convert to internal data of "environment-dependent model bidirectional graph structure data" that can be traced bidirectionally with. FIG. 6 shows an excerpt of an example of the “tree graph conversion rule file”.

「ツリーグラフ変換ルールファイル」は、文法の単位の名前と、その文法の単位のパースツリーとグラフ構造データ間の変換ルールの記述の組の集合である。文法の単位は、括弧ばかりで読み書きし辛いが、文法の単位は、文法定義ファイルから自動生成され、一切気に掛ける必要はない。「ツリーグラフ変換ルールファイル」は、ない場合は作成しなければならないが、スケルトンに相当するものは、文法定義ファイルから自動生成される。図6で「[‐/□□/‐>○○]」という記述がある部分がPrologをグラフデータを扱え得る様に拡張した部分である。A "tree graph conversion rule file" is a set of a set of a name of a grammar unit and a description of a conversion rule between a perspective tree of the grammar unit and graph structure data. Grammar units are hard to read and write with only parentheses, but grammar units are automatically generated from the grammar definition file, so you don't have to worry about it at all. The "tree graph conversion rule file" must be created if it does not exist, but the skeleton equivalent is automatically generated from the grammar definition file. In FIG. 6, the part with the description “[-/ □□ /-> ○○]” is the part where Prolog is extended so that graph data can be handled.

次に、この「環境依存モデル双方向グラフ構造データ」の内部データを
既存システム言語環境の「標準モデル化プログラムファイル」群(7)と
「グラフデータ操作用」拡張Prolog装置(3)で
「環境非依存標準モデル双方向グラフ構造データ」の内部データに変換する。
図7に「1から100までを足して結果を出力するプログラム」を
「環境非依存標準モデル双方向グラフ構造データ」で表現した例を示す。
図8と図9に、Altairという言語の
「標準モデル化プログラムファイル」の例の抜粋を示す。
Next, the internal data of this "environment-dependent model bidirectional graph structure data" is used in the "standard modeling program file" group (7) of the existing system language environment and the "environment" for "graph data manipulation" extended prolog device (3). Convert to internal data of "independent standard model bidirectional graph structure data".
In Fig. 7, "a program that adds 1 to 100 and outputs the result"
An example expressed by "environment-independent standard model bidirectional graph structure data" is shown.
8 and 9 show excerpts from an example of a "standard model program file" in the language Altair.

図7は、コンピュータソフトウェアのプログラムを
「環境非依存標準モデル双方向グラフ構造データ」で示しており
グラフ構造データのグラフは有向グラフであるが、
アークはコンピュータ上で双方向に辿ることが出来る。
双方向グラフ構造データで表したコンピュータソフトウェアの
プログラムのグラフのアークには、
inclusionとassociationの2種類のアークが存在する。
inclusionのみのグラフは、
プログラムを構文解析した結果の構文木を表している。
associationは、
プログラムの構文解析の後の、プログラムを意味解析した結果、
同一シンボル(同一クラス名/同一変数名/同一関数名、等)と
判定された部分をつなぐアークである。
Figure 7 shows a computer software program.
Is indicated by "environment-independent standard model interactive graph structure data",
The graph of the graph structure data is a directed graph,
Ark can be traced in both directions on a computer.
In the arc of graphs of computer software programs represented by bidirectional graph structure data,
There are two types of arcs, inclusion and association.
The graph of inclusion only is
It represents the syntax tree as a result of parsing the program.
association is
As a result of semantic analysis of the program after parsing the program,
It is an arc that connects the parts determined to be the same symbol (same class name / same variable name / same function name, etc.).

図8と図9は、「グラフデータ操作用」拡張Prolog装置に与えるグラフデータ操作プログラムの例であるが、Prologを拡張した部分は、主に「before:={・・・}、after:={・・・}とcommon:={・・・}が対になった部分」である。グラフ構造データ中、before:={以下に書かれたグラフパターンに、現在着目しているグラフがマッチすると、after:={以下に書かれているグラフパターン(を作成/に修正)することにより、グラフ構造データの作成/修正が出来る。common:={以下には、条件を論理述語で書けるようになっており、グラフ構造データのきめ細かな、作成や修正を可能としている。8 and 9 are examples of a graph data manipulation program given to the “graph data manipulation” extended Prolog device, but the extended portion of Prolog is mainly “before: = {...}, after: =. It is the part where {...} and common: = {...} are paired. " In the graph structure data, before: = {If the graph currently of interest matches the graph pattern written below, after: = {By creating / modifying the graph pattern written below. , Graph structure data can be created / modified. common: = {In the following, conditions can be written in logical predicates, enabling detailed creation and modification of graph structure data.

次に、この「環境非依存標準モデル双方向グラフ構造データ」の内部データを、移行先システム言語環境の「標準モデル用ツリーグラフ変換ルール」群(10)と「ツリーグラフ変換用」拡張Prolog装置(2)で「Lisp2進木のパースツリー」の内部データに変換する。「標準モデル用ツリーグラフ変換ルール」群(10)の書き方は、「ツリーグラフ変換ルールファイル」群(6)と同様である。Next, the internal data of this "environment-independent standard model bidirectional graph structure data" is used in the "tree graph conversion rule for standard model" group (10) and the "tree graph conversion" extended program device of the migration destination system language environment. In (2), it is converted into the internal data of "Parse tree of Lisp binary tree". The method of writing the "tree graph conversion rule for standard model" group (10) is the same as that of the "tree graph conversion rule file" group (6).

次に、この「Lisp2進木パースツリー」
移行先システム言語環境の「文法定義ファイル」群(5)と
「汎用パーサ&汎用ジェネレータ」装置(1)で移行先システム言語環境の
「ターゲット言語環境のソースコードファイル」群(11)を自動生成する。
図3に、図2の「文法定義ファイル」で自動生成したソースコードの例を示す。
図5に、図4の「文法定義ファイル」で自動生成したソースコードの例を示す。
Next, this "Lisp binary tree perspective tree" is used in the "grammar definition file" group (5) of the migration destination system language environment and the "general purpose parser & general purpose generator" device (1) to "target language environment" of the migration destination system language environment. Source code file group (11) is automatically generated.
FIG. 3 shows an example of the source code automatically generated by the “grammar definition file” of FIG.
FIG. 5 shows an example of the source code automatically generated by the “grammar definition file” of FIG.

実施例2(大規模システムの修正や拡張)Example 2 (Modification or expansion of a large-scale system)

添付の図面を参照して本発明によるリバースエンジニアリング可能なソフトゥエア自動生成装置の第2の実施例の形態を詳細に説明する。本発明の第2の実施例は、図と説明が部を除いて、第1の実施例とほぼ同様である。A second embodiment of the reverse engineerable soft air automatic generator according to the present invention will be described in detail with reference to the accompanying drawings. The second embodiment of the present invention is almost the same as the first embodiment except for the parts shown and described.

図1は、本実施形態のリバースエンジニアリング可能なソフトゥエア自動生成媒体の構成例を示すブロック図である。FIG. 1 is a block diagram showing a configuration example of a reverse engineerable soft air automatic generation medium of the present embodiment.

まず、図1で既存システム環境の「文法定義ファイル」群(5)と「ツリーグラフ変換ルールファイル」群(6)と「標準モデル化プログラムファイル」群(7)と「標準モデル用ツリーグラフ変換ルールファイル」群(10)をなければ作成する。これは、ターゲット言語環境の「文法定義ファイル」が既存システム言語環境の「文法定義ファイル」と同一になることを除いて、発明の第1の実施例の形態と同様である。First, in Fig. 1, the "grammar definition file" group (5), "tree graph conversion rule file" group (6), "standard modeling program file" group (7), and "tree graph conversion for standard model" of the existing system environment If there is no "rule file" group (10), create it. This is the same as that of the first embodiment of the invention, except that the “grammar definition file” of the target language environment is the same as the “grammar definition file” of the existing system language environment.

次に、既存システム言語環境の「既存システム言語環境のソースコードファイル」群(4)を既存システム言語環境の「文法定義ファイル」群(5)と「汎用パーサ&汎用ジェネレータ」装置(1)で「Lisp2進木のパースツリー」の内部データに変換する。これは発明の第1の実施例の形態と同様である。Next, the "source code file of the existing system language environment" group (4) of the existing system language environment is used in the "grammar definition file" group (5) of the existing system language environment and the "general-purpose parser & general-purpose generator" device (1). Convert to the internal data of "Lisp binary tree perspective tree". This is the same as the embodiment of the first embodiment of the invention.

次に、この単方向にしか辿れない「Lisp2進木のパースツリー」の内部データを既存システム環境の「ツリーグラフ変換ルールファイル」群(6)と「ツリーグラフ変換用」拡張Prolog装置(2)で双方向に辿れる「環境依存モデル双方向グラフ構造データ」の内部データに変換する。これは発明の第1の実施例の形態と同様である。Next, the internal data of the "Lisp binary tree perspective tree" that can be traced only in one direction is used in the "tree graph conversion rule file" group (6) and the "tree graph conversion" extended prolog device (2) in the existing system environment. Convert to internal data of "environment-dependent model bidirectional graph structure data" that can be traced bidirectionally with. This is the same as the embodiment of the first embodiment of the invention.

次に、この「環境依存モデル双方向グラフ構造データ」の内部データを既存システム言語環境の「標準モデル化プログラムファイル」群(7)と「グラフデータ操作用」拡張Prolog装置(3)で「環境非依存標準モデル双方向グラフ構造データ」の内部データに変換する。これは発明の第1の実施例の形態と同様である。Next, the internal data of this "environment-dependent model bidirectional graph structure data" is used in the "standard modeling program file" group (7) of the existing system language environment and the "environment" for "graph data manipulation" extended prolog device (3). Convert to internal data of "independent standard model bidirectional graph structure data". This is the same as the embodiment of the first embodiment of the invention.

次に、この「環境非依存標準モデルグラフ構造データ」の内部データに対し、「グラフデータ操作用」拡張Prolog装置(3)での問い合わせ/挿入/削除/更新を行ってプログラム修正を行う。この修正を行うことはRDB(Relational Data Base)のSELECT文/INSERT文/DELETE文/UPDATE文を実行することと類似しているので本発明の図1の「グラフデータ操作用」拡張Prolog装置周りはGDB(Graph Data Base)と呼ぶことにする。Next, the internal data of this "environment-independent standard model graph structure data" is inquired / inserted / deleted / updated by the "graph data manipulation" extended Prolog device (3) to modify the program. Since making this modification is similar to executing an RDB (Relational Data Base) SELECT statement / INSERT statement / DELETE statement / UPDATE statement, the "for graph data manipulation" extended Prolog device of FIG. 1 of the present invention can be used. Will be referred to as GDB (Graph Data Base).

ソフトウェアの修正は、本発明のリバースエンジニアリング可能なソフトウェア自動生成装置の利用技術者が最も親しんでいるプログラミング言語で行う事が出来る。C++が出来る技術者であれば、修正該当部分をC++で書かれた「既存システム言語環境のソースコードファイル」(4)を自動生成し、技術者がC++で修正を行い、それをリバースエンジニアリングで「環境非依存標準モデル双方向グラフ構造データ」の内部データに反映させて、修正を行う。Javaが出来る技術者であれば、修正該当部分をJavaで書かれた「既存システム言語環境のソースコードファイル」(4)を自動生成し、技術者がJavaで修正を行い、それをリバースエンジニアリングで「環境非依存標準モデル双方向グラフ構造データ」の内部データに反映させて、修正を行う。Software modifications can be made in the programming language most familiar to engineers using the reverse engineerable software automatic generator of the present invention. If you are a technician who can do C ++, the engineer will automatically generate the "source code file of the existing system language environment" (4) written in C ++, and the technician will make the correction in C ++ and reverse engineer it. Make corrections by reflecting it in the internal data of "Environment-independent standard model bidirectional graph structure data". If you are a technician who can do Java, the engineer will automatically generate the "source code file of the existing system language environment" (4) written in Java, and the technician will make corrections in Java and reverse engineer it. Make corrections by reflecting it in the internal data of "Environment-independent standard model bidirectional graph structure data".

次に、この修正された「環境非依存標準モデル双方向グラフ構造データ」の内部データを、「標準モデル用ツリーグラフ変換ルール」群(10)と「ツリーグラフ変換用」拡張Prolog装置(2)で「Lisp2進木のパースツリー」の内部データに変換する。これは発明の第1の実施例の形態と同様である。Next, the internal data of this modified "environment-independent standard model bidirectional graph structure data" is used in the "tree graph conversion rule for standard model" group (10) and the extended prolog device (2) for "tree graph conversion". Converts to the internal data of "Lisp binary tree perspective tree". This is the same as the embodiment of the first embodiment of the invention.

次に、この「Lisp2進木パースツリー」の内部データを「文法定義ファイル」群(5)と「汎用パーサ&汎用ジェネレータ」装置(1)で「既存システム言語環境のソースファイル」群(4)を自動生成する。これは、ターゲット言語環境の「文法定義ファイル」が既存システム言語環境の「文法定義ファイル」と同一になることを除いて、発明の第1の実施例の形態と同様である。Next, the internal data of this "Lisp binary tree perspective tree" is used in the "grammar definition file" group (5) and the "general-purpose parser & general-purpose generator" device (1) in the "source file of the existing system language environment" group (4). Is automatically generated. This is the same as that of the first embodiment of the invention, except that the “grammar definition file” of the target language environment is the same as the “grammar definition file” of the existing system language environment.

コンピュータのシステムソフトウェア開発現場は、3K(きつい、汚い、格好悪い)と呼ばれるようになり、人気が減って来ている。納期が迫り、サービス残業を強いられている人も多い。この現状を顧みるに、本来機械にやらせることが出来る作業も未だに人手で行っていて、作業自体も複雑化している為と思われる。プログラマが手作業で行っている部分の大部分を、コンピュータによるIT化・自動化する事により、コンピュータのシステムソフトウェア開発現場のコンピュータソフトウェアの生産性と品質の大幅な向上が図れる事が期待できる。Computer system software development sites have come to be called 3K (difficult, dirty, ugly) and are becoming less popular. Many people are forced to work overtime due to the approaching delivery date. Looking back on this situation, it seems that the work that can be done by the machine is still done manually, and the work itself is complicated. It can be expected that the productivity and quality of computer software at the computer system software development site can be significantly improved by making most of the parts manually performed by programmers into IT and automation by computers.

1 汎用パーサ&汎用ジェネレータ装置
2 ツリーグラフ変換用拡張Prolog装置
3 グラフデータ操作用拡張Prolog装置
4 既存システム言語環境のソースコードファイル群
5 文法定義ファイル群
6 ツリーグラフ変換ルールファイル群
7 標準モデル化プログラムファイル群
8 各種分析プログラムファイル群
9 各種加工プログラムファイル群
10 標準モデル用ツリーグラフ変換ルールファイル群
11 ターゲット言語環境のソースコードファイル群
12 各種分析結果群
13 各種生成物群
14 グラフデータベース
1 General-purpose parser & general-purpose generator device 2 Extended Prolog device for tree graph conversion 3 Extended Prolog device for graph data operation 4 Source code file group of existing system language environment 5 Grammar definition file group 6 Tree graph conversion rule file group 7 Standard modeling program File group 8 Various analysis program file group 9 Various processing program file group 10 Tree graph conversion rule file group for standard model 11 Source code file group of target language environment 12 Various analysis result group 13 Various product group 14 Graph database

Claims (4)

特定の言語の文脈自由文法を記述した「文法定義ファイル」の言語で書かれた「既存システム環境依存ソースコードファイル」群を用いて内部データである単方向にしか辿れない「Lisp2進木パースツリー」を生成するパーサ機能と、
内部データである単方向にしか辿れない「Lisp2進木パースツリー」と「文法定義ファイル」を用いて、文法定義ファイルで記述した言語で書かれた「ターゲットシステム環境依存ソースコードファイル」群または「既存システム環境依存ソースコードファイル」群を生成するジェネレータ機能とから構成され、
パーサ機能とジェネレータ機能を同じ「文法定義ファイル」を与えただけで、
同時に実現することを特徴とする「汎用パーサ&汎用ジェネレータ」装置。
"Lisp binary tree perspective tree" that can be traced only in one direction, which is internal data, using a group of "existing system environment-dependent source code files" written in the language of "grammar definition file" that describes the context-free grammar of a specific language. And the parser function to generate
"Target system environment-dependent source code files" or "target system environment-dependent source code files" written in the language described in the grammar definition file using the "Lisp binary tree perspective tree" and "grammar definition file" that can be traced only in one direction, which is internal data. It consists of a generator function that generates "existing system environment-dependent source code files".
Just by giving the same "grammar definition file" for the parser function and the generator function,
A "general-purpose parser & general-purpose generator" device that is characterized by being realized at the same time.
ソースコードと文法定義ファイルから生成された単方向にしか辿れない「Lisp2進木パースツリー」を入力とし双方向に辿れる「環境依存モデル双方向グラフ構造データ」に変換すること、及び、
双方向に辿れる「環境依存モデル双方向グラフ構造データ」を文法定義ファイルでソースコードにするための単方向にしか辿れない「Lisp2進木パースツリー」に出力として変換すること、
の相互変換する為の「ツリーグラフ変換ルールファイル」群を用いて単方向にしか辿れない「Lisp2進木パースツリー」を双方向に辿れる「環境依存モデル双方向グラフ構造データ」へと変換する機能と、
その逆の変換をする機能を、
同じ「ツリーグラフ変換ルールファイル」を与えただけで同時に実現することを特徴とする「ツリーグラフ変換用」拡張Prolog装置。
Converting to "environment-dependent model bidirectional graph structure data" that can be traced in both directions by inputting "Lisp binary tree perspective tree" that can be traced only in one direction generated from the source code and grammar definition file, and
Converting "environment-dependent model bidirectional graph structure data" that can be traced in both directions to "Lisp binary tree perspective tree" that can be traced only in one direction to make the source code in the grammar definition file,
Function to convert "Lisp binary tree perspective tree" that can be traced only in one direction to "environment-dependent model bidirectional graph structure data" that can be traced in both directions using the "tree graph conversion rule file" group for mutual conversion of When,
The ability to do the opposite conversion,
An extended Prolog device for "tree graph conversion" that can be realized at the same time just by giving the same "tree graph conversion rule file".
「標準モデル化プログラムファイル」群を用いて「環境依存モデル双方向グラフ構造データ」を「環境非依存標準モデル双方向グラフ構造データ」に変換する機能を持ち、
「コールグラフを作成すること」「フローチャートを作成すること」「データフローグラフを作成すること」「状態遷移図を作成すること」をする「分析プログラムファイル」群のうち少なくとも1つの「分析プログラムファイル」と
「デバッグ用のログコードを自動的に入れたり削除したりすること」「プログラムの不使用部分を自動的に削除すること」「ライブラリの使い方を抽出したりする手段を提供すること」「必要十分なテスト仕様を自動生成すること」をする「加工プログラムファイル」群のうち少なくとも1つの「加工プログラムファイル」を用いて「環境非依存標準モデル双方向グラフ構造データ」の分析・加工が可能なことを特徴とする「グラフデータ操作用」拡張Prolog装置。
It has a function to convert "environment-dependent model bidirectional graph structure data" to "environment-independent standard model bidirectional graph structure data" using the "standard modeling program file" group.
At least one "analysis program file" in the "analysis program file" group that "creates a call graph", "creates a flowchart", "creates a data flow graph", and "creates a state transition diagram" " ,
"Automatically insert and delete debug log code""Automatically delete unused parts of the program""Provide a means to extract how to use the library""Necessary and sufficient It is possible to analyze and process "environment-independent standard model bidirectional graph structure data" using at least one "machining program file" in the "machining program file" group that "automatically generates various test specifications". An extended program device for "graph data manipulation" characterized by.
請求項に記載の「汎用パーサ&汎用ジェネレータ」装置と、
請求項に記載の「ツリーグラフ変換用」拡張Prolog装置と、
請求項に記載の「グラフデータ操作用」拡張Prolog装置とで構成され、
既存システム言語環境の請求項1に記載の「ソースコードファイル」群を前記の「汎用パーサ&汎用ジェネレータ」装置で単方向にしか辿れない請求項1に記載の「Lisp2進木パースツリー」に変換し、
その前記の「Lisp2進木パースツリー」を前記の「ツリーグラフ変換用」拡張Prolog装置で双方向に辿れる請求項2に記載の「環境依存モデル双方向グラフ構造データ」に変換し、その前記の「環境依存モデル双方向グラフ構造データ」を前記の「グラフデータ操作用」拡張Prolog装置で請求項3に記載の「環境非依存標準モデル双方向グラフ構造データ」に変換し、
その前記の「環境非依存標準モデル双方向グラフ構造データ」を前記の「グラフデータ操作用」拡張Prolog装置で請求項3に記載の「分析プログラムファイル」群を用いて分析し、
その前記の「環境非依存標準モデル双方向グラフ構造データ」を前記の「グラフデータ操作用」拡張Prolog装置で請求項3に記載の「加工プログラムファイル」群を用いて加工し、
その加工後の前記の「環境非依存標準モデル双方向グラフ構造データ」を前記の「ツリーグラフ変換用」拡張Prolog装置で単方向にしか辿れない前記の「Lisp2進木パースツリー」に変換し、
その前記の「Lisp2進木パースツリー」から前記の「汎用パーサ&汎用ジェネレータ」装置で既存システム言語環境またはターゲット言語環境の前記の「ソースコードファイル」群を自動生成する装置。
The "general-purpose parser & general-purpose generator" device according to claim 1,
The "tree graph conversion" extended Prolog device according to claim 2 and
It is composed of the extended Prolog device for "graph data manipulation" according to claim 3.
Convert the "source code file" group according to claim 1 of the existing system language environment to the "Lisp binary tree perspective tree" according to claim 1 which can be traced only in one direction by the above-mentioned "general-purpose parser & general-purpose generator" device. death,
The above-mentioned "Lisp binary tree perspective tree" is converted into the "environment-dependent model bidirectional graph structure data" according to claim 2, which can be traced in both directions by the above-mentioned "tree graph conversion" extended Prolog device, and the above-mentioned The "environmentally dependent model bidirectional graph structure data" is converted into the "environment-independent standard model bidirectional graph structure data" according to claim 3 by the above-mentioned "graph data manipulation" extended Prolog apparatus.
The above-mentioned "environment-independent standard model bidirectional graph structure data" is analyzed by the above-mentioned "for graph data manipulation" extended Prolog apparatus using the "analysis program file" group according to claim 3 .
The above-mentioned "environment-independent standard model bidirectional graph structure data" is processed by the above-mentioned "for graph data manipulation" extended Prolog apparatus using the "machining program file" group according to claim 3 .
Was converted into its said "environment-independent standard model interactive graph structure data" of the "for translation tree graph" not traced only unidirectionally extended Prolog system said "Lisp2 quadtree parse tree" after processing,
As the apparatus for automatically generating the of a "source code file" group existing systems language environment or target language environment from the "Lisp2 quadtree parse tree" in the above "universal parser & generic Generator" devices.
JP2016053046A 2016-03-01 2016-03-01 Automatic software generator capable of reverse engineering Active JP6906155B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016053046A JP6906155B2 (en) 2016-03-01 2016-03-01 Automatic software generator capable of reverse engineering

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016053046A JP6906155B2 (en) 2016-03-01 2016-03-01 Automatic software generator capable of reverse engineering

Publications (2)

Publication Number Publication Date
JP2017157180A JP2017157180A (en) 2017-09-07
JP6906155B2 true JP6906155B2 (en) 2021-07-21

Family

ID=59809933

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016053046A Active JP6906155B2 (en) 2016-03-01 2016-03-01 Automatic software generator capable of reverse engineering

Country Status (1)

Country Link
JP (1) JP6906155B2 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2675100B2 (en) * 1988-09-30 1997-11-12 株式会社日立製作所 Language converter and language conversion method
JP3003459B2 (en) * 1993-06-10 2000-01-31 三菱電機株式会社 Program creation support device
JP3562435B2 (en) * 2000-04-12 2004-09-08 日本電気株式会社 Automatic component generator
US20060212859A1 (en) * 2005-03-18 2006-09-21 Microsoft Corporation System and method for generating XML-based language parser and writer
US8296744B2 (en) * 2008-10-03 2012-10-23 Microsoft Corporation Tree-based directed graph programming structures for a declarative programming language

Also Published As

Publication number Publication date
JP2017157180A (en) 2017-09-07

Similar Documents

Publication Publication Date Title
US9122540B2 (en) Transformation of computer programs and eliminating errors
Korshunova et al. CPP2XMI: reverse engineering of UML class, sequence, and activity diagrams from C++ source code
CN101398758A (en) Detection method of code copy
JPH08202545A (en) Object-oriented system and method for generation of target language code
CN111580806A (en) Collaborative robot graphical programming system
CN106951305B (en) Method for generating midCore script from QVT-R language based on model conversion
JPS6375835A (en) Apparatus for generating intended code, program, list and design document
CN108595334B (en) Method and device for calculating dynamic slices of Java program and readable storage medium
US20150020051A1 (en) Method and apparatus for automated conversion of software applications
Ramirez et al. Automatic generation of data conversion programs using a data description language
US20160062738A1 (en) Methods and Apparatuses for Interactive Computer Programming
JP6719798B1 (en) A program for enabling the verification of the legitimacy of asynchronous algorithms that occur when a logically coupled program is executed.
JP6906155B2 (en) Automatic software generator capable of reverse engineering
JP4835859B2 (en) State transition diagram creation device and state transition diagram creation method
Sharaf et al. Visualization of constraint handling rules
Schöpp et al. Requirements-based code model checking
RU105038U1 (en) BASIC DATA TRANSLATOR
GB2509540A (en) Enterprise decision management
Quesada et al. Parsing abstract syntax graphs with ModelCC
JP3112623B2 (en) Program production support equipment
Mishchenko et al. New functionalities of the system for processing natural language specifications and its operating environment
CN117492753A (en) Front-end development method and system for realizing data visualization
CN117850797A (en) Floating point program intermediate representation generation method and system based on Clang
CN116468020A (en) Universal calculation field lexical analysis system and method thereof
KR100250484B1 (en) Method of event data process using expression on performance monitor for parallel program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190219

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20191120

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20191210

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20200206

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20200707

A601 Written request for extension of time

Free format text: JAPANESE INTERMEDIATE CODE: A601

Effective date: 20200826

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20201102

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20210527

R150 Certificate of patent or registration of utility model

Ref document number: 6906155

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150