JP3713466B2 - Program creation support method, program creation support program, and program creation support apparatus - Google Patents
Program creation support method, program creation support program, and program creation support apparatus Download PDFInfo
- Publication number
- JP3713466B2 JP3713466B2 JP2002040262A JP2002040262A JP3713466B2 JP 3713466 B2 JP3713466 B2 JP 3713466B2 JP 2002040262 A JP2002040262 A JP 2002040262A JP 2002040262 A JP2002040262 A JP 2002040262A JP 3713466 B2 JP3713466 B2 JP 3713466B2
- Authority
- JP
- Japan
- Prior art keywords
- program
- component
- data
- parts
- link
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Stored Programmes (AREA)
Description
【0001】
【発明の属する技術分野】
本発明は、ソフトウェア部品の連結手段をも部品として表現するソフトウェア部品化技術を利用したソフトウェア開発技術に係り、特に、ソフトウェア開発者がこの種のソフトウェア部品を用いてプログラムを作成するのを支援するプログラム作成支援方法、プログラム作成支援プログラム及びプログラム作成支援装置に関する。
【0002】
【従来の技術】
ソフトウェア(ソフトウェアプログラム)の部品化は、ソフトウェアの生産性・品質向上の重要な手法である。オブジェクト指向プログラミングは、このソフトウェアの部品化の促進に効果があると従来から期待されていた。その理由は、オブジェクト指向プログラミングでは、継承の機構がソフトウェアの再利用につながる点と、モジュールの独立性の高さや現実世界の「もの」との類似性がそれらの仕様理解を助ける点などとにある。
【0003】
【発明が解決しようとする課題】
しかしながら、上記のような期待にもかかわらず、実際には、現在もソフトウェアの部品化手法は十分には確立されていない。従来、オブジェクト指向プログラミングだけではソフトウェアの部品化が十分に実現できなかった理由を以下に列挙する。
【0004】
(A1)継承に基づくプログラミングでは、最も一般化された、抽象度の高い部品から完成していく必要がある。しかし、求められる一般形を見極めるのは、ソフトウェアの機能が大きくなると急激に困難になる。特に、ソフトウェア開発者(プログラム作成者)が対象業務の専門知識を有さない場合には、それが顕著である。また、ソフトウェアに対するユーザ要件は、刻々と変化する。そのために、ある時点では十分な一般性を備えた部品を作成できても、時間経過に伴いその利用可能性が小さくなっていく。
【0005】
(A2)処理の主体や対象は「もの」として表現するものの、処理主体が(一般には複数の)処理対象にどのように作用して目的の機能を実現するかという点に関しては、従来同様に手続き的な表現が基本となっている。その結果、部品を組み合わせたシステム全体の振る舞いの把握や予測を、物理的な装置のように直感的にできない。そのため、現在は、ソフトウェアの設計やメンテナンスにおける人間の思考支援を目的とした、様々な図表の作成などが必要になっている。
【0006】
この、オブジェクト指向プログラミングにおいて未解決の部分を補完するために、これまで部品とみなされてきたオブジェクトだけでなく、オブジェクト間の連結部分をも部品化するプログラミング技術が考えられる。つまり、大きなオブジェクトの部品化を目指すのではなく、一連のオブジェクト群が目的の機能を実現するようオブジェクトを組み合わせる素材を部品化するプログラミング技術が考えられる。この技術は、多くの実務処理がそうであるように、各種フォームやレコードなどの受動的性格の強いデータを入出力として加工するソフトウェアの開発において、特に有用となることが予想される。
【0007】
本発明は上記事情を考慮してなされたものでその目的は、ソフトウェア部品の連結部分をも部品として表現するソフトウェア部品化技術を利用して、最適な手順で実行されるプログラムをソフトウェア開発者が容易に作成できるように支援する、プログラム作成支援方法、プログラム作成支援プログラム及びプログラム作成支援装置を提供することにある。
【0008】
【課題を解決するための手段】
本発明の1つの観点によれば、ソフトウェア部品の連結手段をリンク部品として表現するソフトウェア部品化技術を利用したプログラムの作成を支援するための計算機により実行されるプログラム作成支援方法が提供される。このプログラム作成支援方法は、データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の群をプログラム構成の要素部品の群とし、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成するステップと、上記プログラムの静的構造中の要素部品群のうちの利用者指定の各データ部品に利用者指定のコストを設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成するステップと、上記プログラム定義情報で定義された要素部品群のうちの各データ部品毎に、当該データ部品の各フィールドに与えられる値を算出するために、いずれのリンク部品を用いるべきかを、候補となるリンク部品の入力側に接続されたデータ部品をたどって、そのたどった先のデータ部品に設定されているコストをもとに、コストが小さいデータ部品に対応するリンク部品ほど優先して用いられるように決定してプログラムコードを生成するステップとを備えている。
【0009】
このように、本発明の1つの観点に係るプログラム作成支援方法においては、まず、プログラムの静的構造である、当該プログラムを構成する要素部品と、その要素部品相互の静的な連結構造とが生成される。つまり、上記プログラム作成支援方法においては、リンク部品による連結で、データ部品が相互にいかに関連しているかという、相互の静的な連結構造が表現される。そして、上記プログラム作成支援方法においては、利用者の操作による各データ部品毎のコスト指定を受け付けて、その利用者指定の各データ部品に利用者指定のコストを設定することで、プログラム定義情報が生成される。ここで、各データ部品に付けられたコストは、そのデータ部品から、値を与えてもらう際の、一種の回避すべき度合いの重みであり、値を与えてもらう優先度でもある。したがって、データ部品毎のコストは、プログラムの要素部品相互の振る舞い、つまり、どのような順序で、どの要素部品にメッセージを送るかを決定するための情報であるといえる。このように、プログラムの構造が、当該プログラムの静的構造(当該プログラムを構成する要素部品及びその要素部品相互の静的な連結構造)と、プログラムの要素部品相互の振る舞いを定める各データ部品に付されたコストとの2つの階層に分離されるので、それぞれを作成、把握するのが容易になる。このプログラムの構造は、コストが付されたデータ部品群と、それらのデータ部品相互間を連結するリンク部品とで定義されているともいえる。
【0010】
以上により、生成されたプログラム定義情報は、プログラムの静的構造中の各要素部品を、どのような順序で、どの要素部品にメッセージを送るかが、メソッドとして定義されたプログラム定義情報であるといえる。よって、上記プログラム作成支援方法においては、プログラム定義情報で定義された各データ部品毎に、当該データ部品の各フィールドを満たす値を算出するのに用いるリンク部品を決定するのに、候補となるリンク部品の入力側に接続されたデータ部品をたどって、そのたどった先のデータ部品に設定されているコストをもとに、コストが小さいデータ部品に対応するリンク部品ほど優先して用いられるように決定してプログラムコードを生成することで、プログラム定義情報で定義されたプログラムの最適なプログラムコードを簡単に生成することができる。
【0011】
しかも、上記プログラム作成支援方法においては、ソフトウェア開発者が記述(定義)すべきプログラムは、データ部品とそのコスト、及び当該データ部品がリンク部品によっていかに連結されているか、つまり要素部品相互の静的な連結構造だけであり、各データ部品について、そのデータ部品の端子(フィールド)に与えられる値(データ)を完成するための最適手順を作成する必要がない。このため上記プログラム作成支援方法においては、参照可能なデータ部品を追加するなどの変更も、容易に、且つ正確に行うことができる。
【0012】
ここで、上記各要素部品には、その部品がデータ部品、またはリンク部品のいずれであるかにより、次のようなメソッドが予め定義されているとよい。まず、データ部品には、当該データ部品の全てのフィールドを埋めるための第1のメソッドであって、当該データ部品に出力端子が連結された全てのリンク部品に対して、当該リンク部品の全ての入力端子に値が与えられているならば、当該リンク部品の出力端子に値を伝えるための第2のメソッドを送信する第1のメソッドが定義されているとよい。次に、リンク部品には、当該リンク部品の入力端子の中に値が与えられていない入力端子が存在し、且つ当該入力端子にデータ部品が連結されているならば、当該データ部品に上記第1のメソッドを送信し、当該リンク部品の入力端子の中に値が与えられていない入力端子が存在し、且つ当該入力端子に他のリンク部品が連結されているならば、当該連結されているリンク部品に上記第2のメソッドと同じメソッドを送信する第2のメソッドが定義されているとよい。
【0013】
また、プログラムの静的構造中の要素部品群、及び当該要素部品相互の静的な連結構造を、プログラムを作成するのに用いられるプログラム作成画面のプログラム定義領域に表示して、当該定義領域に表示されている要素部品群のうちのいずれか1つのデータ部品が利用者の操作に応じて指定される毎に、当該利用者に対して当該指定されたデータ部品のコストの指定入力を要求する構成とするならば、利用者は各データ部品のコストの指定入力を効率的に行うことが可能となる。また、指定されたコストを、プログラム定義領域に表示されている対応するデータ部品の近傍に表示するならば、利用者にとってプログラム定義領域上の各データ部品に付されているコストを視認できるため、データ部品のコストの指定入力をより効率的に且つ意図した通りに行うことが可能となる。
【0014】
また、プログラム作成画面上に、ソフトウェア部品の一覧が表示される部品一覧領域を配置し、当該部品一覧領域から利用者指定の部品を選択して、プログラム定義領域上の利用者指定の位置に移動・配置可能な構成とすると共に、利用者の指定に応じて、プログラム定義領域に配置されている要素部品相互の端子間を連結可能な構成とするならば、利用者は、自身の意図した要素部品から構成されるプログラムの静的構造を効率的に作成することが可能となる。
【0015】
なお、以上のプログラム作成支援方法に係る本発明は、当該方法を実行してプログラムの作成を支援するためのプログラム作成支援装置に係る発明としても、当該方法を構成する各ステップを計算機に実行させるためのプログラム(プログラム作成支援プログラム)に係る発明としても成立する。
【0016】
【発明の実施の形態】
以下、本発明の実施の形態につき説明する。
本発明の実施形態の特徴は、オブジェクト間の連結部分(リンク)をも部品化するプログラミング技術(リンク指向プログラミング技術)によりソフトウェアの部品化が容易に実現できるようにした点にある。そこで、本実施形態の理解を容易にするために、本実施形態で適用される、連結部分を部品表現するプログラム記法の体系について説明する。
【0017】
(B1)従来のオブジェクト指向プログラミングにおけるオブジェクトに相当するものとして、「データ部品」が存在する。データ部品は、1個以上のフィールド(インスタンスフィールド)を持つ。全てのフィールドは外部に公開されており(隠蔽されておらず)、値の参照及び設定が可能である。
【0018】
(B2)データ部品の連結を実現する部品として、「リンク部品」が存在する。リンク部品には「関数型リンク部品」(以下、単に「関数」と称することもある)と「述語型リンク部品」(以下、単に「述語」と称することもある)との2種類がある。
【0019】
(B3)関数は、一般にn入力m出力の多値関数であり、入力側から出力側へ値をそのまま或いは変換して伝達する。特別な関数の例として、乱数発生関数のように、入力の無い関数とみなすことのできるものがある。
【0020】
(B4)述語は、1個以上の入力引数のみを持つ。但し、入力引数に基づく真偽判定の結果により、他のデータ部品、或いはリンク部品にメッセージを送ることができる。
【0021】
(B5)データ部品の各フィールド、並びに関数及び述語の各々の引数を、まとめて「端子」と呼ぶ。端子には、値を伝達することのできる方向がある。データ部品の端子は双方向の伝達が可能である。関数の端子は、入力端子は入力方向にのみ、出力端子は出力方向にのみ伝達が可能である。但し、後述する逆関数が定義されている場合には双方向に伝達可能である。述語の端子は、全て入力方向にのみ伝達可能である。
【0022】
(B6)データ部品のフィールドのアクセスは、データ部品名とフィールド名とを用いた次の形式
データ部品名.フィールド名
により可能である。
【0023】
(B7)関数による部品間連結の表現は、リンク部品の種別を示す関数名(クラス名)、リンク部品の名前であるリンク名(インスタンス名)、入力端子を示す入力名、及び出力端子を示す出力名とを用いた次の形式
による。
【0024】
(B8)述語による部品間連結の表現は、リンク部品の種別を示す述語名(クラス名)、リンク名(インスタンス名)、入力端子を示す入力名、及び述語の真偽判定の結果に基づく処理内容とを用いた次の形式
による。
【0025】
(B8)データ部品、関数、及び述語には、それぞれ次のメソッドが定義される。
【0026】
データ部品には、「fill()」と表現されるメソッド(fillメソッド)が定義される。fill()は、対応するデータ部品のフィールドに値を埋めるメソッドである。そのためfill()は、対応するデータ部品に自身の出力端子を連結された全てのリンク部品に対し、次に述べるflow()を送って値を取り寄せる機能を持つ。ここでは、データ部品に出力端子が連結可能なリンク部品は、関数(関数型リンク部品)に限られる。fill()はまた、フィールド値を完成できたなら、当該fill()を呼び出したメッセージ送信元にsuccess(成功)ステータスを通知し、何らかの理由により完成できなかったなら、failure(失敗)ステータスを通知する機能を有する。
【0027】
関数には、「flow()」と表現されるメソッド(flowメソッド)が定義される。flow()は、対応する関数の出力端子に値を伝えるメソッドである。即ちflow()は、対応する関数の全ての入力端子に値が与えられているならば、その関数の出力端子の値を算出し、その算出した値を当該出力端子に伝えるソッドである。そのためflow()は、値を与えられていない入力端子がある場合、その入力端子に連結されている部品がデータ部品であれば当該データ部品にfill()を、関数型のリンク部品(関数)であれば当該関数型リンク部品にflow()を、そして述語型のリンク部品(述語)であれば当該述語型リンク部品にtest()を送って、その入力端子を通して値を取得することで全ての入力値を満たし、出力端子に値を伝える機能を有する。flow()はまた、値の伝達処理が正常に行えたなら、当該flow()を呼び出したメッセージ送信元にsuccessステータスを通知し、何らかの理由により伝達できなかったなら、failureステータスを通知する機能を有する。
【0028】
また、関数の逆関数が定義されている場合に限り、その関数には、「flowBackward()」と表現されるメソッド(flowBackwardメソッド)が定義される。flowBackward()は、対応する関数の入力端子を出力端子に、出力端子を入力端子にして、定義された逆関数のflow()を実行するメソッドである。
【0029】
述語には、「test()」と表現されるメソッド(testメソッド)が定義される。test()は、対応する述語の全ての入力端子に値が与えられたとき、それらの値に基づいて真偽を判定し、その判定結果に基づいて定義された処理を行って、他のデータ部品またはリンク部品にメッセージを送るメソッドである。そのためtest()は、値を与えられていない入力端子がある場合、その入力端子に連結されている部品がデータ部品であれば当該データ部品にfill()を、関数型のリンク部品であれば当該関数型リンク部品にflow()を、そして述語型のリンク部品であれば当該述語型リンク部品にtest()を送って、その入力端子を通して値を取得することで全ての入力値を満たし、真偽を判定する機能を有する。test()はまた、処理が正常に行えたなら、当該test()を呼び出したメッセージ送信元にsuccessステータスを通知し、何らかの理由により失敗したなら、failureステータスを通知する機能を有する。
【0030】
(B9)少なくとも2つのリンク部品を組み合わせて、新しい部品、つまり関数(合成関数)を作成できる。1つの部品を構成する各部品を要素部品と呼ぶ。また、要素部品がリンク部品の場合、その要素部品を要素リンク部品と呼ぶ。要素リンク部品の端子間を接続する場合、入力方向のみの端子同士、あるいは出力方向のみの端子同士を連結することはできない。要素部品間で連結されなかった端子は、新しく作成された部品の端子となる。また、新しい部品(リンク部品)の作成に、リンク部品だけでなくデータ部品を用いることができるのは勿論である。
【0031】
(B10)プログラムの実行は、当該プログラムを構成するデータ部品とリンク部品に対してメッセージを送ることで行われる。
【0032】
このような、連結部分を部品表現するプログラム記法の体系を適用した本実施形態について、図面を参照して説明する。
図1は本発明の一実施形態に係る、ソフトウェア部品を用いたプログラム作成を支援するプログラム作成支援装置の構成を示すブロック図である。
【0033】
図1に示すプログラム作成支援装置は、パーソナルコンピュータ等のデータ処理装置(計算機)により実現される。つまり、プログラム作成支援装置は、主として、外部記憶装置1と、主記憶装置2と、表示装置3と、入力装置4と、CPU5と、システムバス6とから構成されるデータ処理装置である。
【0034】
外部記憶装置1は、ハードディスクドライブ(HDD)等の大容量記憶装置である。外部記憶装置1には、ソフトウェア部品の定義情報(ソフトウェア部品定義情報)11と、ソフトウェア部品を表す図像としてのアイコン(部品アイコン)のイメージデータ(アイコンデータ)12と、作成されたプログラム定義情報13とプログラムコード14とが格納されている。
【0035】
ソフトウェア部品定義情報11は、予め用意されているソフトウェア部品及び新たに作成されたソフトウェア部品を定義した情報である。ソフトウェア部品定義情報11は、データ部品の定義情報(データ部品定義情報)111と、リンク部品の定義情報(リンク定義情報)112とを含む。リンク定義情報112は、関数(関数型リンク部品)の定義情報(関数定義情報)112aと、述語(述語型リンク部品)の定義情報(述語定義情報)112bとを含む。
【0036】
データ部品定義情報111は、予め用意されている各データ部品のフィールド情報を含む。
関数定義情報112aは、予め用意されている各関数及び新たに作成された各関数について、各入出力端子の名前と入出力の方向、継承部品名、アイコンデータ名、及び逆関数定義の有無の情報を含む。
述語定義情報112bは、予め用意されている各述語及び新たに作成された各述語について、各端子の名前を含む。
【0037】
主記憶装置2には、プログラムの作成を支援するプログラム(プログラム作成支援プログラム)としてのプログラムエディタ21が、例えば入力装置4を用いた利用者(ソフトウェア開発者、プログラム作成者)の操作に応じて、外部記憶装置1からロードされる。プログラムエディタ21は、CPU5を、利用者による要素部品の選択を支援する部品選択部211、要素部品を表示装置3に表示する部品表示部212、及び利用者により指定された端子間の連結を実行して、その連結情報を入力する連結入力部213の各機能手段として機能させるためのプログラム要素を含む。プログラムエディタ21はまた、CPU5を、利用者により指定された端子間の連結の状態を表示装置3に表示する連結表示部214、プログラムを構成する要素部品群のうちの利用者指定のデータ部品に、利用者指定のコスト(算出コスト)を設定するコスト設定部215、及びプログラムコード生成部216の各機能手段として機能させるためのプログラム要素も含む。プログラムコード生成部216は、作成中のプログラムのコードを生成する。
【0038】
主記憶装置2にはまた、プログラムエディタ21を用いて現在作成されているプログラムの定義情報(プログラム定義情報)22が格納される。プログラム定義情報22は、要素部品情報221と、要素連結情報222とを含む。要素部品情報221は、作成中のプログラムを構成するソフトウェア部品の各要素部品の情報であり、各要素部品について、当該部品の名前である要素名(要素部品名、インスタンス名)、及び当該部品の種別を表す要素部品種別名(クラス名)を含む。また、要素部品情報221は、要素部品がデータ部品である場合には、上記要素名、及び要素部品種別名に加えて、コストを含む。要素連結情報222は、上記各要素部品の端子間の連結を定義する情報であり、各連結について、連結元の要素名及び端子名の対、並びに連結先の要素名及び端子名の対を含む。
【0039】
表示装置3は、CRTディスプレイ、或いは液晶ディスプレイ等であり、プログラムエディタ21を用いたプログラム作成のためのGUI(Graphical User Interface)画面(プログラム作成GUI画面)の表示等に用いられる。入力装置4はキーボード、マウス等であり、利用者による上記GUI画面の操作を含むプログラムエディタ21の操作等に用いられる。
【0040】
CPU5は、利用者の操作に従ってプログラムエディタ21を実行することにより、利用者の要求するプログラムの作成を支援する。
【0041】
次に、図1の構成におけるプログラム作成支援処理について、図2乃至図4のフローチャートを参照して説明する。
本実施形態におけるプログラム作成支援処理は、プログラム定義情報22を作成するプログラム定義情報作成処理と、当該プログラム定義情報22からプログラムコードを生成するプログラムコード作成処理とに大別される。プログラム定義情報作成処理は、プログラムエディタ21中の例えば部品選択部211、連結入力部213及びコスト設定部215を用いて実行される。プログラムコード作成処理は、プログラムコード生成部216を用いて実行される。
【0042】
まず、プログラム定義情報作成処理について説明する。
今、利用者(プログラム作成者)が入力装置4を操作して、プログラムエディタ21を起動したものとする。するとCPU5は、プログラムエディタ21に従って、図5に示すようなプログラム作成GUI画面を表示装置3に表示する。以降の説明では、煩雑さを避けるため、プログラムエディタ21自身が処理を実行するものとして扱う。
【0043】
図5に示すプログラム作成GUI画面は、既定義のデータ部品510の一覧が表示されるデータ部品一覧領域51と、既定義のリンク部品520の一覧が表示されるリンク部品一覧領域52と、プログラムを作成・定義する領域を提供するプログラム定義領域53とを含んでいる。
【0044】
データ部品一覧領域51へのデータ部品一覧の表示は、外部記憶装置1に格納されているソフトウェア部品定義情報11中のデータ部品定義情報111に基づいて行われる。リンク部品一覧領域52へのリンク部品一覧の表示は、上記ソフトウェア部品定義情報11中のリンク定義情報112に基づいて行われる。
【0045】
ここでは、一覧領域51,52上の各部品510,520は、外部記憶装置1に格納されているアイコンデータ12に基づいて、当該部品510,520を表すアイコン511,521で表示される。各部品510,520のアイコン511,521の近傍には、その部品の種別を表す要素部品種別名512,522が表示される。また、部品520、つまりリンク部品520については、その近傍に、端子間の値の伝達方向を示す矢印523がリンク定義情報112に基づいて表示される。また、一覧領域51,52上の各部品510,520は縮小表示され、後述するようにプログラム定義領域53上に移動された際に一定の倍率に拡大して表示される。一覧領域51,52内では、一般に部品一覧の全てを表示できないため、その領域内でスクロール可能なようになっている。
【0046】
一覧領域51及び52は、既定義のソフトウェア部品の一覧の表示領域を提供する。ここで、既定義のソフトウェア部品は一般にはシステムに予め用意されているソフトウェア部品であるが、リンク部品については、プログラムエディタ21を利用して利用者が新たに定義したソフトウェア部品も含まれる。
【0047】
プログラム定義情報22は、利用者が図5のプログラム作成GUI画面上で、以下に述べるような要素部品選択操作、連結入力操作、及びコスト設定操作を実行することにより作成される。
【0048】
まず利用者は、入力装置4の例えばマウスを用いて、目的のプログラムを構成するソフトウェア部品の作成・定義に必要な要素部品、つまり目的プログラムの作成・定義に必要な要素部品を、データ部品一覧領域51またはリンク部品一覧領域52上の部品一覧から選択する操作を行う。次に利用者は、選択した要素部品、つまりデータ部品またはリンク部品を、プログラム定義領域53上の所望の位置に移動させるために、マウスを用いてドラッグ&ドロップ操作を行う。
【0049】
プログラムエディタ21中の部品選択部211は、利用者がマウスを用いて、データ部品一覧領域51またはリンク部品一覧領域52上の部品一覧から要素部品を選択する操作を行ったことを検出すると(ステップS1)、その選択された要素部品を、利用者の選択操作に続くドラッグ操作に応じて(ステップS2)、部品表示部212によりプログラム作成GUI画面に表示させながら、プログラム定義領域53上に移動する(ステップS3)。
【0050】
ここでは、選択された要素部品は、部品の種別がアイコンと種別名で、端子間の値の伝達方向が矢印で、それぞれ表される。
表示するアイコンは、以下の手順で決定される。
(a1)選択された部品にアイコンが設定されていれば、それを用いる。
(a2)アイコンの設定がなく、継承する部品の設定があれば、上位の部品のアイコン設定を再帰的に探して、これを用いる。
(a3)継承情報によってもアイコンの情報が得られなければ、予め定められた暗黙のアイコンを用いる。
【0051】
一方、表示する矢印の向きは、以下の手順で決定される。
(b1)データ部品の端子は、双方向とする。
(b2)逆関数を設定された関数の端子は、双方向とする。
(b3)それ以外の関数では、入力端子は入力方向とし、出力端子は出力方向とする。
(b4)述語の端子は、入力方向とする。
【0052】
図6及び図7に、プログラム定義領域53上での要素部品の表示例を示す。図6はデータ部品、図7は関数(関数型リンク部品)の、それぞれ表示例を示している。
【0053】
さて、部品選択部211は、部品一覧から選択された要素部品を利用者のドラッグ操作に応じてプログラム定義領域53上に移動している状態で、利用者のドロップ操作を検出すると(ステップS4)、当該要素部品の移動処理を停止し、当該要素部品の名前(要素名)の入力を利用者に対して要求する画面を部品表示部212により表示させる(ステップS5)。ここで、利用者が入力装置4を用いて要素名を入力する操作を行うと、部品選択部211はその要素名を入力装置4から受け取って、対応する要素部品のカテゴリを表す要素カテゴリ名及び種別を表す要素部品種別名と組にして、主記憶装置2に格納されているプログラム定義情報22中の要素部品情報221に追加し(ステップS6)、利用者の次の要素部品選択操作を待つ。
【0054】
利用者は、プログラム定義領域53内に配置した要素部品の端子、及びプログラム定義領域53で定義されるプログラムを構成するソフトウェア部品の端子のうちの任意の2つの端子間を連結したい場合、入力装置4のマウスを操作して、マウスポインタを一方の端子に合わせた状態で、他方の端子にドラッグする操作を行う。
【0055】
プログラムエディタ21中の連結入力部213は、利用者が端子間を連結するためのドラッグ操作を行ったことを検出すると(ステップS7)、ドラッグ開始位置の端子から現在のドラッグ位置までを連結表示部214により線分で表示させる。そして連結入力部213は、ドラッグ位置が他の端子に到達すると、両端子間を連結表示部214により図5中の矢印A11〜A13などのように、矢印で表示させて連結し、その連結情報をプログラム定義情報22中の要素連結情報222に追加する(ステップS8)。上記ステップS8では、連結入力部213は、指定された2つの端子間の連結が可能な値伝達の方向を判別し、その判別結果に応じて、当該端子間が連結されていることと値伝達の方向とを連結表示部214により上記した矢印で表示させる。但し、利用者が指定した2つの端子が同一要素部品のものである場合は、連結入力部213は利用者に対してエラー通知し、連結を拒否する。
【0056】
ここでは、
(c1)連結される2つの端子が共に要素部品の端子であるとき、
・その2つの端子が共に双方向の端子であるならば、連結も双方向の伝達が可能となる。
・その2つの端子のうち、少なくも一方が単方向であり、他方も同方向への伝達が可能であるならば、連結はその方向への単方向伝達のみが可能となる。
・それ以外の場合、連結入力部213は利用者に対してエラー通知し、連結を拒否する。
【0057】
次に、
(c2)連結される2つの端子の一方が作成中の部品の端子であるとき、
・その端子の伝達方向は、もう一方の端子である要素部品の端子の伝達方向と同じになる。なお、作成中の部品の1つの端子を、複数の要素部品の端子と連結することは可能であるが、追加される要素部品の端子の伝達方向は、既接続の連結と逆向きであってはならない。その場合には、エラーを通知し、連結を拒否する。
(c3)連結される端子の双方が作成中の部品の端子であるとき
・エラーを通知し、連結を拒否する。
【0058】
このように本実施形態においては、利用者の操作で指定された2つの端子間の値の伝達方向をプログラムエディタ21中の連結入力部213にて自動判別して、当該端子間を連結(接続)する矢印の方向を決定しているため、利用者は値の伝達方向を指定しなくてもよく、したがって簡単な作成作業で正確な部品の作成が可能になる。但し、例えばマウスの右ボタンクリックにより、利用者自身が連結の方向を指定(制限)可能とする画面を表示させることも可能である。
【0059】
さて、利用者の要素部品選択操作に従って、部品選択部211が利用者の目的とするプログラムを構成する要素部品を選択して、その要素部品の情報である要素名(要素部品名)及び部品種別名を入力し、利用者の連結入力操作に従って、連結入力部213が指定の端子間の連結を実行して、その連結情報を入力することにより、当該プログラムの静的構造、即ち当該プログラムの構成要素である要素部品と、要素部品相互の静的な連結構造とが決定される。プログラムの静的構造とは、要素部品相互の静的な連結構造は定義されているものの、要素部品相互の振る舞いについては定義されていないデータ構造をいう。この段階では、プログラム定義情報22は未完成の状態にあり、当該プログラム定義情報22の要素部品情報221中に各データ部品毎のコストが設定されていない状態にある。このデータ部品毎のコストは、対応するデータ部品の全フィールド値を求めるのに要するコストであり、プログラムの要素部品相互の振る舞い、つまり、どのような順序で、どの要素部品にメッセージを送るかを決定するための情報である。
【0060】
本実施形態において、要素部品相互の振る舞いは、以下に述べるように、利用者のコスト設定操作に従い、コスト設定部215により要素部品情報221中に利用者指定のデータ部品の要素名に対応付けて利用者指定のコストを設定することにより決定される。
【0061】
利用者は、プログラムの静的構造を決定すると、当該プログラムの要素部品相互の振る舞いを決定するために、当該プログラムを構成する要素部品群のうちの各データ部品にコストを設定するための操作を次のように行う。即ち利用者は、コスト設定の対象とするデータ部品を位置指定(選択)するために、当該マウスの操作によりマウスポインタをプログラム定義領域53上の所望の要素部品(データ部品)に移動させ、その位置でマウスの例えば右ボタンをクリックする。
【0062】
プログラムエディタ21中のコスト設定部215は、利用者がマウスポインタをプログラム定義領域53上の任意の要素部品(データ部品)に移動させて、その位置でマウスの右ボタンをクリックする操作を行ったことを検出すると(ステップS9)、その位置に対応する要素部品(データ部品)の属性の1つとして、利用者に対してコストを入力することを要求する画面(コスト入力画面)を、その位置の近傍に表示する(ステップS10)。すると利用者は、自身が位置指定したデータ部品の全フィールド値を求めるのに要するコストを、入力装置4を用いてコスト入力画面上で入力するための操作を行う。
【0063】
コスト設定部215は、利用者が入力装置4を用いてコストを入力する操作を行ったことを検出すると(ステップS11)、そのコストを入力装置4から受け取り、主記憶装置2に格納されているプログラム定義情報22の要素部品情報221中に、対応する要素部品(データ部品)の種別名と組になるように設定する(ステップS12)。同時にコスト設定部215は、設定したコスト(を示す数値)を、対応する要素部品(データ部品)の近傍に表示する(ステップS13)。そしてコスト設定部215は、利用者による次のコスト設定指定操作(右ボタンクリック操作)を待つ。図5には、後述するデータ部品531A,531B,531Cの近傍に、それぞれ値が1(A=1),2(B=2),10(C=10)のコスト530A,530B,530Cが表示されている様子が示されている。
【0064】
利用者は、プログラム定義領域53上の要素部品のうちの目的とする全ての要素部品(データ部品)についてコスト入力操作を終了すると、つまりプログラム定義情報作成処理を終了すると、その時点において主記憶装置2に格納されているプログラム定義情報22に基づくプログラムコードの作成のための操作を行う。ここでは、利用者は、図5に示すソフトウェア部品作成GUI画面に用意されているメニューバー上のファイルメニューA21を開く操作を行う。このファイルメニューA21には、メニュー項目としてファイルの上書き、ファイルの新規保存、及びファイルのオープンに加えて、プログラムコードの作成を指示するための最適コード生成が用意されている。利用者は、この最適コード生成をマウスで選択する。
【0065】
プログラムエディタ21中のプログラムコード生成部216は、利用者がファイルメニューA21から最適コード生成を選択する操作を行ったことを検出すると(ステップS14)、プログラムコード生成処理(ステップS15)を、図4のフローチャートに従って次のように実行する。
【0066】
まずプログラムコード生成部216は、主記憶装置2に格納されているプログラム定義情報22から、コストが設定されているデータ部品を1つ、コード生成の対象データ部品として検索する。プログラムコード生成部216は、データ部品が検索できたならば、プログラム定義情報22中の要素連結情報222で示されている当該部品の端子(フィールド)の中から、未処理の端子を1つ選択して、その選択した端子をFとする(ステップS31)。
【0067】
プログラムコード生成部216は、データ部品の端子Fを選択すると、その端子Fに入力を与えるリンク部品のうち、未処理のリンク部品の1つを選択して、その選択したリンク部品をLとする(ステップS32)。そしてプログラムコード生成部216は、リンク部品Lの見込みのコストCを、当該リンク部品Lの入力端子に接続されたデータ部品の中で最大のコストが設定されているもののコストとする(ステップS33)。ここで、リンク部品Lの入力端子に接続された要素部品がリンク部品である場合がある。この場合、更にそのリンク部品の入力側に接続された要素部品を、データ部品になるまでたどり、そのたどりついた先のデータ部品を、リンク部品Lの入力端子に接続されたデータ部品とする。つまり、リンク部品Lの入力端子に接続されたデータ部品とは、当該入力端子に直接または間接に接続されるデータ部品のうち、当該入力端子に至るパス(要素部品数)が最短(最小)のデータ部品である。
【0068】
次にプログラムコード生成部216は、キーと値とのペアを要素とするテーブルLL(図示せず)に、Lをキー、Cを値とする要素を登録する(ステップS34)。ここで、テーブルLLは主記憶装置2上に置かれる。
【0069】
次にプログラムコード生成部216は、プログラム定義情報22を参照して、他に、対象データ部品の端子Fに入力を与える未処理のリンク部品があるか否かを調べる(ステップS35)。もし、未処理のリンク部品があるならば、プログラムコード生成部216は未処理のリンク部品の1つについて、ステップS32以降の処理を実行する。
【0070】
これに対し、対象データ部品の端子Fに入力を与える未処理のリンク部品がなくなったならば、プログラムコード生成部216は、テーブルLLに登録されている要素中で、最もコストの小さいリンク部品Lについて、次コード
"if(Lflow()=failure"
を生成する(ステップS36)。このコードにより、リンク部品Lに対し、その出力端子から値を出力できるなら、値を出力してもらい、出力できない失敗(failure)時には、次のリンク部品に切り替える機能が実現される。
【0071】
次にプログラムコード生成部216は、テーブルLLを参照して、他の未処理の要素が当該テーブルLLに登録されているか否かを調べる(ステップS37)。もし、未処理の要素が登録されているならば、直前にコードが生成されたリンク部品の次にコストの小さいリンク部品Lについて、次コード
"&& Lflow()=failure"
を生成する(ステップS38)。このコードにより、リンク部品Lに対し、その出力端子から値を出力できるなら、値を出力してもらい、出力できない失敗(failure)時には、次のリンク部品に切り替える機能が実現される。プログラムコード生成部216は、ステップS38を実行すると、ステップS37に戻る。
【0072】
これに対し、テーブルLLに登録されている全ての要素について、コストの小さいリング部品の順にコード生成が行われた結果、未処理の要素がなくなったなら、プログラムコード生成部216はステップS39に進む。このステップS39では、プログラムコード生成部216は、次コード
")return failure,"
を生成する。このコードにより、対象データ部品の入力端子(フィールド)の値が完成しなかったとして、当該データ部品のメソッドfill()を呼び出したメッセージ送信元に対し、failureステータスを通知する機能が実現される。
【0073】
次にプログラムコード生成部216は、対象データ部品に他の未処理の端子があるか否かを調べる(ステップS40)。もし、未処理の端子があるならば、プログラムコード生成部216は未処理の端子の1つについて、ステップS31以降の処理を実行する。これに対し、対象データ部品の全ての端子についてステップS31以降の処理を実行した結果、未処理の端子がなくなったなら、プログラムコード生成部216は、次コード
")return failure,"
を生成して(ステップS41)、対象データ部品に関するコード生成処理を終了する。このコードにより、対象データ部品の入力端子(フィールド)の値が完成したとして、当該データ部品のメソッドfill()を呼び出したメッセージ送信元に対し、successステータスを通知する機能が実現される。
【0074】
プログラムコード生成部216は、以上に述べた図4のフローチャートに従う処理を、プログラム定義情報22で定義されているプログラムを構成する要素部品群のうちの全てのデータ部品について実行する。
【0075】
このようにプログラムコード生成部216は、プログラム定義情報22で定義されているプログラムを構成する要素部品群のうちのデータ部品について、そのデータ部品の端子(フィールド)に与えられる値を算出するために、いずれのリンク部品を用いるべきかを、候補となるリンク部品の入力側に接続されたデータ部品をたどって、そのたどった先のデータ部品に設定されているコストをもとに、コストが小さいデータ部品に直接または間接に接続されたリンク部品(つまりコストが小さいデータ部品に対応するリンク部品)ほど優先して用いられるように決定してプログラムコードを生成する。生成されたコード(プログラムコード)は、外部記憶装置1に保存される。
【0076】
以上に述べた説明から明らかなように、本実施形態におけるリンクをも部品として扱うプログラミング(リンク指向プログラミング)では、従来のように単一の目的を持つ手順としてプログラムを記述するのではない。即ち本実施形態では、
(a)プログラムの静的構造、つまりプログラムを構成する要素部品と、その要素部品相互の静的な連結構造を決定する。
(b1)プログラムの構成要素となっている全てのデータ部品のメソッドfill()を定義する。
【0077】
(b2)プログラムの構成要素となっている全ての関数(関数型リンク部品)のメソッドflow()を定義する。
【0078】
(b3)プログラムの構成要素となっている全ての述語(述語型部品)のメソッドtest()を定義する。
【0079】
(c)プログラムの構成要素をどのように機能させるか、つまり、どのような順序で、どの構成要素にメッセージを送るかを、メソッドとして定義する。
【0080】
の3段階でプログラムを実現する。
【0081】
明らかなように、上記(c)は、プログラムの構成要素(要素部品)中の各データ部品にコストを設定するだけで実現される。したがって、本実施形態においてプログラム作成者が記述(定義)すべきプログラムは、データ部品とそのコスト、及び当該データ部品がリンク部品によっていかに連結されているか、つまり要素部品相互の静的な連結構造だけであり、各データ部品について、そのデータ部品の端子(フィールド)に与えられる値(データ)を完成するための最適手順を作成する必要がない。このため本実施形態においては、参照可能なデータ部品を追加するなどの変更も、容易に、且つ正確に行うことができる。
【0082】
なお本実施形態では、上述のように、データ部品一覧領域51及びリンク部品一覧領域52から所望の部品群を選択してプログラム定義領域53に配置し、目的のプログラムを構成する1つのソフトウェア部品を定義する場合、そのソフトウェア部品の端子も定義することができる。ここでは、入力装置4のマウスを操作して、マウスポインタをプログラム定義領域53の境界線上に移動させて端子位置を指定することで、端子の新設、端子の削除、及び端子の変更のいずれか1つを選択的に実行可能なようになっている。図5の例では、端子A41〜A47が定義されている。
【0083】
さて利用者は、プログラム定義情報22を作成し終えた場合、或いは作成途中で操作を終了したい場合、プログラム作成GUI画面上に用意されているメニューバー上のファイルメニューA21を開く操作を行う。そして利用者は、開かれたファイルメニューA21上で、作成終了した、或いは作成途中のプログラム定義情報22を、名前を付けて新規に外部記憶装置1に保存するための操作を行う。また利用者は、外部記憶装置1に既に保存されているプログラム定義情報を主記憶装置2上にプログラム定義情報22として呼び出して、要素部品プログラム定義領域53上で対応するプログラムの作成に関する編集を行っていた場合であれば、元のプログラム定義情報を更新するための、いわゆる上書き保存操作を行う。
【0084】
プログラムエディタ21中の図示せぬプログラム登録部は、図5に示すようなプログラム作成GUI画面が表示されている状態で、利用者がファイルメニューA21を開いて上書き保存を指定する操作を行ったことを検出すると(ステップS16)、その時点に主記憶装置2に格納されているプログラム定義情報22で、外部記憶装置1に保存されているプログラム定義情報13中の対応する情報を更新する上書き保存を行う(ステップS17)。また、プログラム登録部は、利用者がファイルメニューA21を開いて、新規保存を指定する操作を行ったことを検出すると(ステップS18)、対象となるプログラム定義情報の名前を利用者に指定させ、現在主記憶装置2に格納されているプログラム定義情報22を、利用者により指定されたプログラム定義情報名に対応付けて、外部記憶装置1内のプログラム定義情報13に新規に保存する(ステップS19)。
【0085】
また、プログラム登録部は、利用者がファイルメニューA21を開いて、オープンを指定すると共に、対象となるファイルとして、プログラム定義情報を示すプログラム定義情報名を指定すると(ステップS20)、その指定のプログラム定義情報を外部記憶装置1に保存されているプログラム定義情報13から取り出して、プログラム定義情報22として主記憶装置2に読み込む(ステップS21)。ここでは、プログラム定義情報22に基づいて、当該プログラム定義情報22中の要素部品情報221で示されるプログラムを構成する各要素部品が、プログラム作成GUI画面上のプログラム定義領域53に配置される。また、各要素部品間が、プログラム定義情報22中の要素連結情報222に従って、矢印で連結される。また、要素部品情報221中に要素名と組をなしてコストが設定されている要素部品(データ部品)については、当該コストが対応する要素部品(データ部品)の近傍に表示される。これにより利用者にとって、コストの新規設定、変更等が容易となる。
【0086】
さて、図5には、住宅購入に伴う税控除処理のための控除額算出プログラムを定義し終えた状態の画面表示例が示されている。この控除額算出プログラムは、購入価格が設定されるフィールドを持つ3つの「購入金額」データ部品531A,531B,531Cと、データ部品531A〜531Cのいずれかから与えられる購入金額と、外部から与えられる購入年度、借入残高、及び控除金額の上限値とを受け、予め定められた計算を行って控除額を算出する「控除額計算」リンク部品(関数型リンク部品)532とを用いて構成されている。ここで、データ部品531A,531B,531Cの入力端子(フィールド)に与えられる購入金額は、それぞれ、(A)税金を扱う窓口システムのデータベースに過去に記録されたもの、(B)他部門のシステムのデータベースに過去に記録されたもの、(C)税控除を要求する納税者により入力されるものとする。この場合、プログラム作成者は、望ましさから、(A)が最適、(B)は多少時間がかかるが、納税者を煩わす(C)よりは適切、等の判断により、「控除額計算」リンク部品532の入力端子(Price)に「購入金額」を与える選択肢となるデータ部品531A,531B,531Cに、それぞれA=1,B=2,C=10のようにコストを付与する。このコストは、「控除額計算」リンク部品532がデータ部品531A,531B,531Cのいずれかから、値(購入金額)を与えてもらう際の、一種の回避すべき度合いの重みであり、値(購入金額)を与えてもらう優先度であるともいえる。
【0087】
上記実施形態では、プログラムエディタ21にプログラムコード生成部216を持たせ、プログラム定義情報をもとに最適な実行手順をプログラムコードとして生成している。しかし、最適な実行手順を、プログラム定義情報で定義されるプログラムの実行時に、例えばインタプリタにより決定することも可能である。
【0088】
なお、本発明は、上記実施形態に限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で種々に変形することが可能である。更に、上記実施形態には種々の段階の発明が含まれており、開示される複数の構成要件における適宜な組み合わせにより種々の発明が抽出され得る。例えば、実施形態に示される全構成要件から幾つかの構成要件が削除されても、発明が解決しようとする課題の欄で述べた課題が解決でき、発明の効果の欄で述べられている効果が得られる場合には、この構成要件が削除された構成が発明として抽出され得る。
【0089】
【発明の効果】
以上詳述したように本発明によれば、ソフトウェア部品の連結手段をリンク部品として表現するソフトウェア部品化技術を利用して、データ部品とリンク部品とに分類されるソフトウェア部品の群をプログラム構成の要素部品の群とし、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成し、しかる後に当該プログラムの静的構造中の要素部品群のうちの利用者指定の各データ部品に、利用者指定のコストを設定することで、プログラムの構造を2つの階層に分離するようにしたので、それぞれを作成、把握するのが容易となり、ソフトウェア開発者がプログラムを容易に作成できるように支援することができる。
【0090】
しかも本発明によれば、プログラム定義情報で定義された各データ部品毎に、当該データ部品の各フィールドを満たす値を算出するのに用いるリンク部品を決定するのに、候補となるリンク部品の入力側に接続されたデータ部品をたどって、そのたどった先のデータ部品に設定されているコストをもとに、コストが小さいデータ部品に対応するリンク部品ほど優先して用いられるように決定してプログラムコードを生成するようにしているので、ソフトウェア開発者は、各データ部品の各フィールドを満たすための最適手順を作成する必要がない。
【図面の簡単な説明】
【図1】本発明の一実施形態に係る、プログラム作成支援装置の構成を示すブロック図。
【図2】同実施形態におけるプログラム作成支援処理を説明するためのフローチャートの一部を示す図。
【図3】同実施形態におけるプログラム作成支援処理を説明するためのフローチャートの残りを示す図。
【図4】図3中のステップS15のプログラムコード生成処理の詳細な手順を示すフローチャート。
【図5】同実施形態で適用されるプログラム作成GUI画面の構成例と当該画面を用いて定義されたプログラムの構成例とを示す図。
【図6】図5中のプログラム定義領域53上でのデータ部品の表示例を示す図。
【図7】図5中のプログラム定義領域53上での関数型リンク部品の表示例を示す図。
【符号の説明】
1…外部記憶装置
2…主記憶装置
3…表示装置
4…入力装置
5…CPU
11…ソフトウェア部品定義情報
12…アイコンデータ
13…プログラム定義情報
14…プログラムコード
21…プログラムエディタ(プログラム作成支援プログラム)
22…プログラム定義情報
51…データ部品一覧領域
52…リンク部品一覧領域
53…プログラム定義領域
211…部品選択部
212…部品表示部
213…連結入力部
214…連結表示部
215…コスト設定部
216…プログラムコード生成部
221…要素部品情報
222…要素連結情報[0001]
BACKGROUND OF THE INVENTION
The present invention relates to software development technology using software componentization technology that expresses software component linking means as a component, and in particular, assists a software developer to create a program using this kind of software component. The present invention relates to a program creation support method, a program creation support program, and a program creation support apparatus.
[0002]
[Prior art]
Software (software program) componentization is an important technique for improving software productivity and quality. Object-oriented programming has long been expected to be effective in promoting this software componentization. The reason for this is that in object-oriented programming, the mechanism of inheritance leads to software reuse, and the high degree of independence of modules and the similarity to real-world “things” helps to understand their specifications. is there.
[0003]
[Problems to be solved by the invention]
However, in spite of the above expectations, in practice, a software componentization method has not been sufficiently established. The reasons why software componentization has not been sufficiently realized with object-oriented programming alone are listed below.
[0004]
(A1) In programming based on inheritance, it is necessary to complete from the most generalized parts with a high degree of abstraction. However, ascertaining the general form that is required becomes rapidly difficult as the software functions become larger. This is particularly noticeable when the software developer (program creator) does not have expertise in the target business. Also, user requirements for software change from moment to moment. For this reason, even if a part having sufficient generality can be created at a certain point in time, its availability becomes smaller as time passes.
[0005]
(A2) Although the processing subject and target are expressed as “things”, the processing subject acts on the processing target (generally a plurality of processing targets) to achieve the target function as in the conventional case. Procedural expressions are fundamental. As a result, it is not possible to intuitively grasp and predict the behavior of the entire system that combines components, unlike a physical device. Therefore, it is now necessary to create various charts for the purpose of supporting human thinking in software design and maintenance.
[0006]
In order to complement the unresolved parts in the object-oriented programming, a programming technique is conceivable in which not only objects that have been regarded as parts so far but also connected parts between objects are made into parts. In other words, instead of aiming to convert large objects into parts, a programming technique can be considered in which a material that combines objects is made into parts so that a series of object groups realizes a target function. This technology is expected to be particularly useful in developing software that processes passively strong data such as various forms and records as input and output, as is the case with many practical processes.
[0007]
The present invention has been made in consideration of the above circumstances, and the purpose of the present invention is to make it possible for a software developer to execute a program to be executed in an optimal procedure by using software componentization technology that expresses a connected part of software components as a component. It is an object of the present invention to provide a program creation support method, a program creation support program, and a program creation support apparatus that support easy creation.
[0008]
[Means for Solving the Problems]
According to one aspect of the present invention, there is provided a program creation support method executed by a computer for supporting creation of a program using a software componentization technique that expresses software component connection means as a link component. In this program creation support method, a group of software parts classified into a data part having a field in which data is set as a terminal and a link part having an argument as a terminal is defined as a group of element parts of a program configuration, and Generating a static structure of a program for which a static connection structure is determined, and setting a user-specified cost for each user-specified data part in the group of element parts in the static structure of the program To generate program definition information in which the behavior between element parts is defined, and for each data part in the group of element parts defined in the program definition information, it is given to each field of the data part. Data that is connected to the input side of the candidate link component to determine which link component should be used to calculate the value A step of generating a program code by tracing a product and determining that a link component corresponding to a data component with a lower cost is used preferentially based on the cost set for the data component followed by the product And.
[0009]
As described above, in the program creation support method according to one aspect of the present invention, first, there are a static structure of a program, an element part constituting the program, and a static connection structure between the element parts. Generated. That is, in the program creation support method described above, a mutual static connection structure that expresses how data parts are related to each other is expressed by connection using link parts. In the program creation support method, the program definition information is obtained by accepting the cost designation for each data part by the user's operation and setting the user designated cost for each data part designated by the user. Generated. Here, the cost attached to each data part is a kind of weight of a degree to be avoided when a value is given from the data part, and is also a priority for giving a value. Therefore, it can be said that the cost for each data part is information for determining the behavior between program element parts, that is, in what order and to which element part the message is sent. In this way, the program structure is divided into a static structure of the program (element parts constituting the program and a static connection structure between the element parts) and data parts that define the behavior of the program element parts. Since it is separated into two hierarchies with attached costs, it becomes easy to create and grasp each. It can be said that the structure of this program is defined by a group of data parts to which a cost is attached and a link part that connects these data parts.
[0010]
As described above, the generated program definition information is the program definition information that is defined as a method, which element component in the static structure of the program is sent to which element component. I can say that. Therefore, in the program creation support method, for each data part defined in the program definition information, a link that is a candidate for determining a link part that is used to calculate a value that satisfies each field of the data part. Follow the data component connected to the input side of the component, and use the link component corresponding to the data component with the lower cost based on the cost set in the data component that was traced. By determining and generating the program code, it is possible to easily generate the optimum program code of the program defined by the program definition information.
[0011]
Moreover, in the program creation support method described above, the program to be described (defined) by the software developer includes a data component and its cost, and how the data component is linked by a link component, that is, static between component components. It is only a simple connection structure, and it is not necessary to create an optimum procedure for completing a value (data) given to a terminal (field) of each data part. For this reason, in the program creation support method, changes such as addition of referenceable data parts can be easily and accurately performed.
[0012]
Here, it is preferable that the following methods be defined in advance for each of the element parts depending on whether the part is a data part or a link part. First, a data component is a first method for filling all fields of the data component, and for all link components whose output terminals are connected to the data component, If a value is given to the input terminal, a first method for transmitting a second method for transmitting the value to the output terminal of the link component may be defined. Next, in the link component, if there is an input terminal to which no value is given among the input terminals of the link component, and the data component is connected to the input terminal, the data component is connected to the data component. If there is an input terminal that is not given a value among the input terminals of the link component that transmits one method, and another link component is linked to the input terminal, the link component is linked. A second method for transmitting the same method as the second method to the link component may be defined.
[0013]
In addition, the element parts group in the static structure of the program and the static connection structure between the element parts are displayed in the program definition area of the program creation screen used for creating the program, and the definition area is displayed. Each time any one data component in the displayed element component group is specified in response to the user's operation, the user is requested to input the cost of the specified data component. With the configuration, the user can efficiently input and specify the cost of each data component. In addition, if the specified cost is displayed in the vicinity of the corresponding data part displayed in the program definition area, the cost attached to each data part on the program definition area can be visually recognized by the user. It becomes possible to input the cost of the data component more efficiently and as intended.
[0014]
Also, on the program creation screen, place a parts list area that displays a list of software parts, select a user-specified part from the parts list area, and move it to a user-specified position in the program definition area -If the configuration is configurable and the configuration allows the connection between the terminals of the component parts arranged in the program definition area according to the user's specification, the user can select the element he / she intended. It is possible to efficiently create a static structure of a program composed of parts.
[0015]
Note that the present invention relating to the above-described program creation support method causes the computer to execute each step constituting the method, even as an invention related to a program creation support device for executing the method and supporting program creation. The present invention is also established as an invention relating to a program (program creation support program).
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, embodiments of the present invention will be described.
A feature of the embodiment of the present invention is that software componentization can be easily realized by a programming technique (link-oriented programming technique) that also forms a connection part (link) between objects. Therefore, in order to facilitate understanding of the present embodiment, a system of program notation that is applied in the present embodiment and expresses a connected part as a part will be described.
[0017]
(B1) “Data parts” exist as objects corresponding to objects in conventional object-oriented programming. A data component has one or more fields (instance fields). All fields are open to the public (not hidden) and can be referenced and set.
[0018]
(B2) “Link component” exists as a component that realizes connection of data components. There are two types of link parts: “functional type link parts” (hereinafter also simply referred to as “functions”) and “predicate type link parts” (hereinafter also simply referred to as “predicates”).
[0019]
The (B3) function is generally a multi-value function with n inputs and m outputs, and transmits a value as it is or converted from the input side to the output side. As an example of a special function, there is a function that can be regarded as a function having no input, such as a random number generation function.
[0020]
(B4) The predicate has only one or more input arguments. However, a message can be sent to another data component or link component based on the result of the authenticity determination based on the input argument.
[0021]
(B5) Each field of the data part and each argument of the function and predicate are collectively referred to as a “terminal”. A terminal has a direction in which a value can be transmitted. The data component terminals are capable of bidirectional transmission. As for the terminal of the function, the input terminal can transmit only in the input direction, and the output terminal can transmit only in the output direction. However, when an inverse function described later is defined, it can be transmitted in both directions. All terminals of the predicate can be transmitted only in the input direction.
[0022]
(B6) Data component field access is in the following format using data component name and field name
Data part name.Field name
Is possible.
[0023]
(B7) Expression of inter-component connection by function indicates a function name (class name) indicating the type of link component, a link name (instance name) indicating the name of the link component, an input name indicating the input terminal, and an output terminal. The following format using output names:
by.
[0024]
(B8) Expression of inter-part connection by predicate is a process based on a predicate name (class name) indicating the type of link part, a link name (instance name), an input name indicating an input terminal, and a predicate true / false result The following form with content
by.
[0025]
(B8) The following methods are defined for data parts, functions, and predicates, respectively.
[0026]
In the data part, a method (fill method) expressed as “fill ()” is defined. fill () is a method that fills the corresponding data part field. For this reason, fill () has a function of obtaining values by sending the following flow () to all link parts having their output terminals connected to corresponding data parts. Here, the link component that can connect the output terminal to the data component is limited to the function (functional link component). fill () also notifies the message sender that called the fill () with the success status if the field value is completed, and notifies the failure status if it cannot be completed for some reason. It has the function to do.
[0027]
In the function, a method (flow method) expressed as “flow ()” is defined. flow () is a method that conveys a value to the output terminal of the corresponding function. That is, flow () is a sod that calculates the value of the output terminal of the function if all input terminals of the corresponding function are given values, and transmits the calculated value to the output terminal. Therefore, if there is an input terminal that is not given a value for flow (), if the part connected to the input terminal is a data part, fill () is used for that data part, and the function type link part (function) If so, send flow () to the function type link part, and if it is a predicate type link part (predicate), send test () to the predicate type link part, It has a function of satisfying the input value and transmitting the value to the output terminal. Also, flow () has a function to notify the success status to the message sender that called the flow () if the value transmission process was successful, and to notify the failure status if it could not be transmitted for some reason. Have.
[0028]
Further, only when an inverse function of a function is defined, a method (flowBackward method) expressed as “flowBackward ()” is defined for the function. flowBackward () is a method that executes the defined inverse function flow () with the input terminal of the corresponding function as the output terminal and the output terminal as the input terminal.
[0029]
In the predicate, a method (test method) expressed as “test ()” is defined. When values are given to all input terminals of the corresponding predicate, test () determines true / false based on those values, performs the defined processing based on the determination results, and other data This method sends a message to a part or link part. Therefore, if there is an input terminal that is not given a value, test () will use fill () for the data part if the part connected to that input terminal is a data part. Flow () is sent to the function type link part, and if it is a predicate type link part, test () is sent to the predicate type link part, and all input values are satisfied by acquiring values through the input terminals. It has a function of determining authenticity. The test () also has a function of notifying a success status to the message transmission source that called the test () if the process is normally performed, and notifying a failure status if it fails for some reason.
[0030]
(B9) A new part, that is, a function (composite function) can be created by combining at least two link parts. Each part constituting one part is called an element part. When the element part is a link part, the element part is called an element link part. When connecting the terminals of the element link parts, it is not possible to connect terminals only in the input direction or terminals only in the output direction. Terminals that are not connected between element parts become terminals of newly created parts. Of course, not only link parts but also data parts can be used to create new parts (link parts).
[0031]
(B10) The execution of the program is performed by sending a message to the data parts and the link parts constituting the program.
[0032]
This embodiment to which such a program notation system for representing parts of a connected part is applied will be described with reference to the drawings.
FIG. 1 is a block diagram showing a configuration of a program creation support apparatus that supports program creation using software components according to an embodiment of the present invention.
[0033]
The program creation support apparatus shown in FIG. 1 is realized by a data processing apparatus (computer) such as a personal computer. That is, the program creation support device is a data processing device mainly including the external storage device 1, the
[0034]
The external storage device 1 is a mass storage device such as a hard disk drive (HDD). The external storage device 1 includes software component definition information (software component definition information) 11, image data (icon data) 12 of an icon (component icon) as a graphic representing the software component, and created
[0035]
The software
[0036]
The data
The
The
[0037]
In the
[0038]
The
[0039]
The
[0040]
The
[0041]
Next, the program creation support process in the configuration of FIG. 1 will be described with reference to the flowcharts of FIGS.
The program creation support process in the present embodiment is roughly divided into a program definition information creation process for creating the
[0042]
First, the program definition information creation process will be described.
Now, it is assumed that the user (program creator) operates the
[0043]
The program creation GUI screen shown in FIG. 5 includes a data
[0044]
The display of the data component list in the data
[0045]
Here, the
[0046]
The
[0047]
The
[0048]
First, the user uses, for example, the mouse of the
[0049]
When the
[0050]
Here, the selected component part is represented by an icon and a name of the part type, and an arrow indicating the direction of transmission of values between the terminals.
The icon to be displayed is determined by the following procedure.
(A1) If an icon is set for the selected part, use it.
(A2) If there is no icon setting and there is a setting for a part to be inherited, the icon setting for the upper part is recursively searched and used.
(A3) If icon information is not obtained even by inheritance information, a predetermined implicit icon is used.
[0051]
On the other hand, the direction of the arrow to be displayed is determined by the following procedure.
(B1) Data component terminals are bidirectional.
(B2) The function terminal for which the inverse function is set is bidirectional.
(B3) In other functions, the input terminal is the input direction, and the output terminal is the output direction.
(B4) The predicate terminal is in the input direction.
[0052]
6 and 7 show display examples of element parts on the
[0053]
The
[0054]
When the user wants to connect between any two terminals of the terminal of the component part arranged in the
[0055]
When the
[0056]
here,
(C1) When the two terminals to be connected are both the terminal of the component part,
If the two terminals are both bidirectional terminals, the connection can also be transmitted bidirectionally.
If at least one of the two terminals is unidirectional and the other can transmit in the same direction, the connection can only be transmitted unidirectionally in that direction.
In other cases, the
[0057]
next,
(C2) When one of the two terminals to be connected is a terminal of a component being created,
-The transmission direction of the terminal is the same as the transmission direction of the terminal of the component part which is the other terminal. Although it is possible to connect one terminal of a component being created to terminals of a plurality of element parts, the transmission direction of the terminal of the added element part is opposite to that of the already connected connection. Must not. In that case, an error is notified and the connection is refused.
(C3) When both of the connected terminals are terminals of the component being created
・ Notify the error and refuse the connection.
[0058]
As described above, in this embodiment, the transmission direction of the value between the two terminals designated by the user's operation is automatically determined by the
[0059]
Now, in accordance with the user's element / part selection operation, the
[0060]
In the present embodiment, as described below, the behavior between the component parts is associated with the element name of the data component designated by the user in the
[0061]
When the user determines the static structure of the program, in order to determine the mutual behavior of the component parts of the program, the user performs an operation for setting the cost for each data part in the group of component parts constituting the program. Do as follows. That is, the user moves the mouse pointer to a desired element part (data part) on the
[0062]
The cost setting unit 215 in the
[0063]
When the cost setting unit 215 detects that the user has performed an operation to input a cost using the input device 4 (step S11), the cost setting unit 215 receives the cost from the
[0064]
When the user finishes the cost input operation for all target element parts (data parts) among the element parts on the
[0065]
When the program
[0066]
First, the program
[0067]
When the program
[0068]
Next, the program
[0069]
Next, the program
[0070]
On the other hand, if there is no unprocessed link component that gives an input to the terminal F of the target data component, the program
"if (Lflow () = failure"
Is generated (step S36). With this code, if a value can be output to the link component L from its output terminal, a value is output, and a function of switching to the next link component in the case of failure that cannot be output is realized.
[0071]
Next, the program
"&& Lflow () = failure"
Is generated (step S38). With this code, if a value can be output to the link component L from its output terminal, a value is output, and a function of switching to the next link component in the case of failure that cannot be output is realized. After executing Step S38, the program
[0072]
On the other hand, if the code generation is performed for all elements registered in the table LL in the order of the ring components with the lowest cost, if there are no unprocessed elements, the program
") return failure,"
Is generated. This code realizes a function of notifying a failure status to the message transmission source that called the method fill () of the data component, assuming that the value of the input terminal (field) of the target data component is not completed.
[0073]
Next, the program
") return failure,"
Is generated (step S41), and the code generation process for the target data component is terminated. This code realizes the function of notifying the success status to the message transmission source that called the method fill () of the data component, assuming that the value of the input terminal (field) of the target data component is completed.
[0074]
The program
[0075]
As described above, the program
[0076]
As is clear from the above description, in the programming (link-oriented programming) in which the link is also treated as a component in this embodiment, the program is not described as a procedure having a single purpose as in the prior art. That is, in this embodiment,
(A) A static structure of a program, that is, an element part constituting the program and a static connection structure between the element parts are determined.
(B1) Define a method fill () for all data parts that are components of the program.
[0077]
(B2) Define a method flow () for all functions (functional link parts) that are constituent elements of the program.
[0078]
(B3) Define a method test () for all predicates (predicate-type parts) that are components of the program.
[0079]
(C) Define how to make the program components function, that is, in what order and to which component the message is sent as a method.
[0080]
The program is realized in three stages.
[0081]
As can be seen, the above (c) is realized only by setting the cost for each data part in the constituent elements (element parts) of the program. Therefore, in this embodiment, the program to be described (defined) by the program creator is only a data part and its cost, and how the data part is connected by a link part, that is, a static connection structure between element parts. For each data part, it is not necessary to create an optimum procedure for completing a value (data) given to the terminal (field) of the data part. For this reason, in this embodiment, a change such as adding a referenceable data component can be easily and accurately performed.
[0082]
In the present embodiment, as described above, a desired component group is selected from the data
[0083]
When the user finishes creating the
[0084]
A program registration unit (not shown) in the
[0085]
Further, when the user opens the file menu A21 and designates opening and designates a program definition information name indicating program definition information as a target file (step S20), the program registration unit designates the designated program. The definition information is extracted from the
[0086]
Now, FIG. 5 shows a screen display example in a state where the deduction amount calculation program for tax deduction processing associated with home purchase has been defined. This deduction amount calculation program is given from the outside with three “purchase amount”
[0087]
In the above embodiment, the
[0088]
In addition, this invention is not limited to the said embodiment, In the implementation stage, it can change variously in the range which does not deviate from the summary. Further, the above embodiments include inventions at various stages, and various inventions can be extracted by appropriately combining a plurality of disclosed constituent elements. For example, even if some constituent requirements are deleted from all the constituent requirements shown in the embodiment, the problem described in the column of the problem to be solved by the invention can be solved, and the effect described in the column of the effect of the invention Can be obtained as an invention.
[0089]
【The invention's effect】
As described above in detail, according to the present invention, a software component grouping technique that represents a software component connecting means as a link component is used to program a group of software components classified into a data component and a link component. A static structure of a program in which a static connection structure between the element parts is determined is generated as a group of element parts, and then each of the user-specified each of the element parts group in the static structure of the program is generated. By setting user-specified costs for data parts, the program structure is separated into two layers, making it easier to create and understand each, and software developers can easily create programs. I can help you.
[0090]
Moreover, according to the present invention, for each data part defined in the program definition information, the input of candidate link parts can be used to determine the link part used to calculate the value satisfying each field of the data part. The data component connected to the side is traced, and based on the cost set in the traced data component, the link component corresponding to the data component with the lower cost is preferentially used. Since the program code is generated, the software developer does not need to create an optimal procedure for filling each field of each data part.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a program creation support apparatus according to an embodiment of the present invention.
FIG. 2 is an exemplary flowchart showing a part of a flowchart for explaining a program creation support process in the embodiment;
FIG. 3 is a view showing the rest of the flowchart for explaining the program creation support process in the embodiment;
4 is a flowchart showing a detailed procedure of program code generation processing in step S15 in FIG. 3;
FIG. 5 is a diagram showing a configuration example of a program creation GUI screen applied in the embodiment and a configuration example of a program defined using the screen.
6 is a diagram showing a display example of data parts on the
7 is a view showing a display example of a function type link component on the
[Explanation of symbols]
1 ... External storage device
2 ... Main memory
3. Display device
4 ... Input device
5 ... CPU
11 ... Software component definition information
12 ... Icon data
13 ... Program definition information
14 ... Program code
21 ... Program editor (Program creation support program)
22 ... Program definition information
51 ... Data parts list area
52 ... Link parts list area
53 ... Program definition area
211 ... Part selection unit
212 ... Component display section
213: Connection input unit
214 ... Connection display section
215 ... Cost setting section
216 ... Program code generation unit
221 ... Element parts information
222 ... Element connection information
Claims (9)
データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の群をプログラム構成の要素部品の群とし、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成するステップと、
前記プログラムの静的構造中の前記要素部品群のうちの利用者指定の各データ部品に利用者指定のコストを設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの各データ部品毎に、当該データ部品の端子と接続され、当該データ部品の当該端子に入力を与える全てのリンク部品について、当該入力部品の入力端子側に接続された要素部品の全てのパスをデータ部品になるまでたどり、そのたどりついた先のデータ部品に設定されているコストの中で最大のコストを、当該入力部品の見込みコストとして設定するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの前記各データ部品毎に、当該データ部品の端子に入力を与える全てのリンク部品の見込みコストに基づき、当該見込みコストが小さいリンク部品ほど優先的に当該リンク部品から当該データ部品の端子に入力が与えられるようにプログラムコードを生成するステップと
を具備することを特徴とするプログラム作成支援方法。A program creation support method executed by a computer for supporting creation of a program using software componentization technology that expresses software component connection means as a link component,
A group of software parts classified as a data part having a field in which data is set as a terminal and a link part having an argument as a terminal is defined as a group of element parts of the program configuration, and the static connection structure between the element parts is Generating a static structure of the determined program;
A step of generating program definition information in which behavior between element parts is defined by setting a user-specified cost for each user-specified data part in the group of element parts in the static structure of the program When,
For each data part in the group of element parts defined by the program definition information, for all link parts connected to the terminal of the data part and giving input to the terminal of the data part, the input part Trace all the paths of the element parts connected to the input terminal side until it becomes a data part, and set the maximum cost among the costs set for the data part that arrives as the expected cost of the input part And steps to
For each data part defined in the program definition information, for each data part , based on the expected cost of all link parts that give input to the terminal of the data part, the link part with the lower expected cost has priority. And generating a program code so that an input is given to the terminal of the data component from the link component .
前記プログラム定義領域に表示されている前記要素部品群のうちのいずれか1つのデータ部品が利用者の操作に応じて指定される毎に、当該利用者に対して当該指定されたデータ部品のコストの指定入力を要求するステップと、
を更に具備し、前記プログラム定義情報を生成するステップでは、前記コストの指定入力要求に応じて利用者によりコストが指定される毎に、当該利用者指定のコストを、前記プログラムの静的構造中の利用者指定のデータ部品に設定することを特徴とする請求項1記載のプログラム作成支援方法。Displaying the element parts group in the static structure of the program and the static connection structure between the element parts in a program definition area of a program creation screen used to create a program;
Each time any one data component in the element component group displayed in the program definition area is specified according to a user operation, the cost of the specified data component to the user Requesting specified input of
In the step of generating the program definition information, each time a cost is specified by a user in response to the cost specification input request, the user-specified cost is stored in the static structure of the program. The program creation support method according to claim 1, wherein the program is set to a user-specified data part.
データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の一覧が表示される部品一覧領域、及びプログラムを作成するのに用いられるプログラム定義領域を含むプログラム作成画面を表示するステップと、
利用者の操作に応じて前記部品一覧から選択された部品を、作成すべきプログラムを構成する要素部品として利用者の操作に応じて前記プログラム定義領域に移動・配置するステップと、
利用者の操作に応じて、前記プログラム定義領域に配置されている要素部品相互の端子間を連結し、前記プログラム定義領域に配置されている要素部品の群から構成され、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成するステップと、
前記プログラム定義領域に配置されている前記要素部品群のうちのいずれか1つのデータ部品が利用者の操作に応じて指定される毎に、当該利用者に対して当該指定されたデータ部品のコストの指定入力を要求するステップと、
前記コストの指定入力要求に応じて利用者によりコストが指定される毎に、当該利用者指定のコストを、前記プログラムの静的構造中の利用者指定のデータ部品に設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの各データ部品毎に、当該データ部品の端子と接続され、当該データ部品の当該端子に入力を与える全てのリンク部品について、当該入力部品の入力端子側に接続された要素部品の全てのパスをデータ部品になるまでたどり、そのたどりついた先のデータ部品に設定されているコストの中で最大のコストを、当該入力部品の見込みコストとして設定するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの前記各データ部品毎に、当該データ部品の端子に入力を与える全てのリンク部品の見込みコストに基づき、当該見込みコストが小さいリンク部品ほど優先的に当該リンク部品から当該データ部品の端子に入力が与えられるようにプログラムコードを生成するステップと
を具備することを特徴とするプログラム作成支援方法。A program creation support method executed by a computer for supporting creation of a program using software componentization technology that expresses software component connection means as a link component,
A parts list area that displays a list of software parts that are classified into data parts that have fields in which data is set as terminals and link parts that have arguments as terminals, and a program definition area that is used to create programs Displaying a program creation screen including:
Moving and arranging the part selected from the parts list according to the user's operation as an element part constituting the program to be created in the program definition area according to the user's operation;
According to a user's operation, the terminals of the component parts arranged in the program definition area are connected to each other, and are composed of a group of element parts arranged in the program definition area. Generating a static structure of the program for which a general connected structure is determined;
Each time any one data component in the element component group arranged in the program definition area is specified in accordance with a user operation, the cost of the specified data component to the user Requesting specified input of
Each time a cost is specified by a user in response to a request for specifying the cost, the user-specified cost is set in a user-specified data component in the static structure of the program, so that an element component Generating program definition information in which mutual behavior is defined;
For each data part in the group of element parts defined by the program definition information, for all link parts connected to the terminal of the data part and giving input to the terminal of the data part, the input part Trace all the paths of the element parts connected to the input terminal side until it becomes a data part, and set the maximum cost among the costs set for the data part that arrives as the expected cost of the input part And steps to
For each data part defined in the program definition information, for each data part , based on the expected cost of all link parts that give input to the terminal of the data part, the link part with the lower expected cost has priority. And generating a program code so that an input is given to the terminal of the data component from the link component .
前記リンク部品には、当該リンク部品の入力端子の中に値が与えられていない入力端子が存在し、且つ当該入力端子にデータ部品が連結されているならば、当該データ部品に前記第1のメソッドを送信し、当該リンク部品の入力端子の中に値が与えられていない入力端子が存在し、且つ当該入力端子に他のリンク部品が連結されているならば、当該連結されているリンク部品に前記第2のメソッドと同じメソッドを送信する前記第2のメソッドが予め定義されている
ことを特徴とする請求項1または請求項3記載のプログラム作成支援方法。The data component is a first method for filling all the fields of the data component, and for all link components having output terminals connected to the data component, all inputs of the link component If a value is given to the terminal, a first method for transmitting a second method for transmitting the value to the output terminal of the link component is predefined,
In the link component, if there is an input terminal to which no value is given among the input terminals of the link component, and a data component is connected to the input terminal, the data component is connected to the first data component. If there is an input terminal that is not given a value among the input terminals of the link component that is transmitted, and the other link component is connected to the input terminal, the connected link component The program creation support method according to claim 1, wherein the second method for transmitting the same method as the second method is defined in advance.
計算機に、
データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の群をプログラム構成の要素部品の群とし、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成するステップと、
前記プログラムの静的構造中の前記要素部品群のうちの利用者指定の各データ部品に利用者指定のコストを設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの各データ部品毎に、当該データ部品の端子と接続され、当該データ部品の当該端子に入力を与える全てのリンク部品について、当該入力部品の入力端子側に接続された要素部品の全てのパスをデータ部品になるまでたどり、そのたどりついた先のデータ部品に設定されているコストの中で最大のコストを、当該入力部品の見込みコストとして設定するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの前記各データ部品毎に、当該データ部品の端子に入力を与える全てのリンク部品の見込みコストに基づき、当該見込みコストが小さいリンク部品ほど優先的に当該リンク部品から当該データ部品の端子に入力が与えられるようにプログラムコードを生成するステップと
を実行させるためのプログラム作成支援プログラム。A program creation support program that supports creation of a program using software componentization technology that expresses software component connection means as a link component,
In the calculator,
A group of software parts classified as a data part having a field in which data is set as a terminal and a link part having an argument as a terminal is defined as a group of element parts of the program configuration, and the static connection structure between the element parts is Generating a static structure of the determined program;
A step of generating program definition information in which behavior between element parts is defined by setting a user-specified cost for each user-specified data part in the group of element parts in the static structure of the program When,
For each data part in the group of element parts defined by the program definition information, for all link parts connected to the terminal of the data part and giving input to the terminal of the data part, the input part Trace all the paths of the element parts connected to the input terminal side until it becomes a data part, and set the maximum cost among the costs set for the data part that arrives as the expected cost of the input part And steps to
For each data part defined in the program definition information, for each data part , based on the expected cost of all link parts that give input to the terminal of the data part, the link part with the lower expected cost has priority. Generating a program code so that an input is given from the link component to the terminal of the data component .
計算機に、
データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の一覧が表示される部品一覧領域、及びプログラムを作成するのに用いられるプログラム定義領域を含むプログラム作成画面を表示するステップと、
利用者の操作に応じて前記部品一覧から選択された部品を、作成すべきプログラムを構成する要素部品として利用者の操作に応じて前記プログラム定義領域に移動・配置するステップと、
利用者の操作に応じて、前記プログラム定義領域に配置されている要素部品相互の端子間を連結し、前記プログラム定義領域に配置されている要素部品の群から構成され、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成するステップと、
前記プログラム定義領域に配置されている前記要素部品群のうちのいずれか1つのデータ部品が利用者の操作に応じて指定される毎に、当該利用者に対して当該指定されたデータ部品のコストの指定入力を要求するステップと、
前記コストの指定入力要求に応じて利用者によりコストが指定される毎に、当該利用者指定のコストを、前記プログラムの静的構造中の利用者指定のデータ部品に設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成するステップと、
前記プログラム定義情報で定義された前記要素部品群のうちの各データ部品毎に、当該データ部品の各フィールドに与えられる値を算出するために、いずれのリンク部品を用いるべきかを、候補となるリンク部品の入力側に接続されたデータ部品をたどって、そのたどった先のデータ部品に設定されているコストをもとに、コストが小さいデータ部品に対応するリンク部品ほど優先して用いられるように決定してプログラムコードを生成するステップと
を実行させるためのプログラム作成支援プログラム。A program creation support program that supports creation of a program using software componentization technology that expresses software component connection means as a link component,
In the calculator,
A parts list area that displays a list of software parts that are classified into data parts that have fields in which data is set as terminals and link parts that have arguments as terminals, and a program definition area that is used to create programs Displaying a program creation screen including:
Moving and arranging the part selected from the parts list according to the user's operation as an element part constituting the program to be created in the program definition area according to the user's operation;
According to a user's operation, the terminals of the component parts arranged in the program definition area are connected to each other, and are composed of a group of element parts arranged in the program definition area. Generating a static structure of the program for which a general connected structure is determined;
Each time any one data component in the element component group arranged in the program definition area is specified in accordance with a user operation, the cost of the specified data component to the user Requesting specified input of
Each time a cost is specified by a user in response to a request for specifying the cost, the user-specified cost is set in a user-specified data component in the static structure of the program, so that an element component Generating program definition information in which mutual behavior is defined;
For each data part in the element part group defined by the program definition information, which link part should be used to calculate a value given to each field of the data part is a candidate. Follow the data parts connected to the input side of the link part, and based on the cost set in the data part that followed, the link part corresponding to the data part with the lower cost will be used preferentially A program creation support program for executing the steps of determining and generating program code.
データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の群をプログラム構成の要素部品の群とし、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成する手段と、
前記プログラムの静的構造中の各データ部品と当該データ部品のコストを指定する手段と、
前記指定手段による指定毎に、指定されたコストを、前記プログラムの静的構造中の指定されたデータ部品に設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成する手段と、
前記プログラム定義情報に基づくプログラムコードの生成を指示する手段と、
前記プログラム定義情報で定義された前記要素部品群のうちの各データ部品毎に、当該データ部品の端子と接続され、当該データ部品の当該端子に入力を与える全てのリンク部品について、当該入力部品の入力端子側に接続された要素部品の全てのパスをデータ部品になるまでたどり、そのたどりついた先のデータ部品に設定されているコストの中で最大のコストを、当該入力部品の見込みコストとして設定する手段と、
前記指示手段の指示に応じて、前記プログラム定義情報で定義された前記要素部品群のうちの前記各データ部品毎に、当該データ部品の端子に入力を与える全てのリンク部品の見込みコストに基づき、当該見込みコストが小さいリンク部品ほど優先的に当該リンク部品から当該データ部品の端子に入力が与えられるようにプログラムコードを生成する手段と
を具備することを特徴とするプログラム作成支援装置。A program creation support apparatus for supporting creation of a program using software componentization technology that expresses software component connection means as a link component,
A group of software parts classified as a data part having a field in which data is set as a terminal and a link part having an argument as a terminal is defined as a group of element parts of the program configuration, and the static connection structure between the element parts is Means for generating a static structure of the determined program;
Means for designating each data part in the static structure of the program and the cost of the data part;
Means for generating program definition information in which behavior between element parts is defined by setting a designated cost to a designated data part in the static structure of the program for each designation by the designation means; ,
Means for instructing generation of a program code based on the program definition information;
For each data part in the group of element parts defined by the program definition information, for all link parts connected to the terminal of the data part and giving input to the terminal of the data part, the input part Trace all the paths of the element parts connected to the input terminal side until it becomes a data part, and set the maximum cost among the costs set for the data part that arrives as the expected cost of the input part Means to
In response to an instruction from the instruction means, for each data part of the group of element parts defined in the program definition information, based on the expected cost of all link parts that give input to the terminal of the data part, Means for generating a program code so that a link component with a lower estimated cost is given priority to the terminal of the data component from the link component .
データが設定されるフィールドを端子として持つデータ部品と引数を端子として持つリンク部品とに分類されるソフトウェア部品の一覧が表示される部品一覧領域、及びプログラムを作成するのに用いられるプログラム定義領域を含むプログラム作成画面を表示する手段と、
前記部品一覧から任意の部品を選択するための手段と、
前記部品一覧から選択された部品を、作成すべきプログラムを構成する要素部品として利用者の操作に応じて前記プログラム定義領域に移動・配置するための手段と、
前記プログラム定義領域に配置されている要素部品相互の任意の端子間の連結を指定する手段と、
前記指定された端子間を連結することで、前記プログラム定義領域に配置されている要素部品の群から構成され、当該要素部品相互の静的な連結構造が決定されたプログラムの静的構造を生成する手段と、
前記プログラム定義領域に配置されている前記要素部品群のうちの任意のデータ部品と当該データ部品のコストとを指定する手段と、
前記指定手段による指定毎に、指定されたコストを、前記プログラムの静的構造中の指定されたデータ部品に設定することで、要素部品相互の振る舞いが定義されたプログラム定義情報を生成する手段と、
前記プログラム定義情報に基づくプログラムコードの生成を指示する手段と、
前記プログラム定義情報で定義された前記要素部品群のうちの各データ部品毎に、当該データ部品の端子と接続され、当該データ部品の当該端子に入力を与える全てのリンク部品について、当該入力部品の入力端子側に接続された要素部品の全てのパスをデータ部品になるまでたどり、そのたどりついた先のデータ部品に設定されているコストの中で最大のコストを、当該入力部品の見込みコストとして設定する手段と、
前記指示手段の指示に応じて、前記プログラム定義情報で定義された前記要素部品群のうちの前記各データ部品毎に、当該データ部品の端子に入力を与える全てのリンク部品の見込みコストに基づき、当該見込みコストが小さいリンク部品ほど優先的に当該リンク部品から当該データ部品の端子に入力が与えられるようにプログラムコードを生成する手段と
を具備することを特徴とするプログラム作成支援装置。A program creation support apparatus for supporting creation of a program using software componentization technology that expresses software component connection means as a link component,
A parts list area that displays a list of software parts that are classified into data parts that have fields in which data is set as terminals and link parts that have arguments as terminals, and a program definition area that is used to create programs Means for displaying a program creation screen including:
Means for selecting any part from the parts list;
Means for moving and arranging the parts selected from the parts list as element parts constituting a program to be created in the program definition area according to a user operation;
Means for designating connection between arbitrary terminals of the component parts arranged in the program definition area;
By connecting the designated terminals, a static structure of a program is formed which is composed of a group of element parts arranged in the program definition area and in which the static connection structure between the element parts is determined. Means to
Means for designating an arbitrary data part of the group of element parts arranged in the program definition area and the cost of the data part;
Means for generating program definition information in which behavior between element parts is defined by setting a designated cost to a designated data part in the static structure of the program for each designation by the designation means; ,
Means for instructing generation of a program code based on the program definition information;
For each data part in the group of element parts defined by the program definition information, for all link parts connected to the terminal of the data part and giving input to the terminal of the data part, the input part Trace all the paths of the element parts connected to the input terminal side until it becomes a data part, and set the maximum cost among the costs set for the data part that arrives as the expected cost of the input part Means to
In response to an instruction from the instruction means, for each data part of the group of element parts defined in the program definition information, based on the expected cost of all link parts that give input to the terminal of the data part, Means for generating a program code so that a link component with a lower estimated cost is given priority to the terminal of the data component from the link component .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002040262A JP3713466B2 (en) | 2002-02-18 | 2002-02-18 | Program creation support method, program creation support program, and program creation support apparatus |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2002040262A JP3713466B2 (en) | 2002-02-18 | 2002-02-18 | Program creation support method, program creation support program, and program creation support apparatus |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2003241966A JP2003241966A (en) | 2003-08-29 |
| JP3713466B2 true JP3713466B2 (en) | 2005-11-09 |
Family
ID=27781051
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2002040262A Expired - Fee Related JP3713466B2 (en) | 2002-02-18 | 2002-02-18 | Program creation support method, program creation support program, and program creation support apparatus |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3713466B2 (en) |
Families Citing this family (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP1565813B1 (en) * | 2002-11-06 | 2019-01-09 | Code Valley Corp Pty Ltd | Code generation |
| US8832178B2 (en) | 2002-11-06 | 2014-09-09 | Noel William Lovisa | Service implementation |
| US20090070121A1 (en) * | 2007-09-11 | 2009-03-12 | Jean-Baptiste Leonelli | System, Method And Graphical User Interface For Workflow Generation, Deployment And/Or Execution |
| US10997531B2 (en) * | 2007-09-11 | 2021-05-04 | Ciambella Ltd. | System, method and graphical user interface for workflow generation, deployment and/or execution |
| JP2013171322A (en) * | 2012-02-17 | 2013-09-02 | Toshiba Corp | Plant operation support device, plant operation support program and plant operation support method |
| JP6442864B2 (en) * | 2014-05-07 | 2018-12-26 | 富士通株式会社 | Software selection device, software selection method, and software selection program |
| JP5971575B2 (en) * | 2015-09-02 | 2016-08-17 | 株式会社東芝 | Plant operation support device, plant operation support program, and plant operation support method |
| JP6092333B2 (en) * | 2015-09-02 | 2017-03-08 | 株式会社東芝 | Plant operation support device, plant operation support program, and plant operation support method |
| US20200293823A1 (en) * | 2019-03-13 | 2020-09-17 | Hitachi, Ltd. | Method and system of auto build of image analytics program |
-
2002
- 2002-02-18 JP JP2002040262A patent/JP3713466B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2003241966A (en) | 2003-08-29 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| AU2018236912B2 (en) | Managing and automatically linking data objects | |
| Myers | User-interface tools: Introduction and survey | |
| US7089256B2 (en) | Universal data editor | |
| US10324828B2 (en) | Generating annotated screenshots based on automated tests | |
| US8312382B2 (en) | Developing and executing applications with configurable patterns | |
| US12273410B2 (en) | Mechanism for webpage composition | |
| US20060074967A1 (en) | Visual query modeling for configurable patterns | |
| JP2005531088A (en) | Method and apparatus for facilitating development of customer-specific business process models | |
| JP7644830B2 (en) | Visual software development system, method, apparatus, computer storage medium and computer program | |
| Lybecait et al. | A tutorial introduction to graphical modeling and metamodeling with CINCO | |
| Eggenschwiler et al. | ET++ SwapsManager: Using object technology in the financial engineering domain | |
| US20050257190A1 (en) | Developing and executing applications with configurable patterns | |
| JP3713466B2 (en) | Program creation support method, program creation support program, and program creation support apparatus | |
| JP2025523055A (en) | Interactive form editor with simultaneous automatic creation of schema files | |
| Mani et al. | Using user interface design to enhance service identification | |
| JP2003241965A (en) | Program creation support method, program creation support program, and program creation support device | |
| JP2000353083A (en) | Requirements specification description support apparatus and method, and recording medium | |
| Jöhnk | Structure-based editing for SCCharts | |
| JP2003223321A (en) | Software component creation method, software component creation program and software component creation device | |
| US12340237B2 (en) | Process execution guide based on process model | |
| TWI912683B (en) | Electronic device and document provision method thereof | |
| Goderis et al. | DEUCE: A Declarative Framework for Extricating User Interface Concerns. | |
| Artim et al. | User interface services in AD/Cycle | |
| Loth | Enhancing ProMoEE and DyVProMo with Additional Features to Foster Empirical Studies in the Context of Process Models Comprehension | |
| JP2004280315A (en) | Source code file management system, program, and storage medium storing this program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20050412 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20050613 |
|
| 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: 20050816 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050822 |
|
| LAPS | Cancellation because of no payment of annual fees |