JP2020101898A - Design drawing creation support method, design drawing creation support device, and design drawing creation support program - Google Patents

Design drawing creation support method, design drawing creation support device, and design drawing creation support program Download PDF

Info

Publication number
JP2020101898A
JP2020101898A JP2018238301A JP2018238301A JP2020101898A JP 2020101898 A JP2020101898 A JP 2020101898A JP 2018238301 A JP2018238301 A JP 2018238301A JP 2018238301 A JP2018238301 A JP 2018238301A JP 2020101898 A JP2020101898 A JP 2020101898A
Authority
JP
Japan
Prior art keywords
comment
design drawing
importance
information
source code
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2018238301A
Other languages
Japanese (ja)
Inventor
大輔 福井
Daisuke Fukui
大輔 福井
玄太 是木
Genta Koreki
玄太 是木
博 吉村
Hiroshi Yoshimura
博 吉村
真一 山崎
Shinichi Yamazaki
真一 山崎
宏 澤井
Hiroshi Sawai
宏 澤井
総 菊地
Satoshi Kikuchi
総 菊地
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2018238301A priority Critical patent/JP2020101898A/en
Publication of JP2020101898A publication Critical patent/JP2020101898A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

To provide a design drawing creation support method, a design drawing creation support device, and a design drawing creation support program allowing creation of a design drawing that allows a user to accurately grasp an outline of a source code.SOLUTION: A design drawing creation support device includes: a constituent element importance calculation unit that acquires a source code for performing predetermined information processing and calculates an importance degree of each constituent element constituting the acquired source code; a comment importance degree calculation unit that identifies a comment corresponding to each constituent element described in the source code and calculates an importance degree of each identified comment based on the importance degree of the constituent element corresponding to the comment and a predetermined attribute of the comment; and a design drawing generation unit that extracts the comment to be shown in a design drawing based on the calculated importance degree of each comment and generates the design drawing of the source code illustrating the extracted comment and the constituent element corresponding to the comment.SELECTED DRAWING: Figure 1

Description

本発明は、設計図作成支援方法、設計図作成支援装置、及び設計図作成支援プログラムに関する。 The present invention relates to a design drawing creation support method, a design drawing creation support device, and a design drawing creation support program.

業務に使用する種々の情報処理システムの開発規模は近年、ますます拡大しており、これらの管理は非常に煩雑で業務量も多くなっている。また、いったん構築した情報処理システムを再構築し、又は他の環境へと移行させる場合には、情報処理システムの情報を多数の関係者の間で共有しなければならないが、このような場合は特に、情報処理システムの情報共有は困難なものとなる。 In recent years, the scale of development of various information processing systems used for business has expanded more and more, and management of these is very complicated and the amount of business is increasing. In addition, when reconstructing the information processing system once constructed or moving to another environment, the information of the information processing system must be shared among a large number of parties. In particular, information sharing in information processing systems becomes difficult.

そのため、情報処理システムにおける各プログラムのソースコードを解析してコメント文を抽出することで、ソースコードの概要を把握できるようにした設計図(設計書)を生成する方法が提案されている。例えば、特許文献1には、プログラム仕様書作成装置の表示装置がユーザにGUI機能を提供し、入力装置はデータ入力機能を提供し、外部記憶装置はソースプログラムその他のプロジェクト資産を保存し、印刷装置はプログラム仕様書を印刷することが記載されている。すなわち、ソースプログラムからコメントを検索するキーワードの候補を抽出し、設定し、確認して、この確認されたキーワードに基づいてファイルの違いに関するコメント、シンボルの違いに関するコメント、処理手続きの違いに関するコメントをコメント項目毎に抽出して、改版仕様書として印刷することが開示されている。 Therefore, a method has been proposed in which the source code of each program in the information processing system is analyzed and the comment sentence is extracted to generate a design drawing (design document) in which the outline of the source code can be grasped. For example, in Patent Document 1, a display device of a program specification creating device provides a user with a GUI function, an input device provides a data input function, an external storage device stores a source program and other project assets, and prints. The device is described as printing a program specification. That is, a keyword candidate for retrieving a comment is extracted from the source program, set, and confirmed, and based on the confirmed keyword, a comment regarding a file difference, a comment regarding a symbol difference, and a comment regarding a processing procedure difference are extracted. It is disclosed that each comment item is extracted and printed as a revision specification.

特開2006−190332号公報JP, 2006-190332, A

しかしながら、プログラムのソースコードには様々な規模のものがあり、また、プログラムの目的、用途も業務によって異なる。したがって、ソースコードにおけるコメント文を設計書に加える必要性も、ソースコードにより行われる処理の内容及びコメント文の内容によって大きく異なる。不要なコメント文が設計書にあり、又は逆に必要なコメント文が設計書にない場合、そのような設計書ではプログラムの概要を把握することが困難となる。 However, there are various scales of program source code, and the purpose and use of the program differ depending on the business. Therefore, the necessity of adding the comment text in the source code to the design document also greatly differs depending on the content of the processing performed by the source code and the content of the comment text. If unnecessary comment sentences are present in the design document, or conversely, necessary comment sentences are not present in the design document, it becomes difficult to grasp the outline of the program with such design documents.

本発明はこのような事情に鑑みてなされたものであり、その目的は、ソースコードの概要をユーザが的確に把握できる設計図を作成することが可能な設計図作成支援方法、設計図作成支援装置、及び設計図作成支援プログラムを提供することにある。 The present invention has been made in view of such circumstances, and an object thereof is to provide a design drawing creation support method and a design drawing creation support capable of creating a design drawing that allows a user to accurately grasp the outline of a source code. It is to provide an apparatus and a design drawing support program.

以上の課題を解決するための本発明の一つは、プロセッサ及びメモリを有する設計図作成支援装置が、所定の情報処理を行うためのソースコードを取得し、取得したソースコードを構成する各構成要素の重要度を算出する構成要素重要度算出処理と、前記ソースコードに記述されている、前記各構成要素に対応するコメントを特定し、特定した各コメントの重要度を、当該コメントに対応する構成要素の重要度と、当該コメントの所定の属性とに基づき算出するコメント重要度算出処理と、前記算出した各コメントの重要度に基づき
、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する設計図生成処理と、を実行する。
One of the present inventions for solving the above-mentioned problems is that each configuration in which a design drawing creation supporting device having a processor and a memory acquires a source code for performing predetermined information processing and configures the acquired source code. A component importance calculation process for calculating the importance of an element and a comment corresponding to each of the components described in the source code are identified, and the importance of each identified comment is associated with the comment. Comment importance calculation processing that is calculated based on the importance of the component and a predetermined attribute of the comment, and based on the calculated importance of each comment, the comment shown in the design drawing is extracted, and the extracted comment and the relevant comment And a design drawing generation process for generating a design drawing of the source code in which the components corresponding to the comments are illustrated.

本発明によれば、ソースコードの概要をユーザが的確に把握できる設計図を作成することができる。 According to the present invention, it is possible to create a design drawing that allows the user to accurately grasp the outline of the source code.

図1は、本実施形態に係る設計図自動生成装置100(設計図作成支援装置)の構成の一例を示す図である。FIG. 1 is a diagram showing an example of the configuration of a design drawing automatic generation device 100 (design drawing creation support device) according to the present embodiment. 図2は、設計図自動生成装置100が備えるハードウェアの一例を示す図である。FIG. 2 is a diagram illustrating an example of the hardware included in the design drawing automatic generation device 100. 図3は、設計図自動生成装置100が行う、設計図を生成する処理である設計図自動生成処理の一例を説明するフロー図である。FIG. 3 is a flowchart illustrating an example of the design drawing automatic generation process, which is a process of generating a design drawing, performed by the design drawing automatic generation device 100. 図4は、構成要素重要度算出処理の一例を示すフロー図である。FIG. 4 is a flowchart showing an example of the component importance calculation processing. 図5は、ソースコードの解析結果の情報を記録したモジュールデータ300の一例を示す図である。FIG. 5 is a diagram showing an example of the module data 300 in which the information of the analysis result of the source code is recorded. 図6は、構成要素重要度データ500の一例を示す図である。FIG. 6 is a diagram showing an example of the component importance data 500. 図7は、対応関係特定処理の一例を説明するフロー図である。FIG. 7 is a flowchart for explaining an example of the correspondence identifying process. 図8は、コメントデータ700の一例を示す図である。FIG. 8 is a diagram showing an example of the comment data 700. 図9は、コメント重要度算出処理及び設計図生成処理の詳細を説明するフロー図である。FIG. 9 is a flowchart illustrating the details of the comment importance degree calculation process and the design drawing generation process. 図10は、設計図自動生成装置100が生成し表示するシーケンス図の一例を示す図である。FIG. 10 is a diagram showing an example of a sequence diagram generated and displayed by the design drawing automatic generation device 100. 図11は、設計図自動生成装置100が生成し表示するアクティビティ図の一例を示す図である。FIG. 11 is a diagram showing an example of an activity diagram generated and displayed by the design drawing automatic generation device 100.

本実施形態の設計図作成支援方法について図面を参照しつつ説明する。
<<設計図作成支援装置の構成>>
図1は、本実施形態に係る設計図自動生成装置100(設計図作成支援装置)の構成の一例を示す図である。設計図自動生成装置100は、情報処理装置(コンピュータ)であり、構成要素重要度算出部201、コメント重要度算出部203、及び設計図生成部205の各機能を備える。
The design drawing creation support method of this embodiment will be described with reference to the drawings.
<<Configuration of design drawing support device>>
FIG. 1 is a diagram showing an example of the configuration of a design drawing automatic generation device 100 (design drawing creation support device) according to the present embodiment. The design drawing automatic generation device 100 is an information processing device (computer), and includes respective functions of a component element importance degree calculation unit 201, a comment importance degree calculation unit 203, and a design drawing generation unit 205.

構成要素重要度算出部201は、所定の情報処理を行うための、ソースコードを取得し、取得したソースコードを構成する各構成要素の重要度を算出する構成要素重要度算出処理を実行する。 The constituent element importance degree calculation unit 201 acquires a source code for performing predetermined information processing, and executes a constituent element importance degree calculation process for calculating the importance degree of each constituent element that constitutes the acquired source code.

ソースコードの構成要素は、所定のプログラム言語により記述されたソースコードを構成する処理の単位、パラメータの単位等であり、例えば、モジュール、クラス、メソッド、関数、変数等である。なお、算出された構成要素の重要度は、構成要素重要度データ500に記憶される。構成要素重要度データ500の詳細は後述する。 The constituent elements of the source code are a unit of processing, a unit of parameters, etc. that compose the source code written in a predetermined programming language, and are, for example, modules, classes, methods, functions, variables, and the like. The calculated importance of the component is stored in the component importance data 500. Details of the component importance level data 500 will be described later.

なお、構成要素重要度算出部201は、ソースコード解析部202を備える。ソースコード解析部202は、ソースコードを、後述する観点情報270に基づき、解析する。なお、解析の結果は、モジュールデータ300に記憶される。モジュールデータ300の詳細は後述する。 The constituent element importance degree calculation unit 201 includes a source code analysis unit 202. The source code analysis unit 202 analyzes the source code based on viewpoint information 270 described later. The analysis result is stored in the module data 300. Details of the module data 300 will be described later.

コメント重要度算出部203は、前記ソースコードに記述されている、前記各構成要素
に対応するコメントを特定し、特定した各コメントの重要度を、当該コメントに対応する構成要素の重要度と、当該コメントの所定の属性とに基づき算出するコメント重要度算出処理を実行する。
The comment importance degree calculation unit 203 identifies the comments corresponding to the respective constituent elements described in the source code, and sets the importance degree of each identified comment to the importance degree of the constituent elements corresponding to the comment, A comment importance degree calculation process that is calculated based on a predetermined attribute of the comment is executed.

ここで、コメントとは、所定のユーザ(ソースコードの開発者や管理者等)がソースコードに付記した言語情報であり、例えば、文章、語句、単語、記号等のいずれであってもよい。 Here, the comment is language information added to the source code by a predetermined user (developer or administrator of the source code), and may be, for example, a sentence, a phrase, a word, a symbol, or the like.

なお、コメント重要度算出部203は、コメント解析部204を備える。コメント解析部204は、各コメントと、各構成要素との対応付けを行う。なお、この結果は、コメントデータ700に記憶される。コメントデータ700の詳細は後述する。 The comment importance degree calculation unit 203 includes a comment analysis unit 204. The comment analysis unit 204 associates each comment with each component. The result is stored in the comment data 700. Details of the comment data 700 will be described later.

また、設計図自動生成装置100は、前記コメントの所定の属性として、前記ソースコードにおける当該コメントの位置、当該コメントの長さ、又は当該コメントの内容のいずれかを算出する。そして、設計図自動生成装置100は、前記コメント重要度算出処理において、前記コメントの重要度を、前記算出したコメントの属性と、前記構成要素の重要度とに基づき算出する。 Further, the design drawing automatic generation device 100 calculates either the position of the comment in the source code, the length of the comment, or the content of the comment as the predetermined attribute of the comment. Then, the design drawing automatic generation device 100 calculates the importance of the comment in the comment importance calculation process based on the calculated attribute of the comment and the importance of the constituent element.

設計図生成部205は、コメント重要度算出部203が前記算出した各コメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する設計図生成処理を実行する。なお、生成した設計図のデータは、設計図データ800に記憶される。 The blueprint generation unit 205 extracts the comments shown in the blueprint based on the importance of each comment calculated by the comment importance calculation unit 203, and illustrates the extracted comments and the components corresponding to the comments. Executes a blueprint generation process for generating a blueprint of a code. The generated design drawing data is stored in the design drawing data 800.

また、図1に示すように、設計図自動生成装置100は、ソースコードにより実行される処理のうち図示の必要性が高い処理の情報を特定する情報である観点情報270を記憶している。
そして、設計図自動生成装置100は、前記構成要素重要度算出処理において、前記記憶した観点情報に基づき前記構成要素の重要度を算出する。
Further, as illustrated in FIG. 1, the design drawing automatic generation device 100 stores viewpoint information 270 that is information that specifies information of a process that is highly necessary to be illustrated among the processes executed by the source code.
Then, the design drawing automatic generation device 100 calculates the importance degree of the constituent element based on the stored viewpoint information in the constituent element importance degree calculation process.

なお、後述するが、観点情報270は、例えば、依存関係のある他の構成要素が多く存在する構成要素は設計図に図示する必要が高い、といった情報である。 Note that, as will be described later, the viewpoint information 270 is information that, for example, it is highly necessary that a component having many other components having a dependency relationship be illustrated in the design drawing.

また、設計図自動生成装置100は、生成する設計図が図示できる情報の種類を特定する情報である種類情報280を記憶している。
そして、設計図自動生成装置100は、前記コメント重要度算出処理において、その重要度を算出するコメントを、前記種類情報に基づき抽出し、抽出したコメントの重要度を、前記構成要素の重要度と、前記コメントの所定の属性とに基づき算出する。
Further, the design drawing automatic generation device 100 stores type information 280 that is information for specifying the type of information that can be illustrated in the generated design drawing.
Then, the design drawing automatic generation device 100 extracts a comment whose importance is calculated in the comment importance calculation processing based on the type information, and sets the importance of the extracted comment as the importance of the constituent element. , Based on the predetermined attribute of the comment.

なお、後述するが、種類情報280は、例えば、生成する設計図がシーケンス図か、アクティビティ図かといった情報である。 As will be described later, the type information 280 is, for example, information indicating whether the generated design drawing is a sequence drawing or an activity drawing.

また、設計図自動生成装置100は、生成する設計図の規模を示す情報である規模情報290を記憶している。
そして、設計図自動生成装置100は、前記設計図生成処理において、前記ソースコードの構成要素のうち、その重要度が前記記憶した規模情報に基づく所定の閾値を超えている構成要素を特定し、特定した構成要素に対応する、前記算出したコメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する。
Further, the design drawing automatic generation device 100 stores scale information 290 that is information indicating the scale of the design drawing to be generated.
Then, the design drawing automatic generation device 100 identifies, in the design drawing generation process, a constituent element whose importance exceeds a predetermined threshold based on the stored scale information, among the constituent elements of the source code, The comment shown in the design drawing is extracted based on the calculated importance of the comment corresponding to the specified component, and the design drawing of the source code showing the extracted comment and the component corresponding to the comment is generated. ..

なお、後述するが、規模情報290は、例えば、生成する設計図が概略図か抽象図か、
といった情報である。
As will be described later, the scale information 290 is, for example, whether the generated design drawing is a schematic drawing or an abstract drawing,
Such information.

なお、設計図自動生成装置100は、設計図生成部205が前記生成した設計図を所定の画面に表示する。 The design drawing automatic generation device 100 displays the design drawing generated by the design drawing generation unit 205 on a predetermined screen.

また、設計図自動生成装置100は、前記観点情報、前記種類情報、又は前記規模情報のうち少なくともいずれかの入力をユーザから受け付ける。 Further, the design drawing automatic generation device 100 receives an input of at least one of the viewpoint information, the type information, and the scale information from the user.

なお、図2は、設計図自動生成装置100が備えるハードウェアの一例を示す図である。設計図自動生成装置100は、CPU(Central Processing Unit)などのプロセッサ
101と、RAM(Random Access Memory)、ROM(Read Only Memory)等のメモリ102と、キーボード、マウス、タッチパネルなどからなる入力装置103と、HDD(Hard Disk Drive)、SSD(Solid State Drive)等のストレージ104と、モニタ(ディスプレイ)等からなる、画面表示を行う出力装置105とを備える。
FIG. 2 is a diagram showing an example of the hardware included in the design drawing automatic generation device 100. The design drawing automatic generation device 100 includes a processor 101 such as a CPU (Central Processing Unit), a memory 102 such as a RAM (Random Access Memory) and a ROM (Read Only Memory), and an input device 103 including a keyboard, a mouse, a touch panel, and the like. And a storage 104 such as an HDD (Hard Disk Drive) and an SSD (Solid State Drive), and an output device 105 including a monitor (display) for displaying a screen.

図1に示した設計図自動生成装置100の機能は、設計図自動生成装置100のハードウェアにより、もしくは、プロセッサ101が、メモリ102又はやストレージ104に記憶されている各プログラムを読み出して実行することにより実現される。 The function of the automatic design drawing generating apparatus 100 shown in FIG. 1 is executed by the hardware of the automatic design drawing generating apparatus 100, or the processor 101 reads and executes each program stored in the memory 102 or the storage 104. It is realized by

また、これらのプログラムは、例えば、二次記憶デバイスや不揮発性半導体メモリ、ハードディスクドライブ、SSDなどの記憶デバイス、又は、ICカード、SDカード、DVDなどの、情報処理装置で読み取り可能な非一時的データ記憶媒体に格納される。 Further, these programs are non-temporary readable by a storage device such as a secondary storage device, a non-volatile semiconductor memory, a hard disk drive, an SSD, or an information processing device such as an IC card, an SD card, or a DVD. Stored on a data storage medium.

<<処理>>
次に、設計図自動生成装置100が行う処理について説明する。
<設計図自動生成処理>
図3は、設計図自動生成装置100が行う、設計図を生成する処理である設計図自動生成処理の一例を説明するフロー図である。
<<Processing>>
Next, the processing performed by the automatic design drawing generator 100 will be described.
<Automatic blueprint generation process>
FIG. 3 is a flowchart illustrating an example of the design drawing automatic generation process, which is a process of generating a design drawing, performed by the design drawing automatic generation device 100.

まず、設計図自動生成装置100は、ソースコードを構成する各構成要素(モジュール、変数等)を特定し、特定した各構成要素の重要度を算出する構成要素重要度算出処理を実行する(s1)。 First, the design drawing automatic generation device 100 specifies each component (module, variable, etc.) that constitutes the source code, and executes a component importance calculation process that calculates the importance of each specified component (s1). ).

また、設計図自動生成装置100は、ソースコードにおける各構成要素と、当該ソースコードにおけるコメントとの対応関係を特定する対応関係特定処理を実行する(s3)。 Further, the design drawing automatic generation device 100 executes a correspondence relationship specifying process for specifying a correspondence relationship between each component in the source code and the comment in the source code (s3).

次に、設計図自動生成装置100は、対応関係特定処理により特定されるコメントに対するコメント重要度を算出するコメント重要度算出処理を実行する(s5)。そして、設計図自動生成装置100は、s1で算出した構成要件重要度及びs5で算出したコメント重要度に基づき設計図を生成する設計図生成処理を実行する(s7)。以上で設計図自動生成処理は終了する(s9)。
以下、これらの各処理の詳細を説明する。
Next, the design drawing automatic generation device 100 executes the comment importance calculation processing for calculating the comment importance for the comment specified by the correspondence specification processing (s5). Then, the design drawing automatic generation device 100 executes a design drawing generation process for generating a design drawing based on the constituent requirement importance calculated in s1 and the comment importance calculated in s5 (s7). Thus, the design drawing automatic generation process ends (s9).
The details of each of these processes will be described below.

まず、構成要素重要度算出処理s1の詳細を説明する。
<構成要素重要度算出処理>
図4は、構成要素重要度算出処理の一例を示すフロー図である。まず、設計図自動生成装置100は、ソースコードの構成要素を解析するための解析方針を設定し、これを観点情報270に記録する(s402)。
First, the details of the component importance calculation processing s1 will be described.
<Component importance calculation processing>
FIG. 4 is a flowchart showing an example of the component importance calculation processing. First, the design drawing automatic generation device 100 sets an analysis policy for analyzing the constituent elements of the source code, and records this in the viewpoint information 270 (s402).

本実施形態では、解析方針は、解析の観点及び解析ロジックであるものとする。解析の
観点とは、例えば、ソースコードにおける各構成要素が行う処理のうち重要な処理に係る構成要素であって、設計図に図示する必要が高い構成要素(以下、重要構成要素という。例えば、SQLの実行、特定処理の実行、又はファイルの入出力に係るメソッド。)の判断基準に関する情報である。
In this embodiment, the analysis policy is a viewpoint of analysis and analysis logic. The viewpoint of analysis is, for example, a component related to an important process among the processes performed by each component in the source code, and a component that is highly necessary to be illustrated in the design drawing (hereinafter referred to as an important component. For example, This is information about the judgment criteria of SQL execution, specific processing execution, or file input/output method.

また、解析ロジックとは、解析の観点に基づく解析を行うための判断処理の内容であり、例えば、特定の構成要素(例えば、メソッド)から呼び出されている構成要素がある場合に、その呼び出されている構成要素を重要構成要素とするロジックである。また、特定の構成要素を呼び出している構成要素がある場合に、その両構成要素を重要構成要素とするロジックである。 The analysis logic is the content of the judgment processing for performing analysis based on the viewpoint of analysis. For example, when there is a component called from a specific component (for example, a method), it is called. It is a logic that makes the constituent elements that are important elements. In addition, when there is a component that calls a specific component, the logic is such that both components are important components.

なお、設計図自動生成装置100は、ユーザからの入力を受け付けることにより解析方針を設定してもよいし、所定のデータベースから解析方針を読み込むことで当該解析方針を設定してもよい。なお、ここで設定される解析方針は複数の場合がある。 The design drawing automatic generation device 100 may set the analysis policy by receiving an input from the user, or may set the analysis policy by reading the analysis policy from a predetermined database. There may be multiple analysis policies set here.

次に、設計図自動生成装置100は、自身が記憶しているソースコード又は他の情報処理装置が記憶しているソースコードのうち、解析を実行していないソースファイルがあるか否かを判定する(s403)。解析を実行していないソースファイルがない場合は(s403:NO)、構成要素重要度算出処理は終了し(s408)、解析を実行していないソースファイルがある場合は(s403:YES)、そのソースファイルの一つを選択してs404の処理を実行する。 Next, the blueprint automatic generation device 100 determines whether or not there is a source file that has not been analyzed, among the source codes stored by itself or the source codes stored by other information processing devices. Yes (s403). If there is no source file that has not been analyzed (s403: NO), the component importance degree calculation processing ends (s408), and if there is a source file that has not been analyzed (s403: YES), One of the source files is selected and the process of s404 is executed.

s404において、設計図自動生成装置100は、s402で設定した解析方針に基づき、選択したソースファイルに対する解析処理を実行し、その結果をモジュールデータ300に記憶する。 In s404, the design drawing automatic generation device 100 executes the analysis process for the selected source file based on the analysis policy set in s402, and stores the result in the module data 300.

ここで、モジュールデータ300の詳細を説明する。
(モジュールデータ)
図5は、ソースコードの解析結果の情報を記録したモジュールデータ300の一例を示す図である。モジュールデータ300は、ソースファイル毎に割り当てられた識別子であるソースIDが格納されるソースID項目301、ソースID項目301に係るソースファイルの記憶場所を特定する情報が格納されるソースファイルパス項目302、ソースID項目301に係るソースファイルを構成する構成要素の名称が格納されるモジュール名項目303、モジュール名項目303に係る構成要素の種類(メソッド、変数等)が格納されるモジュールタイプ項目304、モジュール名項目303に係る構成要素がソースID項目301に係るソースファイルにおいて定義されている位置を特定する情報(例えば、ソースファイルの行番号)が格納される定義行番号項目305、ソースID項目301に係るソースファイルにおけるモジュール名項目303に係る構成要素の内容の記述部分の開始位置を特定する情報(例えば、ソースファイルの行番号)が格納される開始行番号項目306、ソースID項目301に係るソースファイルにおけるモジュール名項目303に係る構成要素の内容の記述部分の終了位置を特定する情報(例えば、ソースファイルの行番号)が格納される終了行番号項目307、及び、モジュール名項目303に係る構成要素を呼び出している他の構成要素を特定する情報(例えば、ソースコードのソースID、ソースコードにおける行番号)が格納される呼び出し元項目308の各項目を有するデータベースである。
Here, details of the module data 300 will be described.
(Module data)
FIG. 5 is a diagram showing an example of the module data 300 in which the information of the analysis result of the source code is recorded. The module data 300 includes a source ID item 301 that stores a source ID that is an identifier assigned to each source file, and a source file path item 302 that stores information that specifies the storage location of the source file related to the source ID item 301. , A module name item 303 in which the names of the constituent elements that make up the source file related to the source ID item 301 are stored, and a module type item 304 in which the types of the constituent elements (methods, variables, etc.) related to the module name item 303 are stored, Definition line number item 305 and source ID item 301 in which information (for example, line number of the source file) specifying the position where the component related to the module name item 303 is defined in the source file related to the source ID item 301 is stored A source line item 306 and a source ID item 301 in which information (for example, a line number of the source file) that specifies the start position of the description portion of the content of the component related to the module name item 303 in the source file is stored. The end line number item 307 that stores the information (for example, the line number of the source file) that identifies the end position of the description portion of the content of the module name item 303 in the source file, and the module name item 303 It is a database having each item of a caller item 308 in which information (for example, a source ID of a source code, a line number in the source code) for identifying another component calling the component is stored.

次に、図4のs405に示すように、設計図自動生成装置100は、s404で実行した解析結果に基づき、ソースコードの全構成要素から、重要構成要素を抽出する。具体的には、例えば、設計図自動生成装置100は、モジュールデータ300を参照することにより、特定のメソッドから呼び出されているメソッドを重要構成要素とし、又は、特定の
メソッドを呼び出しているメソッドがある場合にこれら両メソッドを重要構成要素とする。
Next, as shown in s405 of FIG. 4, the blueprint automatic generation device 100 extracts important components from all the components of the source code based on the analysis result executed in s404. Specifically, for example, the blueprint automatic generation device 100 refers to the module data 300 to make a method called from a specific method an important constituent element or a method calling a specific method. In some cases both methods are important components.

設計図自動生成装置100は、s405で抽出した各重要構成要素の重要度を、モジュールデータ300及び観点情報270に基づき算出する(s406)。 The automatic design drawing generator 100 calculates the importance of each important component extracted in s405 based on the module data 300 and the viewpoint information 270 (s406).

具体的には、例えば、設計図自動生成装置100は、特定のメソッドから呼び出されているメソッドを重要構成要素とした場合は、その呼び出されている回数を、当該重要構成要素の重要度とする。また、例えば、設計図自動生成装置100は、特定のメソッドを呼び出しているメソッドがある場合にこれら両メソッドを重要構成要素とした場合は、その両メソッドの重要度を、その呼び出している回数とする。すなわち、設計図自動生成装置100は、より多くの特定の構成要素に呼び出され、又はより多くの特定の構成要素を呼び出している重要構成要素ほど、その重要構成要素の重要度が高くなるようにする。 Specifically, for example, if the method called from a specific method is an important constituent element, the automatic design drawing generation apparatus 100 sets the number of times the method is called as the importance degree of the important constituent element. .. Further, for example, when there is a method that calls a specific method, the blueprint automatic generation device 100 sets the importance of the two methods as the number of times of calling when the two methods are important components. To do. That is, in the automatic design drawing generation apparatus 100, the more important a component is called by more specific components or the more specific components are called, the higher the importance of the important components becomes. To do.

設計図自動生成装置100は、このようにして算出した重要構成要素の重要度を、構成要素重要度データ500に記憶する(s407)。その後は、s403の処理が繰り返される。 The design drawing automatic generation device 100 stores the importance of the important component calculated in this way in the component importance data 500 (s407). After that, the process of s403 is repeated.

ここで、構成要素重要度データ500の具体例を説明する。
(構成要素重要度データ)
図6は、構成要素重要度データ500の一例を示す図である。構成要素重要度データ500は、各ソースファイルにおける重要構成要素に関するデータベースであり、ソースファイルの記憶場所を特定する情報(例えば、パス情報)が格納されるソースファイルパス項目501、ソースファイルパス項目501に係るソースファイルにおける重要構成要素の名称(例えば、モジュール名)が格納されるモジュール名項目502、モジュール名項目502に係る重要構成要素の種類を特定する情報が格納されるモジュールタイプ項目503、ソースファイルパス項目501に係るソースファイルにおいてモジュール名項目502に係る重要構成要素が定義されている位置を特定する情報(例えば、ソースファイルの行番号)が格納される定義行番号項目504、モジュール名項目502に係る重要構成要素を特定するための解析方針(例えば、解析観点)を特定する情報が格納される解析観点項目505、及び、モジュール名項目502に係る重要構成要素の重要度(構成要素重要度)の情報が格納される重要度項目506の各項目を有する。
Here, a specific example of the component importance data 500 will be described.
(Component importance data)
FIG. 6 is a diagram showing an example of the component importance data 500. The constituent element importance data 500 is a database regarding important constituent elements in each source file, and a source file path item 501 and a source file path item 501 in which information (for example, path information) that specifies the storage location of the source file is stored. Module name item 502 in which the name (for example, module name) of the important component in the source file related to the module name is stored, module type item 503 in which information identifying the type of the important component related to the module name item 502 is stored, source A definition line number item 504 and a module name item in which information (for example, a line number of the source file) for specifying the position where the important component related to the module name item 502 is defined in the source file related to the file path item 501 is stored. An analysis viewpoint item 505 in which information for specifying an analysis policy (for example, an analysis viewpoint) for specifying an important component element related to the 502, and an importance degree of the important component element related to the module name item 502 (component important Each item has an importance item 506 in which information of “degree” is stored.

次に、対応関係特定処理s3の詳細を説明する。
<対応関係特定処理>
図7は、対応関係特定処理の一例を説明するフロー図である。まず、設計図自動生成装置100は、対応関係特定処理で未解析のソースファイルがあるか否かを判定し(s602)、未解析のソースファイルがない場合は(s602:NO)、対応関係特定処理を終了する(s606)。
Next, details of the correspondence identifying process s3 will be described.
<Correspondence specifying process>
FIG. 7 is a flowchart for explaining an example of the correspondence identifying process. First, the blueprint automatic generation device 100 determines whether there is an unanalyzed source file in the correspondence identification process (s602). If there is no unparsed source file (s602: NO), the correspondence identification is performed. The process ends (s606).

他方、未解析のソースファイルがある場合は(s602:YES)、設計図自動生成装置100はそのソースファイルを選択し(選択ソースファイル)、選択ソースファイルに記録されているコメントを全て抽出する(s603)。具体的には、例えば、設計図自動生成装置100は、選択ソースファイルにおける構文解析を行うことにより、選択ソースファイルにおけるコメントを全て抽出する。 On the other hand, if there is an unanalyzed source file (s602: YES), the blueprint automatic generation device 100 selects that source file (selected source file) and extracts all the comments recorded in the selected source file ( s603). Specifically, for example, the design drawing automatic generation device 100 extracts all the comments in the selected source file by performing syntax analysis on the selected source file.

そして、設計図自動生成装置100は、s603で抽出した各コメントに対応する構成要素をそれぞれ特定し、当該構成要素とコメントとを対応付けてコメントデータ700に記憶する(s603、s604)。その後は、s602の処理が繰り返される。 Then, the design drawing automatic generation device 100 identifies the constituent element corresponding to each comment extracted in s603, stores the constituent element and the comment in the comment data 700 in association with each other (s603, s604). After that, the processing of s602 is repeated.

具体的には、例えば、設計図自動生成装置100は、s603で抽出したコメントの一つを選択し、選択ソースファイルにおける当該選択したコメントの直後の位置に、構成要素たるメソッドの記述がある場合は、その選択したコメントは、当該メソッドの定義を記述したコメント(定義コメント)であると記憶すると共に、当該メソッドと当該コメントとを対応付けてコメントデータ700に記憶する。 Specifically, for example, when the design drawing automatic generation device 100 selects one of the comments extracted in s603, and the method as a component is described at the position immediately after the selected comment in the selected source file. Stores that the selected comment is a comment (definition comment) describing the definition of the method, and stores the method and the comment in the comment data 700 in association with each other.

また、例えば、設計図自動生成装置100は、s603で抽出したコメントの一つを選択し、選択したコメントの前後に、構成要素たるメソッドの開始及び終了を示す記述(例えば、”{”、”}”)がある場合は、その選択したコメントは、当該メソッドの内容を説明したコメント(内部コメント)であると記憶すると共に、当該メソッドと当該コメントとを対応付けてコメントデータ700に記憶する。 Further, for example, the blueprint automatic generation device 100 selects one of the comments extracted in s603, and describes before and after the selected comment the start and end of the method that is the component (for example, “{”, “”). }”), the selected comment is stored as a comment (internal comment) that describes the content of the method, and is stored in the comment data 700 in association with the method.

ここで、コメントデータ700の具体例を説明する。
(コメントデータ)
図8は、コメントデータ700の一例を示す図である。コメントデータ700は、構成要素とコメントとの対応関係を記録したデータベースであり、その項目として、ソースファイル及びその場所を特定する情報が格納されるソースファイルパス項目701と、ソースファイルパス項目701に係るソースファイルに存在する各構成要素を特定する情報(例えば、モジュール名)が格納されるモジュール名項目702と、モジュール名項目702に係る構成要素の種類を示す情報が格納されるモジュールタイプ項目703と、モジュール名項目702に係る構成要素が定義されている、ソースファイルパス項目701に係るソースファイルの位置を特定する情報(例えば、行番号)が格納される定義行番号項目704と、モジュール名項目702に係る構成要素に対応付けられたコメントの内容が格納される定義コメント項目705及び内部コメント項目706とを有する。
Here, a specific example of the comment data 700 will be described.
(Comment data)
FIG. 8 is a diagram showing an example of the comment data 700. The comment data 700 is a database that records the correspondence between constituent elements and comments. As its items, a source file path item 701 in which information identifying a source file and its location is stored, and a source file path item 701. A module name item 702 in which information (for example, a module name) identifying each component existing in the source file is stored, and a module type item 703 in which information indicating the type of the component related to the module name item 702 is stored. And a definition line number item 704 in which information (for example, line number) specifying the position of the source file related to the source file path item 701, in which the component related to the module name item 702 is defined, and the module name It has a definition comment item 705 and an internal comment item 706 in which the contents of the comment associated with the component related to the item 702 are stored.

定義コメント項目705には、モジュールタイプ項目703に係る構成要素の種類がメソッド、変数又はその他の種類である場合に、その構成要素に対応する定義コメントの内容が格納される。 The definition comment item 705 stores the content of the definition comment corresponding to the component when the type of the component related to the module type item 703 is a method, a variable, or another type.

内部コメント項目706には、モジュールタイプ項目703に係る構成要素の種類がメソッドである場合に、その構成要素に対応する内部コメントの内容が格納される。すなわち、内部コメント項目706には、構成要素が変数の場合には、情報が登録されない。 The internal comment item 706 stores the contents of the internal comment corresponding to the component when the type of the component related to the module type item 703 is a method. That is, if the component is a variable, no information is registered in the internal comment item 706.

次に、コメント重要度算出処理及び設計図生成処理の詳細を説明する。
<コメント重要度算出処理及び設計図生成処理>
図9は、コメント重要度算出処理s5及び設計図生成処理s7の詳細を説明するフロー図である。まず、設計図自動生成装置100は、設計図の生成方針を設定する(s802)。具体的には、例えば、設計図自動生成装置100は、観点情報270、種類情報280、及び規模情報290を設定する。
Next, details of the comment importance degree calculation process and the design drawing generation process will be described.
<Comment importance calculation processing and design drawing generation processing>
FIG. 9 is a flowchart illustrating the details of the comment importance degree calculation process s5 and the design drawing generation process s7. First, the design drawing automatic generation device 100 sets a design drawing generation policy (s802). Specifically, for example, the design drawing automatic generation device 100 sets the viewpoint information 270, the type information 280, and the scale information 290.

ここでの観点情報270は、本実施形態では、前記の構成要素に係る観点情報270と同様とする。 In this embodiment, the viewpoint information 270 here is the same as the viewpoint information 270 related to the above-described constituent elements.

種類情報280に設定される情報は、生成する設計図が図示できる情報を特定する情報である。種類情報280には、例えば、ソースファイルにおいて、構成要素を含むオブジェクト間の相互作用の情報を時系列で図示する場合は、「シーケンス図」と設定される。また、プログラムの処理の流れを示すための情報を図示する場合は、「アクティビティ図」と設定される。 The information set in the type information 280 is information that identifies information that can be illustrated in the generated design drawing. In the type information 280, for example, when the information on the interaction between the objects including the components in the source file is illustrated in time series, it is set as “sequence diagram”. Further, when the information for showing the flow of processing of the program is shown, it is set as "activity diagram".

規模情報290に設定される情報は、生成する設計図における情報の抽象化の程度であ
る。規模情報290には、例えば、生成する設計図が「概略図」か若しくは「詳細図」かといった図の種類の情報、又は設計図の寸法といった設計図の物理的な大きさの情報が設定される。
The information set in the scale information 290 is the degree of abstraction of information in the generated design drawing. In the scale information 290, for example, information on the type of drawing such as whether the generated design drawing is a “schematic drawing” or “detail drawing”, or information on the physical size of the design drawing such as the dimensions of the design drawing is set. It

なお、設計図自動生成装置100は、観点情報270、種類情報280、及び規模情報290を、ユーザからの入力を受け付けることにより設定してもよいし、所定のデータベースから情報を読み込むことにより設定してもよい。 The automatic design drawing generation apparatus 100 may set the viewpoint information 270, the type information 280, and the scale information 290 by receiving an input from the user or by reading the information from a predetermined database. May be.

次に、設計図自動生成装置100は、設計図の生成方針のうち規模情報290に基づき、生成する設計図が図示する情報量の多寡を調節するための所定の閾値を算出する(s803)。この閾値は、構成要素重要度及び、構成要素重要度により算出されるコメント重要度を評価するためのパラメータである。 Next, the blueprint automatic generation device 100 calculates a predetermined threshold value for adjusting the amount of information amount illustrated in the blueprint to be generated based on the scale information 290 in the blueprint generation policy (s803). This threshold value is a parameter for evaluating the degree of importance of the constituent element and the degree of importance of the comment calculated from the degree of importance of the constituent element.

例えば、規模情報290が、概略図又は詳細図といった図の種類で設定された場合には、設計図自動生成装置100は、概略図のような抽象度が高い図の場合には閾値を所定の大きな値に設定し、詳細図のような抽象度が低い図の場合には閾値を所定のより小さな値に設定する。 For example, when the scale information 290 is set by a type of diagram such as a schematic diagram or a detailed diagram, the automatic design drawing generation apparatus 100 sets a predetermined threshold value in the case of a diagram having a high degree of abstraction such as a schematic diagram. A large value is set, and in the case of a drawing with a low degree of abstraction such as a detailed drawing, the threshold value is set to a predetermined smaller value.

また、例えば、規模情報290が、設計図の大きさで設定された場合には、設計図自動生成装置100は、設計図が大きいほど閾値が小さくなるように当該閾値を設定する。 Further, for example, when the scale information 290 is set to the size of the design drawing, the design drawing automatic generation device 100 sets the threshold value such that the larger the design drawing, the smaller the threshold value.

なお、設計図自動生成装置100は、この閾値を、ユーザからの入力を受け付けることにより設定してもよいし、自動的に算出するようにしてもよい。 Note that the design drawing automatic generation device 100 may set this threshold value by receiving an input from the user, or may calculate it automatically.

続いて、設計図自動生成装置100は、全構成要素のうち、構成要素重要度がs803で設定した閾値より大きい重要構成要素を抽出する(s804)。具体的には、例えば、設計図自動生成装置100は、構成要素重要度データ500の重要度項目506の値が前記の閾値より大きいレコードを全て特定し、それらの内容(例えば、モジュール名)を取得する。 Subsequently, the design drawing automatic generation device 100 extracts, from all the constituent elements, important constituent elements whose constituent element importance is higher than the threshold value set in s803 (s804). Specifically, for example, the design drawing automatic generation device 100 identifies all the records in which the value of the importance item 506 of the component importance data 500 is larger than the threshold value, and determines their contents (for example, module name). get.

そして、設計図自動生成装置100は、s804で抽出した各構成要素に対応するコメントを全て特定する(s805)。具体的には、例えば、設計図自動生成装置100は、コメントデータ700においてモジュール名項目702にs804で抽出した構成要素(例えば、モジュール名)が格納されているレコードの内容(例えば、定義コメント項目705及び内部コメント項目706の内容)を全て取得する。 Then, the design drawing automatic generation device 100 identifies all the comments corresponding to each component extracted in s804 (s805). Specifically, for example, the blueprint automatic generation device 100 has the contents (eg, definition comment item) of the record in which the component (eg, module name) extracted in s804 is stored in the module name item 702 in the comment data 700. 705 and internal comment item 706).

設計図自動生成装置100は、s805で特定した各コメントの重要度を、種類情報280に基づき算出する(s806)。 The design drawing automatic generation device 100 calculates the importance of each comment specified in s805 based on the type information 280 (s806).

具体的には、まず、設計図自動生成装置100は、重要度を算出するコメントを特定する。例えば、設計図自動生成装置100は、種類情報280に「シーケンス図」が設定されている場合は、定義コメントの重要度のみを算出し、その他のコメントの重要度は算出しない(又はゼロとする)。また、例えば、設計図自動生成装置100は、種類情報280に「アクティビティ図」が設定されている場合は、定義コメント及び所定の内部コメント(例えば、1行のみの内部コメント)の重要度のみを算出し、その他のコメントの重要度は算出しない(又はゼロとする)。 Specifically, first, the design drawing automatic generation device 100 specifies a comment whose importance is calculated. For example, when the “sequence diagram” is set in the type information 280, the design drawing automatic generation device 100 calculates only the importance of the definition comment and does not calculate the importance of the other comments (or zero). ). Further, for example, when the “activity diagram” is set in the type information 280, the automatic design drawing generating apparatus 100 determines only the importance of a definition comment and a predetermined internal comment (for example, an internal comment of only one line). Calculate, and do not calculate the importance of other comments (or set to zero).

そして、設計図自動生成装置100は、算出対象のコメントに対応する構成要素(モジュール等)の構成要素重要度を取得する。具体的には、設計図自動生成装置100は、コメントデータ700を参照することにより構成要素重要度を取得する。 Then, the design drawing automatic generation device 100 acquires the component importance degree of the component (module or the like) corresponding to the comment to be calculated. Specifically, the design drawing automatic generation device 100 acquires the component importance degree by referring to the comment data 700.

そして、設計図自動生成装置100は、算出対象のコメントの有する属性(詳細は次述)に基づき、前記取得した算出対象の構成要素重要度を変化させた値を、当該コメントの重要度として算出する。 Then, the blueprint automatic generation device 100 calculates, as the importance of the comment, a value obtained by changing the acquired component importance of the calculation target based on the attribute (details described below) of the comment of the calculation target. To do.

コメントの属性は、例えば、コメントのソースプログラムにおける位置(例えば、行番号)、コメントの長さ(例えば、文字数)、コメントの内容(所定のキーワードが含まれているか)である。例えば、設計図自動生成装置100は、コメントの位置と、当該コメントの直近にある重要構成要素(モジュール等)の位置との間の距離(何行離れているか)に応じて構成要素重要度を下げた値を、コメント重要度とする(例えば、距離に比例してコメント重要度を下げる)。 The attributes of the comment are, for example, the position (for example, line number) of the comment in the source program, the length of the comment (for example, the number of characters), and the content of the comment (whether a predetermined keyword is included). For example, the blueprint automatic generation device 100 sets the component importance degree according to the distance (how many lines are apart) between the position of the comment and the position of the important component (module, etc.) that is closest to the comment. The lowered value is used as the comment importance (for example, the comment importance is decreased in proportion to the distance).

また、例えば、設計図自動生成装置100は、コメントの長さに応じて構成要素重要度を下げた値を、コメント重要度とする(例えば、コメントの長さに比例してコメント重要度を下げる)。 Further, for example, the design drawing automatic generation device 100 sets the value of the component importance reduced according to the length of the comment as the comment importance (for example, the comment importance is reduced in proportion to the length of the comment). ).

また、例えば、設計図自動生成装置100は、コメントに予め定めたキーワードが含まれている回数に応じて構成要素重要度を上げた値を、コメント重要度として設定する(例えば、キーワードが含まれている箇所及び各キーワードに設定した所定の重要度に比例してコメント重要度を上げる)。 Further, for example, the design drawing automatic generation device 100 sets, as the comment importance degree, a value obtained by increasing the component importance degree according to the number of times the comment includes a predetermined keyword (for example, the keyword is included). The comment importance is increased in proportion to the place where the comment is set and the predetermined importance set for each keyword).

次に、設計図自動生成装置100は、s806で算出した当該コメントの重要度に基づき、設計図を生成する(s807)。例えば、設計図自動生成装置100は、その重要度がs803で設定した閾値又はその他予め設定した閾値以上の全てのコメントを特定し、特定したコメントを設計図に図示するコメントとする。また、設計図自動生成装置100は、この特定したコメントに対応する構成要素(又は、s804で抽出した構成要素でもよい)を、設計図に図示する構成要素とする。なお、コメントは、コメント重要度に応じた表示形式(例えば、強調表示、色付き表示)を有していてもよい。 Next, the design drawing automatic generation device 100 generates a design drawing based on the importance of the comment calculated in s806 (s807). For example, the design drawing automatic generation device 100 specifies all comments whose importance is equal to or higher than the threshold value set in s803 or other threshold values set in advance, and sets the specified comments as the comments illustrated in the design drawing. Further, the design drawing automatic generation device 100 sets the constituent element (or the constituent element extracted in s804) corresponding to the specified comment as the constituent element illustrated in the design drawing. Note that the comment may have a display format (for example, highlighted display, colored display) according to the comment importance level.

設計図自動生成装置100は、s807で生成した設計図の大きさが適正であるか否かを判定する(s808)。具体的には、例えば、設計図自動生成装置100は、生成した設計図の大きさが所定の基準範囲に収まっているか否かを判定し、又は、ユーザから設計図の大きさが適正か否かの情報の入力を受け付ける。 The design drawing automatic generation device 100 determines whether or not the size of the design drawing generated in s807 is appropriate (s808). Specifically, for example, the design drawing automatic generation device 100 determines whether the size of the generated design drawing is within a predetermined reference range, or whether the size of the design drawing is appropriate from the user. Accept input of information.

設計図の大きさが適正でない場合は(s808:NO)、設計図自動生成装置100は、規模情報290に係る新たな閾値を設定し(s803)、s804の処理を実行する。他方、設計図の大きさが適正である場合は(s808:YES)、設計図生成処理は終了する(s809)。 When the size of the design drawing is not appropriate (s808: NO), the design drawing automatic generation device 100 sets a new threshold value related to the scale information 290 (s803) and executes the processing of s804. On the other hand, if the size of the design drawing is appropriate (s808: YES), the design drawing generation process ends (s809).

ここで、コメント重要度算出処理s5及び設計図生成処理s7により生成される設計図の例を説明する。
(設計図の例(シーケンス図))
図10は、設計図自動生成装置100が生成し表示するシーケンス図の一例を示す図である。このシーケンス図1000は、構成要素重要度に基づき抽出されたモジュールの名称表示1002と、そのモジュールの呼び出し元メソッドの名称表示1004と、そのモジュールの呼び出し先メソッドの名称表示1006と、各モジュールに対応する、構成要素重要度及びコメント重要度に基づき抽出されたコメント表示1008(内部コメント)とを含む。そして、モジュール、呼び出し元メソッド、及び呼び出し先メソッドの間の相互関係(相互作用)が、時間軸1010に沿って表示される。
Here, an example of the design drawing generated by the comment importance calculation processing s5 and the design drawing generation processing s7 will be described.
(Example of design drawing (sequence diagram))
FIG. 10 is a diagram showing an example of a sequence diagram generated and displayed by the design drawing automatic generation device 100. This sequence diagram 1000 corresponds to the module name display 1002 extracted based on the component importance, the caller method name display 1004 of the module, the callee method name display 1006 of the module, and each module. The comment display 1008 (internal comment) extracted based on the component importance level and the comment importance level is included. Then, the mutual relationship (interaction) between the module, the caller method, and the callee method is displayed along the time axis 1010.

次に、他の設計図の例を説明する。
(設計図の例(アクティビティ図))
図11は、設計図自動生成装置100が生成し表示するアクティビティ図の一例を示す図である。このアクティビティ図1100には、構成要素重要度に基づき抽出された各モジュールの名称表示1102と、各モジュールに対応する、構成要素重要度及びコメント重要度に基づき抽出された定義コメントの定義コメント表示1104と、そのモジュールに対応する、構成要素重要度及びコメント重要度に基づき抽出された内部コメントの内部コメント表示1106とが表示される。
Next, an example of another design drawing will be described.
(Example of blueprint (activity diagram))
FIG. 11 is a diagram showing an example of an activity diagram generated and displayed by the design drawing automatic generation device 100. In this activity diagram 1100, the name display 1102 of each module extracted based on the component importance, and the definition comment display 1104 of the definition comment corresponding to each module extracted based on the component importance and the comment importance And an internal comment display 1106 of the internal comment extracted based on the component importance and the comment importance corresponding to the module.

定義コメント表示1104は、モジュールが行う各処理に対応するコメントの表示であり、各処理の実行順序に沿って表示される。内部コメント表示1106は、定義コメント表示1104が表示する処理の内容の説明文の表示である。 The definition comment display 1104 is a display of comments corresponding to each process performed by the module, and is displayed according to the execution order of each process. The internal comment display 1106 is a display of explanatory text of the content of the process displayed by the definition comment display 1104.

以上のように本実施形態に係る設計図作成支援装置(設計図自動生成装置100)は、ソースコードを構成する各構成要素の重要度を算出し、各構成要素に対応するコメントの重要度を、対応する構成要素の重要度と、コメントの所定の属性とに基づき算出し、算出した各コメントの重要度に基づき、設計図の生成に必要なコメントを抽出し、抽出したコメント及びコメントに対応する構成要素を図示したソースコードの設計図を生成するので、ソースコードにおいて重要な構成要素(モジュール等)に対応し、またコメントの属性に基づき重要と判定されたコメントを含む設計図を生成することができる。したがって、本実施形態に係る設計図自動生成装置100によれば、ソースコードの概要をユーザが的確に把握できる設計図を作成することができる。 As described above, the design drawing creation support apparatus (design drawing automatic generation apparatus 100) according to the present embodiment calculates the importance of each component that constitutes the source code, and determines the importance of the comment corresponding to each component. , Calculate based on the importance of the corresponding component and the predetermined attribute of the comment, extract the comments necessary for generating the design drawing based on the calculated importance of each comment, and respond to the extracted comments and comments Since the design drawing of the source code showing the constituent elements to be generated is generated, the design drawing corresponding to the important constituent element (module etc.) in the source code and including the comment determined to be important based on the attribute of the comment is generated. be able to. Therefore, according to the automatic design drawing generator 100 according to the present embodiment, it is possible to create a design drawing that allows the user to accurately grasp the outline of the source code.

以上の実施形態の説明は、本発明の理解を容易にするためのものであり、本発明を限定するものではない。本発明はその趣旨を逸脱することなく、変更、改良され得ると共に本発明にはその等価物が含まれる。 The above description of the embodiments is for facilitating the understanding of the present invention and does not limit the present invention. The present invention can be modified and improved without departing from the spirit thereof and the present invention includes equivalents thereof.

例えば、本実施形態では、コメント重要度算出処理において、生成する設計図の情報量の多寡を調節するためのパラメータとして閾値を設定したが、閾値以外のパラメータや関数等を設定してもよい。 For example, in the present embodiment, in the comment importance degree calculation process, the threshold value is set as a parameter for adjusting the amount of information amount of the generated blueprint, but parameters or functions other than the threshold value may be set.

また、本実施形態で説明した設計図自動生成装置100の各機能の一部を、設計図自動生成装置100と通信可能な他の情報処理装置(他のサーバ等)に設けてもよい。例えば、ソースコード解析部202又は設計図生成部205の全部又は一部を実現するプログラム、他の情報処理装置に設けてもよい。 Further, some of the functions of the automatic design drawing generating apparatus 100 described in the present embodiment may be provided in another information processing apparatus (another server or the like) capable of communicating with the automatic design drawing generating apparatus 100. For example, it may be provided in a program that realizes all or a part of the source code analysis unit 202 or the design drawing generation unit 205, or another information processing device.

以上の本明細書の記載により、少なくとも次のことが明らかにされる。すなわち、前記設計図作成支援装置は、ソースコードにより実行される処理のうち図示の必要性が高い処理の情報を特定する情報である観点情報を記憶し、前記構成要素重要度算出処理において、前記記憶した観点情報に基づき前記構成要素の重要度を算出する、としてもよい。 The above description of the present specification clarifies at least the following. That is, the design drawing creation support device stores viewpoint information that is information that identifies information of a process that is highly necessary to be illustrated among the processes executed by the source code, and in the component importance calculation process, The importance of the constituent element may be calculated based on the stored viewpoint information.

このように、観点情報に基づき構成要素の重要度を算出し、ソースコードにより実行される処理のうち図示の必要性が高い処理に係る構成要素を優先的に設計図に表示することで、ユーザにとって可視化の必要性が高いモジュール(メソッド、変数等)のみを表示し、ソースコードの概要及び設計図の可読性を高めることができる。 In this way, by calculating the degree of importance of the constituent elements based on the viewpoint information and preferentially displaying the constituent elements related to the processing that is highly illustrated in the processing executed by the source code on the design drawing, the user can Only modules (methods, variables, etc.) that need to be visualized by the user can be displayed, and the readability of the outline of the source code and the blueprint can be improved.

また、前記設計図作成支援装置は、生成する設計図が図示できる情報の種類を特定する情報である種類情報を記憶し、前記コメント重要度算出処理において、その重要度を算出するコメントを、前記種類情報に基づき抽出し、抽出したコメントについてのコメント重要度を、前記構成要素の重要度と、前記コメントの所定の属性とに基づき算出する、とし
てもよい。
In addition, the design drawing creation support device stores type information that is information that specifies the type of information that a design drawing to be generated can be illustrated, and in the comment importance calculation process, a comment whose importance is calculated is It is also possible to extract the comment importance based on the type information and to calculate the comment importance degree of the extracted comment based on the importance degree of the constituent element and a predetermined attribute of the comment.

このように、コメント重要度を算出するコメントを種類情報に基づき抽出することで、生成する設計図の種類に応じて、図示可能な情報のみを設計図に表示させることができ、設計図の可読性を高めることができる。 In this way, by extracting the comments that calculate the comment importance level based on the type information, it is possible to display only the information that can be illustrated on the design drawing according to the type of the design drawing to be generated, and the readability of the design drawing is improved. Can be increased.

また、前記設計図作成支援装置は、前記コメントの所定の属性として、前記ソースコードにおける当該コメントの位置、当該コメントの長さ、又は当該コメントの内容のいずれかを算出し、前記コメント重要度算出処理において、前記コメント重要度を、前記算出したコメントの属性と、前記構成要素の重要度とに基づき算出する、としてもよい。 Further, the design drawing creation supporting apparatus calculates, as a predetermined attribute of the comment, either the position of the comment in the source code, the length of the comment, or the content of the comment, and calculates the comment importance degree. In the process, the comment importance may be calculated based on the calculated attribute of the comment and the importance of the constituent element.

このように、コメントの属性として、ソースコードにおけるコメントの位置、長さ、内容を考慮することで、ソースコードにおける各コメントの重要性をより正確に把握し、ソースコードの内容の特徴をより明確に表示したコメントを有する設計図を生成し、ユーザによる設計図の把握をより容易にすることができる。 In this way, by considering the position, length, and content of the comment in the source code as the attribute of the comment, the importance of each comment in the source code can be understood more accurately, and the characteristics of the content of the source code can be more clearly defined. It is possible to generate a design drawing having a comment displayed in, and make it easier for the user to grasp the design drawing.

また、前記設計図作成支援装置は、生成する設計図の規模を示す情報である規模情報を記憶し、前記設計図生成処理において、前記ソースコードの構成要素のうち、その重要度が前記記憶した規模情報に基づく所定の閾値を超えている構成要素を特定し、特定した構成要素に対応する、前記算出したコメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する、としてもよい。 Further, the design drawing creation support device stores scale information that is information indicating the scale of the design drawing to be generated, and in the design drawing generation processing, the importance of the constituent elements of the source code is stored. A component that exceeds a predetermined threshold based on the scale information is identified, the comment shown in the design drawing is extracted based on the importance of the calculated comment corresponding to the identified component, and the extracted comment and the comment It is also possible to generate a blueprint of the source code in which the components corresponding to are illustrated.

このように、生成する設計図の規模を示す情報である規模情報を利用して、設計図の生成の必要なコメントを抽出することで、ユーザが把握しやすい規模で設計図を生成し、ユーザが設計図をより把握しやすくすることができる。 In this way, by using the scale information, which is the information indicating the scale of the blueprint to be generated, by extracting the comments required to generate the blueprint, the blueprint is generated on a scale that is easy for the user to grasp. Can make it easier to understand the blueprint.

また、前記設計図作成支援装置は、前記生成した設計図を所定の画面に表示する、としてもよい。 Further, the design drawing creation support device may display the generated design drawing on a predetermined screen.

これにより、ユーザは、ソースコードの概要を迅速に把握することができる。 This allows the user to quickly grasp the outline of the source code.

100 設計図自動生成装置、201 構成要素重要度算出部、202 ソースコード解析部、203 コメント重要度算出部、204 コメント解析部、205 設計図生成部、270 観点情報、280 種類情報、290 規模情報 100 design drawing automatic generation device, 201 component importance calculation unit, 202 source code analysis unit, 203 comment importance calculation unit, 204 comment analysis unit, 205 design drawing generation unit, 270 viewpoint information, 280 type information, 290 scale information

Claims (10)

プロセッサ及びメモリを有する設計図作成支援装置が、
所定の情報処理を行うためのソースコードを取得し、取得したソースコードを構成する各構成要素の重要度を算出する構成要素重要度算出処理と、
前記ソースコードに記述されている、前記各構成要素に対応するコメントを特定し、特定した各コメントの重要度を、当該コメントに対応する構成要素の重要度と、当該コメントの所定の属性とに基づき算出するコメント重要度算出処理と、
前記算出した各コメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する設計図生成処理と、
を実行する、設計図作成支援方法。
A design drawing support device having a processor and a memory,
A constituent element importance calculation process of acquiring a source code for performing predetermined information processing and calculating the importance of each constituent element that constitutes the acquired source code,
The comment described in the source code and corresponding to each of the constituent elements is specified, and the importance of each specified comment is set to the importance of the constituent element corresponding to the comment and a predetermined attribute of the comment. Comment importance calculation processing that is calculated based on
Based on the calculated importance of each comment, the comment shown in the design drawing is extracted, the extracted comment and the components corresponding to the comment are illustrated, and a design drawing generating process for generating a design drawing of the source code,
A method for supporting blueprint creation that executes.
前記設計図作成支援装置は、
ソースコードにより実行される処理のうち図示の必要性が高い処理の情報を特定する情報である観点情報を記憶し、
前記構成要素重要度算出処理において、前記記憶した観点情報に基づき前記構成要素の重要度を算出する、
請求項1に記載の設計図作成支援方法。
The design drawing support device,
Stores viewpoint information that is information that identifies information of a process that is highly necessary to be illustrated among the processes executed by the source code,
In the component importance calculation process, the importance of the component is calculated based on the stored viewpoint information,
The design drawing support method according to claim 1.
前記設計図作成支援装置は、
生成する設計図が図示できる情報の種類を特定する情報である種類情報を記憶し、
前記コメント重要度算出処理において、その重要度を算出するコメントを、前記種類情報に基づき抽出し、抽出したコメントの重要度を、前記構成要素の重要度と、前記コメントの所定の属性とに基づき算出する、
請求項1に記載の設計図作成支援方法。
The design drawing support device,
Stores type information, which is information that identifies the type of information that the design drawing can generate.
In the comment importance calculation process, a comment whose importance is calculated is extracted based on the type information, and the importance of the extracted comment is based on the importance of the constituent element and a predetermined attribute of the comment. calculate,
The design drawing support method according to claim 1.
前記設計図作成支援装置は、
前記コメントの所定の属性として、前記ソースコードにおける当該コメントの位置、当該コメントの長さ、又は当該コメントの内容のいずれかを算出し、
前記コメント重要度算出処理において、前記コメントの重要度を、前記算出したコメントの属性と、前記構成要素の重要度とに基づき算出する、
請求項1に記載の設計図作成支援方法。
The design drawing support device,
As the predetermined attribute of the comment, calculate the position of the comment in the source code, the length of the comment, or the content of the comment,
In the comment importance calculation process, the importance of the comment is calculated based on the attribute of the calculated comment and the importance of the constituent element,
The design drawing support method according to claim 1.
前記設計図作成支援装置は、
生成する設計図の規模を示す情報である規模情報を記憶し、
前記設計図生成処理において、前記ソースコードの構成要素のうち、その重要度が前記記憶した規模情報に基づく所定の閾値を超えている構成要素を特定し、特定した構成要素に対応する、前記算出したコメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する、
請求項1に記載の設計図作成支援方法。
The design drawing support device,
Stores scale information, which is the information indicating the scale of the blueprint to be generated,
In the design drawing generation process, of the constituent elements of the source code, a constituent element whose importance exceeds a predetermined threshold based on the stored scale information is specified, and the calculation is performed corresponding to the specified constituent element. Based on the importance of the comment, the comment shown in the blueprint is extracted, the extracted comment and the constituent elements corresponding to the comment are illustrated, and the blueprint of the source code is generated.
The design drawing support method according to claim 1.
前記設計図作成支援装置は、前記生成した設計図を所定の画面に表示する、請求項1に記載の設計図作成支援方法。 The design drawing creation support method according to claim 1, wherein the design drawing creation support apparatus displays the generated design drawing on a predetermined screen. 前記設計図作成支援装置は、
ソースコードにより実行される処理のうち図示の必要性が高い処理の情報を特定する情報である観点情報を記憶し、
生成する設計図が図示できる情報の種類を特定する情報である種類情報を記憶し、
生成する設計図の規模を示す情報である規模情報を記憶し、
前記構成要素重要度算出処理において、前記記憶した観点情報に基づき前記構成要素の重要度を算出し、
前記コメント重要度算出処理において、その重要度を算出するコメントを、前記種類情報に基づき抽出し、抽出したコメントの重要度を、前記構成要素の重要度と、前記コメントの所定の属性とに基づき算出し、
前記設計図生成処理において、前記ソースコードの構成要素のうち、その重要度が前記記憶した規模情報に基づく所定の閾値を超えている構成要素を特定し、特定した構成要素に対応する、前記算出したコメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する、
請求項1に記載の設計図作成支援方法。
The design drawing support device,
Stores viewpoint information that is information that identifies information of a process that is highly necessary to be illustrated among the processes executed by the source code,
Stores type information, which is information that identifies the type of information that the design drawing can generate.
Stores scale information, which is the information indicating the scale of the blueprint to be generated,
In the component importance calculation process, the importance of the component is calculated based on the stored viewpoint information,
In the comment importance calculation process, a comment whose importance is calculated is extracted based on the type information, and the importance of the extracted comment is based on the importance of the constituent element and a predetermined attribute of the comment. Calculate,
In the design drawing generation process, of the constituent elements of the source code, a constituent element whose importance exceeds a predetermined threshold based on the stored scale information is specified, and the calculation is performed corresponding to the specified constituent element. Based on the importance of the comment, the comment shown in the blueprint is extracted, the extracted comment and the constituent elements corresponding to the comment are illustrated, and the blueprint of the source code is generated.
The design drawing support method according to claim 1.
前記設計図作成支援装置は、前記観点情報、前記種類情報、又は前記規模情報のうち少なくともいずれかの入力をユーザから受け付ける、請求項7に記載の設計図作成支援方法。 The design drawing support method according to claim 7, wherein the design drawing support apparatus accepts an input of at least one of the viewpoint information, the type information, and the scale information from a user. プロセッサ及びメモリを有し、
所定の情報処理を行うためのソースコードを取得し、取得したソースコードを構成する各構成要素の重要度を算出する構成要素重要度算出部と、
前記ソースコードに記述されている、前記各構成要素に対応するコメントを特定するコメント解析部と、
前記特定した各コメントの重要度を、当該コメントに対応する構成要素の重要度と、当該コメントの所定の属性とに基づき算出するコメント重要度算出部と、
前記算出した各コメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する設計図生成部と、
を備える、設計図作成支援装置。
Has a processor and memory,
A constituent element importance calculation unit that acquires a source code for performing predetermined information processing and calculates the importance of each constituent element that constitutes the acquired source code,
A comment analysis unit, which is described in the source code, identifies a comment corresponding to each of the components,
The importance of each of the identified comments, the importance of the component corresponding to the comment, and a comment importance calculation unit that calculates based on a predetermined attribute of the comment,
Based on the calculated importance of each comment, the comment shown in the design drawing is extracted, the extracted comment and the constituent elements corresponding to the comment are illustrated, and a design drawing generating unit for generating a design drawing of the source code,
A device for supporting design drawing creation.
プロセッサ及びメモリを有する情報処理装置に、
所定の情報処理を行うためのソースコードを取得し、取得したソースコードを構成する各構成要素の重要度を算出する構成要素重要度算出処理と、
前記ソースコードに記述されている、前記各構成要素に対応するコメントを特定するコメント解析処理と、
前記特定した各コメントの重要度を、当該コメントに対応する構成要素の重要度と、当該コメントの所定の属性とに基づき算出するコメント重要度算出処理と、
前記算出した各コメントの重要度に基づき、設計図に示すコメントを抽出し、抽出したコメント及び当該コメントに対応する構成要素を図示した、ソースコードの設計図を生成する設計図生成処理と、
を実行させる、設計図作成支援プログラム。
An information processing device having a processor and a memory,
A constituent element importance calculation process of acquiring a source code for performing predetermined information processing and calculating the importance of each constituent element that constitutes the acquired source code,
A comment analysis process for identifying a comment corresponding to each component described in the source code,
The importance of each of the identified comments, the importance of the constituent elements corresponding to the comment, and a comment importance calculation process that is calculated based on a predetermined attribute of the comment,
Based on the calculated importance of each comment, the comment shown in the design drawing is extracted, the extracted comment and the components corresponding to the comment are illustrated, and a design drawing generating process for generating a design drawing of the source code,
A design drawing support program that executes.
JP2018238301A 2018-12-20 2018-12-20 Design drawing creation support method, design drawing creation support device, and design drawing creation support program Pending JP2020101898A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2018238301A JP2020101898A (en) 2018-12-20 2018-12-20 Design drawing creation support method, design drawing creation support device, and design drawing creation support program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2018238301A JP2020101898A (en) 2018-12-20 2018-12-20 Design drawing creation support method, design drawing creation support device, and design drawing creation support program

Publications (1)

Publication Number Publication Date
JP2020101898A true JP2020101898A (en) 2020-07-02

Family

ID=71139488

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018238301A Pending JP2020101898A (en) 2018-12-20 2018-12-20 Design drawing creation support method, design drawing creation support device, and design drawing creation support program

Country Status (1)

Country Link
JP (1) JP2020101898A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7514149B2 (en) 2020-09-07 2024-07-10 株式会社野村総合研究所 Information processing device and program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP7514149B2 (en) 2020-09-07 2024-07-10 株式会社野村総合研究所 Information processing device and program

Similar Documents

Publication Publication Date Title
Andow et al. {PolicyLint}: investigating internal privacy policy contradictions on google play
US12001788B2 (en) Systems and methods for diagnosing problems from error logs using natural language processing
US8601438B2 (en) Data transformation based on a technical design document
US9224103B1 (en) Automatic annotation for training and evaluation of semantic analysis engines
US9104709B2 (en) Cleansing a database system to improve data quality
CA2815527A1 (en) Bidirectional text checker
JP2017041171A (en) Test scenario generation support device and test scenario generation support method
EP2951680B1 (en) Acquiring identification of an application lifecycle management entity associated with similar code
JP2013246644A (en) Software object correction support device, software object correction support method and program
JP2016045545A (en) Influence investigation system, influence investigation method, and influence investigation program
US8813036B2 (en) Visual representation of a difference between Cartesian product models
US10241899B2 (en) Test input information search device and method
US11500840B2 (en) Contrasting document-embedded structured data and generating summaries thereof
JP6120607B2 (en) Requirement detection apparatus and requirement detection program
JP5576570B2 (en) Method, program and system for generating a workflow from business specifications
CN113139372A (en) Information processing apparatus, storage medium, and information processing method
JP2020101898A (en) Design drawing creation support method, design drawing creation support device, and design drawing creation support program
CN111164560B (en) Techniques for dynamically defining data record formats
JP6966289B2 (en) Information analyzers, programs and methods
US20150006578A1 (en) Dynamic search system
JP6281239B2 (en) Program development support apparatus and method
US9471569B1 (en) Integrating information sources to create context-specific documents
CN111898762A (en) Deep learning model catalog creation
US20230401056A1 (en) Interactive code visualization system
Aversano et al. Bug report quality evaluation considering the effect of submitter reputation