JP2007079838A - Program code generator, program code generating method, and program therefor - Google Patents
Program code generator, program code generating method, and program therefor Download PDFInfo
- Publication number
- JP2007079838A JP2007079838A JP2005265795A JP2005265795A JP2007079838A JP 2007079838 A JP2007079838 A JP 2007079838A JP 2005265795 A JP2005265795 A JP 2005265795A JP 2005265795 A JP2005265795 A JP 2005265795A JP 2007079838 A JP2007079838 A JP 2007079838A
- Authority
- JP
- Japan
- Prior art keywords
- instance
- program code
- design drawing
- information
- code generation
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
本発明は、ソフトウェアの設計図面からプログラムコードを自動生成することを特徴とするプログラムコード生成装置等に関する。 The present invention relates to a program code generation device or the like that automatically generates a program code from a design drawing of software.
近年のソフトウェア設計技術として、モデル駆動型アーキテクチャー(Model Driven Architecture技術(以降、MDA技術と称す)が広まり、採用されるようになってきている。一般的にMDA技術とは、オペレータが入力したソフトウェアの設計図面情報から各種プラットフォームのプログラムコードを自動的に生成し、且つ、入力したソフトウェアの設計図面情報をMDA専用ツール上で動作および検証することが可能な技術である。これらソフトウェアの設計図面情報の代表的な例としては、オブジェクト指向技術のモデル表記言語であるUML(Unified Modeling Language)やSDL(Specification & Description Language)などが挙げられる。 As a software design technology in recent years, Model Driven Architecture technology (hereinafter referred to as MDA technology) has become widespread and has been adopted. This is a technology that can automatically generate program codes for various platforms from software design drawing information, and can operate and verify the input software design drawing information on a dedicated MDA tool. Typical examples of information include UML (Unified Modeling Language) and SDL (Specification & Description Language), which are model notation languages of object-oriented technology.
しかしながら、既存のプログラム生成装置から生成されるプログラムコードは、設計図面からプログラムコードに変換するルールによっては、生成されるコードのサイズが大きく、実行のために多くのRAMを必要とするという問題がある。このため、組み込みシステムなどのメモリ容量の制限が厳しい領域では、MDA技術の導入に躊躇するケースが少なくない。 However, the program code generated from the existing program generation device has a problem that the size of the generated code is large and requires a lot of RAM for execution depending on the rules for converting the design drawing into the program code. is there. For this reason, in areas where memory capacity is severely limited, such as embedded systems, there are many cases where the introduction of MDA technology is hesitant.
設計図面の段階での最適化を行う技術が、特許文献1(特開平11−237980号公報)及び特許文献2(特開2004−118865号公報)に開示されている。これらの技術は、オブジェクト指向機能排除手段を用いて仮想関数の機能を排除、もしくはインスタンスの動的生成の機能を排除することで必要なメモリ容量を増加させることなく組み込み制御システムに適用可能なコードの最適化を行うことを可能にしている。更に、組み込みシステムのソフトウェア開発におけるRAM容量を削減する技術が特許文献3(特開2000−40005号公報)及び特許文献4(特開2001−184214号公報)に開示されている。これらの技術は、プログラムコード中のconst指定されたインスタンス変数やオブジェクトをROM上に配置することにより、RAM容量の削減を図っている。また、特許文献5(特開2002−91762号公報)に記載の技術は、ROMのデータへのアドレスをRAMへ再配置する際のアドレス変換に関するもので、設計図面のデータを解析するが、RAM上のどこに配置するかについては触れられていない。これらの提案で述べられている最適化は、プログラムコードの生成時に限定された工夫であり、MDA技術の実行可能モデルを考慮したものではない。 Techniques for performing optimization at the design drawing stage are disclosed in Patent Document 1 (Japanese Patent Laid-Open No. 11-237980) and Patent Document 2 (Japanese Patent Laid-Open No. 2004-118865). These technologies are code that can be applied to an embedded control system without increasing the required memory capacity by eliminating the function of a virtual function using the object-oriented function exclusion means or eliminating the function of dynamic generation of instances. It is possible to perform optimization. Further, techniques for reducing the RAM capacity in software development for embedded systems are disclosed in Patent Document 3 (Japanese Patent Laid-Open No. 2000-40005) and Patent Document 4 (Japanese Patent Laid-Open No. 2001-184214). These technologies attempt to reduce the RAM capacity by placing instance variables and objects designated by const in the program code on the ROM. The technique described in Patent Document 5 (Japanese Patent Application Laid-Open No. 2002-91762) relates to address conversion when rearranging addresses to ROM data in the RAM, and analyzes the data in the design drawing. There is no mention of where to place it above. The optimization described in these proposals is a device limited at the time of generating the program code, and does not consider the executable model of the MDA technique.
オブジェクト指向型プログラムでは、クラスの実体であるインスタンス同士が互いに協調動作することによって1つの機能を実現している。あるインスタンスが生成されるとそのインスタンスに働きかける別のインスタンスは、関連を保持するための領域についてメモリ領域を確保し、インスタンス同士で協調動作を実現する。インスタンス同士の関連が1対1の関連であれば、インスタンス自体を参照する領域が1つ存在すれば十分である。しかしながら、インスタンス同士の関連が1対多の場合や多対多の場合では、複数のインスタンスを保持するためのコンテナをメモリ領域に確保することが必要となる。複数のインスタンスを保持するコンテナは、配列型やLIST型やMAP型などで実現される。 In an object-oriented program, one function is realized by instances in which instances of a class cooperate with each other. When an instance is generated, another instance that works on the instance secures a memory area as an area for holding the association, and realizes a cooperative operation between the instances. If the relationship between instances is a one-to-one relationship, it is sufficient that there is one area that refers to the instance itself. However, when the relationship between instances is one-to-many or many-to-many, it is necessary to secure a container for holding a plurality of instances in the memory area. A container that holds a plurality of instances is realized by an array type, a LIST type, a MAP type, or the like.
1対多の関連の場合は、インスタンス同士の関連が動的に変化するために、コンテナ領域を動的に確保する必要がある。コンテナ領域は、インスタンスと関連がある別のインスタンスへの参照と次のコンテナへの参照を連続で持つことによって複数インスタンスとの関連を保持することができる。例えば、クラスXとクラスYの間に1対多の関連が存在し、クラスXのインスタンス(x1)がクラスYのインスタンス(y1,y2,y3)をLIST型のコンテナで実現すると、インスタンスx1は、y1からy3まで辿ることが可能なリスト形式のコンテナとして関連を持つことになる。そして、クラスXとクラスYにおいてデータのやり取りが発生する場合は、インスタンスx1が持つLIST型のコンテナからクラスYのインスタンスをキー検索することで、関連付けられている複数のインスタンスから特定のインスタンスと協調動作することが可能となる。 In the case of a one-to-many relationship, the relationship between instances changes dynamically, so it is necessary to dynamically secure the container area. The container area can maintain an association with a plurality of instances by continuously having a reference to another instance associated with the instance and a reference to the next container. For example, if there is a one-to-many relationship between class X and class Y, and instance (x1) of class X realizes instance (y1, y2, y3) of class Y with a LIST type container, instance x1 becomes , Y1 to y3 are related as a list-type container that can be traced. When data exchange occurs between the class X and the class Y, the key search is performed for the instance of the class Y from the LIST type container of the instance x1, and the specific instance is cooperated with a plurality of associated instances. It becomes possible to operate.
コンテナの実装方法にはメモリ使用量や検索にかかるコストなどから様々な方法が存在する。一般に検索にかかるコストを抑えた実装方法を選択すると、メモリ使用量が大となる。つまり、コンテナの実装方法は検索にかかるコストとメモリの消費量はトレードオフの関係となっている。そのため、メモリ消費量や検索コストの面から最適な実装方法でプログラムコードを生成する必要がある。しかしながら、MDA技術を利用した場合は、プログラムの特性に応じてコンテナの実装方法を変更しておらず、メモリ消費量やインスタンスの検索にかかるコストについて何ら考慮がなされていない状況となっている。 There are various container mounting methods depending on memory usage and search costs. In general, when an implementation method that suppresses the cost of search is selected, the memory usage increases. In other words, the container implementation method has a trade-off relationship between search costs and memory consumption. Therefore, it is necessary to generate a program code by an optimal mounting method in terms of memory consumption and search cost. However, when the MDA technology is used, the container mounting method is not changed according to the characteristics of the program, and no consideration is given to the memory consumption and the cost for searching for instances.
本発明は、実際に実行した結果であるインスタンスへのアクセス状況と、設計図面であるモデル情報から、インスタンスの保持方法であるコンテナを実装するプログラムコードについて、インスタンスへのアクセス頻度やアクセスパターンから最適なプログラムコードを選択する。これにより、設計者はソフトウェアの設計図面における関連について最適な実装方法を自動で出力することが可能となる。 The present invention is optimal from the access frequency and access pattern to the instance of the program code that implements the container that is the holding method of the instance, from the access status to the instance that is the actual execution result and the model information that is the design drawing. The correct program code. As a result, the designer can automatically output an optimum mounting method for the relation in the design drawing of the software.
上記の目的を達成するために本発明は、プラットフォーム非依存であり、実行可能であり、かつオブジェクト指向である設計図面を解析する設計図面解析工程と、前記設計図面情報に基づいて1対多の関連に対してプログラムコード生成規則を定めるインスタンス配置工程と、データアクセスが何回発生したかを示すインスタンスアクセス情報を更新するインスタンス配置情報更新工程と、前記インスタンス配置情報に基づいてプログラムコードを生成するプログラムコード生成工程とを備えることを特徴とするプログラムコード生成方法等、を提供する。 To achieve the above object, the present invention provides a design drawing analysis process for analyzing a design drawing that is platform-independent, executable, and object-oriented, and a one-to-many method based on the design drawing information. An instance placement step for defining a program code generation rule for the association, an instance placement information update step for updating instance access information indicating how many times data access has occurred, and a program code based on the instance placement information A program code generation method characterized by comprising a program code generation step.
本発明によれば、ソフトウェアの設計図面からプログラムコードを自動生成する際、1対多及び多対多の関連のクラスについてはインスタンス配置情報に従ったプログラムコードを生成するプログラムコード生成装置を提供することができる。 According to the present invention, there is provided a program code generation device for generating a program code in accordance with instance arrangement information for one-to-many and many-to-many related classes when automatically generating a program code from a software design drawing. be able to.
以下、添付の図面に沿って本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings.
(第1の実施形態)
図1は、本発明の第1の実施形態を示す全体構成図である。1はCPUであり、以下に説明する3〜10の装置を2で示すバスを介してアクセスし制御を行う。3はバス2を介してCPU1からアクセス可能な読み出し専用メモリ(ROM)であり、本実施形態ではその動作を詳細に説明する処理プログラム3a及び処理プログラムにより使用されるパラメータ3bが格納されている。4は読み書き可能なメモリ(RAM)である。RAM4上には、領域4a、4b、4c、4d、4e、4f、4g及び4hが確保されている。これらの領域4a〜4hには、設計図面情報、プラットフォーム依存情報、プログラムコード、インスタンス配置情報、ライブラリ、プログラム実行形式、インスタンスアクセス情報及びインスタンス配置情報が夫々格納される。これらの設計図面情報、プラットフォーム依存情報、プログラムコード、インスタンス配置情報、ライブラリ、プログラム実行形式、インスタンスアクセス情報及びインスタンス配置情報は、上記処理プログラム3により作成/変更がなされる。5は入力インターフェイスであり、6で示したキーボード、マウス、ボタン、ダイアル等の入力装置を介してなされる入力を受け取る。7は出力インターフェイスであり、8で示したCRT,LCD等の表示媒体、更にはプリンタ、プロッタ等の出力装置に対し、データの表示/出力を行なう。また、9は外部記憶装置インターフェイスであり、10で示したHD、FD、CD−ROM、MD、CF等の外部記憶装置に対するデータの入出力を行うものである。
(First embodiment)
FIG. 1 is an overall configuration diagram showing a first embodiment of the present invention.
本実施形態では、処理プログラム3aやパラメータ3bがROM3上にあるものとして、また、処理対象となる各データの格納領域(4a〜4h)がRAM上にあるものとして説明を行う。但し、これらはすべて、外部記憶装置上に配置することも可能であり、必要に応じて外部記憶装置からRAM上にロードして使用することもできる。また、CPUのキャッシュメモリ上に配置することも同様に可能である。
In the present embodiment, it is assumed that the
図2は、図1において3aで示した処理プログラムの構成要件とそれら構成要件が図1の4a〜4fで示した格納領域に格納されるデータとどのような関係にあるかを示すデータフロー図である。 FIG. 2 is a data flow diagram showing the configuration requirements of the processing program indicated by 3a in FIG. 1 and the relationship between the configuration requirements and the data stored in the storage areas indicated by 4a to 4f in FIG. It is.
201は、図1における入力インターフェイス5を介して入力されるデータを扱うGUI入力処理部であり、ユーザはこのGUI入力処理部201によりデータの入力や編集と、各処理部へ指示できるようになっている。本実施形態に係るプログラムコード生成装置においては、自動生成装置起動部202として利用する。
203は、外部記憶装置10に格納されている、プラットフォーム非依存であり、実行可能であり、かつオブジェクト指向であることを特徴とする設計図面を読み込み、設計図面情報206を生成する設計図面情報入力部である。
203 is a design drawing information input for reading design drawings stored in the
204は、プラットフォーム依存情報入力部である。プラットフォーム依存情報入力部204は、外部記憶装置10に格納されている、実行ファイルの動作するOSやCPUやメモリ量やプログラミング言語や利用フレームワークを含む情報を読み込み、プラットフォーム依存情報207を生成する。
205は、インスタンスの実装コードにおけるコレクションの型を決定するためのインスタンス配置情報208を更新するインスタンス配置情報更新部である。
209は、設計図面情報206やプラットフォーム依存情報207やインスタンス配置情報208からプログラムコード210を生成するプログラム生成部である。プログラム生成部209はインスタンス配置情報入力部によって選択されたインスタンス配置情報208を使って、プログラムコードを生成する。プログラム生成部209が生成可能なプログラムコードとして、インスタンスのコレクション型を決定したプログラムコードや、インスタンスへのアクセスログを出力することが可能なコードを付加したプログラムコード等が挙げられる。
211は、プログラムコード210から参照されるライブラリである。
212は、プログラムコード210とライブラリ211をコンパイル・リンクするコードコンパイラ・リンカである。
A code compiler /
213は、コードコンパイラ・リンカ212が生成したプログラム実行形式である。
214は、プログラム実行形式213を実行する実行部である。プログラム実行形式213がインスタンスへのアクセスログを出力することが可能なコードを付加したプログラム実行形式213であった場合、ここでのプログラム動作時にプログラム実行ログ215を出力する。
215は、プログラム実行部214でプログラム実行時に出力されたプログラム実行ログであり、いつ、どのクラスのインスタンスへのアクセスがあったかどうかをログ出力する。
216は、プログラム実行ログ215を使って、インスタンスへのアクセスログを解析する実行ログ解析部である。
An execution
217は、実行ログ解析部216より算出されたインスタンスアクセス情報である。
これ以降の説明におけるフローチャートによる処理手順は、例に限定されることはなく、本発明の結果を満たす限りいかなる手順の組み合わせも、複数処理をまとめることも、処理を細分化することも可能である。また、各処理を個々に切り出してひとつの機能要素として単体として機能し、示している処理以外の処理と組み合わせて使用することも可能である。 The processing procedure according to the flowchart in the following description is not limited to an example, and any combination of procedures, a plurality of processings, and processing can be subdivided as long as the result of the present invention is satisfied. . In addition, each process can be cut out individually to function as a single function element and used in combination with a process other than the process shown.
以下、本発明の実施形態の動作について図面及びフローチャートを参照して説明する。 The operation of the embodiment of the present invention will be described below with reference to the drawings and flowcharts.
図3は、本実施形態のシステム全体の処理手順を示したフローチャート図である。本システムの起動は(ステップS101)、GUI入力処理部201などの入力部からオペレータが指示する。 FIG. 3 is a flowchart showing a processing procedure of the entire system of the present embodiment. The activation of this system is instructed by an operator from an input unit such as the GUI input processing unit 201 (step S101).
ステップS102で、設計図面情報入力部203が設計図面を読込み、プログラム生成部209が処理できるデータ形式に変換した設計図面情報206を生成する。
In step S102, the design drawing
ステップS103で、プラットフォーム依存情報入力部204が、プログラム生成部209が処理できるデータ形式に変換したプラットフォーム依存情報207を生成する。
In step S103, the platform-dependent
ステップS104で、プログラム生成部209は、設計図面情報206とプラットフォーム依存情報207を用いてプログラムコード210を生成する。ここで、オペレータからの指示がある場合だけ、インスタンス配置情報208を使って、インスタンスの保持方法を特定したプログラムコードを生成する。更に、オペレータからの指示があれば、生成するプログラムコード210に対し、いつ、どのインスタンスにアクセスしたかを出力するプログラム実行ログ215を生成するプログラムコードを付加する。プログラムコード生成ルーチンに関しては、次に詳しく説明する。
In step S <b> 104, the
ステップS105で、コンパイラ・リンカ212はプログラムコード210とライブラリ211をコンパイル・リンクし、プログラム実行形式213を生成する。
In step S105, the compiler /
ステップS106で、プログラム実行部214はプログラム実行形式213を実行する。ここでプログラム実行形式214が、ログ出力機能を付加したプログラムコード210の実行形式だった場合、このステップ時にプログラム実行ログ215が出力される。
In step S106, the
ステップS107で、実行ログ解析部216は、プログラム実行ログを生成するプログラムコードが付加されていて、かつプログラム実行ログ215があるかどうかを判断する。プログラム実行ログがあった場合は、ステップS108へ進む。ステップS107で、プログラム実行ログがなかった場合は、ステップS109へ進む。
In step S <b> 107, the execution
ステップS108で、実行ログ解析部216はプログラム実行ログ215を解析する処理を行い、インスタンスアクセス情報217を生成する処理を行う。
In step S108, the execution
ステップS109で、インスタンス配置情報更新部208は、インスタンスアクセス情報が存在して、かつインスタンス配置情報を更新するかどうかを判断する。インスタンス配置情報を更新する場合は、ステップS110へ進む。ステップS109でインスタンス配置情報を更新しない場合は、ステップS111へ進み、本シーケンスを終了する。
In step S109, the instance arrangement
ステップS110で、インスタンス配置情報更新部208は、インスタンス配置情報を更新する処理を行う。インスタンス配置情報更新ルーチンに関しては、次に詳しく説明する。
In step S110, the instance arrangement
本実施形態においては、GUI入力処理部201から、オペレータによって、プログラム生成部209とコンパイラ・リンカ212、プログラム実行部214、実行ログ解析部216を起動しているが、この方法によらない。
In this embodiment, the GUI
図4は、図3のプログラムコード生成ルーチンS104の流れを説明したフローチャート図である。プログラムコード生成ルーチンが呼び出されると、ステップS202で、全てのクラスについて、プログラムコード生成が完了するまでステップS203からステップS211を繰り返す処理を行う。全てのクラスについてプログラムコード生成が完了していなかったら、ステップS203へ進む。 FIG. 4 is a flowchart explaining the flow of the program code generation routine S104 of FIG. When the program code generation routine is called, in step S202, processing for repeating steps S203 to S211 is performed for all classes until program code generation is completed. If the program code generation has not been completed for all classes, the process proceeds to step S203.
ステップS203で、クラスに存在する全ての関連についてのプログラムコード生成について、プログラムコード生成が完了するまでステップS204からステップS210を繰り返す処理を行う。全ての関連についてプログラムコード生成が完了していなかったら、ステップS204へ進む。 In step S203, with respect to generation of program codes for all associations existing in the class, processing is repeated from step S204 to step S210 until program code generation is completed. If program code generation has not been completed for all relationships, the process proceeds to step S204.
ステップS204で、設計図面情報206の中で関連が1対多の関連か1対1の関連かを判断する処理を行う。
In step S204, a process is performed to determine whether the relationship is a one-to-many relationship or a one-to-one relationship in the
ステップS204で、1対1の関連の場合は、ステップS208へ進む。1対多の関連の場合は、ステップS205へ進む。 In step S204, if there is a one-to-one relationship, the process proceeds to step S208. If there is a one-to-many relationship, the process proceeds to step S205.
ステップS205で、インスタンス配置情報208に基づいてコレクションについてプログラムコードを自動生成するかどうかを判断する処理を行う。ステップS205で、インスタンス配置情報208を用いてプログラムコード生成をする場合は、ステップS206へ進む。インスタンス配置情報208を用いない場合は、ステップS207へ進む。
In step S205, processing for determining whether to automatically generate a program code for the collection based on the
ステップS206で、インスタンス配置情報に記載の型でインスタンス同士の関連についてプログラムコードを生成する処理を行う。 In step S206, a process for generating a program code for the association between instances with the type described in the instance arrangement information is performed.
ステップS207で、リスト構造でインスタンス同士の関連についてプログラムコード生成する処理を行う。 In step S207, a program code is generated for the association between instances in the list structure.
ステップS208で、インスタンス同士の関連は1対1であるので、直接参照するプログラムコードを生成する処理を行う。 In step S208, since there is a one-to-one relationship between instances, a process for generating directly referenced program code is performed.
ステップS209で、プログラムコードに対して、ログを付加するかどうかを判断する処理を行う。ステップS209でログを付加する場合は、ステップS210へ進む。ステップS209で、ログを付加しない場合は、ステップS211へ進む。 In step S209, processing for determining whether or not to add a log to the program code is performed. When adding a log in step S209, the process proceeds to step S210. If no log is added in step S209, the process proceeds to step S211.
ステップS210で、プログラムコードに対してログ出力を行うプログラムコードを付加する処理を行う。 In step S210, processing for adding a program code for log output to the program code is performed.
ステップS211で、全ての関連についてプログラムコード生成が完了すると、ステップS212へ進む。 When program code generation is completed for all associations in step S211, the process proceeds to step S212.
ステップS212で、全てのクラスについてプログラムコード生成が完了すると、ステップS213へ進み本シーケンスを終了する。 When the program code generation is completed for all classes in step S212, the process proceeds to step S213 and this sequence is terminated.
図5Aは、ある設計図面の一部を示したイメージ図である。図5Aにおいて、301は、クラス名がAAAであるクラスを示している。302は、クラス名がBBBであるクラスを示している。303は、クラスAAAとクラスBBBが1対多の関連であることを示しており、クラスAAAからクラスBBBへの関連がA1であることを示している。
FIG. 5A is an image diagram showing a part of a certain design drawing. In FIG. 5A, 301 indicates a class whose class name is AAA.
図5Bは、クラス間の連携を実装するコンテナに関する特徴を示した表である。キー検索とは、あるインスタンスと関連のある複数のインスタンスの中から、特定のインスタンスをキーをもとに検索してからアクセスする形式である。Enumとは、あるインスタンスと関連のある複数のインスタンス全てに対してアクセスする形式である。MAP型は、インスタンスとそのキーを登録しておくのでキー検索にかかるコストは少なくい構造となる。LIST型や配列型の場合は、コンテナの構造が簡素であるか複雑であるかの違いはあるが、対象のインスタンスが見つかるまで全インスタンスを走査するため、キー検索にかかるコストは高くなる構造となる。また、Enum形式の場合では、コンテナの構造が簡素であるか複雑であるかの違いによりメモリ消費量に違いはあるが、EnumにかかるコストはMAP型、配列型、LIST型に違いはない。 FIG. 5B is a table showing characteristics related to containers for implementing cooperation between classes. Key search is a form in which a specific instance is searched based on a key from a plurality of instances associated with a certain instance and then accessed. An Enum is a form for accessing all of a plurality of instances related to a certain instance. In the MAP type, an instance and its key are registered, so that the cost for key search is low. In the case of the LIST type and the array type, there is a difference between whether the container structure is simple or complicated, but since all instances are scanned until the target instance is found, the cost for key search is high. Become. In the case of the Enum format, the memory consumption varies depending on whether the container structure is simple or complex, but the cost of the Enum is not different between the MAP type, the array type, and the LIST type.
図6は、図3のインスタンス配置情報の更新ルーチンS110の流れを詳細に説明したフローチャート図である。図5Bの表で示しているようにアクセス形式にキー検索がある場合は、キー検索にかかるコスト(処理のオーダー)の低いHASH型が有効である。そのため、ある一定以上のインスタンスを関連として持つ(コレクション)場合は、キー検索のコストを考えHASH型を選択する。LIST型と配列型では、キー検索にかかるコストは同じであるが、構造の複雑さからEnum形式のアクセス頻度の違いによって、配列型かLIST型を選択する。 FIG. 6 is a flowchart illustrating in detail the flow of the instance arrangement information update routine S110 of FIG. As shown in the table of FIG. 5B, when there is a key search in the access format, the HASH type with a low key search cost (processing order) is effective. For this reason, when a certain number of instances or more are associated (collection), the HASH type is selected in consideration of the key search cost. The cost for key search is the same between the LIST type and the array type, but the array type or the LIST type is selected depending on the access frequency of the Enum format because of the complexity of the structure.
インスタンス配置情報の更新ルーチンが呼び出されると、ステップS302で、全てのクラスについて、インスタンスアクセス情報217からインスタンス配置情報208の更新が完了するまでステップS303からステップS315を繰り返す処理を行う。全てのクラスについてインスタンス配置情報208の更新が完了していなかったら、ステップS303へ進む。
When the instance arrangement information update routine is called, in step S302, processing for repeating steps S303 to S315 is performed for all classes until the update of the
ステップS303で、クラスに存在する1対多の関連に関するインスタンス配置情報208の更新について、更新が完了するまでステップS304からステップS314を繰り返す処理を行う。全てのインスタンス配置情報208の更新が完了していなかったら、ステップS304へ進む。
In step S303, for the update of the
ステップS304で、対象としている関連についてのインスタンスアクセス情報を読み取り、キー検索があるかどうかを判断する処理を行う。ステップS304でキー検索がある場合は、ステップS305へ進む。キー検索がない場合は、ステップS309へ進む。 In step S304, the instance access information regarding the target association is read to determine whether there is a key search. If there is a key search in step S304, the process proceeds to step S305. If there is no key search, the process proceeds to step S309.
ステップS305で、対象としている関連についてのインスタンスアクセス情報を読み取り、コレクションの総インスタンス数を取得する処理を行う。 In step S305, the instance access information regarding the target association is read, and the total number of instances in the collection is acquired.
ステップS306で、前もって設定している関連を実装するコンテナを決定するための閾値を取得する処理を行う。 In step S306, a process for acquiring a threshold value for determining a container that implements a previously set association is performed.
ステップS307で、ステップS305で取得したコレクションの総インスタンス数とステップS306で取得した閾値を比較する処理を行う。ステップS307でコレクションの総インスタンス数が閾値よりも大である場合は、ステップS308へ進む。ステップS307でコレクションの総インスタンス数が閾値よりも小である場合は、ステップS309へ進む。 In step S307, the total number of instances of the collection acquired in step S305 is compared with the threshold acquired in step S306. If the total number of instances in the collection is larger than the threshold value in step S307, the process proceeds to step S308. If the total number of instances in the collection is smaller than the threshold value in step S307, the process proceeds to step S309.
ステップS308で、対象としている関連についてのインスタンス配置情報をHASH型に設定する処理を行う。 In step S308, a process for setting the instance arrangement information regarding the target association to the HASH type is performed.
ステップS309で、対象としている関連についてインスタンスアクセス情報を読み取り、Enum形式があるどうかを判断する処理を行う。ステップS309で、Enum形式がある場合は、ステップS311へ進む。Enum形式がない場合は、ステップS310へ進む。 In step S309, the instance access information is read for the target association, and processing for determining whether there is an Enum format is performed. If there is an Enum format in step S309, the process proceeds to step S311. If there is no Enum format, the process proceeds to step S310.
ステップS310で、対象としている関連についてのインスタンス配置情報208をLIST型に設定する処理を行う。
In step S310, a process for setting the
ステップS311で、対象としている関連についてのインスタンスアクセス情報を読み取り、Enum形式のアクセス頻度を取得する処理を行う。 In step S311, the instance access information regarding the relevant association is read, and processing for obtaining the access frequency in the Enum format is performed.
ステップS312で、前もって設定している関連を実装するコンテナを決定するための閾値を取得する処理を行う。 In step S312, a process for acquiring a threshold value for determining a container that implements a previously set association is performed.
ステップ313で、ステップS311で取得した総数とステップS312で取得した閾値を比較する処理を行う。ステップS313で総数が閾値よりも大である場合は、ステップS314へ進む。ステップS313で総数が閾値よりも小である場合は、ステップS310へ進む。 In step 313, the total number acquired in step S311 is compared with the threshold acquired in step S312. If the total number is larger than the threshold value in step S313, the process proceeds to step S314. If the total number is smaller than the threshold value in step S313, the process proceeds to step S310.
ステップS314で、対象としている関連についてのインスタンス配置情報208を配列型に設定する処理を行う。
In step S314, a process for setting the
ステップS315で、全ての関連についてインスタンス配置情報208の更新が完了すると、ステップS316へ進む。
When the update of the
ステップS316で、全てのクラスについてインスタンス配置情報208が完了すると、ステップS317へ進み、本シーケンスを終了する。
When the
図7は、図5Aの設計図面を入力として、図4のフローチャート図によってプログラムコードが生成され、そのプログラムコードをコンパイル・リンクし、その結果生成されるプログラム実行形式を実際に実行した結果得られるログの一例を示したイメージ図である。図7において、401は、クラスAAAの関連A1において、関連A1が保持するインスタンスに対するアクセスが発生した時のログを示している。402から404は、特定のインスタンスを取得するためのログを示している。402は、関連A1に対して、キー“name”で検索されたことを示しており、関連によって保持されているインスタンスを4回にわたってチェックした結果、対象インスタンスを取得することが出来たことを示している。403及び404においても、402と同様である。405は、関連によって保持されている全インスタンスに対して処理が発生したことを示すログとなっている。
FIG. 7 is obtained by inputting the design drawing of FIG. 5A and generating the program code according to the flowchart of FIG. 4, compiling and linking the program code, and actually executing the resulting program execution format. It is the image figure which showed an example of the log. In FIG. 7, 401 indicates a log when an access to an instance held by the association A1 occurs in the association A1 of the class AAA.
図8は、図7のログを解析した結果得られるインスタンスアクセス情報217を示したイメージ図である。図8中の501は、次の事項を示している。即ち、クラスAAAにおいて関連A1が存在し、その関連A1に対してキーが“name”であるインスタンスが存在するかどうかを検索する処理が発生し、対象インスタンスを取得するのに4回のアクセスが関連A1に対して生じたことを示している。502は、関連が保持する全インスタンス4つに対して連続アクセスが発生したことを示している。また、特定インスタンスに対するアクセスが3回、全インスタンスに対する連続アクセスが1回それぞれ発生したことを示している。
FIG. 8 is an image diagram showing
図4で示したフローチャートを実行すると、図8のインスタンスアクセス情報を解析し、インスタンス配置情報を更新する。キー検索に関する閾値が3である場合は、インスタンスアクセス情報217において総インスタンス数が4個であることからインスタンス配置情報208はMAP型に設定される。キー検索に関する閾値が4で、Enum形式のアクセス頻度が1である場合は、LIST型に設定される。キー検索に関する閾値が4で、Enum形式のアクセス頻度が0である場合は、配列型に設定される。以上説明したように、図4で示したフローチャートを実行することによって、インスタンスアクセス情報217からインスタンス配置情報208を更新する。
When the flowchart shown in FIG. 4 is executed, the instance access information of FIG. 8 is analyzed and the instance arrangement information is updated. When the threshold value for key search is 3, the
図9は、“MAP”を用いて生成されたプログラムコードの一例である。図9において、601は、クラスのコンストラクタであり、例えばコンストラクタの中でクラス間の関連(MAP)を生成するプログラムコードが生成される。602は、クラス間の関連において保持されているインスタンスについて、特定のインスタンスを取得するプログラムコードであり、例えばMAPを使用している場合は、引数にキーを与えることで特定のインスタンスをMAPから取得することが出来る。603は、クラス間の関連に新たにインスタンスを追加するプログラムコードであり、例えばMAPに登録するときは、インスタンスとそのインスタンスを検索するキーを同時に登録する。MAPは、メモリ消費量が大であるかわりに検索スピードが高速であることが知られており、MAPを関連に対するプログラムコードとして生成することによって、特定のインスタンスを検索するのにかかるコストを抑えることが可能となる。
FIG. 9 is an example of a program code generated using “MAP”. In FIG. 9,
図10は、“LIST”を用いて生成されたプログラムコードの一例である。図10において、701は、クラスのコンストラクタであり、例えばコンストラクタの中でクラス間の関連(LIST)を生成するプログラムコードが生成される。702は、クラス間の関連において保持されているインスタンスについて、特定のインスタンスを取得するプログラムコードである。例えばLISTを使用している場合は、while文などによりすべてのインスタンスに対して、キーと一致するインスタンスが現れるまでループを実行することで実現する。703は、クラス間の関連に新たにインスタンスを追加するプログラムコードであり、例えばLISTに登録するときは、インスタンスを登録する。LIST型は、MAP型よりもメモリ消費量が小であるかわりに検索にかかるコストがMAPよりも大であることが知られており、LIST型を関連に対するプログラムコードとして生成することによって、メモリ消費量を抑えることができる。
FIG. 10 is an example of a program code generated using “LIST”. In FIG. 10,
本実施形態では、あるインスタンスと関連のある別のインスタンスのコンテナに関わるプログラムコード生成について、閾値としてインスタンスの総数やアクセスした総数をもとに変更しているが、閾値として数ではなく割合であっても同様の作用・効果が得られる。 In this embodiment, program code generation related to a container of another instance related to an instance is changed based on the total number of instances or the total number accessed as a threshold, but the threshold is not a number but a ratio. However, similar actions and effects can be obtained.
(第2の実施形態)
次に、本発明の第2の実施形態について説明する。第2の実施形態では、第1の実施形態に加え、インスタンス配置情報の更新(図3のステップS110)において、インスタンスアクセス情報のアクセス情報に優先度を考慮して、インスタンス配置情報更新部205でインスタンス配置情報208を更新する。インスタンス配置情報を更新する場合のフローチャートを、図11に示す。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. In the second embodiment, in addition to the first embodiment, in the update of the instance arrangement information (step S110 in FIG. 3), the instance arrangement
図11は、第2の実施形態におけるインスタンス配置情報208を更新する場合のフローチャート図である。図5Bの表で示しているようにアクセス形式にキー検索がある場合は、キー検索にかかるコスト(処理のオーダー)の低いHASH型が有効である。しかしながら、キー検索にかかるコストが低いかわりメモリ消費量が高いため、キー検索がそれほど実行されない場合では、HASH型を選択してもそれほど効果が得られない場合も存在する。このような場合は、HASH型ではなくLIST型の方がいいかどうかをキー検索形式の頻度やEnum形式の頻度をもとに計算する。
FIG. 11 is a flowchart for updating the
ステップS402で、各型を使用する優先度に応じて割り振られたポイントを取得する処理を行う。例えば、関連を実装するプログラムコードをLIST型かMAP型とする場合において、検索スピードよりもメモリ消費量を抑えたい場合には、LIST型のポイントをMAP型よりも高く設定する。 In step S402, processing for obtaining points allocated according to the priority of using each type is performed. For example, when the program code for implementing the association is the LIST type or the MAP type, if the memory consumption is to be suppressed rather than the search speed, the LIST type point is set higher than the MAP type.
ステップS403で、全てのクラスについて、インスタンスアクセス情報217からインスタンス配置情報208の更新が完了するまでステップS404からステップS410を繰り返す処理を行う。全てのクラスについてインスタンス配置情報208の更新が完了していなかったら、ステップS404へ進む。
In step S403, for all classes, the process of repeating steps S404 to S410 is performed until the update of the
ステップS404で、クラスに存在する1対多の関連に関するインスタンス配置情報208の更新について、更新が完了するまでステップS405からステップS409を繰り返す処理を行う。全てのインスタンス配置情報208の更新が完了していなかったら、ステップS405へ進む。
In step S404, with respect to the update of the
ステップS405で、Enum形式のアクセス回数をインスタンスアクセス情報217から取得し、そのアクセス数とステップS402で取得したポイント数から各型のポイント数を計算する処理を行う。
In step S405, the number of accesses in the Enum format is acquired from the
ステップS406で、キー検索形式について、全てのキーが完了するまでステップS407を繰り返す処理を行う。全てのキーが完了していなかったら、ステップS407へ進む。 In step S406, the process of repeating step S407 is performed until all keys are completed for the key search format. If all the keys are not completed, the process proceeds to step S407.
ステップS407で、特定インスタンスのアクセスの回数をインスタンスアクセス情報217から取得し、そのアクセス数とステップS402で取得したポイント数から各型のポイント数を計算する処理を行う。
In step S407, the number of accesses of a specific instance is acquired from the
ステップS408で、全てのキーについて完了すると、ステップS409へ進む。 When all the keys are completed in step S408, the process proceeds to step S409.
ステップS409で、ステップS405とステップS407から得られた各型のポイント数から、インスタンス配置情報を設定する処理を行う。 In step S409, processing for setting instance arrangement information is performed from the number of points of each type obtained from steps S405 and S407.
ステップS410で、全ての関連についてプログラムコード生成が完了すると、ステップS411へ進む。 When the program code generation is completed for all associations in step S410, the process proceeds to step S411.
ステップS411で、全てのクラスについてプログラムコード生成が完了すると、ステップS412へ進み本シーケンスを終了する。 When program code generation is completed for all classes in step S411, the process proceeds to step S412 and this sequence is terminated.
図12は、第1の実施形態と同様のインスタンスアクセス情報217を示したイメージ図である。図12中の801は、次の事項を示している。即ち、クラスAAAにおいて関連A1が存在し、その関連A1に対してキーが“name”であるインスタンスが存在するかどうかを検索する処理が発生し、対象インスタンスを取得するのに4回のアクセスが関連A1に対して生じたことを示している。802は、クラスAAAにおいて関連A1が存在し、その関連A1に対してキーが“name”であるインスタンスが存在するかどうかを検索する処理が発生し、対象インスタンスを取得するのに2回のアクセスが関連A1に対して生じたことを示している。803は、クラスAAAにおいて関連A1が存在し、その関連A1に対してキーが“type”であるインスタンスが存在するかどうかを検索する処理が発生し、対象インスタンスを取得するのに50回のアクセスが関連A1に対して生じたことを示している。804は、関連が保持する全インスタンス数100に対して連続アクセスが発生したことを示している。また、同様のアクセスが、この他にも合計10回発生していることを示している。
FIG. 12 is an image diagram showing
図11で示したフローチャートを実行すると、図12のインスタンスアクセス情報を解析し、インスタンス配置情報を更新する。例えば、検索にかかるコストよりもメモリ消費量を抑えたい場合には、LIST型のポイントを2、MAP型のポイントを1のようにLIST型のポイントを高く設定する。図12の場合において、全インスタンスへの連続アクセスについて、全インスタンスへのアクセスが10回発生するため、LIST型のポイントは20ポイントとなる。同様にMAP型のポイントは10ポイントとなる。図12の場合において、特定インスタンスへのアクセスについて、nameをキーとしてアクセスする場合は、2回存在しているため、LIST型のポイントは0、MAP型のポイントは2となる。また、特定インスタンスへのアクセスについて、typeをキーとしてアクセスする場合は、1回存在しているため、LIST型のポイントは0、MAP型のポイントは1となる。この結果、図12のようなインスタンスアクセス情報において、メモリ消費量を抑える方針の場合には、次のようになる。即ち、LIST型のポイントが2、MAP型のポイントが1に設定されているので、LIST型20ポイント、MAP型12ポイント(キーがname)及び11ポイント(キーがtype)となる。従って、最終的なインスタンス配置情報はLISTとして設定することとなり、最終的にプログラムコードを生成するとLIST型を生成する。 When the flowchart shown in FIG. 11 is executed, the instance access information in FIG. 12 is analyzed, and the instance arrangement information is updated. For example, when it is desired to reduce the memory consumption rather than the cost for the search, the LIST type point is set higher, such as 2 for the LIST type and 1 for the MAP type. In the case of FIG. 12, with respect to continuous access to all instances, access to all instances occurs 10 times, so the LIST type points are 20 points. Similarly, MAP type points are 10 points. In the case of FIG. 12, when accessing a specific instance using name as a key, it exists twice, so the LIST type point is 0 and the MAP type point is 2. Further, when accessing a specific instance using type as a key, since it exists once, the LIST type point is 0 and the MAP type point is 1. As a result, in the instance access information as shown in FIG. That is, since the LIST type point is set to 2 and the MAP type point is set to 1, LIST type 20 points, MAP type 12 points (key is name), and 11 points (key is type). Accordingly, the final instance arrangement information is set as LIST, and when the program code is finally generated, the LIST type is generated.
また、メモリ消費量検索よりも検索にかかるコストを抑えたい場合には、LIST型のポイントを1、MAP型のポイントを2のようにMAP型のポイントを高く設定する。図12の場合において、全インスタンスへの連続アクセスについて、全インスタンスへのアクセスが10回発生するため、LIST型のポイントは10ポイントとなる。同様にMAP型のポイントは20ポイントとなる。図12の場合において、特定インスタンスへのアクセスについて、nameをキーとしてアクセスする場合は、2回存在しているため、LIST型のポイントは0、MAP型のポイントは4となる。また、特定インスタンスへのアクセスについて、typeをキーとしてアクセスする場合は、1回存在しているため、LIST型のポイントは0、MAP型のポイントは2となる。この結果、図12のようなインスタンスアクセス情報において、検索コストを抑える方針の場合には、次のようになる。即ち、LIST型のポイントが1、MAP型のポイントが2に設定されているので、LIST型10ポイント、MAP型22ポイント(キーがname)及び21ポイント(キーがtype)となる。従って、最終的なインスタンス配置情報はキーをnameとするMAP型として設定することとなり、最終的にプログラムコードを生成するとキーをnameとするMAP型を生成する。 In addition, when it is desired to suppress the search cost rather than the memory consumption search, the MAP type point is set to a high value such that the LIST type point is 1 and the MAP type point is 2. In the case of FIG. 12, since access to all instances occurs 10 times for continuous access to all instances, the LIST type points are 10 points. Similarly, MAP type points are 20 points. In the case of FIG. 12, when accessing a specific instance using name as a key, it exists twice, so the LIST type point is 0 and the MAP type point is 4. In addition, when accessing a specific instance using type as a key, since it exists once, the LIST type point is 0, and the MAP type point is 2. As a result, in the instance access information as shown in FIG. That is, since the LIST type point is set to 1 and the MAP type point is set to 2, the LIST type point is 10 points, the MAP type point is 22 points (key is name), and 21 points (key is type). Accordingly, the final instance arrangement information is set as a MAP type having a key as a name. When a program code is finally generated, a MAP type having a key as a name is generated.
本実施形態においては、ポイントを設定しているがポイントではなく別の優先度の設定方法を用いても同様の作用・効果が得られる。 In the present embodiment, points are set, but the same actions and effects can be obtained even if a method for setting other priorities is used instead of points.
以上説明してきたように、インスタンス配置情報を更新する場合に、インスタンスアクセス情報に対してポイントを適用することによって、メモリ消費量と検索にかかるコストのトレードオフを図りながら、関連を表すプログラムコードの実装方法を決定することが可能となる。 As described above, when updating the instance arrangement information, by applying points to the instance access information, it is possible to trade off the memory consumption and the cost of search and It becomes possible to determine the mounting method.
このように、これらの実施形態によれば、ソフトウェアの設計図面からプログラムコードを自動生成する際、1対多及び多対多の関連のクラスについてはインスタンス配置情報に従ったプログラムコードを生成するプログラムコード生成装置を提供することができる。 As described above, according to these embodiments, when the program code is automatically generated from the design drawing of the software, the program that generates the program code according to the instance arrangement information for the one-to-many and many-to-many related classes. A code generation device can be provided.
また、これらのプログラムコード生成装置は、インスタンス配置情報を更新するために、あるインスタンスが保持しているインスタンスのアクセス状況をログ出力可能なプログラムコードを生成することができる。そして、そのログからコンテナの実装方法を決めるためのインスタンスアクセス情報217を抽出することが可能である。さらに、インスタンスアクセス情報をもとにインスタンスを保持するコンテナについて最適なプログラムコードをインスタンス配置情報として更新することができる。更に、これらのプログラムコード生成装置は、コンテナ実装について、インスタンスアクセス情報からインスタンス配置情報を更新することで、インスタンスの検索コストを考慮しメモリ消費量を抑えたプログラムコードを生成できる。
Also, these program code generation devices can generate a program code that can log the access status of an instance held by a certain instance in order to update the instance arrangement information. Then, it is possible to extract
なお、本発明の実施形態は、例えばコンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体又はかかるプログラムを伝送するインターネット等の伝送媒体も本発明の実施形態として適用することができる。また、上記のプログラムも本発明の実施形態として適用することができる。上記のプログラム、記録媒体、伝送媒体及びプログラムプロダクトは、本発明の範疇に含まれる。 The embodiment of the present invention can be realized by, for example, a computer executing a program. Also, means for supplying a program to a computer, for example, a computer-readable recording medium such as a CD-ROM recording such a program, or a transmission medium such as the Internet for transmitting such a program is also applied as an embodiment of the present invention. Can do. The above program can also be applied as an embodiment of the present invention. The above program, recording medium, transmission medium, and program product are included in the scope of the present invention.
1:CPU
2:バス
3:ROM
4:RAM
4a:設計図面情報
4b:プラットフォーム依存情報
4c:プログラムコード
4d:インスタンス配置情報
4e:ライブラリ
4f:プログラム実行形式
5:入力インターフェイス
6:キーボード、ボタン、マウス、ダイアル
7:出力インターフェイス
8a:CRT、LCD
8b:プリンタ、プロッタ
9:外部記憶装置インターフェイス
10:HD、FD、CD−ROM、MD、CF、・・・(ファイル)
201:GUI入力処理部
202:自動生成装置起動部
203:設計図面情報入力部
204:プラットフォーム依存情報入力部
205:インスタンス配置情報更新部
206:設計図面情報
207:プラットフォーム依存情報
208:インスタンス配置情報
209:プログラム生成部
210:プログラムコード
211:ライブラリ
212:コンパイラ・リンカ
213:プログラム実行形式
214:プログラム実行部
215:プログラム実行ログ
216:実行ログ解析部
217:インスタンスアクセス情報
301:クラス名がAAAであるクラス
302:クラス名がBBBであるクラス
303:クラスAAAとクラスBBBの関連
1: CPU
2: Bus 3: ROM
4: RAM
4a: Design drawing
8b: printer, plotter 9: external storage device interface 10: HD, FD, CD-ROM, MD, CF,... (File)
201: GUI input processing unit 202: Automatic generation device activation unit 203: Design drawing information input unit 204: Platform dependent information input unit 205: Instance arrangement information update unit 206: Design drawing information 207: Platform dependent information 208: Instance arrangement information 209 : Program generation unit 210: Program code 211: Library 212: Compiler / linker 213: Program execution format 214: Program execution unit 215: Program execution log 216: Execution log analysis unit 217: Instance access information 301: Class name is AAA Class 302: Class name is BBB Class 303: Association between class AAA and class BBB
Claims (9)
前記設計図面情報に基づいて1対多の関連に対してプログラムコード生成規則を定めるインスタンス配置情報と、
データアクセスが何回発生したかを示すインスタンスアクセス情報を更新するインスタンス配置情報更新手段と、
前記インスタンス配置情報に基づいてプログラムコードを生成するプログラムコード生成手段と、
を備えることを特徴とするプログラムコード生成装置。 A design drawing analysis means for analyzing a design drawing that is platform independent, executable, and object oriented;
Instance arrangement information defining program code generation rules for one-to-many associations based on the design drawing information;
Instance placement information update means for updating instance access information indicating how many times data access has occurred;
Program code generating means for generating a program code based on the instance arrangement information;
A program code generation device comprising:
前記設計図面に記載の第1のクラスと、
前記設計図面に記載の前記第1のクラスとは異なる第2のクラスと、
前記第1のクラスと前記第2のクラスとの関連と、
前記設計図面の第1のクラスの実体である第1のインスタンスと、
前記設計図面の第2のクラスの実体である第2のインスタンスと、
前記第1のインスンタンス及び前記第2のインスタンスへのアクセス形式と、
を有することを特徴とする請求項2に記載のプログラムコード生成装置。 The instance access information is
A first class described in the design drawing;
A second class different from the first class described in the design drawing;
An association between the first class and the second class;
A first instance that is an entity of a first class of the design drawing;
A second instance that is an entity of a second class of the design drawing;
An access type to the first instance and the second instance;
The program code generation device according to claim 2, comprising:
前記設計図面情報に基づいて1対多の関連に対してプログラムコード生成規則を定めるインスタンス配置工程と、
データアクセスが何回発生したかを示すインスタンスアクセス情報を更新するインスタンス配置情報更新工程と、
前記インスタンス配置情報に基づいてプログラムコードを生成するプログラムコード生成工程と、
を備えることを特徴とするプログラムコード生成方法。 A design drawing analysis process for analyzing a platform independent, executable and object oriented design drawing;
An instance placement step for defining a program code generation rule for a one-to-many relationship based on the design drawing information;
An instance placement information update step for updating instance access information indicating how many times data access has occurred;
A program code generation step of generating a program code based on the instance arrangement information;
A program code generation method comprising:
プラットフォーム非依存であり、実行可能であり、かつオブジェクト指向である設計図面を解析する設計図面解析手順と、
前記設計図面情報に基づいて1対多の関連に対してプログラムコード生成規則を定めるインスタンス配置手順と、
データアクセスが何回発生したかを示すインスタンスアクセス情報を更新するインスタンス配置情報更新手順と、
前記インスタンス配置情報に基づいてプログラムコードを生成するプログラムコード生成手順と、
を実行させることを特徴とするプログラム。 On the computer,
A design drawing analysis procedure for analyzing a platform independent, executable and object oriented design drawing;
An instance arrangement procedure for defining a program code generation rule for a one-to-many relationship based on the design drawing information;
Instance placement information update procedure for updating instance access information indicating how many times data access has occurred,
A program code generation procedure for generating a program code based on the instance arrangement information;
A program characterized by having executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005265795A JP2007079838A (en) | 2005-09-13 | 2005-09-13 | Program code generator, program code generating method, and program therefor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2005265795A JP2007079838A (en) | 2005-09-13 | 2005-09-13 | Program code generator, program code generating method, and program therefor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2007079838A true JP2007079838A (en) | 2007-03-29 |
Family
ID=37940092
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2005265795A Pending JP2007079838A (en) | 2005-09-13 | 2005-09-13 | Program code generator, program code generating method, and program therefor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2007079838A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9251554B2 (en) | 2012-12-26 | 2016-02-02 | Analog Devices, Inc. | Block-based signal processing |
-
2005
- 2005-09-13 JP JP2005265795A patent/JP2007079838A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9251554B2 (en) | 2012-12-26 | 2016-02-02 | Analog Devices, Inc. | Block-based signal processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6995765B2 (en) | System, method, and computer program product for optimization of a scene graph | |
JP2000035893A (en) | Method for statically initializing arrangement of data processing system, data processing method, data processing system and computer readable storage medium storing program making computer execute its control procedure | |
CN113641701A (en) | Data query method, system, heterogeneous acceleration platform and storage medium | |
US8615729B2 (en) | Extending existing model-to-model transformations | |
CN115423101A (en) | Tensor data calculation reasoning method and device based on compiler and storage medium | |
JP2006285707A (en) | Business specification creation support system and method | |
JP2007079838A (en) | Program code generator, program code generating method, and program therefor | |
JP4870956B2 (en) | Embedded program generation method, embedded program development system, and information table section | |
CN112732852B (en) | Cross-platform space-time big data distributed processing method and system | |
WO2005041028A1 (en) | Software development tool program | |
US11573777B2 (en) | Method and apparatus for enabling autonomous acceleration of dataflow AI applications | |
JP2005173645A (en) | Device and method for supporting program development, program, and recording medium | |
JP2007219725A (en) | Program code generation device, its method and computer program | |
JP2007179114A (en) | Data processor, its indication data creating device, program, and recording medium | |
CN116627390B (en) | ICD file substitution method and device in aviation software development | |
CN111459576B (en) | Data analysis processing system and model operation method | |
JP2008299763A (en) | Distributed object development tool | |
JPH0546608A (en) | Document processor | |
JPS6310239A (en) | Patch production system for high-level language | |
CN117453713A (en) | SQL sentence generation method, device and storage medium for multi-type database | |
JP2009064207A (en) | Compiler | |
JP2002082811A (en) | Compiling method and recording medium | |
CN116932206A (en) | File processing method, device, computer equipment and storage medium | |
JP2007148577A (en) | Program code generation device, program code generation method, and program | |
CN114281317A (en) | Code visualization method and system, electronic device and storage medium |