JP6197667B2 - Source code creation device, source code creation program - Google Patents

Source code creation device, source code creation program Download PDF

Info

Publication number
JP6197667B2
JP6197667B2 JP2014013017A JP2014013017A JP6197667B2 JP 6197667 B2 JP6197667 B2 JP 6197667B2 JP 2014013017 A JP2014013017 A JP 2014013017A JP 2014013017 A JP2014013017 A JP 2014013017A JP 6197667 B2 JP6197667 B2 JP 6197667B2
Authority
JP
Japan
Prior art keywords
activity
source code
identifying
predetermined file
appending
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
Application number
JP2014013017A
Other languages
Japanese (ja)
Other versions
JP2015141489A (en
Inventor
光之 西澤
光之 西澤
有人 野原
有人 野原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2014013017A priority Critical patent/JP6197667B2/en
Publication of JP2015141489A publication Critical patent/JP2015141489A/en
Application granted granted Critical
Publication of JP6197667B2 publication Critical patent/JP6197667B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Description

本発明は、ソースコード作成装置、ソースコード作成プログラムに関する。   The present invention relates to a source code creation device and a source code creation program.

単一処理かそれ以外の処理(複合処理)かを判定する第1判定処理、終了したことを通知するための複合処理が存在するか否か判定する第3判定処理、複合処理と判定した場合に、フォークジョイン処理かサブ処理かを判定する第2判定処理、サブ処理と判定した場合に、最初に実行する処理を認識する第1認識処理、サブ処理と判定した場合に、いずれの処理が実行中であるかを認識する第2認識処理、実行中の処理の次に実行する処理が存在するか否かを判定する第4判定処理、サブ処理を実行した際に実行中の処理の次に実行する複数の処理が存在する場合に、いずれの処理を次に実行するかを判定する第5判定処理、フォークジョイン処理においてフォークする複数の処理を認識する第3認識処理、及びフォークした各処理の終了をジョインさせるためのジョイン処理をソースコードに追記するソースコード作成装が知られている(特許文献1)。   When it is determined as a first determination process for determining whether it is a single process or other process (composite process), a third determination process for determining whether there is a composite process for notifying completion, or a composite process In addition, when it is determined as the second determination process or sub process for determining whether the process is a fork join process or a sub process, any process is performed when it is determined as the first recognition process or sub process for recognizing the process to be executed first Second recognition process for recognizing whether it is being executed, fourth determination process for determining whether there is a process to be executed next to the process being executed, and subsequent to the process being executed when the sub-process is executed A plurality of processes to be executed, a fifth determination process for determining which process to execute next, a third recognition process for recognizing a plurality of processes forked in the fork join process, and each forked End of processing Source code generation instrumentation which adds the join process to Yoin the source code has been known (Patent Document 1).

特開2010−198457号公報JP 2010-198457 A

先行技術では、アクティビティ図のフォークとジョインを実現するために、フォークにより分岐した処理を、ジョインにより終了を待ち合わせるという手段(同期処理)を用いた。これにより、1つのフォークでフォークされた処理は、1つのジョインでジョインしなければならない制約があった。
本発明は、この制約をなくしたソースコード作成装置及びソースコード作成プログラムを提供することを目的とする。
In the prior art, in order to realize the fork and join in the activity diagram, a process (synchronization process) is used in which the process branched by the fork is waited for completion by the join. As a result, there is a restriction that a process forked with one fork must be joined with one join.
It is an object of the present invention to provide a source code creation device and a source code creation program that eliminate this restriction.

前記課題を解決するために、請求項1に記載のソースコード作成装置は、
待ち合わせ/分岐処理、選択処理、実行処理、及び終了処理を含んで構成されるアクティビティ図内の任意のエレメントを取得する取得手段と、
前記取得手段により取得された前記エレメントが待ち合わせ/分岐処理、選択処理、実行処理、終了処理のいずれであるかを判定(R1)する第1の判定手段と、
前記第1の判定手段により判定された結果に対応するソースコードを予め定められたファイルに追記する第1の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせ完了後に分岐するエレメントを識別(R2)するためのフォークセレクタに対応するソースコードを予め定められたファイルに追記する第2の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせするエレメントを識別(R3)するためのジョインセレクタに対応するソースコードを予め定められたファイルに追記する第3の追記手段と、
前記第1の判定手段により選択処理と判定された前記エレメントが、条件により分岐するエレメントを識別(R4)するためのデシジョンセレクタに対応するソースコードを予め定められたファイルに追記する第4の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、単一アクティビティかサブアクティビティかを判定(R5)する第2の判定手段と、
前記第2の判定手段によりサブアクティビティと判定された場合、前記エレメントが、最初に実施するアクティビティを識別(R7)するためのソースコードを予め定められたファイルに追記する第6の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、前記エレメントが、次に実施するエレメントを識別(R6)するためのソースコードを予め定められたファイルに追記する第5の追記手段と、
前記第1の判定手段により終了と判定された場合、前記エレメントが終了を通知するサブアクティビティを識別(R8)し、前記識別されたサブアクティビティがある場合は通知先のサブアクティビティを識別するソースコードを追記し、ない場合は追記しない第8の追記手段と、を有する、
ことを特徴とする。
In order to solve the above problem, a source code creation device according to claim 1 is provided.
An acquisition means for acquiring an arbitrary element in an activity diagram including a wait / branch process, a selection process, an execution process, and an end process;
First determination means for determining (R1) whether the element acquired by the acquisition means is a wait / branch process, a selection process, an execution process, or an end process;
First appending means for appending a source code corresponding to the result determined by the first determining means to a predetermined file;
When the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a fork selector for identifying (R2) an element that branches after completion of the wait to a predetermined file. A second appending means,
If the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a join selector for identifying (R3) the element to be waited to be added to a predetermined file. With additional writing means,
A fourth additional write in which a source code corresponding to a decision selector for identifying (R4) an element that is determined to be selected by the first determination means is added to a predetermined file. Means,
A second determination unit that determines (R5) whether the activity is a single activity or a sub-activity when the first determination unit determines that the activity is an activity;
When the second determination means determines that the activity is a sub-activity, the element additionally adds a source code for identifying an activity to be performed first (R7) to a predetermined file;
A fifth appending means for appending a source code for identifying (R6) an element to be executed next to a predetermined file when the element is determined to be an activity by the first determining means;
A source code for identifying a sub-activity for which the element notifies the end (R8) when the first determining means determines that the end is detected; and for identifying the sub-activity as a notification destination when there is the identified sub-activity And, if not, an eighth appending means that does not append.
It is characterized by that.

前記課題を解決するために、請求項2に記載のソースコード作成プログラムは、
コンピュータを、
待ち合わせ/分岐処理、選択処理、実行処理、及び終了処理を含んで構成されるアクティビティ図内の任意のエレメントを取得する取得手段と、
前記取得手段により取得された前記エレメントが待ち合わせ/分岐処理、選択処理、実行処理、終了処理のいずれであるかを判定(R1)する第1の判定手段と、
前記第1の判定手段により判定された結果に対応するソースコードを予め定められたファイルに追記する第1の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせ完了後に分岐するエレメントを識別(R2)するためのフォークセレクタに対応するソースコードを予め定められたファイルに追記する第2の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせするエレメントを識別(R3)するためのジョインセレクタに対応するソースコードを予め定められたファイルに追記する第3の追記手段と、
前記第1の判定手段により選択処理と判定された前記エレメントが、条件により分岐するエレメントを識別(R4)するためのデシジョンセレクタに対応するソースコードを予め定められたファイルに追記する第4の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、単一アクティビティかサブアクティビティかを判定(R5)する第2の判定手段と、
前記第2の判定手段によりサブアクティビティと判定された場合、前記エレメントが、最初に実施するアクティビティを識別(R7)するためのソースコードを予め定められたファイルに追記する第6の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、前記エレメントが、次に実施するエレメントを識別(R6)するためのソースコードを予め定められたファイルに追記する第5の追記手段と、
前記第1の判定手段により終了と判定された場合、前記エレメントが終了を通知するサブアクティビティを識別(R8)し、前記識別されたサブアクティビティがある場合は通知先のサブアクティビティを識別するソースコードを追記し、ない場合は追記しない第8の追記手段として機能させる、
ことを特徴とする。
In order to solve the above problem, a source code creating program according to claim 2 is provided:
Computer
An acquisition means for acquiring an arbitrary element in an activity diagram including a wait / branch process, a selection process, an execution process, and an end process;
First determination means for determining (R1) whether the element acquired by the acquisition means is a wait / branch process, a selection process, an execution process, or an end process;
First appending means for appending a source code corresponding to the result determined by the first determining means to a predetermined file;
When the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a fork selector for identifying (R2) an element that branches after completion of the wait to a predetermined file. A second appending means,
If the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a join selector for identifying (R3) the element to be waited to be added to a predetermined file. With additional writing means,
A fourth additional write in which a source code corresponding to a decision selector for identifying (R4) an element that is determined to be selected by the first determination means is added to a predetermined file. Means,
A second determination unit that determines (R5) whether the activity is a single activity or a sub-activity when the first determination unit determines that the activity is an activity;
When the second determination means determines that the activity is a sub-activity, the element additionally adds a source code for identifying an activity to be performed first (R7) to a predetermined file;
A fifth appending means for appending a source code for identifying (R6) an element to be executed next to a predetermined file when the element is determined to be an activity by the first determining means;
A source code for identifying a sub-activity for which the element notifies the end (R8) when the first determining means determines that the end is detected; and for identifying the sub-activity as a notification destination when there is the identified sub-activity Is added, and if not, it is made to function as an eighth additional writing means not to add,
It is characterized by that.

請求項1に記載の発明によれば、待ち合わせ/分岐処理、選択処理、及び実行処理を含むエレメントで構成されるアクティビティ図を示すアクティビティ情報、及び前記エレメントに対応するソースコードからアクティビティ図が示す処理を行なうためのソースコードを制約なく作成するソースコード作成装置を提供することができる。
請求項2に記載の発明によれば、待ち合わせ/分岐処理、選択処理、及び実行処理を含むエレメントで構成されるアクティビティ図を示すアクティビティ情報、及び前記エレメントに対応するソースコードからアクティビティ図が示す処理を行なうためのソースコードを制約なく作成するソースコード作成プログラムを提供することができる。
According to the first aspect of the present invention, activity information indicating an activity diagram composed of elements including a waiting / branch process, a selection process, and an execution process, and a process indicated by the activity diagram from the source code corresponding to the element It is possible to provide a source code creation device that creates source code for performing the above without any restrictions.
According to the second aspect of the present invention, activity information indicating an activity diagram including elements including a wait / branch process, a selection process, and an execution process, and a process indicated by the activity diagram from the source code corresponding to the element It is possible to provide a source code creation program for creating a source code for performing the above without restriction.

ソースコード作成装置1の機能構成の一例を示すブロック図である。2 is a block diagram illustrating an example of a functional configuration of a source code creation device 1. FIG. (a)は待ち合わせ/分岐処理の一例、(b)は選択処理の一例を示す図である。(A) is an example of a waiting / branching process, (b) is a figure which shows an example of a selection process. 実施形態に係るモデルを示すクラス図である。It is a class diagram which shows the model which concerns on embodiment. ソースコード作成装置1によるソースコード作成の流れを示すフローチャートである。4 is a flowchart showing a flow of source code creation by the source code creation device 1. アクティビティ図で記述された動作からソースコードを作成できない処理のアクティビティ図の一例を示す図である。It is a figure which shows an example of the activity diagram of the process which cannot produce a source code from the operation | movement described by the activity diagram. 先行技術のモデルを示すクラス図である。It is a class diagram which shows a model of a prior art.

次に図面を参照しながら、以下に実施形態及び具体例を挙げ、本発明を更に詳細に説明するが、本発明はこれらの実施形態及び具体例に限定されるものではない。
また、以下の図面を使用した説明において、図面は模式的なものであり、理解の容易のために説明に必要な要素以外の図示は適宜省略されている。
Next, the present invention will be described in more detail with reference to the drawings with reference to embodiments and specific examples. However, the present invention is not limited to these embodiments and specific examples.
Moreover, in the description using the following drawings, the drawings are schematic, and illustrations other than elements necessary for the description are appropriately omitted for easy understanding.

(1)ソースコード作成装置の全体構成
図1は本実施形態に係るソースコード作成装置1の機能構成の一例を示すブロック図である。
ソースコード作成装置1は、CPU(Central Processing Unit)10、ROM(Read Only Memory)11、RAM(Random Access Memory)12、HDD(Hard Disk Drive)13、ネットワークI/F部20、操作情報部30、バス40を含んで構成されている。
(1) Overall Configuration of Source Code Creation Device FIG. 1 is a block diagram showing an example of a functional configuration of a source code creation device 1 according to this embodiment.
The source code creation device 1 includes a CPU (Central Processing Unit) 10, a ROM (Read Only Memory) 11, a RAM (Random Access Memory) 12, a HDD (Hard Disk Drive) 13, a network I / F unit 20, and an operation information unit 30. The bus 40 is included.

CPU10は、ソースコード作成装置1の全体の動作を司るものであり、後述するソースコード作成装置1の処理を示すフローチャートは、CPU10により実行される。
ROM11は、ソースコード作成装置1の起動時に動作するブートプログラムなどが記憶されている不揮発性の記憶装置である。
RAM12は、OS(Operating System)、プログラム、各種データが展開される揮発性の記憶装置である。
HDD13は、各データベース、ソース作成プログラムなどのプログラム、OSなどが記録される不揮発性の記憶装置である。
The CPU 10 governs the overall operation of the source code creation device 1, and a flowchart showing processing of the source code creation device 1 described later is executed by the CPU 10.
The ROM 11 is a non-volatile storage device that stores a boot program that operates when the source code creation device 1 is activated.
The RAM 12 is a volatile storage device in which an OS (Operating System), programs, and various data are expanded.
The HDD 13 is a non-volatile storage device that stores each database, a program such as a source creation program, an OS, and the like.

ネットワークI/F部20は、ネットワークに接続するためのものであり、NIC(Network Interface Card)及びドライバで構成される。操作情報部30は、液晶表示パネル、各種操作ボタン、タッチパネル等を組み合わせて構成され、使用者(オペレータ)がソースコード作成装置1の操作や情報を入力する際に用いられる。また、ソースコード作成装置1に関する情報を使用者(オペレータ)に表示する。バス40は、情報のやりとりが行われる際に使用される。   The network I / F unit 20 is for connecting to a network and includes a NIC (Network Interface Card) and a driver. The operation information unit 30 is configured by combining a liquid crystal display panel, various operation buttons, a touch panel, and the like, and is used when a user (operator) inputs operations and information of the source code creation device 1. Further, information regarding the source code creation device 1 is displayed to the user (operator). The bus 40 is used when information is exchanged.

(2)アクティビティ図による動作の記述
図2(a)は待ち合わせ/分岐処理の一例、(b)は選択処理の一例を示す図、図7は、先行技術では、アクティビティ図で記述された動作からソースコードを作成できない処理のアクティビティ図の一例を示す図である。
以下、図面を参照しながらアクティビティ図による動作の記述とソースコード作成について説明する。
(2) Description of operation by activity diagram FIG. 2 (a) is an example of waiting / branching processing, (b) is a diagram showing an example of selection processing, and FIG. It is a figure which shows an example of the activity diagram of the process which cannot produce a source code.
In the following, description of operations and creation of source codes by activity diagrams will be described with reference to the drawings.

(2.1)アクティビティ図
システムの記述には、統一モデリング言語(UML:Unified Modeling Language)を使用することができ、UMLはシステムを記述するための一連の方法を提供する。このような方法の1つが、アクティビティ図の使用である。
アクティビティ図は、アクティビティ(処理)の観点やアクティビティ間の制御フローの観点からシステムを記述する。
(2.1) Activity Diagram A Unified Modeling Language (UML) can be used to describe the system, and UML provides a series of methods for describing the system. One such method is the use of activity diagrams.
The activity diagram describes the system from the viewpoint of activities (processing) and the control flow between activities.

図2(a)は、待ち合わせ/分岐(ジョイン/フォーク)ノードと呼ばれるアクティビティ図の要素を示している。この例では、ジョイン/フォークノード110は、ステップS101のActivity11、ステップS104のActivity14、ステップS102のActivity12、及びステップS103のActivity13の間の関係を記述している。
すなわち、フォークノード110は、Activity11とActivity14の完了を待ち合わせた後にActivity12及びActivity13が同時に開始される分岐処理を示している。
FIG. 2A shows an element of an activity diagram called a wait / branch (join / fork) node. In this example, the join / fork node 110 describes the relationship among the Activity 11 in Step S101, the Activity 14 in Step S104, the Activity 12 in Step S102, and the Activity 13 in Step S103.
In other words, the fork node 110 indicates a branch process in which Activity 12 and Activity 13 are started simultaneously after waiting for completion of Activity 11 and Activity 14.

図2(b)は、判断(デシジョン)ノードと呼ばれるアクティビティ図の要素を示している。ここで、デシジョンノード130は、ステップS131のActivity31、ステップS132のActivity32、及びステップS133のActivity33の間の関係を記述している。
すなわち、デシジョンノード130は、Activity31の完了時にActivity32及び32のいずれか1つのみが開始されることを示している。Activity32及びActivity33のいずれが開始されるかは、デシジョンノード130に関連付けられたロジック条件によって判断される。例えば、システムの特定のパラメータが何らかの所定値を上回るか又は下回るかである。
FIG. 2B shows an element of an activity diagram called a decision (decision) node. Here, the decision node 130 describes the relationship among the activity 31 in step S131, the activity 32 in step S132, and the activity 33 in step S133.
That is, the decision node 130 indicates that only one of the activities 32 and 32 is started when the activity 31 is completed. Which of the Activity 32 and the Activity 33 is started is determined by a logic condition associated with the decision node 130. For example, whether certain parameters of the system are above or below some predetermined value.

UMLアクティビティ図では、分岐(フォーク)されたアクティビティ要素と、待ち合わせ(ジョイン)を無関係に記述できるにも拘わらず、先行技術では一つの並列実行(フォーク/ジョイン)から分岐(フォーク)されたアクティビティ要素は、他の一つの並列実行(フォーク/ジョイン)により合流(ジョイン)される場合に制約があった。
そのために、図5に示すアクティビティ図で記述された動作から、ソースコードを作成できない部分があった。
In the UML activity diagram, although the forked activity element and the waiting (join) can be described independently, in the prior art, the activity element branched (forked) from one parallel execution (fork / join) However, there is a restriction in the case of joining (join) by another parallel execution (fork / join).
For this reason, there is a part where source code cannot be created from the operations described in the activity diagram shown in FIG.

具体的には、図5のアクティビティ図において、フォークノード210からフォークされたActivityAとActivityBは、同一のフォーク/ジョインノード220にジョインしなければならず、ActivityBはフォーク/ジョインノード250にジョインされることができなかった。
同様に、フォーク/ジョインノード220からフォークされたActivityC、ActivityD、ActivityEは、同一のフォーク/ジョインノード240にジョインしなければならず、ActivityEはフォーク/ジョインノード230にジョインされることができなかった。
Specifically, in the activity diagram of FIG. 5, Activity A and Activity B forked from fork node 210 must join to the same fork / join node 220, and Activity B is joined to fork / join node 250. I couldn't.
Similarly, Activity C, Activity D, and Activity E forked from fork / join node 220 must join to the same fork / join node 240, and Activity E could not be joined to fork / join node 230. .

(2.2)クラス図
図3は本実施形態に係るモデルを示すクラス図、図4は本実施形態に係るソースコード作成の流れを示すフローチャート、図6は先行技術のモデルを示すクラス図である。
本実施形態に係るデザインパターンを説明する前に、図6を参照しながら比較例として、先行技術に記載されたソースコード作成装置について説明する。
(2.2) Class Diagram FIG. 3 is a class diagram showing a model according to the present embodiment, FIG. 4 is a flowchart showing a source code creation flow according to the present embodiment, and FIG. 6 is a class diagram showing a prior art model. is there.
Before describing the design pattern according to the present embodiment, a source code creating apparatus described in the prior art will be described as a comparative example with reference to FIG.

図6に示すR9は、Activityオブジェクト50には、単一Activityオブジェクト52とそれ以外である複合Activityオブジェクト54の2種類あることを示している。
また、図5に示すR10は、複合Activityオブジェクト54には、フォークジョインActivityオブジェクト56とサブActivityオブジェクト58の2種類あることを示している。
R9 shown in FIG. 6 indicates that there are two types of Activity objects 50: a single Activity object 52 and a composite Activity object 54 that is other than that.
Also, R10 shown in FIG. 5 indicates that there are two types of composite activity objects 54: fork join activity objects 56 and sub-activity objects 58.

比較例のソースコード作成装置は、まず、アクティビティ図の記述にかかわらず、仮のサブActivityに対応するソースコードを所定のファイルに追記する。   The source code creation device of the comparative example first adds the source code corresponding to the temporary sub-activity to a predetermined file regardless of the description of the activity diagram.

次に、最初に取得したActivity要素を仮のサブActivityの最初に実行するActivity(R2)とするための順序オブジェクト68のソースコードを追記し、仮のサブActivityを終了通知先(R7)とするソースコードを追記する。   Next, the source code of the sequence object 68 for making the activity element acquired first the activity (R2) to be executed at the beginning of the temporary subactivity is added, and the temporary subactivity is set as the end notification destination (R7). Add source code.

そして、次に取得したActivyity要素が存在する場合、それを次に実行するActivity(R8)とするための順序オブジェクト68のソースコードを追記し、仮のサブActivityを終了通知先(R7)とするソースコードを追記する。
存在しない場合は、次に実行するするActivity(R8)がないことを示す順序オブジェクト68のソースコードを追記し、終了となる。
If the next acquired Activity element exists, the source code of the order object 68 for making it the Activity (R8) to be executed next is added, and the provisional sub-Activity is set as the end notification destination (R7). Add source code.
If it does not exist, the source code of the order object 68 indicating that there is no activity (R8) to be executed next is added, and the processing is terminated.

次に取得したActivity要素が単一Activiyか複合Activityかを判別し、単一Activityである場合は、単一Activityに対応するソースコードを所定のファイルに追記する。   Next, it is determined whether the acquired Activity element is a single activity or a composite activity. If it is a single activity, a source code corresponding to the single activity is added to a predetermined file.

複合Activityの場合、それがフォークジョインActivityかサブActivityかを判別し、サブActivityである場合はサブActivityに対応するソースコードを追記し、フォークジョインActivityである場合はフォークジョインActivityに対応するソースコードを追記する。   In the case of compound activity, it is determined whether it is fork join activity or sub activity. If it is sub activity, a source code corresponding to sub activity is added, and if it is fork join activity, source code corresponding to fork join activity Is added.

取得したActivity要素がサブActivityの場合、サブActiivity内の最初に実行するActivity要素に対応するソースコード追記する。そして最初のサブActivity同様の処理を繰り返す。   When the acquired Activity element is sub-Activity, the source code corresponding to the Activity element executed first in the sub-Activity is added. Then, the same processing as the first sub-activity is repeated.

取得したActivity要素がフォークジョインActivityの場合、フォーク後ジョインするActivity要素に対応したソースコードを追記し、フォークジョインActivityを終了通知先(R7)とするソースコードを追記する。
そして、取得したActivity要素をフォークしジョインするActivity(R6)とするためのフォークジョインオブジェクト66のソースコードを追記する。
When the acquired Activity element is a folk join activity, a source code corresponding to the activity element to be joined after forking is added, and a source code having the fork join activity as an end notification destination (R7) is added.
Then, the source code of the fork join object 66 for adding Activity (R6) that forks and joins the obtained Activity element is added.

取得したActivity要素がデシジョンの場合、選択する判定を実施するデシジョンオブジェクト62に対応するソースコードを追記する。   When the acquired Activity element is a decision, a source code corresponding to the decision object 62 that performs the determination to be selected is added.

これにより、図6で示したクラス図で、アクティビティ図で示される処理を実行可能なソースコードを作成することができるが、フォークジョインActivityにフォークされたActivity要素は、同一のフォークジョインActivityでジョインしなければならないという制約があった。   As a result, the source code capable of executing the processing shown in the activity diagram can be created in the class diagram shown in FIG. 6, but the Activity element forked by the folk join activity is joined by the same folk join activity. There was a restriction that had to be done.

(2.3)ソースコード作成装置1の動作
本実施形態に係るソースコード作成装置1は、フォークジョインするActivityとジョインするActivity毎に別のソースコードを追記する。
以下本実施形態に係るモデルを示すクラス図(図3)及び本実施形態に係るソースコード作成の流れを示すフローチャート(図4)を参照しながらソースコード作成装置1の動作について説明する。
(2.3) Operation of Source Code Creation Device 1 The source code creation device 1 according to the present embodiment additionally writes another source code for each activity to be joined.
Hereinafter, the operation of the source code creation device 1 will be described with reference to a class diagram (FIG. 3) showing a model according to the present embodiment and a flowchart (FIG. 4) showing a flow of source code creation according to the present embodiment.

まずソースコード作成装置1は、待ち合わせ/分岐処理(フォーク/ジョイン)、選択処理(デシジョン)、実行処理(アクティビティ)、及び終了処理(終了)を含んで構成されるアクティビティ図内の任意のエレメント300を取得する(S301)。   First, the source code creation device 1 includes an arbitrary element 300 in an activity diagram including a wait / branch process (fork / join), a selection process (decision), an execution process (activity), and an end process (end). Is acquired (S301).

次に、取得されたエレメント300がフォーク/ジョインオブジェクト310、デシジョンオブジェクト320、アクティビティオブジェクト330、終了オブジェクト340のいずれであるかを判定する第1判定処理(R1)を行う(S302)。   Next, a first determination process (R1) is performed to determine whether the acquired element 300 is a fork / join object 310, a decision object 320, an activity object 330, or an end object 340 (S302).

そして、取得されたエレメント300がフォーク/ジョインオブジェクト310と判定された場合(S302:A)には、フォーク/ジョインオブジェクト310に対応するソースコード追記し(S302A)、フォーク/ジョインオブジェクト310と判定されたエレメント300が待ち合わせ完了後に分岐(フォーク)するエレメントを識別(R2)するためのフォークセレクタオブジェクト370に対応するソースコードを予め定められたファイルに追記する(S303)。   When the acquired element 300 is determined to be the fork / join object 310 (S302: A), the source code corresponding to the fork / join object 310 is added (S302A), and the fork / join object 310 is determined. The source code corresponding to the fork selector object 370 for identifying (R2) the element that branches (forks) after completion of waiting is added to a predetermined file (S303).

そして、待ち合わせ(ジョイン)するエレメント300を識別(R3)するためのジョインセレクタオブジェクト380に対応するソースコードを予め定められたファイルに追記する(S304)。   Then, the source code corresponding to the join selector object 380 for identifying (R3) the element 300 to be waited for (joined) is added to a predetermined file (S304).

取得されたエレメント300がデシジョンオブジェクト320と判定された場合(S302:B)には、デシジョンオブジェクト320に対応するソースコードを追記し(S302B)、デシジョンオブジェクト320と判定されたエレメント300が、条件により分岐するエレメントを識別(R4)するためのデシジョンセレクタオブジェクト390に対応するソースコードを予め定められたファイルに追記する(S305)。   When the acquired element 300 is determined to be the decision object 320 (S302: B), the source code corresponding to the decision object 320 is added (S302B), and the element 300 determined to be the decision object 320 is determined according to the conditions. The source code corresponding to the decision selector object 390 for identifying the branching element (R4) is added to a predetermined file (S305).

取得されたエレメント300がアクティビティオブジェクト330と判定された場合には、アクティビティオブジェクト330と判定されたエレメント300が、単一アクティビティオブジェクト350かサブアクティビティオブジェクト360かを判定する第2判定処理(R5)を行う(S306)。
第2判定処理(S306)によりエレメント300が単一アクティビティオブジェクト350と判定された場合(S306:E)には、単一アクティビティオブジェクト350に対応するソースコードを追記し(S306E)、次に実施するエレメントを識別(R6)するためのソースコードを予め定められたファイルに追記する(S307)。
When the acquired element 300 is determined to be the activity object 330, the second determination process (R5) for determining whether the element 300 determined to be the activity object 330 is the single activity object 350 or the sub-activity object 360 is performed. It performs (S306).
When the element 300 is determined to be the single activity object 350 by the second determination processing (S306) (S306: E), the source code corresponding to the single activity object 350 is added (S306E), and then executed. A source code for identifying the element (R6) is added to a predetermined file (S307).

第2判定処理(S306)によりエレメント300がサブアクティビティオブジェクト360と判定された場合(S306:F)には、サブアクティビティオブジェクト360に対応するソースコードを追記する(S306F1)。
そして、次に実施するエレメントを識別(R6)するためのソースコードを予め定められたファイルに追記し(S307F2)、エレメント300が最初に実施するアクティビティオブジェクト330を識別するための(R7)ソースコードを予め定められたファイルに追記する(S308)。
When the element 300 is determined to be the sub-activity object 360 by the second determination processing (S306) (S306: F), the source code corresponding to the sub-activity object 360 is added (S306F1).
Then, a source code for identifying (R6) an element to be executed next is added to a predetermined file (S307F2), and a source code for identifying the activity object 330 to be implemented first by the element 300 (R7) Is added to a predetermined file (S308).

第1判定処理(S302)によりエレメント300が終了(S302:D)と判定された場合には、エレメント300が終了を通知するサブアクティビティオブジェクト360を識別(R8)するためのソースコードを予め定められたファイルに追記する(S309)。   When the element 300 is determined to be ended (S302: D) by the first determination process (S302), a source code for identifying (R8) the sub-activity object 360 that notifies the end of the element 300 is determined in advance. Is added to the file (S309).

最後に、全エレメントの取得が完了したかを判定する(S310)。   Finally, it is determined whether acquisition of all elements is completed (S310).

(3)作用・効果
本実施形態に係るソースコード作成装置1によれば、フォークジョインActivityにフォークされたActivity要素は、同一のフォークジョインActivityでジョインしなければならないという制約を受けることがなく、比較例のソースコード作成装置ではソースコードを作成できなかった一例として、図6に図示した「不可」部分であってもソースコード作成が可能になる。
(3) Operation / Effect According to the source code creation device 1 according to the present embodiment, the Activity element forked by the fork join activity is not subject to the restriction that the fork join activity must be joined by the same fork join activity. As an example in which the source code creation apparatus of the comparative example could not create the source code, the source code can be created even for the “impossible” portion shown in FIG.

1・・・ソースコード作成装置
10・・・CPU
11・・・ROM
12・・・RAM
13・・・HDD
20・・・ネットワークI/F部
30・・・操作情報部
40・・・バス
300・・・エレメント
310・・・フォークジョインオブジェクト
320・・・デシジョンオブジェクト
330・・・アクティビティオブジェクト
340・・・終了オブジェクト
350・・・単一アクティビティオブジェクト
360・・・サブアクティビティオブジェクト
370・・・フォークセレクタオブジェクト
380・・・ジョインセレクタオブジェクト
390・・・デシジョンセレクタオブジェクト
1 ... Source code creation device 10 ... CPU
11 ... ROM
12 ... RAM
13 ... HDD
20 ... Network I / F unit 30 ... Operation information unit 40 ... Bus 300 ... Element 310 ... Folk join object 320 ... Decision object 330 ... Activity object 340 ... End Object 350 ... Single activity object 360 ... Sub-activity object 370 ... Fork selector object 380 ... Join selector object 390 ... Decision selector object

Claims (2)

待ち合わせ/分岐処理、選択処理、実行処理、及び終了処理を含んで構成されるアクティビティ図内の任意のエレメントを取得する取得手段と、
前記取得手段により取得された前記エレメントが待ち合わせ/分岐処理、選択処理、実行処理、終了処理のいずれであるかを判定(R1)する第1の判定手段と、
前記第1の判定手段により判定された結果に対応するソースコードを予め定められたファイルに追記する第1の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせ完了後に分岐するエレメントを識別(R2)するためのフォークセレクタに対応するソースコードを予め定められたファイルに追記する第2の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせするエレメントを識別(R3)するためのジョインセレクタに対応するソースコードを予め定められたファイルに追記する第3の追記手段と、
前記第1の判定手段により選択処理と判定された前記エレメントが、条件により分岐するエレメントを識別(R4)するためのデシジョンセレクタに対応するソースコードを予め定められたファイルに追記する第4の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、単一アクティビティかサブアクティビティかを判定(R5)する第2の判定手段と、
前記第2の判定手段によりサブアクティビティと判定された場合、前記エレメントが、最初に実施するアクティビティを識別(R7)するためのソースコードを予め定められたファイルに追記する第6の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、前記エレメントが、次に実施するエレメントを識別(R6)するためのソースコードを予め定められたファイルに追記する第5の追記手段と、
前記第1の判定手段により終了と判定された場合、前記エレメントが終了を通知するサブアクティビティを識別(R8)し、前記識別されたサブアクティビティがある場合は通知先のサブアクティビティを識別するソースコードを追記し、ない場合は追記しない第8の追記手段と、を有する、
ことを特徴とするソースコード作成装置。
An acquisition means for acquiring an arbitrary element in an activity diagram including a wait / branch process, a selection process, an execution process, and an end process;
First determination means for determining (R1) whether the element acquired by the acquisition means is a wait / branch process, a selection process, an execution process, or an end process;
First appending means for appending a source code corresponding to the result determined by the first determining means to a predetermined file;
When the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a fork selector for identifying (R2) an element that branches after completion of the wait to a predetermined file. A second appending means,
If the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a join selector for identifying (R3) the element to be waited to be added to a predetermined file. With additional writing means,
A fourth additional write in which a source code corresponding to a decision selector for identifying (R4) an element that is determined to be selected by the first determination means is added to a predetermined file. Means,
A second determination unit that determines (R5) whether the activity is a single activity or a sub-activity when the first determination unit determines that the activity is an activity;
When the second determination means determines that the activity is a sub-activity, the element additionally adds a source code for identifying an activity to be performed first (R7) to a predetermined file;
A fifth appending means for appending a source code for identifying (R6) an element to be executed next to a predetermined file when the element is determined to be an activity by the first determining means;
A source code for identifying a sub-activity for which the element notifies the end (R8) when the first determining means determines that the end is to be completed; And, if not, an eighth appending means that does not append.
A source code creation device characterized by that.
コンピュータを、
待ち合わせ/分岐処理、選択処理、実行処理、及び終了処理を含んで構成されるアクティビティ図内の任意のエレメントを取得する取得手段と、
前記取得手段により取得された前記エレメントが待ち合わせ/分岐処理、選択処理、実行処理、終了処理のいずれであるかを判定(R1)する第1の判定手段と、
前記第1の判定手段により判定された結果に対応するソースコードを予め定められたファイルに追記する第1の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせ完了後に分岐するエレメントを識別(R2)するためのフォークセレクタに対応するソースコードを予め定められたファイルに追記する第2の追記手段と、
前記第1の判定手段により待ち合わせ/分岐処理と判定された場合、前記エレメントが、待ち合わせするエレメントを識別(R3)するためのジョインセレクタに対応するソースコードを予め定められたファイルに追記する第3の追記手段と、
前記第1の判定手段により選択処理と判定された前記エレメントが、条件により分岐するエレメントを識別(R4)するためのデシジョンセレクタに対応するソースコードを予め定められたファイルに追記する第4の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、単一アクティビティかサブアクティビティかを判定(R5)する第2の判定手段と、
前記第2の判定手段によりサブアクティビティと判定された場合、前記エレメントが、最初に実施するアクティビティを識別(R7)するためのソースコードを予め定められたファイルに追記する第6の追記手段と、
前記第1の判定手段によりアクティビティと判定された場合、前記エレメントが、次に実施するエレメントを識別(R6)するためのソースコードを予め定められたファイルに追記する第5の追記手段と、
前記第1の判定手段により終了と判定された場合、前記エレメントが終了を通知するサブアクティビティを識別(R8)し、前記識別されたサブアクティビティがある場合は通知先のサブアクティビティを識別するソースコードを追記し、ない場合は追記しない第8の追記手段として機能させる、
ことを特徴とするソースコード作成プログラム。
Computer
An acquisition means for acquiring an arbitrary element in an activity diagram including a wait / branch process, a selection process, an execution process, and an end process;
First determination means for determining (R1) whether the element acquired by the acquisition means is a wait / branch process, a selection process, an execution process, or an end process;
First appending means for appending a source code corresponding to the result determined by the first determining means to a predetermined file;
When the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a fork selector for identifying (R2) an element that branches after completion of the wait to a predetermined file. A second appending means,
If the first determination means determines that the process is a wait / branch process, the element adds a source code corresponding to a join selector for identifying (R3) the element to be waited to be added to a predetermined file. With additional writing means,
A fourth additional write in which a source code corresponding to a decision selector for identifying (R4) an element that is determined to be selected by the first determination means is added to a predetermined file. Means,
A second determination unit that determines (R5) whether the activity is a single activity or a sub-activity when the first determination unit determines that the activity is an activity;
When the second determination means determines that the activity is a sub-activity, the element additionally adds a source code for identifying an activity to be performed first (R7) to a predetermined file;
A fifth appending means for appending a source code for identifying (R6) an element to be executed next to a predetermined file when the element is determined to be an activity by the first determining means;
A source code for identifying a sub-activity for which the element notifies the end (R8) when the first determining means determines that the end is detected; and for identifying the sub-activity as a notification destination when there is the identified sub-activity Is added, and if not, it is made to function as an eighth additional writing means not to add,
A source code creation program characterized by this.
JP2014013017A 2014-01-28 2014-01-28 Source code creation device, source code creation program Expired - Fee Related JP6197667B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014013017A JP6197667B2 (en) 2014-01-28 2014-01-28 Source code creation device, source code creation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014013017A JP6197667B2 (en) 2014-01-28 2014-01-28 Source code creation device, source code creation program

Publications (2)

Publication Number Publication Date
JP2015141489A JP2015141489A (en) 2015-08-03
JP6197667B2 true JP6197667B2 (en) 2017-09-20

Family

ID=53771817

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014013017A Expired - Fee Related JP6197667B2 (en) 2014-01-28 2014-01-28 Source code creation device, source code creation program

Country Status (1)

Country Link
JP (1) JP6197667B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1999046689A1 (en) * 1998-03-12 1999-09-16 Crossworlds Software, Inc. Execution of extended activity diagrams by code generation
JP2005250593A (en) * 2004-03-01 2005-09-15 Ul Systems Inc Object information generating device
US8332811B2 (en) * 2009-04-30 2012-12-11 United Parcel Service Of America, Inc. Systems and methods for generating source code for workflow platform

Also Published As

Publication number Publication date
JP2015141489A (en) 2015-08-03

Similar Documents

Publication Publication Date Title
US20150095811A1 (en) Context aware user interface parts
JP5198132B2 (en) State transition test support device, state transition test support program, and state transition test support method
EP3376377A1 (en) Apparatus and control method for comparison of hierarchical virtual machine templates
CN105468373A (en) Branch merging method and device
US9811071B2 (en) System construction support apparatus
JP5933045B2 (en) CAD data processing apparatus and processing method
JP6197667B2 (en) Source code creation device, source code creation program
JP6318214B2 (en) PLC debugging method using a general-purpose microprocessor
JPWO2015136965A1 (en) Control device, control system, control device control method, and control system control method
US9798315B2 (en) Machine tool post configurator systems and methods
KR102046622B1 (en) Software service system based on workflow and computer program that performs each step of the system
JP2018022433A (en) Control program, apparatus, and method
JP6097231B2 (en) Program generating apparatus and method
JP2010128908A (en) Information processing apparatus, control method for the same, and program
JP5319643B2 (en) Software product line development support apparatus and method
JP2016126700A (en) Program verification device, program verification method, and program verification program
US9003274B2 (en) Scheduling start-up and shut-down of mainframe applications using topographical relationships
JPWO2020152804A1 (en) Information provision systems, methods and programs
Eilertsen et al. Stepwise refactoring tools
JP6581788B2 (en) Block diagram management apparatus, block diagram management method and program
JP6405972B2 (en) Operation verification apparatus, operation verification method, and operation verification program
JP5215835B2 (en) Program application support tool
JP2015043140A (en) Source code generation device
US7743076B2 (en) Extensible action sequences coordinating independently created components
JP5277847B2 (en) Work management device, work management program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161019

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170712

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170807

R150 Certificate of patent or registration of utility model

Ref document number: 6197667

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees